@riverbankcms/sdk 0.77.1 → 0.78.2

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 (295) hide show
  1. package/README.md +114 -43
  2. package/dist/{PreviewEditorSidebar-DVUG7GK4.mjs → PreviewEditorSidebar-4DXLYX2V.mjs} +4962 -4885
  3. package/dist/{PreviewEditorUI-P7RN4CDS.mjs → PreviewEditorUI-CS5P4N3P.mjs} +4 -4
  4. package/dist/SdkPreviewModeRuntime-IJDHTW4W.mjs +8 -0
  5. package/dist/_dts/ai/src/contracts/proposals.d.ts +190 -154
  6. package/dist/_dts/api/src/accessAdmin.d.ts +5 -0
  7. package/dist/_dts/api/src/billing.d.ts +3 -26
  8. package/dist/_dts/api/src/bookingVerticals.d.ts +4 -0
  9. package/dist/_dts/api/src/content-editor.d.ts +1 -0
  10. package/dist/_dts/api/src/contentRuntime.d.ts +1 -0
  11. package/dist/_dts/api/src/demoDashboardMutationSurfaces.d.ts +46 -0
  12. package/dist/_dts/api/src/endpoints.d.ts +17 -0
  13. package/dist/_dts/api/src/index.d.ts +16 -4
  14. package/dist/_dts/api/src/navigation/dashboardBookingsNav.d.ts +87 -0
  15. package/dist/_dts/api/src/navigation/dashboardDemoNav.d.ts +5 -0
  16. package/dist/_dts/api/src/navigation/dashboardSettingsNav.d.ts +45 -0
  17. package/dist/_dts/api/src/navigation/dashboardSiteNav.d.ts +42 -0
  18. package/dist/_dts/api/src/navigation/dashboardTeamMemberNav.d.ts +24 -0
  19. package/dist/_dts/api/src/navigation/linkUrlType.d.ts +3 -0
  20. package/dist/_dts/api/src/navigation.d.ts +12 -0
  21. package/dist/_dts/api/src/public/types.d.ts +1 -1
  22. package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +55 -26
  23. package/dist/_dts/api/src/request.d.ts +3 -11
  24. package/dist/_dts/api/src/sdkConfig/contracts.d.ts +1 -0
  25. package/dist/_dts/api/src/sdkContracts.d.ts +7 -1
  26. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +10 -0
  27. package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +1 -0
  28. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +15 -19
  29. package/dist/_dts/api/src/staffAccess.d.ts +79 -0
  30. package/dist/_dts/api/src/types.d.ts +14 -27
  31. package/dist/_dts/api/src/workflows/automaticWorkflowTriggers.d.ts +21 -0
  32. package/dist/_dts/block-form/src/fields/types.d.ts +6 -0
  33. package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterList.d.ts +3 -2
  34. package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterRow.d.ts +6 -3
  35. package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterRowActions.d.ts +8 -3
  36. package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/index.d.ts +1 -1
  37. package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useLinearRepeaterDnd.d.ts +1 -0
  38. package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useRepeaterPointerDragCapability.d.ts +1 -0
  39. package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useResolvedItemLabel.d.ts +7 -0
  40. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/buildSummary.d.ts +1 -0
  41. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/index.d.ts +3 -1
  42. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterDndDomain.d.ts +1 -1
  43. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterLabelSource.d.ts +15 -0
  44. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterRowActionsDomain.d.ts +50 -0
  45. package/dist/_dts/blocks/src/client/site-chrome.d.ts +4 -1
  46. package/dist/_dts/blocks/src/index.d.ts +1 -0
  47. package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +879 -288
  48. package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +879 -288
  49. package/dist/_dts/blocks/src/system/blocks/cart.d.ts +879 -288
  50. package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +879 -288
  51. package/dist/_dts/blocks/src/system/blocks/collection.d.ts +879 -288
  52. package/dist/_dts/blocks/src/system/blocks/courses/shared/schemas.d.ts +2 -2
  53. package/dist/_dts/blocks/src/system/blocks/faq.d.ts +885 -289
  54. package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +879 -288
  55. package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +3 -1
  56. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +68 -21
  57. package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +879 -288
  58. package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +879 -288
  59. package/dist/_dts/blocks/src/system/blocks/shop.d.ts +879 -288
  60. package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +3 -0
  61. package/dist/_dts/blocks/src/system/data/index.d.ts +5 -3
  62. package/dist/_dts/blocks/src/system/data/previewResolvedDataState.d.ts +45 -0
  63. package/dist/_dts/blocks/src/system/fields/boxStyles.d.ts +2 -1
  64. package/dist/_dts/blocks/src/system/fragments/library/faqAccordion.d.ts +5 -0
  65. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +193 -29
  66. package/dist/_dts/blocks/src/system/node/fragments/headingDecoration.d.ts +10 -0
  67. package/dist/_dts/blocks/src/system/node/fragments/index.d.ts +1 -0
  68. package/dist/_dts/blocks/src/system/node/fragments/styledSection.d.ts +9 -0
  69. package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +3 -2
  70. package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +8 -0
  71. package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
  72. package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +43 -8
  73. package/dist/_dts/blocks/src/system/runtime/header/shared.d.ts +8 -7
  74. package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.state.d.ts +1 -1
  75. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +1 -1
  76. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventCompactRow.d.ts +1 -4
  77. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +7 -0
  78. package/dist/_dts/blocks/src/system/runtime/nodes/header-section.client.d.ts +2 -8
  79. package/dist/_dts/blocks/src/system/runtime/nodes/header-section.server.d.ts +2 -9
  80. package/dist/_dts/blocks/src/system/runtime/nodes/shop-cart-discount-ui.d.ts +5 -0
  81. package/dist/_dts/blocks/src/system/runtime/nodes/shop-checkout-form.d.ts +76 -0
  82. package/dist/_dts/blocks/src/system/runtime/nodes/shop-checkout.state.d.ts +1 -4
  83. package/dist/_dts/blocks/src/system/runtime/nodes/shop-commerce-store.d.ts +2 -0
  84. package/dist/_dts/blocks/src/system/runtime/nodes/shop-commerce.shared.d.ts +1 -0
  85. package/dist/_dts/blocks/src/system/runtime/nodes/shop-discount-apply.state.d.ts +52 -0
  86. package/dist/_dts/blocks/src/system/runtime/nodes/shop.state.d.ts +2 -4
  87. package/dist/_dts/blocks/src/system/runtime/nodes/useDiscountApply.d.ts +21 -0
  88. package/dist/_dts/blocks/src/system/runtime/shared/components/DiscountCodeDisclosure.d.ts +54 -0
  89. package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +2 -0
  90. package/dist/_dts/blocks/src/system/runtime/shared/index.d.ts +2 -2
  91. package/dist/_dts/blocks/src/system/transforms/registry/ui.d.ts +1 -1
  92. package/dist/_dts/blocks/src/system/transforms/typed.d.ts +1 -1
  93. package/dist/_dts/content-editor/src/contentTypeEditorContentState.d.ts +26 -0
  94. package/dist/_dts/content-editor/src/definitions/factory.d.ts +75 -0
  95. package/dist/_dts/content-editor/src/entryWorkflows.d.ts +2 -0
  96. package/dist/_dts/content-editor/src/footerBlocksEditorState.d.ts +76 -0
  97. package/dist/_dts/content-editor/src/index.d.ts +6 -1
  98. package/dist/_dts/content-editor/src/pageWorkflowContent.d.ts +29 -0
  99. package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +2 -2
  100. package/dist/_dts/content-model/src/content-types/schema.d.ts +17 -3
  101. package/dist/_dts/content-model/src/index.d.ts +1 -0
  102. package/dist/_dts/content-model/src/routeTemplate.d.ts +4 -0
  103. package/dist/_dts/content-model/src/templates/bindingTypeCompatibility.d.ts +3 -1
  104. package/dist/_dts/content-model/src/templates/bindingValidation.d.ts +10 -4
  105. package/dist/_dts/content-model/src/templates/editorState.d.ts +25 -0
  106. package/dist/_dts/content-model/src/templates/fieldPaths.d.ts +20 -0
  107. package/dist/_dts/content-model/src/templates/manifestAdapter.d.ts +5 -2
  108. package/dist/_dts/core/src/branded.d.ts +108 -85
  109. package/dist/_dts/core/src/csv-cells.d.ts +10 -0
  110. package/dist/_dts/core/src/csv-date-filter.d.ts +27 -0
  111. package/dist/_dts/core/src/csv-escape.d.ts +1 -0
  112. package/dist/_dts/core/src/csv-filename.d.ts +18 -0
  113. package/dist/_dts/core/src/csv-render.d.ts +4 -0
  114. package/dist/_dts/core/src/csv-types.d.ts +116 -0
  115. package/dist/_dts/core/src/currency-format.d.ts +4 -0
  116. package/dist/_dts/core/src/demo-capability-policy.d.ts +29 -0
  117. package/dist/_dts/core/src/demo-claim-access.d.ts +14 -0
  118. package/dist/_dts/core/src/demo-lifecycle-status.d.ts +11 -0
  119. package/dist/_dts/core/src/demo-runtime.d.ts +47 -0
  120. package/dist/_dts/core/src/duration.d.ts +14 -0
  121. package/dist/_dts/core/src/editor-state.d.ts +7 -7
  122. package/dist/_dts/core/src/email-format.d.ts +10 -0
  123. package/dist/_dts/core/src/field-errors.d.ts +1 -0
  124. package/dist/_dts/core/src/form-submission-preview.d.ts +24 -0
  125. package/dist/_dts/core/src/index.d.ts +20 -0
  126. package/dist/_dts/core/src/number-input.d.ts +22 -0
  127. package/dist/_dts/core/src/participants.d.ts +2 -2
  128. package/dist/_dts/core/src/public-url-validation.d.ts +12 -0
  129. package/dist/_dts/core/src/slug.d.ts +39 -0
  130. package/dist/_dts/core/src/string.d.ts +19 -0
  131. package/dist/_dts/core/src/uuid.d.ts +6 -0
  132. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +11 -0
  133. package/dist/_dts/db/src/schemas/forms.d.ts +50 -50
  134. package/dist/_dts/editor-blocks/src/blockPayload.d.ts +1 -1
  135. package/dist/_dts/media-core/src/assetsInUseSummary.d.ts +34 -0
  136. package/dist/_dts/media-core/src/bulkDeletePlanning.d.ts +24 -0
  137. package/dist/_dts/media-core/src/canonicalCropReview.d.ts +66 -0
  138. package/dist/_dts/media-core/src/classifyAllPlanning.d.ts +48 -0
  139. package/dist/_dts/media-core/src/filename.d.ts +1 -0
  140. package/dist/_dts/media-core/src/index.d.ts +10 -0
  141. package/dist/_dts/media-core/src/mediaAssetUsageStatus.d.ts +47 -0
  142. package/dist/_dts/media-core/src/mediaSettingsState.d.ts +3 -0
  143. package/dist/_dts/media-core/src/portableMediaReferences.d.ts +38 -0
  144. package/dist/_dts/media-core/src/uploadVerificationContract.d.ts +28 -0
  145. package/dist/_dts/media-core/src/videoAssetRepair.d.ts +38 -0
  146. package/dist/_dts/media-editor/src/MediaEditor.d.ts +3 -1
  147. package/dist/_dts/media-editor/src/MediaPreview.d.ts +3 -1
  148. package/dist/_dts/media-editor/src/fieldUi.d.ts +5 -0
  149. package/dist/_dts/media-editor/src/index.d.ts +1 -1
  150. package/dist/_dts/media-editor/src/mediaEditorDebug.d.ts +1 -0
  151. package/dist/_dts/path-utils/src/index.d.ts +8 -0
  152. package/dist/_dts/path-utils/src/redirectPaths.d.ts +26 -0
  153. package/dist/_dts/path-utils/src/safeAppPath.d.ts +26 -0
  154. package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeButton.d.ts +2 -1
  155. package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +4 -0
  156. package/dist/_dts/preview-next/src/client/preview/previewDocumentFrame.d.ts +31 -0
  157. package/dist/_dts/sdk/src/cli/commands/push/consts.d.ts +1 -1
  158. package/dist/_dts/sdk/src/cli/commands/push/metadata.d.ts +2 -0
  159. package/dist/_dts/sdk/src/cli/commands/push/stale.d.ts +3 -3
  160. package/dist/_dts/sdk/src/cli/commands/push-execute.d.ts +7 -0
  161. package/dist/_dts/sdk/src/cli/commands/push.d.ts +2 -0
  162. package/dist/_dts/sdk/src/cli/content/reader.d.ts +13 -0
  163. package/dist/_dts/sdk/src/cli/content/writer.d.ts +2 -1
  164. package/dist/_dts/sdk/src/cli/helpers.d.ts +2 -0
  165. package/dist/_dts/sdk/src/cli/site-commands/commandKeys.d.ts +6 -6
  166. package/dist/_dts/sdk/src/cli/site-commands/commandRuntime.d.ts +5 -0
  167. package/dist/_dts/sdk/src/cli/site-commands/commandSurfaceDispatch.d.ts +4 -0
  168. package/dist/_dts/sdk/src/cli/site-commands/pageCommands.d.ts +5 -2
  169. package/dist/_dts/sdk/src/cli/site-commands/pushExecution.d.ts +10 -1
  170. package/dist/_dts/sdk/src/cli/site-commands/pushExecutionTypes.d.ts +1 -1
  171. package/dist/_dts/sdk/src/client/error.d.ts +3 -0
  172. package/dist/_dts/sdk/src/client/index.d.ts +2 -2
  173. package/dist/_dts/sdk/src/client/management/types.d.ts +6 -0
  174. package/dist/_dts/sdk/src/client/types.d.ts +39 -21
  175. package/dist/_dts/sdk/src/config/content-types.d.ts +7 -0
  176. package/dist/_dts/sdk/src/config/field-definitions.d.ts +2 -0
  177. package/dist/_dts/sdk/src/index.d.ts +2 -2
  178. package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +16 -16
  179. package/dist/_dts/sdk/src/next/content-load-failure.d.ts +51 -0
  180. package/dist/_dts/sdk/src/next/index.d.ts +2 -1
  181. package/dist/_dts/sdk/src/next/types.d.ts +19 -0
  182. package/dist/_dts/sdk/src/portal/redirects.d.ts +1 -1
  183. package/dist/_dts/sdk/src/routing/index.d.ts +3 -2
  184. package/dist/_dts/sdk/src/routing/resolvePageContent.d.ts +71 -6
  185. package/dist/_dts/sdk/src/version.d.ts +1 -1
  186. package/dist/_dts/site-commands/src/commands.d.ts +15 -12
  187. package/dist/_dts/site-commands/src/index.d.ts +1 -0
  188. package/dist/_dts/site-commands/src/pagePaths.d.ts +6 -0
  189. package/dist/_dts/theme-core/src/accordions/siteStyleDefaults.d.ts +26 -0
  190. package/dist/_dts/theme-core/src/accordions/types.d.ts +1 -0
  191. package/dist/_dts/theme-core/src/blocks/vars/index.d.ts +1 -0
  192. package/dist/_dts/theme-core/src/fonts/index.d.ts +1 -0
  193. package/dist/_dts/theme-core/src/fonts/uploadFormat.d.ts +44 -0
  194. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  195. package/dist/_dts/theme-core/src/index.d.ts +3 -1
  196. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +36 -24
  197. package/dist/_dts/theme-core/src/navigation/generateNavLinkCSS.d.ts +6 -1
  198. package/dist/_dts/theme-core/src/navigation/types.d.ts +12 -0
  199. package/dist/_dts/theme-core/src/palette/variants/types.d.ts +3 -3
  200. package/dist/_dts/theme-core/src/runtime/themeCssVarNames.d.ts +7 -0
  201. package/dist/_dts/theme-core/src/schema.d.ts +64 -18
  202. package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +214 -34
  203. package/dist/_dts/theme-core/src/site-styles/appearancePresetTypes.d.ts +5 -2
  204. package/dist/_dts/theme-core/src/site-styles/blockAppearancePresets.d.ts +214 -34
  205. package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +24 -0
  206. package/dist/_dts/theme-core/src/site-styles/designState.d.ts +31 -3
  207. package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +4 -4
  208. package/dist/_dts/theme-core/src/site-styles/headerLooks.d.ts +33 -1
  209. package/dist/_dts/theme-core/src/site-styles/rawStyleFields.d.ts +4 -2
  210. package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +9 -1
  211. package/dist/_dts/theme-core/src/site-styles/types.d.ts +27 -2
  212. package/dist/_dts/theme-core/src/siteChrome.d.ts +17 -34
  213. package/dist/_dts/theme-core/src/siteChromeOverlayClearance.d.ts +22 -0
  214. package/dist/_dts/theme-core/src/siteChromePlacement.d.ts +22 -0
  215. package/dist/_dts/theme-core/src/siteChromePlanning.d.ts +32 -0
  216. package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +2 -2
  217. package/dist/{altcha-B5XGSXP5.mjs → altcha-EKUEQ4RP.mjs} +1 -1
  218. package/dist/{chunk-IENWFSLO.mjs → chunk-4QEGTLK6.mjs} +1 -1
  219. package/dist/{chunk-ZYEJLCTN.mjs → chunk-6HYXHRAI.mjs} +5 -5
  220. package/dist/{chunk-VX7B5VAC.mjs → chunk-CR5HKAGU.mjs} +32 -5
  221. package/dist/{chunk-KWJPDZH2.mjs → chunk-MCRQMPET.mjs} +3793 -1201
  222. package/dist/{chunk-6SMUFTXD.mjs → chunk-OKMBEAXY.mjs} +1 -1
  223. package/dist/{chunk-XGB3TDIC.mjs → chunk-R7POPVJR.mjs} +2 -8
  224. package/dist/{chunk-2SPENC5M.mjs → chunk-RGTOD4AJ.mjs} +242 -57
  225. package/dist/cli/index.mjs +2361 -668
  226. package/dist/cli/init-docs/content/cli-reference.md +3 -2
  227. package/dist/cli/init-docs/content/content-management.md +2 -2
  228. package/dist/cli/init-docs/content/workflow-preview-mode.md +68 -2
  229. package/dist/client/{accordion-RZMQSYLR.mjs → accordion-PLYNJIIM.mjs} +2 -2
  230. package/dist/client/analytics.mjs +1 -1
  231. package/dist/client/{bookingForm-NF4ASVNV.mjs → bookingForm-BXAP6AO7.mjs} +76 -72
  232. package/dist/client/bookings.mjs +3765 -310
  233. package/dist/client/{carousel-LDX47ZIK.mjs → carousel-TRBXDHGF.mjs} +3 -4
  234. package/dist/client/{cart-RGXDS5F4.mjs → cart-Z7H3HJRS.mjs} +8 -8
  235. package/dist/client/{checkout-P7WWSNNY.mjs → checkout-WAFCUBIX.mjs} +8 -8
  236. package/dist/client/{chunk-II7O4XN3.mjs → chunk-75OUS5MT.mjs} +2 -2
  237. package/dist/client/{chunk-PMAIXMAB.mjs → chunk-AUJ5DBZJ.mjs} +42 -37
  238. package/dist/client/{chunk-TQ5MSPDX.mjs → chunk-CE7IBGVW.mjs} +3 -1
  239. package/dist/client/{chunk-E2TDNXCL.mjs → chunk-CWGTG37I.mjs} +2 -1
  240. package/dist/client/{chunk-UFSWADAO.mjs → chunk-DNRGY432.mjs} +6 -67
  241. package/dist/client/{chunk-GMVTOKYG.mjs → chunk-FUXW6VW2.mjs} +512 -66
  242. package/dist/client/{chunk-R56FQ3RR.mjs → chunk-JGXPTEI2.mjs} +322 -106
  243. package/dist/client/{chunk-L3DNHIJX.mjs → chunk-JRDUHZCT.mjs} +53 -53
  244. package/dist/client/{chunk-M3L3KYYR.mjs → chunk-UDNSI5PY.mjs} +12 -0
  245. package/dist/client/{chunk-JEZECJ3W.mjs → chunk-UVQEJJTN.mjs} +129 -3
  246. package/dist/client/{chunk-F7LHOKEH.mjs → chunk-XSV6KW4D.mjs} +1 -1
  247. package/dist/client/chunk-ZFHRN6W2.mjs +66 -0
  248. package/dist/client/{chunk-JNC7CGHX.mjs → chunk-ZI3LLBPZ.mjs} +3 -3
  249. package/dist/client/client.mjs +7577 -4979
  250. package/dist/client/{courseRegistration-7F65K5ZR.mjs → courseRegistration-AHFQHWIJ.mjs} +19 -16
  251. package/dist/client/{eventCalendar-GLSC5KTL.mjs → eventCalendar-LDXTV5R7.mjs} +10 -10
  252. package/dist/client/{eventCombined-ZHK4WKUR.mjs → eventCombined-A4JGTNJO.mjs} +10 -10
  253. package/dist/client/{eventDetails-E3PJYBIN.mjs → eventDetails-4YXTZ7EG.mjs} +10 -10
  254. package/dist/client/{eventListing-EMS3WC3E.mjs → eventListing-P72TPFFM.mjs} +10 -10
  255. package/dist/client/{eventRegistration-NZOTVNPI.mjs → eventRegistration-LSYJHGMT.mjs} +10 -10
  256. package/dist/client/{form-ETFZFATW.mjs → form-AOPYOKOW.mjs} +10 -7
  257. package/dist/client/{headerSection-4LBP7ULT.mjs → headerSection-5TFYDFVQ.mjs} +3 -3
  258. package/dist/client/hooks.mjs +1119 -327
  259. package/dist/client/{locationMap-5M655YSJ.mjs → locationMap-QSZ3ZVAZ.mjs} +3 -3
  260. package/dist/client/{newsletterForm-QOUYW44O.mjs → newsletterForm-KTRHZY52.mjs} +3 -3
  261. package/dist/client/{productDetail-O4DOCWQG.mjs → productDetail-N4E775RG.mjs} +8 -8
  262. package/dist/client/{productList-A5RO5WIS.mjs → productList-UGUQ2S45.mjs} +8 -8
  263. package/dist/client/rendering/client.mjs +7262 -2775
  264. package/dist/client/rendering/islands.mjs +19 -19
  265. package/dist/client/rendering.mjs +6964 -4587
  266. package/dist/client/{shop-L4MZH4I2.mjs → shop-VHSZEEQ2.mjs} +8 -8
  267. package/dist/preview-next/before-render.mjs +18 -1
  268. package/dist/preview-next/client/runtime.mjs +6 -6
  269. package/dist/preview-next/editor-chrome.css +10 -0
  270. package/dist/preview-next/middleware.mjs +18 -1
  271. package/dist/preview-next/tailwind-sources.css +1 -0
  272. package/dist/sdk-runtime-WHPJEF5G.mjs +8 -0
  273. package/dist/server/components.mjs +2736 -1316
  274. package/dist/server/config-template-validation.mjs +221 -15
  275. package/dist/server/config-validation.mjs +1346 -550
  276. package/dist/server/config.mjs +1346 -550
  277. package/dist/server/data.mjs +1118 -326
  278. package/dist/server/index.mjs +514 -251
  279. package/dist/server/next.mjs +4446 -2444
  280. package/dist/server/page-converter.mjs +631 -155
  281. package/dist/server/prebuild.mjs +1 -1
  282. package/dist/server/rendering/server.mjs +2743 -1323
  283. package/dist/server/rendering.mjs +2764 -1328
  284. package/dist/server/routing.mjs +1860 -590
  285. package/dist/server/server.mjs +1622 -575
  286. package/dist/server/theme-bridge.mjs +3151 -131
  287. package/dist/server/theme.mjs +10 -1
  288. package/dist/styles/index.css +488 -48
  289. package/package.json +2 -1
  290. package/dist/SdkPreviewModeRuntime-KLPX47SE.mjs +0 -8
  291. package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/DiscountCodeSection.d.ts +0 -7
  292. package/dist/_dts/preview-next/src/client/widgets/PreviewMediaField.d.ts +0 -4
  293. package/dist/client/chunk-OJPZEZU2.mjs +0 -31
  294. package/dist/client/chunk-RTZ3JKKX.mjs +0 -178
  295. package/dist/sdk-runtime-6UT2S7KZ.mjs +0 -8
