@riverbankcms/sdk 0.125.0 → 0.126.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 (121) hide show
  1. package/README.md +3 -1
  2. package/dist/{PreviewEditorSidebar-BezDOtQ7.mjs → PreviewEditorSidebar-DcYJxTgc.mjs} +67 -266
  3. package/dist/{PreviewEditorUI-CgSqmfo2.mjs → PreviewEditorUI-Ctt1yTJr.mjs} +3 -3
  4. package/dist/{PreviewQueryProvider-BH-3-jSj.mjs → PreviewQueryProvider-DgFDIwvK.mjs} +1 -1
  5. package/dist/{SdkPreviewModeRuntime-Co3AHfj0.mjs → SdkPreviewModeRuntime-CvW1vdQ4.mjs} +27 -27
  6. package/dist/{SiteChromeCustomizeContext-BHF-KANn.mjs → SiteChromeCustomizeContext-C87qlKWw.mjs} +412 -1301
  7. package/dist/_dts/ai/src/contracts/proposals.d.ts +1354 -202
  8. package/dist/_dts/api/src/common/envelope.d.ts +1 -1
  9. package/dist/_dts/api/src/contentRuntime.d.ts +0 -2
  10. package/dist/_dts/api/src/endpoints.d.ts +0 -7
  11. package/dist/_dts/api/src/sdk-event-upsert.d.ts +42 -0
  12. package/dist/_dts/api/src/sdkContracts.d.ts +11 -9
  13. package/dist/_dts/api/src/siteOperations.d.ts +18 -1
  14. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +1 -14
  15. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +15 -2
  16. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +182 -19
  17. package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +1 -2
  18. package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +2 -3
  19. package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +1 -2
  20. package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +3 -12
  21. package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +3 -13
  22. package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +8 -100
  23. package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +1 -4
  24. package/dist/_dts/preview-next/src/client/preview/styleConfiguratorApplyPayload.d.ts +1 -15
  25. package/dist/_dts/preview-next/src/client/preview/styleConfiguratorSnapshot.d.ts +11 -21
  26. package/dist/_dts/sdk/src/cli/commands/event.d.ts +2 -2
  27. package/dist/_dts/sdk/src/cli/commands/eventOccurrenceSchedule.d.ts +12 -0
  28. package/dist/_dts/sdk/src/cli/commands/push/pushAllExtras.d.ts +6 -0
  29. package/dist/_dts/sdk/src/cli/commands/style.d.ts +1 -1
  30. package/dist/_dts/sdk/src/cli/content/legacyEventScheduleShapeError.d.ts +5 -0
  31. package/dist/_dts/sdk/src/cli/content/localEventSchedule.d.ts +17 -0
  32. package/dist/_dts/sdk/src/cli/content/reader.d.ts +5 -10
  33. package/dist/_dts/sdk/src/cli/migrations/events.d.ts +1 -1
  34. package/dist/_dts/sdk/src/cli/site-commands/eventScheduleCompiler.d.ts +24 -0
  35. package/dist/_dts/sdk/src/client/management/http.d.ts +1 -1
  36. package/dist/_dts/sdk/src/client/management/types.d.ts +3 -28
  37. package/dist/_dts/sdk/src/config/index.d.ts +1 -1
  38. package/dist/_dts/sdk/src/public-api/contracts.d.ts +5 -20
  39. package/dist/_dts/sdk/src/rendering/index.d.ts +1 -1
  40. package/dist/_dts/sdk/src/version.d.ts +1 -1
  41. package/dist/_dts/site-commands/src/commandContract.d.ts +33 -5
  42. package/dist/_dts/site-commands/src/commandDomain.d.ts +2 -2
  43. package/dist/_dts/site-commands/src/commands.d.ts +38 -9
  44. package/dist/_dts/site-commands/src/siteStyleCommandSchema.d.ts +28 -1
  45. package/dist/_dts/site-commands/src/siteStyleSelectionSchemaBuilder.d.ts +4 -4
  46. package/dist/_dts/theme-core/src/palette/concretePalette.d.ts +20 -0
  47. package/dist/_dts/theme-core/src/palette/curated/index.d.ts +2 -17
  48. package/dist/_dts/theme-core/src/palette/index.d.ts +1 -6
  49. package/dist/_dts/theme-core/src/palette/schema.d.ts +39 -0
  50. package/dist/_dts/theme-core/src/schema.d.ts +38 -26
  51. package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +4 -6
  52. package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +5 -6
  53. package/dist/cli/index.mjs +612 -522
  54. package/dist/cli/init-docs/content/cli-reference.md +6 -3
  55. package/dist/cli/init-docs/content/content-management.md +24 -13
  56. package/dist/client/{DiscountCodeDisclosure-CyPpekBp.mjs → DiscountCodeDisclosure-DS0AuFWW.mjs} +1 -1
  57. package/dist/client/{EventCombined.client-zywit-60.mjs → EventCombined.client-DtMxLr7q.mjs} +2 -2
  58. package/dist/client/{EventListing.client-J2nLhkKT.mjs → EventListing.client-BdLSRNg1.mjs} +2 -2
  59. package/dist/client/{LeafletStaticMap-CSubXWt6.mjs → LeafletStaticMap-BrpC6vsT.mjs} +1 -1
  60. package/dist/client/{MagicLinkForm-DDLIfiq9.mjs → MagicLinkForm-Bt3IuLMy.mjs} +1 -1
  61. package/dist/client/{StepIndicator-DE8EvHIp.mjs → StepIndicator-CBYPFVoy.mjs} +2 -2
  62. package/dist/client/{accordion-Ct5T5NiA.mjs → accordion-BqqwPJWM.mjs} +1 -1
  63. package/dist/client/{bookingForm-DMxtLPxw.mjs → bookingForm-SneP3yxC.mjs} +5 -6
  64. package/dist/client/bookings.mjs +190 -24
  65. package/dist/client/{carousel--FMqgvob.mjs → carousel-BTIR9L3I.mjs} +1 -1
  66. package/dist/client/{cart-BKX1bWiU.mjs → cart-bqiqd8SX.mjs} +3 -3
  67. package/dist/client/{checkout-B_jxi4WW.mjs → checkout-WbTFV5v4.mjs} +3 -3
  68. package/dist/client/client.mjs +156 -220
  69. package/dist/client/{courseRegistration-DH4MlkRD.mjs → courseRegistration-BcemLAdN.mjs} +6 -7
  70. package/dist/client/{eventCalendar-BQILwAcL.mjs → eventCalendar-CsxIw0V_.mjs} +4 -4
  71. package/dist/client/{eventCombined-DFFW_Vmo.mjs → eventCombined-B6XMoHfa.mjs} +2 -2
  72. package/dist/client/{eventDetails-B045CTSJ.mjs → eventDetails-BJaoPPfo.mjs} +3 -3
  73. package/dist/client/{eventListing-BDMYNVzS.mjs → eventListing-DgwdYHRT.mjs} +2 -2
  74. package/dist/client/{eventRegistration-CQ2-BSnB.mjs → eventRegistration-C0O3folu.mjs} +30 -22
  75. package/dist/client/{form-DJKuyZgN.mjs → form-Bk9txGFt.mjs} +1 -1
  76. package/dist/client/{headerSection-DeTjfiDo.mjs → headerSection-yIBt0yTv.mjs} +2 -2
  77. package/dist/client/hooks.mjs +50 -102
  78. package/dist/client/{locationMap-i2wDA8gB.mjs → locationMap-C-3KIpv-.mjs} +2 -2
  79. package/dist/client/{newsletterForm-DKiueauk.mjs → newsletterForm-CzB8g8h2.mjs} +1 -1
  80. package/dist/client/{pricing-C01J3Epx.mjs → pricing-C1QeDes_.mjs} +1 -1
  81. package/dist/client/{productDetail-Dfc1sZaX.mjs → productDetail-w7SBp5uc.mjs} +3 -3
  82. package/dist/client/{productList-BXbvXWTF.mjs → productList-D0tGKHGf.mjs} +3 -3
  83. package/dist/client/{propsDecoder-CIR5DQ1l.mjs → propsDecoder-Bcin2DB3.mjs} +167 -11
  84. package/dist/client/rendering/client.mjs +219 -276
  85. package/dist/client/rendering/islands.mjs +18 -18
  86. package/dist/client/rendering.mjs +128 -185
  87. package/dist/client/{useDiscountCodeUi-Bcyh4508.mjs → scrollToBlock-h-o_STf_.mjs} +18 -2
  88. package/dist/client/{shop-BbNwPKM-.mjs → shop-BGzmL8O_.mjs} +5 -6
  89. package/dist/client/{shop-commerce-XO-XMFEt.mjs → shop-commerce-lX8QxjX-.mjs} +4 -4
  90. package/dist/client/{shop-commerce-store-Byh6OUGK.mjs → shop-commerce-store-CEurARtu.mjs} +1 -1
  91. package/dist/client/{shopShared-Bbq39mwr.mjs → shopShared-DXxH8xxw.mjs} +2 -2
  92. package/dist/client/{useEventFilters-C8OOJ3el.mjs → useEventFilters-B591g9vd.mjs} +2 -2
  93. package/dist/client/{usePolling-CyJVo9kF.mjs → usePolling-BvnChV4m.mjs} +2 -2
  94. package/dist/preview-next/before-render.mjs +0 -7
  95. package/dist/preview-next/client/runtime.mjs +4 -4
  96. package/dist/preview-next/middleware.mjs +0 -7
  97. package/dist/{previewAuthStore-CJX21dGi.mjs → previewAuthStore-Dev9CdG9.mjs} +0 -7
  98. package/dist/{sdk-runtime-BGhyuE-E.mjs → sdk-runtime-M__i3Jce.mjs} +2 -2
  99. package/dist/{separator-BFs-Kmv5.mjs → separator-VSlnI9bc.mjs} +1 -1
  100. package/dist/server/components.mjs +87 -139
  101. package/dist/server/config-validation.mjs +50 -102
  102. package/dist/server/config.mjs +50 -102
  103. package/dist/server/data.mjs +50 -102
  104. package/dist/server/index.mjs +1 -8
  105. package/dist/server/next.mjs +91 -150
  106. package/dist/server/page-converter.mjs +50 -102
  107. package/dist/server/prebuild.mjs +1 -1
  108. package/dist/server/rendering/server.mjs +50 -102
  109. package/dist/server/rendering.mjs +88 -140
  110. package/dist/server/routing.mjs +71 -147
  111. package/dist/server/server.mjs +51 -110
  112. package/dist/server/theme-bridge.mjs +172 -162
  113. package/dist/server/theme.mjs +167 -11
  114. package/package.json +1 -1
  115. package/dist/_dts/theme-core/src/palette/editorState.d.ts +0 -75
  116. package/dist/_dts/theme-core/src/palette/libraryModel.d.ts +0 -64
  117. package/dist/_dts/theme-core/src/palette/persistenceReadSource.d.ts +0 -81
  118. package/dist/_dts/theme-core/src/palette/resolveSelection.d.ts +0 -75
  119. package/dist/_dts/theme-core/src/palette/selection.d.ts +0 -74
  120. package/dist/_dts/theme-core/src/palette/sitePalettePersistence.d.ts +0 -34
  121. package/dist/client/scrollToBlock-C86BYkyV.mjs +0 -17
