@riverbankcms/sdk 0.64.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 +75 -20
- package/dist/_dts/api/src/apiEndpointTypes.d.ts +12 -0
- 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 +33 -2
- package/dist/_dts/api/src/endpoints.d.ts +32 -0
- package/dist/_dts/api/src/public/types.d.ts +1 -1
- package/dist/_dts/api/src/sdkConfig/contracts.d.ts +0 -40
- package/dist/_dts/api/src/sdkContracts.d.ts +1 -1
- package/dist/_dts/api/src/siteMembers.d.ts +1 -1
- package/dist/_dts/api/src/siteOperations.d.ts +1 -1
- package/dist/_dts/billing/src/components/index.d.ts +426 -0
- package/dist/_dts/billing/src/plans/types.d.ts +1 -1
- package/dist/_dts/blocks/src/PageRenderer.d.ts +4 -0
- package/dist/_dts/blocks/src/bindings/index.d.ts +1 -1
- package/dist/_dts/blocks/src/client.d.ts +6 -0
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
- 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/blocks/src/system/transforms/registry/formatting.d.ts +1 -0
- package/dist/_dts/blocks/src/system/transforms/typed.d.ts +2 -1
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +81 -0
- package/dist/_dts/preview-next/src/client/blocks/pageDesignRuntimePreview.d.ts +7 -3
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/runtimeContentDecoration.d.ts +2 -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/execute/footer.d.ts +33 -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/commands/push-execute.d.ts +2 -1
- package/dist/_dts/sdk/src/cli/env.d.ts +2 -1
- package/dist/_dts/sdk/src/cli/merge-remote/entryMergePush.d.ts +2 -1
- package/dist/_dts/sdk/src/cli/site-commands/commandKeys.d.ts +13 -0
- package/dist/_dts/sdk/src/cli/site-commands/commandRuntime.d.ts +144 -0
- 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 +29 -49
- package/dist/_dts/sdk/src/cli/site-commands/footerCommands.d.ts +56 -0
- package/dist/_dts/sdk/src/cli/site-commands/formCommands.d.ts +53 -0
- package/dist/_dts/sdk/src/cli/site-commands/index.d.ts +6 -0
- package/dist/_dts/sdk/src/cli/site-commands/navigationCommands.d.ts +53 -0
- package/dist/_dts/sdk/src/cli/site-commands/pageCommands.d.ts +79 -0
- package/dist/_dts/sdk/src/cli/site-commands/pushExecution.d.ts +19 -20
- 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/executor.d.ts +10 -28
- package/dist/_dts/sdk/src/cli/sync/index.d.ts +2 -1
- package/dist/_dts/sdk/src/cli/sync/syncResultAggregation.d.ts +4 -0
- package/dist/_dts/sdk/src/config/dashboard-validation.d.ts +0 -48
- package/dist/_dts/sdk/src/config/types.d.ts +1 -1
- 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/adapter.d.ts +2 -2
- package/dist/_dts/site-commands/src/commands.d.ts +637 -13
- package/dist/_dts/site-commands/src/domain.d.ts +3 -3
- package/dist/_dts/site-commands/src/exposure.d.ts +41 -0
- package/dist/_dts/site-commands/src/index.d.ts +2 -0
- package/dist/_dts/site-commands/src/metadata.d.ts +159 -3
- package/dist/_dts/site-commands/src/planner.d.ts +13 -6
- package/dist/_dts/site-commands/src/refContributions.d.ts +1 -0
- package/dist/_dts/site-commands/src/refs.d.ts +19 -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/palette/utils/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/palette/utils/onColor.d.ts +2 -0
- package/dist/_dts/theme-core/src/runtime/buildThemeRuntimeFromBridge.d.ts +30 -23
- package/dist/_dts/theme-core/src/site-styles/accessibleSurfaces.d.ts +83 -0
- package/dist/_dts/theme-core/src/site-styles/contentTemplateRuntimeCompiler.d.ts +2 -1
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +89 -12
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +8 -2
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +3 -2
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +9 -6
- package/dist/_dts/ui/src/callout.d.ts +1 -1
- package/dist/cli/index.mjs +4736 -2026
- package/dist/client/bookings.mjs +5107 -3348
- package/dist/client/client.mjs +4579 -3871
- package/dist/client/hooks.mjs +325 -123
- package/dist/client/rendering/client.mjs +4474 -3869
- package/dist/client/rendering/islands.mjs +4234 -3639
- package/dist/client/rendering.mjs +4508 -3798
- package/dist/preview-next/before-render.mjs +75 -13
- package/dist/preview-next/client/runtime.mjs +3700 -2644
- package/dist/preview-next/middleware.mjs +75 -13
- package/dist/server/components.mjs +698 -383
- package/dist/server/config-validation.mjs +327 -125
- package/dist/server/config.mjs +327 -125
- package/dist/server/data.mjs +325 -123
- package/dist/server/index.mjs +92 -16
- package/dist/server/next.mjs +692 -377
- package/dist/server/page-converter.mjs +159 -41
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +700 -383
- package/dist/server/rendering.mjs +700 -383
- package/dist/server/routing.mjs +406 -131
- package/dist/server/server.mjs +326 -124
- package/dist/server/theme-bridge.mjs +1226 -4697
- 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/dist/_dts/path-utils/src/index.d.ts +0 -8
- package/dist/_dts/path-utils/src/redirectPaths.d.ts +0 -26
- package/dist/_dts/path-utils/src/safeAppPath.d.ts +0 -26
|
@@ -43,14 +43,6 @@ export declare const dashboardNavVisibilitySchema: z.ZodObject<{
|
|
|
43
43
|
allowIds: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
44
44
|
denyIds: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
45
45
|
}, z.core.$strip>>;
|
|
46
|
-
event_host: z.ZodOptional<z.ZodObject<{
|
|
47
|
-
mode: z.ZodOptional<z.ZodEnum<{
|
|
48
|
-
augment: "augment";
|
|
49
|
-
restrict: "restrict";
|
|
50
|
-
}>>;
|
|
51
|
-
allowIds: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
52
|
-
denyIds: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
53
|
-
}, z.core.$strip>>;
|
|
54
46
|
}, z.core.$strip>>;
|
|
55
47
|
}, z.core.$strip>;
|
|
56
48
|
export declare const dashboardNavigationConfigSchema: z.ZodObject<{
|
|
@@ -86,14 +78,6 @@ export declare const dashboardNavigationConfigSchema: z.ZodObject<{
|
|
|
86
78
|
allowIds: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
87
79
|
denyIds: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
88
80
|
}, z.core.$strip>>;
|
|
89
|
-
event_host: z.ZodOptional<z.ZodObject<{
|
|
90
|
-
mode: z.ZodOptional<z.ZodEnum<{
|
|
91
|
-
augment: "augment";
|
|
92
|
-
restrict: "restrict";
|
|
93
|
-
}>>;
|
|
94
|
-
allowIds: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
95
|
-
denyIds: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
96
|
-
}, z.core.$strip>>;
|
|
97
81
|
}, z.core.$strip>>;
|
|
98
82
|
}, z.core.$strip>>;
|
|
99
83
|
settingsNav: z.ZodOptional<z.ZodObject<{
|
|
@@ -128,14 +112,6 @@ export declare const dashboardNavigationConfigSchema: z.ZodObject<{
|
|
|
128
112
|
allowIds: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
129
113
|
denyIds: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
130
114
|
}, z.core.$strip>>;
|
|
131
|
-
event_host: z.ZodOptional<z.ZodObject<{
|
|
132
|
-
mode: z.ZodOptional<z.ZodEnum<{
|
|
133
|
-
augment: "augment";
|
|
134
|
-
restrict: "restrict";
|
|
135
|
-
}>>;
|
|
136
|
-
allowIds: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
137
|
-
denyIds: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
138
|
-
}, z.core.$strip>>;
|
|
139
115
|
}, z.core.$strip>>;
|
|
140
116
|
}, z.core.$strip>>;
|
|
141
117
|
}, z.core.$strip>;
|
|
@@ -174,14 +150,6 @@ export declare const dashboardConfigSchema: z.ZodObject<{
|
|
|
174
150
|
allowIds: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
175
151
|
denyIds: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
176
152
|
}, z.core.$strip>>;
|
|
177
|
-
event_host: z.ZodOptional<z.ZodObject<{
|
|
178
|
-
mode: z.ZodOptional<z.ZodEnum<{
|
|
179
|
-
augment: "augment";
|
|
180
|
-
restrict: "restrict";
|
|
181
|
-
}>>;
|
|
182
|
-
allowIds: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
183
|
-
denyIds: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
184
|
-
}, z.core.$strip>>;
|
|
185
153
|
}, z.core.$strip>>;
|
|
186
154
|
}, z.core.$strip>>;
|
|
187
155
|
settingsNav: z.ZodOptional<z.ZodObject<{
|
|
@@ -216,14 +184,6 @@ export declare const dashboardConfigSchema: z.ZodObject<{
|
|
|
216
184
|
allowIds: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
217
185
|
denyIds: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
218
186
|
}, z.core.$strip>>;
|
|
219
|
-
event_host: z.ZodOptional<z.ZodObject<{
|
|
220
|
-
mode: z.ZodOptional<z.ZodEnum<{
|
|
221
|
-
augment: "augment";
|
|
222
|
-
restrict: "restrict";
|
|
223
|
-
}>>;
|
|
224
|
-
allowIds: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
225
|
-
denyIds: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
226
|
-
}, z.core.$strip>>;
|
|
227
187
|
}, z.core.$strip>>;
|
|
228
188
|
}, z.core.$strip>>;
|
|
229
189
|
}, z.core.$strip>>;
|
|
@@ -112,7 +112,7 @@ export interface SdkWorkflowConfig {
|
|
|
112
112
|
triggers: SdkWorkflowTrigger[];
|
|
113
113
|
confirmation?: SdkWorkflowConfirmation;
|
|
114
114
|
}
|
|
115
|
-
export type DashboardSiteRole = "administrator" | "editor" | "
|
|
115
|
+
export type DashboardSiteRole = "administrator" | "editor" | "team_member";
|
|
116
116
|
export interface DashboardNavVisibilityConfig {
|
|
117
117
|
mode?: "augment" | "restrict";
|
|
118
118
|
allowIds?: string[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ListSiteMembersResponse, InviteSiteMemberRequest, InviteSiteMemberResponse, UpdateSiteMemberRoleRequest, UpdateSiteMemberRoleResponse, LinkCurrentUserPractitionerRequest, CurrentUserPractitionerLinkResponse, RemoveSiteMemberResponse, RevokeSiteInvitationResponse, TransferSiteOwnershipRequest, TransferSiteOwnershipResponse, AcceptSiteInvitationRequest, AcceptSiteInvitationResponse } from './types';
|
|
2
2
|
import type { ApiClient } from './request';
|
|
3
|
-
export type SiteRole = "owner" | "administrator" | "editor" | "
|
|
3
|
+
export type SiteRole = "owner" | "administrator" | "editor" | "team_member";
|
|
4
4
|
/**
|
|
5
5
|
* Higher number means more permissions.
|
|
6
6
|
*/
|
|
@@ -153,7 +153,7 @@ export type DevToolsSeedResponse = {
|
|
|
153
153
|
blocksCreated: number;
|
|
154
154
|
};
|
|
155
155
|
};
|
|
156
|
-
export type DowngradeRole = Extract<SiteRole, "administrator" | "editor"
|
|
156
|
+
export type DowngradeRole = Extract<SiteRole, "administrator" | "editor">;
|
|
157
157
|
export type RoleDowngradeActualRole = Extract<SiteRole, "owner" | "administrator"> | null;
|
|
158
158
|
export type SiteRoleDowngradeState = {
|
|
159
159
|
kind: "off";
|
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
import { type BillingPlanId } from '../plans/types';
|
|
2
|
+
export type BillingComponentInterval = 'month' | 'year';
|
|
3
|
+
export type BillingComponentCurrencyCode = string;
|
|
4
|
+
export type BillingComponentId = string;
|
|
5
|
+
export type BillingComponentSiteId = string;
|
|
6
|
+
export type BillingComponentSiteDomainId = string;
|
|
7
|
+
export type BillingComponentKind = 'plan_base' | 'custom_site_price' | 'extra_site' | 'managed_domain_overage';
|
|
8
|
+
export type BillingComponentProposalPlan = Readonly<{
|
|
9
|
+
idempotencyKey: string;
|
|
10
|
+
pendingSourceKey: string;
|
|
11
|
+
userId: string;
|
|
12
|
+
siteId: string | null;
|
|
13
|
+
kind: 'extra_site' | 'managed_domain_overage';
|
|
14
|
+
amountCents: number;
|
|
15
|
+
currency: string;
|
|
16
|
+
interval: BillingComponentInterval;
|
|
17
|
+
sourceEntity: BillingComponentSourceEntityPlan;
|
|
18
|
+
snapshotHash: string;
|
|
19
|
+
pricingSnapshot: unknown;
|
|
20
|
+
}>;
|
|
21
|
+
export type BillingComponentSourceEntityPlan = Readonly<{
|
|
22
|
+
type: 'site';
|
|
23
|
+
id: string;
|
|
24
|
+
}> | Readonly<{
|
|
25
|
+
type: 'site_domain';
|
|
26
|
+
id: string | null;
|
|
27
|
+
}>;
|
|
28
|
+
export type BillingComponentOrigin = 'computed' | 'planned' | 'persisted';
|
|
29
|
+
export type BillingComponentPlanSource = Readonly<{
|
|
30
|
+
kind: 'plan';
|
|
31
|
+
planId: string;
|
|
32
|
+
}>;
|
|
33
|
+
export type BillingComponentSiteSource = Readonly<{
|
|
34
|
+
kind: 'site';
|
|
35
|
+
siteId: BillingComponentSiteId;
|
|
36
|
+
}>;
|
|
37
|
+
export type BillingComponentSiteDomainSource = Readonly<{
|
|
38
|
+
kind: 'site_domain';
|
|
39
|
+
siteId: BillingComponentSiteId;
|
|
40
|
+
siteDomainId: BillingComponentSiteDomainId;
|
|
41
|
+
}>;
|
|
42
|
+
export type BillingComponentSource = BillingComponentPlanSource | BillingComponentSiteSource | BillingComponentSiteDomainSource;
|
|
43
|
+
export type BillingComponentSourceForKind<TKind extends BillingComponentKind> = TKind extends 'plan_base' ? BillingComponentPlanSource : TKind extends 'custom_site_price' | 'extra_site' ? BillingComponentSiteSource : TKind extends 'managed_domain_overage' ? BillingComponentSiteDomainSource : never;
|
|
44
|
+
export type BillingComponentBase<TKind extends BillingComponentKind, TOrigin extends BillingComponentOrigin> = Readonly<{
|
|
45
|
+
origin: TOrigin;
|
|
46
|
+
kind: TKind;
|
|
47
|
+
source: BillingComponentSourceForKind<TKind>;
|
|
48
|
+
amountCents: number;
|
|
49
|
+
currency: BillingComponentCurrencyCode;
|
|
50
|
+
interval: BillingComponentInterval;
|
|
51
|
+
}>;
|
|
52
|
+
export type MacadamiaExtraSiteBillingComponentProposalPlan = BillingComponentProposalPlan & Readonly<{
|
|
53
|
+
kind: 'extra_site';
|
|
54
|
+
siteId: string;
|
|
55
|
+
sourceEntity: Readonly<{
|
|
56
|
+
type: 'site';
|
|
57
|
+
id: string;
|
|
58
|
+
}>;
|
|
59
|
+
pricingSnapshot: MacadamiaExtraSitePricingSnapshot;
|
|
60
|
+
}>;
|
|
61
|
+
export type ManagedDomainOverageBillingComponentProposalPlan<TPricingSnapshot = unknown> = BillingComponentProposalPlan & Readonly<{
|
|
62
|
+
kind: 'managed_domain_overage';
|
|
63
|
+
siteId: string;
|
|
64
|
+
sourceEntity: Readonly<{
|
|
65
|
+
type: 'site_domain';
|
|
66
|
+
id: string | null;
|
|
67
|
+
}>;
|
|
68
|
+
pricingSnapshot: TPricingSnapshot;
|
|
69
|
+
}>;
|
|
70
|
+
export type ComputedBillingComponent = (BillingComponentBase<'plan_base', 'computed'> & Readonly<{
|
|
71
|
+
label: string;
|
|
72
|
+
}>) | (BillingComponentBase<'custom_site_price', 'computed'> & Readonly<{
|
|
73
|
+
label: string;
|
|
74
|
+
}>);
|
|
75
|
+
export type PlannedPersistedBillingComponent = (BillingComponentBase<'extra_site', 'planned'> & Readonly<{
|
|
76
|
+
label: string;
|
|
77
|
+
}>) | (BillingComponentBase<'managed_domain_overage', 'planned'> & Readonly<{
|
|
78
|
+
label: string;
|
|
79
|
+
}>);
|
|
80
|
+
export type PersistedBillingComponent = BillingComponentBase<'extra_site', 'persisted'> | BillingComponentBase<'managed_domain_overage', 'persisted'>;
|
|
81
|
+
export type BillingComponent = ComputedBillingComponent | PlannedPersistedBillingComponent | PersistedBillingComponent;
|
|
82
|
+
export type BillingModelDecision = Readonly<{
|
|
83
|
+
kind: 'macadamia_user_plan';
|
|
84
|
+
reason: 'no_custom_site_prices';
|
|
85
|
+
}> | Readonly<{
|
|
86
|
+
kind: 'custom_site_billing';
|
|
87
|
+
reason: 'active_custom_site_prices';
|
|
88
|
+
}>;
|
|
89
|
+
export type BillingComponentResolution = Readonly<{
|
|
90
|
+
model: BillingModelDecision;
|
|
91
|
+
components: readonly BillingComponent[];
|
|
92
|
+
basePlanCents: number;
|
|
93
|
+
customSitePricesCents: number;
|
|
94
|
+
extraSiteCents: number;
|
|
95
|
+
recurringAddOnsCents: number;
|
|
96
|
+
totalCents: number;
|
|
97
|
+
}>;
|
|
98
|
+
export type BillingSiteCostBreakdown = Readonly<{
|
|
99
|
+
siteId: BillingComponentSiteId;
|
|
100
|
+
siteName: string;
|
|
101
|
+
costCents: number;
|
|
102
|
+
billingStartsAt: string | null;
|
|
103
|
+
}>;
|
|
104
|
+
export type BillingBasePricePlan = Readonly<{
|
|
105
|
+
amountCents: number;
|
|
106
|
+
currency: BillingComponentCurrencyCode;
|
|
107
|
+
isCustomPrice: boolean;
|
|
108
|
+
source: 'override' | 'base';
|
|
109
|
+
}>;
|
|
110
|
+
export type BillingTotalPricePlan = BillingBasePricePlan & Readonly<{
|
|
111
|
+
billingModel: BillingModelDecision;
|
|
112
|
+
basePlanCents: number;
|
|
113
|
+
customSitePricesCents: number;
|
|
114
|
+
extraSiteCents: number;
|
|
115
|
+
recurringAddOnsCents: number;
|
|
116
|
+
totalCents: number;
|
|
117
|
+
siteBreakdown: readonly BillingSiteCostBreakdown[];
|
|
118
|
+
componentBreakdown: readonly BillingComponent[];
|
|
119
|
+
}>;
|
|
120
|
+
export type BillingComponentCompatibilityMismatch = Readonly<{
|
|
121
|
+
tag: 'component_interval_currency_mismatch';
|
|
122
|
+
componentInterval: BillingComponentInterval;
|
|
123
|
+
requestedInterval: BillingComponentInterval;
|
|
124
|
+
componentCurrency: BillingComponentCurrencyCode;
|
|
125
|
+
requestedCurrency: BillingComponentCurrencyCode;
|
|
126
|
+
}>;
|
|
127
|
+
export type BillingTotalPricePlanError = Readonly<{
|
|
128
|
+
tag: 'base_price_required';
|
|
129
|
+
}> | Readonly<{
|
|
130
|
+
tag: 'hybrid_billing_forbidden';
|
|
131
|
+
customSiteIds: readonly string[];
|
|
132
|
+
extraSiteIds: readonly string[];
|
|
133
|
+
}>;
|
|
134
|
+
export type BillingTotalPricePlanResult = Readonly<{
|
|
135
|
+
success: true;
|
|
136
|
+
data: BillingTotalPricePlan;
|
|
137
|
+
}> | Readonly<{
|
|
138
|
+
success: false;
|
|
139
|
+
error: BillingTotalPricePlanError;
|
|
140
|
+
}>;
|
|
141
|
+
export type BillingComponentSummaryBase<TKind extends BillingComponentKind> = Readonly<{
|
|
142
|
+
kind: TKind;
|
|
143
|
+
label: string;
|
|
144
|
+
amountCents: number;
|
|
145
|
+
formatted: string;
|
|
146
|
+
interval: BillingComponentInterval;
|
|
147
|
+
}>;
|
|
148
|
+
export type BillingComponentSummaryBasePlanComponent = BillingComponentSummaryBase<'plan_base'> & Readonly<{
|
|
149
|
+
source: BillingComponentPlanSource;
|
|
150
|
+
}>;
|
|
151
|
+
export type BillingComponentSummarySiteComponent = BillingComponentSummaryBase<'custom_site_price'> & Readonly<{
|
|
152
|
+
source: BillingComponentSiteSource;
|
|
153
|
+
}>;
|
|
154
|
+
export type BillingComponentSummaryAddOnComponent = (BillingComponentSummaryBase<'extra_site'> & Readonly<{
|
|
155
|
+
source: BillingComponentSiteSource;
|
|
156
|
+
}>) | (BillingComponentSummaryBase<'managed_domain_overage'> & Readonly<{
|
|
157
|
+
source: BillingComponentSiteDomainSource;
|
|
158
|
+
}>);
|
|
159
|
+
export type BillingComponentSummaryComponent = BillingComponentSummaryBasePlanComponent | BillingComponentSummarySiteComponent | BillingComponentSummaryAddOnComponent;
|
|
160
|
+
export type BillingComponentSummary = Readonly<{
|
|
161
|
+
basePlan: BillingComponentSummaryBasePlanComponent | null;
|
|
162
|
+
sites: BillingComponentSummarySiteComponent[];
|
|
163
|
+
addOns: BillingComponentSummaryAddOnComponent[];
|
|
164
|
+
total: Readonly<{
|
|
165
|
+
amountCents: number;
|
|
166
|
+
formatted: string;
|
|
167
|
+
}>;
|
|
168
|
+
isCustomPrice: boolean;
|
|
169
|
+
}>;
|
|
170
|
+
export type BillingComponentSummaryError = Readonly<{
|
|
171
|
+
tag: 'missing_component_label';
|
|
172
|
+
componentKind: PersistedBillingComponent['kind'];
|
|
173
|
+
sourceId: string;
|
|
174
|
+
}>;
|
|
175
|
+
export type BillingComponentSummaryResult = Readonly<{
|
|
176
|
+
success: true;
|
|
177
|
+
data: BillingComponentSummary;
|
|
178
|
+
}> | Readonly<{
|
|
179
|
+
success: false;
|
|
180
|
+
error: BillingComponentSummaryError;
|
|
181
|
+
}>;
|
|
182
|
+
export type BillingComponentSummaryFormatter = (amountCents: number, currency: BillingComponentCurrencyCode) => string;
|
|
183
|
+
export type BillingComponentSummaryLabelRequirements = Readonly<{
|
|
184
|
+
extraSiteIds: readonly BillingComponentSiteId[];
|
|
185
|
+
siteDomainIds: readonly BillingComponentSiteDomainId[];
|
|
186
|
+
}>;
|
|
187
|
+
export type BillableSiteState = Readonly<{
|
|
188
|
+
tag: 'draft';
|
|
189
|
+
}> | Readonly<{
|
|
190
|
+
tag: 'billable_live';
|
|
191
|
+
launchedAt: string;
|
|
192
|
+
}> | Readonly<{
|
|
193
|
+
tag: 'not_billable';
|
|
194
|
+
reason: 'archived' | 'deleted';
|
|
195
|
+
}>;
|
|
196
|
+
export type BillableMacadamiaSite = Readonly<{
|
|
197
|
+
siteId: BillingComponentSiteId;
|
|
198
|
+
siteName: string;
|
|
199
|
+
state: BillableSiteState;
|
|
200
|
+
grandfathered?: boolean;
|
|
201
|
+
}>;
|
|
202
|
+
export type MacadamiaExtraSitePricingSnapshot = Readonly<{
|
|
203
|
+
formulaVersion: 'macadamia-extra-site-v1';
|
|
204
|
+
planId: BillingPlanId;
|
|
205
|
+
amountCents: number;
|
|
206
|
+
currency: BillingComponentCurrencyCode;
|
|
207
|
+
interval: BillingComponentInterval;
|
|
208
|
+
}>;
|
|
209
|
+
export type ExtraSitePricingPolicy = Readonly<{
|
|
210
|
+
includedSiteCount: number;
|
|
211
|
+
currency: BillingComponentCurrencyCode;
|
|
212
|
+
extraSite: Readonly<{
|
|
213
|
+
tag: 'not_supported';
|
|
214
|
+
}> | Readonly<{
|
|
215
|
+
tag: 'priced';
|
|
216
|
+
monthlyAmountCents: number;
|
|
217
|
+
}>;
|
|
218
|
+
}>;
|
|
219
|
+
export type ConfiguredExtraSitePricingPolicy = ExtraSitePricingPolicy & Readonly<{
|
|
220
|
+
extraSite: Readonly<{
|
|
221
|
+
tag: 'priced';
|
|
222
|
+
monthlyAmountCents: number;
|
|
223
|
+
}>;
|
|
224
|
+
}>;
|
|
225
|
+
export type ActiveExtraSiteComponentForReconciliation = Readonly<{
|
|
226
|
+
componentId: BillingComponentId;
|
|
227
|
+
siteId: BillingComponentSiteId;
|
|
228
|
+
amountCents: number;
|
|
229
|
+
currency: BillingComponentCurrencyCode;
|
|
230
|
+
interval: BillingComponentInterval;
|
|
231
|
+
}>;
|
|
232
|
+
export type MacadamiaExtraSiteReconciliationAction = Readonly<{
|
|
233
|
+
tag: 'requires_acceptance';
|
|
234
|
+
site: BillableMacadamiaSite;
|
|
235
|
+
amountCents: number;
|
|
236
|
+
currency: BillingComponentCurrencyCode;
|
|
237
|
+
interval: BillingComponentInterval;
|
|
238
|
+
}> | Readonly<{
|
|
239
|
+
tag: 'create_missing';
|
|
240
|
+
site: BillableMacadamiaSite;
|
|
241
|
+
amountCents: number;
|
|
242
|
+
currency: BillingComponentCurrencyCode;
|
|
243
|
+
interval: BillingComponentInterval;
|
|
244
|
+
}> | Readonly<{
|
|
245
|
+
tag: 'end_at_period_end';
|
|
246
|
+
component: ActiveExtraSiteComponentForReconciliation;
|
|
247
|
+
reason: 'site_no_longer_billable' | 'site_within_allowance' | 'site_grandfathered';
|
|
248
|
+
}> | Readonly<{
|
|
249
|
+
tag: 'invalid_state';
|
|
250
|
+
reason: 'duplicate_active_component';
|
|
251
|
+
siteId?: BillingComponentSiteId;
|
|
252
|
+
}> | Readonly<{
|
|
253
|
+
tag: 'requires_plan_upgrade';
|
|
254
|
+
site: BillableMacadamiaSite;
|
|
255
|
+
minimumPlanId: 'solo';
|
|
256
|
+
}>;
|
|
257
|
+
export type MacadamiaExtraSiteReconciliationPlan = Readonly<{
|
|
258
|
+
tag: 'no_change';
|
|
259
|
+
}> | Readonly<{
|
|
260
|
+
tag: 'changes_required';
|
|
261
|
+
actions: readonly MacadamiaExtraSiteReconciliationAction[];
|
|
262
|
+
}>;
|
|
263
|
+
export type MacadamiaExtraSiteLaunchDecision = Readonly<{
|
|
264
|
+
tag: 'allowed';
|
|
265
|
+
reason: 'within_included_allowance';
|
|
266
|
+
}> | Readonly<{
|
|
267
|
+
tag: 'allowed';
|
|
268
|
+
reason: 'accepted_extra_site_component';
|
|
269
|
+
componentId?: BillingComponentId;
|
|
270
|
+
}> | Readonly<{
|
|
271
|
+
tag: 'requires_plan_upgrade';
|
|
272
|
+
currentPlanId: BillingPlanId;
|
|
273
|
+
minimumPlanId: 'solo';
|
|
274
|
+
}> | Readonly<{
|
|
275
|
+
tag: 'requires_acceptance';
|
|
276
|
+
currentPlanId: BillingPlanId;
|
|
277
|
+
amountCents: number;
|
|
278
|
+
currency: BillingComponentCurrencyCode;
|
|
279
|
+
interval: BillingComponentInterval;
|
|
280
|
+
}>;
|
|
281
|
+
export type MacadamiaSiteCreationBillingNotice = Readonly<{
|
|
282
|
+
tag: 'none';
|
|
283
|
+
reason: 'within_included_allowance' | 'accepted_extra_site_component';
|
|
284
|
+
}> | Readonly<{
|
|
285
|
+
tag: 'unknown';
|
|
286
|
+
reason: 'billing_lookup_failed';
|
|
287
|
+
}> | Readonly<{
|
|
288
|
+
tag: 'upgrade_required_on_launch';
|
|
289
|
+
currentPlanId: BillingPlanId;
|
|
290
|
+
minimumPlanId: 'solo';
|
|
291
|
+
}> | Readonly<{
|
|
292
|
+
tag: 'extra_site_charge_on_launch';
|
|
293
|
+
currentPlanId: BillingPlanId;
|
|
294
|
+
amountCents: number;
|
|
295
|
+
currency: BillingComponentCurrencyCode;
|
|
296
|
+
interval: BillingComponentInterval;
|
|
297
|
+
}>;
|
|
298
|
+
export type MacadamiaExtraSiteProposalDecisionPlan = Extract<MacadamiaExtraSiteLaunchDecision, {
|
|
299
|
+
tag: 'requires_acceptance';
|
|
300
|
+
}>;
|
|
301
|
+
export declare function resolveBillableSiteState(input: Readonly<{
|
|
302
|
+
launchedAt: string | null;
|
|
303
|
+
archivedAt?: string | null;
|
|
304
|
+
deletedAt?: string | null;
|
|
305
|
+
}>): BillableSiteState;
|
|
306
|
+
export declare function classifyBillingModel(input: Readonly<{
|
|
307
|
+
customSitePrices: readonly BillingComponent[];
|
|
308
|
+
}>): BillingModelDecision;
|
|
309
|
+
export declare function planExtraSiteComponents(input: Readonly<{
|
|
310
|
+
sites: readonly BillableMacadamiaSite[];
|
|
311
|
+
policy: ConfiguredExtraSitePricingPolicy;
|
|
312
|
+
interval?: BillingComponentInterval;
|
|
313
|
+
}>): readonly BillingComponent[];
|
|
314
|
+
export declare function planMacadamiaExtraSiteReconciliation(input: Readonly<{
|
|
315
|
+
sites: readonly BillableMacadamiaSite[];
|
|
316
|
+
activeExtraSiteComponents: readonly ActiveExtraSiteComponentForReconciliation[];
|
|
317
|
+
acceptedSiteIds?: readonly BillingComponentSiteId[];
|
|
318
|
+
policy: ExtraSitePricingPolicy;
|
|
319
|
+
interval?: BillingComponentInterval;
|
|
320
|
+
}>): MacadamiaExtraSiteReconciliationPlan;
|
|
321
|
+
export declare function evaluateMacadamiaExtraSiteLaunchDecision(input: Readonly<{
|
|
322
|
+
siteId: BillingComponentSiteId;
|
|
323
|
+
currentPlanId: BillingPlanId;
|
|
324
|
+
currentLiveSiteCount: number;
|
|
325
|
+
acceptedExtraSiteComponents?: readonly Readonly<{
|
|
326
|
+
siteId: BillingComponentSiteId;
|
|
327
|
+
componentId?: BillingComponentId;
|
|
328
|
+
}>[];
|
|
329
|
+
policy: ExtraSitePricingPolicy;
|
|
330
|
+
interval?: BillingComponentInterval;
|
|
331
|
+
}>): MacadamiaExtraSiteLaunchDecision;
|
|
332
|
+
export declare function macadamiaExtraSiteLaunchDecisionToCreationBillingNotice(decision: MacadamiaExtraSiteLaunchDecision): MacadamiaSiteCreationBillingNotice;
|
|
333
|
+
export declare function evaluateMacadamiaSiteCreationBillingNotice(input: Readonly<{
|
|
334
|
+
currentPlanId: BillingPlanId;
|
|
335
|
+
currentLiveSiteCount: number;
|
|
336
|
+
policy: ExtraSitePricingPolicy;
|
|
337
|
+
interval?: BillingComponentInterval;
|
|
338
|
+
}>): MacadamiaSiteCreationBillingNotice;
|
|
339
|
+
export declare function resolveBillingComponents(input: Readonly<{
|
|
340
|
+
basePlan: BillingComponent;
|
|
341
|
+
customSitePrices: readonly BillingComponent[];
|
|
342
|
+
extraSites?: readonly BillingComponent[];
|
|
343
|
+
recurringAddOns?: readonly BillingComponent[];
|
|
344
|
+
}>): BillingComponentResolution;
|
|
345
|
+
export declare function partitionPersistedBillingComponents(components: readonly PersistedBillingComponent[]): Readonly<{
|
|
346
|
+
extraSites: readonly PersistedBillingComponent[];
|
|
347
|
+
recurringAddOns: readonly PersistedBillingComponent[];
|
|
348
|
+
}>;
|
|
349
|
+
export declare function toBillingSiteCostBreakdown(input: Readonly<{
|
|
350
|
+
siteId: string;
|
|
351
|
+
siteName: string;
|
|
352
|
+
monthlyCostCents: number;
|
|
353
|
+
billingStartsAt: string | null;
|
|
354
|
+
}>): BillingSiteCostBreakdown;
|
|
355
|
+
export declare function planCustomSitePriceComponents(input: Readonly<{
|
|
356
|
+
siteBreakdown: readonly BillingSiteCostBreakdown[];
|
|
357
|
+
currency: BillingComponentCurrencyCode;
|
|
358
|
+
interval: BillingComponentInterval;
|
|
359
|
+
}>): readonly BillingComponent[];
|
|
360
|
+
export declare function validateBillingComponentCompatibility(input: Readonly<{
|
|
361
|
+
component: BillingComponent;
|
|
362
|
+
requestedInterval: BillingComponentInterval;
|
|
363
|
+
requestedCurrency: BillingComponentCurrencyCode;
|
|
364
|
+
}>): BillingComponentCompatibilityMismatch | null;
|
|
365
|
+
export declare function planBillingTotalPrice(input: Readonly<{
|
|
366
|
+
planId: string;
|
|
367
|
+
interval: BillingComponentInterval;
|
|
368
|
+
currency: BillingComponentCurrencyCode;
|
|
369
|
+
siteBreakdown: readonly BillingSiteCostBreakdown[];
|
|
370
|
+
persistedComponents: readonly PersistedBillingComponent[];
|
|
371
|
+
basePrice?: BillingBasePricePlan;
|
|
372
|
+
}>): BillingTotalPricePlanResult;
|
|
373
|
+
export declare function getBillingComponentSummaryLabelRequirements(components: readonly BillingComponent[]): BillingComponentSummaryLabelRequirements;
|
|
374
|
+
export declare function buildBillingComponentSummary(input: Readonly<{
|
|
375
|
+
components: readonly BillingComponent[];
|
|
376
|
+
totalCents: number;
|
|
377
|
+
totalCurrency: BillingComponentCurrencyCode;
|
|
378
|
+
isCustomPrice: boolean;
|
|
379
|
+
persistedLabels: ReadonlyMap<string, string>;
|
|
380
|
+
formatAmount: BillingComponentSummaryFormatter;
|
|
381
|
+
}>): BillingComponentSummaryResult;
|
|
382
|
+
export declare function toBillingComponentSummaryComponent(component: BillingComponent, persistedLabels: ReadonlyMap<string, string>, formatAmount: BillingComponentSummaryFormatter): Readonly<{
|
|
383
|
+
success: true;
|
|
384
|
+
data: BillingComponentSummaryComponent;
|
|
385
|
+
} | {
|
|
386
|
+
success: false;
|
|
387
|
+
error: BillingComponentSummaryError;
|
|
388
|
+
}>;
|
|
389
|
+
export declare function isBillingComponentSummaryBasePlanComponent(component: BillingComponentSummaryComponent): component is BillingComponentSummaryBasePlanComponent;
|
|
390
|
+
export declare function isBillingComponentSummarySiteComponent(component: BillingComponentSummaryComponent): component is BillingComponentSummarySiteComponent;
|
|
391
|
+
export declare function isBillingComponentSummaryAddOnComponent(component: BillingComponentSummaryComponent): component is BillingComponentSummaryAddOnComponent;
|
|
392
|
+
export declare function persistedBillingComponentLabelKey(component: PersistedBillingComponent): string;
|
|
393
|
+
export declare function persistedBillingComponentLabelKey(kind: PersistedBillingComponent['kind'], sourceId: string): string;
|
|
394
|
+
export declare function parseMacadamiaExtraSitePricingSnapshot(value: unknown): MacadamiaExtraSitePricingSnapshot | null;
|
|
395
|
+
export declare function buildMacadamiaExtraSitePricingSnapshot(decision: MacadamiaExtraSiteProposalDecisionPlan): MacadamiaExtraSitePricingSnapshot;
|
|
396
|
+
export declare function buildMacadamiaExtraSiteProposalPlan(input: Readonly<{
|
|
397
|
+
billingUserId: string;
|
|
398
|
+
siteId: string;
|
|
399
|
+
decision: MacadamiaExtraSiteProposalDecisionPlan;
|
|
400
|
+
}>): MacadamiaExtraSiteBillingComponentProposalPlan;
|
|
401
|
+
export type BillingComponentProposalPlanBranding<TIdempotencyKey, TPendingSourceKey, TUserId, TSiteId, TSnapshotHash, TPricingSnapshot> = Readonly<{
|
|
402
|
+
idempotencyKey: (value: string) => TIdempotencyKey;
|
|
403
|
+
pendingSourceKey: (value: string) => TPendingSourceKey;
|
|
404
|
+
userId: (value: string) => TUserId;
|
|
405
|
+
siteId: (value: string) => TSiteId;
|
|
406
|
+
snapshotHash: (value: string) => TSnapshotHash;
|
|
407
|
+
pricingSnapshot: (value: unknown) => TPricingSnapshot;
|
|
408
|
+
}>;
|
|
409
|
+
export type BillingComponentProposalPricingSnapshotParser<TPricingSnapshot> = (value: unknown) => TPricingSnapshot | null;
|
|
410
|
+
export type BrandedBillingComponentProposalPlan<TIdempotencyKey, TPendingSourceKey, TUserId, TSiteId, TSnapshotHash, TPricingSnapshot> = Omit<BillingComponentProposalPlan, 'idempotencyKey' | 'pendingSourceKey' | 'userId' | 'siteId' | 'snapshotHash' | 'pricingSnapshot'> & Readonly<{
|
|
411
|
+
idempotencyKey: TIdempotencyKey;
|
|
412
|
+
pendingSourceKey: TPendingSourceKey;
|
|
413
|
+
userId: TUserId;
|
|
414
|
+
siteId: TSiteId | null;
|
|
415
|
+
snapshotHash: TSnapshotHash;
|
|
416
|
+
pricingSnapshot: TPricingSnapshot;
|
|
417
|
+
}>;
|
|
418
|
+
export declare function asBillingComponentProposalPlan<TIdempotencyKey, TPendingSourceKey, TUserId, TSiteId, TSnapshotHash, TPricingSnapshot>(plan: BillingComponentProposalPlan, brand: BillingComponentProposalPlanBranding<TIdempotencyKey, TPendingSourceKey, TUserId, TSiteId, TSnapshotHash, TPricingSnapshot>): BrandedBillingComponentProposalPlan<TIdempotencyKey, TPendingSourceKey, TUserId, TSiteId, TSnapshotHash, TPricingSnapshot>;
|
|
419
|
+
/**
|
|
420
|
+
* Fail-fast guard for static proposal brand adapters. The parser boundary should
|
|
421
|
+
* be wired during service construction, so returning a Result would only move a
|
|
422
|
+
* programming/configuration error into every runtime caller.
|
|
423
|
+
*/
|
|
424
|
+
export declare function asBillingComponentProposalPricingSnapshot<TPricingSnapshot>(value: unknown, parse: BillingComponentProposalPricingSnapshotParser<TPricingSnapshot>, description?: string): TPricingSnapshot;
|
|
425
|
+
export declare function hashBillingComponentSnapshot(snapshot: unknown): string;
|
|
426
|
+
export declare function stableJson(value: unknown): string;
|
|
@@ -40,7 +40,7 @@ export declare const BRANDING_TIERS: readonly ["macadamia_visible", "light_custo
|
|
|
40
40
|
export type BrandingTier = (typeof BRANDING_TIERS)[number];
|
|
41
41
|
export declare const TEAM_TIERS: readonly ["owner_only", "multi_practitioner"];
|
|
42
42
|
export type TeamTier = (typeof TEAM_TIERS)[number];
|
|
43
|
-
export declare const SITE_ROLE_ENTITLEMENTS: readonly ["administrator", "editor", "
|
|
43
|
+
export declare const SITE_ROLE_ENTITLEMENTS: readonly ["administrator", "editor", "team_member"];
|
|
44
44
|
export type SiteRoleEntitlement = (typeof SITE_ROLE_ENTITLEMENTS)[number];
|
|
45
45
|
export declare const PLAN_BOOLEAN_FEATURE_KEYS: readonly ["customDomain", "customContentTypes", "analytics", "passes", "memberships", "discountCodes", "advancedPaymentSchemes", "internalNotes", "multipleTeamLogins", "multiplePractitioners"];
|
|
46
46
|
export type PlanBooleanFeatureKey = (typeof PLAN_BOOLEAN_FEATURE_KEYS)[number];
|
|
@@ -86,6 +86,10 @@ export type BlockOverrideProps<TContent = Record<string, unknown>> = {
|
|
|
86
86
|
data?: Record<string, unknown>;
|
|
87
87
|
/** Site UUID (useful for media URL resolution in override components) */
|
|
88
88
|
siteId?: string;
|
|
89
|
+
/** Dashboard API URL for client-side block runtime calls. */
|
|
90
|
+
apiBaseUrl?: string;
|
|
91
|
+
/** Customer portal token for Bearer-authenticated block runtime calls. */
|
|
92
|
+
portalToken?: string | null;
|
|
89
93
|
/** Supabase project URL (useful for media URL resolution in override components) */
|
|
90
94
|
supabaseUrl?: string;
|
|
91
95
|
/** Full image-resolution context including canonical media sidecars. */
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export type { BindingSource, BindingDescriptor, BindingInput, BindingMap, BindingContext, BindingPath, BindingTransformName, KnownBindingTransformName, FieldBindingDescriptor, MetaBindingDescriptor, LiteralBindingDescriptor, TransformBindingDescriptor, FallbackBindingDescriptor, } from './types';
|
|
8
8
|
export { TRANSFORMS, BINDING_SOURCES } from './types';
|
|
9
|
-
export { asDesignBlockId, asContentTemplateDesignBlockId, asLayoutVariantKey, buildPageDesignEditorReadModel, compileContentTemplateRuntimeFields, parsePageDesignIntent, type DesignBlockId, parseContentTemplateDesignIntent, type CompiledBlockRuntimeFields, type LayoutVariantKey, type PageDesignEditorBlockInput, type PageDesignIntent, applyBlockContentVariantPolicy, deriveSiteStyleBlockPolicy, } from '@riverbankcms/theme-core/site-styles';
|
|
9
|
+
export { asDesignBlockId, asContentTemplateDesignBlockId, asLayoutVariantKey, buildPageDesignEditorReadModel, compileContentTemplateRuntimeFields, parsePageDesignIntent, surfaceResolutionContextFromTheme, type DesignBlockId, parseContentTemplateDesignIntent, type CompiledBlockRuntimeFields, type LayoutVariantKey, type PageDesignEditorBlockInput, type PageDesignIntent, type SurfaceResolutionContext, applyBlockContentVariantPolicy, deriveSiteStyleBlockPolicy, } from '@riverbankcms/theme-core/site-styles';
|
|
10
10
|
export { applyCompiledRuntimeFieldsToContent, buildEditorModelRuntimeFieldsByBlockId, } from '@riverbankcms/theme-core/site-styles/previewCompiler';
|
|
11
11
|
export { blockDesignMetadataMapFromDefinitions } from '../system/designCapabilities';
|
|
12
12
|
export { systemBlockDefinitions } from '../system/blocks';
|
|
@@ -10,11 +10,14 @@
|
|
|
10
10
|
export { BlockApiProvider, useBlockApi, type BlockApiConfig } from './system/runtime/api';
|
|
11
11
|
export { clientComponentRegistry } from './system/runtime/components/registry.client';
|
|
12
12
|
export type { ComponentRegistry } from './system/runtime/resolver';
|
|
13
|
+
export type { BookingPaymentOptionViewModel, BookingPaymentSelectionViewModel, } from './system/runtime/shared/bookingPaymentOptions';
|
|
13
14
|
export { enhanceHeaderSection } from './system/runtime/header/enhanceHeaderSection';
|
|
14
15
|
export { ClientThemeScope } from '@riverbankcms/theme-core/ClientThemeScope';
|
|
15
16
|
export { ImageResolveContextProvider, useImageResolveContextOptional, } from './system/runtime/nodes/ImageResolveContext';
|
|
16
17
|
export { FormNodeClient } from './system/runtime/nodes/form.client';
|
|
17
18
|
export { BookingFormClient } from './system/runtime/nodes/booking-form.client';
|
|
19
|
+
export { HeadlessBookingProvider, createBookingBlockApiConfig, useHeadlessBookingFlow, } from './system/runtime/hooks/useHeadlessBookingFlow';
|
|
20
|
+
export { AltchaWidget as HeadlessBookingAltchaWidget } from '@riverbankcms/altcha/client';
|
|
18
21
|
export { EventRegistrationClient, EventRegistrationIslandClient } from './system/runtime/nodes/event-registration.client';
|
|
19
22
|
export { EventDetailsClient, EventDetailsIslandClient } from './system/runtime/nodes/event-details.client';
|
|
20
23
|
export { LocationMapClient, LocationMapIslandClient } from './system/runtime/nodes/location-map.client';
|
|
@@ -25,6 +28,9 @@ export { normalizeCarouselProps } from './system/runtime/nodes/carousel.client';
|
|
|
25
28
|
export type { CarouselNodeClientProps, NormalizedCarouselProps, ResponsiveSlidesToShow, } from './system/runtime/nodes/carousel.client';
|
|
26
29
|
export { MediaNode, type MediaNodeProps } from './system/runtime/nodes/media.client';
|
|
27
30
|
export type { BookingFormClientProps, FormConfig as BookingFormConfig, Service as BookingService, } from './system/runtime/nodes/booking-form.client';
|
|
31
|
+
export type { BookingAvailabilityModel, BookingAppointmentPackagesModel, BookingDiscountModel, BookingFieldsModel, BookingFlowActions, BookingPaymentModel, BookingResourcesModel, BookingServicesModel, BookingSpamProtectionModel, HeadlessBookingFlow, HeadlessBookingFlowOptions, HeadlessBookingProviderProps, } from './system/runtime/hooks/useHeadlessBookingFlow';
|
|
32
|
+
export type { AppointmentBookingOverrideData, AppointmentBookingOverrideInput, AppointmentBookingOverrideInputResult, AppointmentBookingOverridePropsLike, BookingAvailabilityQuery, BookingAppointmentPackagesUnavailableReason, BookingFieldValue, BookingFieldView, BookingFlowActionResult, BookingFlowFeedback, BookingFlowStatus, BookingFlowView, BookingResourceView, BookingFlowStep, BookingFlowStepId, BookingSlotView, BookingSubmitActionResult, BookingSubmitOptions, BookingValidationErrors, DerivedBookingFlowSteps, DeriveBookingFlowStepsInput, LoadState, } from './system/runtime/hooks/useHeadlessBookingFlow.state';
|
|
33
|
+
export { buildBookingAvailabilityQuery, buildBookingStepPlan, buildBookingSubmitPlan, createEmptyBookingValidationErrors, createFieldBookingValidationErrors, createFormBookingValidationError, describeUnknownError, deriveBookingFlowSteps, deriveBookingFieldViews, getAppointmentBookingOverrideInput, hasBookingValidationErrors, resolveAppointmentPackagesModel, resolveHeadlessBookingStatus, resolveHeadlessBookingView, toBookingFormData, toBookingSlotView, toBookingSlotViews, validateBookingField, validateBookingFields, validateBookingStep, } from './system/runtime/hooks/useHeadlessBookingFlow.state';
|
|
28
34
|
export type { EventDetailsClientProps, EventDetailsIslandClientProps } from './system/runtime/nodes/event-details.client';
|
|
29
35
|
export type { LocationMapClientProps, LocationMapIslandClientProps } from './system/runtime/nodes/location-map.client';
|
|
30
36
|
export type { EventRegistrationClientProps, EventRegistrationIslandClientProps, } from './system/runtime/nodes/event-registration.client';
|
|
@@ -20,7 +20,7 @@ export type AllowedNodeType = (typeof ALLOWED_NODE_TYPES)[number];
|
|
|
20
20
|
* $bind.transforms within custom block layouts. Transform IDs
|
|
21
21
|
* not in this list will be rejected during validation.
|
|
22
22
|
*/
|
|
23
|
-
export declare const ALLOWED_TRANSFORM_IDS: readonly ["string.uppercase", "value.fallback", "date.formatShort", "array.length", "value.jsonArray", "array.marqueeLoop", "layout.maxWidthClass", "layout.headerRootClass", "layout.footerRootClass", "layout.headerRootStyle", "layout.footerRootStyle", "ui.headerNavLinkClass", "ui.headingClassFromAlignment", "ui.bodyClassFromAlignment", "ui.stackAlignFromAlignment", "ui.sectionStateTone", "ui.heroContentWrapperClass", "ui.heroCtaJustify", "ui.heroStackJustifyFromVerticalAlignment", "ui.heroGridClassFromVerticalAlignment", "ui.conditionalClass", "ui.twoColumnContainerClass", "ui.twoColumnFlexBasis", "ui.imageGalleryFilterClass", "ui.imageGalleryTileClass", "ui.imageGalleryTileStyle", "ui.imageGalleryMarqueeTileStyle", "ui.imageGalleryMarqueeDuration", "ui.imageGalleryMarqueeDirection", "ui.imageFragmentClass", "ui.imageFragmentSize", "media.fromUrl", "background.resolveStyle", "background.resolveColorsStyle", "background.resolveAllowOverflow", "background.resolveImageStyle", "background.resolveImageClassName", "background.resolveOverlayStyle", "links.resolve", "links.label", "content.interpolateRichTextTokens", "boxStyles.spacing", "boxStyles.resolveRootClass", "boxStyles.resolveRootStyle", "boxStyles.semanticGap", "boxStyles.semanticGapValue", "containerStyles.resolveBoxClassName"];
|
|
23
|
+
export declare const ALLOWED_TRANSFORM_IDS: readonly ["string.uppercase", "value.fallback", "date.formatShort", "array.length", "value.jsonArray", "value.csv", "array.marqueeLoop", "layout.maxWidthClass", "layout.headerRootClass", "layout.footerRootClass", "layout.headerRootStyle", "layout.footerRootStyle", "ui.headerNavLinkClass", "ui.headingClassFromAlignment", "ui.bodyClassFromAlignment", "ui.stackAlignFromAlignment", "ui.sectionStateTone", "ui.heroContentWrapperClass", "ui.heroCtaJustify", "ui.heroStackJustifyFromVerticalAlignment", "ui.heroGridClassFromVerticalAlignment", "ui.conditionalClass", "ui.twoColumnContainerClass", "ui.twoColumnFlexBasis", "ui.imageGalleryFilterClass", "ui.imageGalleryTileClass", "ui.imageGalleryTileStyle", "ui.imageGalleryMarqueeTileStyle", "ui.imageGalleryMarqueeDuration", "ui.imageGalleryMarqueeDirection", "ui.imageFragmentClass", "ui.imageFragmentSize", "media.fromUrl", "background.resolveStyle", "background.resolveColorsStyle", "background.resolveAllowOverflow", "background.resolveImageStyle", "background.resolveImageClassName", "background.resolveOverlayStyle", "links.resolve", "links.label", "content.interpolateRichTextTokens", "boxStyles.spacing", "boxStyles.resolveRootClass", "boxStyles.resolveRootStyle", "boxStyles.semanticGap", "boxStyles.semanticGapValue", "containerStyles.resolveBoxClassName"];
|
|
24
24
|
export type AllowedTransformId = (typeof ALLOWED_TRANSFORM_IDS)[number];
|
|
25
25
|
/**
|
|
26
26
|
* Set for O(1) lookup of allowed node types.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Uses the Block API Client for type-safe API calls.
|
|
5
5
|
* Must be used within a BlockApiProvider.
|
|
6
6
|
*/
|
|
7
|
-
import { type TimeSlot } from
|
|
7
|
+
import { type TimeSlot } from "../api";
|
|
8
8
|
export type { TimeSlot };
|
|
9
9
|
type UseAvailableSlotsOptions = {
|
|
10
10
|
siteId: string;
|
|
@@ -16,6 +16,8 @@ type UseAvailableSlotsOptions = {
|
|
|
16
16
|
type UseAvailableSlotsResult = {
|
|
17
17
|
slots: TimeSlot[];
|
|
18
18
|
isLoading: boolean;
|
|
19
|
+
isRefreshing: boolean;
|
|
20
|
+
hasLoaded: boolean;
|
|
19
21
|
error: string | null;
|
|
20
22
|
};
|
|
21
23
|
/**
|