@riverbankcms/sdk 0.145.0 → 0.146.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 (159) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/{PreviewEditorSidebar-O-V6Pl5a.mjs → PreviewEditorSidebar-kg2r2Fyi.mjs} +4 -4
  3. package/dist/{PreviewEditorUI-1UlX_9cw.mjs → PreviewEditorUI-sWMLp5dT.mjs} +3 -3
  4. package/dist/{PreviewQueryProvider-BxGwdOCV.mjs → PreviewQueryProvider-Cg51xq1w.mjs} +1 -1
  5. package/dist/{SdkPreviewModeRuntime-DYbA_4iv.mjs → SdkPreviewModeRuntime-h2ti3Hch.mjs} +280 -182
  6. package/dist/{SiteChromeCustomizeContext-CNTKQ9nx.mjs → SiteChromeCustomizeContext-DEACFH9m.mjs} +1330 -734
  7. package/dist/_dts/ai/src/contracts/proposals.d.ts +924 -0
  8. package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +84 -0
  9. package/dist/_dts/api/src/bookingConfig.d.ts +8 -1
  10. package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +8 -14
  11. package/dist/_dts/api/src/bookingManagementEventEndpointTypes.d.ts +45 -1
  12. package/dist/_dts/api/src/clientErrorReporting.d.ts +50 -0
  13. package/dist/_dts/api/src/communications.d.ts +20 -4
  14. package/dist/_dts/api/src/contentRuntime.d.ts +3 -7
  15. package/dist/_dts/api/src/endpoints.d.ts +223 -88
  16. package/dist/_dts/api/src/event-visibility.d.ts +20 -0
  17. package/dist/_dts/api/src/eventManagementContracts.d.ts +56 -3
  18. package/dist/_dts/api/src/eventManagementEndpointDefinitions.d.ts +24 -0
  19. package/dist/_dts/api/src/eventPageWords.d.ts +19 -0
  20. package/dist/_dts/api/src/eventSeriesRegistrationEndpointDefinitions.d.ts +14 -0
  21. package/dist/_dts/api/src/index.d.ts +7 -1
  22. package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -1
  23. package/dist/_dts/api/src/indexExtendedTypes.d.ts +1 -1
  24. package/dist/_dts/api/src/launchReadiness.d.ts +20 -2
  25. package/dist/_dts/api/src/launchRequirementPriority.d.ts +3 -0
  26. package/dist/_dts/api/src/newsletterCampaignCommandEndpoints.d.ts +13 -0
  27. package/dist/_dts/api/src/newsletterEndpointDefinitions.d.ts +42 -0
  28. package/dist/_dts/api/src/occurrenceScheduling.d.ts +10 -0
  29. package/dist/_dts/api/src/pageSurfaceEndpoints.d.ts +44 -0
  30. package/dist/_dts/api/src/participantMessaging.d.ts +11 -1
  31. package/dist/_dts/api/src/sdk-event-upsert.d.ts +40 -1
  32. package/dist/_dts/api/src/sdkContracts.d.ts +3 -42
  33. package/dist/_dts/api/src/sdkCourseBooking.d.ts +30 -0
  34. package/dist/_dts/api/src/sdkEventEndpointDefinitions.d.ts +76 -0
  35. package/dist/_dts/api/src/sdkEventLifecycle.d.ts +37 -0
  36. package/dist/_dts/api/src/sdkManagedEventContracts.d.ts +18 -0
  37. package/dist/_dts/api/src/sdkPageDesign.d.ts +388 -0
  38. package/dist/_dts/api/src/sdkPageDesignEndpointDefinitions.d.ts +22 -0
  39. package/dist/_dts/api/src/sdkPullEventContracts.d.ts +46 -0
  40. package/dist/_dts/api/src/siteAddressEndpoints.d.ts +29 -0
  41. package/dist/_dts/api/src/siteManagementEndpointDefinitions.d.ts +49 -0
  42. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +2 -32
  43. package/dist/_dts/api/src/siteOnboarding.d.ts +75 -9
  44. package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +1 -1
  45. package/dist/_dts/api/src/types.d.ts +7 -1
  46. package/dist/_dts/api/src/wholeSeriesRuns.d.ts +14 -0
  47. package/dist/_dts/blocks/src/index.d.ts +2 -0
  48. package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +10 -0
  49. package/dist/_dts/blocks/src/pageRendererContracts.d.ts +3 -1
  50. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +27 -5
  51. package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +14 -1
  52. package/dist/_dts/blocks/src/system/icons/social.d.ts +1 -1
  53. package/dist/_dts/blocks/src/system/registry.d.ts +1 -1
  54. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventSourceRecovery.d.ts +1 -0
  55. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +20 -4
  56. package/dist/_dts/blocks/src/system/runtime/nodes/form.fields.d.ts +5 -0
  57. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.block-submission.d.ts +36 -0
  58. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.client.d.ts +1 -1
  59. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.interactive.d.ts +6 -1
  60. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.parts.d.ts +46 -0
  61. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +2 -1
  62. package/dist/_dts/blocks/src/system/runtime/resolver.d.ts +2 -1
  63. package/dist/_dts/blocks/src/system/runtime/shared/components/CheckboxChoice.d.ts +18 -0
  64. package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +1 -0
  65. package/dist/_dts/content-editor/src/index.d.ts +1 -0
  66. package/dist/_dts/content-editor/src/primitives/previewEditableOutline.d.ts +2 -0
  67. package/dist/_dts/content-editor/src/ui/editorBlockEquality.d.ts +3 -0
  68. package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +3 -5
  69. package/dist/_dts/core/src/block-content-identity.d.ts +5 -0
  70. package/dist/_dts/core/src/editor-state.d.ts +2 -7
  71. package/dist/_dts/core/src/index.d.ts +1 -0
  72. package/dist/_dts/core/src/mailing-list-submission.d.ts +3 -1
  73. package/dist/_dts/core/src/public-event-booking-availability.d.ts +20 -1
  74. package/dist/_dts/core/src/public-profile.d.ts +3 -1
  75. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +49 -2
  76. package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +3 -0
  77. package/dist/_dts/editor-blocks/src/block-editor/EmptyState.d.ts +13 -1
  78. package/dist/_dts/editor-blocks/src/block-editor/types.d.ts +2 -8
  79. package/dist/_dts/editor-blocks/src/index.d.ts +1 -0
  80. package/dist/_dts/preview-next/src/client/blocks/composer/types.d.ts +3 -4
  81. package/dist/_dts/preview-next/src/client/preview/PreviewEntryControllerProvider.d.ts +1 -2
  82. package/dist/_dts/sdk/src/next/renderSdkContent.d.ts +0 -1
  83. package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -2
  84. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +2 -2
  85. package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +6 -1
  86. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +5 -2
  87. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +6 -1
  88. package/dist/_dts/sdk/src/rendering/helpers/templateContent.d.ts +2 -0
  89. package/dist/_dts/sdk/src/rendering/hooks/useContent.d.ts +5 -1
  90. package/dist/_dts/sdk/src/rendering/hooks/usePage.d.ts +5 -1
  91. package/dist/_dts/sdk/src/version.d.ts +1 -1
  92. package/dist/_dts/surfaces/src/index.d.ts +9 -0
  93. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  94. package/dist/_dts/theme-core/src/inputs/checkable.d.ts +42 -0
  95. package/dist/_dts/theme-core/src/inputs/inputGroup.d.ts +19 -0
  96. package/dist/_dts/ui/src/navigation-tabs.d.ts +2 -1
  97. package/dist/client/{BookingConsentAgreement-DlVOmpW4.mjs → BookingConsentAgreement-BQKL045f.mjs} +2 -2
  98. package/dist/client/CheckboxChoice--W2n6yKs.mjs +24 -0
  99. package/dist/client/{DiscountCodeDisclosure-T9q623PQ.mjs → DiscountCodeDisclosure-CsOtjFY7.mjs} +1 -1
  100. package/dist/client/{EventCombined.client-DnsUeONl.mjs → EventCombined.client-BdRjVbhH.mjs} +6 -6
  101. package/dist/client/{EventListing.client-CNBFqJS4.mjs → EventListing.client-DBxC6xOU.mjs} +2 -2
  102. package/dist/client/{LeafletStaticMap-C7higg52.mjs → LeafletStaticMap-mHEJKrTs.mjs} +1 -1
  103. package/dist/client/{ThemedButton-LAJTNrS8.mjs → ThemedButton-CE5KYT6z.mjs} +1 -1
  104. package/dist/client/{accordion-BcNF9TjX.mjs → accordion-BEQNSptH.mjs} +1 -1
  105. package/dist/client/{bookingForm-BUaQ3S03.mjs → bookingForm-AMr-s5vw.mjs} +33 -52
  106. package/dist/client/bookings.mjs +48 -46
  107. package/dist/client/{carousel-CTdF6e0V.mjs → carousel-Bbt_QgJy.mjs} +1 -1
  108. package/dist/client/{cart-pGtyf_XU.mjs → cart-CnWi30zJ.mjs} +3 -3
  109. package/dist/client/{checkout-Da9WSn7Y.mjs → checkout-f3nkWgd4.mjs} +3 -3
  110. package/dist/client/client.mjs +1611 -815
  111. package/dist/client/{context-BFeY_Wbm.mjs → context-Bc8T6pCe.mjs} +1 -1
  112. package/dist/client/{dates-BhwVSxDg.mjs → dates-DUsCEzLb.mjs} +2 -3
  113. package/dist/client/{eventCalendar-BAtdnR4s.mjs → eventCalendar-CKwgXui5.mjs} +9 -9
  114. package/dist/client/{eventCombined-RksA3tRC.mjs → eventCombined-CBAOSTGR.mjs} +4 -4
  115. package/dist/client/{eventDetails-BB9hB4wR.mjs → eventDetails-Dh-_WiBD.mjs} +4 -4
  116. package/dist/client/{eventListing-BpJBkviM.mjs → eventListing-CA3frIH5.mjs} +4 -4
  117. package/dist/client/{eventRegistration-B18jFq_o.mjs → eventRegistration-BHtsgdcg.mjs} +21 -22
  118. package/dist/client/{form-Dodt8Y8t.mjs → form-C2h3YAcg.mjs} +135 -104
  119. package/dist/client/{headerSection-B0qj9ttg.mjs → headerSection-lwMuMTH9.mjs} +3 -3
  120. package/dist/client/hooks.mjs +489 -65
  121. package/dist/client/{locationMap-gn-iMk7a.mjs → locationMap-DJ2bLODV.mjs} +3 -3
  122. package/dist/client/{newsletterForm-oByLdFkr.mjs → newsletterForm-8Pu5K32g.mjs} +203 -101
  123. package/dist/client/{pricing-BOU0_Hai.mjs → pricing-HHx3IgBz.mjs} +1 -1
  124. package/dist/client/{productDetail-D9v1zH2j.mjs → productDetail-C_1odnAf.mjs} +3 -3
  125. package/dist/client/{productList-D-mItx1n.mjs → productList-CtCv-Nmx.mjs} +3 -3
  126. package/dist/client/{propsDecoder-C3TP_z4x.mjs → propsDecoder-Dcgsncxb.mjs} +40 -23
  127. package/dist/client/rendering/client.mjs +490 -457
  128. package/dist/client/rendering/islands.mjs +17 -17
  129. package/dist/client/rendering.mjs +1515 -628
  130. package/dist/client/{routeIslandApiConfig-DzN1W0sq.mjs → routeIslandApiConfig-CWLP7wu3.mjs} +1 -1
  131. package/dist/client/{scrollToBlock-CWs8EIdo.mjs → scrollToBlock-BNgaEUpo.mjs} +1 -1
  132. package/dist/client/{shop-Dufw7N7o.mjs → shop-DQXrQ8kJ.mjs} +7 -7
  133. package/dist/client/{shop-commerce-gklw_hLF.mjs → shop-commerce-B88zmWWo.mjs} +6 -6
  134. package/dist/client/{shop-commerce-store-Sf1eyTaZ.mjs → shop-commerce-store-DtSfkKuX.mjs} +1 -1
  135. package/dist/client/{shopShared-B5nyA41S.mjs → shopShared-cuaONpkJ.mjs} +4 -4
  136. package/dist/client/{useEventFilters-CLL829vy.mjs → useEventFilters-Bukew6Gb.mjs} +6 -6
  137. package/dist/preview-next/before-render.mjs +368 -103
  138. package/dist/preview-next/client/runtime.mjs +4 -4
  139. package/dist/preview-next/editor-base.css +11 -0
  140. package/dist/preview-next/keepAlive.mjs +328 -103
  141. package/dist/preview-next/middleware.mjs +329 -103
  142. package/dist/{previewAuthStore-BxAFlu-j.mjs → previewAuthStore-h5IgbSp4.mjs} +353 -103
  143. package/dist/{sdk-runtime-D0uZFev7.mjs → sdk-runtime-DTc1uIXn.mjs} +2 -2
  144. package/dist/{separator-EvdCAn4V.mjs → separator-BpHS1KZK.mjs} +1 -1
  145. package/dist/server/components.mjs +1376 -331
  146. package/dist/server/config-validation.mjs +405 -27
  147. package/dist/server/config.mjs +405 -27
  148. package/dist/server/data.mjs +405 -27
  149. package/dist/server/index.mjs +370 -104
  150. package/dist/server/next.mjs +1430 -463
  151. package/dist/server/page-converter.mjs +36 -25
  152. package/dist/server/prebuild.mjs +1 -1
  153. package/dist/server/rendering/server.mjs +1374 -331
  154. package/dist/server/rendering.mjs +1436 -364
  155. package/dist/server/routing.mjs +476 -43
  156. package/dist/server/server.mjs +504 -169
  157. package/dist/server/theme-bridge.mjs +467 -111
  158. package/dist/styles/index.css +186 -65
  159. package/package.json +1 -1