@@ -0,0 +1,2 @@
1
+ import type { RiverbankSiteConfig, SdkWorkflowConfig } from '../../api/src/sdkContracts';
2
+ export declare function listManualEntryWorkflows(sdkConfig: RiverbankSiteConfig | null | undefined, contentType: string): SdkWorkflowConfig[];
@@ -0,0 +1,76 @@
1
+ type FooterBlocksFooterMode = 'default' | 'blocks' | 'default+blocks' | 'none';
2
+ export type FooterBlocksEditorBlock = Readonly<{
3
+ id: string;
4
+ kind: string;
5
+ kindLabel: string;
6
+ purpose: 'footer';
7
+ content: Record<string, unknown>;
8
+ editable: boolean;
9
+ readOnlyReason?: string | null;
10
+ }>;
11
+ export type FooterBlocksEditorLoadResponse = Readonly<{
12
+ blocks: FooterBlocksEditorBlock[];
13
+ footerMode: FooterBlocksFooterMode;
14
+ }>;
15
+ type FooterBlocksResponse = FooterBlocksEditorLoadResponse;
16
+ type FooterBlock = FooterBlocksEditorBlock;
17
+ type UpdatePayload = Readonly<{
18
+ blocks: Array<Readonly<{
19
+ id: string;
20
+ content: Record<string, unknown>;
21
+ }>>;
22
+ removedBlockIds?: string[];
23
+ }>;
24
+ export type FooterBlocksEditorReadyState = Readonly<{
25
+ tag: 'ready';
26
+ footerMode: FooterBlocksResponse['footerMode'];
27
+ blocks: FooterBlock[];
28
+ initialOrder: string[];
29
+ removedBlockIds: ReadonlySet<string>;
30
+ validationMessage: string | null;
31
+ previewExpanded: boolean;
32
+ }>;
33
+ export type FooterBlocksEditorState = Readonly<{
34
+ tag: 'loading';
35
+ }> | Readonly<{
36
+ tag: 'error';
37
+ message: string;
38
+ }> | FooterBlocksEditorReadyState;
39
+ export type FooterBlocksEditorAction = Readonly<{
40
+ type: 'load-started';
41
+ }> | Readonly<{
42
+ type: 'load-succeeded';
43
+ response: FooterBlocksResponse;
44
+ }> | Readonly<{
45
+ type: 'load-failed';
46
+ message: string;
47
+ }> | Readonly<{
48
+ type: 'block-moved';
49
+ blockId: string;
50
+ direction: -1 | 1;
51
+ }> | Readonly<{
52
+ type: 'block-removed';
53
+ blockId: string;
54
+ }> | Readonly<{
55
+ type: 'preview-toggled';
56
+ expanded: boolean;
57
+ }> | Readonly<{
58
+ type: 'validation-message-set';
59
+ message: string | null;
60
+ }>;
61
+ export type FooterBlocksPreviewState = Readonly<{
62
+ blocks: Array<Readonly<{
63
+ id: string;
64
+ content: Record<string, unknown>;
65
+ kind: string;
66
+ kindLabel: string;
67
+ readOnlyReason: string | null;
68
+ }>>;
69
+ removedBlockIds: string[];
70
+ }>;
71
+ export declare function createInitialFooterBlocksEditorState(): FooterBlocksEditorState;
72
+ export declare function footerBlocksEditorReducer(state: FooterBlocksEditorState, action: FooterBlocksEditorAction): FooterBlocksEditorState;
73
+ export declare function selectFooterBlocksStructuralChanges(state: FooterBlocksEditorState): boolean;
74
+ export declare function buildFooterBlocksUpdatePayload(state: FooterBlocksEditorReadyState, getDraftContent: (block: FooterBlock) => Record<string, unknown> | null): UpdatePayload;
75
+ export declare function selectFooterBlocksPreview(state: FooterBlocksEditorReadyState, getDraftContent: (block: FooterBlock) => Record<string, unknown> | null): FooterBlocksPreviewState | null;
76
+ export {};
@@ -23,6 +23,11 @@ export { useStoreBinding, parseEditorPath } from './primitives/shared';
23
23
  export type { PathInfo } from './primitives/shared';
