@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.
Files changed (126) hide show
  1. package/README.md +21 -11
  2. package/dist/_dts/api/src/aiPlayground.d.ts +75 -20
  3. package/dist/_dts/api/src/apiEndpointTypes.d.ts +12 -0
  4. package/dist/_dts/api/src/billing.d.ts +7 -40
  5. package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +4 -1
  6. package/dist/_dts/api/src/bookingOperations.d.ts +33 -2
  7. package/dist/_dts/api/src/endpoints.d.ts +32 -0
  8. package/dist/_dts/api/src/public/types.d.ts +1 -1
  9. package/dist/_dts/api/src/sdkConfig/contracts.d.ts +0 -40
  10. package/dist/_dts/api/src/sdkContracts.d.ts +1 -1
  11. package/dist/_dts/api/src/siteMembers.d.ts +1 -1
  12. package/dist/_dts/api/src/siteOperations.d.ts +1 -1
  13. package/dist/_dts/billing/src/components/index.d.ts +426 -0
  14. package/dist/_dts/billing/src/plans/types.d.ts +1 -1
  15. package/dist/_dts/blocks/src/PageRenderer.d.ts +4 -0
  16. package/dist/_dts/blocks/src/bindings/index.d.ts +1 -1
  17. package/dist/_dts/blocks/src/client.d.ts +6 -0
  18. package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
  19. package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableDates.d.ts +1 -0
  20. package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableSlots.d.ts +3 -1
  21. package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.d.ts +140 -0
  22. package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.state.d.ts +2 -0
  23. package/dist/_dts/blocks/src/system/runtime/hooks/useVisibleTabPolling.d.ts +10 -0
  24. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.default-ui.d.ts +8 -0
  25. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +484 -0
  26. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +5 -2
  27. package/dist/_dts/blocks/src/system/transforms/registry/formatting.d.ts +1 -0
  28. package/dist/_dts/blocks/src/system/transforms/typed.d.ts +2 -1
  29. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +81 -0
  30. package/dist/_dts/preview-next/src/client/blocks/pageDesignRuntimePreview.d.ts +7 -3
  31. package/dist/_dts/preview-next/src/client/blocks/previewProjection/runtimeContentDecoration.d.ts +2 -2
  32. package/dist/_dts/sdk/src/bookings/index.d.ts +5 -2
  33. package/dist/_dts/sdk/src/bookings/types.d.ts +2 -0
  34. package/dist/_dts/sdk/src/cli/commands/push/execute/footer.d.ts +33 -0
  35. package/dist/_dts/sdk/src/cli/commands/push/scopes/commandBackedDatedOfferingScope.d.ts +32 -0
  36. package/dist/_dts/sdk/src/cli/commands/push/scopes/types.d.ts +5 -1
  37. package/dist/_dts/sdk/src/cli/commands/push-execute.d.ts +2 -1
  38. package/dist/_dts/sdk/src/cli/env.d.ts +2 -1
  39. package/dist/_dts/sdk/src/cli/merge-remote/entryMergePush.d.ts +2 -1
  40. package/dist/_dts/sdk/src/cli/site-commands/commandKeys.d.ts +13 -0
  41. package/dist/_dts/sdk/src/cli/site-commands/commandRuntime.d.ts +144 -0
  42. package/dist/_dts/sdk/src/cli/site-commands/commandRuntimeCompat.d.ts +21 -0
  43. package/dist/_dts/sdk/src/cli/site-commands/commandSurfaceDispatch.d.ts +27 -0
  44. package/dist/_dts/sdk/src/cli/site-commands/datedOfferingCommands.d.ts +56 -0
  45. package/dist/_dts/sdk/src/cli/site-commands/entryCommands.d.ts +29 -49
  46. package/dist/_dts/sdk/src/cli/site-commands/footerCommands.d.ts +56 -0
  47. package/dist/_dts/sdk/src/cli/site-commands/formCommands.d.ts +53 -0
  48. package/dist/_dts/sdk/src/cli/site-commands/index.d.ts +6 -0
  49. package/dist/_dts/sdk/src/cli/site-commands/navigationCommands.d.ts +53 -0
  50. package/dist/_dts/sdk/src/cli/site-commands/pageCommands.d.ts +79 -0
  51. package/dist/_dts/sdk/src/cli/site-commands/pushExecution.d.ts +19 -20
  52. package/dist/_dts/sdk/src/cli/site-commands/pushExecutionPlan.d.ts +8 -0
  53. package/dist/_dts/sdk/src/cli/site-commands/pushExecutionTypes.d.ts +97 -0
  54. package/dist/_dts/sdk/src/cli/site-commands/residualSettingsTrimming.d.ts +15 -0
  55. package/dist/_dts/sdk/src/cli/sync/executor.d.ts +10 -28
  56. package/dist/_dts/sdk/src/cli/sync/index.d.ts +2 -1
  57. package/dist/_dts/sdk/src/cli/sync/syncResultAggregation.d.ts +4 -0
  58. package/dist/_dts/sdk/src/config/dashboard-validation.d.ts +0 -48
  59. package/dist/_dts/sdk/src/config/types.d.ts +1 -1
  60. package/dist/_dts/sdk/src/rendering/overrides.d.ts +2 -0
  61. package/dist/_dts/sdk/src/theme-bridge/ThemeBridgeProvider.d.ts +4 -4
  62. package/dist/_dts/sdk/src/theme-bridge/generateCssVars.d.ts +4 -12
  63. package/dist/_dts/sdk/src/theme-bridge/index.d.ts +1 -1
  64. package/dist/_dts/sdk/src/theme-bridge/types.d.ts +17 -9
  65. package/dist/_dts/sdk/src/version.d.ts +1 -1
  66. package/dist/_dts/site-commands/src/adapter.d.ts +2 -2
  67. package/dist/_dts/site-commands/src/commands.d.ts +637 -13
  68. package/dist/_dts/site-commands/src/domain.d.ts +3 -3
  69. package/dist/_dts/site-commands/src/exposure.d.ts +41 -0
  70. package/dist/_dts/site-commands/src/index.d.ts +2 -0
  71. package/dist/_dts/site-commands/src/metadata.d.ts +159 -3
  72. package/dist/_dts/site-commands/src/planner.d.ts +13 -6
  73. package/dist/_dts/site-commands/src/refContributions.d.ts +1 -0
  74. package/dist/_dts/site-commands/src/refs.d.ts +19 -1
  75. package/dist/_dts/{sdk/src/cli/merge-remote → site-commands/src}/stableJson.d.ts +2 -0
  76. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  77. package/dist/_dts/theme-core/src/index.d.ts +1 -1
  78. package/dist/_dts/theme-core/src/palette/utils/index.d.ts +1 -0
  79. package/dist/_dts/theme-core/src/palette/utils/onColor.d.ts +2 -0
  80. package/dist/_dts/theme-core/src/runtime/buildThemeRuntimeFromBridge.d.ts +30 -23
  81. package/dist/_dts/theme-core/src/site-styles/accessibleSurfaces.d.ts +83 -0
  82. package/dist/_dts/theme-core/src/site-styles/contentTemplateRuntimeCompiler.d.ts +2 -1
  83. package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +89 -12
  84. package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +8 -2
  85. package/dist/_dts/theme-core/src/site-styles/index.d.ts +1 -0
  86. package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +3 -2
  87. package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +9 -6
  88. package/dist/_dts/ui/src/callout.d.ts +1 -1
  89. package/dist/cli/index.mjs +4736 -2026
  90. package/dist/client/bookings.mjs +5107 -3348
  91. package/dist/client/client.mjs +4579 -3871
  92. package/dist/client/hooks.mjs +325 -123
  93. package/dist/client/rendering/client.mjs +4474 -3869
  94. package/dist/client/rendering/islands.mjs +4234 -3639
  95. package/dist/client/rendering.mjs +4508 -3798
  96. package/dist/preview-next/before-render.mjs +75 -13
  97. package/dist/preview-next/client/runtime.mjs +3700 -2644
  98. package/dist/preview-next/middleware.mjs +75 -13
  99. package/dist/server/components.mjs +698 -383
  100. package/dist/server/config-validation.mjs +327 -125
  101. package/dist/server/config.mjs +327 -125
  102. package/dist/server/data.mjs +325 -123
  103. package/dist/server/index.mjs +92 -16
  104. package/dist/server/next.mjs +692 -377
  105. package/dist/server/page-converter.mjs +159 -41
  106. package/dist/server/prebuild.mjs +1 -1
  107. package/dist/server/rendering/server.mjs +700 -383
  108. package/dist/server/rendering.mjs +700 -383
  109. package/dist/server/routing.mjs +406 -131
  110. package/dist/server/server.mjs +326 -124
  111. package/dist/server/theme-bridge.mjs +1226 -4697
  112. package/dist/styles/index.css +38 -38
  113. package/package.json +1 -1
  114. package/dist/_dts/blocks/src/system/runtime/components/booking/DateTimeSelectionStep.d.ts +0 -18
  115. package/dist/_dts/blocks/src/system/runtime/components/booking/PaymentOptionSelectionStep.d.ts +0 -9
  116. package/dist/_dts/blocks/src/system/runtime/components/booking/ServiceResourceSelector.d.ts +0 -44
  117. package/dist/_dts/blocks/src/system/runtime/components/booking/ServiceResourceSelector.state.d.ts +0 -23
  118. package/dist/_dts/blocks/src/system/runtime/components/booking/ServiceSelectionStep.d.ts +0 -18
  119. package/dist/_dts/blocks/src/system/runtime/components/booking/slotDisplay.d.ts +0 -2
  120. package/dist/_dts/blocks/src/system/runtime/components/multi-step/MultiStepForm.d.ts +0 -21
  121. package/dist/_dts/blocks/src/system/runtime/components/multi-step/useMultiStep.d.ts +0 -15
  122. package/dist/_dts/blocks/src/system/runtime/components/multi-step/useMultiStep.state.d.ts +0 -51
  123. package/dist/_dts/blocks/src/system/runtime/hooks/useBookingSteps.d.ts +0 -22
  124. package/dist/_dts/path-utils/src/index.d.ts +0 -8
  125. package/dist/_dts/path-utils/src/redirectPaths.d.ts +0 -26
  126. package/dist/_dts/path-utils/src/safeAppPath.d.ts +0 -26