@@ -1,8 +1,26 @@
1
1
  import type { EventOccurrenceStatus } from './bookingRecords';
2
+ import type { EventPageState } from './eventManagementContracts';
2
3
  import type { EventOfferingId, EventSeriesId, OccurrenceId } from '../../core/src/index';
3
4
  import type { SdkEventCanonicalScheduleInput, SdkPullEvent, SdkPullEventRun } from './sdkContracts';
4
5
  export type SdkManagementEvent = SdkPullEvent & {
5
6
  id: EventOfferingId;
7
+ /**
8
+ * Whether the Event's own page is currently reachable by the public, derived
9
+ * from its route exactly as the dashboard's lifecycle service derives it
10
+ * (`EventPageState`): published means `online`, anything else `offline`.
11
+ *
12
+ * Read-only, and deliberately absent from the portable pull/upsert shape: a
13
+ * page goes online or offline through lifecycle operations, never by being
14
+ * written back in an event file.
15
+ *
16
+ * Optional only for the length of one release, for the same reason as
17
+ * `confirmedPlaces` below. A published CLI can be pointed at a dashboard
18
+ * that predates this field, and making it required would fail the whole
19
+ * event response parse rather than one column. Make it required once every
20
+ * dashboard carrying this change is live. While it is absent, a client
21
+ * cannot prove the page state and must say so rather than assume.
22
+ */
23
+ pageState?: EventPageState;
6
24
  };
