@asksable/site-connector
v0.1.6
Published
Thin first-party package for connecting separate website repos to Sable through `siteSlug`.
Readme
@asksable/site-connector
Thin first-party package for connecting separate website repos to Sable through siteSlug.
Purpose
Use this package in public website repos that should:
- read business/site profile data from Sable
- submit contact forms into Sable
- render the shared booking widget against Sable public booking APIs
Setup
Wrap the site in SableSiteProvider:
import { SableSiteProvider } from '@asksable/site-connector'
<SableSiteProvider
config={{
apiUrl: import.meta.env.VITE_SABLE_PUBLIC_API_URL,
siteSlug: import.meta.env.VITE_SABLE_SITE_SLUG,
}}
>
<App />
</SableSiteProvider>Then consume the profile or render the shared booking widget:
import { BookingWidgetPanel, useSableSiteProfile } from '@asksable/site-connector'Exports
createSablePublicClientSableSiteProvideruseSableSiteProfileuseSableSiteClientuseSableSiteConfigBookingWidgetPanelgetResolvedSiteProfile- types for public site and booking payloads
Public API Contract
The package expects the public connector endpoints documented in:
