@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
@@ -899,15 +899,6 @@ function parseMailingListContentVersionId(value) {
899
899
  const parsed = parseContentVersionId(value);
900
900
  return parsed.ok ? parsed.value : null;
901
901
  }
902
- function buildMailingListSignupBlockSourceRef(blockId, contentVersionId) {
903
- const parsedBlockId = parseMailingListBlockId(blockId);
904
- const parsedContentVersionId = parseMailingListContentVersionId(contentVersionId);
905
- return parsedBlockId !== null && parsedContentVersionId !== null ? {
906
- tag: "block_ref",
907
- blockId: parsedBlockId,
908
- contentVersionId: parsedContentVersionId
909
- } : null;
910
- }
911
902
  //#endregion
912
903
  //#region ../core/src/secret.ts
913
904
  /**
@@ -8062,6 +8053,7 @@ const publicEventLoaderQuerySchemaShape = {
8062
8053
  seriesSlug: z.string().optional(),
8063
8054
  includeOccurrenceId: z.string().optional(),
8064
8055
  readIntent: z.string().optional(),
8056
+ detailAdmission: z.string().optional(),
8065
8057
  detailLevel: z.string().optional(),
8066
8058
  readProfile: z.string().optional()
8067
8059
  };
@@ -8228,11 +8220,11 @@ const publicEventBookingAvailabilitySchema = z.discriminatedUnion("kind", [z.obj
8228
8220
  "series_archived",
8229
8221
  "parent_archived",
8230
8222
  "parent_inconsistent",
8231
- "not_public",
8232
8223
  "already_started",
8233
8224
  "enrollment_closed"
8234
8225
  ])
8235
8226
  })]);
8227
+ const publicEventBookingClosedDetailSchema = z.discriminatedUnion("kind", [z.object({ kind: z.literal("opensSoon") }), z.object({ kind: z.literal("paused") })]);
8236
8228
  const publicRunSessionSchema = z.object({
8237
8229
  occurrenceId: z.string(),
8238
8230
  startsAt: z.string(),
@@ -8277,6 +8269,7 @@ const publicEventBaseSchema = z.object({
8277
8269
  destination: publicEventDestinationSchema,
8278
8270
  requiresRegistration: z.boolean(),
8279
8271
  bookingAvailability: publicEventBookingAvailabilitySchema,
8272
+ bookingClosedDetail: publicEventBookingClosedDetailSchema.optional(),
8280
8273
  deliveryMode: z.enum([
8281
8274
  "in_person",
8282
8275
  "online",
@@ -9510,6 +9503,13 @@ const EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS = defineEndpointDefinitions
9510
9503
  errors: [],
9511
9504
  responseKind: "blob"
9512
9505
  },
9506
+ exportEventOfferingRegistrationsCsv: {
9507
+ path: "/sites/{siteId}/bookings/event-offerings/{eventOfferingId}/registrations/export.csv",
9508
+ method: "GET",
9509
+ auth: "user",
9510
+ errors: [],
9511
+ responseKind: "blob"
9512
+ },
9513
9513
  updateEventSeriesRegistration: {
9514
9514
  path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations/{registrationId}",
9515
9515
  method: "PATCH",
@@ -9520,6 +9520,19 @@ const EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS = defineEndpointDefinitions
9520
9520
  "resource:not_found",
9521
9521
  "server:internal_error"
9522
9522
  ]
9523
+ },
9524
+ saveEventSeriesRegistrationAnswers: {
9525
+ path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations/{registrationId}/answers",
9526
+ method: "PUT",
9527
+ auth: "user",
9528
+ responseKind: "json",
9529
+ errors: [
9530
+ "validation:invalid_input",
9531
+ "auth:forbidden",
9532
+ "resource:not_found",
9533
+ "resource:conflict",
9534
+ "server:internal_error"
9535
+ ]
9523
9536
  }
9524
9537
  });
9525
9538
  //#endregion
@@ -9940,6 +9953,30 @@ const NEWSLETTER_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
9940
9953
  responseKind: "json",
9941
9954
  demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
9942
9955
  },
9956
+ scheduleNewsletterCampaign: {
9957
+ path: "/sites/{siteId}/newsletter/campaigns/{campaignId}/schedule",
9958
+ method: "POST",
9959
+ tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteNewsletter],
9960
+ auth: "user",
9961
+ responseKind: "json",
9962
+ demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
9963
+ },
9964
+ unscheduleNewsletterCampaign: {
9965
+ path: "/sites/{siteId}/newsletter/campaigns/{campaignId}/unschedule",
9966
+ method: "POST",
9967
+ tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteNewsletter],
9968
+ auth: "user",
9969
+ responseKind: "json",
9970
+ demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
9971
+ },
9972
+ stopNewsletterCampaign: {
9973
+ path: "/sites/{siteId}/newsletter/campaigns/{campaignId}/stop",
9974
+ method: "POST",
9975
+ tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteNewsletter],
9976
+ auth: "user",
9977
+ responseKind: "json",
9978
+ demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
9979
+ },
9943
9980
  testSendNewsletterCampaign: {
9944
9981
  path: "/sites/{siteId}/newsletter/campaigns/{campaignId}/test-send",
9945
9982
  method: "POST",
@@ -9950,6 +9987,154 @@ const NEWSLETTER_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
9950
9987
  }
9951
9988
  });
9952
9989
  //#endregion
9990
+ //#region ../api/src/sdkEventEndpointDefinitions.ts
9991
+ /**
9992
+ * The SDK's Event graph: the Events themselves and the occurrences of one run.
9993
+ * Extracted from `endpoints.ts` so this family can be read, and added to, on
9994
+ * its own. New entries here must declare `errors`; the
9995
+ * require-api-endpoint-errors lint enforces that here as in endpoints.ts.
9996
+ */
9997
+ const SDK_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
9998
+ sdkListEvents: {
9999
+ path: "/sdk/{siteId}/events",
10000
+ method: "GET",
10001
+ auth: "service",
10002
+ responseKind: "json"
10003
+ },
10004
+ sdkUpsertEvent: {
10005
+ path: "/sdk/{siteId}/events",
10006
+ method: "POST",
10007
+ auth: "service",
10008
+ responseKind: "json",
10009
+ errors: [
10010
+ "validation:invalid_input",
10011
+ "resource:not_found",
10012
+ "resource:conflict",
10013
+ "billing:plan_limit_exceeded",
10014
+ "server:internal_error"
10015
+ ]
10016
+ },
10017
+ sdkGetEvent: {
10018
+ path: "/sdk/{siteId}/events/{identifier}",
10019
+ method: "GET",
10020
+ auth: "service",
10021
+ responseKind: "json"
10022
+ },
10023
+ sdkDeleteEvent: {
10024
+ path: "/sdk/{siteId}/events/{identifier}",
10025
+ method: "DELETE",
10026
+ auth: "service",
10027
+ responseKind: "json",
10028
+ errors: [
10029
+ "resource:not_found",
10030
+ "resource:conflict",
10031
+ "server:internal_error"
10032
+ ]
10033
+ },
10034
+ sdkTakeEventOffline: {
10035
+ path: "/sdk/{siteId}/events/{identifier}/lifecycle",
10036
+ method: "POST",
10037
+ auth: "service",
10038
+ responseKind: "json",
10039
+ errors: [
10040
+ "resource:not_found",
10041
+ "validation:invalid_input",
10042
+ "resource:conflict",
10043
+ "server:internal_error"
10044
+ ]
10045
+ },
10046
+ sdkListEventOccurrences: {
10047
+ path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences",
10048
+ method: "GET",
10049
+ auth: "service",
10050
+ responseKind: "json",
10051
+ errors: [
10052
+ "resource:not_found",
10053
+ "validation:invalid_input",
10054
+ "server:internal_error"
10055
+ ]
10056
+ },
10057
+ sdkAddEventOccurrence: {
10058
+ path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences",
10059
+ method: "POST",
10060
+ auth: "service",
10061
+ responseKind: "json",
10062
+ errors: [
10063
+ "resource:not_found",
10064
+ "validation:invalid_input",
10065
+ "resource:conflict",
10066
+ "server:internal_error"
10067
+ ]
10068
+ },
10069
+ sdkUpdateEventOccurrence: {
10070
+ path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences/{occurrenceId}",
10071
+ method: "PATCH",
10072
+ auth: "service",
10073
+ responseKind: "json",
10074
+ errors: [
10075
+ "resource:not_found",
10076
+ "validation:invalid_input",
10077
+ "resource:conflict",
10078
+ "server:internal_error"
10079
+ ]
10080
+ },
10081
+ sdkCancelEventOccurrence: {
10082
+ path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences/{occurrenceId}/cancel",
10083
+ method: "POST",
10084
+ auth: "service",
10085
+ responseKind: "json",
10086
+ errors: [
10087
+ "resource:not_found",
10088
+ "resource:conflict",
10089
+ "server:internal_error"
10090
+ ]
10091
+ },
10092
+ sdkDeleteEventOccurrence: {
10093
+ path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences/{occurrenceId}",
10094
+ method: "DELETE",
10095
+ auth: "service",
10096
+ responseKind: "json",
10097
+ errors: [
10098
+ "resource:not_found",
10099
+ "resource:conflict",
10100
+ "server:internal_error"
10101
+ ]
10102
+ }
10103
+ });
10104
+ //#endregion
10105
+ //#region ../api/src/sdkPageDesignEndpointDefinitions.ts
10106
+ /**
10107
+ * SDK management endpoints for a page's draft design (issue 1497), spread into
10108
+ * `ENDPOINT_DEFINITIONS` like the other endpoint-definition modules. New
10109
+ * entries here must declare `errors`, which the require-api-endpoint-errors
10110
+ * lint enforces.
10111
+ */
10112
+ const SDK_PAGE_DESIGN_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
10113
+ sdkGetPageDesign: {
10114
+ path: "/sdk/{siteId}/pages/{identifier}/design",
10115
+ method: "GET",
10116
+ auth: "service",
10117
+ responseKind: "json",
10118
+ errors: [
10119
+ "resource:not_found",
10120
+ "validation:invalid_input",
10121
+ "server:internal_error"
10122
+ ]
10123
+ },
10124
+ sdkSavePageDesign: {
10125
+ path: "/sdk/{siteId}/pages/{identifier}/design",
10126
+ method: "POST",
10127
+ auth: "service",
10128
+ responseKind: "json",
10129
+ errors: [
10130
+ "resource:not_found",
10131
+ "validation:invalid_input",
10132
+ "resource:conflict",
10133
+ "server:internal_error"
10134
+ ]
10135
+ }
10136
+ });
10137
+ //#endregion
9953
10138
  //#region ../api/src/publicEventEndpointDefinitions.ts