@@ -43,7 +43,7 @@ export interface ApiError {
43
43
  fieldErrors?: FieldError[];
44
44
  /**
45
45
  * Optional precise failure tag from the originating `DomainServiceError`
46
- * (e.g. `STALE_BASE`, `STALE_PALETTE`, `PALETTE_CAP_REACHED`). The coarse
46
+ * (e.g. `STALE_BASE`, `STALE_THEME_SELECTION`). The coarse
47
47
  * `code` collapses several tags into one (`resource:conflict`); `tag` lets
48
48
  * callers branch on the exact failure. Always optional and backward-compatible.
49
49
  */
@@ -1,6 +1,5 @@
1
1
  import type { Block, SdkCustomBlock, SdkCustomBlockInput, SiteFont, Theme } from '../../blocks/src/index';
2
2
  import type { CamelizeKeys, DbRow } from '../../db/src/index';
3
- import type { AuthoritativeRuntimePaletteState } from '../../theme-core/src/palette/index';
4
3
  import type { ContentTypeRoutingInfo, PublicContentTypeMeta } from './contentTypes';
5
4
  import type { SiteRuntimePrivacyPolicy } from './privacyPolicy';
6
5
  import type { SitePagePayload } from './sitePages';
@@ -356,7 +355,6 @@ export type SiteBySlugResponse = {
356
355
  * type — consumers fall back to the site style's defaults when null.
357
356
  */
358
357
  selectionButtonStyleSelection?: import('../../theme-core/src/buttons/index').ButtonStyleSelection | null;
359
- runtimePaletteState?: AuthoritativeRuntimePaletteState | null;
360
358
  selectionHeaderLayoutId?: string | null;
361
359
  selectionHeaderStyleId?: string | null;
362
360
  selectionHeaderLookId?: string | null;
@@ -1578,13 +1578,6 @@ export declare const API_ENDPOINTS: {
1578
1578
  readonly auth: "user";
1579
1579
  readonly responseKind: "json";
1580
1580
  };
1581
- readonly listSiteThemePalettes: {
1582
- readonly path: "/sites/{siteId}/theme/palettes";
1583
- readonly method: "GET";
1584
- readonly auth: "user";
1585
- readonly errors: readonly [];
1586
- readonly responseKind: "json";
1587
- };
1588
1581
  readonly createSiteFontUploadUrl: {
1589
1582
  readonly path: "/sites/{siteId}/fonts/upload-url";
1590
1583
  readonly method: "POST";
@@ -2,6 +2,45 @@ import type { SdkEntryUpsertSlotBlock, SdkEventContentInput, SdkPullEventSeries,
2
2
  import { type SdkEventPaymentTerms, type SdkEventPaymentTermsIssue } from './sdk-event-payment-terms';
3
3
  import { type SdkEventPricing, type SdkEventPricingIssue } from './sdk-event-pricing';
4
4
  import { type ClassifySdkEventScheduleOptions, type SdkEventCanonicalSchedule, type SdkEventScheduleInput, type SdkEventScheduleIssue } from './sdk-event-schedule';
5
+ import { z } from 'zod';
6
+ export declare const sdkEventOccurrenceInputSchema: z.ZodObject<{
7
+ startsAt: z.ZodString;
8
+ endsAt: z.ZodString;
9
+ timeZone: z.ZodString;
10
+ }, z.core.$strip>;
11
+ export declare const sdkEventUpsertOptionalFieldSchemas: {
12
+ readonly path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
+ readonly status: z.ZodOptional<z.ZodEnum<{
14
+ active: "active";
15
+ draft: "draft";
16
+ archived: "archived";
17
+ completed: "completed";
18
+ cancelled: "cancelled";
19
+ }>>;
20
+ readonly visibility: z.ZodOptional<z.ZodEnum<{
21
+ public: "public";
22
+ private: "private";
23
+ unlisted: "unlisted";
24
+ }>>;
25
+ readonly preset: z.ZodOptional<z.ZodEnum<{
26
+ course: "course";
27
+ event: "event";
28
+ performance: "performance";
29
+ class: "class";
30
+ workshop: "workshop";
31
+ retreat: "retreat";
32
+ }>>;
33
+ readonly bookingScope: z.ZodOptional<z.ZodEnum<{
34
+ single_occurrence: "single_occurrence";
35
+ whole_series: "whole_series";
36
+ }>>;
37
+ readonly occurrences: z.ZodOptional<z.ZodArray<z.ZodObject<{
38
+ startsAt: z.ZodString;
39
+ endsAt: z.ZodString;
40
+ timeZone: z.ZodString;
41
+ }, z.core.$strip>>>;
42
+ readonly capacity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
43
+ };
5
44
  export type SdkEventUpsertBody = Readonly<{
6
45
  identifier: string;
7
46
  title: string;
@@ -9,6 +48,9 @@ export type SdkEventUpsertBody = Readonly<{
9
48
  path?: string | null;
10
49
  status?: SdkPullEventSeries['status'];
11
50
  visibility?: SdkPullEventSeries['visibility'];
51
+ preset?: SdkPullEventSeries['preset'];
52
+ bookingScope?: SdkPullEventSeries['bookingScope'];
53
+ occurrences?: SdkPullEventSeries['occurrences'];
12
54
  schedule: SdkEventUpsertScheduleInput;
13
55
  capacity?: number | null;
14
56
  pricing?: SdkEventUpsertPricingInput;
@@ -5,6 +5,7 @@ import type { JsonValue } from './shared-contracts';
5
5
  import type { SdkEventPricing, SdkEventPricingInput } from './sdk-event-pricing';
6
6
  import type { SdkEventPaymentTerms, SdkEventPaymentTermsInput } from './sdk-event-payment-terms';
7
7
  import type { EventOccurrenceStatus } from './bookingRecords';
8
+ import type { EventPreset } from './bookingConfig';
8
9
  /**
9
10
  * SDK Site Configuration Types
10
11
  *
@@ -604,7 +605,7 @@ export interface SdkCatalogButtonStyle {
604
605
  export interface SdkCatalogPalette {
605
606
  /** Human-readable source alias. */
606
607
  authoringKey: string;
607
- /** Canonical persistence/runtime identity (colors+mode hash). */
608
+ /** Canonical authoring identity derived from colors and mode. */
608
609
  valueKey: string;
609
610
  name: string;
610
611
  description: string;
@@ -628,7 +629,6 @@ export interface SdkCatalogCurrentSelection {
628
629
  /** The curated site style the active theme was compiled from (null when unknown). */
629
630
  siteStyleId: string | null;
630
631
  buttonStyleSelection: SdkCatalogButtonStyleSelection | null;
631
- paletteValueKey: string | null;
632
632
  headerLayoutId: string | null;
633
633
  headerStyleId: string | null;
634
634
  headerLookId: string | null;
@@ -855,13 +855,9 @@ export interface SdkPullEventSeries {
855
855
  * IMPORTANT: This must be roundtrip-safe for SDK pull -> push workflows.
856
856
  */
857
857
  visibility: 'private' | 'public' | 'unlisted';
858
- schedule: {
859
- recurrenceRule: string | null;
860
- /** Date used for the first occurrence; required for one-off SDK-managed events. */
861
- startDate?: string | null;
862
- defaultStartTime: string;
863
- durationMinutes: number;
864
- };
858
+ preset: EventPreset;
859
+ bookingScope: 'single_occurrence' | 'whole_series';
860
+ occurrences: readonly SdkPullEventOccurrence[];
865
861
  capacity: number | null;
866
862
  pricing: SdkEventPricing;
867
863
  paymentTerms?: SdkEventPaymentTerms;
@@ -884,6 +880,11 @@ export interface SdkPullEventSeries {
884
880
  contentUpdatedAt: string | null;
885
881
  blocks?: SdkEntrySlotBlocks;
886
882
  }
883
+ export type SdkPullEventOccurrence = Readonly<{
884
+ startsAt: string;
885
+ endsAt: string;
886
+ timeZone: string;
887
+ }>;
887
888
  export type SdkEventContentInput = {
888
889
  summary?: string;
889
890
  body?: string | RichTextDoc;
@@ -1029,6 +1030,7 @@ export type SdkManagementEventCategory = SdkPullEventCategory & {
1029
1030
  };
1030
1031
  export type SdkManagementEventSeries = SdkPullEventSeries & {
1031
1032
  id: string;
1033
+ schedule: SdkEventCanonicalScheduleInput;
1032
1034
  };
1033
1035
  export type SdkEventOccurrenceProvenance = 'manual' | 'recurrence_generated' | 'recurrence_exception';
1034
1036
  export type SdkEventOccurrenceDeletionEligibility = {
@@ -229,12 +229,29 @@ export type DevToolsSetSiteRoleDowngradeRequest = {
229
229
  };
230
230
  export type CronEventRemindersResponse = {
231
231
  success: true;
232
- sent: number;
232
+ scanned: number;
233
+ owned: number;
234
+ created: number;
235
+ existing: number;
236
+ skipped: number;
233
237
  failed: number;
234
238
  errors: Array<{
235
239
  attendeeId: string;
236
240
  error: string;
237
241
  }>;
242
+ errorsTruncated: number;
243
+ scan: {
244
+ kind: "completed";
245
+ pages: number;
246
+ } | {
247
+ kind: "incomplete";
248
+ reason: "page_budget" | "deadline";
249
+ pages: number;
250
+ lastCursor: {
251
+ createdAt: string;
252
+ attendeeId: string;
253
+ };
254
+ };
238
255
  };
239
256
  export type CronEventFeedbackEmailsResponse = {
240
257
  success: true;
@@ -3,7 +3,6 @@ import type { ListMediaAssetsResult, MediaAssetWithLabels } from '@riverbankcms/
3
3
  import type { DbJson } from '../../db/src/index';
4
4
  import type { PageDesignEditorReadModel, PageDesignIntent, AppearancePresetId, BoundaryOptionId, DesignBlockId, FooterLookId, HeaderLayoutId, HeaderLookId, HeaderStyleId, LayoutVariantKey, SiteStyleId } from '../../theme-core/src/site-styles/index';
5
5
  import type { ButtonStyleSelection } from '../../theme-core/src/buttons/index';
6
- import type { PaletteCommand, PaletteLibraryAuthority, PaletteSelection } from '../../theme-core/src/palette/index';
7
6
  import type { APIEndpoint } from './apiEndpointTypes';
8
7
  import type { AnalyticsReportQuery, AnalyticsReportResponse } from './analytics';
9
8
  import type { CreateMediaAssetBody, MediaAssetResponse, MediaAssetFileFilterContract, MediaBulkDeleteResponse, MediaClassifyJobResponse, MediaJobSummaryResponse, MediaLabelSummary, MediaSettingsResponse } from './media';
@@ -45,7 +44,7 @@ export type SiteStyleSelectionChange = Readonly<{
45
44
  buttonStyleSelection: ButtonStyleSelection | null;
46
45
  }> | Readonly<{
47
46
  kind: 'set-palette';
48
- command: PaletteCommand;
47
+ palette: Theme['palette'];
49
48
  }> | Readonly<{
50
49
  kind: 'set-typography';
51
50
  typography: Theme['typography'] | null;
@@ -73,18 +72,11 @@ export type ApplySiteStyleSelectionResponse = Readonly<{
73
72
  theme: Theme;
74
73
  siteStyleId: SiteStyleId;
75
74
  buttonStyleSelection: ButtonStyleSelection;
76
- activePaletteSelection: PaletteSelection;
77
- /** Present only when the active selection is a site palette. */
78
- activeSitePaletteVersion: number | null;
79
75
  headerLayoutId: HeaderLayoutId | null;
80
76
  headerStyleId: HeaderStyleId | null;
81
77
  headerLookId: HeaderLookId | null;
82
78
  footerLookId: FooterLookId | null;
83
79
  }>;
84
- export type ListSiteThemePalettesResponse = Readonly<{
85
- active: PaletteLibraryAuthority;
86
- palettes: readonly import('../../theme-core/src/palette/index').SitePalette[];
87
- }>;
88
80
  export type SaveSiteChromeLookSelectionBody = Readonly<{
89
81
  surface: 'header';
90
82
  lookId: HeaderLookId | null;
@@ -262,8 +254,6 @@ export type SiteRuntimeAPIEndpoints = {
262
254
  * local state without a follow-up read.
263
255
  */
264
256
  buttonStyleSelection: ButtonStyleSelection | null;
265
- activePaletteSelection: PaletteSelection;
266
- activeSitePaletteVersion: number | null;
267
257
  headerLayoutId: HeaderLayoutId | null;
268
258
  headerStyleId: HeaderStyleId | null;
269
259
  headerLookId: HeaderLookId | null;
@@ -272,9 +262,6 @@ export type SiteRuntimeAPIEndpoints = {
272
262
  applySiteStyleSelection: APIEndpoint<ApplySiteStyleSelectionBody, {
273
263
  siteId: string;
274
264
  }, ApplySiteStyleSelectionResponse>;
275
- listSiteThemePalettes: APIEndpoint<never, {
276
- siteId: string;
277
- }, ListSiteThemePalettesResponse>;
278
265
  saveSiteChromeLookSelection: APIEndpoint<SaveSiteChromeLookSelectionBody, {
279
266
  siteId: string;
280
267
  }, SaveSiteChromeLookSelectionResponse>;
@@ -1,7 +1,9 @@
1
1
  import { usePaymentVerification } from '../../hooks/usePaymentVerification';
2
2
  import type { BlockApiClient } from '../../api';
3
+ import { consumeSearchParam, scrollToBlock } from '../../shared';
4
+ import { cleanupStaleRegistrations, clearPendingRegistration, getPendingRegistration } from './sessionStorage';
3
5
  import type { EventTicketSelectionLine, FormData, PaymentSelection, RegistrationEvent, RegistrationResult, RegistrationStep } from './types';
4
- export declare function useEventRegistrationStripeReturn(options: {
6
+ type EventRegistrationStripeReturnOptions = {
5
7
  api: BlockApiClient;
6
8
  events: RegistrationEvent[];
7
9
  occurrenceId: string;
@@ -17,4 +19,15 @@ export declare function useEventRegistrationStripeReturn(options: {
17
19
  setStep: (step: RegistrationStep) => void;
18
20
  setRegistrationResult: (result: RegistrationResult) => void;
19
21
  setErrorMessage: (message: string) => void;
20
- }): ReturnType<typeof usePaymentVerification>;
22
+ };
23
+ export type EventRegistrationStripeReturnDeps = Readonly<{
24
+ usePaymentVerification: typeof usePaymentVerification;
25
+ consumeSearchParam: typeof consumeSearchParam;
26
+ scrollToBlock: typeof scrollToBlock;
27
+ cleanupStaleRegistrations: typeof cleanupStaleRegistrations;
28
+ clearPendingRegistration: typeof clearPendingRegistration;
29
+ getPendingRegistration: typeof getPendingRegistration;
30
+ }>;
31
+ export declare function useEventRegistrationStripeReturn(options: EventRegistrationStripeReturnOptions): ReturnType<typeof usePaymentVerification>;
32
+ export declare function useEventRegistrationStripeReturnWithDeps(options: EventRegistrationStripeReturnOptions, deps: EventRegistrationStripeReturnDeps): ReturnType<typeof usePaymentVerification>;
33
+ export {};
@@ -13038,6 +13038,7 @@ export type Database = {
13038
13038
  billing_address_json: Json | null;
13039
13039
  cancellation_category: Database["public"]["Enums"]["cancellation_context_category"] | null;
13040
13040
  cancellation_internal_note: string | null;
13041
+ checkout_evidence_pending_since: string | null;
13041
13042
  commit_claim_token: string | null;
13042
13043
  commit_claimed_at: string | null;
13043
13044
  commit_completed_at: string | null;
@@ -13078,6 +13079,7 @@ export type Database = {
13078
13079
  billing_address_json?: Json | null;
13079
13080
  cancellation_category?: Database["public"]["Enums"]["cancellation_context_category"] | null;
13080
13081
  cancellation_internal_note?: string | null;
13082
+ checkout_evidence_pending_since?: string | null;
13081
13083
  commit_claim_token?: string | null;
13082
13084
  commit_claimed_at?: string | null;
13083
13085
  commit_completed_at?: string | null;
@@ -13118,6 +13120,7 @@ export type Database = {
13118
13120
  billing_address_json?: Json | null;
13119
13121
  cancellation_category?: Database["public"]["Enums"]["cancellation_context_category"] | null;
13120
13122
  cancellation_internal_note?: string | null;
13123
+ checkout_evidence_pending_since?: string | null;
13121
13124
  commit_claim_token?: string | null;
13122
13125
  commit_claimed_at?: string | null;
13123
13126
  commit_completed_at?: string | null;
@@ -16503,6 +16506,14 @@ export type Database = {
16503
16506
  transactional_email_jobs: {
16504
16507
  Row: {
16505
16508
  attempt_count: number;
16509
+ completion_attempt_count: number;
16510
+ completion_completed_at: string | null;
16511
+ completion_last_error: string | null;
16512
+ completion_locked_at: string | null;
16513
+ completion_locked_by: string | null;
16514
+ completion_max_attempts: number;
16515
+ completion_run_after: string | null;
16516
+ completion_status: string;
16506
16517
  created_at: string;
16507
16518
  email_id: string | null;
16508
16519
  email_type: string;
@@ -16513,6 +16524,8 @@ export type Database = {
16513
16524
  locked_by: string | null;
16514
16525
  max_attempts: number;
16515
16526
  payload_json: Json;
16527
+ provider_ambiguity_started_at: string | null;
16528
+ provider_attempt_state: string;
16516
16529
  provider_message_id: string | null;
16517
16530
  run_after: string | null;
16518
16531
  sent_at: string | null;
@@ -16523,6 +16536,14 @@ export type Database = {
16523
16536
  };
16524
16537
  Insert: {
16525
16538
  attempt_count?: number;
16539
+ completion_attempt_count?: number;
16540
+ completion_completed_at?: string | null;
16541
+ completion_last_error?: string | null;
16542
+ completion_locked_at?: string | null;
16543
+ completion_locked_by?: string | null;
16544
+ completion_max_attempts?: number;
16545
+ completion_run_after?: string | null;
16546
+ completion_status?: string;
16526
16547
  created_at?: string;
16527
16548
  email_id?: string | null;
16528
16549
  email_type: string;
@@ -16533,6 +16554,8 @@ export type Database = {
16533
16554
  locked_by?: string | null;
16534
16555
  max_attempts?: number;
16535
16556
  payload_json?: Json;
16557
+ provider_ambiguity_started_at?: string | null;
16558
+ provider_attempt_state?: string;
16536
16559
  provider_message_id?: string | null;
16537
16560
  run_after?: string | null;
16538
16561
  sent_at?: string | null;
@@ -16543,6 +16566,14 @@ export type Database = {
16543
16566
  };
16544
16567
  Update: {
16545
16568
  attempt_count?: number;
16569
+ completion_attempt_count?: number;
16570
+ completion_completed_at?: string | null;
16571
+ completion_last_error?: string | null;
16572
+ completion_locked_at?: string | null;
16573
+ completion_locked_by?: string | null;
16574
+ completion_max_attempts?: number;
16575
+ completion_run_after?: string | null;
16576
+ completion_status?: string;
16546
16577
  created_at?: string;
16547
16578
  email_id?: string | null;
16548
16579
  email_type?: string;
@@ -16553,6 +16584,8 @@ export type Database = {
16553
16584
  locked_by?: string | null;
16554
16585
  max_attempts?: number;
16555
16586
  payload_json?: Json;
16587
+ provider_ambiguity_started_at?: string | null;
16588
+ provider_attempt_state?: string;
16556
16589
  provider_message_id?: string | null;
16557
16590
  run_after?: string | null;
16558
16591
  sent_at?: string | null;
@@ -18782,26 +18815,23 @@ export type Database = {
18782
18815
  updated_at: string;
18783
18816
  }[];
18784
18817
  };
18785
- apply_site_theme_command_authoritative_atomic: {
18818
+ apply_site_theme_command_atomic: {
18786
18819
  Args: {
18787
18820
  p_base_selection_version: number;
18788
18821
  p_button_personality_id: string;
18789
- p_footer_look_id: string;
18822
+ p_button_style_options: Json;
18823
+ p_footer_look_id?: string;
18790
18824
  p_header_layout_id?: string;
18791
- p_header_look_id: string;
18825
+ p_header_look_id?: string;
18792
18826
  p_header_style_id?: string;
18793
- p_palette_command: Json;
18794
18827
  p_selection_id?: string;
18795
18828
  p_site_id: string;
18796
18829
  p_theme: Json;
18797
18830
  };
18798
18831
  Returns: {
18799
- active_curated_palette_value_key: string;
18800
- active_site_palette_id: string;
18801
18832
  outcome: string;
18802
18833
  selection_id: string;
18803
18834
  selection_updated_at: string;
18804
- site_palette_version: number;
18805
18835
  style_selection_version: number;
18806
18836
  theme_id: string;
18807
18837
  }[];
@@ -20863,24 +20893,21 @@ export type Database = {
20863
20893
  preparation_outcome: string;
20864
20894
  }[];
20865
20895
  };
20866
- provision_initial_site_theme_authoritative_atomic: {
20896
+ provision_initial_site_theme_atomic: {
20867
20897
  Args: {
20868
20898
  p_button_personality_id: string;
20899
+ p_button_style_options: Json;
20869
20900
  p_footer_look_id?: string;
20870
20901
  p_header_layout_id?: string;
20871
20902
  p_header_look_id?: string;
20872
20903
  p_header_style_id?: string;
20873
- p_palette_command: Json;
20874
20904
  p_site_id: string;
20875
20905
  p_theme: Json;
20876
20906
  p_user_id: string;
20877
20907
  };
20878
20908
  Returns: {
20879
- active_curated_palette_value_key: string;
20880
- active_site_palette_id: string;
20881
20909
  outcome: string;
20882
20910
  selection_id: string;
20883
- site_palette_version: number;
20884
20911
  theme_id: string;
20885
20912
  }[];
20886
20913
  };
@@ -21341,15 +21368,15 @@ export type Database = {
21341
21368
  outcome: string;
21342
21369
  }[];
21343
21370
  };
21344
- save_current_theme_aggregate_authoritative_atomic: {
21371
+ save_current_theme_aggregate_atomic: {
21345
21372
  Args: {
21346
21373
  p_button_personality_id: string;
21374
+ p_button_style_options: Json;
21347
21375
  p_expected_selection_version: number;
21348
- p_footer_look_id: string;
21376
+ p_footer_look_id?: string;
21349
21377
  p_header_layout_id?: string;
21350
- p_header_look_id: string;
21378
+ p_header_look_id?: string;
21351
21379
  p_header_style_id?: string;
21352
- p_palette_command: Json;
21353
21380
  p_selection_id?: string;
21354
21381
  p_selection_overrides: Json;
21355
21382
  p_selection_overrides_mode: string;
@@ -21359,12 +21386,9 @@ export type Database = {
21359
21386
  p_user_id: string;
21360
21387
  };
21361
21388
  Returns: {
21362
- active_curated_palette_value_key: string;
21363
- active_site_palette_id: string;
21364
21389
  outcome: string;
21365
21390
  selection_id: string;
21366
21391
  selection_updated_at: string;
21367
- site_palette_version: number;
21368
21392
  style_selection_version: number;
21369
21393
  theme_id: string;
21370
21394
  }[];
@@ -21505,6 +21529,135 @@ export type Database = {
21505
21529
  };
21506
21530
  Returns: string;
21507
21531
  };
21532
+ transactional_email_claim_completion_effect: {
21533
+ Args: {
21534
+ p_job_id: string;
21535
+ p_lock_timeout_seconds?: number;
21536
+ p_worker_id: string;
21537
+ };
21538
+ Returns: {
21539
+ attempt_count: number;
21540
+ completion_attempt_count: number;
21541
+ completion_completed_at: string | null;
21542
+ completion_last_error: string | null;
21543
+ completion_locked_at: string | null;
21544
+ completion_locked_by: string | null;
21545
+ completion_max_attempts: number;
21546
+ completion_run_after: string | null;
21547
+ completion_status: string;
21548
+ created_at: string;
21549
+ email_id: string | null;
21550
+ email_type: string;
21551
+ id: string;
21552
+ idempotency_key: string;
21553
+ last_error: string | null;
21554
+ locked_at: string | null;
21555
+ locked_by: string | null;
21556
+ max_attempts: number;
21557
+ payload_json: Json;
21558
+ provider_ambiguity_started_at: string | null;
21559
+ provider_attempt_state: string;
21560
+ provider_message_id: string | null;
21561
+ run_after: string | null;
21562
+ sent_at: string | null;
21563
+ site_id: string | null;
21564
+ status: string;
21565
+ updated_at: string;
21566
+ user_id: string | null;
21567
+ }[];
21568
+ SetofOptions: {
21569
+ from: "*";
21570
+ to: "transactional_email_jobs";
21571
+ isOneToOne: false;
21572
+ isSetofReturn: true;
21573
+ };
21574
+ };
21575
+ transactional_email_claim_completion_effects: {
21576
+ Args: {
21577
+ p_limit: number;
21578
+ p_lock_timeout_seconds?: number;
21579
+ p_worker_id: string;
21580
+ };
21581
+ Returns: {
21582
+ attempt_count: number;
21583
+ completion_attempt_count: number;
21584
+ completion_completed_at: string | null;
21585
+ completion_last_error: string | null;
21586
+ completion_locked_at: string | null;
21587
+ completion_locked_by: string | null;
21588
+ completion_max_attempts: number;
21589
+ completion_run_after: string | null;
21590
+ completion_status: string;
21591
+ created_at: string;
21592
+ email_id: string | null;
21593
+ email_type: string;
21594
+ id: string;
21595
+ idempotency_key: string;
21596
+ last_error: string | null;
21597
+ locked_at: string | null;
21598
+ locked_by: string | null;
21599
+ max_attempts: number;
21600
+ payload_json: Json;
21601
+ provider_ambiguity_started_at: string | null;
21602
+ provider_attempt_state: string;
21603
+ provider_message_id: string | null;
21604
+ run_after: string | null;
21605
+ sent_at: string | null;
21606
+ site_id: string | null;
21607
+ status: string;
21608
+ updated_at: string;
21609
+ user_id: string | null;
21610
+ }[];
21611
+ SetofOptions: {
21612
+ from: "*";
21613
+ to: "transactional_email_jobs";
21614
+ isOneToOne: false;
21615
+ isSetofReturn: true;
21616
+ };
21617
+ };
21618
+ transactional_email_claim_job: {
21619
+ Args: {
21620
+ p_job_id: string;
21621
+ p_lock_timeout_seconds?: number;
21622
+ p_worker_id: string;
21623
+ };
21624
+ Returns: {
21625
+ attempt_count: number;
21626
+ completion_attempt_count: number;
21627
+ completion_completed_at: string | null;
21628
+ completion_last_error: string | null;
21629
+ completion_locked_at: string | null;
21630
+ completion_locked_by: string | null;
21631
+ completion_max_attempts: number;
21632
+ completion_run_after: string | null;
21633
+ completion_status: string;
21634
+ created_at: string;
21635
+ email_id: string | null;
21636
+ email_type: string;
21637
+ id: string;
21638
+ idempotency_key: string;
21639
+ last_error: string | null;
21640
+ locked_at: string | null;
21641
+ locked_by: string | null;
21642
+ max_attempts: number;
21643
+ payload_json: Json;
21644
+ provider_ambiguity_started_at: string | null;
21645
+ provider_attempt_state: string;
21646
+ provider_message_id: string | null;
21647
+ run_after: string | null;
21648
+ sent_at: string | null;
21649
+ site_id: string | null;
21650
+ status: string;
21651
+ updated_at: string;
21652
+ user_id: string | null;
21653
+ }[];
21654
+ SetofOptions: {
21655
+ from: "*";
21656
+ to: "transactional_email_jobs";
21657
+ isOneToOne: false;
21658
+ isSetofReturn: true;
21659
+ };
21660
+ };
21508
21661
  transactional_email_claim_jobs: {
21509
21662
  Args: {
21510
21663
  p_limit: number;
@@ -21513,6 +21666,14 @@ export type Database = {
21513
21666
  };
21514
21667
  Returns: {
21515
21668
  attempt_count: number;
21669
+ completion_attempt_count: number;
21670
+ completion_completed_at: string | null;
21671
+ completion_last_error: string | null;
21672
+ completion_locked_at: string | null;
21673
+ completion_locked_by: string | null;
21674
+ completion_max_attempts: number;
21675
+ completion_run_after: string | null;
21676
+ completion_status: string;
21516
21677
  created_at: string;
21517
21678
  email_id: string | null;
21518
21679
  email_type: string;
@@ -21523,6 +21684,8 @@ export type Database = {
21523
21684
  locked_by: string | null;
21524
21685
  max_attempts: number;
21525
21686
  payload_json: Json;
21687
+ provider_ambiguity_started_at: string | null;
21688
+ provider_attempt_state: string;
21526
21689
  provider_message_id: string | null;
21527
21690
  run_after: string | null;
21528
21691
  sent_at: string | null;
@@ -35,7 +35,6 @@ export type PreviewEditorSidebarProps = {
35
35
  themeSelectionUpdatedAt?: string | null;
36
36
  /** Persisted Style configurator selections (Phase C / E). */
37
37
  themeSelectionButtonStyleSelection?: ButtonStyleSelection | null;
38
- runtimePaletteState: import("./styleConfiguratorSnapshot").PreviewRuntimePaletteState;
39
38
  themeSelectionHeaderLayoutId?: HeaderLayoutId | null;
40
39
  themeSelectionHeaderStyleId?: HeaderStyleId | null;
41
40
  themeSelectionHeaderLookId?: HeaderLookId | null;
@@ -61,4 +60,4 @@ export type PreviewEditorSidebarProps = {
61
60
  onViewportWidthChange: (width: ViewportWidth) => void;
62
61
  onZoomChange: (zoom: ZoomLevel) => void;
63
62
  };
64
- export declare function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl, pageId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, theme, themeId, themeSelectionId, themeSelectionVersion, themeSelectionUpdatedAt, themeSelectionButtonStyleSelection, runtimePaletteState, themeSelectionHeaderLayoutId, themeSelectionHeaderStyleId, themeSelectionHeaderLookId, themeSelectionFooterLookId, themeSelectionHeaderContext, apiClient, bearerToken, supabaseUrl, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, bookingOfferingPresets, siteStyleAccess, activeTab, onTabChange, onClose, onFooterSaved, viewportMode, viewportWidth, zoom, onViewportModeChange, onViewportWidthChange, onZoomChange, }: PreviewEditorSidebarProps): React.JSX.Element;
63
+ export declare function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl, pageId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, theme, themeId, themeSelectionId, themeSelectionVersion, themeSelectionUpdatedAt, themeSelectionButtonStyleSelection, themeSelectionHeaderLayoutId, themeSelectionHeaderStyleId, themeSelectionHeaderLookId, themeSelectionFooterLookId, themeSelectionHeaderContext, apiClient, bearerToken, supabaseUrl, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, bookingOfferingPresets, siteStyleAccess, activeTab, onTabChange, onClose, onFooterSaved, viewportMode, viewportWidth, zoom, onViewportModeChange, onViewportWidthChange, onZoomChange, }: PreviewEditorSidebarProps): React.JSX.Element;
@@ -42,7 +42,6 @@ export type PreviewShellProps = {
42
42
  * complete palette state.
43
43
  */
44
44
  themeSelectionButtonStyleSelection?: ButtonStyleSelection | null;
45
- runtimePaletteState: import('./styleConfiguratorSnapshot').PreviewRuntimePaletteState;
46
45
  themeSelectionHeaderLayoutId?: HeaderLayoutId | null;
47
46
  themeSelectionHeaderStyleId?: HeaderStyleId | null;
48
47
  themeSelectionHeaderLookId?: HeaderLookId | null;
@@ -68,12 +67,12 @@ export type PreviewShellProps = {
68
67
  supabaseUrl?: string;
69
68
  themeRuntime?: PreviewThemeRuntime;
70
69
  designEditorEligibility?: PreviewDesignEditorEligibility;
71
- /** Hides site-style controls for runtimes without palette authority. */
70
+ /** Hides site-style controls when this runtime cannot persist design edits. */
72
71
  hideSiteStyleConfigurator?: boolean;
73
72
  baseFetch?: BaseFetch;
74
73
  onFooterSaved?: () => void;
75
74
  };
76
- export declare function PreviewShell({ children, apiBaseUrl, blockApiConfig, siteId, siteSlug, editableId, previewSession, previewToken, dashboardBaseUrl, surfaceId, theme, themeId, themeSelectionId, themeSelectionVersion, themeSelectionUpdatedAt, themeSelectionButtonStyleSelection, runtimePaletteState, themeSelectionHeaderLayoutId, themeSelectionHeaderStyleId, themeSelectionHeaderLookId, themeSelectionFooterLookId, themeSelectionHeaderContext, pageId, routeId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, initialStatus, initialBlocks, pageMetadata, isSiteLaunched, maintenanceModeEnabled, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, bookingOfferingPresets, supabaseUrl, themeRuntime, designEditorEligibility, hideSiteStyleConfigurator, baseFetch, onFooterSaved, }: PreviewShellProps): React.JSX.Element;
75
+ export declare function PreviewShell({ children, apiBaseUrl, blockApiConfig, siteId, siteSlug, editableId, previewSession, previewToken, dashboardBaseUrl, surfaceId, theme, themeId, themeSelectionId, themeSelectionVersion, themeSelectionUpdatedAt, themeSelectionButtonStyleSelection, themeSelectionHeaderLayoutId, themeSelectionHeaderStyleId, themeSelectionHeaderLookId, themeSelectionFooterLookId, themeSelectionHeaderContext, pageId, routeId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, initialStatus, initialBlocks, pageMetadata, isSiteLaunched, maintenanceModeEnabled, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, bookingOfferingPresets, supabaseUrl, themeRuntime, designEditorEligibility, hideSiteStyleConfigurator, baseFetch, onFooterSaved, }: PreviewShellProps): React.JSX.Element;
77
76
  export declare function defaultDesignEditorEligibility(input: Readonly<{
78
77
  pageId: string | null;
79
78
  entryData?: PreviewContentEntryData | null;