24
24
  export * from './ai/overlayHelpers';
25
25
  export { diffPaths, isUnpublishedChangesDebugEnabled } from './debug/unpublishedChangesDebug';
26
- export { canRedoHistory, canUndoHistory, createHistoryState, asEditorBlockId, pushHistoryEntry, redoHistory, replaceHistoryPresent, undoHistory, type HistoryState, type EditorBlockId, } from './ui/editorHistory';
26
+ export { listManualEntryWorkflows } from './entryWorkflows';
27
+ export { pageWorkflowDraftContent, pageWorkflowPublishedContent, type PageWorkflowDraftSource, type PageWorkflowPublishedSource, } from './pageWorkflowContent';
28
+ export { contentTypeEditorContentReducer, createInitialContentTypeEditorContentState, type ContentTypeEditorContentAction, type ContentTypeEditorContentState, } from './contentTypeEditorContentState';
29
+ export { buildFooterBlocksUpdatePayload, createInitialFooterBlocksEditorState, footerBlocksEditorReducer, selectFooterBlocksPreview, selectFooterBlocksStructuralChanges, type FooterBlocksEditorBlock, type FooterBlocksEditorAction, type FooterBlocksEditorLoadResponse, type FooterBlocksEditorReadyState, type FooterBlocksEditorState, type FooterBlocksPreviewState, } from './footerBlocksEditorState';
30
+ export { asContentEntrySnapshotSource, createContentEntriesDefinitionPlan, createPageSnapshot, createPagesDefinitionPlan, createSnapshotDefaults, getDefaultEntityLabel, mapPageRecordToSnapshot, type ContentEntriesDefinitionPlanOptions, type ContentEntryDefinitionPlan, type DefinitionServices, type PageEntrySnapshot, type PagesDefinitionPlanOptions, type SnapshotDefaults, } from './definitions/factory';
31
+ export { canRedoHistory, canUndoHistory, createHistoryState, unsafeAsEditorBlockId, pushHistoryEntry, redoHistory, replaceHistoryPresent, undoHistory, type HistoryState, type EditorBlockId, } from './ui/editorHistory';
27
32
  export { classifyHistoryShortcut, isNativeHistoryTarget, type HistoryShortcutCommand } from './historyShortcuts';