9954
10139
  const PUBLIC_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
9955
10140
  checkPublicEventRegistrationNextStep: {
@@ -10194,6 +10379,45 @@ const SITE_API_KEY_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
10194
10379
  }
10195
10380
  });
10196
10381
  //#endregion
10382
+ //#region ../api/src/siteManagementEndpointDefinitions.ts
10383
+ const SITE_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
10384
+ createSite: {
10385
+ path: "/sites/manage",
10386
+ method: "POST",
10387
+ tags: ["site"],
10388
+ auth: "user",
10389
+ responseKind: "json"
10390
+ },
10391
+ updateSite: {
10392
+ path: "/sites/manage",
10393
+ method: "PUT",
10394
+ tags: ["site"],
10395
+ auth: "user",
10396
+ responseKind: "json"
10397
+ },
10398
+ changeSiteAddress: {
10399
+ path: "/sites/{siteId}/address",
10400
+ method: "PUT",
10401
+ auth: "user",
10402
+ responseKind: "json",
10403
+ demoMutation: DEMO_MUTATION_BLOCKED_DISABLED
10404
+ },
10405
+ getSiteAddressAvailability: {
10406
+ path: "/sites/{siteId}/address/availability",
10407
+ method: "GET",
10408
+ auth: "user",
10409
+ responseKind: "json"
10410
+ },
10411
+ deleteSite: {
10412
+ path: "/sites/{siteId}",
10413
+ method: "DELETE",
10414
+ tags: ["site", "site-{siteId}"],
10415
+ auth: "user",
10416
+ responseKind: "json",
10417
+ demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
10418
+ }
10419
+ });
10420
+ //#endregion
10197
10421
  //#region ../api/src/eventManagementEndpointDefinitions.ts