@@ -2,13 +2,13 @@ import type { Brand } from '@riverbankcms/core';
2
2
  import type { SiteCommandCapabilityGapCode } from './capabilityGaps';
3
3
  import type { SiteCommandType } from './commands';
4
4
  import type { SiteCommandRef } from './refs';
5
- export declare const commandScopes: readonly ["site", "style", "media", "page", "block", "navigation", "content", "staff", "venue", "event", "ticket", "course", "pass", "membership", "customer", "customer_pass", "customer_membership", "appointment", "course_enrollment", "event_registration", "pass_redemption", "booking_settings", "appointment_service", "appointment_resource", "appointment_availability", "publish"];
5
+ export declare const commandScopes: readonly ["site", "style", "media", "page", "block", "navigation", "form", "footer", "content", "staff", "venue", "event_category", "event", "ticket", "course", "pass", "membership", "customer", "customer_pass", "customer_membership", "appointment", "course_enrollment", "event_registration", "pass_redemption", "order", "booking_settings", "appointment_service", "appointment_resource", "appointment_availability", "publish"];
6
6
  export type CommandScope = (typeof commandScopes)[number];
7
7
  export declare const commandRisks: readonly ["low", "medium", "high", "restricted"];
8
8
  export type CommandRisk = (typeof commandRisks)[number];