7
25
  export type SdkManagementEventRun = SdkPullEventRun & {
8
26
  id: EventSeriesId;
@@ -0,0 +1,388 @@
1
+ /**
2
+ * The portable page design document (issue 1497).
3
+ *
4
+ * A stored `PageDesignIntent` names blocks by their database ids, so it only
5
+ * makes sense on the page it came from. The portable document is the same
6
+ * intent with every block reference expressed as the block's management
7
+ * identifier (`hero-0`, `body-text-1`), which is what lets a design travel from
8
+ * one page to another page built from the same blocks.
9
+ *
10
+ * A boundary is carried as its identifier pair only. Its stored `boundaryId`
11
+ * is derived from the pair after mapping, so the two can never disagree.
12
+ *
13
+ * The document is parsed once, here, at the JSON boundary. Whether it fits a
14
+ * particular destination page is a separate, semantic decision made by the
15
+ * dashboard against that page's blocks and site style.
16
+ */
17
+ import { z } from 'zod';
18
+ import type { Brand } from '../../core/src/index';
19
+ import { pageDesignIntentSchemaVersion, type AppearancePresetId, type PageDesignUserPinnedChoice, type PageFlowPresetId, type SectionBoundaryTreatment, type SiteStyleId } from '../../theme-core/src/site-styles/index';
20
+ import type { APIEndpoint } from './apiEndpointTypes';
21
+ import type { PageDesignRevisionToken } from './siteRuntimeEndpoints';
22
+ /** A block's management identifier, as a page's blocks carry it. */
23
+ export type BlockIdentifier = Brand<string, 'BlockIdentifier'>;
24
+ export declare const unsafeAsBlockIdentifier: (value: string) => BlockIdentifier;
25
+ export type PortableBlockLookPin = Readonly<{
26
+ blockIdentifier: BlockIdentifier;
27
+ blockKind: string;
28
+ choice: PageDesignUserPinnedChoice<AppearancePresetId>;
29
+ }>;
30
+ export type PortableBoundaryPin = Readonly<{
31
+ previousBlockIdentifier: BlockIdentifier;
32
+ nextBlockIdentifier: BlockIdentifier;
33
+ choice: PageDesignUserPinnedChoice<SectionBoundaryTreatment>;
34
+ }>;
35
+ /** `PageDesignIntent`, keyed by block identifier instead of block id. */
36
+ export type PortablePageDesign = Readonly<{
37
+ schemaVersion: typeof pageDesignIntentSchemaVersion;
38
+ siteStyleId: SiteStyleId;
39
+ pageFlowPresetId: PageFlowPresetId;
40
+ blockLookPins: readonly PortableBlockLookPin[];
41
+ boundaryPins: readonly PortableBoundaryPin[];
42
+ }>;
43
+ /**
44
+ * A stored pin the portable document could not carry because it names a block
45
+ * that is no longer on the page. Such pins have no effect in the editor or on
46
+ * the rendered page; they are reported so nothing is dropped silently.
47
+ */
48
+ export type OmittedPagePin = Readonly<{
49
+ kind: 'look-on-missing-block';
50
+ blockId: string;
51
+ }> | Readonly<{
52
+ kind: 'boundary-on-missing-block';
53
+ previousBlockId: string;
54
+ nextBlockId: string;
55
+ }>;
56
+ /**
57
+ * Where a stored design was read from. A page with a draft design reads the
58
+ * draft; a page without one reads its latest published design (decision D9).
59
+ */
60
+ export type PageDesignStoredSource = 'draft' | 'published';
61
+ /**
62
+ * A page's stored design. `absent` means nothing was ever saved for the page;
63
+ * its site style's defaults are never exported as authored intent.
64
+ */
65
+ export type SdkGetPageDesignResponse = Readonly<{
66
+ kind: 'absent';
67
+ }> | Readonly<{
68
+ kind: 'stored';
69
+ source: PageDesignStoredSource;
70
+ design: PortablePageDesign;
71
+ revision: PageDesignRevisionToken;
72
+ omitted: readonly OmittedPagePin[];
73
+ }>;
74
+ export type SdkSavePageDesignBody = Readonly<{
75
+ design: PortablePageDesign;
76
+ expectedRevision: PageDesignRevisionToken;
77
+ }>;
78
+ export type SdkSavePageDesignResponse = Readonly<{
79
+ outcome: 'created' | 'updated';
80
+ revision: PageDesignRevisionToken;
81
+ }>;
82
+ export type SdkPageDesignAPIEndpoints = {
83
+ sdkGetPageDesign: APIEndpoint<never, {
84
+ siteId: string;
85
+ identifier: string;
86
+ }, SdkGetPageDesignResponse>;
87
+ sdkSavePageDesign: APIEndpoint<SdkSavePageDesignBody, {
88
+ siteId: string;
89
+ identifier: string;
90
+ }, SdkSavePageDesignResponse>;
91
+ };
92
+ export declare const portablePageDesignSchema: z.ZodObject<{
93
+ schemaVersion: z.ZodLiteral<2>;
94
+ siteStyleId: z.ZodPipe<z.ZodString, z.ZodTransform<SiteStyleId, string>>;
95
+ pageFlowPresetId: z.ZodPipe<z.ZodString, z.ZodTransform<PageFlowPresetId, string>>;
96
+ blockLookPins: z.ZodArray<z.ZodObject<{
97
+ blockIdentifier: z.ZodPipe<z.ZodString, z.ZodTransform<BlockIdentifier, string>>;
98
+ blockKind: z.ZodString;
99
+ choice: z.ZodObject<{
100
+ kind: z.ZodLiteral<"user-pinned">;
101
+ value: z.ZodPipe<z.ZodString, z.ZodTransform<AppearancePresetId, string>>;
102
+ }, z.core.$strict>;
103
+ }, z.core.$strict>>;
104
+ boundaryPins: z.ZodArray<z.ZodObject<{
105
+ previousBlockIdentifier: z.ZodPipe<z.ZodString, z.ZodTransform<BlockIdentifier, string>>;
106
+ nextBlockIdentifier: z.ZodPipe<z.ZodString, z.ZodTransform<BlockIdentifier, string>>;
107
+ choice: z.ZodObject<{
108
+ kind: z.ZodLiteral<"user-pinned">;
109
+ value: z.ZodDiscriminatedUnion<[z.ZodObject<{
110
+ kind: z.ZodLiteral<"none">;
111
+ }, z.core.$strict>, z.ZodObject<{
112
+ kind: z.ZodLiteral<"soft-fade">;
113
+ height: z.ZodEnum<{
114
+ medium: "medium";
115
+ compact: "compact";
116
+ large: "large";
117
+ expansive: "expansive";
118
+ }>;
119
+ curve: z.ZodEnum<{
120
+ soft: "soft";
121
+ spacious: "spacious";
122
+ expansive: "expansive";
123
+ }>;
124
+ }, z.core.$strict>, z.ZodObject<{
125
+ kind: z.ZodLiteral<"wave-edge">;
126
+ height: z.ZodEnum<{
127
+ medium: "medium";
128
+ compact: "compact";
129
+ large: "large";
130
+ }>;
131
+ amplitude: z.ZodEnum<{
132
+ bold: "bold";
133
+ subtle: "subtle";
134
+ balanced: "balanced";
135
+ }>;
136
+ rhythm: z.ZodEnum<{
137
+ single: "single";
138
+ double: "double";
139
+ }>;
140
+ symmetry: z.ZodEnum<{
141
+ drift: "drift";
142
+ symmetrical: "symmetrical";
143
+ asymmetrical: "asymmetrical";
144
+ }>;
145
+ }, z.core.$strict>, z.ZodObject<{
146
+ kind: z.ZodLiteral<"angle-edge">;
147
+ height: z.ZodEnum<{
148
+ medium: "medium";
149
+ compact: "compact";
150
+ large: "large";
151
+ }>;
152
+ slope: z.ZodEnum<{
153
+ subtle: "subtle";
154
+ balanced: "balanced";
155
+ steep: "steep";
156
+ }>;
157
+ direction: z.ZodEnum<{
158
+ reverse: "reverse";
159
+ forward: "forward";
160
+ }>;
161
+ }, z.core.$strict>, z.ZodObject<{
162
+ kind: z.ZodLiteral<"legacy-unsupported">;
163
+ boundaryOptionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../blocks/src/index").BoundaryOptionId, string>>;
164
+ }, z.core.$strict>], "kind">;
165
+ }, z.core.$strict>;
166
+ }, z.core.$strict>>;
167
+ }, z.core.$strict>;
168
+ export declare const pageDesignRevisionTokenSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
169
+ kind: z.ZodLiteral<"absent">;
170
+ }, z.core.$strict>, z.ZodObject<{
171
+ kind: z.ZodLiteral<"draft">;
172
+ contentVersionId: z.ZodString;
173
+ updatedAt: z.ZodString;
174
+ }, z.core.$strict>, z.ZodObject<{
175
+ kind: z.ZodLiteral<"published">;
176
+ contentVersionId: z.ZodString;
177
+ updatedAt: z.ZodString;
178
+ }, z.core.$strict>], "kind">;
179
+ export declare const sdkSavePageDesignBodySchema: z.ZodObject<{
180
+ design: z.ZodObject<{
181
+ schemaVersion: z.ZodLiteral<2>;
182
+ siteStyleId: z.ZodPipe<z.ZodString, z.ZodTransform<SiteStyleId, string>>;
183
+ pageFlowPresetId: z.ZodPipe<z.ZodString, z.ZodTransform<PageFlowPresetId, string>>;
184
+ blockLookPins: z.ZodArray<z.ZodObject<{
185
+ blockIdentifier: z.ZodPipe<z.ZodString, z.ZodTransform<BlockIdentifier, string>>;
186
+ blockKind: z.ZodString;
187
+ choice: z.ZodObject<{
188
+ kind: z.ZodLiteral<"user-pinned">;
189
+ value: z.ZodPipe<z.ZodString, z.ZodTransform<AppearancePresetId, string>>;
190
+ }, z.core.$strict>;
191
+ }, z.core.$strict>>;
192
+ boundaryPins: z.ZodArray<z.ZodObject<{
193
+ previousBlockIdentifier: z.ZodPipe<z.ZodString, z.ZodTransform<BlockIdentifier, string>>;
194
+ nextBlockIdentifier: z.ZodPipe<z.ZodString, z.ZodTransform<BlockIdentifier, string>>;
195
+ choice: z.ZodObject<{
196
+ kind: z.ZodLiteral<"user-pinned">;
197
+ value: z.ZodDiscriminatedUnion<[z.ZodObject<{
198
+ kind: z.ZodLiteral<"none">;
199
+ }, z.core.$strict>, z.ZodObject<{
200
+ kind: z.ZodLiteral<"soft-fade">;
201
+ height: z.ZodEnum<{
202
+ medium: "medium";
203
+ compact: "compact";
204
+ large: "large";
205
+ expansive: "expansive";
206
+ }>;
207
+ curve: z.ZodEnum<{
208
+ soft: "soft";
209
+ spacious: "spacious";
210
+ expansive: "expansive";
211
+ }>;
212
+ }, z.core.$strict>, z.ZodObject<{
213
+ kind: z.ZodLiteral<"wave-edge">;
214
+ height: z.ZodEnum<{
215
+ medium: "medium";
216
+ compact: "compact";
217
+ large: "large";
218
+ }>;
219
+ amplitude: z.ZodEnum<{
220
+ bold: "bold";
221
+ subtle: "subtle";
222
+ balanced: "balanced";
223
+ }>;
224
+ rhythm: z.ZodEnum<{
225
+ single: "single";
226
+ double: "double";
227
+ }>;
228
+ symmetry: z.ZodEnum<{
229
+ drift: "drift";
230
+ symmetrical: "symmetrical";
231
+ asymmetrical: "asymmetrical";
232
+ }>;
233
+ }, z.core.$strict>, z.ZodObject<{
234
+ kind: z.ZodLiteral<"angle-edge">;
235
+ height: z.ZodEnum<{
236
+ medium: "medium";
237
+ compact: "compact";
238
+ large: "large";
239
+ }>;
240
+ slope: z.ZodEnum<{
241
+ subtle: "subtle";
242
+ balanced: "balanced";
243
+ steep: "steep";
244
+ }>;
245
+ direction: z.ZodEnum<{
246
+ reverse: "reverse";
247
+ forward: "forward";
248
+ }>;
249
+ }, z.core.$strict>, z.ZodObject<{
250
+ kind: z.ZodLiteral<"legacy-unsupported">;
251
+ boundaryOptionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../blocks/src/index").BoundaryOptionId, string>>;
252
+ }, z.core.$strict>], "kind">;
253
+ }, z.core.$strict>;
254
+ }, z.core.$strict>>;
255
+ }, z.core.$strict>;
256
+ expectedRevision: z.ZodDiscriminatedUnion<[z.ZodObject<{
257
+ kind: z.ZodLiteral<"absent">;
258
+ }, z.core.$strict>, z.ZodObject<{
259
+ kind: z.ZodLiteral<"draft">;
260
+ contentVersionId: z.ZodString;
261
+ updatedAt: z.ZodString;
262
+ }, z.core.$strict>, z.ZodObject<{
263
+ kind: z.ZodLiteral<"published">;
264
+ contentVersionId: z.ZodString;
265
+ updatedAt: z.ZodString;
266
+ }, z.core.$strict>], "kind">;
267
+ }, z.core.$strict>;
268
+ export declare const sdkGetPageDesignResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
269
+ kind: z.ZodLiteral<"absent">;
270
+ }, z.core.$strip>, z.ZodObject<{
271
+ kind: z.ZodLiteral<"stored">;
272
+ source: z.ZodEnum<{
273
+ draft: "draft";
274
+ published: "published";
275
+ }>;
276
+ design: z.ZodObject<{
277
+ schemaVersion: z.ZodLiteral<2>;
278
+ siteStyleId: z.ZodPipe<z.ZodString, z.ZodTransform<SiteStyleId, string>>;
279
+ pageFlowPresetId: z.ZodPipe<z.ZodString, z.ZodTransform<PageFlowPresetId, string>>;
280
+ blockLookPins: z.ZodArray<z.ZodObject<{
281
+ blockIdentifier: z.ZodPipe<z.ZodString, z.ZodTransform<BlockIdentifier, string>>;
282
+ blockKind: z.ZodString;
283
+ choice: z.ZodObject<{
284
+ kind: z.ZodLiteral<"user-pinned">;
285
+ value: z.ZodPipe<z.ZodString, z.ZodTransform<AppearancePresetId, string>>;
286
+ }, z.core.$strict>;
287
+ }, z.core.$strict>>;
288
+ boundaryPins: z.ZodArray<z.ZodObject<{
289
+ previousBlockIdentifier: z.ZodPipe<z.ZodString, z.ZodTransform<BlockIdentifier, string>>;
290
+ nextBlockIdentifier: z.ZodPipe<z.ZodString, z.ZodTransform<BlockIdentifier, string>>;
291
+ choice: z.ZodObject<{
292
+ kind: z.ZodLiteral<"user-pinned">;
293
+ value: z.ZodDiscriminatedUnion<[z.ZodObject<{
294
+ kind: z.ZodLiteral<"none">;
295
+ }, z.core.$strict>, z.ZodObject<{
296
+ kind: z.ZodLiteral<"soft-fade">;
297
+ height: z.ZodEnum<{
298
+ medium: "medium";
299
+ compact: "compact";
300
+ large: "large";
301
+ expansive: "expansive";
302
+ }>;
303
+ curve: z.ZodEnum<{
304
+ soft: "soft";
305
+ spacious: "spacious";
306
+ expansive: "expansive";
307
+ }>;
308
+ }, z.core.$strict>, z.ZodObject<{
309
+ kind: z.ZodLiteral<"wave-edge">;
310
+ height: z.ZodEnum<{
311
+ medium: "medium";
312
+ compact: "compact";
313
+ large: "large";
314
+ }>;
315
+ amplitude: z.ZodEnum<{
316
+ bold: "bold";
317
+ subtle: "subtle";
318
+ balanced: "balanced";
319
+ }>;
320
+ rhythm: z.ZodEnum<{
321
+ single: "single";
322
+ double: "double";
323
+ }>;
324
+ symmetry: z.ZodEnum<{
325
+ drift: "drift";
326
+ symmetrical: "symmetrical";
327
+ asymmetrical: "asymmetrical";
328
+ }>;
329
+ }, z.core.$strict>, z.ZodObject<{
330
+ kind: z.ZodLiteral<"angle-edge">;
331
+ height: z.ZodEnum<{
332
+ medium: "medium";
333
+ compact: "compact";
334
+ large: "large";
335
+ }>;
336
+ slope: z.ZodEnum<{
337
+ subtle: "subtle";
338
+ balanced: "balanced";
339
+ steep: "steep";
340
+ }>;
341
+ direction: z.ZodEnum<{
342
+ reverse: "reverse";
343
+ forward: "forward";
344
+ }>;
345
+ }, z.core.$strict>, z.ZodObject<{
346
+ kind: z.ZodLiteral<"legacy-unsupported">;
347
+ boundaryOptionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../blocks/src/index").BoundaryOptionId, string>>;
348
+ }, z.core.$strict>], "kind">;
349
+ }, z.core.$strict>;
350
+ }, z.core.$strict>>;
351
+ }, z.core.$strict>;
352
+ revision: z.ZodDiscriminatedUnion<[z.ZodObject<{
353
+ kind: z.ZodLiteral<"absent">;
354
+ }, z.core.$strict>, z.ZodObject<{
355
+ kind: z.ZodLiteral<"draft">;
356
+ contentVersionId: z.ZodString;
357
+ updatedAt: z.ZodString;
358
+ }, z.core.$strict>, z.ZodObject<{
359
+ kind: z.ZodLiteral<"published">;
360
+ contentVersionId: z.ZodString;
361
+ updatedAt: z.ZodString;
362
+ }, z.core.$strict>], "kind">;
363
+ omitted: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
364
+ kind: z.ZodLiteral<"look-on-missing-block">;
365
+ blockId: z.ZodString;
366
+ }, z.core.$strip>, z.ZodObject<{
367
+ kind: z.ZodLiteral<"boundary-on-missing-block">;
368
+ previousBlockId: z.ZodString;
369
+ nextBlockId: z.ZodString;
370
+ }, z.core.$strip>], "kind">>;
371
+ }, z.core.$strip>], "kind">;
372
+ export declare const sdkSavePageDesignResponseSchema: z.ZodObject<{
373
+ outcome: z.ZodEnum<{
374
+ updated: "updated";
375
+ created: "created";
376
+ }>;
377
+ revision: z.ZodDiscriminatedUnion<[z.ZodObject<{
378
+ kind: z.ZodLiteral<"absent">;
379
+ }, z.core.$strict>, z.ZodObject<{
380
+ kind: z.ZodLiteral<"draft">;
381
+ contentVersionId: z.ZodString;
382
+ updatedAt: z.ZodString;
383
+ }, z.core.$strict>, z.ZodObject<{
384
+ kind: z.ZodLiteral<"published">;
385
+ contentVersionId: z.ZodString;
386
+ updatedAt: z.ZodString;
387
+ }, z.core.$strict>], "kind">;
388
+ }, z.core.$strip>;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * SDK management endpoints for a page's draft design (issue 1497), spread into
3
+ * `ENDPOINT_DEFINITIONS` like the other endpoint-definition modules. New
4
+ * entries here must declare `errors`, which the require-api-endpoint-errors
5
+ * lint enforces.
6
+ */
7
+ export declare const SDK_PAGE_DESIGN_ENDPOINT_DEFINITIONS: {
8
+ sdkGetPageDesign: {
9
+ path: "/sdk/{siteId}/pages/{identifier}/design";
10
+ method: "GET";
11
+ auth: "service";
12
+ responseKind: "json";
13
+ errors: ("validation:invalid_input" | "resource:not_found" | "server:internal_error")[];
14
+ };
15
+ sdkSavePageDesign: {
16
+ path: "/sdk/{siteId}/pages/{identifier}/design";
17
+ method: "POST";
18
+ auth: "service";
19
+ responseKind: "json";
20
+ errors: ("validation:invalid_input" | "resource:not_found" | "resource:conflict" | "server:internal_error")[];
21
+ };
22
+ };
@@ -0,0 +1,46 @@
1
+ import type { EventPreset, RichTextDoc } from '../../core/src/index';
2
+ import type { SdkEventBookingOffer, SdkEntrySlotBlocks } from './sdkContracts';
3
+ import type { SdkPullEventOccurrence } from './sdk-event-schedule';
4
+ import type { SdkPulledCourseBooking } from './sdkCourseBooking';
5
+ /** A course also carries `courseBooking`; see `SdkPulledCourseBooking`. */
6
+ export interface SdkPullEvent extends SdkPulledCourseBooking {
7
+ identifier: string;
8
+ administrativeStatus: 'active' | 'archived';
9
+ title: string;
10
+ slug: string;
11
+ path: string | null;
12
+ preset: EventPreset;
13
+ runRefs: readonly [string, ...string[]];
14
+ content: {
15
+ summary?: string;
16
+ body?: RichTextDoc;
17
+ image?: Record<string, unknown> & {
18
+ identifier: string;
19
+ };
20
+ [key: string]: unknown;
21
+ };
22
+ updatedAt: string;
23
+ createdAt: string;
24
+ contentUpdatedAt: string | null;
25
+ blocks?: SdkEntrySlotBlocks;
26
+ }
27
+ export interface SdkPullEventRun {
28
+ identifier: string;
29
+ eventRef: string;
30
+ name: string | null;
31
+ status: 'draft' | 'active' | 'archived' | 'cancelled' | 'completed';
32
+ /** Absent on a run of a course: listing is the course's (`courseBooking`). */
33
+ visibility?: 'public' | 'unlisted';
34
+ bookingScope: 'single_occurrence' | 'whole_series';
35
+ occurrences: readonly SdkPullEventOccurrence[];
36
+ capacity: number | null;
37
+ bookingOffer: SdkEventBookingOffer;
38
+ venueRef: string | null;
39
+ categoryRef: string | null;
40
+ formRef: string | null;
41
+ settings: Record<string, unknown>;
42
+ presentation: Record<string, unknown> | null;
43
+ tags: string[];
44
+ updatedAt: string;
45
+ createdAt: string;
46
+ }
@@ -0,0 +1,29 @@
1
+ import type { APIEndpoint } from './apiEndpointTypes';
2
+ /**
3
+ * A site's managed address can change until it goes live. Refusals arrive as
4
+ * an error envelope whose `fieldErrors[0]` has `field: 'slug'` and one of
5
+ * these codes: 409 `address_taken` | `already_live`, 422 `reserved` |
6
+ * `invalid_format`.
7
+ */
8
+ export type SiteAddressChangeRefusalCode = 'address_taken' | 'already_live' | 'reserved' | 'invalid_format';
9
+ export type ChangeSiteAddressRequest = {
10
+ slug: string;
11
+ };
12
+ export type ChangeSiteAddressResponse = {
13
+ kind: 'changed' | 'unchanged';
14
+ slug: string;
15
+ };
16
+ /** `slug` is the checked value after trimming and lower-casing. */
17
+ export type SiteAddressAvailabilityResponse = {
18
+ kind: 'available' | 'taken' | 'reserved' | 'invalid_format';
19
+ slug: string;
20
+ };
21
+ export type SiteAddressAPIEndpoints = {
22
+ changeSiteAddress: APIEndpoint<ChangeSiteAddressRequest, {
23
+ siteId: string;
24
+ }, ChangeSiteAddressResponse>;
25
+ getSiteAddressAvailability: APIEndpoint<never, {
26
+ siteId: string;
27
+ slug: string;
28
+ }, SiteAddressAvailabilityResponse>;
29
+ };
@@ -0,0 +1,49 @@
1
+ export declare const SITE_MANAGEMENT_ENDPOINT_DEFINITIONS: {
2
+ createSite: {
3
+ path: "/sites/manage";
4
+ method: "POST";
5
+ tags: "site"[];
6
+ auth: "user";
7
+ responseKind: "json";
8
+ };
9
+ updateSite: {
10
+ path: "/sites/manage";
11
+ method: "PUT";
12
+ tags: "site"[];
13
+ auth: "user";
14
+ responseKind: "json";
15
+ };
16
+ changeSiteAddress: {
17
+ path: "/sites/{siteId}/address";
18
+ method: "PUT";
19
+ auth: "user";
20
+ responseKind: "json";
21
+ demoMutation: {
22
+ classification: "allowed";
23
+ publicMessage: "";
24
+ } | {
25
+ classification: import("./apiEndpointTypes").ApiDemoMutationBlockingClassification;
26
+ publicMessage: string;
27
+ };
28
+ };
29
+ getSiteAddressAvailability: {
30
+ path: "/sites/{siteId}/address/availability";
31
+ method: "GET";
32
+ auth: "user";
33
+ responseKind: "json";
34
+ };
35
+ deleteSite: {
36
+ path: "/sites/{siteId}";
37
+ method: "DELETE";
38
+ tags: ("site" | "site-{siteId}")[];
39
+ auth: "user";
40
+ responseKind: "json";
41
+ demoMutation: {
42
+ classification: "allowed";
43
+ publicMessage: "";
44
+ } | {
45
+ classification: import("./apiEndpointTypes").ApiDemoMutationBlockingClassification;
46
+ publicMessage: string;
47
+ };
48
+ };
49
+ };
@@ -14,8 +14,7 @@ import type { GetVersionHistoryResponse, ListVersionHistoryResponse, RestoreVers
14
14
  import type { ApplyContentTemplateAddonRequest, ContentTemplateDetailsResponse, CreateTemplateBlockRequest, GetTransformsResponse, ReorderTemplateBlocksRequest, SerializedContentTypeSummary, UpdateContentTemplateBlockBindingsRequest, UpdateContentTemplateBlockRequest } from './contentTypes';
15
15
  import type { LinkPayload, RoutableContentItem, SitemapRouteItem } from './navigation/types';
16
16
  import type { RouteMetadataPayload, RouteMetadataResponse } from './routes';
17
- import type { PageSurfaceEditorDocument, PublishPageSurfaceResponse } from './contentRuntime';
18
- import type { ContentRouteRecord } from './types';
17
+ import type { PageSurfaceAPIEndpoints } from './pageSurfaceEndpoints';
19
18
  import type { SiteAnalyticsSettingsPayload, SiteAnalyticsSettingsResponse } from './siteAnalytics';
20
19
  import type { SiteBannerSettingsPayload, SiteBannerSettingsResponse } from './siteBanner';
21
20
  import type { GeneratedIconSetGenerateRequest, GeneratedIconSetGenerateResponse, GeneratedIconSetListRequest, GeneratedIconSetListResponse, SiteIconStyleGuideResponse, SiteIconStyleGuideUpdateRequest } from './siteIcons';
@@ -146,7 +145,7 @@ type DsarExecutionOutcomeApi = {
146
145
  detail: string;
147
146
  message: string;
148
147
  };
149
- export type SiteManagementAPIEndpoints = BillingAPIEndpoints & {
148
+ export type SiteManagementAPIEndpoints = BillingAPIEndpoints & PageSurfaceAPIEndpoints & {
150
149
  createSite: APIEndpoint<{
151
150
  title: string;
152
151
  }, never, {
@@ -247,35 +246,6 @@ export type SiteManagementAPIEndpoints = BillingAPIEndpoints & {
247
246
  type: string;
248
247
  entryId: string;
249
248
  }, ContentEntryOrPageResponse>;
250
- updatePageSurfaceDraftContent: APIEndpoint<{
251
- data: Record<string, unknown>;
252
- optimisticHash: string;
253
- }, {
254
- siteId: string;
255
- pageSurfaceId: string;
256
- }, {
257
- document: PageSurfaceEditorDocument;
258
- }>;
259
- discardPageSurfaceDraftContent: APIEndpoint<{
260
- optimisticHash: string;
261
- }, {
262
- siteId: string;
263
- pageSurfaceId: string;
264
- }, {
265
- document: PageSurfaceEditorDocument;
266
- }>;
267
- updatePageSurfaceRouteMetadata: APIEndpoint<Pick<RouteMetadataPayload, 'draftSlug' | 'draftMetaTitle' | 'draftMetaDescription' | 'ogImageId'> & {
268
- expectedDraftUpdatedAt: string | null;
269
- }, {
270
- siteId: string;
271
- pageSurfaceId: string;
272
- }, {
273
- route: ContentRouteRecord;
274
- }>;
275
- publishPageSurface: APIEndpoint<never, {
276
- siteId: string;
277
- pageSurfaceId: string;
278
- }, PublishPageSurfaceResponse>;
279
249
  runSdkWorkflow: APIEndpoint<never, {
280
250
  siteId: string;
281
251
  type: string;