10198
10422
  const EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
10199
10423
  listEvents: {
@@ -10241,6 +10465,28 @@ const EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
10241
10465
  "server:internal_error"
10242
10466
  ]
10243
10467
  },
10468
+ /**
10469
+ * The web address of an event's own page. A course page belongs to the
10470
+ * event itself, so its address is written here rather than through a run.
10471
+ */
10472
+ updateEventAddress: {
10473
+ path: "/sites/{siteId}/bookings/events/{eventId}/address",
10474
+ method: "PATCH",
10475
+ tags: [
10476
+ "site-{siteId}",
10477
+ "event-series-{siteId}",
10478
+ TAG_TEMPLATES.siteRoutableContent,
10479
+ TAG_TEMPLATES.siteRedirects
10480
+ ],
10481
+ auth: "user",
10482
+ responseKind: "json",
10483
+ errors: [
10484
+ "validation:invalid_input",
10485
+ "resource:not_found",
10486
+ "resource:conflict",
10487
+ "server:internal_error"
10488
+ ]
10489
+ },
10244
10490
  createWholeSeriesRun: {
10245
10491
  path: "/sites/{siteId}/bookings/events/{eventId}/runs",
10246
10492
  method: "POST",
@@ -10267,6 +10513,20 @@ const EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
10267
10513
  "server:internal_error"
10268
10514
  ]
10269
10515
  },
10516
+ updateCourseBookingSettings: {
10517
+ path: "/sites/{siteId}/bookings/events/{eventId}/booking-settings",
10518
+ method: "PATCH",
10519
+ tags: ["site-{siteId}", "event-series-{siteId}"],
10520
+ auth: "user",
10521
+ responseKind: "json",
10522
+ errors: [
10523
+ "validation:invalid_input",
10524
+ "auth:forbidden",
10525
+ "resource:not_found",
10526
+ "resource:conflict",
10527
+ "server:internal_error"
10528
+ ]
10529
+ },
10270
10530
  cancelWholeSeriesRun: {
10271
10531
  path: "/sites/{siteId}/bookings/events/{eventId}/runs/{runId}/cancellation",
10272
10532
  method: "POST",
@@ -10279,6 +10539,28 @@ const EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
10279
10539
  "resource:conflict",
10280
10540
  "server:internal_error"
10281
10541
  ]
10542
+ },
10543
+ /**
10544
+ * The Content tab's one write: the short introduction, image and
10545
+ * description of an event's page, published without its layout.
10546
+ */
10547
+ saveEventPageWords: {
10548
+ path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/words",
10549
+ method: "PUT",
10550
+ tags: [
10551
+ TAG_TEMPLATES.siteCollection,
10552
+ TAG_TEMPLATES.siteRoutableContent,
10553
+ TAG_TEMPLATES.pageSurfaceById
10554
+ ],
10555
+ auth: "user",
10556
+ responseKind: "json",
10557
+ errors: [
10558
+ "auth:forbidden",
10559
+ "validation:invalid_input",
10560
+ "resource:not_found",
10561
+ "resource:conflict",
10562
+ "server:internal_error"
10563
+ ]
10282
10564
  }
