@riverbankcms/sdk 0.147.0 → 0.149.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 (442) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +1 -1
  3. package/dist/{PreviewEditorSidebar-DtpB3_sS.mjs → PreviewEditorSidebar-DBKln68M.mjs} +301 -205
  4. package/dist/{PreviewEditorUI-DxTLgaHo.mjs → PreviewEditorUI-DpRX4Mum.mjs} +68 -63
  5. package/dist/{PreviewQueryProvider-Dd4dxOiU.mjs → PreviewQueryProvider-C0mndwHB.mjs} +3 -3
  6. package/dist/{SdkPreviewModeRuntime-DMMNCngt.mjs → SdkPreviewModeRuntime-DJPmPY-r.mjs} +1247 -541
  7. package/dist/{SiteChromeCustomizeContext-DQXZXiqS.mjs → SiteChromeCustomizeContext-JYA0cJ_Z.mjs} +209720 -204978
  8. package/dist/_dts/ai/src/contracts/proposals.d.ts +0 -33
  9. package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +0 -3
  10. package/dist/_dts/api/src/accessAdmin.d.ts +0 -4
  11. package/dist/_dts/api/src/accountApi.d.ts +1 -1
  12. package/dist/_dts/api/src/admin.d.ts +22 -22
  13. package/dist/_dts/api/src/aiPatch.d.ts +2 -2
  14. package/dist/_dts/api/src/aiPlayground.d.ts +1 -0
  15. package/dist/_dts/api/src/analytics.d.ts +2 -2
  16. package/dist/_dts/api/src/apiEndpointTypes.d.ts +2 -0
  17. package/dist/_dts/api/src/appointmentSetup.d.ts +2 -2
  18. package/dist/_dts/api/src/auth.d.ts +10 -10
  19. package/dist/_dts/api/src/availability.d.ts +6 -6
  20. package/dist/_dts/api/src/billing.d.ts +42 -15
  21. package/dist/_dts/api/src/billingEndpointDefinitions.d.ts +8 -0
  22. package/dist/_dts/api/src/billingEndpointTypes.d.ts +15 -6
  23. package/dist/_dts/api/src/blocks.d.ts +15 -14
  24. package/dist/_dts/api/src/blocksKeys.d.ts +2 -0
  25. package/dist/_dts/api/src/bookingConfig.d.ts +33 -50
  26. package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +2 -6
  27. package/dist/_dts/api/src/bookingOperations.d.ts +9 -11
  28. package/dist/_dts/api/src/bookingRecords.d.ts +16 -11
  29. package/dist/_dts/api/src/bookingRefundOutcomes.d.ts +5 -5
  30. package/dist/_dts/api/src/bookings.d.ts +7 -7
  31. package/dist/_dts/api/src/calendar.d.ts +9 -9
  32. package/dist/_dts/api/src/clientErrorReporting.d.ts +11 -0
  33. package/dist/_dts/api/src/commercePortalEndpoints.d.ts +7 -8
  34. package/dist/_dts/api/src/common/cancellation.d.ts +23 -0
  35. package/dist/_dts/api/src/common/envelope.d.ts +2 -2
  36. package/dist/_dts/api/src/content-editor.d.ts +2 -2
  37. package/dist/_dts/api/src/contentEntries.d.ts +17 -48
  38. package/dist/_dts/api/src/contentRuntime.d.ts +51 -37
  39. package/dist/_dts/api/src/contentTypes.d.ts +11 -11
  40. package/dist/_dts/api/src/contentVersionHistoryClient.d.ts +6 -6
  41. package/dist/_dts/api/src/customerMembershipOutcomes.d.ts +1 -1
  42. package/dist/_dts/api/src/documentLifecycle.d.ts +67 -0
  43. package/dist/_dts/api/src/domains.d.ts +16 -16
  44. package/dist/_dts/api/src/editLeaseEndpoints.d.ts +72 -0
  45. package/dist/_dts/api/src/emailSettings.d.ts +4 -4
  46. package/dist/_dts/api/src/endpoints.d.ts +135 -51
  47. package/dist/_dts/api/src/eventEmailTemplates.d.ts +2 -2
  48. package/dist/_dts/api/src/eventManagementContracts.d.ts +29 -7
  49. package/dist/_dts/api/src/eventManagementEndpointDefinitions.d.ts +0 -8
  50. package/dist/_dts/api/src/eventPageWords.d.ts +7 -12
  51. package/dist/_dts/api/src/footerSettings.d.ts +6 -6
  52. package/dist/_dts/api/src/index.d.ts +8 -7
  53. package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -0
  54. package/dist/_dts/api/src/indexExtendedTypes.d.ts +1 -1
  55. package/dist/_dts/api/src/navigation.d.ts +5 -5
  56. package/dist/_dts/api/src/pageSurfaceEditorEndpoints.d.ts +55 -0
  57. package/dist/_dts/api/src/pageSurfaceEndpoints.d.ts +28 -7
  58. package/dist/_dts/api/src/pages.d.ts +7 -7
  59. package/dist/_dts/api/src/performance.d.ts +1 -1
  60. package/dist/_dts/api/src/public/index.d.ts +1 -1
  61. package/dist/_dts/api/src/publicAppointmentBookingContracts.d.ts +4 -2
  62. package/dist/_dts/api/src/publicExperience/commerceEndpoints.d.ts +6 -29
  63. package/dist/_dts/api/src/redirects.d.ts +3 -3
  64. package/dist/_dts/api/src/request.d.ts +11 -2
  65. package/dist/_dts/api/src/resources.d.ts +4 -4
  66. package/dist/_dts/api/src/routes.d.ts +8 -3
  67. package/dist/_dts/api/src/sdk-event-upsert.d.ts +1 -2
  68. package/dist/_dts/api/src/sdkBlockUpsertContracts.d.ts +21 -0
  69. package/dist/_dts/api/src/sdkContracts.d.ts +5 -28
  70. package/dist/_dts/api/src/sdkEventEndpointDefinitions.d.ts +1 -1
  71. package/dist/_dts/api/src/sdkEventOccurrenceRequestContracts.d.ts +43 -0
  72. package/dist/_dts/api/src/sdkManagedEventContracts.d.ts +4 -2
  73. package/dist/_dts/api/src/sdkPullEventContracts.d.ts +9 -2
  74. package/dist/_dts/api/src/seo.d.ts +4 -4
  75. package/dist/_dts/api/src/services.d.ts +4 -4
  76. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +15 -8
  77. package/dist/_dts/api/src/siteMembers.d.ts +10 -10
  78. package/dist/_dts/api/src/siteOnboarding.d.ts +14 -0
  79. package/dist/_dts/api/src/siteOperations.d.ts +6 -2
  80. package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +7 -3
  81. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +5 -12
  82. package/dist/_dts/api/src/siteRuntimeEntry.d.ts +31 -0
  83. package/dist/_dts/billing/src/checkout/platform.d.ts +77 -0
  84. package/dist/_dts/billing/src/components/index.d.ts +25 -40
  85. package/dist/_dts/billing/src/membership/index.d.ts +1 -3
  86. package/dist/_dts/billing/src/plans/entitlements.d.ts +80 -0
  87. package/dist/_dts/billing/src/plans/registry.d.ts +16 -16
  88. package/dist/_dts/billing/src/plans/standing.d.ts +9 -2
  89. package/dist/_dts/billing/src/plans/types.d.ts +5 -15
  90. package/dist/_dts/billing/src/site-arrangements.d.ts +2 -2
  91. package/dist/_dts/billing/src/subscriptions/standingEvidence.d.ts +2 -4
  92. package/dist/_dts/billing/src/subscriptions/store.d.ts +17 -11
  93. package/dist/_dts/block-form/src/backend/store-backend.d.ts +6 -7
  94. package/dist/_dts/block-form/src/backend/types.d.ts +7 -0
  95. package/dist/_dts/block-form/src/widgets/FieldFrame.d.ts +3 -1
  96. package/dist/_dts/blocks/src/client/events.d.ts +3 -0
  97. package/dist/_dts/blocks/src/contracts/index.d.ts +1 -1
  98. package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +2 -2
  99. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +54 -14
  100. package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +4 -13
  101. package/dist/_dts/blocks/src/pageRendererContracts.d.ts +2 -0
  102. package/dist/_dts/blocks/src/portal/types.d.ts +9 -8
  103. package/dist/_dts/blocks/src/system/blocks/contact-newsletter.d.ts +2 -1
  104. package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +3 -1
  105. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +28 -28
  106. package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +7 -2
  107. package/dist/_dts/blocks/src/system/blocks/shared/bookingPaymentTerms.d.ts +84 -160
  108. package/dist/_dts/blocks/src/system/blocks/shop.d.ts +2 -2
  109. package/dist/_dts/blocks/src/system/blocks/shop.shared.d.ts +31 -4
  110. package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +2 -2
  111. package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
  112. package/dist/_dts/blocks/src/system/runtime/api/types/appointments.d.ts +4 -2
  113. package/dist/_dts/blocks/src/system/runtime/api/types/core.d.ts +3 -1
  114. package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +6 -0
  115. package/dist/_dts/blocks/src/system/runtime/api/types/portal.d.ts +6 -0
  116. package/dist/_dts/blocks/src/system/runtime/api/types/shop.d.ts +4 -0
  117. package/dist/_dts/blocks/src/system/runtime/components/booking/SuccessMessage.d.ts +4 -1
  118. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +72 -12
  119. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +36 -6
  120. package/dist/_dts/blocks/src/system/runtime/hooks/useBookingNowIso.d.ts +8 -0
  121. package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.d.ts +3 -0
  122. package/dist/_dts/blocks/src/system/runtime/hooks/usePaymentVerification.d.ts +2 -1
  123. package/dist/_dts/blocks/src/system/runtime/hooks/usePolling.d.ts +7 -48
  124. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.checkout-return-context.d.ts +7 -0
  125. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.completion.d.ts +3 -1
  126. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +4 -0
  127. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.interactive.d.ts +9 -0
  128. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.payment-confirmation.d.ts +13 -0
  129. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +17 -2
  130. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.submit-actions.d.ts +8 -0
  131. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.submit-handler.d.ts +1 -0
  132. package/dist/_dts/blocks/src/system/runtime/nodes/booking-runtime-sources.d.ts +1 -0
  133. package/dist/_dts/blocks/src/system/runtime/nodes/checkout.server.d.ts +2 -1
  134. package/dist/_dts/blocks/src/system/runtime/nodes/commerce/shared/display.d.ts +9 -2
  135. package/dist/_dts/blocks/src/system/runtime/nodes/event-details/presentation.d.ts +14 -2
  136. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationSurface.d.ts +2 -1
  137. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizard.d.ts +5 -0
  138. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/PaymentSelectionStep.d.ts +2 -0
  139. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/SuccessStep.d.ts +4 -1
  140. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +3 -3
  141. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +2 -0
  142. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +2 -5
  143. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +4 -0
  144. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +9 -5
  145. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.interactive.d.ts +6 -0
  146. package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/dates.d.ts +37 -3
  147. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventCard.client.d.ts +1 -1
  148. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventCard.d.ts +16 -1
  149. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCardPresentations.d.ts +13 -0
  150. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +29 -29
  151. package/dist/_dts/blocks/src/system/runtime/nodes/shared/MagicLinkForm.d.ts +1 -14
  152. package/dist/_dts/blocks/src/system/runtime/nodes/shared/MagicLinkForm.state.d.ts +12 -0
  153. package/dist/_dts/blocks/src/system/runtime/nodes/shop.interactive.d.ts +54 -6
  154. package/dist/_dts/blocks/src/system/runtime/shared/bookingPaymentOptions.d.ts +7 -2
  155. package/dist/_dts/blocks/src/system/runtime/shared/components/DemoBookingPortalAccess.d.ts +22 -0
  156. package/dist/_dts/blocks/src/system/runtime/shared/components/DemoPortalSignInLink.d.ts +4 -0
  157. package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +1 -0
  158. package/dist/_dts/blocks/src/system/runtime/shared/utils/demoBookingPassStorage.d.ts +10 -0
  159. package/dist/_dts/blocks/src/system/runtime/shared/utils/demoPortalMagicLink.d.ts +29 -0
  160. package/dist/_dts/commerce/src/purchase/bookingPaymentSelection.d.ts +54 -0
  161. package/dist/_dts/commerce/src/purchase/checkoutCommitPlan.d.ts +58 -13
  162. package/dist/_dts/commerce/src/purchase/checkoutErrorCodes.d.ts +1 -1
  163. package/dist/_dts/commerce/src/purchase/checkoutPaymentPlanPlanning.d.ts +16 -21
  164. package/dist/_dts/commerce/src/purchase/checkoutPaymentTerms.d.ts +23 -40
  165. package/dist/_dts/commerce/src/purchase/checkoutSessionMetadata.d.ts +2 -2
  166. package/dist/_dts/commerce/src/purchase/checkoutStripeSessionPlanning.d.ts +5 -4
  167. package/dist/_dts/commerce/src/purchase/event-registration-errors.d.ts +4 -0
  168. package/dist/_dts/commerce/src/purchase/index.d.ts +1 -3
  169. package/dist/_dts/commerce/src/purchase/membershipOrderItemMetadata.d.ts +4 -0
  170. package/dist/_dts/commerce/src/purchase/oneTimeCheckoutPlanning.d.ts +9 -4
  171. package/dist/_dts/commerce/src/purchase/orderInstalmentClosure.d.ts +13 -1
  172. package/dist/_dts/commerce/src/purchase/orderInstalmentLifecycle.d.ts +5 -0
  173. package/dist/_dts/commerce/src/purchase/orderItemMetadata.d.ts +3 -1
  174. package/dist/_dts/commerce/src/purchase/orderTypes.d.ts +7 -1
  175. package/dist/_dts/commerce/src/purchase/refundRailSplit.d.ts +1 -1
  176. package/dist/_dts/commerce/src/purchase/stateTransitions.d.ts +2 -2
  177. package/dist/_dts/commerce/src/purchase/stripeMinimumCharge.d.ts +6 -0
  178. package/dist/_dts/commerce/src/purchase/types.d.ts +2 -1
  179. package/dist/_dts/content-editor/src/components/ContentFieldsForm.d.ts +2 -7
  180. package/dist/_dts/content-editor/src/controller/EditLeaseController.d.ts +39 -0
  181. package/dist/_dts/content-editor/src/controller/EditorWriteGate.d.ts +38 -0
  182. package/dist/_dts/content-editor/src/controller/EntryControllerProvider.d.ts +25 -61
  183. package/dist/_dts/content-editor/src/controller/LinkedEntryLeaseBanner.d.ts +7 -0
  184. package/dist/_dts/content-editor/src/controller/LinkedEntryLeaseControllers.d.ts +14 -0
  185. package/dist/_dts/content-editor/src/controller/deriveEditorUnpublishedState.d.ts +6 -0
  186. package/dist/_dts/content-editor/src/controller/documentValueBaseline.d.ts +25 -0
  187. package/dist/_dts/content-editor/src/controller/editLeaseHandover.d.ts +30 -0
  188. package/dist/_dts/content-editor/src/controller/editLeaseLossSignal.d.ts +6 -0
  189. package/dist/_dts/content-editor/src/controller/editLeaseNotice.d.ts +28 -0
  190. package/dist/_dts/content-editor/src/controller/editorClientId.d.ts +2 -0
  191. package/dist/_dts/content-editor/src/controller/editorEditability.d.ts +38 -0
  192. package/dist/_dts/content-editor/src/controller/editorLeaseParticipation.d.ts +34 -0
  193. package/dist/_dts/content-editor/src/controller/normalizedMetadataBaseline.d.ts +29 -0
  194. package/dist/_dts/content-editor/src/controller/pageSurfaceDocumentBaselines.d.ts +14 -0
  195. package/dist/_dts/content-editor/src/controller/pageSurfaceLifecycle.d.ts +11 -0
  196. package/dist/_dts/content-editor/src/controller/planDocumentBaselineRefresh.d.ts +19 -0
  197. package/dist/_dts/content-editor/src/controller/readDocumentLeaseBaselines.d.ts +19 -0
  198. package/dist/_dts/content-editor/src/controller/refreshDocumentLeaseBaseline.d.ts +12 -0
  199. package/dist/_dts/content-editor/src/controller/refreshLinkedEntry.d.ts +17 -0
  200. package/dist/_dts/content-editor/src/controller/replayRestoredEditorEffects.d.ts +2 -3
  201. package/dist/_dts/content-editor/src/controller/routeWrites.d.ts +26 -0
  202. package/dist/_dts/content-editor/src/controller/useAutosaveTriggers.d.ts +16 -17
  203. package/dist/_dts/content-editor/src/controller/useBlockedPublishPlan.d.ts +6 -2
  204. package/dist/_dts/content-editor/src/controller/useBlocksList.d.ts +3 -3
  205. package/dist/_dts/content-editor/src/controller/useEntryValueAutosaves.d.ts +21 -0
  206. package/dist/_dts/content-editor/src/controller/useInitialEditorUiStore.d.ts +24 -0
  207. package/dist/_dts/content-editor/src/controller/useServerBaselineReconciliation.d.ts +17 -0
  208. package/dist/_dts/content-editor/src/footerComposerPanelTypes.d.ts +1 -1
  209. package/dist/_dts/content-editor/src/hooks/applyBlockedPublishPlan.d.ts +5 -1
  210. package/dist/_dts/content-editor/src/hooks/blockDraftLifecycle.d.ts +8 -47
  211. package/dist/_dts/content-editor/src/hooks/editLeaseMachine.d.ts +120 -0
  212. package/dist/_dts/content-editor/src/hooks/publishability.d.ts +6 -10
  213. package/dist/_dts/content-editor/src/hooks/useAutosaveStatus.d.ts +3 -0
  214. package/dist/_dts/content-editor/src/hooks/useBlockAutosave.d.ts +5 -15
  215. package/dist/_dts/content-editor/src/hooks/useDebouncedLatestSave.d.ts +7 -5
  216. package/dist/_dts/content-editor/src/hooks/useEditLease.d.ts +28 -0
  217. package/dist/_dts/content-editor/src/hooks/useEntryActions.d.ts +25 -39
  218. package/dist/_dts/content-editor/src/hooks/useEntryMutations.d.ts +17 -19
  219. package/dist/_dts/content-editor/src/hooks/useLinkedEntryAutosave.d.ts +5 -8
  220. package/dist/_dts/content-editor/src/hooks/useValueAutosave.d.ts +64 -0
  221. package/dist/_dts/content-editor/src/hooks/validateBlocksForPublish.d.ts +0 -7
  222. package/dist/_dts/content-editor/src/index.d.ts +26 -7
  223. package/dist/_dts/content-editor/src/lib/browserStorage.d.ts +5 -0
  224. package/dist/_dts/content-editor/src/linkedEntries/domain.d.ts +12 -0
  225. package/dist/_dts/content-editor/src/linkedEntries/owner.d.ts +9 -0
  226. package/dist/_dts/content-editor/src/liveDrafts/draftProjection.d.ts +66 -0
  227. package/dist/_dts/content-editor/src/liveDrafts/linkedSaveHandovers.d.ts +37 -0
  228. package/dist/_dts/content-editor/src/liveDrafts/remoteDraftOverlay.d.ts +113 -0
  229. package/dist/_dts/content-editor/src/liveDrafts/useLiveDrafts.d.ts +32 -0
  230. package/dist/_dts/content-editor/src/liveDrafts/useRetentionTicks.d.ts +7 -0
  231. package/dist/_dts/content-editor/src/primitives/shared/activePreviewField.d.ts +6 -0
  232. package/dist/_dts/content-editor/src/primitives/shared/storeBinding.d.ts +1 -0
  233. package/dist/_dts/content-editor/src/services/contentEntryServices.d.ts +96 -19
  234. package/dist/_dts/content-editor/src/services/editorApiClient.d.ts +13 -0
  235. package/dist/_dts/content-editor/src/services/index.d.ts +2 -0
  236. package/dist/_dts/content-editor/src/services/pageSurfaceEditorServices.d.ts +23 -0
  237. package/dist/_dts/content-editor/src/sync/flushValues.d.ts +13 -0
  238. package/dist/_dts/content-editor/src/sync/lifecycleFailure.d.ts +51 -0
  239. package/dist/_dts/content-editor/src/sync/runLifecycle.d.ts +64 -0
  240. package/dist/_dts/content-editor/src/sync/schedulerValues.d.ts +27 -0
  241. package/dist/_dts/content-editor/src/sync/sendPlanning.d.ts +104 -0
  242. package/dist/_dts/content-editor/src/sync/valueSync.d.ts +114 -0
  243. package/dist/_dts/content-editor/src/ui/blockCollection.d.ts +8 -0
  244. package/dist/_dts/content-editor/src/ui/documentLifecycle.d.ts +18 -0
  245. package/dist/_dts/content-editor/src/ui/editorLeaseUiState.d.ts +7 -0
  246. package/dist/_dts/content-editor/src/ui/editorRefresh.d.ts +82 -0
  247. package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +102 -127
  248. package/dist/_dts/content-editor/src/ui/editorTransactionState.d.ts +1 -1
  249. package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +126 -72
  250. package/dist/_dts/content-editor/src/ui/editorValueSnapshot.d.ts +18 -0
  251. package/dist/_dts/content-editor/src/ui/serverBlockAdmission.d.ts +26 -0
  252. package/dist/_dts/content-editor/src/ui/stores/autosaveStore.d.ts +16 -27
  253. package/dist/_dts/content-editor/src/ui/stores/blockVersionsStore.d.ts +24 -0
  254. package/dist/_dts/content-editor/src/ui/stores/linkedEntryLeaseStore.d.ts +54 -0
  255. package/dist/_dts/content-editor/src/ui/stores/linkedSaveHandoversStore.d.ts +11 -0
  256. package/dist/_dts/content-editor/src/ui/stores/remoteDraftsStore.d.ts +10 -0
  257. package/dist/_dts/content-editor/src/ui/stores/types.d.ts +63 -3
  258. package/dist/_dts/content-editor/src/useFooterComposerState.d.ts +2 -2
  259. package/dist/_dts/content-editor/src/useFooterNavigationLayout.d.ts +1 -1
  260. package/dist/_dts/content-model/src/content-types/builtin-schemas.d.ts +4 -4
  261. package/dist/_dts/content-model/src/content-types/builtins.d.ts +4 -4
  262. package/dist/_dts/content-model/src/definitions/shared.d.ts +11 -2
  263. package/dist/_dts/content-model/src/entry-slots/index.d.ts +1 -0
  264. package/dist/_dts/content-model/src/entry-slots/serializeAllowedBlocks.d.ts +2 -0
  265. package/dist/_dts/content-model/src/metadataConfig.d.ts +10 -38
  266. package/dist/_dts/content-model/src/templates/defaults.d.ts +0 -1
  267. package/dist/_dts/content-model/src/types.d.ts +0 -1
  268. package/dist/_dts/core/src/block-content-identity.d.ts +49 -1
  269. package/dist/_dts/core/src/booking-flexible-balance.d.ts +2 -2
  270. package/dist/_dts/core/src/booking-instalment-deposit.d.ts +20 -0
  271. package/dist/_dts/core/src/booking-live-payment-terms.d.ts +72 -0
  272. package/dist/_dts/core/src/booking-payment-options.d.ts +24 -0
  273. package/dist/_dts/core/src/booking-payment-schemas.d.ts +522 -0
  274. package/dist/_dts/core/src/branded.d.ts +15 -0
  275. package/dist/_dts/core/src/currency-format.d.ts +8 -2
  276. package/dist/_dts/core/src/demo-lifecycle-status.d.ts +2 -2
  277. package/dist/_dts/core/src/demo-warm-pool-target.d.ts +8 -0
  278. package/dist/_dts/core/src/edit-lease.d.ts +60 -0
  279. package/dist/_dts/core/src/editor-state.d.ts +38 -13
  280. package/dist/_dts/core/src/editor-value-sync.d.ts +79 -0
  281. package/dist/_dts/core/src/html-entities.d.ts +6 -0
  282. package/dist/_dts/core/src/index.d.ts +7 -0
  283. package/dist/_dts/core/src/uuid.d.ts +7 -5
  284. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +456 -189
  285. package/dist/_dts/editor/src/EditorProvider.d.ts +5 -0
  286. package/dist/_dts/editor/src/chrome/EditorChrome.d.ts +14 -0
  287. package/dist/_dts/editor/src/chrome/EditorStatusBar.d.ts +1 -0
  288. package/dist/_dts/editor/src/chrome/statusBarPresentation.d.ts +0 -1
  289. package/dist/_dts/editor/src/index.d.ts +1 -1
  290. package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +10 -9
  291. package/dist/_dts/editor-blocks/src/BlockForm.d.ts +1 -1
  292. package/dist/_dts/editor-blocks/src/block-editor/BlockCard.d.ts +1 -1
  293. package/dist/_dts/editor-blocks/src/block-editor/BlockCardFrame.d.ts +1 -1
  294. package/dist/_dts/editor-blocks/src/block-editor/BlockSettingsModal.d.ts +1 -1
  295. package/dist/_dts/editor-blocks/src/block-editor/applyExtendedFieldDefaults.d.ts +3 -4
  296. package/dist/_dts/editor-blocks/src/block-editor/blockDraftBaselineSeed.d.ts +4 -8
  297. package/dist/_dts/editor-blocks/src/block-editor/editorBlockItem.d.ts +23 -0
  298. package/dist/_dts/editor-blocks/src/block-editor/generatedIconApplyCoordination.d.ts +2 -7
  299. package/dist/_dts/editor-blocks/src/block-editor/hooks/applyBlockStructureChange.d.ts +4 -0
  300. package/dist/_dts/editor-blocks/src/block-editor/hooks/buildInsertBlockHistoryCommand.d.ts +14 -5
  301. package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockBaselineSync.d.ts +21 -19
  302. package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockCreation.d.ts +2 -10
  303. package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockDuplication.d.ts +8 -16
  304. package/dist/_dts/editor-blocks/src/block-editor/owner.d.ts +6 -16
  305. package/dist/_dts/editor-blocks/src/block-editor/types.d.ts +37 -9
  306. package/dist/_dts/editor-blocks/src/index.d.ts +2 -1
  307. package/dist/_dts/editor-blocks/src/widgets/entry-picker/loaders.d.ts +1 -1
  308. package/dist/_dts/editor-blocks/src/widgets/link/loaders.d.ts +1 -1
  309. package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/loaders.d.ts +1 -1
  310. package/dist/_dts/editor-blocks/src/widgets/reference/loaders.d.ts +1 -1
  311. package/dist/_dts/editor-blocks/src/widgets/site-option-picker/loaders.d.ts +3 -2
  312. package/dist/_dts/media-core/src/fileStorage.d.ts +4 -0
  313. package/dist/_dts/media-editor/src/MediaPickerDialog.d.ts +3 -1
  314. package/dist/_dts/media-editor/src/MediaPickerMiniDialog.d.ts +10 -0
  315. package/dist/_dts/media-editor/src/context.d.ts +1 -1
  316. package/dist/_dts/media-editor/src/createMediaEditorProvider.d.ts +1 -2
  317. package/dist/_dts/media-editor/src/index.d.ts +2 -0
  318. package/dist/_dts/media-editor/src/provider.d.ts +3 -2
  319. package/dist/_dts/media-react/src/hooks/internal/classification.d.ts +1 -1
  320. package/dist/_dts/media-react/src/hooks/useApiMediaUploader.d.ts +3 -1
  321. package/dist/_dts/preview-next/src/client/blocks/composer/mergeDrafts.d.ts +8 -3
  322. package/dist/_dts/preview-next/src/client/blocks/composer/types.d.ts +6 -3
  323. package/dist/_dts/preview-next/src/client/blocks/linkedEntryRenderOverlay.d.ts +22 -2
  324. package/dist/_dts/preview-next/src/client/blocks/previewProjection/entryFieldRebinding.d.ts +13 -0
  325. package/dist/_dts/preview-next/src/client/blocks/previewProjection/index.d.ts +2 -1
  326. package/dist/_dts/preview-next/src/client/blocks/previewProjection/types.d.ts +11 -1
  327. package/dist/_dts/preview-next/src/client/blocks/renderPrecedence.d.ts +17 -0
  328. package/dist/_dts/preview-next/src/client/blocks/useLinkedSaveHandoverRetention.d.ts +20 -0
  329. package/dist/_dts/preview-next/src/client/index.d.ts +1 -1
  330. package/dist/_dts/preview-next/src/client/preview/EntryEditorPanel.d.ts +2 -1
  331. package/dist/_dts/preview-next/src/client/preview/EntrySlotBlockEditorPanel.d.ts +2 -1
  332. package/dist/_dts/preview-next/src/client/preview/PreviewAccessBanners.d.ts +7 -0
  333. package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +2 -1
  334. package/dist/_dts/preview-next/src/client/preview/PreviewEntryControllerProvider.d.ts +23 -14
  335. package/dist/_dts/preview-next/src/client/preview/PreviewLeaseEditingMode.d.ts +2 -0
  336. package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +9 -2
  337. package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +1 -0
  338. package/dist/_dts/preview-next/src/client/preview/previewCustomizeAutosave.d.ts +5 -0
  339. package/dist/_dts/preview-next/src/client/preview/previewCustomizeWorkflowState.d.ts +3 -4
  340. package/dist/_dts/preview-next/src/client/preview/sdkConfig.d.ts +1 -0
  341. package/dist/_dts/preview-next/src/client/preview/usePreviewCustomizeWorkflowState.d.ts +4 -0
  342. package/dist/_dts/preview-next/src/client/previewAuthStore.d.ts +7 -0
  343. package/dist/_dts/preview-next/src/constants.d.ts +4 -0
  344. package/dist/_dts/preview-next/src/keepAlive.d.ts +1 -0
  345. package/dist/_dts/realtime/src/client.d.ts +3 -0
  346. package/dist/_dts/realtime/src/draftChannel.d.ts +91 -0
  347. package/dist/_dts/realtime/src/drafts.d.ts +210 -0
  348. package/dist/_dts/realtime/src/index.d.ts +3 -0
  349. package/dist/_dts/realtime/src/leaseChangeSubscriptions.d.ts +8 -0
  350. package/dist/_dts/realtime/src/types.d.ts +113 -0
  351. package/dist/_dts/realtime/src/useDraftChannel.d.ts +34 -0
  352. package/dist/_dts/realtime/src/useSiteRealtimeReload.d.ts +27 -0
  353. package/dist/_dts/sdk/src/public-api/contracts.d.ts +6 -55
  354. package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +1 -0
  355. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -0
  356. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +2 -0
  357. package/dist/_dts/sdk/src/rendering/islands/types.d.ts +2 -12
  358. package/dist/_dts/sdk/src/version.d.ts +1 -1
  359. package/dist/_dts/surfaces/src/index.d.ts +1 -0
  360. package/dist/_dts/theme-core/src/site-styles/designState.d.ts +2 -2
  361. package/dist/_dts/theme-core/src/site-styles/pageDesignIntent.d.ts +0 -5
  362. package/dist/_dts/ui/src/color-picker.d.ts +1 -1
  363. package/dist/_dts/ui/src/palette/useHexDraft.d.ts +7 -0
  364. package/dist/client/{BookingMailingListNote-1n4Ch_u_.mjs → BookingMailingListNote-Cr3EeTP5.mjs} +504 -163
  365. package/dist/client/DemoBookingPortalAccess-BFGB1Fay.mjs +344 -0
  366. package/dist/client/{EventCombined.client-C0pgma9y.mjs → EventCombined.client-DKYV0_ft.mjs} +6 -6
  367. package/dist/client/{EventListing.client-4fhLOvHP.mjs → EventListing.client-B9UIcEYc.mjs} +2 -2
  368. package/dist/client/{LeafletStaticMap-DScC4F3w.mjs → LeafletStaticMap-CFLPkP0K.mjs} +1 -1
  369. package/dist/client/{TerminalPanel-B5ZUsYhe.mjs → TerminalPanel-JjmgxEsR.mjs} +1 -1
  370. package/dist/client/{ThemedButton-DoVIV1Ao.mjs → ThemedButton-CKV1Jh2m.mjs} +1 -1
  371. package/dist/client/{accordion-CoT5g7zo.mjs → accordion-DXWIfT3T.mjs} +1 -1
  372. package/dist/client/{bookingForm-BWxB46xD.mjs → bookingForm-CjZgHNvv.mjs} +216 -63
  373. package/dist/client/bookings.mjs +1187 -692
  374. package/dist/client/{carousel-DtNYWFd3.mjs → carousel-DSLikmvZ.mjs} +1 -1
  375. package/dist/client/{cart-z4qZih1Y.mjs → cart-HDjWReFt.mjs} +3 -3
  376. package/dist/client/{checkout-DpL7euFH.mjs → checkout-CUvRZA3W.mjs} +3 -3
  377. package/dist/client/{checkoutUrls-BEfR7kVu.mjs → checkoutUrls-CXhko2Rv.mjs} +1 -1
  378. package/dist/client/client.mjs +2711 -1684
  379. package/dist/client/{context-C8TinPJc.mjs → context-DFmaZa-Q.mjs} +4 -3
  380. package/dist/client/{dates-vwwxTeB0.mjs → dates-BBep1JnF.mjs} +56 -11
  381. package/dist/client/{eventCalendar-DIbHfJXO.mjs → eventCalendar-zEobhxo4.mjs} +9 -9
  382. package/dist/client/{eventCombined-DoGMJ6cg.mjs → eventCombined-Dp7bz5k-.mjs} +4 -4
  383. package/dist/client/{eventDetails-BjN9v6a1.mjs → eventDetails-FE-zqTt7.mjs} +4 -4
  384. package/dist/client/{eventListing-DajjWgOv.mjs → eventListing-BMt5snal.mjs} +4 -4
  385. package/dist/client/{eventRegistration-DMq9gMA-.mjs → eventRegistration-O6ZxHfOb.mjs} +422 -570
  386. package/dist/client/{form-Qf6qTbos.mjs → form-DFa1D8vt.mjs} +3 -3
  387. package/dist/client/{headerSection-D7qJrqFX.mjs → headerSection-CmjHLR-N.mjs} +3 -3
  388. package/dist/client/hooks.mjs +414 -182
  389. package/dist/client/{locationMap-CCF9-t_0.mjs → locationMap-BXKP_lGh.mjs} +3 -3
  390. package/dist/client/{media-CwBGetqC.mjs → media-Cl38iOMI.mjs} +10 -3
  391. package/dist/client/{newsletterForm-DzCLSP4S.mjs → newsletterForm-CU-HmxGx.mjs} +3 -3
  392. package/dist/client/{pricing-Cgxv2KLC.mjs → pricing-KEAEsibq.mjs} +1 -1
  393. package/dist/client/{productDetail-ru9w5GHx.mjs → productDetail-Ckp7MGnt.mjs} +3 -3
  394. package/dist/client/{productList-zaapKSl-.mjs → productList-D91V0sYa.mjs} +3 -3
  395. package/dist/client/{propsDecoder-CwvvNOHx.mjs → propsDecoder-DZd6RJeA.mjs} +244 -94
  396. package/dist/client/rendering/client.mjs +2656 -1705
  397. package/dist/client/rendering/islands.mjs +18 -18
  398. package/dist/client/rendering.mjs +3430 -2352
  399. package/dist/client/{routeIslandApiConfig-BwVFo0Y4.mjs → routeIslandApiConfig-E1EkhhYY.mjs} +1 -1
  400. package/dist/client/{shop-mktkXvbV.mjs → shop-4F2jLQPI.mjs} +131 -85
  401. package/dist/client/{shop-commerce-De7gEnkA.mjs → shop-commerce-BbfCJjB3.mjs} +25 -13
  402. package/dist/client/{shop-commerce-store-B3MCxIBW.mjs → shop-commerce-store-vicweP2K.mjs} +1 -1
  403. package/dist/client/{shopShared-TqExh235.mjs → shopShared-DlONJt0T.mjs} +4 -4
  404. package/dist/client/{useEventFilters-n_OjkIjX.mjs → useEventFilters-COYyL3m7.mjs} +32 -17
  405. package/dist/preview-next/before-render.mjs +207 -105
  406. package/dist/preview-next/client/runtime.mjs +4 -4
  407. package/dist/preview-next/constants.mjs +5 -1
  408. package/dist/preview-next/index.mjs +5 -1
  409. package/dist/preview-next/keepAlive.mjs +341 -165
  410. package/dist/preview-next/middleware.mjs +207 -105
  411. package/dist/{previewAuthStore-C_EHQ5XA.mjs → previewAuthStore-BBmV7UsW.mjs} +243 -112
  412. package/dist/{sdk-runtime-BIkJg5y1.mjs → sdk-runtime-CwvFFjB-.mjs} +2 -2
  413. package/dist/{separator-C9qDP95Z.mjs → separator-ByL72zUT.mjs} +1 -1
  414. package/dist/server/components.mjs +1839 -1475
  415. package/dist/server/config-validation.mjs +381 -166
  416. package/dist/server/config.mjs +381 -166
  417. package/dist/server/data.mjs +381 -166
  418. package/dist/server/index.mjs +214 -110
  419. package/dist/server/next.mjs +663 -351
  420. package/dist/server/page-converter.mjs +198 -79
  421. package/dist/server/prebuild.mjs +1 -1
  422. package/dist/server/rendering/server.mjs +1536 -1169
  423. package/dist/server/rendering.mjs +2432 -2068
  424. package/dist/server/routing.mjs +456 -173
  425. package/dist/server/server.mjs +447 -267
  426. package/package.json +1 -1
  427. package/dist/_dts/api/src/bookingPaymentTermSchemas.d.ts +0 -123
  428. package/dist/_dts/billing/src/plans/display.d.ts +0 -15
  429. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.mailing-list-note.d.ts +0 -3
  430. package/dist/_dts/commerce/src/purchase/checkoutPaymentTermPlanning.d.ts +0 -10
  431. package/dist/_dts/commerce/src/purchase/checkoutValidatedItemPlanning.d.ts +0 -55
  432. package/dist/_dts/commerce/src/purchase/orderInstalmentPayoff.d.ts +0 -24
  433. package/dist/_dts/content-editor/src/controller/buildBlockPublishedBaselines.d.ts +0 -4
  434. package/dist/_dts/content-editor/src/controller/buildPublishSuccessTransition.d.ts +0 -16
  435. package/dist/_dts/content-editor/src/controller/driver.d.ts +0 -14
  436. package/dist/_dts/content-editor/src/controller/seedDraftBaselinesFromBlocks.d.ts +0 -7
  437. package/dist/_dts/content-editor/src/controller/useEntrySyncHelpers.d.ts +0 -29
  438. package/dist/_dts/content-editor/src/hooks/autosaveScopePlanning.d.ts +0 -26
  439. package/dist/_dts/content-editor/src/hooks/useSimpleAutosave.d.ts +0 -64
  440. package/dist/_dts/content-editor/src/hooks/useStoreAutosave.d.ts +0 -48
  441. package/dist/_dts/content-editor/src/types.d.ts +0 -44
  442. package/dist/client/DiscountCodeDisclosure-CKJtz0mY.mjs +0 -137