9
- export declare const writeSemantics: readonly ["upsert", "append", "replace", "status_transition"];
9
+ export declare const writeSemantics: readonly ["upsert", "append", "replace", "delete", "order_transition", "status_transition"];
10
10
  export type WriteSemantics = (typeof writeSemantics)[number];
11
- export declare const lifecycleIntents: readonly ["mutation", "publish", "seed"];
11
+ export declare const lifecycleIntents: readonly ["mutation", "publish", "unpublish", "seed"];
12
12
  export type LifecycleIntent = (typeof lifecycleIntents)[number];
13
13
  export declare const idempotencyStrategies: readonly ["natural_key", "recipe_ref", "existing_id", "none"];
14
14
  export type IdempotencyStrategy = (typeof idempotencyStrategies)[number];
@@ -0,0 +1,41 @@
1
+ import type { SiteCommandBatch, SiteCommandType } from './commands';
2
+ import type { AllowedRuntime, CommandRisk, IntendedExposure, SiteCommandCapabilityGap, SiteCommandMetadata } from './domain';
3
+ import type { SiteCommandRef } from './refs';
4
+ export type SiteCommandExposureTarget = Readonly<{
5
+ type: SiteCommandType;
6
+ ref?: SiteCommandRef | string;
7
+ }>;
8
+ export type SiteCommandExposurePolicy = Readonly<{
9
+ exposure: IntendedExposure;
10
+ runtime: AllowedRuntime;
11
+ allowedRisks: readonly CommandRisk[];
12
+ capabilityGaps?: readonly SiteCommandCapabilityGap[];
13
+ }>;
14
+ export type SiteCommandExposureAllowed = Readonly<{
15
+ kind: 'allowed';
16
+ commandType: SiteCommandType;
17
+ commandRef: SiteCommandRef | string | null;
18
+ metadata: SiteCommandMetadata;
19
+ }>;
20
+ export type SiteCommandExposureRejection = Readonly<{
21
+ kind: 'rejected';
22
+ code: 'unsupported_command' | 'exposure_not_allowed' | 'runtime_not_allowed' | 'risk_not_allowed' | 'capability_gap';
23
+ commandType: SiteCommandType;
24
+ commandRef: SiteCommandRef | string | null;
25
+ message: string;
26
+ }>;
27
+ export type SiteCommandExposureDecision = SiteCommandExposureAllowed | SiteCommandExposureRejection;
28
+ export type SiteCommandBatchExposureAllowed = Readonly<{
29
+ kind: 'allowed';
30
+ commands: readonly SiteCommandExposureAllowed[];
31
+ }>;
32
+ export type SiteCommandBatchExposureRejection = Readonly<{
33
+ kind: 'rejected_batch';
34
+ code: 'empty_batch';
35
+ commandType: null;
36
+ commandRef: null;
37
+ message: string;
38
+ }>;
39
+ export type SiteCommandBatchExposureDecision = SiteCommandBatchExposureAllowed | SiteCommandExposureRejection | SiteCommandBatchExposureRejection;
40
+ export declare function evaluateSiteCommandExposure(command: SiteCommandExposureTarget, policy: SiteCommandExposurePolicy): SiteCommandExposureDecision;
41
+ export declare function evaluateSiteCommandBatchExposure(batch: SiteCommandBatch, policy: SiteCommandExposurePolicy): SiteCommandBatchExposureDecision;
@@ -2,8 +2,10 @@ export * from './adapter';
2
2
  export * from './capabilityGaps';