10283
10565
  });
10284
10566
  //#endregion
@@ -10711,19 +10993,56 @@ const BILLING_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
10711
10993
  responseKind: "json"
10712
10994
  }
10713
10995
  });
10996
+ //#endregion
10997
+ //#region ../api/src/clientErrorReporting.ts
10998
+ const CLIENT_ERROR_REPORT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({ reportClientError: {
10999
+ path: "/client/error-report",
11000
+ method: "POST",
11001
+ auth: "user",
11002
+ errors: [],
11003
+ responseKind: "json"
11004
+ } });
11005
+ const CLIENT_ERROR_REPORT_LIMITS = {
11006
+ pathname: 1024,
11007
+ name: 120,
11008
+ message: 2e3,
11009
+ stack: 8e3,
11010
+ digest: 128,
11011
+ componentStack: 8e3,
11012
+ sourceLocation: 1024
11013
+ };
11014
+ const clientErrorEventSchema = z.enum([
11015
+ "dashboard:route-error",
11016
+ "dashboard:app-error",
11017
+ "client:error-boundary",
11018
+ "client:window-error",
11019
+ "client:unhandled-rejection"
11020
+ ]);
11021
+ z.object({
11022
+ event: clientErrorEventSchema,
11023
+ pathname: z.string().startsWith("/").max(CLIENT_ERROR_REPORT_LIMITS.pathname),
11024
+ name: z.string().max(CLIENT_ERROR_REPORT_LIMITS.name),
11025
+ message: z.string().max(CLIENT_ERROR_REPORT_LIMITS.message),
11026
+ stack: z.string().max(CLIENT_ERROR_REPORT_LIMITS.stack).nullable(),
11027
+ digest: z.string().max(CLIENT_ERROR_REPORT_LIMITS.digest).nullable(),
11028
+ componentStack: z.string().max(CLIENT_ERROR_REPORT_LIMITS.componentStack).nullable(),
11029
+ sourceLocation: z.string().max(CLIENT_ERROR_REPORT_LIMITS.sourceLocation).nullable()
11030
+ }).strict();
10714
11031
  ({
11032
+ ...CLIENT_ERROR_REPORT_ENDPOINT_DEFINITIONS,
10715
11033
  ...PUBLIC_NEWSLETTER_ENDPOINT_DEFINITIONS,
10716
11034
  ...ACCOUNT_ENDPOINT_DEFINITIONS,
10717
11035
  ...PUBLIC_ONBOARDING_ATTEMPT_ENDPOINT_DEFINITIONS,
10718
11036
  ...PUBLIC_EVENT_ENDPOINT_DEFINITIONS,
10719
11037
  ...GIFTING_ENDPOINT_DEFINITIONS,
10720
11038
  ...PUBLIC_READ_ENDPOINT_DEFINITIONS,
10721
- ...BILLING_ENDPOINT_DEFINITIONS
11039
+ ...BILLING_ENDPOINT_DEFINITIONS,
11040
+ ...SITE_MANAGEMENT_ENDPOINT_DEFINITIONS
10722
11041
  }), TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, { ...SITE_API_KEY_ENDPOINT_DEFINITIONS }, TAG_TEMPLATES.site, TAG_TEMPLATES.siteBookingSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteBookingSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings, {
10723
11042
  ...NEWSLETTER_ENDPOINT_DEFINITIONS,
10724
11043
  ...APPOINTMENT_ENDPOINT_DEFINITIONS,
10725
11044
  ...EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS
10726
- }, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteById, TAG_TEMPLATES.siteBySlug, TAG_TEMPLATES.siteByDomain, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteById, TAG_TEMPLATES.siteBySlug, TAG_TEMPLATES.siteByDomain, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.workflowRunById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.routeById, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.navigationItemById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.navigationItemById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicBookingServices, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRedirects, TAG_TEMPLATES.siteRouteOutcomes, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRedirects, TAG_TEMPLATES.siteRouteOutcomes, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.siteForms, { ...PUBLIC_BOOKING_AVAILABILITY_ENDPOINT_DEFINITIONS }, TAG_TEMPLATES.publicEventFilters, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicShop, TAG_TEMPLATES.publicCheckout, TAG_TEMPLATES.siteRoutableContent, { ...PUBLIC_EVENT_CHECKOUT_ENDPOINT_DEFINITIONS }, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEvents, { ...EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS }, { ...SDK_MEDIA_ENDPOINT_DEFINITIONS }, { ...SDK_ENDPOINT_DEFINITIONS }, { ...SDK_ENTRY_READ_ENDPOINTS };
11045
+ }, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteById, TAG_TEMPLATES.siteBySlug, TAG_TEMPLATES.siteByDomain, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteById, TAG_TEMPLATES.siteBySlug, TAG_TEMPLATES.siteByDomain, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.workflowRunById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.routeById, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.navigationItemById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.navigationItemById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicBookingServices, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRedirects, TAG_TEMPLATES.siteRouteOutcomes, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRedirects, TAG_TEMPLATES.siteRouteOutcomes, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.siteForms, { ...PUBLIC_BOOKING_AVAILABILITY_ENDPOINT_DEFINITIONS }, TAG_TEMPLATES.publicEventFilters, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicShop, TAG_TEMPLATES.publicCheckout, TAG_TEMPLATES.siteRoutableContent, { ...PUBLIC_EVENT_CHECKOUT_ENDPOINT_DEFINITIONS }, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEvents, { ...EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS }, { ...SDK_MEDIA_ENDPOINT_DEFINITIONS }, { ...SDK_ENDPOINT_DEFINITIONS }, { ...SDK_PAGE_DESIGN_ENDPOINT_DEFINITIONS }, { ...SDK_EVENT_ENDPOINT_DEFINITIONS }, { ...SDK_ENTRY_READ_ENDPOINTS };
10727
11046
  z.object({ refreshToken: z.string().min(1).max(4096) }).strict();