@@ -6,7 +6,7 @@ export type CheckoutCommitOrderRecord = Readonly<{
6
6
  reconciliationState: OrderCheckoutReconciliationState;
7
7
  }>;
8
8
  export type CheckoutCommitOrderItemRecord = Readonly<Pick<OrderItemPlanningRecord, 'kind' | 'commitState' | 'reconciliationState' | 'fulfilledAt' | 'cancelledAt' | 'customerMembershipId'>>;
9
- export type CheckoutCommitPlanStepKind = 'consume_credit_reservation' | 'provision_memberships' | 'fulfill_order_items' | 'redeem_discount' | 'record_order_payment';
9
+ export type CheckoutCommitPlanStepKind = 'consume_credit_reservation' | 'provision_memberships' | 'fulfill_order_items' | 'redeem_discount';
10
10
  export type NormalizedOrderCommitItem<TItem extends CheckoutCommitOrderItemRecord = CheckoutCommitOrderItemRecord> = Readonly<{
11
11
  item: TItem;
12
12
  commitState: OrderItemCommitState;
@@ -18,23 +18,68 @@ export type NormalizedOrderCommitSnapshot<TOrder extends CheckoutCommitOrderReco
18
18
  reconciliationState: OrderCheckoutReconciliationState;
19
19
  items: readonly NormalizedOrderCommitItem<TItem>[];
20
20
  }>;
