@riverbankcms/sdk 0.67.0 → 0.68.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 +21 -11
- package/dist/_dts/api/src/aiPlayground.d.ts +62 -14
- package/dist/_dts/api/src/billing.d.ts +7 -40
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +4 -1
- package/dist/_dts/api/src/bookingOperations.d.ts +32 -1
- package/dist/_dts/api/src/endpoints.d.ts +7 -0
- package/dist/_dts/api/src/public/types.d.ts +1 -1
- package/dist/_dts/billing/src/components/index.d.ts +426 -0
- package/dist/_dts/blocks/src/PageRenderer.d.ts +4 -0
- package/dist/_dts/blocks/src/client.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableDates.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableSlots.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.d.ts +140 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.state.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useVisibleTabPolling.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.default-ui.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +484 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +5 -2
- package/dist/_dts/sdk/src/bookings/index.d.ts +5 -2
- package/dist/_dts/sdk/src/bookings/types.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/commands/push/scopes/commandBackedDatedOfferingScope.d.ts +32 -0
- package/dist/_dts/sdk/src/cli/commands/push/scopes/types.d.ts +5 -1
- package/dist/_dts/sdk/src/cli/site-commands/commandRuntime.d.ts +41 -11
- package/dist/_dts/sdk/src/cli/site-commands/commandRuntimeCompat.d.ts +21 -0
- package/dist/_dts/sdk/src/cli/site-commands/commandSurfaceDispatch.d.ts +27 -0
- package/dist/_dts/sdk/src/cli/site-commands/datedOfferingCommands.d.ts +56 -0
- package/dist/_dts/sdk/src/cli/site-commands/entryCommands.d.ts +3 -1
- package/dist/_dts/sdk/src/cli/site-commands/footerCommands.d.ts +7 -1
- package/dist/_dts/sdk/src/cli/site-commands/formCommands.d.ts +4 -8
- package/dist/_dts/sdk/src/cli/site-commands/index.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/site-commands/navigationCommands.d.ts +4 -8
- package/dist/_dts/sdk/src/cli/site-commands/pageCommands.d.ts +4 -8
- package/dist/_dts/sdk/src/cli/site-commands/pushExecution.d.ts +14 -68
- package/dist/_dts/sdk/src/cli/site-commands/pushExecutionPlan.d.ts +8 -0
- package/dist/_dts/sdk/src/cli/site-commands/pushExecutionTypes.d.ts +97 -0
- package/dist/_dts/sdk/src/cli/site-commands/residualSettingsTrimming.d.ts +15 -0
- package/dist/_dts/sdk/src/cli/sync/index.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/sync/syncResultAggregation.d.ts +4 -0
- package/dist/_dts/sdk/src/rendering/overrides.d.ts +2 -0
- package/dist/_dts/sdk/src/theme-bridge/ThemeBridgeProvider.d.ts +4 -4
- package/dist/_dts/sdk/src/theme-bridge/generateCssVars.d.ts +4 -12
- package/dist/_dts/sdk/src/theme-bridge/index.d.ts +1 -1
- package/dist/_dts/sdk/src/theme-bridge/types.d.ts +17 -9
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +228 -1
- package/dist/_dts/site-commands/src/domain.d.ts +1 -1
- package/dist/_dts/site-commands/src/index.d.ts +1 -0
- package/dist/_dts/site-commands/src/metadata.d.ts +66 -1
- package/dist/_dts/site-commands/src/refContributions.d.ts +1 -0
- package/dist/_dts/site-commands/src/refs.d.ts +7 -1
- package/dist/_dts/{sdk/src/cli/merge-remote → site-commands/src}/stableJson.d.ts +2 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/index.d.ts +1 -1
- package/dist/_dts/theme-core/src/runtime/buildThemeRuntimeFromBridge.d.ts +30 -23
- package/dist/cli/index.mjs +1699 -766
- package/dist/client/bookings.mjs +5107 -3348
- package/dist/client/client.mjs +4004 -3522
- package/dist/client/hooks.mjs +14 -0
- package/dist/client/rendering/client.mjs +4185 -3721
- package/dist/client/rendering/islands.mjs +4317 -3853
- package/dist/client/rendering.mjs +4076 -3592
- package/dist/preview-next/before-render.mjs +14 -0
- package/dist/preview-next/client/runtime.mjs +2770 -2268
- package/dist/preview-next/middleware.mjs +14 -0
- package/dist/server/components.mjs +172 -58
- package/dist/server/config-validation.mjs +14 -0
- package/dist/server/config.mjs +14 -0
- package/dist/server/data.mjs +14 -0
- package/dist/server/index.mjs +15 -1
- package/dist/server/next.mjs +166 -52
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +174 -58
- package/dist/server/rendering.mjs +174 -58
- package/dist/server/routing.mjs +14 -0
- package/dist/server/server.mjs +15 -1
- package/dist/server/theme-bridge.mjs +1247 -4825
- package/dist/styles/index.css +38 -38
- package/package.json +1 -1
- package/dist/_dts/blocks/src/system/runtime/components/booking/DateTimeSelectionStep.d.ts +0 -18
- package/dist/_dts/blocks/src/system/runtime/components/booking/PaymentOptionSelectionStep.d.ts +0 -9
- package/dist/_dts/blocks/src/system/runtime/components/booking/ServiceResourceSelector.d.ts +0 -44
- package/dist/_dts/blocks/src/system/runtime/components/booking/ServiceResourceSelector.state.d.ts +0 -23
- package/dist/_dts/blocks/src/system/runtime/components/booking/ServiceSelectionStep.d.ts +0 -18
- package/dist/_dts/blocks/src/system/runtime/components/booking/slotDisplay.d.ts +0 -2
- package/dist/_dts/blocks/src/system/runtime/components/multi-step/MultiStepForm.d.ts +0 -21
- package/dist/_dts/blocks/src/system/runtime/components/multi-step/useMultiStep.d.ts +0 -15
- package/dist/_dts/blocks/src/system/runtime/components/multi-step/useMultiStep.state.d.ts +0 -51
- package/dist/_dts/blocks/src/system/runtime/hooks/useBookingSteps.d.ts +0 -22
package/README.md
CHANGED
|
@@ -179,6 +179,10 @@ const circuitState = client.getCircuitState();
|
|
|
179
179
|
|
|
180
180
|
For detailed testing and verification steps, see [`docs/resilience-verification.md`](./docs/resilience-verification.md).
|
|
181
181
|
|
|
182
|
+
### Headless Appointment Booking
|
|
183
|
+
|
|
184
|
+
SDK sites that need bespoke appointment booking UI can use the headless booking runtime from `@riverbankcms/sdk/bookings`. See [`docs/headless-booking.md`](./docs/headless-booking.md) for the real `blockOverrides` pattern with an `'appointment-booking'` override, `HeadlessBookingProvider`, `getAppointmentBookingOverrideInput`, and `useHeadlessBookingFlow`.
|
|
185
|
+
|
|
182
186
|
### Server-Side API
|
|
183
187
|
|
|
184
188
|
```tsx
|
|
@@ -1484,9 +1488,10 @@ Style Builder blocks to match your brand using the Theme Bridge. This provides C
|
|
|
1484
1488
|
|
|
1485
1489
|
### Quick Start
|
|
1486
1490
|
|
|
1487
|
-
|
|
1491
|
+
Import the SDK base stylesheet, then wrap your app with `ThemeBridgeProvider` and define your color tokens:
|
|
1488
1492
|
|
|
1489
1493
|
```tsx
|
|
1494
|
+
import '@riverbankcms/sdk/styles.css';
|
|
1490
1495
|
import { ThemeBridgeProvider } from '@riverbankcms/sdk/theme-bridge';
|
|
1491
1496
|
|
|
1492
1497
|
export default function RootLayout({ children }) {
|
|
@@ -1509,7 +1514,7 @@ export default function RootLayout({ children }) {
|
|
|
1509
1514
|
|
|
1510
1515
|
### Token System
|
|
1511
1516
|
|
|
1512
|
-
Define color tokens as key-value pairs. Keys become CSS variables
|
|
1517
|
+
Define color tokens as key-value pairs. Keys become runtime CSS variables such as `--tb-primary`:
|
|
1513
1518
|
|
|
1514
1519
|
```tsx
|
|
1515
1520
|
<ThemeBridgeProvider
|
|
@@ -1523,18 +1528,20 @@ Define color tokens as key-value pairs. Keys become CSS variables (`--color-{key
|
|
|
1523
1528
|
background: '#ffffff',
|
|
1524
1529
|
surface: '#f8fafc',
|
|
1525
1530
|
|
|
1526
|
-
// Text
|
|
1527
|
-
text
|
|
1528
|
-
|
|
1531
|
+
// Text. foreground/mutedForeground are preferred;
|
|
1532
|
+
// text/mutedText remain accepted aliases.
|
|
1533
|
+
foreground: '#1e293b',
|
|
1534
|
+
mutedForeground: '#64748b',
|
|
1529
1535
|
|
|
1530
1536
|
// UI
|
|
1531
1537
|
border: '#e2e8f0',
|
|
1532
|
-
|
|
1538
|
+
primaryForeground: '#ffffff',
|
|
1533
1539
|
|
|
1534
1540
|
// Status
|
|
1535
1541
|
success: '#22c55e',
|
|
1536
1542
|
warning: '#f59e0b',
|
|
1537
|
-
|
|
1543
|
+
destructive: '#ef4444',
|
|
1544
|
+
info: '#0ea5e9',
|
|
1538
1545
|
},
|
|
1539
1546
|
}}
|
|
1540
1547
|
>
|
|
@@ -1545,6 +1552,8 @@ Token values can be:
|
|
|
1545
1552
|
- **CSS variable refs**: `'var(--brand-purple)'` (passed through)
|
|
1546
1553
|
- **RGB values**: `'109 40 217'` (used directly)
|
|
1547
1554
|
|
|
1555
|
+
Canonical tokens win when aliases are also present. Accepted aliases are `text -> foreground`, `mutedText -> mutedForeground`, `white -> primaryForeground`, and `danger -> destructive`.
|
|
1556
|
+
|
|
1548
1557
|
### Design Presets
|
|
1549
1558
|
|
|
1550
1559
|
Control typography, spacing, corners, and shadows:
|
|
@@ -1576,7 +1585,7 @@ Control typography, spacing, corners, and shadows:
|
|
|
1576
1585
|
|
|
1577
1586
|
### Component CSS (Opt-in)
|
|
1578
1587
|
|
|
1579
|
-
By default,
|
|
1588
|
+
By default, the provider emits CSS variables plus structural runtime CSS used by system blocks: status classes, step/progress classes, and block-specific variables such as appointment booking `--ab-*` vars. Generated visual skins for buttons, cards, and inputs remain opt-in:
|
|
1580
1589
|
|
|
1581
1590
|
```tsx
|
|
1582
1591
|
<ThemeBridgeProvider
|
|
@@ -1584,7 +1593,7 @@ By default, only CSS variables are generated. Enable component CSS for buttons,
|
|
|
1584
1593
|
tokens: {
|
|
1585
1594
|
primary: '#6d28d9',
|
|
1586
1595
|
secondary: '#4c1d95',
|
|
1587
|
-
|
|
1596
|
+
primaryForeground: '#ffffff',
|
|
1588
1597
|
surface: '#f8fafc',
|
|
1589
1598
|
text: '#1e293b',
|
|
1590
1599
|
border: '#e2e8f0',
|
|
@@ -1643,9 +1652,8 @@ Reference existing CSS variables from your design system:
|
|
|
1643
1652
|
primary: 'var(--brand-purple)',
|
|
1644
1653
|
secondary: 'var(--brand-navy)',
|
|
1645
1654
|
background: 'var(--ds-bg)',
|
|
1646
|
-
|
|
1655
|
+
foreground: 'var(--ds-text)',
|
|
1647
1656
|
},
|
|
1648
|
-
components: { buttons: true },
|
|
1649
1657
|
}}
|
|
1650
1658
|
>
|
|
1651
1659
|
```
|
|
@@ -1669,6 +1677,8 @@ const { css, cssVars } = generateThemeBridgeCss({
|
|
|
1669
1677
|
// cssVars: Object of CSS variable name-value pairs
|
|
1670
1678
|
```
|
|
1671
1679
|
|
|
1680
|
+
When using `generateThemeBridgeCss` directly, render the affected blocks inside an element with `data-theme-scope="sdk"` so the generated status, progress, component, and block-var selectors apply. `ThemeBridgeProvider` adds that wrapper for you.
|
|
1681
|
+
|
|
1672
1682
|
### Available Exports
|
|
1673
1683
|
|
|
1674
1684
|
```tsx
|
|
@@ -229,7 +229,62 @@ export type ApplyAiDesignerThemePatchResponse = {
|
|
|
229
229
|
themeId: string;
|
|
230
230
|
themeUpdatedAt: string;
|
|
231
231
|
};
|
|
232
|
-
|
|
232
|
+
type AiDesignerPageBlocksEnvelope = {
|
|
233
|
+
blockIds: string[];
|
|
234
|
+
};
|
|
235
|
+
type AiDesignerAddedPageBlock = {
|
|
236
|
+
id: string;
|
|
237
|
+
kind: string;
|
|
238
|
+
content?: Record<string, unknown> | null;
|
|
239
|
+
};
|
|
240
|
+
type AiDesignerBasePageOpPreview = {
|
|
241
|
+
id: string;
|
|
242
|
+
summary: string;
|
|
243
|
+
scope: "page";
|
|
244
|
+
pageId: string;
|
|
245
|
+
base: AiDesignerPageBlocksEnvelope;
|
|
246
|
+
before: AiDesignerPageBlocksEnvelope;
|
|
247
|
+
after: AiDesignerPageBlocksEnvelope & {
|
|
248
|
+
addedBlocks?: AiDesignerAddedPageBlock[];
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
type AiDesignerReorderBlocksPreview = AiDesignerBasePageOpPreview & {
|
|
252
|
+
kind: "reorder_blocks";
|
|
253
|
+
};
|
|
254
|
+
type AiDesignerMoveBlockPreview = AiDesignerBasePageOpPreview & {
|
|
255
|
+
kind: "move_block";
|
|
256
|
+
blockId: string;
|
|
257
|
+
anchor: {
|
|
258
|
+
kind: "after";
|
|
259
|
+
blockId: string | null;
|
|
260
|
+
} | {
|
|
261
|
+
kind: "before";
|
|
262
|
+
blockId: string | null;
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
type AiDesignerSwapBlocksPreview = AiDesignerBasePageOpPreview & {
|
|
266
|
+
kind: "swap_blocks";
|
|
267
|
+
blockIdA: string;
|
|
268
|
+
blockIdB: string;
|
|
269
|
+
};
|
|
270
|
+
type AiDesignerAddBlockPreview = AiDesignerBasePageOpPreview & {
|
|
271
|
+
kind: "add_block";
|
|
272
|
+
blockKind: string;
|
|
273
|
+
afterBlockId: string | null;
|
|
274
|
+
after: AiDesignerPageBlocksEnvelope & {
|
|
275
|
+
addedBlocks: AiDesignerAddedPageBlock[];
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
type AiDesignerDuplicateBlockPreview = AiDesignerBasePageOpPreview & {
|
|
279
|
+
kind: "duplicate_block";
|
|
280
|
+
blockId: string;
|
|
281
|
+
afterBlockId: string | null;
|
|
282
|
+
after: AiDesignerPageBlocksEnvelope & {
|
|
283
|
+
addedBlocks: AiDesignerAddedPageBlock[];
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
type AiDesignerPageOpPreview = AiDesignerReorderBlocksPreview | AiDesignerMoveBlockPreview | AiDesignerSwapBlocksPreview | AiDesignerAddBlockPreview | AiDesignerDuplicateBlockPreview;
|
|
287
|
+
export type AiDesignerCommandBackedPageProposal<TPreview extends AiDesignerPageOpPreview = AiDesignerPageOpPreview> = {
|
|
233
288
|
proposalId: string;
|
|
234
289
|
surface: "page";
|
|
235
290
|
baseFingerprint: string;
|
|
@@ -241,41 +296,34 @@ export type AiDesignerCommandBackedPageProposal = {
|
|
|
241
296
|
};
|
|
242
297
|
commands: readonly unknown[];
|
|
243
298
|
};
|
|
244
|
-
preview:
|
|
299
|
+
preview: TPreview;
|
|
245
300
|
dryRunSummary?: string;
|
|
246
301
|
};
|
|
247
302
|
export type ApplyAiDesignerPageOpsRequest = {
|
|
248
303
|
kind: "reorder_blocks";
|
|
249
304
|
pageId: string;
|
|
250
305
|
baseBlockIds: string[];
|
|
251
|
-
commandBacked: AiDesignerCommandBackedPageProposal
|
|
306
|
+
commandBacked: AiDesignerCommandBackedPageProposal<AiDesignerReorderBlocksPreview>;
|
|
252
307
|
} | {
|
|
253
308
|
kind: "move_block";
|
|
254
309
|
pageId: string;
|
|
255
310
|
baseBlockIds: string[];
|
|
256
|
-
commandBacked: AiDesignerCommandBackedPageProposal
|
|
311
|
+
commandBacked: AiDesignerCommandBackedPageProposal<AiDesignerMoveBlockPreview>;
|
|
257
312
|
} | {
|
|
258
313
|
kind: "swap_blocks";
|
|
259
314
|
pageId: string;
|
|
260
315
|
baseBlockIds: string[];
|
|
261
|
-
commandBacked: AiDesignerCommandBackedPageProposal
|
|
262
|
-
} | {
|
|
263
|
-
kind: "delete_block";
|
|
264
|
-
pageId: string;
|
|
265
|
-
baseBlockIds: string[];
|
|
266
|
-
blockId: string;
|
|
316
|
+
commandBacked: AiDesignerCommandBackedPageProposal<AiDesignerSwapBlocksPreview>;
|
|
267
317
|
} | {
|
|
268
318
|
kind: "add_block";
|
|
269
319
|
pageId: string;
|
|
270
320
|
baseBlockIds: string[];
|
|
271
|
-
|
|
272
|
-
afterBlockId?: string | null;
|
|
321
|
+
commandBacked: AiDesignerCommandBackedPageProposal<AiDesignerAddBlockPreview>;
|
|
273
322
|
} | {
|
|
274
323
|
kind: "duplicate_block";
|
|
275
324
|
pageId: string;
|
|
276
325
|
baseBlockIds: string[];
|
|
277
|
-
|
|
278
|
-
afterBlockId?: string | null;
|
|
326
|
+
commandBacked: AiDesignerCommandBackedPageProposal<AiDesignerDuplicateBlockPreview>;
|
|
279
327
|
};
|
|
280
328
|
export type ApplyAiDesignerPageOpsResponse = {
|
|
281
329
|
ok: true;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ChangePlanRequest, ChangePlanResponse } from './types';
|
|
2
2
|
import type { ApiClient } from './request';
|
|
3
|
+
import type { BillingComponentSummaryAddOnComponent, BillingComponentSummaryBasePlanComponent, BillingComponentSummaryComponent, BillingComponentSummarySiteComponent } from '@riverbankcms/billing/components';
|
|
3
4
|
export type BillingStatusResponse = {
|
|
4
5
|
hasActiveSubscription: boolean;
|
|
5
6
|
subscriptionStatus: string | null;
|
|
@@ -52,45 +53,12 @@ export type BillingSummaryResponse = {
|
|
|
52
53
|
isCustomPrice: boolean;
|
|
53
54
|
} | null;
|
|
54
55
|
};
|
|
55
|
-
export type
|
|
56
|
-
export type
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
siteId: string;
|
|
62
|
-
} | {
|
|
63
|
-
kind: "site_domain";
|
|
64
|
-
siteId: string;
|
|
65
|
-
siteDomainId: string;
|
|
66
|
-
};
|
|
67
|
-
type BillingSummaryComponentBase<TKind extends BillingSummaryComponentKind> = {
|
|
68
|
-
kind: TKind;
|
|
69
|
-
label: string;
|
|
70
|
-
amountCents: number;
|
|
71
|
-
formatted: string;
|
|
72
|
-
interval: "month" | "year";
|
|
73
|
-
};
|
|
74
|
-
export type BillingSummaryComponent = BillingSummaryBasePlanComponent | BillingSummarySiteComponent | BillingSummaryAddOnComponent;
|
|
75
|
-
export type BillingSummaryBasePlanComponent = BillingSummaryComponentBase<"plan_base"> & {
|
|
76
|
-
source: Extract<BillingSummaryComponentSource, {
|
|
77
|
-
kind: "plan";
|
|
78
|
-
}>;
|
|
79
|
-
};
|
|
80
|
-
export type BillingSummarySiteComponent = BillingSummaryComponentBase<"custom_site_price"> & {
|
|
81
|
-
source: Extract<BillingSummaryComponentSource, {
|
|
82
|
-
kind: "site";
|
|
83
|
-
}>;
|
|
84
|
-
};
|
|
85
|
-
export type BillingSummaryAddOnComponent = (BillingSummaryComponentBase<"extra_site"> & {
|
|
86
|
-
source: Extract<BillingSummaryComponentSource, {
|
|
87
|
-
kind: "site";
|
|
88
|
-
}>;
|
|
89
|
-
}) | (BillingSummaryComponentBase<"managed_domain_overage"> & {
|
|
90
|
-
source: Extract<BillingSummaryComponentSource, {
|
|
91
|
-
kind: "site_domain";
|
|
92
|
-
}>;
|
|
93
|
-
});
|
|
56
|
+
export type BillingSummaryComponent = BillingComponentSummaryComponent;
|
|
57
|
+
export type BillingSummaryComponentKind = BillingSummaryComponent["kind"];
|
|
58
|
+
export type BillingSummaryComponentSource = BillingSummaryComponent["source"];
|
|
59
|
+
export type BillingSummaryBasePlanComponent = BillingComponentSummaryBasePlanComponent;
|
|
60
|
+
export type BillingSummarySiteComponent = BillingComponentSummarySiteComponent;
|
|
61
|
+
export type BillingSummaryAddOnComponent = BillingComponentSummaryAddOnComponent;
|
|
94
62
|
export type SiteBillingCostResponse = {
|
|
95
63
|
hasCost: boolean;
|
|
96
64
|
formattedCost: string;
|
|
@@ -153,4 +121,3 @@ export declare function changePlan(apiClient: ApiClient, { planId, interval, pro
|
|
|
153
121
|
export declare function billingCheckout(apiClient: ApiClient, { planId, interval, options, }: BillingCheckoutRequest & {
|
|
154
122
|
options?: RequestInit;
|
|
155
123
|
}): Promise<BillingCheckoutResponse>;
|
|
156
|
-
export {};
|
|
@@ -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, 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, 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";
|
|
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";
|
|
@@ -224,6 +224,9 @@ export type BookingManagementAPIEndpoints = {
|
|
|
224
224
|
createAppointmentResource: APIEndpoint<CreateAppointmentResourceRequest, {
|
|
225
225
|
siteId: string;
|
|
226
226
|
}, AppointmentResourceResponse>;
|
|
227
|
+
createAppointmentResourceWithAccountAccess: APIEndpoint<CreateAppointmentResourceWithAccountAccessRequest, {
|
|
228
|
+
siteId: string;
|
|
229
|
+
}, CreateAppointmentResourceWithAccountAccessResponse>;
|
|
227
230
|
getAppointmentResource: APIEndpoint<never, {
|
|
228
231
|
siteId: string;
|
|
229
232
|
resourceId: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { TimeSlot } from "./availability";
|
|
2
2
|
import type { BookingPaymentOptionsSource, BookingPaymentTermsConfig, PublicBookingPaymentTermsAvailability, BookingPricing, BookingPricingInput } from "./bookingConfig";
|
|
3
|
+
import type { InviteSiteMemberEmailResult, SiteInvitation, StaffOperationalCapability } from "./accessAdmin";
|
|
3
4
|
import type { CourseEnrollmentRefundFailedCode, EventAttendeeRefundFailedCode } from "./bookingRefundOutcomes";
|
|
4
5
|
/**
|
|
5
6
|
* Booking Operations Contracts
|
|
@@ -304,7 +305,37 @@ export type CreateAppointmentResourceRequest = {
|
|
|
304
305
|
bio?: string | null;
|
|
305
306
|
timezone?: string;
|
|
306
307
|
colorHex?: string | null;
|
|
307
|
-
|
|
308
|
+
};
|
|
309
|
+
export type TeamMemberAccountAccessInput = {
|
|
310
|
+
kind: "managed_by_site_admins";
|
|
311
|
+
} | {
|
|
312
|
+
kind: "link_current_user";
|
|
313
|
+
} | {
|
|
314
|
+
kind: "invite_by_email";
|
|
315
|
+
email: string;
|
|
316
|
+
staffCapabilities: StaffOperationalCapability[];
|
|
317
|
+
} | {
|
|
318
|
+
kind: "link_existing_member";
|
|
319
|
+
memberId: string;
|
|
320
|
+
};
|
|
321
|
+
export type TeamMemberPractitionerLinkState = {
|
|
322
|
+
kind: "linked_to_current_user";
|
|
323
|
+
} | {
|
|
324
|
+
kind: "linked_to_another_user";
|
|
325
|
+
} | {
|
|
326
|
+
kind: "pending_invite";
|
|
327
|
+
} | {
|
|
328
|
+
kind: "unlinked";
|
|
329
|
+
};
|
|
330
|
+
export type CreateAppointmentResourceWithAccountAccessRequest = CreateAppointmentResourceRequest & {
|
|
331
|
+
accountAccess: TeamMemberAccountAccessInput;
|
|
332
|
+
};
|
|
333
|
+
export type CreateAppointmentResourceWithAccountAccessResponse = {
|
|
334
|
+
resource: DashboardAppointmentResource;
|
|
335
|
+
linkState: TeamMemberPractitionerLinkState;
|
|
336
|
+
invitation?: SiteInvitation;
|
|
337
|
+
email?: InviteSiteMemberEmailResult;
|
|
338
|
+
accountAccessWarning?: string;
|
|
308
339
|
};
|
|
309
340
|
export type UpdateAppointmentResourceRequest = Partial<CreateAppointmentResourceRequest>;
|
|
310
341
|
export type AppointmentResourceResponse = {
|
|
@@ -800,6 +800,13 @@ export declare const API_ENDPOINTS: {
|
|
|
800
800
|
readonly responseKind: "json";
|
|
801
801
|
readonly errors: readonly ["validation:invalid_input", "billing:plan_limit_exceeded", "server:internal_error"];
|
|
802
802
|
};
|
|
803
|
+
readonly createAppointmentResourceWithAccountAccess: {
|
|
804
|
+
readonly path: "/sites/{siteId}/bookings/resources/account-access";
|
|
805
|
+
readonly method: "POST";
|
|
806
|
+
readonly auth: "user";
|
|
807
|
+
readonly responseKind: "json";
|
|
808
|
+
readonly errors: readonly ["validation:invalid_input", "auth:forbidden", "billing:plan_limit_exceeded", "resource:conflict", "resource:not_found", "server:internal_error"];
|
|
809
|
+
};
|
|
803
810
|
readonly getAppointmentResource: {
|
|
804
811
|
readonly path: "/sites/{siteId}/bookings/resources/{resourceId}";
|
|
805
812
|
readonly method: "GET";
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
* to get only the types relevant to SDK usage.
|
|
9
9
|
*/
|
|
10
10
|
export type { HTTPMethod, ApiResponseKind, ApiAuthRequirement, APIEndpointBase, ContentEntryStatus, ContentEntryListStage, } from '../common/types';
|
|
11
|
-
export type { APIEndpoints } from '../types';
|
|
11
|
+
export type { APICallParams, APIEndpoints } from '../types';
|
|
12
12
|
export type { SiteBySlugResponse, ContentTypeRoutingInfo, ContentTypeRoutingSubroute, NavigationMenuWithItems, NavigationMenuRecord, NavigationItemRecord, SiteLayoutResolvedPayload, SiteLayoutSettingsPayload, RiverbankSiteConfig, SdkThemeConfig, SdkThemePalette, SdkSiteStyleConfig, SdkSectionBackground, SdkSectionOptionsConfig, SdkContainerOptionsConfig, SdkBlockFieldConfig, SdkBlockFieldOptionsMap, SdkFieldSelectOption, ContentEntryListItem, ListPublishedEntriesResponse, PublishedContentEntryPreview, PublishedContentEntryPreviewResponse, PublishedPostPreview, PublishedPostPreviewResponse, FormRecord, PageRecord, PageRouteRecord, ContentRouteRecord, ContentEntryRecord, } from '../types';
|
|
13
13
|
export type { Theme, SdkCustomBlock } from '@riverbankcms/blocks';
|