28
33
  export type { ContentEntryControllerOptions, ContentEntryControllerState, DraftWorkflowStatus, MetadataAutosaveConfig, MetadataKindConfig, } from './types';
@@ -0,0 +1,29 @@
1
+ import type { WorkflowPageDraftContent, WorkflowPagePublishedContent } from '../../api/src/content-editor';
2
+ type PageRouteCanonicalUrl = Readonly<{
3
+ canonicalUrl?: string | null;
4
+ }>;
5
+ export type PageWorkflowDraftSource = Readonly<{
6
+ draftTitle?: string | null;
7
+ draftSlug?: string | null;
8
+ draftStatus?: string | null;
9
+ scheduledPublishAt?: string | null;
10
+ draftMetaTitle?: string | null;
11
+ draftMetaDescription?: string | null;
12
+ canonicalUrl?: string | null;
13
+ ogImageId?: string | null;
14
+ route?: PageRouteCanonicalUrl | null;
15
+ }>;
16
+ export type PageWorkflowPublishedSource = Readonly<{
17
+ title?: string | null;
18
+ slug?: string | null;
19
+ status?: string | null;
20
+ publishedAt?: string | null;
21
+ publishedMetaTitle?: string | null;
22
+ publishedMetaDescription?: string | null;
23
+ canonicalUrl?: string | null;
24
+ ogImageId?: string | null;
25
+ route?: PageRouteCanonicalUrl | null;
26
+ }>;
27
+ export declare function pageWorkflowDraftContent(page: PageWorkflowDraftSource): WorkflowPageDraftContent;
28
+ export declare function pageWorkflowPublishedContent(page: PageWorkflowPublishedSource): WorkflowPagePublishedContent | null;
29
+ export {};
@@ -1,5 +1,5 @@
1
- import { asEditorBlockId, asEditorBlockValues, asEditorContentValues, asEditorEntryId, asEditorMetadataValues, asEditorPageId, asEditorSiteId, type EditorBlockBaselineInput, type EditorBlockId, type EditorBlockPublishedBaselineInput, type EditorDraftBlockBaselineUpdateMetaInput, type EditorDraftBlockInitMetaInput, type EditorBlockValues, type EditorContentValues, type EditorEntryId, type EditorMetadataValues, type EditorPageId, type EditorPersistedBlock, type EditorSiteId, type EditorStructuralCommand, type EditorStructuralDraftSnapshot, type EditorSyncState, type EditorValueRecord } from '../../../core/src/index';
2
- export { asEditorBlockId, asEditorBlockValues, asEditorContentValues, asEditorEntryId, asEditorMetadataValues, asEditorPageId, asEditorSiteId, type EditorBlockId, type EditorBlockValues, type EditorContentValues, type EditorEntryId, type EditorMetadataValues, type EditorPageId, type EditorSiteId, };
1
+ import { unsafeAsEditorBlockId, unsafeAsEditorBlockValues, unsafeAsEditorContentValues, unsafeAsEditorEntryId, unsafeAsEditorMetadataValues, unsafeAsEditorPageId, unsafeAsEditorSiteId, type EditorBlockBaselineInput, type EditorBlockId, type EditorBlockPublishedBaselineInput, type EditorDraftBlockBaselineUpdateMetaInput, type EditorDraftBlockInitMetaInput, type EditorBlockValues, type EditorContentValues, type EditorEntryId, type EditorMetadataValues, type EditorPageId, type EditorPersistedBlock, type EditorSiteId, type EditorStructuralCommand, type EditorStructuralDraftSnapshot, type EditorSyncState, type EditorValueRecord } from '../../../core/src/index';
2
+ export { unsafeAsEditorBlockId, unsafeAsEditorBlockValues, unsafeAsEditorContentValues, unsafeAsEditorEntryId, unsafeAsEditorMetadataValues, unsafeAsEditorPageId, unsafeAsEditorSiteId, type EditorBlockId, type EditorBlockValues, type EditorContentValues, type EditorEntryId, type EditorMetadataValues, type EditorPageId, type EditorSiteId, };
3
3
  export type EditorCommand = {
4
4
  type: 'set-metadata-value';
5
5
  path: string;
@@ -8,13 +8,13 @@ declare const BaseContentFieldSchema: z.ZodObject<{
8
8
  number: "number";
9
9
  boolean: "boolean";
10
10
  date: "date";
11
+ text: "text";
12
+ textarea: "textarea";
13
+ select: "select";
11
14
  url: "url";
12
15
  media: "media";
13
16
  button: "button";
14
17
  link: "link";
15
- select: "select";
16
- textarea: "textarea";
17
- text: "text";
18
18
  richText: "richText";
19
19
  file: "file";
20
20
  datetime: "datetime";
@@ -94,6 +94,12 @@ declare const RoutingSchema: z.ZodObject<{
94
94
  }>>;
95
95
  }, z.core.$strip>>>;
96
96
  }, z.core.$strip>;