3
3
  export * from './commands';
4
4
  export * from './domain';
5
+ export * from './exposure';
5
6
  export * from './metadata';
6
7
  export * from './planner';
7
8
  export * from './refContributions';
8
9
  export * from './refs';
10
+ export * from './stableJson';
9
11
  export * from './staticExecutionGaps';
@@ -37,7 +37,7 @@ export declare const siteCommandMetadata: {
37
37
  readonly conflictPolicy: "update_existing";
38
38
  readonly previewability: "static_preview";
39
39
  readonly allowedRuntimes: readonly ["development", "staging", "demo", "production"];
40
- readonly intendedExposure: readonly ["recipe", "sdk_cli", "onboarding_planner", "ai_proposal", "internal_apply"];
40
+ readonly intendedExposure: readonly ["recipe", "sdk_cli", "onboarding_planner", "internal_apply"];
41
41
  readonly capability: "theme.write";
42
42
  readonly support: "supported";
43
43
  };
@@ -69,7 +69,7 @@ export declare const siteCommandMetadata: {
69
69
  };
70
70
  readonly upsertBlockTree: {
71
71
  readonly scope: "block";
72
- readonly risk: "low";
72
+ readonly risk: "high";
73
73
  readonly writeSemantics: "replace";
74
74
  readonly lifecycleIntent: "mutation";
75
75
  readonly idempotencyStrategy: "recipe_ref";
@@ -80,6 +80,45 @@ export declare const siteCommandMetadata: {
80
80
  readonly capability: "pages.blocks.write";
81
81
  readonly support: "supported";
82
82
  };
83
+ readonly upsertPageBlock: {
84
+ readonly scope: "block";
85
+ readonly risk: "low";
86
+ readonly writeSemantics: "upsert";
87
+ readonly lifecycleIntent: "mutation";
88
+ readonly idempotencyStrategy: "recipe_ref";
89
+ readonly conflictPolicy: "update_existing";
90
+ readonly previewability: "static_preview";
91
+ readonly allowedRuntimes: readonly ["development", "staging", "demo", "production"];
92
+ readonly intendedExposure: readonly ["recipe", "sdk_cli", "onboarding_planner", "ai_proposal", "internal_apply"];
93
+ readonly capability: "pages.blocks.write";
94
+ readonly support: "supported";
95
+ };
96
+ readonly deletePageBlock: {
97
+ readonly scope: "block";
98
+ readonly risk: "medium";
99
+ readonly writeSemantics: "delete";
100
+ readonly lifecycleIntent: "mutation";
101
+ readonly idempotencyStrategy: "existing_id";
102
+ readonly conflictPolicy: "update_existing";
103
+ readonly previewability: "effect_required";
104
+ readonly allowedRuntimes: readonly ["development", "staging", "demo", "production"];
105
+ readonly intendedExposure: readonly ["sdk_cli", "internal_apply"];
106
+ readonly capability: "pages.blocks.delete";
107
+ readonly support: "supported";
108
+ };
109
+ readonly reorderPageBlocks: {
110
+ readonly scope: "block";
111
+ readonly risk: "medium";
112
+ readonly writeSemantics: "order_transition";
113
+ readonly lifecycleIntent: "mutation";
114
+ readonly idempotencyStrategy: "recipe_ref";
115
+ readonly conflictPolicy: "update_existing";
116
+ readonly previewability: "static_preview";
117
+ readonly allowedRuntimes: readonly ["development", "staging", "demo", "production"];
118
+ readonly intendedExposure: readonly ["recipe", "sdk_cli", "onboarding_planner", "ai_proposal", "internal_apply"];
119
+ readonly capability: "pages.blocks.reorder";
120
+ readonly support: "supported";
121
+ };
83
122
  readonly upsertNavigationMenu: {
84
123
  readonly scope: "navigation";
85
124
  readonly risk: "low";
@@ -93,6 +132,32 @@ export declare const siteCommandMetadata: {
93
132
  readonly capability: "navigation.write";
94
133
  readonly support: "supported";
95
134
  };
135
+ readonly upsertForm: {
136
+ readonly scope: "form";
137
+ readonly risk: "low";
138
+ readonly writeSemantics: "upsert";
139
+ readonly lifecycleIntent: "mutation";
140
+ readonly idempotencyStrategy: "natural_key";
141
+ readonly conflictPolicy: "update_existing";
142
+ readonly previewability: "static_preview";
143
+ readonly allowedRuntimes: readonly ["development", "staging", "demo", "production"];
144
+ readonly intendedExposure: readonly ["sdk_cli", "internal_apply"];
145
+ readonly capability: "forms.write";
146
+ readonly support: "supported";
147
+ };
148
+ readonly upsertFooterContent: {
149
+ readonly scope: "footer";
150
+ readonly risk: "low";
151
+ readonly writeSemantics: "upsert";
152
+ readonly lifecycleIntent: "mutation";
153
+ readonly idempotencyStrategy: "existing_id";
154
+ readonly conflictPolicy: "update_existing";
155
+ readonly previewability: "static_preview";
156
+ readonly allowedRuntimes: readonly ["development", "staging", "demo", "production"];
157
+ readonly intendedExposure: readonly ["sdk_cli", "internal_apply"];
158
+ readonly capability: "footer.write";
159
+ readonly support: "supported";
160
+ };
96
161
  readonly upsertContentEntry: {
97
162
  readonly scope: "content";
98
163
  readonly risk: "low";
@@ -119,6 +184,19 @@ export declare const siteCommandMetadata: {
119
184
  readonly capability: "pages.publish";
120
185
  readonly support: "supported";
121
186
  };
187
+ readonly unpublishPage: {
188
+ readonly scope: "publish";
189
+ readonly risk: "medium";
190
+ readonly writeSemantics: "status_transition";
191
+ readonly lifecycleIntent: "unpublish";
192
+ readonly idempotencyStrategy: "existing_id";
193
+ readonly conflictPolicy: "update_existing";
194
+ readonly previewability: "effect_required";
195
+ readonly allowedRuntimes: readonly ["development", "staging", "demo", "production"];
196
+ readonly intendedExposure: readonly ["sdk_cli", "internal_apply"];
197
+ readonly capability: "pages.unpublish";
198
+ readonly support: "supported";
199
+ };
122
200
  readonly publishContentEntry: {
123
201
  readonly scope: "publish";
124
202
  readonly risk: "medium";
@@ -136,7 +214,7 @@ export declare const siteCommandMetadata: {
136
214
  readonly scope: "publish";
137
215
  readonly risk: "medium";
138
216
  readonly writeSemantics: "status_transition";
139
- readonly lifecycleIntent: "publish";
217
+ readonly lifecycleIntent: "unpublish";
140
218
  readonly idempotencyStrategy: "existing_id";
141
219
  readonly conflictPolicy: "update_existing";
142
220
  readonly previewability: "effect_required";
@@ -197,6 +275,45 @@ export declare const siteCommandMetadata: {
197
275
  readonly capability: "bookings.venues.write";
198
276
  readonly support: "supported";
199
277
  };
278
+ readonly deleteVenue: {
279
+ readonly scope: "venue";
280
+ readonly risk: "medium";
281
+ readonly writeSemantics: "delete";
282
+ readonly lifecycleIntent: "mutation";
283
+ readonly idempotencyStrategy: "existing_id";
284
+ readonly conflictPolicy: "update_existing";
285
+ readonly previewability: "effect_required";
286
+ readonly allowedRuntimes: readonly ["development", "staging", "demo", "production"];
287
+ readonly intendedExposure: readonly ["sdk_cli", "internal_apply"];
288
+ readonly capability: "bookings.venues.delete";
289
+ readonly support: "supported";
290
+ };
291
+ readonly upsertEventCategory: {
292
+ readonly scope: "event_category";
293
+ readonly risk: "medium";
294
+ readonly writeSemantics: "upsert";
295
+ readonly lifecycleIntent: "mutation";
296
+ readonly idempotencyStrategy: "recipe_ref";
297
+ readonly conflictPolicy: "update_existing";
298
+ readonly previewability: "dry_run_only";
299
+ readonly allowedRuntimes: readonly ["development", "staging", "demo", "production"];
300
+ readonly intendedExposure: readonly ["sdk_cli", "internal_apply"];
301
+ readonly capability: "bookings.event_categories.write";
302
+ readonly support: "supported";
303
+ };
304
+ readonly deleteEventCategory: {
305
+ readonly scope: "event_category";
306
+ readonly risk: "medium";
307
+ readonly writeSemantics: "delete";
308
+ readonly lifecycleIntent: "mutation";
309
+ readonly idempotencyStrategy: "existing_id";
310
+ readonly conflictPolicy: "update_existing";
311
+ readonly previewability: "effect_required";
312
+ readonly allowedRuntimes: readonly ["development", "staging", "demo", "production"];
313
+ readonly intendedExposure: readonly ["sdk_cli", "internal_apply"];
314
+ readonly capability: "bookings.event_categories.delete";
315
+ readonly support: "supported";
316
+ };
200
317
  readonly upsertEventSeries: {
201
318
  readonly scope: "event";
202
319
  readonly risk: "medium";
@@ -210,6 +327,19 @@ export declare const siteCommandMetadata: {
210
327
  readonly capability: "bookings.events.write";
211
328
  readonly support: "supported";
212
329
  };
330
+ readonly deleteEventSeries: {
331
+ readonly scope: "event";
332
+ readonly risk: "medium";
333
+ readonly writeSemantics: "delete";
334
+ readonly lifecycleIntent: "mutation";
335
+ readonly idempotencyStrategy: "existing_id";
336
+ readonly conflictPolicy: "update_existing";
337
+ readonly previewability: "effect_required";
338
+ readonly allowedRuntimes: readonly ["development", "staging", "demo", "production"];
339
+ readonly intendedExposure: readonly ["sdk_cli", "internal_apply"];
340
+ readonly capability: "bookings.events.delete";
341
+ readonly support: "supported";
342
+ };
213
343
  readonly upsertEventTicketType: {
214
344
  readonly scope: "ticket";
215
345
  readonly risk: "medium";
@@ -236,6 +366,19 @@ export declare const siteCommandMetadata: {
236
366
  readonly capability: "bookings.courses.write";
237
367
  readonly support: "supported";
238
368
  };
369
+ readonly deleteCourse: {
370
+ readonly scope: "course";
371
+ readonly risk: "medium";
372
+ readonly writeSemantics: "delete";
373
+ readonly lifecycleIntent: "mutation";
374
+ readonly idempotencyStrategy: "existing_id";
375
+ readonly conflictPolicy: "update_existing";
376
+ readonly previewability: "effect_required";
377
+ readonly allowedRuntimes: readonly ["development", "staging", "demo", "production"];
378
+ readonly intendedExposure: readonly ["sdk_cli", "internal_apply"];
379
+ readonly capability: "bookings.courses.delete";
380
+ readonly support: "supported";
381
+ };
239
382
  readonly upsertBookingPassProduct: {
240
383
  readonly scope: "pass";
241
384
  readonly risk: "medium";
@@ -353,6 +496,19 @@ export declare const siteCommandMetadata: {
353
496
  readonly capability: "bookings.pass_redemptions.write";
354
497
  readonly support: "supported";
355
498
  };
499
+ readonly seedPortalOrder: {
500
+ readonly scope: "order";
501
+ readonly risk: "medium";
502
+ readonly writeSemantics: "append";
503
+ readonly lifecycleIntent: "seed";
504
+ readonly idempotencyStrategy: "natural_key";
505
+ readonly conflictPolicy: "append_once";
506
+ readonly previewability: "dry_run_only";
507
+ readonly allowedRuntimes: readonly ["development", "staging", "demo", "production"];
508
+ readonly intendedExposure: readonly ["recipe", "onboarding_planner", "internal_apply"];
509
+ readonly capability: "commerce.orders.write";
510
+ readonly support: "supported";
511
+ };
356
512
  readonly upsertAppointmentService: {
357
513
  readonly scope: "appointment_service";
358
514
  readonly risk: "medium";
@@ -2,17 +2,17 @@ import { type Result } from '@riverbankcms/core';
2
2
  import { type SiteCommand, type SiteCommandBatch, type SiteCommandOf, type SiteCommandType } from './commands';
3
3
  import { type CommandRisk, type LifecycleIntent, type SiteCommandCapabilityGap, type SiteCommandIdempotencyKey, type SiteCommandMetadata, type SiteCommandValidationError } from './domain';
4
4
  import { type ResourceRef } from './refs';
5
- export type PlannedSiteCommandFor<TType extends SiteCommandType> = Readonly<{
6
- command: SiteCommandOf<TType>;
5
+ type PlannedSiteCommandCommon = Readonly<{
7
6
  metadata: SiteCommandMetadata;
8
7
  lifecycleIntent: LifecycleIntent;
9
8
  provides: readonly ResourceRef[];
10
9
  requires: readonly ResourceRef[];
11
10
  idempotencyKey: SiteCommandIdempotencyKey;
12
11
  }>;
13
- export type PlannedSiteCommand = {
14
- [TType in SiteCommandType]: PlannedSiteCommandFor<TType>;
15
- }[SiteCommandType];
12
+ export type PlannedSiteCommandFor<TType extends SiteCommandType> = PlannedSiteCommandCommon & Readonly<{
13
+ command: SiteCommandOf<TType>;
14
+ }>;
15
+ export type PlannedSiteCommand = PlannedSiteCommandFor<SiteCommandType>;
16
16
  export type SiteCommandPlan = Readonly<{
17
17
  batch: SiteCommandBatch;
18
18
  commands: readonly PlannedSiteCommand[];
@@ -24,8 +24,13 @@ export type PlannedSiteCommandOf<TType extends SiteCommandType> = {
24
24
  export type SiteCommandPlanFor<TType extends SiteCommandType> = Omit<SiteCommandPlan, 'commands'> & Readonly<{
25
25
  commands: readonly PlannedSiteCommandOf<TType>[];
26
26
  }>;
27
+ export type PlannedSiteCommandDispatcher<TResult> = <TType extends SiteCommandType>(plannedCommand: PlannedSiteCommandFor<TType>) => TResult;
28
+ export type SiteCommandMatcher<TResult> = <TType extends SiteCommandType>(command: SiteCommandOf<TType>) => TResult;
27
29
  export declare function parseCommandBatch(input: unknown): Result<SiteCommandBatch, readonly SiteCommandValidationError[]>;
28
30
  export declare function planCommandBatch(batch: SiteCommandBatch): Result<SiteCommandPlan, readonly SiteCommandValidationError[]>;
31
+ export declare function matchSiteCommand<TResult>(command: SiteCommand, match: SiteCommandMatcher<TResult>): TResult;
32
+ export declare function dispatchPlannedSiteCommand<TResult>(plannedCommand: PlannedSiteCommand, dispatch: PlannedSiteCommandDispatcher<TResult>): TResult;
33
+ export declare function matchPlannedSiteCommand<TResult>(plannedCommand: PlannedSiteCommand, match: PlannedSiteCommandDispatcher<TResult>): TResult;
29
34
  export declare function parseAndPlanCommandBatch(input: unknown): Result<SiteCommandPlan, readonly SiteCommandValidationError[]>;
30
35
  export declare function parseAndPlanCommandBatchForTypes<TType extends SiteCommandType>(input: unknown, allowedTypes: readonly TType[]): Result<SiteCommandPlanFor<TType>, readonly SiteCommandValidationError[]>;
31
36
  export declare function narrowSiteCommandPlan<TType extends SiteCommandType>(plan: SiteCommandPlan, allowedTypes: readonly TType[]): Result<SiteCommandPlanFor<TType>, readonly SiteCommandValidationError[]>;
@@ -39,6 +44,7 @@ export type DryRunReport = Readonly<{
39
44
  commandCount: number;
40
45
  mutationCount: number;
41
46
  publishCount: number;
47
+ unpublishCount: number;
42
48
  seedCount: number;
43
49
  riskSummary: Readonly<Record<CommandRisk, number>>;
44
50
  executionOrder: readonly Readonly<{
@@ -48,4 +54,5 @@ export type DryRunReport = Readonly<{
48
54
  resolvedRefs: readonly ResourceRef[];
49
55
  capabilityGaps: readonly SiteCommandCapabilityGap[];
50
56
  }>;
51
- export declare function createDryRunReport(plan: SiteCommandPlan): DryRunReport;
57
+ export declare function createDryRunReport<TType extends SiteCommandType>(plan: SiteCommandPlan | SiteCommandPlanFor<TType>): DryRunReport;
58
+ export {};
@@ -6,5 +6,6 @@ export type RefContribution = Readonly<{
6
6
  export type CommandRefContributions = Readonly<{
7
7
  provides: readonly RefContribution[];
8
8
  requires: readonly RefContribution[];
9
+ requiresIfProvided?: readonly RefContribution[];
9
10
  }>;
10
11
  export declare function commandRefContributions(command: SiteCommand): CommandRefContributions;
@@ -1,5 +1,5 @@
1
1
  import { type Brand, type Result } from '@riverbankcms/core';
2
- export declare const resourceKinds: readonly ["site-style", "media", "page", "block", "blocks", "nav", "content", "staff", "venue", "event", "course", "ticket", "pass", "membership", "customer", "customer-pass", "customer-membership", "appointment", "course-enrollment", "event-registration", "pass-redemption", "appointment-service", "appointment-resource", "availability"];
2
+ export declare const resourceKinds: readonly ["site-style", "media", "page", "block", "blocks", "nav", "form", "footer", "content", "staff", "venue", "event-category", "event", "course", "ticket", "pass", "membership", "customer", "customer-pass", "customer-membership", "appointment", "course-enrollment", "event-registration", "pass-redemption", "order", "appointment-service", "appointment-resource", "availability"];
3
3
  export type ResourceKind = (typeof resourceKinds)[number];
4
4
  export type CommandRef = Brand<`${string}:${string}`, 'SiteCommandRef:command'>;
5
5
  export type SiteStyleRef = Brand<`site-style:${string}`, 'SiteCommandResourceRef:site-style'>;
@@ -8,9 +8,12 @@ export type PageRef = Brand<`page:${string}`, 'SiteCommandResourceRef:page'>;
8
8
  export type BlockRef = Brand<`block:${string}`, 'SiteCommandResourceRef:block'>;
9
9
  export type BlocksRef = Brand<`blocks:${string}`, 'SiteCommandResourceRef:blocks'>;
10
10
  export type NavigationRef = Brand<`nav:${string}`, 'SiteCommandResourceRef:nav'>;
11
+ export type FormRef = Brand<`form:${string}`, 'SiteCommandResourceRef:form'>;
12
+ export type FooterRef = Brand<`footer:${string}`, 'SiteCommandResourceRef:footer'>;
11
13
  export type ContentEntryRef = Brand<`content:${string}`, 'SiteCommandResourceRef:content'>;
12
14
  export type StaffRef = Brand<`staff:${string}`, 'SiteCommandResourceRef:staff'>;
13
15
  export type VenueRef = Brand<`venue:${string}`, 'SiteCommandResourceRef:venue'>;
16
+ export type EventCategoryRef = Brand<`event-category:${string}`, 'SiteCommandResourceRef:event-category'>;
14
17
  export type EventSeriesRef = Brand<`event:${string}`, 'SiteCommandResourceRef:event'>;
15
18
  export type CourseRef = Brand<`course:${string}`, 'SiteCommandResourceRef:course'>;
16
19
  export type TicketTypeRef = Brand<`ticket:${string}`, 'SiteCommandResourceRef:ticket'>;
@@ -23,6 +26,7 @@ export type AppointmentBookingRef = Brand<`appointment:${string}`, 'SiteCommandR
23
26
  export type CourseEnrollmentRef = Brand<`course-enrollment:${string}`, 'SiteCommandResourceRef:course-enrollment'>;
24
27
  export type EventRegistrationRef = Brand<`event-registration:${string}`, 'SiteCommandResourceRef:event-registration'>;
25
28
  export type PassRedemptionRef = Brand<`pass-redemption:${string}`, 'SiteCommandResourceRef:pass-redemption'>;
29
+ export type OrderRef = Brand<`order:${string}`, 'SiteCommandResourceRef:order'>;
26
30
  export type AppointmentServiceRef = Brand<`appointment-service:${string}`, 'SiteCommandResourceRef:appointment-service'>;
27
31
  export type AppointmentResourceRef = Brand<`appointment-resource:${string}`, 'SiteCommandResourceRef:appointment-resource'>;
28
32
  export type AppointmentAvailabilityRef = Brand<`availability:${string}`, 'SiteCommandResourceRef:availability'>;
@@ -34,9 +38,12 @@ export type ResourceRefByKind = Readonly<{
34
38
  block: BlockRef;
35
39
  blocks: BlocksRef;
36
40
  nav: NavigationRef;
41
+ form: FormRef;
42
+ footer: FooterRef;
37
43
  content: ContentEntryRef;
38
44
  staff: StaffRef;
39
45
  venue: VenueRef;
46
+ 'event-category': EventCategoryRef;
40
47
  event: EventSeriesRef;
41
48
  course: CourseRef;
42
49
  ticket: TicketTypeRef;
@@ -49,6 +56,7 @@ export type ResourceRefByKind = Readonly<{
49
56
  'course-enrollment': CourseEnrollmentRef;
50
57
  'event-registration': EventRegistrationRef;
51
58
  'pass-redemption': PassRedemptionRef;
59
+ order: OrderRef;
52
60
  'appointment-service': AppointmentServiceRef;
53
61
  'appointment-resource': AppointmentResourceRef;
54
62
  availability: AppointmentAvailabilityRef;
@@ -68,6 +76,16 @@ export type RefParseError = Readonly<{
68
76
  export declare function isCommandRef(value: string): boolean;
69
77
  export declare function createCommandRef(prefix: string, parts: readonly string[]): CommandRef;
70
78
  export declare function createContentEntryRef(parts: readonly string[]): ContentEntryRef;
79
+ export declare function createPageRef(parts: readonly string[]): PageRef;
80
+ export declare function createBlockRef(parts: readonly string[]): BlockRef;
81
+ export declare function createBlocksRef(parts: readonly string[]): BlocksRef;
82
+ export declare function createNavigationRef(parts: readonly string[]): NavigationRef;
83
+ export declare function createFormRef(parts: readonly string[]): FormRef;
84
+ export declare function createFooterRef(parts: readonly string[]): FooterRef;
85
+ export declare function createVenueRef(parts: readonly string[]): VenueRef;
86
+ export declare function createEventCategoryRef(parts: readonly string[]): EventCategoryRef;
87
+ export declare function createEventSeriesRef(parts: readonly string[]): EventSeriesRef;
88
+ export declare function createCourseRef(parts: readonly string[]): CourseRef;
71
89
  export declare function createSiteCommandSiteRef(parts: readonly string[]): SiteCommandSiteRef;
72
90
  export declare function refSlug(ref: SiteCommandRef | string): string;
73
91
  export declare function parseResourceRef(value: string): Result<ResourceRef, RefParseError>;
@@ -1,3 +1,5 @@
1
1
  export declare function stableStringify(value: unknown): string;
2
+ export declare function stableJsonStringify(value: unknown): string;
3
+ export declare function stableSha1Hex(value: string): string;
2
4
  export declare function sortValue(value: unknown): unknown;
3
5
  export declare function sortRecord(record: Record<string, unknown>): Record<string, unknown>;