@riverbankcms/sdk 0.96.0 → 0.98.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -1
- package/dist/{PreviewEditorSidebar-46VT4QVU.mjs → PreviewEditorSidebar-CG3SSJND.mjs} +3 -3
- package/dist/{PreviewEditorUI-JD75GE5F.mjs → PreviewEditorUI-RHNGKAAU.mjs} +3 -3
- package/dist/SdkPreviewModeRuntime-OV5PNJBB.mjs +8 -0
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +35 -1
- package/dist/_dts/api/src/bookingOperations.d.ts +246 -0
- package/dist/_dts/api/src/contentRuntime.d.ts +109 -40
- package/dist/_dts/api/src/endpoints.d.ts +80 -0
- package/dist/_dts/api/src/index.d.ts +3 -2
- package/dist/_dts/api/src/public/endpoints.d.ts +1 -1
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +10 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +2 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +2 -1
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +7 -1
- package/dist/_dts/blocks/src/PageRenderer.d.ts +2 -1
- package/dist/_dts/blocks/src/bindings/types.d.ts +0 -4
- package/dist/_dts/blocks/src/client/site-chrome.d.ts +7 -0
- package/dist/_dts/blocks/src/contracts/index.d.ts +1 -0
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +12 -12
- package/dist/_dts/blocks/src/primitives/content/primitives.d.ts +4 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/layout.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/weekly-slot-availability.d.ts +34 -0
- package/dist/_dts/blocks/src/system/componentFactory.d.ts +1 -0
- package/dist/_dts/blocks/src/system/constants/blockKinds.d.ts +1 -1
- package/dist/_dts/blocks/src/system/customize/facets.d.ts +2 -2
- package/dist/_dts/blocks/src/system/data/loaderEndpoints.d.ts +1 -1
- package/dist/_dts/blocks/src/system/data/prefetchBlockData.d.ts +4 -1
- package/dist/_dts/blocks/src/system/node/builder.d.ts +2 -0
- package/dist/_dts/blocks/src/system/node/schema.d.ts +13 -0
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
- package/dist/_dts/blocks/src/system/registry.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useAppointmentCheckoutVerification.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableSlots.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessEventRegistrationFlow.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/usePaymentVerification.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +8 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +133 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.client.controller.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.client.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.client.state.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.server.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.view.d.ts +11 -0
- package/dist/_dts/blocks/src/system/runtime/resolver.d.ts +31 -1
- package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.d.ts +5 -0
- package/dist/_dts/blocks/src/utils/date-formatting.d.ts +1 -1
- package/dist/_dts/content-editor/src/primitives/PreviewInlineTextEditor.d.ts +1 -1
- package/dist/_dts/content-editor/src/primitives/PreviewRichTextEditor.d.ts +1 -1
- package/dist/_dts/content-model/src/templates/defaults.d.ts +5 -5
- package/dist/_dts/content-model/src/templates/types.d.ts +2 -6
- package/dist/_dts/core/src/branded.d.ts +8 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +505 -2
- package/dist/_dts/field-primitives/src/bindings/index.d.ts +8 -0
- package/dist/_dts/sdk/src/cli/commands/push/publishGuidance.d.ts +15 -0
- package/dist/_dts/sdk/src/cli/commands/push/scopes/commandBackedDatedOfferingScope.d.ts +2 -1
- package/dist/_dts/sdk/src/cli/commands/push/scopes/types.d.ts +3 -1
- package/dist/_dts/sdk/src/cli/commands/push/stale-resolution.d.ts +9 -3
- package/dist/_dts/sdk/src/cli/commands/push/workflowPlan.d.ts +34 -0
- package/dist/_dts/sdk/src/cli/commands/setup.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/config-loader.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/content/metadataStore.d.ts +29 -0
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +16 -14
- package/dist/_dts/sdk/src/cli/content/writer.d.ts +6 -4
- package/dist/_dts/sdk/src/cli/env-scope.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/helpers.d.ts +6 -7
- package/dist/_dts/sdk/src/cli/merge-remote/entryMergePush.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/merge-remote/pageMergePush.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/push-config.d.ts +13 -2
- package/dist/_dts/sdk/src/cli/setup/setupPlan.d.ts +51 -0
- package/dist/_dts/sdk/src/cli/site-commands/commandRuntime.d.ts +21 -0
- package/dist/_dts/sdk/src/client/runtimeCachePolicy.d.ts +1 -1
- package/dist/_dts/sdk/src/client/types.d.ts +18 -2
- package/dist/_dts/sdk/src/config/types.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +3 -0
- package/dist/_dts/sdk/src/contracts/bindings.d.ts +3 -7
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +13 -0
- package/dist/_dts/sdk/src/next/route-outcome-proxy.d.ts +3 -3
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +174 -78
- package/dist/_dts/sdk/src/public-api/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/bindings.d.ts +4 -4
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +52 -1
- package/dist/_dts/sdk/src/rendering/hooks/usePage.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +18 -66
- package/dist/_dts/sdk/src/types/block-kinds.d.ts +1 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/{chunk-EL55VV6Q.mjs → chunk-6WDBXCPX.mjs} +31 -10
- package/dist/{chunk-XMATDBXO.mjs → chunk-DBRI3PQF.mjs} +731 -180
- package/dist/{chunk-VHIMXQ7Z.mjs → chunk-H24OU7WG.mjs} +2 -2
- package/dist/{chunk-4TLTV7OB.mjs → chunk-PKDPQHB5.mjs} +2 -2
- package/dist/{chunk-VTPPVAOL.mjs → chunk-QPXE2OUZ.mjs} +1 -1
- package/dist/{chunk-7ED5UNHL.mjs → chunk-V2BYFSPW.mjs} +109 -0
- package/dist/cli/index.mjs +2131 -1033
- package/dist/cli/init-docs/content/cli-reference.md +29 -1
- package/dist/cli/init-docs/content/getting-started.md +8 -0
- package/dist/cli/init-docs/content/workflow-agent-safe-sync.md +3 -1
- package/dist/cli/init-docs/content/workflow-preview-mode.md +6 -0
- package/dist/cli/init-docs/content/workflow-remote-setup.md +51 -0
- package/dist/client/{accordion-GUNXIIZR.mjs → accordion-Q2BDNL53.mjs} +1 -1
- package/dist/client/{bookingForm-AOU4VHP5.mjs → bookingForm-ZMP4P7EK.mjs} +16 -6
- package/dist/client/bookings.mjs +98 -18
- package/dist/client/{carousel-4QSX2JPC.mjs → carousel-LW3UXPWO.mjs} +1 -1
- package/dist/client/{cart-JKN6C4ZB.mjs → cart-Z6D3KS6K.mjs} +5 -5
- package/dist/client/{checkout-YY6YMITW.mjs → checkout-YMT2QJQM.mjs} +5 -5
- package/dist/client/{chunk-6H27K6AA.mjs → chunk-26ZBRXFR.mjs} +9 -3
- package/dist/client/{chunk-VJROUYOQ.mjs → chunk-DRRQ7QSL.mjs} +2 -2
- package/dist/client/{chunk-BFCJZODD.mjs → chunk-ET2MDQQT.mjs} +4 -4
- package/dist/client/{chunk-H7A6PUGM.mjs → chunk-HBQEAOG4.mjs} +1 -1
- package/dist/client/{chunk-CPKMJVBD.mjs → chunk-IEOECM7U.mjs} +62 -43
- package/dist/client/{chunk-TNGL2WJF.mjs → chunk-KDP7ZRZV.mjs} +16 -0
- package/dist/client/{chunk-GWCRCJLB.mjs → chunk-R4XK3CKR.mjs} +12 -1
- package/dist/client/{chunk-A3YN7M3G.mjs → chunk-SK2BMD22.mjs} +2 -2
- package/dist/client/{chunk-SY543WZ3.mjs → chunk-XNTHVZ25.mjs} +1 -1
- package/dist/client/client.mjs +3729 -3054
- package/dist/client/{courseRegistration-UU2KMPSQ.mjs → courseRegistration-DGKCMC77.mjs} +4 -4
- package/dist/client/{eventCalendar-WIVNS2TM.mjs → eventCalendar-74Z2NNFM.mjs} +7 -7
- package/dist/client/{eventCombined-P3G5MW4J.mjs → eventCombined-GK2ODOX2.mjs} +7 -7
- package/dist/client/{eventDetails-2VHJ2RDG.mjs → eventDetails-MONAGT3N.mjs} +7 -7
- package/dist/client/{eventListing-TGO6JI3R.mjs → eventListing-SKGAO6PS.mjs} +7 -7
- package/dist/client/{eventRegistration-B46HEJES.mjs → eventRegistration-6KISGXRD.mjs} +7 -7
- package/dist/client/{form-VKRTFUNQ.mjs → form-FXPRTXHI.mjs} +2 -2
- package/dist/client/{headerSection-XUX4ZJLO.mjs → headerSection-7NAN5WNB.mjs} +2 -2
- package/dist/client/hooks.mjs +1661 -1334
- package/dist/client/{locationMap-NQFI5MJO.mjs → locationMap-UERN74U4.mjs} +2 -2
- package/dist/client/{newsletterForm-P2GETCQK.mjs → newsletterForm-SGWXMJ7U.mjs} +2 -2
- package/dist/client/{productDetail-7NQ7O5IF.mjs → productDetail-HN3HWZQZ.mjs} +5 -5
- package/dist/client/{productList-RX6ZJ7BL.mjs → productList-YT22Z5UR.mjs} +5 -5
- package/dist/client/rendering/client.mjs +2208 -1922
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +1497 -811
- package/dist/client/{shop-BHN5AKY6.mjs → shop-TKEDNWUS.mjs} +5 -5
- package/dist/preview-next/before-render.mjs +109 -0
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/preview-next/middleware.mjs +109 -0
- package/dist/{sdk-runtime-X2LXQ5IC.mjs → sdk-runtime-LWNYCQF2.mjs} +6 -6
- package/dist/server/components.mjs +2351 -1872
- package/dist/server/config-template-validation.mjs +6 -2
- package/dist/server/config-validation.mjs +1861 -1561
- package/dist/server/config.mjs +1861 -1561
- package/dist/server/data.mjs +1647 -1331
- package/dist/server/index.mjs +208 -9
- package/dist/server/next/middleware.mjs +2 -2
- package/dist/server/next.mjs +2572 -1878
- package/dist/server/page-converter.mjs +1461 -1276
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +2372 -1875
- package/dist/server/rendering.mjs +2557 -1941
- package/dist/server/routing.mjs +1716 -1353
- package/dist/server/server.mjs +1911 -1380
- package/package.json +1 -1
- package/dist/SdkPreviewModeRuntime-MJUSYUFB.mjs +0 -8
package/README.md
CHANGED
|
@@ -3122,6 +3122,16 @@ export default defineConfig({
|
|
|
3122
3122
|
|
|
3123
3123
|
The SDK includes a CLI for syncing configuration and content between your local environment and the CMS.
|
|
3124
3124
|
|
|
3125
|
+
### setup plan
|
|
3126
|
+
|
|
3127
|
+
Show the read-only lifecycle for site creation, management-key setup, dashboard user access, and SDK env variables:
|
|
3128
|
+
|
|
3129
|
+
```bash
|
|
3130
|
+
npx riverbankcms setup plan --env=remote
|
|
3131
|
+
```
|
|
3132
|
+
|
|
3133
|
+
The SDK CLI cannot create remote sites, issue keys, or grant user access from a site-scoped management key. Do those privileged operations through the dashboard/admin surface or approved CMS repo tooling, then use the setup planner and `env status` to verify the SDK repo has the right `RIVERBANK_*` variables.
|
|
3134
|
+
|
|
3125
3135
|
### push-config
|
|
3126
3136
|
|
|
3127
3137
|
Push schema/config surfaces to your CMS dashboard, including custom blocks, block field options/extensions, content type definitions/templates, SDK-managed site settings, and footer blocks:
|
|
@@ -3141,6 +3151,7 @@ Canonical event files in `content/events/*.json` may include `path` and `blocks`
|
|
|
3141
3151
|
| `--api-key <key>` | Management API key (or set `RIVERBANK_*_MGMT_API_KEY`) |
|
|
3142
3152
|
| `--dashboard <url>` | Dashboard URL (or set `RIVERBANK_*_DASHBOARD_URL`) |
|
|
3143
3153
|
| `--config <path>` | Path to config file (default: `./riverbank.config.ts`) |
|
|
3154
|
+
| `--dry-run` | Validate config and preview schema/config surfaces without mutating the dashboard |
|
|
3144
3155
|
|
|
3145
3156
|
**Example:**
|
|
3146
3157
|
|
|
@@ -3150,6 +3161,9 @@ export RIVERBANK_LOCAL_DASHBOARD_URL=https://www.riverbankcms.com
|
|
|
3150
3161
|
export RIVERBANK_LOCAL_MGMT_API_KEY=bld_mgmt_sk_...
|
|
3151
3162
|
npx riverbankcms push-config
|
|
3152
3163
|
|
|
3164
|
+
# Preview without applying
|
|
3165
|
+
npx riverbankcms push-config --dry-run
|
|
3166
|
+
|
|
3153
3167
|
# Or inline (remote)
|
|
3154
3168
|
npx riverbankcms push-config \
|
|
3155
3169
|
--api-key bld_mgmt_sk_... \
|
|
@@ -3233,9 +3247,14 @@ content/
|
|
|
3233
3247
|
│ ├── <identifier>.<ext>
|
|
3234
3248
|
│ └── .manifest.json
|
|
3235
3249
|
└── .meta/
|
|
3236
|
-
|
|
3250
|
+
├── local/
|
|
3251
|
+
│ └── {entity}.json # Local CMS sync timestamps
|
|
3252
|
+
└── remote/
|
|
3253
|
+
└── {entity}.json # Remote CMS sync timestamps
|
|
3237
3254
|
```
|
|
3238
3255
|
|
|
3256
|
+
Older projects with flat `content/.meta/{entity}.json` files are read as a compatibility fallback. The CLI writes new metadata into the target-specific `local/` or `remote/` directory the next time you pull or update metadata.
|
|
3257
|
+
|
|
3239
3258
|
Note: `content/media/` is local cache and migration working data by default. Generated SDK sites gitignore `content/media/*` so large downloaded files are not staged accidentally, while allowing intentional small fixtures under `content/media/fixtures/`. `content/media/.manifest.json` is also cache data (identifier -> checksum/filename) and intentionally does not store env-specific `assetId`s.
|
|
3240
3259
|
|
|
3241
3260
|
### push
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { resolvePreviewDashboardSetupHandoff, buildPreviewDashboardSetupUrl, resolvePreviewSidebarChromeModel, resolvePreviewEditorGuidanceModel, previewWidgetOverrides, canInspectSiteStyle, mapContentSchemaToFormFields, PreviewFormProvider, usePreviewBlockCustomizeSelectionOptional, BlockEditor, canApplySiteStyle, useBlockCustomizeControls, MAX_QUICK_MANIFEST_FIELDS } from './chunk-
|
|
3
|
-
import { useEntryController, useEditorUiStoreInstance, useUISelector, resolvePreviewSidebarTab, unsafeAsEditorBlockId, Tabs, TabsList, TabsTrigger, Button, X, TabsContent, useEditorUiStore, deriveRouteMetadataPresentation, resolvePageRouteSlug, createManifestValidation, createStoreBackend, ManifestForm, previewAssistantEnabled, Collapsible, CollapsibleTrigger, ChevronRight, CollapsibleContent, ContentFieldsForm, usePreviewDesignCoordinator, useSiteChromeCustomizeOptional, resolveStyleConfiguratorInitialSnapshot, createStyleConfiguratorState, isPreviewingChange, createOptimisticActionRunner, syncStyleConfiguratorState, getCuratedSiteStyle, planSiteStylePreviewChange, openRow, previewSiteStyle, applyResolvedSelections, previewButtonPersonality, previewHeaderLayout, previewHeaderStyle, planSiteChromeLookSelection, previewFooterLook, buildSiteChromeLookModels, planSiteChromeFooterLayoutSelection, previewPaletteVariant, previewTypographyPreset, setTypographyBodyFontOverride, setTypographyHeadingFontOverride, clearTypographyFontOverrides, paletteOverridesSchema, setPaletteOverrides, toggleRow, cancelPreview, dismissWarnings, dismissNotices, deriveStyleConfiguratorCapabilities, buildApplySiteStyleSelectionBody, markApplyFailed, selectionSnapshotFromApplySiteStyleSelectionResponse, styleConfiguratorHistoryEntryForPersistedSelection, markApplySaved, markApplySaving, findButtonPersonality, findPaletteVariant, findTypographyPreset, getHeaderLayout, getHeaderStyle, getFooterLayout, findFooterLook, cycleSiteChromeLookId, resolveContentTitle, foldSubroute, SUBROUTE_KINDS, Smartphone, Tablet, Monitor, Maximize2, cn, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuItem, listEntryPageContentSlots, ContentSpinner, Callout, CalloutDescription, curatedSiteStyles, ChevronLeft, cycleableSiteChromeOptions, requireEntriesForCuratedChoices, buttonPersonalities, typographyPresets, paletteVariants, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, FormRenderer, evaluateTypographyFontSlot, Separator, Surface, ColorPicker, Input } from './chunk-
|
|
4
|
-
import { usePreviewAuth, getDashboardUrl, unwrapResponse } from './chunk-
|
|
2
|
+
import { resolvePreviewDashboardSetupHandoff, buildPreviewDashboardSetupUrl, resolvePreviewSidebarChromeModel, resolvePreviewEditorGuidanceModel, previewWidgetOverrides, canInspectSiteStyle, mapContentSchemaToFormFields, PreviewFormProvider, usePreviewBlockCustomizeSelectionOptional, BlockEditor, canApplySiteStyle, useBlockCustomizeControls, MAX_QUICK_MANIFEST_FIELDS } from './chunk-H24OU7WG.mjs';
|
|
3
|
+
import { useEntryController, useEditorUiStoreInstance, useUISelector, resolvePreviewSidebarTab, unsafeAsEditorBlockId, Tabs, TabsList, TabsTrigger, Button, X, TabsContent, useEditorUiStore, deriveRouteMetadataPresentation, resolvePageRouteSlug, createManifestValidation, createStoreBackend, ManifestForm, previewAssistantEnabled, Collapsible, CollapsibleTrigger, ChevronRight, CollapsibleContent, ContentFieldsForm, usePreviewDesignCoordinator, useSiteChromeCustomizeOptional, resolveStyleConfiguratorInitialSnapshot, createStyleConfiguratorState, isPreviewingChange, createOptimisticActionRunner, syncStyleConfiguratorState, getCuratedSiteStyle, planSiteStylePreviewChange, openRow, previewSiteStyle, applyResolvedSelections, previewButtonPersonality, previewHeaderLayout, previewHeaderStyle, planSiteChromeLookSelection, previewFooterLook, buildSiteChromeLookModels, planSiteChromeFooterLayoutSelection, previewPaletteVariant, previewTypographyPreset, setTypographyBodyFontOverride, setTypographyHeadingFontOverride, clearTypographyFontOverrides, paletteOverridesSchema, setPaletteOverrides, toggleRow, cancelPreview, dismissWarnings, dismissNotices, deriveStyleConfiguratorCapabilities, buildApplySiteStyleSelectionBody, markApplyFailed, selectionSnapshotFromApplySiteStyleSelectionResponse, styleConfiguratorHistoryEntryForPersistedSelection, markApplySaved, markApplySaving, findButtonPersonality, findPaletteVariant, findTypographyPreset, getHeaderLayout, getHeaderStyle, getFooterLayout, findFooterLook, cycleSiteChromeLookId, resolveContentTitle, foldSubroute, SUBROUTE_KINDS, Smartphone, Tablet, Monitor, Maximize2, cn, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuItem, listEntryPageContentSlots, ContentSpinner, Callout, CalloutDescription, curatedSiteStyles, ChevronLeft, cycleableSiteChromeOptions, requireEntriesForCuratedChoices, buttonPersonalities, typographyPresets, paletteVariants, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, FormRenderer, evaluateTypographyFontSlot, Separator, Surface, ColorPicker, Input } from './chunk-DBRI3PQF.mjs';
|
|
4
|
+
import { usePreviewAuth, getDashboardUrl, unwrapResponse } from './chunk-V2BYFSPW.mjs';
|
|
5
5
|
import './chunk-R7POPVJR.mjs';
|
|
6
6
|
import { useMemo, useRef, useCallback, useEffect, useState, useTransition, useLayoutEffect, useSyncExternalStore, useId } from 'react';
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { resolvePreviewChromeSurface, usePreviewPageDesignEditorState, PREVIEW_CHROME_PORTAL_CLASS_NAME, PREVIEW_CHROME_THEME_CLASS_NAME, applyPreviewChromeSurfaceToElement, setPreviewSidebarTab } from './chunk-
|
|
3
|
-
import { useEntryEditorController, useEditorUiStore, useMultiAutosave, usePreviewDesignHistoryOrder, useSiteChromeCustomizeOptional, selectPreviewDesignHistoryDomain, EditorChrome, previewDesignHistoryDomainForCommand, classifyHistoryShortcut, previewAssistantEnabled, cn, Dialog, Button, Palette, DialogContent, DialogHeader, DialogTitle, DialogDescription, TriangleAlert, Pencil, Sparkles, useEditorUiStoreInstance } from './chunk-
|
|
4
|
-
import { usePreviewAuth, unwrapResponse } from './chunk-
|
|
2
|
+
import { resolvePreviewChromeSurface, usePreviewPageDesignEditorState, PREVIEW_CHROME_PORTAL_CLASS_NAME, PREVIEW_CHROME_THEME_CLASS_NAME, applyPreviewChromeSurfaceToElement, setPreviewSidebarTab } from './chunk-PKDPQHB5.mjs';
|
|
3
|
+
import { useEntryEditorController, useEditorUiStore, useMultiAutosave, usePreviewDesignHistoryOrder, useSiteChromeCustomizeOptional, selectPreviewDesignHistoryDomain, EditorChrome, previewDesignHistoryDomainForCommand, classifyHistoryShortcut, previewAssistantEnabled, cn, Dialog, Button, Palette, DialogContent, DialogHeader, DialogTitle, DialogDescription, TriangleAlert, Pencil, Sparkles, useEditorUiStoreInstance } from './chunk-DBRI3PQF.mjs';
|
|
4
|
+
import { usePreviewAuth, unwrapResponse } from './chunk-V2BYFSPW.mjs';
|
|
5
5
|
import './chunk-R7POPVJR.mjs';
|
|
6
6
|
import { useState, useMemo, useCallback, useEffect, useTransition } from 'react';
|
|
7
7
|
import { createPortal } from 'react-dom';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
export { SdkPreviewModeRuntime } from './chunk-6WDBXCPX.mjs';
|
|
3
|
+
import './chunk-QPXE2OUZ.mjs';
|
|
4
|
+
import './chunk-H24OU7WG.mjs';
|
|
5
|
+
import './chunk-PKDPQHB5.mjs';
|
|
6
|
+
import './chunk-DBRI3PQF.mjs';
|
|
7
|
+
import './chunk-V2BYFSPW.mjs';
|
|
8
|
+
import './chunk-R7POPVJR.mjs';
|
|
@@ -5,7 +5,7 @@ import type { BookingRequirementConfigRequest, BookingRequirementConfigResponse,
|
|
|
5
5
|
import type { BookingClosureConflictResponse, CreateBookingClosureRequest, CreateBookingClosureResponse, DeleteBookingClosureResponse, GetBookingClosureResponse, ListBookingClosuresResponse, PreviewBookingClosureResponse, BookingClosureRequest } from "./bookingClosures";
|
|
6
6
|
import type { BookingSettingsResponse, CreateEventSeriesRequest, EventSeriesRecord, UpdateBookingSettingsRequest, UpdateEventSeriesRequest } from "./bookingConfig";
|
|
7
7
|
import type { AdjustCustomerPassDetailsRequest, AdjustCustomerPassDetailsResponse, AssignCustomerMembershipRequest, AssignCustomerMembershipResponse, AssignCustomerPassRequest, AssignCustomerPassResponse, CancelCustomerMembershipAtPeriodEndRequest, CancelCustomerMembershipAtPeriodEndResponse, ConvertCreditRefundToCashRequest, ConvertCreditRefundToCashResponse, ListCustomerMembershipPaymentRefundsResponse, ListCustomerMembershipPaymentsResponse, ListCustomerPassRefundsResponse, RefundCustomerMembershipPaymentRequest, RefundCustomerMembershipPaymentResponse, RefundCustomerPassRequest, RefundCustomerPassResponse } from "./bookingAdjustments";
|
|
8
|
-
import type { AppointmentResourceResponse, AppointmentServiceResponse, BookingAppointmentWithDetails, CreateAppointmentResourceRequest, CreateAppointmentResourceWithAccountAccessRequest, CreateAppointmentResourceWithAccountAccessResponse, CreateAppointmentServiceRequest, CreateTeamMemberProfileResponse, DiscardTeamMemberProfileDraftResponse, DeleteServiceResponse, ListAppointmentResourcesResponse, ListAppointmentServicesResponse, ListCourseEnrollmentRefundsResponse, ListEventAttendeeRefundsResponse, ListEventAttendeeTransfersResponse, OpsCancelEventAttendeeRequest, OpsCancelEventAttendeeResponse, OpsEventAttendeeDetailsResponse, OpsListUpcomingEventOccurrencesResponse, OpsOccurrenceAttendeesResponse, OpsRefundEventAttendeeResponse, OpsUpdateEventAttendeeCheckinRequest, OpsUpdateEventAttendeeCheckinResponse, OpsValidateEventTicketRequest, OpsValidateEventTicketResponse, ReferenceOptionsResponse, RemoveAppointmentResourceResponse, RefundCourseEnrollmentRequest, RefundCourseEnrollmentResponse, RefundEventAttendeeRequest, RefundEventAttendeeResponse, TransferEventAttendeeRequest, TransferEventAttendeeResponse, UpdateAppointmentResourceRequest, UpdateAppointmentServiceRequest, PublishTeamMemberProfileRequest, PublishTeamMemberProfileResponse, CancelScheduledTeamMemberProfileResponse, ScheduleTeamMemberProfileRequest, ScheduleTeamMemberProfileResponse, TeamMemberProfileContentResponse, UnpublishTeamMemberProfileResponse, UpdateTeamMemberProfileContentRequest, UpdateTeamMemberProfilePolicyRequest, UpdateTeamMemberProfilePolicyResponse, UpdateTeamMemberProfileRouteMetadataRequest, UpdateTeamMemberProfileRouteMetadataResponse } from "./bookingOperations";
|
|
8
|
+
import type { AppointmentResourceResponse, AppointmentReservationLifecycleRequest, AppointmentReservationResponse, AppointmentServiceResponse, BookingAppointmentWithDetails, CreateAppointmentResourceRequest, CreateAppointmentResourceWithAccountAccessRequest, CreateAppointmentResourceWithAccountAccessResponse, CreateAppointmentReservationRequest, CreateAppointmentReservationRunRequest, CreateAppointmentReservationRunResponse, CreateAppointmentServiceRequest, CreateTeamMemberProfileResponse, DiscardTeamMemberProfileDraftResponse, DeleteServiceResponse, EndAppointmentReservationRequest, ListAppointmentResourcesResponse, ListAppointmentReservationsRequest, ListAppointmentReservationsResponse, ListAppointmentServicesResponse, ListCourseEnrollmentRefundsResponse, ListEventAttendeeRefundsResponse, ListEventAttendeeTransfersResponse, OpsCancelEventAttendeeRequest, OpsCancelEventAttendeeResponse, OpsEventAttendeeDetailsResponse, OpsListUpcomingEventOccurrencesResponse, OpsOccurrenceAttendeesResponse, OpsRefundEventAttendeeResponse, OpsUpdateEventAttendeeCheckinRequest, OpsUpdateEventAttendeeCheckinResponse, OpsValidateEventTicketRequest, OpsValidateEventTicketResponse, PreviewAppointmentReservationRunRequest, PreviewAppointmentReservationRunResponse, ReferenceOptionsResponse, RemoveAppointmentResourceResponse, RefundCourseEnrollmentRequest, RefundCourseEnrollmentResponse, RefundEventAttendeeRequest, RefundEventAttendeeResponse, TransferEventAttendeeRequest, TransferEventAttendeeResponse, UpdateAppointmentResourceRequest, UpdateAppointmentReservationRequest, UpdateAppointmentServiceRequest, PublishTeamMemberProfileRequest, PublishTeamMemberProfileResponse, CancelScheduledTeamMemberProfileResponse, ScheduleTeamMemberProfileRequest, ScheduleTeamMemberProfileResponse, TeamMemberProfileContentResponse, UnpublishTeamMemberProfileResponse, UpdateTeamMemberProfileContentRequest, UpdateTeamMemberProfilePolicyRequest, UpdateTeamMemberProfilePolicyResponse, UpdateTeamMemberProfileRouteMetadataRequest, UpdateTeamMemberProfileRouteMetadataResponse } from "./bookingOperations";
|
|
9
9
|
import type { AddEventOccurrenceAttendeeRequest, AddEventOccurrenceAttendeeResponse, AdjustCustomerCreditRequest, AdjustCustomerCreditResponse, BookingEventSeriesAttendee, BookingMembershipResponse, BookingPassResponse, CheckEventAdminEligibilityRequest, CheckEventAdminEligibilityResponse, CreateBookingCustomerRequest, CreateBookingCustomerResponse, RectifyBookingCustomerProfileRequest, RectifyBookingCustomerProfileResponse, RectifyBookingParticipantIdentityRequest, RectifyBookingParticipantIdentityResponse, CreateBookingMembershipRequest, CreateBookingPassRequest, CreateDiscountCodeRequest, CreateEventCategoryRequest, CreateOccurrenceRequest, CreateVenueRequest, DeleteDiscountCodeResponse, DeleteVenueResponse, DiscountCodeResponse, EventCategoryResponse, EventOccurrenceListRecord, EventOccurrenceRecord, GeocodeVenueRequest, GeocodeVenueResponse, GetCustomerCreditResponse, GetMoneyReportRequest, GetMoneyReportResponse, ExportBookingQuestionAnswersCsvRequest, ExportBookingLedgerCsvRequest, ListBookingActivityRequest, ListBookingActivityResponse, ListBookingCustomersRequest, ListBookingCustomersResponse, ListBookingMembershipsRequest, ListBookingMembershipsResponse, ListBookingPassesRequest, ListBookingPassesResponse, ListCustomerAttendancesRequest, ListCustomerAttendancesResponse, ListCustomerMembershipsResponse, ListCustomerPassesResponse, CreatePersonRecordEntryRequest, CreatePersonRecordEntryResponse, ListDiscountCodesResponse, ListDiscountRedemptionsRequest, ListDiscountRedemptionsResponse, ListEventCategoriesResponse, ListMoneyPaymentsRequest, ListMoneyPaymentsResponse, ListSiteCustomerMembershipsRequest, ListSiteCustomerMembershipsResponse, ListSiteCustomerPassesRequest, ListSiteCustomerPassesResponse, UpdateBookingMembershipRequest, UpdateBookingPassRequest, UpdateDiscountCodeRequest, UpdateEventCategoryRequest, UpdateOccurrenceRequest, UpdateVenueRequest, VenueRecord } from "./bookingRecords";
|
|
10
10
|
import type { ApplyAppointmentSetupRequest, ApplyAppointmentSetupResponse, AppointmentSetupResponse } from "./appointmentSetup";
|
|
11
11
|
import type { AddCourseEnrollmentRequest, AddCourseEnrollmentResponse, CourseRecord, CreateCourseRequest, CreateCourseResponse, DashboardWaitlistListResponse, DeleteCourseProgramResponse, DeleteCourseResponse, DuplicateCourseRequest, DuplicateCourseResponse, ListCourseEnrollmentsResponse, UpdateCourseEnrollmentRequest, UpdateCourseEnrollmentResponse, UpdateCourseRequest, UpdateCourseResponse, WaitlistDashboardActionResponse } from "./courses";
|
|
@@ -239,6 +239,40 @@ export type BookingManagementAPIEndpoints = {
|
|
|
239
239
|
siteId: string;
|
|
240
240
|
resourceId: string;
|
|
241
241
|
}, RemoveAppointmentResourceResponse>;
|
|
242
|
+
listAppointmentReservations: APIEndpoint<never, {
|
|
243
|
+
siteId: string;
|
|
244
|
+
} & ListAppointmentReservationsRequest, ListAppointmentReservationsResponse>;
|
|
245
|
+
createAppointmentReservation: APIEndpoint<CreateAppointmentReservationRequest, {
|
|
246
|
+
siteId: string;
|
|
247
|
+
}, AppointmentReservationResponse>;
|
|
248
|
+
getAppointmentReservation: APIEndpoint<never, {
|
|
249
|
+
siteId: string;
|
|
250
|
+
reservationId: string;
|
|
251
|
+
}, AppointmentReservationResponse>;
|
|
252
|
+
updateAppointmentReservation: APIEndpoint<UpdateAppointmentReservationRequest, {
|
|
253
|
+
siteId: string;
|
|
254
|
+
reservationId: string;
|
|
255
|
+
}, AppointmentReservationResponse>;
|
|
256
|
+
pauseAppointmentReservation: APIEndpoint<AppointmentReservationLifecycleRequest, {
|
|
257
|
+
siteId: string;
|
|
258
|
+
reservationId: string;
|
|
259
|
+
}, AppointmentReservationResponse>;
|
|
260
|
+
resumeAppointmentReservation: APIEndpoint<AppointmentReservationLifecycleRequest, {
|
|
261
|
+
siteId: string;
|
|
262
|
+
reservationId: string;
|
|
263
|
+
}, AppointmentReservationResponse>;
|
|
264
|
+
endAppointmentReservation: APIEndpoint<EndAppointmentReservationRequest, {
|
|
265
|
+
siteId: string;
|
|
266
|
+
reservationId: string;
|
|
267
|
+
}, AppointmentReservationResponse>;
|
|
268
|
+
previewAppointmentReservationRun: APIEndpoint<PreviewAppointmentReservationRunRequest, {
|
|
269
|
+
siteId: string;
|
|
270
|
+
reservationId: string;
|
|
271
|
+
}, PreviewAppointmentReservationRunResponse>;
|
|
272
|
+
createAppointmentReservationRun: APIEndpoint<CreateAppointmentReservationRunRequest, {
|
|
273
|
+
siteId: string;
|
|
274
|
+
reservationId: string;
|
|
275
|
+
}, CreateAppointmentReservationRunResponse>;
|
|
242
276
|
createTeamMemberProfile: APIEndpoint<never, {
|
|
243
277
|
siteId: string;
|
|
244
278
|
resourceId: string;
|
|
@@ -452,6 +452,228 @@ export type AppointmentServiceResponse = {
|
|
|
452
452
|
export type ListAppointmentServicesResponse = {
|
|
453
453
|
services: AppointmentService[];
|
|
454
454
|
};
|
|
455
|
+
export declare const APPOINTMENT_RESERVATION_STATUS_VALUES: readonly ["active", "paused", "ended"];
|
|
456
|
+
export type AppointmentReservationStatus = (typeof APPOINTMENT_RESERVATION_STATUS_VALUES)[number];
|
|
457
|
+
export type AppointmentReservationPaymentMode = Readonly<{
|
|
458
|
+
kind: "manual";
|
|
459
|
+
}> | Readonly<{
|
|
460
|
+
kind: "online_request";
|
|
461
|
+
sendOffsetMinutes: number;
|
|
462
|
+
}>;
|
|
463
|
+
export type AppointmentReservation = {
|
|
464
|
+
id: string;
|
|
465
|
+
siteId: string;
|
|
466
|
+
customerId: string;
|
|
467
|
+
resourceId: string;
|
|
468
|
+
serviceId: string;
|
|
469
|
+
weekday: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
470
|
+
localStartTime: string;
|
|
471
|
+
timezone: string;
|
|
472
|
+
startsOn: string;
|
|
473
|
+
endsOn: string | null;
|
|
474
|
+
status: AppointmentReservationStatus;
|
|
475
|
+
paymentMode: AppointmentReservationPaymentMode;
|
|
476
|
+
durationMinutes: number;
|
|
477
|
+
prepMinutes: number;
|
|
478
|
+
cleanupMinutes: number;
|
|
479
|
+
};
|
|
480
|
+
export type AppointmentReservationListItem = AppointmentReservation & {
|
|
481
|
+
updatedAt: string;
|
|
482
|
+
customerName: string;
|
|
483
|
+
customerEmail: string;
|
|
484
|
+
serviceName: string;
|
|
485
|
+
serviceColor: string | null;
|
|
486
|
+
resourceName: string;
|
|
487
|
+
resourceColor: string | null;
|
|
488
|
+
};
|
|
489
|
+
export type ListAppointmentReservationsRequest = {
|
|
490
|
+
customerId?: string;
|
|
491
|
+
resourceId?: string;
|
|
492
|
+
serviceId?: string;
|
|
493
|
+
status?: AppointmentReservationStatus;
|
|
494
|
+
startDate?: string;
|
|
495
|
+
endDate?: string;
|
|
496
|
+
};
|
|
497
|
+
export type CreateAppointmentReservationRequest = {
|
|
498
|
+
customerId: string;
|
|
499
|
+
resourceId: string;
|
|
500
|
+
serviceId: string;
|
|
501
|
+
weekday: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
502
|
+
localStartTime: string;
|
|
503
|
+
timezone: string;
|
|
504
|
+
startsOn: string;
|
|
505
|
+
endsOn?: string | null;
|
|
506
|
+
paymentMode?: AppointmentReservationPaymentMode;
|
|
507
|
+
};
|
|
508
|
+
export type UpdateAppointmentReservationRequest = Partial<Omit<CreateAppointmentReservationRequest, "paymentMode">> & {
|
|
509
|
+
expectedUpdatedAt: string;
|
|
510
|
+
paymentMode?: AppointmentReservationPaymentMode;
|
|
511
|
+
};
|
|
512
|
+
export type AppointmentReservationLifecycleRequest = {
|
|
513
|
+
expectedUpdatedAt: string;
|
|
514
|
+
};
|
|
515
|
+
export type EndAppointmentReservationRequest = {
|
|
516
|
+
endsOn: string;
|
|
517
|
+
} & AppointmentReservationLifecycleRequest;
|
|
518
|
+
export type AppointmentReservationResponse = {
|
|
519
|
+
reservation: AppointmentReservation;
|
|
520
|
+
};
|
|
521
|
+
export type ListAppointmentReservationsResponse = {
|
|
522
|
+
reservations: AppointmentReservationListItem[];
|
|
523
|
+
};
|
|
524
|
+
export type AppointmentReservationRunPlanningMode = Readonly<{
|
|
525
|
+
kind: "occurrence_count";
|
|
526
|
+
startsOn: string;
|
|
527
|
+
occurrenceCount: number;
|
|
528
|
+
}> | Readonly<{
|
|
529
|
+
kind: "date_range";
|
|
530
|
+
startsOn: string;
|
|
531
|
+
endsOn: string;
|
|
532
|
+
}>;
|
|
533
|
+
export type PreviewAppointmentReservationRunRequest = {
|
|
534
|
+
mode: AppointmentReservationRunPlanningMode;
|
|
535
|
+
skippedOccurrenceKeys?: string[];
|
|
536
|
+
expectedReservationUpdatedAt?: string;
|
|
537
|
+
};
|
|
538
|
+
export type CreateAppointmentReservationRunRequest = {
|
|
539
|
+
mode: AppointmentReservationRunPlanningMode;
|
|
540
|
+
skippedOccurrenceKeys?: string[];
|
|
541
|
+
selectedOccurrenceKeys: string[];
|
|
542
|
+
expectedReservationUpdatedAt: string;
|
|
543
|
+
idempotencyKey: string;
|
|
544
|
+
};
|
|
545
|
+
export type AppointmentReservationRunOccurrence = {
|
|
546
|
+
occurrenceKey: string;
|
|
547
|
+
localDate: string;
|
|
548
|
+
startAt: string;
|
|
549
|
+
endAt: string;
|
|
550
|
+
occupiedStartAt: string;
|
|
551
|
+
occupiedEndAt: string;
|
|
552
|
+
};
|
|
553
|
+
export type AppointmentReservationRunGlobalConflict = Readonly<{
|
|
554
|
+
kind: "archived_customer";
|
|
555
|
+
customerId: string;
|
|
556
|
+
}> | Readonly<{
|
|
557
|
+
kind: "archived_resource";
|
|
558
|
+
resourceId: string;
|
|
559
|
+
}> | Readonly<{
|
|
560
|
+
kind: "archived_service";
|
|
561
|
+
serviceId: string;
|
|
562
|
+
}> | Readonly<{
|
|
563
|
+
kind: "stale_reservation";
|
|
564
|
+
expectedUpdatedAt: string;
|
|
565
|
+
actualUpdatedAt: string;
|
|
566
|
+
}>;
|
|
567
|
+
export type AppointmentReservationRunOccurrenceConflict = Readonly<{
|
|
568
|
+
kind: "appointment";
|
|
569
|
+
appointmentId: string;
|
|
570
|
+
startAt: string;
|
|
571
|
+
endAt: string;
|
|
572
|
+
}> | Readonly<{
|
|
573
|
+
kind: "reservation";
|
|
574
|
+
reservationId: string;
|
|
575
|
+
occurrenceKey: string;
|
|
576
|
+
startAt: string;
|
|
577
|
+
endAt: string;
|
|
578
|
+
}> | Readonly<{
|
|
579
|
+
kind: "blackout";
|
|
580
|
+
blackoutId: string | null;
|
|
581
|
+
startAt: string;
|
|
582
|
+
endAt: string;
|
|
583
|
+
}> | Readonly<{
|
|
584
|
+
kind: "external_busy";
|
|
585
|
+
externalBusyKey: string | null;
|
|
586
|
+
startAt: string;
|
|
587
|
+
endAt: string;
|
|
588
|
+
}>;
|
|
589
|
+
export type AppointmentReservationRunPlannedOccurrence = Readonly<{
|
|
590
|
+
kind: "ready";
|
|
591
|
+
occurrence: AppointmentReservationRunOccurrence;
|
|
592
|
+
}> | Readonly<{
|
|
593
|
+
kind: "skipped";
|
|
594
|
+
occurrence: AppointmentReservationRunOccurrence;
|
|
595
|
+
}> | Readonly<{
|
|
596
|
+
kind: "conflict";
|
|
597
|
+
occurrence: AppointmentReservationRunOccurrence;
|
|
598
|
+
conflicts: AppointmentReservationRunOccurrenceConflict[];
|
|
599
|
+
}>;
|
|
600
|
+
type AppointmentReservationRunPlanBase = {
|
|
601
|
+
reservationId: string;
|
|
602
|
+
reservationUpdatedAt: string;
|
|
603
|
+
selectedOccurrenceKeys: string[];
|
|
604
|
+
occurrences: AppointmentReservationRunPlannedOccurrence[];
|
|
605
|
+
readyOccurrences: Extract<AppointmentReservationRunPlannedOccurrence, {
|
|
606
|
+
kind: "ready";
|
|
607
|
+
}>[];
|
|
608
|
+
skippedOccurrences: Extract<AppointmentReservationRunPlannedOccurrence, {
|
|
609
|
+
kind: "skipped";
|
|
610
|
+
}>[];
|
|
611
|
+
conflictOccurrences: Extract<AppointmentReservationRunPlannedOccurrence, {
|
|
612
|
+
kind: "conflict";
|
|
613
|
+
}>[];
|
|
614
|
+
};
|
|
615
|
+
export type AppointmentReservationRunPlan = (AppointmentReservationRunPlanBase & {
|
|
616
|
+
kind: "empty";
|
|
617
|
+
canConfirm: false;
|
|
618
|
+
conflictOccurrences: [];
|
|
619
|
+
globalConflicts: [];
|
|
620
|
+
}) | (AppointmentReservationRunPlanBase & {
|
|
621
|
+
kind: "incomplete";
|
|
622
|
+
canConfirm: false;
|
|
623
|
+
requestedOccurrenceCount: number;
|
|
624
|
+
conflictOccurrences: [];
|
|
625
|
+
globalConflicts: [];
|
|
626
|
+
}) | (AppointmentReservationRunPlanBase & {
|
|
627
|
+
kind: "ready";
|
|
628
|
+
canConfirm: true;
|
|
629
|
+
conflictOccurrences: [];
|
|
630
|
+
globalConflicts: [];
|
|
631
|
+
}) | (AppointmentReservationRunPlanBase & {
|
|
632
|
+
kind: "has_conflicts";
|
|
633
|
+
canConfirm: false;
|
|
634
|
+
conflictOccurrences: Extract<AppointmentReservationRunPlannedOccurrence, {
|
|
635
|
+
kind: "conflict";
|
|
636
|
+
}>[];
|
|
637
|
+
globalConflicts: [];
|
|
638
|
+
}) | (AppointmentReservationRunPlanBase & {
|
|
639
|
+
kind: "blocked";
|
|
640
|
+
canConfirm: false;
|
|
641
|
+
globalConflicts: AppointmentReservationRunGlobalConflict[];
|
|
642
|
+
});
|
|
643
|
+
export type PreviewAppointmentReservationRunResponse = {
|
|
644
|
+
plan: AppointmentReservationRunPlan;
|
|
645
|
+
};
|
|
646
|
+
export type AppointmentReservationRunEffectStatus = Readonly<{
|
|
647
|
+
kind: "succeeded";
|
|
648
|
+
}> | Readonly<{
|
|
649
|
+
kind: "skipped";
|
|
650
|
+
reason: "calendar_unavailable" | "manual_payment_mode" | "missing_appointment_resource" | "missing_run_appointments" | "missing_customer_email" | "missing_site_owner" | "payment_request_scheduler_deferred" | "run_reused";
|
|
651
|
+
message?: string;
|
|
652
|
+
}> | Readonly<{
|
|
653
|
+
kind: "failed";
|
|
654
|
+
message: string;
|
|
655
|
+
}>;
|
|
656
|
+
export type AppointmentReservationRunAppointmentEffects = Readonly<{
|
|
657
|
+
appointmentId: string;
|
|
658
|
+
calendar: AppointmentReservationRunEffectStatus;
|
|
659
|
+
paymentRequest: AppointmentReservationRunEffectStatus;
|
|
660
|
+
}>;
|
|
661
|
+
export type AppointmentReservationRunPostCommitEffects = Readonly<{
|
|
662
|
+
completedAt: string;
|
|
663
|
+
summaryEmail: AppointmentReservationRunEffectStatus;
|
|
664
|
+
appointments: readonly AppointmentReservationRunAppointmentEffects[];
|
|
665
|
+
}>;
|
|
666
|
+
export type CreateAppointmentReservationRunResponse = {
|
|
667
|
+
run: {
|
|
668
|
+
id: string;
|
|
669
|
+
reservationId: string;
|
|
670
|
+
selectedOccurrenceKeys: string[];
|
|
671
|
+
status: "committed" | "completed_with_effect_failures";
|
|
672
|
+
reused: boolean;
|
|
673
|
+
};
|
|
674
|
+
appointmentIds: string[];
|
|
675
|
+
effects: AppointmentReservationRunPostCommitEffects;
|
|
676
|
+
};
|
|
455
677
|
export type DeleteServiceResponse = {
|
|
456
678
|
success: boolean;
|
|
457
679
|
};
|
|
@@ -492,6 +714,30 @@ export type PublicBookingAvailableDatesResponse = {
|
|
|
492
714
|
export type PublicBookingAvailableSlotsResponse = {
|
|
493
715
|
slots: TimeSlot[];
|
|
494
716
|
};
|
|
717
|
+
export type PublicWeeklySlotAvailabilityQuery = {
|
|
718
|
+
siteId: string;
|
|
719
|
+
serviceId: string;
|
|
720
|
+
resourceId?: string;
|
|
721
|
+
horizonWeeks?: number;
|
|
722
|
+
timezone?: string;
|
|
723
|
+
};
|
|
724
|
+
export type PublicWeeklySlotAvailabilityOption = {
|
|
725
|
+
id: string;
|
|
726
|
+
resourceId: string;
|
|
727
|
+
weekday: number;
|
|
728
|
+
weekdayLabel: string;
|
|
729
|
+
startTime: string;
|
|
730
|
+
endTime: string;
|
|
731
|
+
nextDate: string;
|
|
732
|
+
availableWeeks: number;
|
|
733
|
+
};
|
|
734
|
+
export type PublicWeeklySlotAvailabilityResponse = {
|
|
735
|
+
slots: PublicWeeklySlotAvailabilityOption[];
|
|
736
|
+
horizonWeeks: number;
|
|
737
|
+
timezone: string;
|
|
738
|
+
startDate: string;
|
|
739
|
+
endDate: string;
|
|
740
|
+
};
|
|
495
741
|
export type PublicCreateBookingAppointmentRequest = {
|
|
496
742
|
formId: string;
|
|
497
743
|
serviceId: string;
|