97
+ declare const OrderingSchema: z.ZodDefault<z.ZodObject<{
98
+ mode: z.ZodDefault<z.ZodEnum<{
99
+ manual: "manual";
100
+ default: "default";
101
+ }>>;
102
+ }, z.core.$strip>>;
97
103
  export declare const ContentTypeSchemaZ: z.ZodObject<{
98
104
  version: z.ZodDefault<z.ZodNumber>;
99
105
  fields: z.ZodDefault<z.ZodArray<z.ZodType<ContentFieldSchemaType, unknown, z.core.$ZodTypeInternals<ContentFieldSchemaType, unknown>>>>;
@@ -123,9 +129,17 @@ export declare const ContentTypeSchemaZ: z.ZodObject<{
123
129
  singular: z.ZodString;
124
130
  plural: z.ZodString;
125
131
  }, z.core.$strip>>;
132
+ ordering: z.ZodOptional<z.ZodDefault<z.ZodObject<{
133
+ mode: z.ZodDefault<z.ZodEnum<{
134
+ manual: "manual";
135
+ default: "default";
136
+ }>>;
137
+ }, z.core.$strip>>>;
126
138
  }, z.core.$strip>;
127
139
  export type RoutingConfig = z.infer<typeof RoutingSchema>;
128
140
  export type ContentTypeSchema = z.infer<typeof ContentTypeSchemaZ>;
129
141
  export type ContentFieldConfig = z.infer<typeof ContentFieldSchema>;
142
+ export type ContentTypeOrderingConfig = z.infer<typeof OrderingSchema>;
130
143
  export declare function parseContentTypeSchema(input: unknown): ContentTypeSchema;
144
+ export declare function isManualEntryOrderingEnabled(schema: Pick<ContentTypeSchema, 'ordering'> | null | undefined): boolean;
131
145
  export {};
@@ -18,3 +18,4 @@ export * from './templates/fieldPaths';
18
18
  export * from './templates/bindingValidation';
19
19
  export * from './templates/manifestAdapter';
20
20
  export * from './templates/auditBindings';
21
+ export * from './templates/editorState';
@@ -40,4 +40,8 @@ export declare function fixedPathOrNull(routeTemplate: RouteTemplate): string |
40
40
  /** Returns the first path segment, or undefined when the template has no fixed prefix segment. */
41
41
  export declare function getRouteTemplatePrefix(routeTemplate: RouteTemplate): string | undefined;
42
42
  export declare function expandSlug(routeTemplate: RouteTemplate, slug: string): string;
43
+ export declare function buildContentEntryRoutePath(input: Readonly<{
44
+ routePattern: string | null;
45
+ slug: string;
46
+ }>): string;
43
47
  export declare function describeRouteTemplateParseError(error: RouteTemplateParseError): string;
@@ -6,7 +6,9 @@
6
6
  */
7
7
  import type { ContentFieldConfig } from '../content-types/schema';
8
8
  export type ContentFieldType = ContentFieldConfig['type'];
9
- export type BlockFieldType = 'text' | 'number' | 'slug' | 'url' | 'richText' | 'media' | 'file' | 'boolean' | 'select' | 'reference' | 'link' | 'date' | 'datetime';
9
+ export type BlockFieldType = 'text' | 'number' | 'slug' | 'url' | 'richText' | 'media' | 'file' | 'boolean' | 'select' | 'reference' | 'link' | 'date' | 'datetime' | 'repeater';
10
+ export type ScalarBlockFieldType = Exclude<BlockFieldType, 'repeater'>;
11
+ export declare function isScalarBlockFieldType(type: string): type is ScalarBlockFieldType;
10
12
  export type MetaFieldType = 'text' | 'date' | 'enum';
11
13
  /**
12
14
  * Canonical meta-field registry.
@@ -24,7 +24,8 @@
24
24
  */
25
25
  import type { ContentTypeSchema } from '../content-types/schema';
26
26
  import { type TemplateBindingTransformName, type TemplateBindingValue, type TemplateBlockDefinition, type TemplateDefinition } from './types';
27
- import { type BlockFieldType, type ContentFieldType } from './bindingTypeCompatibility';
27
+ import { type BlockFieldType, type ContentFieldType, type ScalarBlockFieldType } from './bindingTypeCompatibility';
28
+ import { type RepeaterFieldShape } from './fieldPaths';
28
29
  /**
29
30
  * Structural shape this validator needs from a block manifest. Decouples
30
31
  * `@riverbankcms/content-model` from the heavy `BlockManifest` type in
@@ -37,14 +38,19 @@ export interface BlockManifestForValidation {
37
38
  /** Flattened list of bindable fields the manifest exposes. */
38
39
  fields: readonly BlockFieldTarget[];
39
40
  }
40
- export interface BlockFieldTarget {
41
+ export type BlockFieldTarget = Readonly<{
41
42
  /** Field id (top-level or dot-notated for nested manifest paths). */
42
43
  id: string;
43
44
  /** Target type from the bindings compatibility matrix. */
44
- type: BlockFieldType;
45
+ type: ScalarBlockFieldType;
45
46
  /** Whether the binding for this target must be present. */
46
47
  required: boolean;
47
- }
48
+ }> | Readonly<{
49
+ id: string;
50
+ type: 'repeater';
51
+ required: boolean;
52
+ shape: RepeaterFieldShape;
53
+ }>;
48
54
  export type GetBlockManifestForValidation = (kind: string) => BlockManifestForValidation | undefined;
49
55
  /** Discriminated union of every validation failure this validator emits. */