21
- export type CheckoutCommitPlanStep = Readonly<{
22
- kind: CheckoutCommitPlanStepKind;
21
+ /** Bypass checkouts take no Stripe session, so nothing provisions memberships from one. */
22
+ export type BypassCheckoutCommitPlanStepKind = Exclude<CheckoutCommitPlanStepKind, 'provision_memberships'>;
23
+ export type CheckoutCommitPlanStep<TStep extends CheckoutCommitPlanStepKind = CheckoutCommitPlanStepKind> = Readonly<{
24
+ kind: TStep;
23
25
  }>;
24
- export type CheckoutCommitPlan<TOrder extends CheckoutCommitOrderRecord = CheckoutCommitOrderRecord, TItem extends CheckoutCommitOrderItemRecord = CheckoutCommitOrderItemRecord> = Readonly<{
25
- paymentRail: CheckoutPaymentRail;
26
+ /** A bypass commit never records a payment: there is no cash to record. */
27
+ export type BypassCheckoutCommitPlan<TOrder extends CheckoutCommitOrderRecord = CheckoutCommitOrderRecord, TItem extends CheckoutCommitOrderItemRecord = CheckoutCommitOrderItemRecord> = Readonly<{
28
+ paymentRail: Extract<CheckoutPaymentRail, 'bypass'>;
29
+ normalized: NormalizedOrderCommitSnapshot<TOrder, TItem>;
30
+ steps: readonly CheckoutCommitPlanStep<BypassCheckoutCommitPlanStepKind>[];
31
+ paymentRecord: Extract<CheckoutCommitPaymentRecord, 'not_needed'>;
32
+ }>;
33
+ export type StripeCheckoutCommitPlan<TOrder extends CheckoutCommitOrderRecord = CheckoutCommitOrderRecord, TItem extends CheckoutCommitOrderItemRecord = CheckoutCommitOrderItemRecord> = Readonly<{
34
+ paymentRail: Extract<CheckoutPaymentRail, 'stripe'>;
26
35
  normalized: NormalizedOrderCommitSnapshot<TOrder, TItem>;
27
36
  steps: readonly CheckoutCommitPlanStep[];
37
+ paymentRecord: CheckoutCommitPaymentRecord;
28
38
  }>;
29
- export declare function normalizeOrderCommitSnapshot<TOrder extends CheckoutCommitOrderRecord, TItem extends CheckoutCommitOrderItemRecord>(input: {
30
- order: TOrder;
31
- items: readonly TItem[];
32
- }): NormalizedOrderCommitSnapshot<TOrder, TItem>;
33
- export declare function buildCheckoutCommitPlan<TOrder extends CheckoutCommitOrderRecord, TItem extends CheckoutCommitOrderItemRecord>(input: {
34
- paymentRail: CheckoutPaymentRail;
39
+ export type CheckoutCommitPlan<TOrder extends CheckoutCommitOrderRecord = CheckoutCommitOrderRecord, TItem extends CheckoutCommitOrderItemRecord = CheckoutCommitOrderItemRecord> = BypassCheckoutCommitPlan<TOrder, TItem> | StripeCheckoutCommitPlan<TOrder, TItem>;
40
+ type CheckoutCommitPlanInputBase<TOrder extends CheckoutCommitOrderRecord, TItem extends CheckoutCommitOrderItemRecord> = Readonly<{
35
41
  order: TOrder;
36
42
  items: readonly TItem[];
37
43
  creditReservationState: ReservationFinalizationState;
38
44
  hasDiscountRedemption: boolean;
39
- paymentRecorded: boolean;
40
- }): CheckoutCommitPlan<TOrder, TItem>;
45
+ }>;
46
+ export type BypassCheckoutCommitPlanInput<TOrder extends CheckoutCommitOrderRecord, TItem extends CheckoutCommitOrderItemRecord> = CheckoutCommitPlanInputBase<TOrder, TItem> & Readonly<{
47
+ paymentRail: Extract<CheckoutPaymentRail, 'bypass'>;
48
+ }>;
49
+ export type StripeCheckoutCommitPlanInput<TOrder extends CheckoutCommitOrderRecord, TItem extends CheckoutCommitOrderItemRecord> = CheckoutCommitPlanInputBase<TOrder, TItem> & Readonly<{
50
+ paymentRail: Extract<CheckoutPaymentRail, 'stripe'>;
51
+ /**
52
+ * True when the commit has no payment of its own to record: the webhook
53
+ * recorded the session's receipt before the plan ran, or a subscription
54
+ * invoice owns the cash (its invoice.paid webhook records it).
55
+ */
56
+ paymentOwnedElsewhere: boolean;
57
+ }>;
58
+ /**
59
+ * Whether the commit records the order's payment once every step has
60
+ * completed. A Stripe checkout records here only when nothing else owns its
61
+ * payment (see `paymentOwnedElsewhere`): in practice a zero-total checkout,
62
+ * whose record completes the order without a cash receipt.
63
+ */
64
+ export type CheckoutCommitPaymentRecord = 'record_after_steps' | 'not_needed';
65
+ /**
66
+ * What a checkout commit has done so far that a failure has to undo. The two
67
+ * facts move independently: a resumed commit can start with fulfillment
68
+ * already committed and credit still held. `held` also covers a checkout
69
+ * with no credit reservation, since there is nothing consumed to refund.
70
+ */
71
+ export type CheckoutCommitProgress = Readonly<{
72
+ credit: 'held' | 'consumed';
73
+ fulfillment: Extract<CheckoutCommitState, 'pending' | 'committed'>;
74
+ }>;
75
+ /** Progress before the first step: items an earlier run committed count as fulfilled. */
76
+ export declare function initialCheckoutCommitProgress(normalized: Pick<NormalizedOrderCommitSnapshot, 'items'>): CheckoutCommitProgress;
77
+ /** Progress after `step` completes. */
78
+ export declare function advanceCheckoutCommitProgress(progress: CheckoutCommitProgress, step: CheckoutCommitPlanStepKind): CheckoutCommitProgress;
79
+ export declare function normalizeOrderCommitSnapshot<TOrder extends CheckoutCommitOrderRecord, TItem extends CheckoutCommitOrderItemRecord>(input: {
80
+ order: TOrder;
81
+ items: readonly TItem[];
82
+ }): NormalizedOrderCommitSnapshot<TOrder, TItem>;
83
+ export declare function buildCheckoutCommitPlan<TOrder extends CheckoutCommitOrderRecord, TItem extends CheckoutCommitOrderItemRecord>(input: BypassCheckoutCommitPlanInput<TOrder, TItem>): BypassCheckoutCommitPlan<TOrder, TItem>;
84
+ export declare function buildCheckoutCommitPlan<TOrder extends CheckoutCommitOrderRecord, TItem extends CheckoutCommitOrderItemRecord>(input: StripeCheckoutCommitPlanInput<TOrder, TItem>): StripeCheckoutCommitPlan<TOrder, TItem>;
85
+ export {};
@@ -1 +1 @@
1
- export type CheckoutErrorCode = "appointment_not_found" | "appointment_slot_unavailable" | "appointment_payment_terms_not_supported" | "booking_payment_terms_not_supported" | "checkout_amount_below_minimum" | "sliding_amount_required" | "sliding_amount_invalid" | "sliding_amount_below_min" | "sliding_amount_above_max" | "not_found" | "site_mismatch" | "registration_disabled" | "invalid_payment_method" | "payment_already_completed" | "invalid_payment_status" | "no_event_association" | "payment_not_required" | "customer_not_found" | "stripe_not_configured" | "stripe_commission_not_supported" | "stripe_tax_not_ready" | "stripe_tax_status_unavailable" | "whole_series_pricing_option_not_available" | "product_not_available" | "product_not_eligible" | "insufficient_credits" | "invalid_discount_code" | "unsupported_discount_scope" | "checkout_in_progress" | "stripe_error" | "internal_error";
1
+ export type CheckoutErrorCode = "appointment_not_found" | "appointment_slot_unavailable" | "booking_payment_terms_not_supported" | "checkout_amount_below_minimum" | "sliding_amount_required" | "sliding_amount_invalid" | "sliding_amount_below_min" | "sliding_amount_above_max" | "not_found" | "site_mismatch" | "registration_disabled" | "invalid_payment_method" | "payment_already_completed" | "invalid_payment_status" | "no_event_association" | "payment_not_required" | "customer_not_found" | "stripe_not_configured" | "stripe_commission_not_supported" | "stripe_tax_not_ready" | "stripe_tax_status_unavailable" | "whole_series_pricing_option_not_available" | "product_not_available" | "product_not_eligible" | "insufficient_credits" | "invalid_discount_code" | "unsupported_discount_scope" | "checkout_in_progress" | "stripe_error" | "internal_error";
@@ -1,30 +1,25 @@
1
- import { type BookingFlexibleBalanceConfig } from '../../../core/src/index';
2
- export type CheckoutStripeRequiredPaymentObligation<TInstalmentPlan, TFlexibleBalanceConfig extends BookingFlexibleBalanceConfig> = Readonly<{
1
+ import { type BookingFlexibleBalanceConfig, type BookingInstalmentPlanConfig } from '../../../core/src/index';
2
+ import type { BookingPaymentSelection } from './bookingPaymentSelection';
3
+ /**
4
+ * What a paid checkout has to collect, given its payment selection. Paying in
5
+ * full, having nothing due and not choosing at all are all collected as one
6
+ * card payment; the free and credit-covered cases bypass before this matters.
7
+ */
8
+ export type CheckoutPaymentObligation = Readonly<{
3
9
  kind: 'stripe';
10
+ }> | Readonly<{
11
+ kind: 'deferred_manual';
4
12
  }> | Readonly<{
5
13
  kind: 'instalment_plan';
6
- planDefinition: TInstalmentPlan;
14
+ planDefinition: BookingInstalmentPlanConfig;
7
15
  }> | Readonly<{
8
16
  kind: 'flexible_balance';
9
- config: TFlexibleBalanceConfig;
10
- initialPaymentCents: number;
17
+ config: BookingFlexibleBalanceConfig;
18
+ configuredPaymentDueNowCents: number;
11
19
  bookingStartAt: string;
12
20
  dueAt: string;
13
21
  }>;
14
- export type CheckoutStripeRequiredPaymentTerms<TInstalmentPlan, TFlexibleBalanceConfig extends BookingFlexibleBalanceConfig> = Readonly<{
15
- kind: 'standard';
16
- }> | Readonly<{
17
- kind: 'instalment_plan';
18
- planDefinition: TInstalmentPlan;
19
- }> | Readonly<{
20
- kind: 'flexible_balance';
21
- selection: Readonly<{
22
- config: TFlexibleBalanceConfig;
23
- bookingStartAt: string;
24
- dueAt: string;
25
- }>;
26
- }>;
27
- export declare function planStripeRequiredCheckoutPaymentObligation<TInstalmentPlan, TFlexibleBalanceConfig extends BookingFlexibleBalanceConfig>(input: Readonly<{
22
+ export declare function planCheckoutPaymentObligation(input: Readonly<{
28
23
  totalAfterDiscountCents: number;
29
- paymentTerms?: CheckoutStripeRequiredPaymentTerms<TInstalmentPlan, TFlexibleBalanceConfig>;
30
- }>): CheckoutStripeRequiredPaymentObligation<TInstalmentPlan, TFlexibleBalanceConfig>;
24
+ paymentSelection: BookingPaymentSelection;
25
+ }>): CheckoutPaymentObligation;
@@ -1,53 +1,36 @@
1
- import { type BookingFlexibleBalanceConfig } from '../../../core/src/index';
2
- import { type Result } from '../../../core/src/index';
3
- export type CheckoutPaymentTermCollectionOptionKind = 'upfront' | 'deferred_manual' | 'instalment_plan' | 'flexible_balance';
1
+ import { type BookingPaymentCollectionOptionKind, type Result } from '../../../core/src/index';
2
+ import { type BookingPaymentSelection } from './bookingPaymentSelection';
3
+ export type CheckoutPaymentTermCollectionOptionKind = BookingPaymentCollectionOptionKind;
4
4
  export type CheckoutPaymentTermsError = Readonly<{
5
5
  _tag: 'instalment_plan_not_supported';
6
6
  }> | Readonly<{
7
7
  _tag: 'flexible_balance_empty_cart';
8
- }> | Readonly<{
9
- _tag: 'flexible_balance_requires_single_item';
10
8
  }> | Readonly<{
11
9
  _tag: 'flexible_balance_not_supported';
12
10
  }>;
13
- export type CheckoutAppointmentPaymentTermSelection<TInstalmentPlan, TFlexibleBalanceConfig extends BookingFlexibleBalanceConfig = BookingFlexibleBalanceConfig> = Readonly<{
14
- kind: 'upfront' | 'deferred_manual';
15
- }> | Readonly<{
16
- kind: 'instalment_plan';
17
- plan: TInstalmentPlan;
18
- }> | Readonly<{
19
- kind: 'flexible_balance';
20
- config: TFlexibleBalanceConfig;
21
- }> | null;
22
- export type CheckoutAttendeeBookingPaymentTermSelection<TFlexibleBalanceConfig extends BookingFlexibleBalanceConfig = BookingFlexibleBalanceConfig> = Readonly<{
23
- kind: 'upfront' | 'deferred_manual';
24
- }> | Readonly<{
25
- kind: 'flexible_balance';
26
- config: TFlexibleBalanceConfig;
27
- }> | null;
28
- export type CheckoutPaymentTermLine<TInstalmentPlan, TFlexibleBalanceConfig extends BookingFlexibleBalanceConfig = BookingFlexibleBalanceConfig> = Readonly<{
29
- kind: 'appointment';
30
- bookingStartAt: string;
31
- selectedCollectionOption: CheckoutAppointmentPaymentTermSelection<TInstalmentPlan, TFlexibleBalanceConfig>;
32
- }> | Readonly<{
33
- kind: 'attendee_booking';
34
- bookingStartAt?: string | null;
35
- selectedCollectionOption: CheckoutAttendeeBookingPaymentTermSelection<TFlexibleBalanceConfig>;
11
+ /**
12
+ * A checkout line as payment terms see it. Bookings carry the selection their
13
+ * own terms resolved to; products and passes carry none.
14
+ */
15
+ export type CheckoutPaymentTermLine = Readonly<{
16
+ kind: 'booking';
17
+ selection: BookingPaymentSelection;
36
18
  }> | Readonly<{
37
19
  kind: 'other';
38
20
  }>;
39
- export type CheckoutFlexibleBalanceSelection<TFlexibleBalanceConfig extends BookingFlexibleBalanceConfig = BookingFlexibleBalanceConfig> = Readonly<{
40
- config: TFlexibleBalanceConfig;
41
- bookingStartAt: string;
42
- dueAt: string;
43
- }>;
44
- export type CheckoutPaymentTerms<TInstalmentPlan, TFlexibleBalanceConfig extends BookingFlexibleBalanceConfig = BookingFlexibleBalanceConfig> = Readonly<{
45
- instalmentPlanDefinition: TInstalmentPlan | null;
46
- flexibleBalanceSelection: CheckoutFlexibleBalanceSelection<TFlexibleBalanceConfig> | null;
47
- }>;
48
- type CheckoutPaymentTermsInput<TInstalmentPlan, TFlexibleBalanceConfig extends BookingFlexibleBalanceConfig> = Readonly<{
21
+ type CheckoutPaymentTermsInput = Readonly<{
49
22
  requestedCollectionOptionKind?: CheckoutPaymentTermCollectionOptionKind;
50
- items: readonly CheckoutPaymentTermLine<TInstalmentPlan, TFlexibleBalanceConfig>[];
23
+ items: readonly CheckoutPaymentTermLine[];
51
24
  }>;
52
- export declare function resolveCheckoutPaymentTerms<TInstalmentPlan, TFlexibleBalanceConfig extends BookingFlexibleBalanceConfig = BookingFlexibleBalanceConfig>(input: CheckoutPaymentTermsInput<TInstalmentPlan, TFlexibleBalanceConfig>): Result<CheckoutPaymentTerms<TInstalmentPlan, TFlexibleBalanceConfig>, CheckoutPaymentTermsError>;
25
+ /**
26
+ * Resolves the one payment selection the whole checkout is paid with.
27
+ *
28
+ * A plan or contract only applies when the customer asked for it, and every
29
+ * line has to belong to the booking it collects for. Without a request the
30
+ * checkout pays whatever is due in full, even when a line's terms offered only
31
+ * a plan: that auto-selection stays on the line and isn't applied here.
32
+ */
33
+ export declare function resolveCheckoutPaymentTerms(input: CheckoutPaymentTermsInput): Result<BookingPaymentSelection, CheckoutPaymentTermsError>;
34
+ /** Checks an already resolved selection without choosing the payment option again. */
35
+ export declare function validateCheckoutPaymentSelection(selection: BookingPaymentSelection, items: readonly CheckoutPaymentTermLine[]): Result<BookingPaymentSelection, CheckoutPaymentTermsError>;
53
36
  export {};
@@ -17,7 +17,7 @@ export declare const OrderCheckoutSessionMetadataSchema: z.ZodUnion<readonly [z.
17
17
  type: z.ZodLiteral<"order">;
18
18
  site_id: z.ZodString;
19
19
  order_id: z.ZodOptional<z.ZodString>;
20
- customer_email: z.ZodString;
20
+ customer_email: z.ZodOptional<z.ZodString>;
21
21
  customer_name: z.ZodOptional<z.ZodString>;
22
22
  product_id: z.ZodOptional<z.ZodString>;
23
23
  attendee_id: z.ZodOptional<z.ZodString>;
@@ -48,7 +48,7 @@ export declare const OrderCheckoutSessionMetadataSchema: z.ZodUnion<readonly [z.
48
48
  type: z.ZodLiteral<"order">;
49
49
  site_id: z.ZodString;
50
50
  order_id: z.ZodOptional<z.ZodString>;
51
- customer_email: z.ZodString;
51
+ customer_email: z.ZodOptional<z.ZodString>;
52
52
  customer_name: z.ZodOptional<z.ZodString>;
53
53
  product_id: z.ZodOptional<z.ZodString>;
54
54
  attendee_id: z.ZodOptional<z.ZodString>;
@@ -1,11 +1,12 @@
1
1
  import { type Result } from '../../../core/src/index';
2
2
  import { type LineSettlementBreakdown } from './settlement';
3
3
  export type CheckoutStripeSessionPaymentPlan = Readonly<{
4
- kind: 'stripe' | 'instalment_plan';
4
+ kind: 'stripe';
5
5
  creditReservationId?: string | null;
6
6
  }> | Readonly<{
7
- kind: 'flexible_balance';
8
- initialPaymentCents: number;
7
+ kind: 'instalment_plan' | 'flexible_balance';
8
+ /** Only this first payment is charged now; the rest is collected later. */
9
+ chargeNowCents: number;
9
10
  creditReservationId?: string | null;
10
11
  }>;
11
12
  export type CheckoutStripeSessionPaymentIntentPaymentPlan = Readonly<{
@@ -78,7 +79,7 @@ export type CheckoutStripeSessionPlanningError = Readonly<{
78
79
  amountCents: number;
79
80
  message: string;
80
81
  }> | Readonly<{
81
- _tag: 'invalid_flexible_balance_initial_payment';
82
+ _tag: 'invalid_charge_now_amount';
82
83
  amountCents: number;
83
84
  message: string;
84
85
  }>;
@@ -48,6 +48,10 @@ export declare const eventRegistrationErrors: {
48
48
  readonly message: "The payment options for this event have changed. Please check the latest options before continuing.";
49
49
  readonly action: "payment-options";
50
50
  };
51
+ readonly verificationFailed: {
52
+ readonly message: "We couldn’t confirm this request came from a person. Please refresh the page and try again.";
53
+ readonly action: "none";
54
+ };
51
55
  readonly idempotencyConflict: {
52
56
  readonly message: "You’ve already started booking this event. Please finish in the other tab if it’s still open, or check your booking status before starting again.";
53
57
  readonly action: "portal";
@@ -3,6 +3,7 @@ export * from './allocation';
3
3
  export * from './orderTypes';
4
4
  export * from './orderPlanningTypes';
5
5
  export * from './bookingInstalmentSchedule';
6
+ export * from './bookingPaymentSelection';
6
7
  export * from './cancellationPolicy';
7
8
  export * from './checkoutCollectionPlan';
8
9
  export * from './checkoutCommitPlan';
@@ -11,14 +12,12 @@ export * from './checkoutErrorCodes';
11
12
  export * from './checkoutOrderItemProjection';
12
13
  export * from './checkoutPaymentFlow';
13
14
  export * from './checkoutPaymentPlanPlanning';
14
- export * from './checkoutPaymentTermPlanning';
15
15
  export * from './checkoutPaymentTerms';
16
16
  export * from './checkoutQuantity';
17
17
  export * from './checkoutSettlement';
18
18
  export * from './checkoutStripeFinalizationPlanning';
19
19
  export * from './checkoutStripeSessionPlanning';
20
20
  export * from './checkoutSessionMetadata';
21
- export * from './checkoutValidatedItemPlanning';
22
21
  export * from './canonicalRefundPlanner';
23
22
  export * from './confirmationEmailPayment';
24
23
  export * from './discountApplication';
@@ -34,7 +33,6 @@ export * from './orderHistorySource';
34
33
  export * from './orderInstalmentAdminSettlement';
35
34
  export * from './orderInstalmentClosure';
36
35
  export * from './orderInstalmentLifecycle';
37
- export * from './orderInstalmentPayoff';
38
36
  export * from './orderInstalmentPlan';
39
37
  export * from './orderItemMetadata';
40
38
  export * from './orderItemSupport';
@@ -0,0 +1,4 @@
1
+ import { type Result } from '../../../core/src/index';
2
+ import type { StripeBookingCommissionOrderItemMetadata } from './stripeCommissionMetadata';
3
+ import type { CheckoutLineMetadata, MembershipOrderItemMetadata } from './orderItemMetadata';
4
+ export declare function parseMembershipOrderItemMetadata(raw: Record<string, unknown>, checkoutLine: CheckoutLineMetadata, commission: StripeBookingCommissionOrderItemMetadata): Result<MembershipOrderItemMetadata, string>;
@@ -1,10 +1,10 @@
1
- import { type NonEmptyArray, type Result } from '../../../core/src/index';
1
+ import { type BookingInstalmentPlanConfig, type NonEmptyArray, type Result } from '../../../core/src/index';
2
2
  import { type CurrencyCode, type Money } from './settlement';
3
3
  import type { CartCheckout } from './types';
4
4
  import type { OrderPaymentMethod, OrderStatus } from './orderTypes';
5
5
  export type CheckoutPlanningError = {
6
6
  _tag: 'CheckoutPlanningError';
7
- code: 'empty_cart';
7
+ code: 'empty_cart' | 'instalment_charge_mismatch';
8
8
  message: string;
9
9
  };
10
10
  type CheckoutPlanningSettledCart = Readonly<{
@@ -33,10 +33,13 @@ export type DeferredManualCheckoutPaymentPlan = CheckoutPaymentPlanBase & Readon
33
33
  }>;
34
34
  export type InstalmentCheckoutPaymentPlan = CheckoutPaymentPlanBase & Readonly<{
35
35
  kind: 'instalment_plan';
36
+ planDefinition: BookingInstalmentPlanConfig;
37
+ /** Charged now; has to be the plan's first instalment of the settled total. */
38
+ chargeNowCents: number;
36
39
  }>;
37
40
  export type FlexibleBalanceCheckoutPaymentPlan = CheckoutPaymentPlanBase & Readonly<{
38
41
  kind: 'flexible_balance';
39
- initialPaymentCents: number;
42
+ chargeNowCents: number;
40
43
  }>;
41
44
  export type OneTimeCheckoutPlanningPaymentPlan = StripeCheckoutPaymentPlan | BypassCheckoutPaymentPlan | DeferredManualCheckoutPaymentPlan | InstalmentCheckoutPaymentPlan | FlexibleBalanceCheckoutPaymentPlan;
42
45
  type CheckoutPlanningContext = Readonly<Record<string, unknown>>;
@@ -56,9 +59,11 @@ export type OrderSettlementPlan<TItem, TDiscount, TDiscountApplication> = Readon
56
59
  discount: TDiscount;
57
60
  discountApplication: TDiscountApplication;
58
61
  }>;
62
+ /** The ways a one-time checkout's order can be paid; passes, memberships and waivers never check out here. */
63
+ export type OneTimeCheckoutOrderPaymentMethod = Extract<OrderPaymentMethod, 'free' | 'store_credit' | 'manual' | 'stripe' | 'mixed'>;
59
64
  export type OrderDraftPlan = Readonly<{
60
65
  status: OrderStatus;
61
- paymentMethod: OrderPaymentMethod;
66
+ paymentMethod: OneTimeCheckoutOrderPaymentMethod;
62
67
  paidTotal: Money<CurrencyCode>;
63
68
  }>;
64
69
  export type OneTimeCheckoutPlan<TContext extends CheckoutPlanningContext, TSettledCart extends CheckoutPlanningSettledCart> = Readonly<{
@@ -1,6 +1,6 @@
1
1
  import { type NonNegativeCents } from '../../../core/src/index';
2
2
  import type { OrderInstalmentPlanStatus, OrderInstalmentStatus } from './orderInstalmentPlan';
3
- type InstalmentClosureReason = 'cancelled' | 'refunded';
3
+ export type InstalmentClosureReason = 'cancelled' | 'refunded';
4
4
  type InstalmentClosurePlanSnapshot = Readonly<{
5
5
  status: OrderInstalmentPlanStatus;
6
6
  remainingBalanceCents: NonNegativeCents;
@@ -15,12 +15,24 @@ type InstalmentStatusUpdate = Readonly<{
15
15
  }>;
16
16
  export type OrderInstalmentClosurePlan = Readonly<{
17
17
  kind: 'already_applied';
18
+ }> | Readonly<{
19
+ kind: 'conflict';
18
20
  }> | Readonly<{
19
21
  kind: 'apply';
20
22
  nextPlanStatus: Extract<OrderInstalmentPlanStatus, 'cancelled' | 'refunded'>;
21
23
  nextRemainingBalanceCents: NonNegativeCents;
22
24
  instalmentUpdates: readonly InstalmentStatusUpdate[];
23
25
  }>;
26
+ /**
27
+ * Whether closing the plan for this reason has nothing to do: it already has
28
+ * that status, or (for a cancel) it isn't live or has nothing left to
29
+ * collect. This only describes local accounting; it never proves that provider
30
+ * collection has stopped.
31
+ */
32
+ export declare function isOrderInstalmentClosureAlreadyApplied(input: Readonly<{
33
+ paymentPlan: InstalmentClosurePlanSnapshot;
34
+ reason: InstalmentClosureReason;
35
+ }>): boolean;
24
36
  export declare function planOrderInstalmentClosure(input: Readonly<{
25
37
  paymentPlan: InstalmentClosurePlanSnapshot;
26
38
  instalments: readonly InstalmentClosureRowSnapshot[];
@@ -25,6 +25,10 @@ export type ApplyRecurringInstalmentPaymentPlan = Readonly<{
25
25
  export type ApplyRecurringInstalmentFailurePlan = Readonly<{
26
26
  kind: 'already_applied';
27
27
  instalmentId: string;
28
+ }>
29
+ /** The plan is finished or closed: a late failed invoice changes nothing. */
30
+ | Readonly<{
31
+ kind: 'plan_closed';
28
32
  }> | Readonly<{
29
33
  kind: 'apply_failure';
30
34
  instalmentId: string;
@@ -38,6 +42,7 @@ export declare function planRecurringInstalmentInvoicePaid(input: Readonly<{
38
42
  amountPaidCents: NonNegativeCents;
39
43
  }>): ApplyRecurringInstalmentPaymentPlan;
40
44
  export declare function planRecurringInstalmentInvoiceFailed(input: Readonly<{
45
+ planStatus: OrderInstalmentPlanStatus;
41
46
  instalments: readonly InstalmentLifecycleRowSnapshot[];
42
47
  stripeInvoiceId: string;
43
48
  }>): ApplyRecurringInstalmentFailurePlan;
@@ -1,6 +1,6 @@
1
1
  import { type StripeBookingCommissionOrderItemMetadata } from './stripeCommissionMetadata';
2
2
  export { parseStripeBookingCommissionMetadata, type StripeBookingCommissionOrderItemMetadata } from './stripeCommissionMetadata';
3
- import { type BrandedIdParseError, type CheckoutLineId, type RetiredCourseId, type CustomerId, type DatedOfferingCapacityHoldAuditRef, type DatedOfferingCapacityHoldId, type EventSeriesId, type EventInstanceId, type OccurrenceId, type PassId, type PricingOptionId, type Result } from '../../../core/src/index';
3
+ import { type BrandedIdParseError, type CheckoutLineId, type RetiredCourseId, type CustomerId, type DatedOfferingCapacityHoldAuditRef, type DatedOfferingCapacityHoldId, type EventSeriesId, type MembershipId, type EventInstanceId, type OccurrenceId, type PassId, type PricingOptionId, type Result } from '../../../core/src/index';
4
4
  import type { OrderItemKind } from './orderTypes';
5
5
  export type CheckoutLineMetadata = Readonly<{
6
6
  checkoutLineId?: CheckoutLineId;
@@ -150,6 +150,8 @@ export type MembershipBundleFulfillmentMetadata = Readonly<{
150
150
  membershipName: string;
151
151
  }>;
152
152
  export type MembershipOrderItemMetadata = CheckoutLineMetadata & StripeBookingCommissionOrderItemMetadata & Readonly<{
153
+ membershipId?: MembershipId;
154
+ billingInterval?: 'month' | 'year';
153
155
  bundleFulfillment?: MembershipBundleFulfillmentMetadata;
154
156
  }>;
155
157
  export type OrderItemMetadataByKind = {
@@ -1,6 +1,12 @@
1
1
  export declare const ORDER_STATUSES: readonly ["pending", "paid", "partially_refunded", "refunded", "failed", "cancelled"];
2
2
  export type OrderStatus = (typeof ORDER_STATUSES)[number];
3
3
  export declare function isOrderStatus(value: string): value is OrderStatus;
4
+ /**
5
+ * Orders that ended without being paid: a failed checkout or a cancellation.
6
+ * Nothing is collected or chased against them.
7
+ */
8
+ export declare const CLOSED_ORDER_STATUSES: readonly ["failed", "cancelled"];
9
+ export declare function isClosedOrderStatus(status: string): status is (typeof CLOSED_ORDER_STATUSES)[number];
4
10
  export declare const ORDER_PAYMENT_METHODS: readonly ["stripe", "store_credit", "mixed", "pass_redemption", "membership_access", "free", "manual", "waived"];
5
11
  export type OrderPaymentMethod = (typeof ORDER_PAYMENT_METHODS)[number];
6
12
  export declare function isOrderPaymentMethod(value: string): value is OrderPaymentMethod;
@@ -20,7 +26,7 @@ export declare const RESERVATION_FINALIZATION_STATES: readonly ["not_applicable"
20
26
  export type ReservationFinalizationState = (typeof RESERVATION_FINALIZATION_STATES)[number];
21
27
  export declare function isReservationFinalizationState(value: string): value is ReservationFinalizationState;
22
28
  export type CheckoutPaymentRail = 'bypass' | 'stripe';
23
- export type CheckoutCommitFailureStep = 'credit_consumption' | 'membership_provision' | 'fulfillment' | 'discount_redemption' | 'payment_record';
29
+ export type CheckoutCommitFailureStep = 'credit_consumption' | 'membership_provision' | 'fulfillment' | 'discount_redemption';
24
30
  export type CheckoutCompensationDecision = Readonly<{
25
31
  kind: 'release_reservations';
26
32
  reason: string;
@@ -34,7 +34,7 @@ export declare function computeRailAwareRefundSplit(originalCashCents: NonNegati
34
34
  *
35
35
  * Pure function — just array reduction.
36
36
  */
37
- export declare function summarizePriorRefundsByRail(refunds: ReadonlyArray<RefundWithAllocations>, orderItemId: string): Result<RefundRailSplit, Readonly<{
37
+ export declare function summarizePriorRefundsByRail(refunds: ReadonlyArray<RefundWithAllocations>, orderItemIds: readonly string[]): Result<RefundRailSplit, Readonly<{
38
38
  kind: 'mixed_rail_attribution_missing';
39
39
  }>>;
40
40
  export {};
@@ -1,13 +1,13 @@
1
1
  import { type Result } from '../../../core/src/index';
2
2
  import type { CheckoutCommitFailureStep, CheckoutCompensationDecision, CheckoutPaymentRail, DiscountRedemptionStatus, OrderStatus } from './orderTypes';
3
+ import type { CheckoutCommitProgress } from './checkoutCommitPlan';
3
4
  export type OrderStatusEvent = 'checkout_failed' | 'stripe_payment_completed' | 'cancel' | 'partial_refund' | 'full_refund';
4
5
  export declare function advanceOrderStatus(from: OrderStatus, event: OrderStatusEvent): Result<OrderStatus, string>;
5
6
  export declare function transitionOrderStatusTo(from: OrderStatus, to: OrderStatus): Result<OrderStatus, string>;
6
7
  export declare function classifyCheckoutCompensationDecision(input: {
7
8
  paymentRail: CheckoutPaymentRail;
8
9
  failedStep: CheckoutCommitFailureStep;
9
- reservationsConsumed: boolean;
10
- fulfillmentCommitted: boolean;
10
+ progress: CheckoutCommitProgress;
11
11
  }): CheckoutCompensationDecision;
12
12
  export type DiscountRedemptionEvent = 'redeem' | 'release' | 'expire';
13
13
  export declare function advanceDiscountRedemptionStatus(from: DiscountRedemptionStatus, event: DiscountRedemptionEvent): Result<DiscountRedemptionStatus, string>;
@@ -8,3 +8,9 @@ export declare function isStripeChargeBelowMinimum(options: Readonly<{
8
8
  amountCents: number;
9
9
  currency: string;
10
10
  }>): boolean;
11
+ /**
12
+ * The smallest deposit a plan that starts with one may ask for: the card
13
+ * minimum for the currency, or any positive amount for a currency Stripe has
14
+ * no minimum on record for.
15
+ */
16
+ export declare function getInstalmentDepositMinimumCents(currency: string): number;
@@ -5,6 +5,7 @@
5
5
  * course, membership), it's a Purchase. Payment method is an attribute
6
6
  * of the purchase, not a separate concept (Model B: unified).
7
7
  */
8
+ import type { BookingPaymentCollectionOptionKind } from '../../../core/src/index';
8
9
  import type { OccurrenceId, PricingOptionId, ProductId, ProductVariantId, PassId, MembershipId, CustomerId, OrderId, AttendeeId, CustomerPassId, CustomerMembershipId, EventSeriesRegistrationId, AppointmentId, NonEmptyArray, SiteId, EventSeriesId } from '../../../core/src/index';
9
10
  import type { PositiveCheckoutQuantity } from './checkoutQuantity';
10
11
  export type CheckoutItem = EventTicketItem | ProductItem | PassItem | EventSeriesRegistrationItem | AppointmentItem;
@@ -67,7 +68,7 @@ export type CartCheckout = {
67
68
  items: NonEmptyArray<CheckoutItem>;
68
69
  customer: CustomerInfo;
69
70
  discountCode?: string;
70
- collectionOptionKind?: 'upfront' | 'deferred_manual' | 'instalment_plan' | 'flexible_balance';
71
+ collectionOptionKind?: BookingPaymentCollectionOptionKind;
71
72
  successUrl: string;
72
73
  cancelUrl: string;
73
74
  };
@@ -2,9 +2,8 @@ import { type ReactNode } from 'react';
2
2
  import type { BlockManifest } from '../../../blocks/src/index';
3
3
  import { type FieldWidgetComponent } from '../../../block-form/src/index';
4
4
  import type { ManifestFormSource } from '../../../block-form/src/index';
5
- export type { AutosaveHandle } from '../hooks/useSimpleAutosave';
5
+ export type { AutosaveHandle } from '../ui/stores/types';
6
6
  export type ContentFieldsFormProps<TValues extends Record<string, unknown>> = {
7
- siteId: string;
8
7
  manifest?: BlockManifest;
9
8
  form?: ManifestFormSource;
10
9
  /**
@@ -14,12 +13,8 @@ export type ContentFieldsFormProps<TValues extends Record<string, unknown>> = {
14
13
  initialValues?: TValues;
15
14
  paletteTokens?: Record<string, string>;
16
15
  widgets?: Partial<Record<string, FieldWidgetComponent>>;
17
- mediaProvider?: (props: {
18
- siteId: string;
19
- children: ReactNode;
20
- }) => ReactNode;
21
16
  errorComponent?: (props: {
22
17
  error: string;
23
18
  }) => ReactNode;
24
19
  };
25
- export declare function ContentFieldsForm<TValues extends Record<string, unknown>>({ siteId, manifest, form: formSpec, initialValues: _initialValues, paletteTokens, widgets, mediaProvider: MediaProvider, errorComponent: ErrorComponent, }: ContentFieldsFormProps<TValues>): import("react").JSX.Element;
20
+ export declare function ContentFieldsForm<TValues extends Record<string, unknown>>({ manifest, form: formSpec, initialValues: _initialValues, paletteTokens, widgets, errorComponent: ErrorComponent, }: ContentFieldsFormProps<TValues>): import("react").JSX.Element;
@@ -0,0 +1,39 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { ApiClient } from '../../../api/src/request';
3
+ import type { DocumentLeaseReadInput } from './readDocumentLeaseBaselines';
4
+ import type { EditLeaseScope } from '../../../core/src/index';
5
+ import type { EditorUiStoreInstance } from '../ui/editorUiStore';
6
+ import type { EditLeaseLossSignal } from './editLeaseLossSignal';
7
+ import { useEditLease, type EditLeaseChangeSubscription } from '../hooks/useEditLease';
8
+ export type EditorLeaseConfig = Readonly<{
9
+ siteId: string;
10
+ scope: EditLeaseScope;
11
+ subscribeToLeaseChanges?: EditLeaseChangeSubscription;
12
+ /** Refresh display props after the authoritative baseline has been applied. */
13
+ onGranted?: () => void;
14
+ onAccessChanged?: () => void;
15
+ }>;
16
+ export type EditLeaseActions = ReturnType<typeof useEditLease>;
17
+ /**
18
+ * Discarding is local and synchronous: it can't fail, and it happens before the tab leaves
19
+ * edit mode. Newer server values arrive by the take-back refresh on the next grant, or, in
20
+ * view mode, by live drafts and reload broadcasts.
21
+ */
22
+ export type EditLeaseControllerActions = EditLeaseActions & Readonly<{
23
+ discardLocal: () => void;
24
+ }>;
25
+ /**
26
+ * Mounts the lease session only while `lease` is set. Children keep their position in the
27
+ * tree either way, so joining or leaving the lease never remounts the editor.
28
+ */
29
+ export declare function EditLeaseController({ children, lease, ...session }: Readonly<{
30
+ children: ReactNode;
31
+ document: Pick<DocumentLeaseReadInput, 'type' | 'schema' | 'blockFieldExtensions'>;
32
+ lease: EditorLeaseConfig | null;
33
+ apiClient: ApiClient;
34
+ uiStore: EditorUiStoreInstance;
35
+ leaseLossSignal: EditLeaseLossSignal;
36
+ /** Rendered beside children, only while the lease session is mounted. */
37
+ sessionChildren?: ReactNode;
38
+ }>): import("react").JSX.Element;
39
+ export declare function useEditLeaseActions(): EditLeaseControllerActions | null;
@@ -0,0 +1,38 @@
1
+ import type { ReactNode } from 'react';
2
+ import { type LeaseNotice, type LeaseNoticeAction } from './editLeaseNotice';
3
+ export type LeaseNoticeHandlers = Readonly<Record<LeaseNoticeAction, () => void>>;
4
+ /** Makes a mount's editing surface inert while the tab is waiting for, or denied, the lease. */
5
+ export declare function EditorWriteSurface({ children }: Readonly<{
6
+ children: ReactNode;
7
+ }>): import("react").JSX.Element;
8
+ export declare function LeaseNoticeButtons({ notice, handlers, size }: Readonly<{
9
+ notice: LeaseNotice;
10
+ handlers: LeaseNoticeHandlers;
11
+ size?: 'sm';
12
+ }>): import("react").JSX.Element[];
13
+ /** A blocking modal; it can't be dismissed, because the modal is the only way forward. */
14
+ export declare function EditLeaseModalView({ notice, handlers }: Readonly<{
15
+ notice: LeaseNotice | null;
16
+ handlers: LeaseNoticeHandlers;
17
+ }>): import("react").JSX.Element;
18
+ /** The document's lease modal. Pass `onKeepViewing` where the tab can return to view mode. */
19
+ export declare function EditLeaseModal({ thing, onKeepViewing }: Readonly<{
20
+ thing: string;
21
+ onKeepViewing?: () => void;
22
+ }>): import("react").JSX.Element | null;
23
+ export declare function LeaseDiscardedNoticeView({ thing, onDismiss }: Readonly<{
24
+ thing: string;
25
+ onDismiss: () => void;
26
+ }>): import("react").JSX.Element;
27
+ /** Shown after taking the lease back replaced edits another tab had changed. */
28
+ export declare function EditLeaseDiscardedNotice({ thing }: Readonly<{
29
+ thing: string;
30
+ }>): import("react").JSX.Element | null;
31
+ /**
32
+ * One write gate per editor mount: the whole editing surface is inert while the tab can't
33
+ * write, and the lease modal explains why. The modal portals outside the inert subtree.
34
+ */
35
+ export declare function EditorWriteGate({ thing, children }: Readonly<{
36
+ thing: string;
37
+ children: ReactNode;
38
+ }>): import("react").JSX.Element;