@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
@@ -84,6 +84,7 @@ export declare const transformDefinitions: {
84
84
  readonly "content.interpolateRichTextTokens": TransformDefinition<{
85
85
  tokens: ("year" | "site_name")[];
86
86
  }>;
87
+ readonly "value.csv": TransformDefinition;
87
88
  readonly "boxStyles.semanticGap": TransformDefinition<{
88
89
  fallback?: import("../spacing").SemanticSpacing;
89
90
  }>;
@@ -110,7 +111,7 @@ export declare function bindProp(from: string, opts?: {
110
111
  readonly $bind: {
111
112
  readonly pick?: "value" | "context" | "collection" | undefined;
112
113
  readonly fallback?: {} | null | undefined;
113
- readonly transforms?: TransformStep<"string.uppercase" | "value.fallback" | "date.formatShort" | "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" | "media.fromUrl" | "content.interpolateRichTextTokens" | "boxStyles.semanticGap" | "boxStyles.semanticGapValue" | "layout.footerBottomBarClass" | "layout.footerBottomBarContainerClass" | "layout.footerBottomBarStyle" | "layout.footerSplitNavSingleClass" | "layout.footerSplitMainClass" | "layout.footerLogoClass" | "layout.footerLogoMediaClass" | "layout.footerLogoTextVisible">[] | undefined;
114
+ readonly transforms?: TransformStep<"string.uppercase" | "value.fallback" | "date.formatShort" | "value.csv" | "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" | "media.fromUrl" | "content.interpolateRichTextTokens" | "boxStyles.semanticGap" | "boxStyles.semanticGapValue" | "layout.footerBottomBarClass" | "layout.footerBottomBarContainerClass" | "layout.footerBottomBarStyle" | "layout.footerSplitNavSingleClass" | "layout.footerSplitMainClass" | "layout.footerLogoClass" | "layout.footerLogoMediaClass" | "layout.footerLogoTextVisible">[] | undefined;
114
115
  readonly from: string;
115
116
  };
116
117
  };
@@ -5249,6 +5249,74 @@ export type Database = {
5249
5249
  };
5250
5250
  Relationships: [];
5251
5251
  };
5252
+ demo_media_uploads: {
5253
+ Row: {
5254
+ bytes: number;
5255
+ claim_id: string | null;
5256
+ created_at: string;
5257
+ id: string;
5258
+ instance_id: string;
5259
+ media_asset_id: string;
5260
+ site_id: string;
5261
+ source: string;
5262
+ updated_at: string;
5263
+ uploaded_by_user_id: string | null;
5264
+ };
5265
+ Insert: {
5266
+ bytes?: number;
5267
+ claim_id?: string | null;
5268
+ created_at?: string;
5269
+ id?: string;
5270
+ instance_id: string;
5271
+ media_asset_id: string;
5272
+ site_id: string;
5273
+ source?: string;
5274
+ updated_at?: string;
5275
+ uploaded_by_user_id?: string | null;
5276
+ };
5277
+ Update: {
5278
+ bytes?: number;
5279
+ claim_id?: string | null;
5280
+ created_at?: string;
5281
+ id?: string;
5282
+ instance_id?: string;
5283
+ media_asset_id?: string;
5284
+ site_id?: string;
5285
+ source?: string;
5286
+ updated_at?: string;
5287
+ uploaded_by_user_id?: string | null;
5288
+ };
5289
+ Relationships: [
5290
+ {
5291
+ foreignKeyName: "demo_media_uploads_claim_id_fkey";
5292
+ columns: ["claim_id"];
5293
+ isOneToOne: false;
5294
+ referencedRelation: "demo_claims";
5295
+ referencedColumns: ["id"];
5296
+ },
5297
+ {
5298
+ foreignKeyName: "demo_media_uploads_instance_id_fkey";
5299
+ columns: ["instance_id"];
5300
+ isOneToOne: false;
5301
+ referencedRelation: "demo_instances";
5302
+ referencedColumns: ["id"];
5303
+ },
5304
+ {
5305
+ foreignKeyName: "demo_media_uploads_media_asset_id_fkey";
5306
+ columns: ["media_asset_id"];
5307
+ isOneToOne: true;
5308
+ referencedRelation: "media_assets";
5309
+ referencedColumns: ["id"];
5310
+ },
5311
+ {
5312
+ foreignKeyName: "demo_media_uploads_site_id_fkey";
5313
+ columns: ["site_id"];
5314
+ isOneToOne: false;
5315
+ referencedRelation: "sites";
5316
+ referencedColumns: ["id"];
5317
+ }
5318
+ ];
5319
+ };
5252
5320
  digital_product_entitlement_grants: {
5253
5321
  Row: {
5254
5322
  created_at: string;
@@ -15401,6 +15469,19 @@ export type Database = {
15401
15469
  ticket_type_id: string;
15402
15470
  }[];
15403
15471
  };
15472
+ get_form_submission_stats: {
15473
+ Args: {
15474
+ p_form_ids: string[];
15475
+ p_recent_since: string;
15476
+ p_site_id: string;
15477
+ };
15478
+ Returns: {
15479
+ form_id: string;
15480
+ latest_submission_at: string;
15481
+ recent_count: number;
15482
+ total_count: number;
15483
+ }[];
15484
+ };
15404
15485
  get_public_event_attendee_counts: {
15405
15486
  Args: {
15406
15487
  instance_ids: string[];
@@ -1,5 +1,5 @@
1
1
  import type { BlockItem } from '@riverbankcms/editor-blocks';
2
- import type { PageDesignEditorReadModel } from '@riverbankcms/theme-core/site-styles/previewCompiler';
2
+ import type { PageDesignEditorReadModel, SurfaceResolutionContext } from '@riverbankcms/theme-core/site-styles/previewCompiler';
3
3
  import type { PreviewPageDesignEditorState } from '../preview/PageDesignEditorStateContext';
4
4
  import { type RuntimeContentDecorationProjection } from './previewProjection';
5
5
  export type RuntimePreviewSource = Readonly<{
@@ -7,9 +7,13 @@ export type RuntimePreviewSource = Readonly<{
7
7
  }> | Readonly<{
8
8
  kind: 'apply-editor-model';
9
9
  editorModel: PageDesignEditorReadModel;
10
+ surfaceResolutionContext: SurfaceResolutionContext;
10
11
  }>;
11
12
  export declare function applyPageDesignRuntimeFieldsToBlockItems(blockItems: readonly BlockItem[], source: RuntimePreviewSource): BlockItem[];
12
13
  export declare function applyPageDesignRuntimeFieldsToBlockContent(block: BlockItem, content: Record<string, unknown> | null, source: RuntimePreviewSource): Record<string, unknown> | null;
13
- export declare function buildPageDesignRuntimeFieldsByBlockId(editorModel: PageDesignEditorReadModel): RuntimeContentDecorationProjection['fieldsByBlockId'];
14
+ export declare function buildPageDesignRuntimeFieldsByBlockId(editorModel: PageDesignEditorReadModel, surfaceResolutionContext: SurfaceResolutionContext): RuntimeContentDecorationProjection['fieldsByBlockId'];
14
15
  export declare function pageDesignRuntimeProjectionFromSource(source: RuntimePreviewSource): RuntimeContentDecorationProjection | null;
15
- export declare function resolveRuntimePreviewSource(pageDesignState: PreviewPageDesignEditorState): RuntimePreviewSource;
16
+ export declare function resolveRuntimePreviewSource(input: Readonly<{
17
+ pageDesignState: PreviewPageDesignEditorState;
18
+ surfaceResolutionContext: SurfaceResolutionContext | null;
19
+ }>): RuntimePreviewSource;
@@ -1,5 +1,5 @@
1
1
  import type { BlockItem } from '@riverbankcms/editor-blocks';
2
- import { type PageDesignEditorReadModel } from '@riverbankcms/theme-core/site-styles/previewCompiler';
2
+ import { type PageDesignEditorReadModel, type SurfaceResolutionContext } from '@riverbankcms/theme-core/site-styles/previewCompiler';
3
3
  import type { CanonicalBlockContent, PreviewRenderContent, RuntimeContentDecorationProjection } from './types';
4
- export declare function runtimeContentDecorationProjectionFromEditorModel(editorModel: PageDesignEditorReadModel): RuntimeContentDecorationProjection;
4
+ export declare function runtimeContentDecorationProjectionFromEditorModel(editorModel: PageDesignEditorReadModel, surfaceResolutionContext: SurfaceResolutionContext): RuntimeContentDecorationProjection;
5
5
  export declare function applyRuntimeContentDecorationProjection(block: BlockItem, content: CanonicalBlockContent | PreviewRenderContent | null, projection: RuntimeContentDecorationProjection): PreviewRenderContent;
@@ -25,8 +25,11 @@
25
25
  * @packageDocumentation
26
26
  */
27
27
  import * as React from 'react';
28
- import type { BookingFormClientProps, UseBookingFormConfigResult } from './types';
28
+ import { HeadlessBookingAltchaWidget, createBookingBlockApiConfig, getAppointmentBookingOverrideInput, useHeadlessBookingFlow } from '@riverbankcms/blocks/client';
29
+ import type { BookingFormClientProps, HeadlessBookingProviderProps, UseBookingFormConfigResult } from './types';
29
30
  export declare const BookingFormClient: React.FC<BookingFormClientProps>;
30
31
  export declare function useBookingFormConfig(siteId: string, formId: string): UseBookingFormConfigResult;
32
+ export declare const HeadlessBookingProvider: React.FC<HeadlessBookingProviderProps>;
33
+ export { HeadlessBookingAltchaWidget, createBookingBlockApiConfig, getAppointmentBookingOverrideInput, useHeadlessBookingFlow, };
31
34
  export type { BookingService, BookingFormConfig } from './types';
32
- export type { Service, TimeSlot, BookingFormSettings, BookingFormSchema, BookingFormField, BookingFormData, BookingSubmissionData, BookingSubmissionResult, BookingFormClientProps, BookingFormClientForm, BookingFormClientService, UseBookingFormConfigResult, } from './types';
35
+ export type { Service, TimeSlot, BookingFormSettings, BookingFormSchema, BookingFormField, BookingFormData, BookingSubmissionData, BookingSubmissionResult, BookingFormClientProps, BookingFormClientForm, BookingFormClientService, HeadlessBookingFlow, HeadlessBookingFlowOptions, HeadlessBookingProviderProps, AppointmentBookingOverrideData, AppointmentBookingOverrideInput, AppointmentBookingOverrideInputResult, BookingAvailabilityQuery, BookingAppointmentPackagesModel, BookingAppointmentPackagesUnavailableReason, BookingPaymentOptionViewModel, BookingPaymentSelectionViewModel, BookingFieldValue, BookingFieldView, BookingFlowActionResult, BookingFlowFeedback, BookingFlowStatus, BookingResourceView, BookingResourcesModel, BookingFlowStep, BookingFlowStepId, BookingFlowView, BookingSlotView, BookingSubmitActionResult, BookingSubmitOptions, BookingValidationErrors, DerivedBookingFlowSteps, DeriveBookingFlowStepsInput, UseBookingFormConfigResult, } from './types';
@@ -4,6 +4,8 @@
4
4
  * These types are exported for SDK sites to use when building custom booking UIs.
5
5
  */
6
6
  import type { BookingFlexibleBalanceConfig, BookingInstalmentPlanConfig } from '@riverbankcms/core';
7
+ import type { AppointmentBookingOverrideData, AppointmentBookingOverrideInput, AppointmentBookingOverrideInputResult, BookingAvailabilityQuery, BookingAppointmentPackagesModel, BookingAppointmentPackagesUnavailableReason, BookingPaymentOptionViewModel, BookingPaymentSelectionViewModel, BookingFieldValue, BookingFieldView, BookingFlowActionResult, BookingFlowFeedback, BookingFlowStatus, BookingResourceView, BookingFlowStep, BookingFlowStepId, BookingFlowView, BookingResourcesModel, BookingSlotView, BookingSubmitActionResult, BookingSubmitOptions, BookingValidationErrors, DerivedBookingFlowSteps, DeriveBookingFlowStepsInput, HeadlessBookingFlow, HeadlessBookingFlowOptions, HeadlessBookingProviderProps } from '@riverbankcms/blocks/client';
8
+ export type { AppointmentBookingOverrideData, AppointmentBookingOverrideInput, AppointmentBookingOverrideInputResult, BookingAvailabilityQuery, BookingAppointmentPackagesModel, BookingAppointmentPackagesUnavailableReason, BookingPaymentOptionViewModel, BookingPaymentSelectionViewModel, BookingFieldValue, BookingFieldView, BookingFlowActionResult, BookingFlowFeedback, BookingFlowStatus, BookingResourceView, BookingFlowStep, BookingFlowStepId, BookingFlowView, BookingResourcesModel, BookingSlotView, BookingSubmitActionResult, BookingSubmitOptions, BookingValidationErrors, DerivedBookingFlowSteps, DeriveBookingFlowStepsInput, HeadlessBookingFlow, HeadlessBookingFlowOptions, HeadlessBookingProviderProps, };
7
9
  /**
8
10
  * A bookable service (e.g., "30-minute consultation", "Hair cut")
9
11
  *
@@ -0,0 +1,33 @@
1
+ import type { EnvTarget } from '../../../helpers';
2
+ import type { OutputContext } from '../../../output';
3
+ import { type FooterDiff } from '../../../sync/diff';
4
+ import type { PushOptions } from '../options';
5
+ export type FooterPushExecutionResult = Readonly<{
6
+ success: boolean;
7
+ }>;
8
+ type FooterPushDecision = Readonly<{
9
+ kind: 'unchanged';
10
+ }> | Readonly<{
11
+ kind: 'dry-run';
12
+ diff: FooterDiff;
13
+ }> | Readonly<{
14
+ kind: 'apply';
15
+ diff: FooterDiff;
16
+ }>;
17
+ export declare function footerPushDecision(diff: FooterDiff | null, dryRun: boolean): FooterPushDecision;
18
+ export declare function footerDryRunPayload(diff: FooterDiff): Readonly<{
19
+ kind: 'push';
20
+ scope: 'footer';
21
+ dryRun: true;
22
+ changes: readonly string[];
23
+ }>;
24
+ export declare function executeFooterPush(input: Readonly<{
25
+ output: OutputContext;
26
+ target: EnvTarget;
27
+ options: PushOptions & {
28
+ dryRun: boolean;
29
+ };
30
+ jsonOutput: boolean;
31
+ skipMeta: boolean;
32
+ }>): Promise<FooterPushExecutionResult>;
33
+ export {};
@@ -0,0 +1,32 @@
1
+ import type { SiteId } from '@riverbankcms/core';
2
+ import { type CliDatedOfferingCommandBatchSource, type CliDatedOfferingCommandCompileInput, type DatedOfferingReportSubject, type DatedOfferingUpsertItem } from '../../../site-commands';
3
+ import type { WriterOptions } from '../../../content/writer';
4
+ import type { PushScopeResult, ScopePushContext } from './types';
5
+ type CommandBackedDatedOfferingScopeConfig<TLocal, TRemote> = Readonly<{
6
+ source: CliDatedOfferingCommandBatchSource;
7
+ scopeName: string;
8
+ itemLabelSingular: string;
9
+ scopeCommand: DatedOfferingReportSubject['scopeCommand'];
10
+ getIdentifier: (item: TLocal) => string;
11
+ getDisplayLabel: (item: TLocal) => string;
12
+ shouldPushItem?: (item: TLocal) => boolean;
13
+ readLocal: (contentDir: string) => Promise<TLocal[]>;
14
+ readMeta: (contentDir: string) => Promise<Record<string, {
15
+ updatedAt?: string;
16
+ }> | null>;
17
+ fetchRemote: () => Promise<TRemote[]>;
18
+ getRemoteUpdatedAt: (remote: TRemote) => string;
19
+ findRemote: (remoteItems: readonly TRemote[], identifier: string) => TRemote | undefined;
20
+ getRemoteIdentifier: (remote: TRemote) => string;
21
+ updateLocalMeta: (contentDir: string, options?: WriterOptions) => Promise<void>;
22
+ readOnlyStatusWarning?: (item: TLocal) => string | null;
23
+ buildCompileInput: (input: Readonly<{
24
+ source: CliDatedOfferingCommandBatchSource;
25
+ siteId: SiteId;
26
+ targetEnv: ScopePushContext['targetEnv'];
27
+ upserts: readonly DatedOfferingUpsertItem<TLocal>[];
28
+ deletes: readonly string[];
29
+ }>) => CliDatedOfferingCommandCompileInput;
30
+ }>;
31
+ export declare function pushCommandBackedDatedOfferingScope<TLocal, TRemote>(ctx: ScopePushContext, config: CommandBackedDatedOfferingScopeConfig<TLocal, TRemote>): Promise<PushScopeResult>;
32
+ export {};
@@ -1,9 +1,13 @@
1
1
  import type { OutputContext } from '../../../output';
2
2
  import type { ManagementClient } from '../../../../client/management';
3
3
  import type { WriterOptions } from '../../../content/writer';
4
+ import type { SiteId } from '@riverbankcms/core';
5
+ import type { EnvTarget } from '../../../helpers';
4
6
  export interface ScopePushContext {
5
7
  output: OutputContext;
6
8
  contentDir: string;
9
+ siteId: SiteId;
10
+ targetEnv: EnvTarget;
7
11
  client: ManagementClient;
8
12
  dryRun: boolean;
9
13
  force: boolean;
@@ -14,7 +18,7 @@ export interface ScopePushContext {
14
18
  skipMeta: boolean;
15
19
  humanDiff: boolean;
16
20
  }
17
- export type PushScopeResultStatus = 'noop' | 'dry-run' | 'aborted' | 'pushed';
21
+ export type PushScopeResultStatus = 'noop' | 'dry-run' | 'aborted' | 'failed' | 'pushed';
18
22
  export interface PushScopeItemError {
19
23
  identifier: string;
20
24
  error: string;
@@ -2,12 +2,13 @@ import { type EnvTarget } from '../helpers';
2
2
  import type { OutputContext } from '../output';
3
3
  import { type JsonDiffMode } from '../sync';
4
4
  import type { PushOptions } from './push/options';
5
+ import { type PushScope } from './push/consts';
5
6
  export interface PushExecutionResult {
6
7
  success: boolean;
7
8
  }
8
9
  type MergeRemoteValidationInput = Readonly<{
9
10
  target: EnvTarget;
10
- pushScope: string;
11
+ pushScope: PushScope;
11
12
  contentType?: string;
12
13
  identifier?: string;
13
14
  force: boolean;
@@ -3,12 +3,13 @@
3
3
  *
4
4
  * Loads and validates environment variables for SDK CLI commands.
5
5
  */
6
+ import { type SiteId } from '@riverbankcms/core';
6
7
  /**
7
8
  * SDK environment configuration
8
9
  */
9
10
  export interface SdkEnvironment {
10
11
  /** Site ID to operate on */
11
- siteId: string;
12
+ siteId: SiteId;
12
13
  /** Dashboard URL (e.g., http://localhost:4000) */
13
14
  dashboardUrl: string;
14
15
  /** Management API key (bld_mgmt_sk_...) */
@@ -1,3 +1,4 @@
1
+ import { type SiteId } from '@riverbankcms/core';
1
2
  import type { ManagementClient } from '../../client/management/types';
2
3
  import type { LocalEntry } from '../content/reader';
3
4
  import type { EnvTarget } from '../helpers';
@@ -10,7 +11,7 @@ export declare function planAndReportRemoteEntryMerge(input: Readonly<{
10
11
  client: Pick<ManagementClient, 'entries' | 'pull'>;
11
12
  contentDir: string;
12
13
  target: EnvTarget;
13
- siteId: string;
14
+ siteId: SiteId;
14
15
  contentType?: string;
15
16
  identifier?: string;
16
17
  localEntries: ReadonlyMap<string, readonly LocalEntry[]>;
@@ -0,0 +1,13 @@
1
+ import type { Brand } from '@riverbankcms/core';
2
+ export type CliContentTypeKey = Brand<string, 'SdkCliContentTypeKey'>;
3
+ export type CliEntryIdentifier = Brand<string, 'SdkCliEntryIdentifier'>;
4
+ export type CliPageIdentifier = Brand<string, 'SdkCliPageIdentifier'>;
5
+ export type CliBlockIdentifier = Brand<string, 'SdkCliBlockIdentifier'>;
6
+ export type CliFormSlug = Brand<string, 'SdkCliFormSlug'>;
7
+ export type CliNavigationMenuName = Brand<string, 'SdkCliNavigationMenuName'>;
8
+ export declare const asCliContentTypeKey: (value: string) => CliContentTypeKey;
9
+ export declare const asCliEntryIdentifier: (value: string) => CliEntryIdentifier;
10
+ export declare const asCliPageIdentifier: (value: string) => CliPageIdentifier;
11
+ export declare const asCliBlockIdentifier: (value: string) => CliBlockIdentifier;
12
+ export declare const asCliFormSlug: (value: string) => CliFormSlug;
13
+ export declare const asCliNavigationMenuName: (value: string) => CliNavigationMenuName;
@@ -0,0 +1,144 @@
1
+ import { type Result, type SiteId } from '@riverbankcms/core';
2
+ import { type DryRunReport, type SiteCommandBatch, type SiteCommandExecutionSuccess, type SiteCommandOf, type SiteCommandPlanFor, type SiteCommandRef, type SiteCommandType, type SiteCommandValidationError } from '@riverbankcms/site-commands';
3
+ import type { EnvTarget } from '../helpers';
4
+ export type CliCommandBatchRefInput<TSource extends string = string> = Readonly<{
5
+ source: TSource;
6
+ siteId: SiteId;
7
+ targetEnv: EnvTarget;
8
+ }>;
9
+ export type CliCommandExecutionError<TCommandType extends SiteCommandType> = Readonly<{
10
+ code: 'management_api_failed';
11
+ commandRef: SiteCommandRef;
12
+ commandType: TCommandType;
13
+ message: string;
14
+ }>;
15
+ export type CliCommandExecutionResult<TCommandType extends SiteCommandType> = Readonly<{
16
+ status: 'applied';
17
+ applied: readonly SiteCommandExecutionSuccess[];
18
+ }> | Readonly<{
19
+ status: 'failed';
20
+ applied: readonly SiteCommandExecutionSuccess[];
21
+ failed: CliCommandExecutionError<TCommandType>;
22
+ }>;
23
+ export type PlannedCliCommand<TCommand extends Readonly<{
24
+ ref: SiteCommandRef;
25
+ type: SiteCommandType;
26
+ }>> = Readonly<{
27
+ command: TCommand;
28
+ }>;
29
+ export type CliCommandReportBinding<TCommand extends Readonly<{
30
+ ref: SiteCommandRef;
31
+ type: SiteCommandType;
32
+ }>, TSubject> = Readonly<{
33
+ command: TCommand;
34
+ reportSubject: TSubject;
35
+ }>;
36
+ export type CliCommandReportedPlannedCommand<TCommand extends Readonly<{
37
+ ref: SiteCommandRef;
38
+ type: SiteCommandType;
39
+ }>, TSubject> = Readonly<{
40
+ plannedCommand: PlannedCliCommand<TCommand>;
41
+ reportSubject: TSubject;
42
+ }>;
43
+ export type CliCommandExecutionReportFailure<TSubject> = Readonly<{
44
+ identifier: string;
45
+ message: string;
46
+ subject?: TSubject;
47
+ }>;
48
+ export type CliCommandOutcome<TSubject> = Readonly<{
49
+ status: 'applied';
50
+ commandRef: SiteCommandRef;
51
+ commandType: SiteCommandType;
52
+ subject: TSubject;
53
+ }> | Readonly<{
54
+ status: 'failed';
55
+ commandRef: SiteCommandRef;
56
+ commandType: SiteCommandType;
57
+ identifier: string;
58
+ message: string;
59
+ subject?: TSubject;
60
+ }> | Readonly<{
61
+ status: 'skipped_by_stop_policy';
62
+ commandRef: SiteCommandRef;
63
+ commandType: SiteCommandType;
64
+ identifier: string;
65
+ subject: TSubject;
66
+ }> | Readonly<{
67
+ status: 'compile_failed';
68
+ identifier: string;
69
+ message: string;
70
+ subject?: TSubject;
71
+ }>;
72
+ export type CliCommandExecutionReport<TSubject> = Readonly<{
73
+ outcomes: readonly CliCommandOutcome<TSubject>[];
74
+ appliedSubjects: readonly TSubject[];
75
+ failure: CliCommandExecutionReportFailure<TSubject> | null;
76
+ warnings: readonly string[];
77
+ }>;
78
+ export type CliCommandValidationCompileError = Readonly<{
79
+ code: 'command_validation_failed';
80
+ errors: readonly SiteCommandValidationError[];
81
+ message: string;
82
+ }>;
83
+ export type CliCommandCompileBatchSuccess<TCommandType extends SiteCommandType> = Readonly<{
84
+ batch: SiteCommandBatch;
85
+ plan: SiteCommandPlanFor<TCommandType>;
86
+ dryRunReport: DryRunReport;
87
+ }>;
88
+ export type CliCommandCompileBatchSuccessWithReports<TCommandType extends SiteCommandType, TSubject> = Readonly<{
89
+ reportedCommands: readonly CliCommandReportedPlannedCommand<SiteCommandOf<TCommandType>, TSubject>[];
90
+ }> & CliCommandCompileBatchSuccess<TCommandType>;
91
+ export declare function createCliCommandBatchRef(input: CliCommandBatchRefInput): string;
92
+ export declare function formatSiteCommandValidationErrors(errors: readonly {
93
+ message: string;
94
+ }[]): string;
95
+ export declare function formatManagementError(error: unknown): string;
96
+ export declare function planCliCommandBatchForTypes<TCommandType extends SiteCommandType>(input: CliCommandBatchRefInput & Readonly<{
97
+ commands: readonly SiteCommandOf<TCommandType>[];
98
+ commandTypes: readonly TCommandType[];
99
+ }>): Result<CliCommandCompileBatchSuccess<TCommandType>, CliCommandValidationCompileError>;
100
+ export declare function planCliCommandBatchForBindings<TCommandType extends SiteCommandType, TSubject>(input: CliCommandBatchRefInput & Readonly<{
101
+ commandBindings: readonly CliCommandReportBinding<SiteCommandOf<TCommandType>, TSubject>[];
102
+ commandTypes: readonly TCommandType[];
103
+ }>): Result<CliCommandCompileBatchSuccessWithReports<TCommandType, TSubject>, CliCommandValidationCompileError>;
104
+ export declare function executeCliCommandPlan<TCommand extends Readonly<{
105
+ ref: SiteCommandRef;
106
+ type: TCommandType;
107
+ }>, TCommandType extends SiteCommandType>(input: Readonly<{
108
+ commands: readonly PlannedCliCommand<TCommand>[];
109
+ applyCommand: (command: TCommand) => Promise<void>;
110
+ }>): Promise<CliCommandExecutionResult<TCommandType>>;
111
+ export declare function commandExecutionToReport<TCommand extends Readonly<{
112
+ ref: SiteCommandRef;
113
+ type: TCommandType;
114
+ }>, TCommandType extends SiteCommandType, TSubject>(input: Readonly<{
115
+ execution: CliCommandExecutionResult<TCommandType>;
116
+ reportedCommands: readonly CliCommandReportedPlannedCommand<TCommand, TSubject>[];
117
+ resourceLabel: string;
118
+ commandDisplayIdentifier: (command: TCommand) => string;
119
+ includeFailureSubject?: boolean;
120
+ }>): CliCommandExecutionReport<TSubject>;
121
+ export declare function commandCompileFailureToReport<TSubject>(input: Readonly<{
122
+ identifier: string;
123
+ message: string;
124
+ subject?: TSubject;
125
+ warnings?: readonly string[];
126
+ }>): CliCommandExecutionReport<TSubject>;
127
+ export declare function executeCompiledCliCommandPlanAsReport<TCompiledPlan extends Readonly<{
128
+ plan: Readonly<{
129
+ commands: readonly unknown[];
130
+ }>;
131
+ }>, TExecutionResult, TSubject>(input: Readonly<{
132
+ compiledPlan: TCompiledPlan;
133
+ onBeforeExecute?: (commandCount: number) => void;
134
+ executePlan: (plan: TCompiledPlan['plan']) => Promise<TExecutionResult>;
135
+ executionToReport: (input: Readonly<{
136
+ execution: TExecutionResult;
137
+ compiledPlan: TCompiledPlan;
138
+ }>) => CliCommandExecutionReport<TSubject>;
139
+ }>): Promise<CliCommandExecutionReport<TSubject>>;
140
+ export declare function reportFromOutcomes<TSubject>(input: Readonly<{
141
+ outcomes: readonly CliCommandOutcome<TSubject>[];
142
+ warnings?: readonly string[];
143
+ }>): CliCommandExecutionReport<TSubject>;
144
+ export declare function commandReportHasFailures(report: CliCommandExecutionReport<unknown>): boolean;
@@ -0,0 +1,21 @@
1
+ import { type SyncResult } from '../sync';
2
+ import { type CliCommandExecutionReport } from './commandRuntime';
3
+ export declare function commandReportToSyncResult<TSubject>(input: Readonly<{
4
+ report: CliCommandExecutionReport<TSubject>;
5
+ incrementSuccess: (result: SyncResult, subject: TSubject) => void;
6
+ recordFailure: (result: SyncResult, identifier: string, message: string, subject: TSubject | undefined) => void;
7
+ }>): SyncResult;
8
+ export declare function executeCompiledCliCommandPlanAsSyncResult<TCompiledPlan extends Readonly<{
9
+ plan: Readonly<{
10
+ commands: readonly unknown[];
11
+ }>;
12
+ }>, TExecutionResult, TSubject>(input: Readonly<{
13
+ compiledPlan: TCompiledPlan;
14
+ onBeforeExecute?: (commandCount: number) => void;
15
+ executePlan: (plan: TCompiledPlan['plan']) => Promise<TExecutionResult>;
16
+ executionToReport: (input: Readonly<{
17
+ execution: TExecutionResult;
18
+ compiledPlan: TCompiledPlan;
19
+ }>) => CliCommandExecutionReport<TSubject>;
20
+ reportToSyncResult: (report: CliCommandExecutionReport<TSubject>) => SyncResult;
21
+ }>): Promise<SyncResult>;
@@ -0,0 +1,27 @@
1
+ import { type Result, type SiteId } from '@riverbankcms/core';
2
+ import type { ManagementClient } from '../../client/management/types';
3
+ import type { LocalContent } from '../content/reader';
4
+ import type { EnvTarget } from '../helpers';
5
+ import type { ContentDiff, SyncResult } from '../sync';
6
+ import { compilePagePushCommands } from './pageCommands';
7
+ import type { CommandSurface, CommandSurfaceCompileResult, CommandSurfaceCompileSuccess, CommandSurfaceExecutionReport, CompiledContentPushExecutionPlan, CompiledContentPushExecutionStep, ContentPushExecutionPlan, ContentPushExecutionReport } from './pushExecutionTypes';
8
+ export type CommandSurfaceDispatchInput = Readonly<{
9
+ siteId: SiteId;
10
+ target: EnvTarget;
11
+ diff: ContentDiff;
12
+ local: LocalContent;
13
+ client: ManagementClient;
14
+ blockFieldExtensions: Parameters<typeof compilePagePushCommands>[0]['blockFieldExtensions'];
15
+ onEntryCommandCount?: (commandCount: number) => void;
16
+ onFormCommandCount?: (commandCount: number) => void;
17
+ onNavigationCommandCount?: (commandCount: number) => void;
18
+ onPageCommandCount?: (commandCount: number) => void;
19
+ }>;
20
+ export type CommandSurfaceDispatchDependencies = Readonly<{
21
+ compileCommandSurface?: (surface: CommandSurface, input: CommandSurfaceDispatchInput) => CommandSurfaceCompileResult;
22
+ executeCommandSurfaceAsReport?: (surface: CommandSurfaceCompileSuccess, input: CommandSurfaceDispatchInput) => Promise<CommandSurfaceExecutionReport>;
23
+ }>;
24
+ export declare function compileContentPushExecutionPlan(plan: ContentPushExecutionPlan, input: CommandSurfaceDispatchInput, dependencies?: CommandSurfaceDispatchDependencies): Result<CompiledContentPushExecutionPlan, ContentPushExecutionReport>;
25
+ export declare function executeCommandSurfaceAsReport(surface: CommandSurfaceCompileSuccess, input: CommandSurfaceDispatchInput): Promise<CommandSurfaceExecutionReport>;
26
+ export declare function skippedRemainingCommandReports(steps: readonly CompiledContentPushExecutionStep[]): CommandSurfaceExecutionReport[];
27
+ export declare function commandSurfaceReportToSyncResult(report: CommandSurfaceExecutionReport): SyncResult;
@@ -0,0 +1,56 @@
1
+ import { type Result, type SiteId } from '@riverbankcms/core';
2
+ import type { ManagementClient } from '../../client/management/types';
3
+ import type { LocalCourse, LocalEvent, LocalEventCategory, LocalVenue } from '../content/reader';
4
+ import type { EnvTarget } from '../helpers';
5
+ import type { PushScopeResult } from '../commands/push/scopes/types';
6
+ import { type CliCommandCompileBatchSuccessWithReports, type CliCommandValidationCompileError } from './commandRuntime';
7
+ export type CliDatedOfferingCommandBatchSource = 'push_venues' | 'push_event_categories' | 'push_events' | 'push_courses' | 'push_all_dated_offerings';
8
+ export type DatedOfferingSiteCommandType = 'upsertVenue' | 'deleteVenue' | 'upsertEventCategory' | 'deleteEventCategory' | 'upsertEventSeries' | 'deleteEventSeries' | 'upsertCourse' | 'deleteCourse';
9
+ type DatedOfferingCounter = 'created' | 'updated' | 'deleted';
10
+ export type DatedOfferingReportSubject = Readonly<{
11
+ scopeCommand: 'venues' | 'event-categories' | 'events' | 'courses';
12
+ scopeName: string;
13
+ itemLabelSingular: string;
14
+ identifier: string;
15
+ counter: DatedOfferingCounter;
16
+ }>;
17
+ export type CliDatedOfferingCommandCompileError = Readonly<{
18
+ code: 'unsupported_local_shape';
19
+ identifier: string;
20
+ message: string;
21
+ }> | CliCommandValidationCompileError;
22
+ export type CliDatedOfferingCommandCompileInput = Readonly<{
23
+ source: CliDatedOfferingCommandBatchSource;
24
+ siteId: SiteId;
25
+ targetEnv: EnvTarget;
26
+ venues?: DatedOfferingUpsertInput<LocalVenue>;
27
+ eventCategories?: DatedOfferingUpsertInput<LocalEventCategory>;
28
+ events?: DatedOfferingUpsertInput<LocalEvent>;
29
+ courses?: DatedOfferingUpsertInput<LocalCourse>;
30
+ delete?: DatedOfferingDeleteInput;
31
+ }>;
32
+ export type DatedOfferingUpsertInput<TItem> = Readonly<{
33
+ items: readonly DatedOfferingUpsertItem<TItem>[];
34
+ }>;
35
+ export type DatedOfferingUpsertItem<TItem> = Readonly<{
36
+ item: TItem;
37
+ exists: boolean;
38
+ }>;
39
+ export type DatedOfferingDeleteInput = Readonly<{
40
+ venues?: readonly string[];
41
+ eventCategories?: readonly string[];
42
+ events?: readonly string[];
43
+ courses?: readonly string[];
44
+ }>;
45
+ export type CliDatedOfferingCommandCompileSuccess = CliCommandCompileBatchSuccessWithReports<DatedOfferingSiteCommandType, DatedOfferingReportSubject>;
46
+ export declare const datedOfferingSiteCommandTypes: readonly ["upsertVenue", "deleteVenue", "upsertEventCategory", "deleteEventCategory", "upsertEventSeries", "deleteEventSeries", "upsertCourse", "deleteCourse"];
47
+ export declare function compileDatedOfferingPushCommands(input: CliDatedOfferingCommandCompileInput): Result<CliDatedOfferingCommandCompileSuccess, CliDatedOfferingCommandCompileError>;
48
+ export declare function executeDatedOfferingCommandPlanAsPushScopeResult(input: Readonly<{
49
+ client: Pick<ManagementClient, 'venues' | 'eventCategories' | 'events' | 'courses'>;
50
+ compiledPlan: CliDatedOfferingCommandCompileSuccess;
51
+ scopeCommand: DatedOfferingReportSubject['scopeCommand'];
52
+ scopeName: string;
53
+ }>): Promise<PushScopeResult>;
54
+ export declare function syncResultForDatedOfferingCommandCompileError(error: CliDatedOfferingCommandCompileError, scopeCommand: DatedOfferingReportSubject['scopeCommand'], scopeName: string): PushScopeResult;
55
+ export declare function courseSessionConflictMessage(error: unknown): string;
56
+ export {};