50
56
  export type BindingValidationError = Readonly<{
@@ -0,0 +1,25 @@
1
+ import type { TemplateBindingValue } from './types';
2
+ export type TemplateEditorBindingDescriptor = TemplateBindingValue | Record<string, unknown>;
3
+ export type TemplateEditorBindings = Record<string, TemplateEditorBindingDescriptor>;
4
+ export type TemplateEditorBlockBindings = Record<string, TemplateEditorBindings>;
5
+ export type TemplateEditorBlockBindingSource = Readonly<{
6
+ id: string;
7
+ scope: string;
8
+ bindings?: Record<string, unknown> | null;
9
+ }>;
10
+ export type ParsedTemplateEditorBindings = Readonly<{
11
+ ok: true;
12
+ bindings: TemplateEditorBindings;
13
+ }> | Readonly<{
14
+ ok: false;
15
+ message: string;
16
+ }>;
17
+ export declare function normalizeTemplateEditorBindings(bindings: Record<string, unknown> | null | undefined): TemplateEditorBindings;
18
+ export declare function serializeTemplateEditorBindingsJson(bindings: TemplateEditorBindings): string;
19
+ export declare function parseTemplateEditorBindingsJson(jsonValue: string): ParsedTemplateEditorBindings;
20
+ export declare function mergeTemplateBindingEdits(currentBindings: TemplateEditorBindings, editedBindings: TemplateEditorBindings): TemplateEditorBindings;
21
+ export declare function setTemplateEditorBinding(bindings: TemplateEditorBindings, propId: string, binding: TemplateEditorBindingDescriptor): TemplateEditorBindings;
22
+ export declare function removeTemplateEditorBinding(bindings: TemplateEditorBindings, propId: string): TemplateEditorBindings;
23
+ export declare function createEntryTemplateBindingRecords(blocks: readonly TemplateEditorBlockBindingSource[]): TemplateEditorBlockBindings;
24
+ export declare function setTemplateBlockBinding(allBindings: TemplateEditorBlockBindings, blockId: string, propId: string, binding: TemplateEditorBindingDescriptor): TemplateEditorBlockBindings;
25
+ export declare function removeTemplateBlockBinding(allBindings: TemplateEditorBlockBindings, blockId: string, propId: string): TemplateEditorBlockBindings;
@@ -6,6 +6,25 @@ export type FieldPathOption = {
6
6
  type: string;
7
7
  category: 'meta' | 'content';
8
8
  };
9
+ export type RepeaterFieldShape = Readonly<{
10
+ kind: 'supported';
11
+ itemFields: readonly RepeaterItemFieldDescriptor[];
12
+ }> | Readonly<{
13
+ kind: 'unsupported';
14
+ reason: 'missing_item_schema' | 'polymorphic_unsupported' | 'nested_repeater_unsupported' | 'unsupported_item_field';
15
+ }>;
16
+ export type RepeaterItemFieldDescriptor = Readonly<{
17
+ id: string;
18
+ type: string;
19
+ required: boolean;
20
+ }>;
21
+ export type FieldPathDescriptor = Readonly<{
22
+ kind: 'scalar';
23
+ type: string;
24
+ }> | Readonly<{
25
+ kind: 'repeater';
26
+ shape: RepeaterFieldShape;
27
+ }>;
9
28
  /**
10
29
  * Extract all available field paths from a content type schema
11
30
  * for use in binding editor autocomplete.
@@ -15,6 +34,7 @@ export declare function getAvailableFieldPaths(schema: ContentTypeSchema): Field
15
34
  * Get field type from path for validation
16
35
  */
17
36
  export declare function getFieldTypeFromPath(schema: ContentTypeSchema, path: string): string | null;
37
+ export declare function getFieldDescriptorFromPath(schema: ContentTypeSchema, path: string): FieldPathDescriptor | null;
18
38
  /**
19
39
  * Validate if a path exists in the schema
20
40
  */
@@ -37,7 +37,7 @@ export interface AdaptableManifestField {
37
37
  id: string;
38
38
  type: string;
39
39
  required?: boolean;
40
- /** Group/modal containers carry children under `schema.fields`. */
40
+ /** Group/modal and SDK-style monomorphic repeater containers carry children under `schema.fields`. */
41
41
  schema?: {
42
42
  fields?: ReadonlyArray<AdaptableManifestField>;
43
43
  };
@@ -49,6 +49,8 @@ export interface AdaptableManifestField {
49
49
  repeatedItem?: {
50
50
  fields?: ReadonlyArray<AdaptableManifestField>;
51
51
  };
52
+ polymorphic?: boolean;
53
+ itemTypes?: unknown;
52
54
  }
53
55
  /**
54
56
  * Classification of every value `FieldDefinition['type']` can take.
@@ -59,10 +61,11 @@ export interface AdaptableManifestField {
59
61
  *
60
62
  * - `leaf`: directly bindable; maps onto the `BlockFieldType` matrix.
61
63
  * - `composite`: walked recursively (children become flattened targets).
64
+ * - `whole`: bindable only as the whole field.
62
65
  * - `opaque`: dashboard-only or polymorphic types whose leaves can't be
63
66
  * enumerated structurally. Skipped entirely.
64
67
  */
65
- type FieldTypeClassification = 'leaf' | 'composite' | 'opaque';
68
+ type FieldTypeClassification = 'leaf' | 'composite' | 'whole' | 'opaque';
66
69
  export declare const FIELD_TYPE_CLASSIFICATION: Readonly<Record<string, FieldTypeClassification>>;
67
70
  /**
68
71
  * Build the validator-facing shape from a block manifest. Composite fields
@@ -1,3 +1,4 @@
1
+ import { type Result } from './result';
1
2
  /**
2
3
  * Branded ID types for domain entities.
3
4
  *
@@ -5,14 +6,22 @@
5
6
  * accidentally pass an EventInstanceId where a ProductId is expected.
6
7
  *
7
8
  * Usage:
8
- * const instanceId = asEventInstanceId('abc-123')
9
- * const productId = asProductId('def-456')
10
- * // instanceId cannot be assigned to productId — compile error
9
+ * const parsed = parseSiteId(input)
10
+ * const productId = unsafeAsProductId(validatedProductId)
11
+ * // parsed SiteId cannot be assigned to productId — compile error
11
12
  */
12
13
  declare const __brand: unique symbol;
13
14
  export type Brand<T, B extends string> = T & {
14
15
  readonly [__brand]: B;
15
16
  };
17
+ export type BrandedIdParseError = {
18
+ kind: 'not_string';
19
+ } | {
20
+ kind: 'empty_string';
21
+ } | {
22
+ kind: 'invalid_uuid';
23
+ };
24
+ export declare function expectParsedBrandedId<TBrand>(result: Result<TBrand, BrandedIdParseError>): TBrand;
16
25
  export type EventInstanceId = Brand<string, 'EventInstanceId'>;
17
26
  export type SiteId = Brand<string, 'SiteId'>;
18
27
  export type PageId = Brand<string, 'PageId'>;
@@ -115,99 +124,113 @@ export type EntryId = Brand<string, 'EntryId'>;
115
124
  export type PreviewEntryId = EntryId & {
116
125
  readonly __preview: true;
117
126
  };
118
- export declare const asEntryId: (id: string) => EntryId;
127
+ export declare const unsafeAsEntryId: (id: string) => EntryId;
119
128
  /**
120
129
  * Mint a preview-fixture entry id. Unsafe at the type level because the
121
130
  * function can't verify the input string is actually shaped as a preview
122
131
  * id — the predicate `isPreviewEntryId` is the recommended narrowing path.
123
132
  */
124
133
  export declare const unsafeAsPreviewEntryId: (id: string) => PreviewEntryId;
125
- export declare const asEventInstanceId: (id: string) => EventInstanceId;
126
- export declare const asSiteId: (id: string) => SiteId;
127
- export declare const asPageId: (id: string) => PageId;
128
- export declare const asOccurrenceId: (id: string) => OccurrenceId;
129
- export declare const asEventSeriesId: (id: string) => EventSeriesId;
130
- export declare const asTicketTypeId: (id: string) => TicketTypeId;
131
- export declare const asEventCategoryId: (id: string) => EventCategoryId;
132
- export declare const asVenueId: (id: string) => VenueId;
133
- export declare const asPricingOptionId: (id: string) => PricingOptionId;
134
- export declare const asMoneyDateString: (value: string) => MoneyDateString;
135
- export declare const asStripeCheckoutSessionId: (value: string) => StripeCheckoutSessionId;
136
- export declare const asProductId: (id: string) => ProductId;
137
- export declare const asProductVariantId: (id: string) => ProductVariantId;
138
- export declare const asProductCategoryId: (id: string) => ProductCategoryId;
139
- export declare const asMediaAssetId: (id: string) => MediaAssetId;
140
- export declare const asUploadSessionId: (id: string) => UploadSessionId;
141
- export declare const asStorageBucketName: (value: string) => StorageBucketName;
142
- export declare const asStoragePath: (value: string) => StoragePath;
134
+ export declare const unsafeAsEventInstanceId: (id: string) => EventInstanceId;
135
+ export declare const unsafeAsSiteId: (id: string) => SiteId;
136
+ export declare const unsafeAsPageId: (id: string) => PageId;
137
+ export declare const unsafeAsOccurrenceId: (id: string) => OccurrenceId;
138
+ export declare const unsafeAsEventSeriesId: (id: string) => EventSeriesId;
139
+ export declare const unsafeAsTicketTypeId: (id: string) => TicketTypeId;
140
+ export declare const unsafeAsEventCategoryId: (id: string) => EventCategoryId;
141
+ export declare const unsafeAsVenueId: (id: string) => VenueId;
142
+ export declare const unsafeAsPricingOptionId: (id: string) => PricingOptionId;
143
+ export declare const unsafeAsMoneyDateString: (value: string) => MoneyDateString;
144
+ export declare const unsafeAsStripeCheckoutSessionId: (value: string) => StripeCheckoutSessionId;
145
+ export declare const unsafeAsProductId: (id: string) => ProductId;
146
+ export declare const unsafeAsProductVariantId: (id: string) => ProductVariantId;
147
+ export declare const unsafeAsProductCategoryId: (id: string) => ProductCategoryId;
148
+ export declare const unsafeAsMediaAssetId: (id: string) => MediaAssetId;
149
+ export declare const unsafeAsUploadSessionId: (id: string) => UploadSessionId;
150
+ export declare const unsafeAsStorageBucketName: (value: string) => StorageBucketName;
151
+ export declare const unsafeAsStoragePath: (value: string) => StoragePath;
143
152
  export declare const unsafeAsRelativeStoragePath: (value: string) => RelativeStoragePath;
144
153
  export declare const unsafeAsSiteScopedStoragePath: (value: string) => SiteScopedStoragePath;
145
- /** @deprecated Use `unsafeAsRelativeStoragePath` to make the unchecked cast explicit. */
146
- export declare const asRelativeStoragePath: (value: string) => RelativeStoragePath;
147
- /** @deprecated Use `unsafeAsSiteScopedStoragePath` to make the unchecked cast explicit. */
148
- export declare const asSiteScopedStoragePath: (value: string) => SiteScopedStoragePath;
149
154
  export declare const unsafeAsFileChecksumSha256: (value: string) => FileChecksumSha256;
150
- export declare const asDetectedMimeType: (value: string) => DetectedMimeType;
151
- export declare const asDeclaredMimeType: (value: string) => DeclaredMimeType;
152
- export declare const asOriginalFilename: (value: string) => OriginalFilename;
155
+ export declare const unsafeAsDetectedMimeType: (value: string) => DetectedMimeType;
156
+ export declare const unsafeAsDeclaredMimeType: (value: string) => DeclaredMimeType;
157
+ export declare const unsafeAsOriginalFilename: (value: string) => OriginalFilename;
153
158
  export declare const unsafeAsSafeDownloadFilename: (value: string) => SafeDownloadFilename;
154
159
  export declare const unsafeAsPositiveByteCount: (value: number) => PositiveByteCount;
155
160
  export declare const unsafeAsPositiveSeconds: (value: number) => PositiveSeconds;
156
- export declare const asBookingSessionId: (id: string) => BookingSessionId;
157
- export declare const asEntitlementId: (id: string) => EntitlementId;
158
- export declare const asSiteFontId: (id: string) => SiteFontId;
159
- export declare const asUserId: (id: string) => UserId;
160
- export declare const asFormId: (id: string) => FormId;
161
- export declare const asFormSubmissionId: (id: string) => FormSubmissionId;
162
- export declare const asPassId: (id: string) => PassId;
163
- export declare const asMembershipId: (id: string) => MembershipId;
164
- export declare const asCourseId: (id: string) => CourseId;
165
- export declare const asCustomerId: (id: string) => CustomerId;
166
- export declare const asOrderId: (id: string) => OrderId;
167
- export declare const asOrderItemId: (id: string) => OrderItemId;
168
- export declare const asCheckoutLineId: (id: string) => CheckoutLineId;
169
- export declare const asAttendeeId: (id: string) => AttendeeId;
170
- export declare const asCustomerPassId: (id: string) => CustomerPassId;
171
- export declare const asCustomerMembershipId: (id: string) => CustomerMembershipId;
172
- export declare const asEnrollmentId: (id: string) => EnrollmentId;
173
- export declare const asAppointmentId: (id: string) => AppointmentId;
174
- export declare const asAppointmentServiceId: (id: string) => AppointmentServiceId;
175
- export declare const asAppointmentResourceId: (id: string) => AppointmentResourceId;
176
- export declare const asStaffMemberId: (id: string) => StaffMemberId;
177
- export declare const asBookingCalendarFeedTokenId: (id: string) => BookingCalendarFeedTokenId;
178
- export declare const asBookingCalendarFeedTokenPublicId: (id: string) => BookingCalendarFeedTokenPublicId;
179
- export declare const asBookingCalendarFeedTokenSecret: (value: string) => BookingCalendarFeedTokenSecret;
180
- export declare const asBookingCalendarFeedTokenSecretHash: (value: string) => BookingCalendarFeedTokenSecretHash;
181
- export declare const asContentEntryId: (id: string) => ContentEntryId;
182
- export declare const asStripeInvoiceId: (id: string) => StripeInvoiceId;
183
- export declare const asNewsletterSubscriberId: (id: string) => NewsletterSubscriberId;
184
- export declare const asEmailAuditRowId: (id: string) => EmailAuditRowId;
185
- export declare const asWaitlistEntryId: (id: string) => WaitlistEntryId;
186
- export declare const asWaitlistHoldId: (id: string) => WaitlistHoldId;
187
- export declare const asShipmentId: (id: string) => ShipmentId;
188
- export declare const asActivityLogEntryId: (id: string) => ActivityLogEntryId;
189
- export declare const asDemoBlueprintId: (id: string) => DemoBlueprintId;
190
- export declare const asDemoBlueprintVersionId: (id: string) => DemoBlueprintVersionId;
191
- export declare const asDemoInstanceId: (id: string) => DemoInstanceId;
192
- export declare const asDemoClaimId: (id: string) => DemoClaimId;
193
- export declare const asDemoLifecycleAuditEventId: (id: string) => DemoLifecycleAuditEventId;
194
- export declare const asDemoRuntimeId: (id: string) => DemoRuntimeId;
195
- export declare const asDemoCapability: (value: string) => DemoCapability;
196
- export declare const asDemoPaymentFlowId: (id: string) => DemoPaymentFlowId;
161
+ export declare const unsafeAsBookingSessionId: (id: string) => BookingSessionId;
162
+ export declare const unsafeAsEntitlementId: (id: string) => EntitlementId;
163
+ export declare const unsafeAsSiteFontId: (id: string) => SiteFontId;
164
+ export declare const unsafeAsUserId: (id: string) => UserId;
165
+ export declare const unsafeAsFormId: (id: string) => FormId;
166
+ export declare const unsafeAsFormSubmissionId: (id: string) => FormSubmissionId;
167
+ export declare const unsafeAsPassId: (id: string) => PassId;
168
+ export declare const unsafeAsMembershipId: (id: string) => MembershipId;
169
+ export declare const unsafeAsCourseId: (id: string) => CourseId;
170
+ export declare const unsafeAsCustomerId: (id: string) => CustomerId;
171
+ export declare const unsafeAsOrderId: (id: string) => OrderId;
172
+ export declare const unsafeAsOrderItemId: (id: string) => OrderItemId;
173
+ export declare const unsafeAsCheckoutLineId: (id: string) => CheckoutLineId;
174
+ export declare const unsafeAsAttendeeId: (id: string) => AttendeeId;
175
+ export declare const unsafeAsCustomerPassId: (id: string) => CustomerPassId;
176
+ export declare const unsafeAsCustomerMembershipId: (id: string) => CustomerMembershipId;
177
+ export declare const unsafeAsEnrollmentId: (id: string) => EnrollmentId;
178
+ export declare const unsafeAsAppointmentId: (id: string) => AppointmentId;
179
+ export declare const unsafeAsAppointmentServiceId: (id: string) => AppointmentServiceId;
180
+ export declare const unsafeAsAppointmentResourceId: (id: string) => AppointmentResourceId;
181
+ export declare const unsafeAsStaffMemberId: (id: string) => StaffMemberId;
182
+ export declare const unsafeAsBookingCalendarFeedTokenId: (id: string) => BookingCalendarFeedTokenId;
183
+ export declare const unsafeAsBookingCalendarFeedTokenPublicId: (id: string) => BookingCalendarFeedTokenPublicId;
184
+ export declare const unsafeAsBookingCalendarFeedTokenSecret: (value: string) => BookingCalendarFeedTokenSecret;
185
+ export declare const unsafeAsBookingCalendarFeedTokenSecretHash: (value: string) => BookingCalendarFeedTokenSecretHash;
186
+ export declare const unsafeAsContentEntryId: (id: string) => ContentEntryId;
187
+ export declare const unsafeAsStripeInvoiceId: (id: string) => StripeInvoiceId;
188
+ export declare const unsafeAsNewsletterSubscriberId: (id: string) => NewsletterSubscriberId;
189
+ export declare const unsafeAsEmailAuditRowId: (id: string) => EmailAuditRowId;
190
+ export declare const unsafeAsWaitlistEntryId: (id: string) => WaitlistEntryId;
191
+ export declare const unsafeAsWaitlistHoldId: (id: string) => WaitlistHoldId;
192
+ export declare const unsafeAsShipmentId: (id: string) => ShipmentId;
193
+ export declare const unsafeAsActivityLogEntryId: (id: string) => ActivityLogEntryId;
194
+ export declare const unsafeAsDemoBlueprintId: (id: string) => DemoBlueprintId;
195
+ export declare const unsafeAsDemoBlueprintVersionId: (id: string) => DemoBlueprintVersionId;
196
+ export declare const unsafeAsDemoInstanceId: (id: string) => DemoInstanceId;
197
+ export declare const unsafeAsDemoClaimId: (id: string) => DemoClaimId;
198
+ export declare const unsafeAsDemoLifecycleAuditEventId: (id: string) => DemoLifecycleAuditEventId;
199
+ export declare const unsafeAsDemoRuntimeId: (id: string) => DemoRuntimeId;
200
+ export declare const unsafeAsDemoCapability: (value: string) => DemoCapability;
201
+ export declare const unsafeAsDemoPaymentFlowId: (id: string) => DemoPaymentFlowId;
197
202
  export declare const unsafeAsDemoClaimTtlHours: (value: number) => DemoClaimTtlHours;
198
- export declare const asGiftingOfferId: (id: string) => GiftingOfferId;
199
- export declare const asGiftingInstrumentId: (id: string) => GiftingInstrumentId;
200
- export declare const asBookingRequirementId: (id: string) => BookingRequirementId;
201
- export declare const asBookingRequirementEvidenceId: (id: string) => BookingRequirementEvidenceId;
202
- export declare const asBookingRequirementDocumentUploadId: (id: string) => BookingRequirementDocumentUploadId;
203
- export declare const asBookingRequirementEvidenceAttachmentId: (id: string) => BookingRequirementEvidenceAttachmentId;
204
- export declare const asParticipantId: (id: string) => ParticipantId;
205
- export declare const asParticipantParticipationId: (id: string) => ParticipantParticipationId;
206
- export declare const asParticipantRosterAssertionJobId: (id: string) => ParticipantRosterAssertionJobId;
207
- export declare const asParticipantBookingQuestionsTaskId: (id: string) => ParticipantBookingQuestionsTaskId;
208
- export declare const asEventAttendeeGuestId: (id: string) => EventAttendeeGuestId;
209
- export declare const asPersonRecordId: (id: string) => PersonRecordId;
210
- export declare const asEncounterRecordId: (id: string) => EncounterRecordId;
211
- export declare const asRecordEntryId: (id: string) => RecordEntryId;
212
- export declare const asProtectedPayloadKeyVersion: (id: string) => ProtectedPayloadKeyVersion;
203
+ export declare const unsafeAsGiftingOfferId: (id: string) => GiftingOfferId;
204
+ export declare const unsafeAsGiftingInstrumentId: (id: string) => GiftingInstrumentId;
205
+ export declare const unsafeAsBookingRequirementId: (id: string) => BookingRequirementId;
206
+ export declare const unsafeAsBookingRequirementEvidenceId: (id: string) => BookingRequirementEvidenceId;
207
+ export declare const unsafeAsBookingRequirementDocumentUploadId: (id: string) => BookingRequirementDocumentUploadId;
208
+ export declare const unsafeAsBookingRequirementEvidenceAttachmentId: (id: string) => BookingRequirementEvidenceAttachmentId;
209
+ export declare const unsafeAsParticipantId: (id: string) => ParticipantId;
210
+ export declare const unsafeAsParticipantParticipationId: (id: string) => ParticipantParticipationId;
211
+ export declare const unsafeAsParticipantRosterAssertionJobId: (id: string) => ParticipantRosterAssertionJobId;
212
+ export declare const unsafeAsParticipantBookingQuestionsTaskId: (id: string) => ParticipantBookingQuestionsTaskId;
213
+ export declare const unsafeAsEventAttendeeGuestId: (id: string) => EventAttendeeGuestId;
214
+ export declare const unsafeAsPersonRecordId: (id: string) => PersonRecordId;
215
+ export declare const unsafeAsEncounterRecordId: (id: string) => EncounterRecordId;
216
+ export declare const unsafeAsRecordEntryId: (id: string) => RecordEntryId;
217
+ export declare const unsafeAsProtectedPayloadKeyVersion: (id: string) => ProtectedPayloadKeyVersion;
218
+ export declare const parseSiteId: (value: unknown) => Result<SiteId, BrandedIdParseError>;
219
+ export declare const parseOccurrenceId: (value: unknown) => Result<OccurrenceId, BrandedIdParseError>;
220
+ export declare const parseTicketTypeId: (value: unknown) => Result<TicketTypeId, BrandedIdParseError>;
221
+ export declare const parsePricingOptionId: (value: unknown) => Result<PricingOptionId, BrandedIdParseError>;
222
+ export declare const parseUserId: (value: unknown) => Result<UserId, BrandedIdParseError>;
223
+ export declare const parseProductId: (value: unknown) => Result<ProductId, BrandedIdParseError>;
224
+ export declare const parseProductVariantId: (value: unknown) => Result<ProductVariantId, BrandedIdParseError>;
225
+ export declare const parseProductCategoryId: (value: unknown) => Result<ProductCategoryId, BrandedIdParseError>;
226
+ export declare const parseMediaAssetId: (value: unknown) => Result<MediaAssetId, BrandedIdParseError>;
227
+ export declare const parseContentEntryId: (value: unknown) => Result<ContentEntryId, BrandedIdParseError>;
228
+ export declare const parsePassId: (value: unknown) => Result<PassId, BrandedIdParseError>;
229
+ export declare const parseMembershipId: (value: unknown) => Result<MembershipId, BrandedIdParseError>;
230
+ export declare const parseCourseId: (value: unknown) => Result<CourseId, BrandedIdParseError>;
231
+ export declare const parseAppointmentId: (value: unknown) => Result<AppointmentId, BrandedIdParseError>;
232
+ export declare const parseAttendeeId: (value: unknown) => Result<AttendeeId, BrandedIdParseError>;
233
+ export declare const parseCustomerId: (value: unknown) => Result<CustomerId, BrandedIdParseError>;
234
+ export declare const parseCustomerMembershipId: (value: unknown) => Result<CustomerMembershipId, BrandedIdParseError>;
235
+ export declare const parseEventSeriesId: (value: unknown) => Result<EventSeriesId, BrandedIdParseError>;
213
236
  export {};
@@ -0,0 +1,10 @@
1
+ import type { CsvCell } from './csv-types';
2
+ export declare const csvEmptyCell: () => CsvCell;
3
+ export declare const csvTextCell: (value: string | null | undefined) => CsvCell;
4
+ export declare const csvIntegerCell: (value: number | null | undefined) => CsvCell;
5
+ export declare const csvDecimalCell: (value: number | null | undefined, decimals: number) => CsvCell;
6
+ export declare const csvMoneyCentsCell: (cents: number | null | undefined, currency: string | null | undefined) => CsvCell;
7
+ export declare const csvIsoDateCell: (value: string | null | undefined) => CsvCell;
8
+ export declare const csvIsoDateTimeCell: (value: string | null | undefined) => CsvCell;
9
+ export declare const csvBooleanCell: (value: boolean | null | undefined) => CsvCell;
10
+ export declare function formatCsvCell(cell: CsvCell): string;
@@ -0,0 +1,27 @@
1
+ import type { CsvExportDatePolicy, CsvExportId, ExportDateBasis, ExportDateFilterError, ExportDateRange, ResolvedExportDateWindow } from './csv-types';
2
+ export type ResolveExportDateWindowInput = Readonly<{
3
+ exportId: CsvExportId;
4
+ policy: CsvExportDatePolicy;
5
+ range: ExportDateRange;
6
+ requestedBasis?: ExportDateBasis;
7
+ timeZone: string;
8
+ today?: Date;
9
+ }>;
10
+ export type ResolveExportDateWindowInputFor<Basis extends ExportDateBasis> = Readonly<{
11
+ exportId: CsvExportId;
12
+ policy: CsvExportDatePolicy<Basis>;
13
+ range: ExportDateRange;
14
+ requestedBasis?: Basis;
15
+ timeZone: string;
16
+ today?: Date;
17
+ }>;
18
+ export type ResolveExportDateWindowResult<Basis extends ExportDateBasis = ExportDateBasis> = Readonly<{
19
+ ok: true;
20
+ window: ResolvedExportDateWindow<Basis>;
21
+ }> | Readonly<{
22
+ ok: false;
23
+ error: ExportDateFilterError;
24
+ }>;
25
+ export declare function resolveExportDateWindow<Basis extends ExportDateBasis>(input: ResolveExportDateWindowInputFor<Basis>): ResolveExportDateWindowResult<Basis>;
26
+ export declare function resolveExportDateWindow(input: ResolveExportDateWindowInput): ResolveExportDateWindowResult;
27
+ export declare function describeExportDateBasis(basis: ExportDateBasis): string;
@@ -0,0 +1 @@
1
+ export declare function csvEscape(value: string): string;
@@ -0,0 +1,18 @@
1
+ import type { SafeCsvFilename } from './csv-types';
2
+ export type SafeCsvFilenameResult = Readonly<{
3
+ ok: true;
4
+ filename: SafeCsvFilename;
5
+ }> | Readonly<{
6
+ ok: false;
7
+ filename: string;
8
+ }>;
9
+ export declare function toSafeCsvFilename(value: string): SafeCsvFilenameResult;
10
+ export declare function assertSafeCsvFilename(value: string): SafeCsvFilename;
11
+ export declare const unsafeCsvFilename: typeof assertSafeCsvFilename;
12
+ export declare function csvFilenameDateRange(input: Readonly<{
13
+ from?: string | null;
14
+ to?: string | null;
15
+ fallback?: string | null;
16
+ prefix?: string | null;
17
+ }>): string;
18
+ export declare function contentDispositionForCsv(filename: SafeCsvFilename): string;