10728
11047
  z.object({
10729
11048
  accessToken: z.string().min(1).max(4096),
@@ -10950,6 +11269,17 @@ const navigationLinkInputSchemaOptions = [
10950
11269
  ];
10951
11270
  z.discriminatedUnion("kind", navigationLinkInputSchemaOptions);
10952
11271
  //#endregion
11272
+ //#region ../blocks/src/pageRenderAdmission.ts
11273
+ /** Pair a published version with the content it authorises at the render boundary. */
11274
+ function readPublishedBlockPlacement(id, content) {
11275
+ if (id == null && content == null) return null;
11276
+ if (id == null || content == null) throw new Error("Published block placement requires both an ID and content");
11277
+ return {
11278
+ id,
11279
+ content
11280
+ };
11281
+ }
11282
+ //#endregion
10953
11283
  //#region ../theme-core/src/site-styles/styleTags.ts
10954
11284
  /**
10955
11285
  * Descriptive style-axis metadata for button personalities and palette
@@ -28651,13 +28981,13 @@ const hours = stack({
28651
28981
  as: "p",
28652
28982
  className: "rb-caption rb-opacity-70"
28653
28983
  }, bind("module.timeZone"), when("module.timeZone"))], when("module.kind", { equals: "opening-hours" }));
28654
- const socials = inline({ className: "rb-flex rb-flex-wrap rb-gap-x-5 rb-gap-y-3" }, [link({
28984
+ const socials = inline({ className: "rb-footer-socials" }, [link({
28655
28985
  href: { $bind: { from: "social.href" } },
28656
28986
  target: "_blank",
28657
28987
  rel: "noreferrer noopener",
28658
28988
  "aria-label": { $bind: { from: "social.label" } },
28659
- className: "rb-nav-text transition-theme-standard"
28660
- }, [icon({ className: "rb-h-5 rb-w-5" }, bind("social.icon"), when("social.icon")), text({ as: "span" }, bind("social.label"), when("social.icon", { equals: null }))], repeat("module.socialLinks", "social"))], when("module.kind", { equals: "social-links" }));
28989
+ className: "rb-footer-social-link rb-nav-text transition-theme-standard"
28990
+ }, [icon({ className: "rb-footer-social-icon" }, bind("social.icon"), when("social.icon")), text({ as: "span" }, bind("social.label"), when("social.icon", { equals: null }))], repeat("module.socialLinks", "social"))], when("module.kind", { equals: "social-links" }));
28661
28991
  const authoredCopy = richText({
28662
28992
  className: "rb-prose rb-prose-sm rb-max-w-none",
28663
28993
  style: textColorStyle("text/80")
@@ -38169,6 +38499,11 @@ const mailingListContentVersionIdSchema = z.string().transform((value, ctx) => {
38169
38499
  });
38170
38500
  return z.NEVER;
38171
38501
  });
38502
+ const mailingListSignupBlockSourceRefSchema = z.object({
38503
+ tag: z.literal("block_ref"),
38504
+ blockId: mailingListSignupBlockIdSchema,
38505
+ contentVersionId: mailingListContentVersionIdSchema
38506
+ });
38172
38507
  const signedMailingListSourceTokenSchema = z.string().trim().min(1).transform(parseRequiredMailingListSignedSourceToken);
38173
38508
  const newsletterSourceCommonSchema = z.object({
38174
38509
  siteId: z.string().optional(),
@@ -38183,7 +38518,15 @@ const newsletterSourceSchema = z.discriminatedUnion("source", [
38183
38518
  newsletterSourceCommonSchema.extend({
38184
38519
  source: z.literal("block"),
38185
38520
  blockId: z.string().nullable().optional(),
38186
- contentVersionId: z.string().nullable().optional()
38521
+ newsletterBlockSubmission: z.discriminatedUnion("tag", [
38522
+ z.object({
38523
+ tag: z.literal("ready"),
38524
+ sourceRef: mailingListSignupBlockSourceRefSchema
38525
+ }),
38526
+ z.object({ tag: z.literal("unpublished-form") }),
38527
+ z.object({ tag: z.literal("unpublished-settings") }),
38528
+ z.object({ tag: z.literal("unavailable") })
38529
+ ])
38187
38530
  }),
38188
38531
  newsletterSourceCommonSchema.extend({
38189
38532
  source: z.literal("signed-footer"),
@@ -38212,11 +38555,7 @@ const newsletterHydrationSchema = z.object({
38212
38555
  target: z.discriminatedUnion("tag", [
38213
38556
  z.object({
38214
38557
  tag: z.literal("block-source"),
38215
- sourceRef: z.object({
38216
- tag: z.literal("block_ref"),
38217
- blockId: mailingListSignupBlockIdSchema,
38218
- contentVersionId: mailingListContentVersionIdSchema
38219
- }).nullable()
38558
+ sourceRef: mailingListSignupBlockSourceRefSchema.nullable()
38220
38559
  }),
38221
38560
  z.object({
38222
38561
  tag: z.literal("signed-footer-source"),
@@ -38225,7 +38564,11 @@ const newsletterHydrationSchema = z.object({
38225
38564
  token: signedMailingListSourceTokenSchema
38226
38565
  })
38227
38566
  }),
38228
- z.object({ tag: z.literal("preview") })
38567
+ z.object({ tag: z.literal("preview") }),
38568
+ z.object({
38569
+ tag: z.literal("unpublished-preview"),
38570
+ reason: z.enum(["unpublished-form", "unpublished-settings"])
38571
+ })
38229
38572
  ]),
38230
38573
  setupRevision: z.number().int().positive().nullable(),
38231
38574
  choiceProvider: z.enum([
@@ -38294,16 +38637,21 @@ const newsletterFormBlockRuntime = defineProgressiveBlockRuntime({
38294
38637
  });
38295
38638
  function projectNewsletterFormHydrationTarget(source) {
38296
38639
  switch (source.source) {
38297
- case "block": {
38298
- const sourceRef = buildMailingListSignupBlockSourceRef(source.blockId, source.contentVersionId);
38299
- if (sourceRef?.tag === "block_ref") return {
38640
+ case "block": switch (source.newsletterBlockSubmission.tag) {
38641
+ case "unpublished-form":
38642
+ case "unpublished-settings": return {
38643
+ tag: "unpublished-preview",
38644
+ reason: source.newsletterBlockSubmission.tag
38645
+ };
38646
+ case "ready": return {
38300
38647
  tag: "block-source",
38301
- sourceRef
38648
+ sourceRef: source.newsletterBlockSubmission.sourceRef
38302
38649
  };
38303
- return {
38650
+ case "unavailable": return {
38304
38651
  tag: "block-source",
38305
38652
  sourceRef: null
38306
38653
  };
38654
+ default: return assertNever$3(source.newsletterBlockSubmission);
38307
38655
  }
38308
38656
  case "signed-footer": return {
38309
38657
  tag: "signed-footer-source",
@@ -41359,6 +41707,46 @@ z.object({ acceptExtraSiteCharge: z.boolean().optional() });
41359
41707
  //#region ../surfaces/src/index.ts
41360
41708
  const SURFACE_IDS = ["core", "macadamia"];
41361
41709
  const DEFAULT_SURFACE_ID = "core";
41710
+ /**
41711
+ * Root hosts for each surface, keyed by deployment tier. The tier-keyed shape
41712
+ * makes it impossible to mis-order entries: callers like
41713
+ * `buildSurfaceAwareDashboardOriginForSurfaceId` look up by tier directly
41714
+ * rather than relying on positional alignment between arrays.
41715
+ */
41716
+ const SURFACE_ROOT_HOSTS = {
41717
+ core: {
41718
+ local: "localhost",
41719
+ prod: "riverbankcms.com"
41720
+ },
41721
+ macadamia: {
41722
+ local: "macadamia.localhost",
41723
+ prod: "macadamia.studio"
41724
+ }
41725
+ };
41726
+ const SURFACE_SITE_ROOT_HOSTS = {
41727
+ core: {
41728
+ local: "localhost",
41729
+ prod: "riverbanksites.com"
41730
+ },
41731
+ macadamia: {
41732
+ local: "macadamia.localhost",
41733
+ prod: "macadamia.studio"
41734
+ }
41735
+ };
41736
+ const SURFACE_SITE_ROOT_HOST_ALIASES = { core: { prod: ["preview.riverbanksites.com"] } };
41737
+ function surfaceHostTableValues(table) {
41738
+ return Object.values(table).flatMap((byTier) => Object.values(byTier).flat());
41739
+ }
41740
+ function siteSlugLabelUnderRoot(host, siteRootHost) {
41741
+ if (!host.endsWith(`.${siteRootHost}`)) return [];
41742
+ return host.slice(0, host.length - siteRootHost.length - 1).split(".").slice(-1);
41743
+ }
41744
+ function deriveSurfaceOwnedSiteSlugs() {
41745
+ const siteRootHosts = [...surfaceHostTableValues(SURFACE_SITE_ROOT_HOSTS), ...surfaceHostTableValues(SURFACE_SITE_ROOT_HOST_ALIASES)];
41746
+ const labels = [...surfaceHostTableValues(SURFACE_ROOT_HOSTS), ...siteRootHosts].flatMap((host) => siteRootHosts.flatMap((root) => siteSlugLabelUnderRoot(host, root)));
41747
+ return [...new Set(labels)].sort();
41748
+ }
41749
+ deriveSurfaceOwnedSiteSlugs();
41362
41750
  [...SURFACE_IDS.filter((surfaceId) => surfaceId !== DEFAULT_SURFACE_ID)];
41363
41751
  //#endregion
41364
41752
  //#region ../api/src/accountApi.ts
@@ -41987,6 +42375,7 @@ function parsePublicProductCategorySelector(value) {
41987
42375
  productCategoryEntryId: record.productCategoryEntryId
41988
42376
  };
41989
42377
  }
42378
+ z.enum(["public", "unlisted"], { error: "visibility must be 'public' or 'unlisted'" });
41990
42379
  //#endregion
41991
42380
  //#region ../api/src/bookingPaymentTermSchemas.ts
41992
42381
  const bookingDepositRefundPolicySchema = z.enum(["refundable", "non_refundable"]);
@@ -42457,21 +42846,42 @@ function resolveSiteCustomBlocks(site) {
42457
42846
  }
42458
42847
  //#endregion
42459
42848
  //#region src/rendering/helpers/pageRuntimeSupport.ts
42460
- function convertPageResponseBlock(block) {
42849
+ function collectMediaAssetSidecar(mediaAssets) {
42850
+ return Array.isArray(mediaAssets) && mediaAssets.length > 0 ? mediaAssets : void 0;
42851
+ }
42852
+ function readBlockContentId(value, name) {
42853
+ if (value === null || value === void 0) return null;
42854
+ if (typeof value === "string") return value;
42855
+ throw new Error(`Invalid ${name} in page: expected string or null`);
42856
+ }
42857
+ function readTransportedBlockIdentity(block, kind, stage) {
42858
+ return {
42859
+ draftContentId: readBlockContentId(block.draftContentId, "draft content id"),
42860
+ publishedPlacement: stage === "preview" ? readPublishedBlockPlacement(readBlockContentId(block.publishedContentId, "published content id"), sanitizeNullableSdkRuntimeBlockContent(kind, readNestedContentRecord(block.publishedContent))) : null
42861
+ };
42862
+ }
42863
+ function convertPageResponseBlock(block, stage) {
42461
42864
  if (!isRecord(block)) throw new Error("Invalid block format in page API response");
42865
+ const header = readTransportedBlockHeader(block);
42866
+ const admission = readInvalidBlockAdmission(block.admission);
42867
+ return {
42868
+ ...header,
42869
+ ...readTransportedBlockIdentity(block, header.kind, stage),
42870
+ content: sanitizeSdkRuntimeBlockContent(header.kind, readContentRecord(block.content) ?? {}),
42871
+ draftContent: sanitizeNullableSdkRuntimeBlockContent(header.kind, readNestedContentRecord(block.draftContent)),
42872
+ ...admission ? { admission } : {}
42873
+ };
42874
+ }
42875
+ function readTransportedBlockHeader(block) {
42462
42876
  if (typeof block.id !== "string" && block.id !== null) throw new Error(`Invalid block id in page: expected string or null, got ${typeof block.id}`);
42463
42877
  if (typeof block.kind !== "string") throw new Error(`Invalid block kind in page: expected string, got ${typeof block.kind}`);
42464
42878
  if (typeof block.purpose !== "string") throw new Error(`Invalid block purpose in page: expected string, got ${typeof block.purpose}`);
42465
42879
  if (block.contentVersionId !== void 0 && block.contentVersionId !== null && typeof block.contentVersionId !== "string") throw new Error(`Invalid content version id in page: expected string or null, got ${typeof block.contentVersionId}`);
42466
- const admission = readInvalidBlockAdmission(block.admission);
42467
42880
  return {
42468
42881
  id: block.id,
42469
42882
  ...block.contentVersionId !== void 0 ? { contentVersionId: block.contentVersionId } : {},
42470
42883
  kind: block.kind,
42471
- purpose: block.purpose,
42472
- content: sanitizeSdkRuntimeBlockContent(block.kind, readContentRecord(block.content) ?? {}),
42473
- draftContent: sanitizeNullableSdkRuntimeBlockContent(block.kind, readNestedContentRecord(block.draftContent)),
42474
- ...admission ? { admission } : {}
42884
+ purpose: block.purpose
42475
42885
  };
42476
42886
  }
42477
42887
  function readInvalidBlockAdmission(value) {
@@ -42484,7 +42894,7 @@ function buildPageOutline(input) {
42484
42894
  name: input.name,
42485
42895
  path: input.path ?? input.fallbackPath,
42486
42896
  purpose: input.purpose,
42487
- blocks: input.blocks.map(convertPageResponseBlock)
42897
+ blocks: input.blocks.map((block) => convertPageResponseBlock(block, input.previewStage))
42488
42898
  };
42489
42899
  }
42490
42900
  function buildRenderablePageOutline(input) {
@@ -42510,6 +42920,8 @@ function projectRenderablePageOutline(page) {
42510
42920
  function admitSdkRuntimePageBlock(block, customBlocks) {
42511
42921
  const base = {
42512
42922
  id: block.id,
42923
+ draftContentId: block.draftContentId,
42924
+ publishedPlacement: block.publishedPlacement,
42513
42925
  ...block.contentVersionId !== void 0 ? { contentVersionId: block.contentVersionId } : {},
42514
42926
  kind: block.kind,
42515
42927
  purpose: block.purpose,
@@ -42571,6 +42983,40 @@ function sanitizeNullableSdkRuntimeBlockContent(blockKind, content) {
42571
42983
  *
42572
42984
  * Use this in client components for dynamic page loading.
42573
42985
  */
42986
+ async function loadUsePageSuccess(input) {
42987
+ const { client, site, pageResponse, siteId, path, pageId, preview } = input;
42988
+ const pageData = pageResponse.page;
42989
+ const mediaAssets = collectMediaAssetSidecar(pageResponse.mediaAssets);
42990
+ const previewStage = preview ? "preview" : "published";
42991
+ const pageOutline = buildRenderablePageOutline({
42992
+ name: pageData.name,
42993
+ path: pageData.path ?? path,
42994
+ fallbackPath: path,
42995
+ purpose: pageData.purpose,
42996
+ blocks: pageData.blocks,
42997
+ previewStage,
42998
+ customBlocks: resolveSiteCustomBlocks(site)
42999
+ });
43000
+ const resolvedData = await prefetchBlockData(projectRenderablePageOutline(pageOutline), {
43001
+ siteId,
43002
+ pageId: pageId ?? pageData.id,
43003
+ previewStage
43004
+ }, client);
43005
+ return {
43006
+ loading: false,
43007
+ error: null,
43008
+ page: pageOutline,
43009
+ runtimeJoins: pageData.runtimeJoins,
43010
+ theme: requireSdkTheme(site.theme, siteId),
43011
+ siteId,
43012
+ resolvedData,
43013
+ dataContext: { previewStage },
43014
+ mailingList: site.mailingList,
43015
+ sdkConfig: site.sdkConfig ?? null,
43016
+ supabaseUrl: site.supabaseUrl,
43017
+ ...mediaAssets ? { mediaAssets } : {}
43018
+ };
43019
+ }
42574
43020
  /**
42575
43021
  * Client-side React hook to fetch all data needed for <Page> component.
42576
43022
  *
@@ -42661,36 +43107,17 @@ function usePage(params) {
42661
43107
  if (cancelled) return;
42662
43108
  if ("entry" in pageResponse) throw new Error("This path resolves to a content entry, not a page. Use useContent() instead, which handles both pages and entries. For entries, useContent() returns the raw entry data for custom rendering.");
42663
43109
  if ("pageSurface" in pageResponse) throw new Error("This path resolves to a page surface, not a page. Use useContent() instead, which handles pages, entries, and page surfaces.");
42664
- const { page: pageData } = pageResponse;
42665
- const canonicalPagePath = pageData.path ?? path;
42666
- const mediaAssets = Array.isArray(pageResponse.mediaAssets) && pageResponse.mediaAssets.length > 0 ? toMediaAssetSidecar(pageResponse.mediaAssets) : void 0;
42667
- const pageOutline = buildRenderablePageOutline({
42668
- name: pageData.name,
42669
- path: canonicalPagePath,
42670
- fallbackPath: path,
42671
- purpose: pageData.purpose,
42672
- blocks: pageData.blocks,
42673
- customBlocks: resolveSiteCustomBlocks(site)
42674
- });
42675
- const resolvedData = await prefetchBlockData(projectRenderablePageOutline(pageOutline), {
43110
+ const success = await loadUsePageSuccess({
43111
+ client,
43112
+ site,
43113
+ pageResponse,
42676
43114
  siteId,
42677
- pageId: pageId ?? pageData.id,
42678
- previewStage: preview ? "preview" : "published"
42679
- }, client);
42680
- if (cancelled) return;
42681
- setResult({
42682
- loading: false,
42683
- error: null,
42684
- page: pageOutline,
42685
- runtimeJoins: pageData.runtimeJoins,
42686
- theme: requireSdkTheme(site.theme, siteId),
42687
- siteId,
42688
- resolvedData,
42689
- mailingList: site.mailingList,
42690
- sdkConfig: site.sdkConfig ?? null,
42691
- supabaseUrl: site.supabaseUrl,
42692
- ...mediaAssets ? { mediaAssets } : {}
43115
+ path,
43116
+ pageId,
43117
+ preview
42693
43118
  });
43119
+ if (cancelled) return;
43120
+ setResult(success);
42694
43121
  } catch (error) {
42695
43122
  if (cancelled) return;
42696
43123
  setResult({
@@ -42717,9 +43144,6 @@ function usePage(params) {
42717
43144
  ]);
42718
43145
  return result;
42719
43146
  }
42720
- function toMediaAssetSidecar(mediaAssets) {
42721
- return mediaAssets ?? [];
42722
- }
42723
43147
  //#endregion
42724
43148
  //#region src/hooks/index.ts
42725
43149
  /**