@riverbankcms/sdk 0.148.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 (154) hide show
  1. package/README.md +1 -1
  2. package/dist/{PreviewEditorSidebar-DvEPG3Z2.mjs → PreviewEditorSidebar-DBKln68M.mjs} +103 -66
  3. package/dist/{PreviewEditorUI-D6eb6fkx.mjs → PreviewEditorUI-DpRX4Mum.mjs} +3 -6
  4. package/dist/{PreviewQueryProvider-5znTyJuz.mjs → PreviewQueryProvider-C0mndwHB.mjs} +3 -3
  5. package/dist/{SdkPreviewModeRuntime-DJ6utQ_R.mjs → SdkPreviewModeRuntime-DJPmPY-r.mjs} +95 -67
  6. package/dist/{SiteChromeCustomizeContext-CFJYh6vo.mjs → SiteChromeCustomizeContext-JYA0cJ_Z.mjs} +982 -734
  7. package/dist/_dts/api/src/bookingConfig.d.ts +33 -48
  8. package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +2 -6
  9. package/dist/_dts/api/src/bookingOperations.d.ts +5 -7
  10. package/dist/_dts/api/src/bookingRecords.d.ts +15 -11
  11. package/dist/_dts/api/src/bookingRefundOutcomes.d.ts +5 -5
  12. package/dist/_dts/api/src/clientErrorReporting.d.ts +11 -0
  13. package/dist/_dts/api/src/commercePortalEndpoints.d.ts +0 -2
  14. package/dist/_dts/api/src/common/cancellation.d.ts +23 -0
  15. package/dist/_dts/api/src/customerMembershipOutcomes.d.ts +1 -1
  16. package/dist/_dts/api/src/endpoints.d.ts +2 -10
  17. package/dist/_dts/api/src/eventManagementContracts.d.ts +4 -7
  18. package/dist/_dts/api/src/index.d.ts +3 -3
  19. package/dist/_dts/api/src/publicAppointmentBookingContracts.d.ts +2 -2
  20. package/dist/_dts/api/src/publicExperience/commerceEndpoints.d.ts +2 -29
  21. package/dist/_dts/api/src/request.d.ts +1 -1
  22. package/dist/_dts/api/src/sdk-event-upsert.d.ts +1 -1
  23. package/dist/_dts/api/src/sdkPullEventContracts.d.ts +1 -1
  24. package/dist/_dts/api/src/siteOperations.d.ts +6 -2
  25. package/dist/_dts/blocks/src/contracts/index.d.ts +1 -1
  26. package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +2 -2
  27. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +38 -10
  28. package/dist/_dts/blocks/src/portal/types.d.ts +9 -6
  29. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +24 -24
  30. package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +1 -1
  31. package/dist/_dts/blocks/src/system/blocks/shared/bookingPaymentTerms.d.ts +84 -160
  32. package/dist/_dts/blocks/src/system/blocks/shop.d.ts +2 -2
  33. package/dist/_dts/blocks/src/system/blocks/shop.shared.d.ts +31 -4
  34. package/dist/_dts/blocks/src/system/runtime/api/types/appointments.d.ts +2 -2
  35. package/dist/_dts/blocks/src/system/runtime/api/types/core.d.ts +3 -1
  36. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +48 -6
  37. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +24 -3
  38. package/dist/_dts/blocks/src/system/runtime/hooks/useBookingNowIso.d.ts +8 -0
  39. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +2 -1
  40. package/dist/_dts/blocks/src/system/runtime/nodes/commerce/shared/display.d.ts +9 -2
  41. package/dist/_dts/blocks/src/system/runtime/nodes/event-details/presentation.d.ts +14 -2
  42. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/PaymentSelectionStep.d.ts +2 -0
  43. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +3 -3
  44. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +4 -0
  45. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +24 -24
  46. package/dist/_dts/blocks/src/system/runtime/nodes/shop.interactive.d.ts +41 -6
  47. package/dist/_dts/blocks/src/system/runtime/shared/bookingPaymentOptions.d.ts +7 -2
  48. package/dist/_dts/commerce/src/purchase/bookingPaymentSelection.d.ts +54 -0
  49. package/dist/_dts/commerce/src/purchase/checkoutCommitPlan.d.ts +58 -13
  50. package/dist/_dts/commerce/src/purchase/checkoutErrorCodes.d.ts +1 -1
  51. package/dist/_dts/commerce/src/purchase/checkoutPaymentPlanPlanning.d.ts +16 -21
  52. package/dist/_dts/commerce/src/purchase/checkoutPaymentTerms.d.ts +23 -40
  53. package/dist/_dts/commerce/src/purchase/checkoutSessionMetadata.d.ts +2 -2
  54. package/dist/_dts/commerce/src/purchase/checkoutStripeSessionPlanning.d.ts +5 -4
  55. package/dist/_dts/commerce/src/purchase/index.d.ts +1 -3
  56. package/dist/_dts/commerce/src/purchase/membershipOrderItemMetadata.d.ts +4 -0
  57. package/dist/_dts/commerce/src/purchase/oneTimeCheckoutPlanning.d.ts +9 -4
  58. package/dist/_dts/commerce/src/purchase/orderInstalmentClosure.d.ts +13 -1
  59. package/dist/_dts/commerce/src/purchase/orderInstalmentLifecycle.d.ts +5 -0
  60. package/dist/_dts/commerce/src/purchase/orderItemMetadata.d.ts +3 -1
  61. package/dist/_dts/commerce/src/purchase/orderTypes.d.ts +7 -1
  62. package/dist/_dts/commerce/src/purchase/refundRailSplit.d.ts +1 -1
  63. package/dist/_dts/commerce/src/purchase/stateTransitions.d.ts +2 -2
  64. package/dist/_dts/commerce/src/purchase/stripeMinimumCharge.d.ts +6 -0
  65. package/dist/_dts/commerce/src/purchase/types.d.ts +2 -1
  66. package/dist/_dts/content-editor/src/controller/editLeaseHandover.d.ts +30 -0
  67. package/dist/_dts/content-editor/src/lib/browserStorage.d.ts +5 -0
  68. package/dist/_dts/core/src/booking-flexible-balance.d.ts +2 -2
  69. package/dist/_dts/core/src/booking-instalment-deposit.d.ts +20 -0
  70. package/dist/_dts/core/src/booking-live-payment-terms.d.ts +72 -0
  71. package/dist/_dts/core/src/booking-payment-options.d.ts +24 -0
  72. package/dist/_dts/core/src/booking-payment-schemas.d.ts +522 -0
  73. package/dist/_dts/core/src/branded.d.ts +3 -0
  74. package/dist/_dts/core/src/edit-lease.d.ts +5 -0
  75. package/dist/_dts/core/src/index.d.ts +3 -0
  76. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +297 -36
  77. package/dist/_dts/media-editor/src/MediaPickerDialog.d.ts +3 -1
  78. package/dist/_dts/media-editor/src/MediaPickerMiniDialog.d.ts +10 -0
  79. package/dist/_dts/media-editor/src/index.d.ts +2 -0
  80. package/dist/_dts/preview-next/src/client/preview/PreviewEntryControllerProvider.d.ts +0 -1
  81. package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +1 -1
  82. package/dist/_dts/preview-next/src/client/previewAuthStore.d.ts +7 -0
  83. package/dist/_dts/preview-next/src/constants.d.ts +4 -0
  84. package/dist/_dts/preview-next/src/keepAlive.d.ts +1 -0
  85. package/dist/_dts/sdk/src/rendering/islands/types.d.ts +2 -12
  86. package/dist/_dts/sdk/src/version.d.ts +1 -1
  87. package/dist/_dts/theme-core/src/site-styles/pageDesignIntent.d.ts +0 -5
  88. package/dist/_dts/ui/src/color-picker.d.ts +1 -1
  89. package/dist/_dts/ui/src/palette/useHexDraft.d.ts +7 -0
  90. package/dist/client/{BookingMailingListNote-CzRt2dF_.mjs → BookingMailingListNote-Cr3EeTP5.mjs} +408 -69
  91. package/dist/client/{DemoBookingPortalAccess-mxqwap3f.mjs → DemoBookingPortalAccess-BFGB1Fay.mjs} +2 -2
  92. package/dist/client/{EventCombined.client-CDb11igO.mjs → EventCombined.client-DKYV0_ft.mjs} +6 -6
  93. package/dist/client/{EventListing.client-EgYhzKPa.mjs → EventListing.client-B9UIcEYc.mjs} +2 -2
  94. package/dist/client/{LeafletStaticMap-gtmtaA2b.mjs → LeafletStaticMap-CFLPkP0K.mjs} +1 -1
  95. package/dist/client/{TerminalPanel-DvNUP5ot.mjs → TerminalPanel-JjmgxEsR.mjs} +1 -1
  96. package/dist/client/{ThemedButton-C7CeUJjW.mjs → ThemedButton-CKV1Jh2m.mjs} +1 -1
  97. package/dist/client/{accordion-kjvt49rA.mjs → accordion-DXWIfT3T.mjs} +1 -1
  98. package/dist/client/{bookingForm-pbRZordh.mjs → bookingForm-CjZgHNvv.mjs} +11 -8
  99. package/dist/client/bookings.mjs +424 -320
  100. package/dist/client/{carousel-f4Zbmicv.mjs → carousel-DSLikmvZ.mjs} +1 -1
  101. package/dist/client/{cart-DO20An50.mjs → cart-HDjWReFt.mjs} +3 -3
  102. package/dist/client/{checkout-Du5amDR_.mjs → checkout-CUvRZA3W.mjs} +3 -3
  103. package/dist/client/client.mjs +963 -866
  104. package/dist/client/{context-eW97E945.mjs → context-DFmaZa-Q.mjs} +1 -1
  105. package/dist/client/{dates-jPCirRea.mjs → dates-BBep1JnF.mjs} +2 -2
  106. package/dist/client/{eventCalendar-C2M-iE4j.mjs → eventCalendar-zEobhxo4.mjs} +9 -9
  107. package/dist/client/{eventCombined-W6ns3LHg.mjs → eventCombined-Dp7bz5k-.mjs} +4 -4
  108. package/dist/client/{eventDetails-CR-GT0f0.mjs → eventDetails-FE-zqTt7.mjs} +4 -4
  109. package/dist/client/{eventListing-BK8AfYZz.mjs → eventListing-BMt5snal.mjs} +4 -4
  110. package/dist/client/{eventRegistration-BJSd4KUu.mjs → eventRegistration-O6ZxHfOb.mjs} +67 -342
  111. package/dist/client/{form-BvpfbQaT.mjs → form-DFa1D8vt.mjs} +3 -3
  112. package/dist/client/{headerSection-I5sUQ8x-.mjs → headerSection-CmjHLR-N.mjs} +3 -3
  113. package/dist/client/hooks.mjs +160 -129
  114. package/dist/client/{locationMap-BLvwf9_f.mjs → locationMap-BXKP_lGh.mjs} +3 -3
  115. package/dist/client/{newsletterForm-DrQ2weE8.mjs → newsletterForm-CU-HmxGx.mjs} +3 -3
  116. package/dist/client/{pricing-BES87mrR.mjs → pricing-KEAEsibq.mjs} +1 -1
  117. package/dist/client/{productDetail-Url9jcc5.mjs → productDetail-Ckp7MGnt.mjs} +3 -3
  118. package/dist/client/{productList-DE7ngEZJ.mjs → productList-D91V0sYa.mjs} +3 -3
  119. package/dist/client/{propsDecoder-D1OtGXDV.mjs → propsDecoder-DZd6RJeA.mjs} +155 -77
  120. package/dist/client/rendering/client.mjs +3356 -3192
  121. package/dist/client/rendering/islands.mjs +17 -17
  122. package/dist/client/rendering.mjs +956 -841
  123. package/dist/client/{routeIslandApiConfig-BG9Y-SHg.mjs → routeIslandApiConfig-E1EkhhYY.mjs} +1 -1
  124. package/dist/client/{shop-CJkuySJ3.mjs → shop-4F2jLQPI.mjs} +12 -13
  125. package/dist/client/{shop-commerce-4rKj5n9h.mjs → shop-commerce-BbfCJjB3.mjs} +6 -6
  126. package/dist/client/{shop-commerce-store-Bxm75Pg6.mjs → shop-commerce-store-vicweP2K.mjs} +1 -1
  127. package/dist/client/{shopShared-DpoQDWfz.mjs → shopShared-DlONJt0T.mjs} +4 -4
  128. package/dist/client/{useEventFilters-D8HliSqR.mjs → useEventFilters-COYyL3m7.mjs} +6 -6
  129. package/dist/preview-next/before-render.mjs +15 -22
  130. package/dist/preview-next/client/runtime.mjs +4 -4
  131. package/dist/preview-next/constants.mjs +5 -1
  132. package/dist/preview-next/index.mjs +5 -1
  133. package/dist/preview-next/keepAlive.mjs +149 -82
  134. package/dist/preview-next/middleware.mjs +15 -22
  135. package/dist/{previewAuthStore-BXXF3hhW.mjs → previewAuthStore-BBmV7UsW.mjs} +49 -29
  136. package/dist/{sdk-runtime-C2a05WjL.mjs → sdk-runtime-CwvFFjB-.mjs} +2 -2
  137. package/dist/{separator-CuNhBAhS.mjs → separator-ByL72zUT.mjs} +1 -1
  138. package/dist/server/components.mjs +167 -131
  139. package/dist/server/config-validation.mjs +160 -129
  140. package/dist/server/config.mjs +160 -129
  141. package/dist/server/data.mjs +160 -129
  142. package/dist/server/index.mjs +20 -27
  143. package/dist/server/next.mjs +174 -156
  144. package/dist/server/page-converter.mjs +145 -65
  145. package/dist/server/prebuild.mjs +1 -1
  146. package/dist/server/rendering/server.mjs +169 -131
  147. package/dist/server/rendering.mjs +167 -131
  148. package/dist/server/routing.mjs +165 -118
  149. package/dist/server/server.mjs +167 -154
  150. package/package.json +1 -1
  151. package/dist/_dts/api/src/bookingPaymentTermSchemas.d.ts +0 -123
  152. package/dist/_dts/commerce/src/purchase/checkoutPaymentTermPlanning.d.ts +0 -10
  153. package/dist/_dts/commerce/src/purchase/checkoutValidatedItemPlanning.d.ts +0 -55
  154. package/dist/_dts/commerce/src/purchase/orderInstalmentPayoff.d.ts +0 -24
@@ -0,0 +1,522 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * The one declaration of a booking payment option's shape: the option kinds,
4
+ * instalment plans and flexible-balance configs. Stored terms, API bodies,
5
+ * site commands and block props all parse through it.
6
+ *
7
+ * This module is a subpath (`@riverbankcms/core/booking-payment-schemas`) so
8
+ * core's main entry stays free of zod.
9
+ *
10
+ * `strip` drops unknown keys (readers and API bodies); `strict` rejects them
11
+ * (site commands, which must not accept fields they'd silently ignore).
12
+ */
13
+ export type BookingPaymentSchemaObjectMode = 'strip' | 'strict';
14
+ type ObjectFactory<TConfig extends z.core.$ZodObjectConfig> = <TShape extends z.ZodRawShape>(shape: TShape) => z.ZodObject<TShape, TConfig>;
15
+ declare function buildBookingPaymentOptionSchemas<TConfig extends z.core.$ZodObjectConfig>(object: ObjectFactory<TConfig>): {
16
+ depositRefundPolicy: z.ZodEnum<{
17
+ refundable: "refundable";
18
+ non_refundable: "non_refundable";
19
+ }>;
20
+ instalmentPlan: z.ZodDiscriminatedUnion<[z.ZodObject<{
21
+ kind: z.ZodLiteral<"deposit_plus_one_remainder">;
22
+ depositAmountCents: z.ZodNumber;
23
+ depositRefundability: z.ZodEnum<{
24
+ refundable: "refundable";
25
+ non_refundable: "non_refundable";
26
+ }>;
27
+ remainderDueCount: z.ZodNumber;
28
+ intervalUnit: z.ZodEnum<{
29
+ day: "day";
30
+ week: "week";
31
+ month: "month";
32
+ }>;
33
+ }, TConfig>, z.ZodObject<{
34
+ kind: z.ZodLiteral<"deposit_plus_scheduled_instalments">;
35
+ depositAmountCents: z.ZodNumber;
36
+ depositRefundability: z.ZodEnum<{
37
+ refundable: "refundable";
38
+ non_refundable: "non_refundable";
39
+ }>;
40
+ instalmentCount: z.ZodNumber;
41
+ intervalCount: z.ZodNumber;
42
+ intervalUnit: z.ZodEnum<{
43
+ day: "day";
44
+ week: "week";
45
+ month: "month";
46
+ }>;
47
+ }, TConfig>, z.ZodObject<{
48
+ kind: z.ZodLiteral<"equal_scheduled_instalments">;
49
+ instalmentCount: z.ZodNumber;
50
+ intervalCount: z.ZodNumber;
51
+ intervalUnit: z.ZodEnum<{
52
+ day: "day";
53
+ week: "week";
54
+ month: "month";
55
+ }>;
56
+ }, TConfig>], "kind">;
57
+ flexibleBalanceDueDateRule: z.ZodDiscriminatedUnion<[z.ZodObject<{
58
+ kind: z.ZodLiteral<"relative_to_start_date">;
59
+ daysBeforeStart: z.ZodNumber;
60
+ }, TConfig>, z.ZodObject<{
61
+ kind: z.ZodLiteral<"fixed_calendar_date">;
62
+ dueAt: z.ZodString;
63
+ }, TConfig>], "kind">;
64
+ flexibleBalanceConfig: z.ZodObject<{
65
+ upfrontAmountCents: z.ZodNumber;
66
+ dueDateRule: z.ZodDiscriminatedUnion<[z.ZodObject<{
67
+ kind: z.ZodLiteral<"relative_to_start_date">;
68
+ daysBeforeStart: z.ZodNumber;
69
+ }, TConfig>, z.ZodObject<{
70
+ kind: z.ZodLiteral<"fixed_calendar_date">;
71
+ dueAt: z.ZodString;
72
+ }, TConfig>], "kind">;
73
+ depositRefundability: z.ZodEnum<{
74
+ refundable: "refundable";
75
+ non_refundable: "non_refundable";
76
+ }>;
77
+ }, TConfig>;
78
+ paymentCollectionOption: z.ZodDiscriminatedUnion<[z.ZodObject<{
79
+ kind: z.ZodLiteral<"upfront">;
80
+ }, TConfig>, z.ZodObject<{
81
+ kind: z.ZodLiteral<"deferred_manual">;
82
+ }, TConfig>, z.ZodObject<{
83
+ kind: z.ZodLiteral<"instalment_plan">;
84
+ plan: z.ZodDiscriminatedUnion<[z.ZodObject<{
85
+ kind: z.ZodLiteral<"deposit_plus_one_remainder">;
86
+ depositAmountCents: z.ZodNumber;
87
+ depositRefundability: z.ZodEnum<{
88
+ refundable: "refundable";
89
+ non_refundable: "non_refundable";
90
+ }>;
91
+ remainderDueCount: z.ZodNumber;
92
+ intervalUnit: z.ZodEnum<{
93
+ day: "day";
94
+ week: "week";
95
+ month: "month";
96
+ }>;
97
+ }, TConfig>, z.ZodObject<{
98
+ kind: z.ZodLiteral<"deposit_plus_scheduled_instalments">;
99
+ depositAmountCents: z.ZodNumber;
100
+ depositRefundability: z.ZodEnum<{
101
+ refundable: "refundable";
102
+ non_refundable: "non_refundable";
103
+ }>;
104
+ instalmentCount: z.ZodNumber;
105
+ intervalCount: z.ZodNumber;
106
+ intervalUnit: z.ZodEnum<{
107
+ day: "day";
108
+ week: "week";
109
+ month: "month";
110
+ }>;
111
+ }, TConfig>, z.ZodObject<{
112
+ kind: z.ZodLiteral<"equal_scheduled_instalments">;
113
+ instalmentCount: z.ZodNumber;
114
+ intervalCount: z.ZodNumber;
115
+ intervalUnit: z.ZodEnum<{
116
+ day: "day";
117
+ week: "week";
118
+ month: "month";
119
+ }>;
120
+ }, TConfig>], "kind">;
121
+ }, TConfig>, z.ZodObject<{
122
+ kind: z.ZodLiteral<"flexible_balance">;
123
+ config: z.ZodObject<{
124
+ upfrontAmountCents: z.ZodNumber;
125
+ dueDateRule: z.ZodDiscriminatedUnion<[z.ZodObject<{
126
+ kind: z.ZodLiteral<"relative_to_start_date">;
127
+ daysBeforeStart: z.ZodNumber;
128
+ }, TConfig>, z.ZodObject<{
129
+ kind: z.ZodLiteral<"fixed_calendar_date">;
130
+ dueAt: z.ZodString;
131
+ }, TConfig>], "kind">;
132
+ depositRefundability: z.ZodEnum<{
133
+ refundable: "refundable";
134
+ non_refundable: "non_refundable";
135
+ }>;
136
+ }, TConfig>;
137
+ }, TConfig>], "kind">;
138
+ paymentTerms: z.ZodObject<{
139
+ allowedOptions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
140
+ kind: z.ZodLiteral<"upfront">;
141
+ }, TConfig>, z.ZodObject<{
142
+ kind: z.ZodLiteral<"deferred_manual">;
143
+ }, TConfig>, z.ZodObject<{
144
+ kind: z.ZodLiteral<"instalment_plan">;
145
+ plan: z.ZodDiscriminatedUnion<[z.ZodObject<{
146
+ kind: z.ZodLiteral<"deposit_plus_one_remainder">;
147
+ depositAmountCents: z.ZodNumber;
148
+ depositRefundability: z.ZodEnum<{
149
+ refundable: "refundable";
150
+ non_refundable: "non_refundable";
151
+ }>;
152
+ remainderDueCount: z.ZodNumber;
153
+ intervalUnit: z.ZodEnum<{
154
+ day: "day";
155
+ week: "week";
156
+ month: "month";
157
+ }>;
158
+ }, TConfig>, z.ZodObject<{
159
+ kind: z.ZodLiteral<"deposit_plus_scheduled_instalments">;
160
+ depositAmountCents: z.ZodNumber;
161
+ depositRefundability: z.ZodEnum<{
162
+ refundable: "refundable";
163
+ non_refundable: "non_refundable";
164
+ }>;
165
+ instalmentCount: z.ZodNumber;
166
+ intervalCount: z.ZodNumber;
167
+ intervalUnit: z.ZodEnum<{
168
+ day: "day";
169
+ week: "week";
170
+ month: "month";
171
+ }>;
172
+ }, TConfig>, z.ZodObject<{
173
+ kind: z.ZodLiteral<"equal_scheduled_instalments">;
174
+ instalmentCount: z.ZodNumber;
175
+ intervalCount: z.ZodNumber;
176
+ intervalUnit: z.ZodEnum<{
177
+ day: "day";
178
+ week: "week";
179
+ month: "month";
180
+ }>;
181
+ }, TConfig>], "kind">;
182
+ }, TConfig>, z.ZodObject<{
183
+ kind: z.ZodLiteral<"flexible_balance">;
184
+ config: z.ZodObject<{
185
+ upfrontAmountCents: z.ZodNumber;
186
+ dueDateRule: z.ZodDiscriminatedUnion<[z.ZodObject<{
187
+ kind: z.ZodLiteral<"relative_to_start_date">;
188
+ daysBeforeStart: z.ZodNumber;
189
+ }, TConfig>, z.ZodObject<{
190
+ kind: z.ZodLiteral<"fixed_calendar_date">;
191
+ dueAt: z.ZodString;
192
+ }, TConfig>], "kind">;
193
+ depositRefundability: z.ZodEnum<{
194
+ refundable: "refundable";
195
+ non_refundable: "non_refundable";
196
+ }>;
197
+ }, TConfig>;
198
+ }, TConfig>], "kind">>;
199
+ }, TConfig>;
200
+ paymentOptionsChoice: z.ZodDiscriminatedUnion<[z.ZodObject<{
201
+ source: z.ZodLiteral<"default">;
202
+ }, z.core.$strict>, z.ZodObject<{
203
+ source: z.ZodLiteral<"custom">;
204
+ paymentTerms: z.ZodObject<{
205
+ allowedOptions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
206
+ kind: z.ZodLiteral<"upfront">;
207
+ }, TConfig>, z.ZodObject<{
208
+ kind: z.ZodLiteral<"deferred_manual">;
209
+ }, TConfig>, z.ZodObject<{
210
+ kind: z.ZodLiteral<"instalment_plan">;
211
+ plan: z.ZodDiscriminatedUnion<[z.ZodObject<{
212
+ kind: z.ZodLiteral<"deposit_plus_one_remainder">;
213
+ depositAmountCents: z.ZodNumber;
214
+ depositRefundability: z.ZodEnum<{
215
+ refundable: "refundable";
216
+ non_refundable: "non_refundable";
217
+ }>;
218
+ remainderDueCount: z.ZodNumber;
219
+ intervalUnit: z.ZodEnum<{
220
+ day: "day";
221
+ week: "week";
222
+ month: "month";
223
+ }>;
224
+ }, TConfig>, z.ZodObject<{
225
+ kind: z.ZodLiteral<"deposit_plus_scheduled_instalments">;
226
+ depositAmountCents: z.ZodNumber;
227
+ depositRefundability: z.ZodEnum<{
228
+ refundable: "refundable";
229
+ non_refundable: "non_refundable";
230
+ }>;
231
+ instalmentCount: z.ZodNumber;
232
+ intervalCount: z.ZodNumber;
233
+ intervalUnit: z.ZodEnum<{
234
+ day: "day";
235
+ week: "week";
236
+ month: "month";
237
+ }>;
238
+ }, TConfig>, z.ZodObject<{
239
+ kind: z.ZodLiteral<"equal_scheduled_instalments">;
240
+ instalmentCount: z.ZodNumber;
241
+ intervalCount: z.ZodNumber;
242
+ intervalUnit: z.ZodEnum<{
243
+ day: "day";
244
+ week: "week";
245
+ month: "month";
246
+ }>;
247
+ }, TConfig>], "kind">;
248
+ }, TConfig>, z.ZodObject<{
249
+ kind: z.ZodLiteral<"flexible_balance">;
250
+ config: z.ZodObject<{
251
+ upfrontAmountCents: z.ZodNumber;
252
+ dueDateRule: z.ZodDiscriminatedUnion<[z.ZodObject<{
253
+ kind: z.ZodLiteral<"relative_to_start_date">;
254
+ daysBeforeStart: z.ZodNumber;
255
+ }, TConfig>, z.ZodObject<{
256
+ kind: z.ZodLiteral<"fixed_calendar_date">;
257
+ dueAt: z.ZodString;
258
+ }, TConfig>], "kind">;
259
+ depositRefundability: z.ZodEnum<{
260
+ refundable: "refundable";
261
+ non_refundable: "non_refundable";
262
+ }>;
263
+ }, TConfig>;
264
+ }, TConfig>], "kind">>;
265
+ }, TConfig>;
266
+ }, z.core.$strict>], "source">;
267
+ };
268
+ export type BookingPaymentOptionSchemas<TConfig extends z.core.$ZodObjectConfig> = ReturnType<typeof buildBookingPaymentOptionSchemas<TConfig>>;
269
+ export declare function createBookingPaymentOptionSchemas(mode: 'strip'): BookingPaymentOptionSchemas<z.core.$strip>;
270
+ export declare function createBookingPaymentOptionSchemas(mode: 'strict'): BookingPaymentOptionSchemas<z.core.$strict>;
271
+ export declare const bookingDepositRefundPolicySchema: z.ZodEnum<{
272
+ refundable: "refundable";
273
+ non_refundable: "non_refundable";
274
+ }>;
275
+ export declare const bookingInstalmentPlanSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
276
+ kind: z.ZodLiteral<"deposit_plus_one_remainder">;
277
+ depositAmountCents: z.ZodNumber;
278
+ depositRefundability: z.ZodEnum<{
279
+ refundable: "refundable";
280
+ non_refundable: "non_refundable";
281
+ }>;
282
+ remainderDueCount: z.ZodNumber;
283
+ intervalUnit: z.ZodEnum<{
284
+ day: "day";
285
+ week: "week";
286
+ month: "month";
287
+ }>;
288
+ }, z.core.$strip>, z.ZodObject<{
289
+ kind: z.ZodLiteral<"deposit_plus_scheduled_instalments">;
290
+ depositAmountCents: z.ZodNumber;
291
+ depositRefundability: z.ZodEnum<{
292
+ refundable: "refundable";
293
+ non_refundable: "non_refundable";
294
+ }>;
295
+ instalmentCount: z.ZodNumber;
296
+ intervalCount: z.ZodNumber;
297
+ intervalUnit: z.ZodEnum<{
298
+ day: "day";
299
+ week: "week";
300
+ month: "month";
301
+ }>;
302
+ }, z.core.$strip>, z.ZodObject<{
303
+ kind: z.ZodLiteral<"equal_scheduled_instalments">;
304
+ instalmentCount: z.ZodNumber;
305
+ intervalCount: z.ZodNumber;
306
+ intervalUnit: z.ZodEnum<{
307
+ day: "day";
308
+ week: "week";
309
+ month: "month";
310
+ }>;
311
+ }, z.core.$strip>], "kind">;
312
+ export declare const bookingFlexibleBalanceDueDateRuleSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
313
+ kind: z.ZodLiteral<"relative_to_start_date">;
314
+ daysBeforeStart: z.ZodNumber;
315
+ }, z.core.$strip>, z.ZodObject<{
316
+ kind: z.ZodLiteral<"fixed_calendar_date">;
317
+ dueAt: z.ZodString;
318
+ }, z.core.$strip>], "kind">;
319
+ export declare const bookingFlexibleBalanceConfigSchema: z.ZodObject<{
320
+ upfrontAmountCents: z.ZodNumber;
321
+ dueDateRule: z.ZodDiscriminatedUnion<[z.ZodObject<{
322
+ kind: z.ZodLiteral<"relative_to_start_date">;
323
+ daysBeforeStart: z.ZodNumber;
324
+ }, z.core.$strip>, z.ZodObject<{
325
+ kind: z.ZodLiteral<"fixed_calendar_date">;
326
+ dueAt: z.ZodString;
327
+ }, z.core.$strip>], "kind">;
328
+ depositRefundability: z.ZodEnum<{
329
+ refundable: "refundable";
330
+ non_refundable: "non_refundable";
331
+ }>;
332
+ }, z.core.$strip>;
333
+ export declare const bookingPaymentCollectionOptionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
334
+ kind: z.ZodLiteral<"upfront">;
335
+ }, z.core.$strip>, z.ZodObject<{
336
+ kind: z.ZodLiteral<"deferred_manual">;
337
+ }, z.core.$strip>, z.ZodObject<{
338
+ kind: z.ZodLiteral<"instalment_plan">;
339
+ plan: z.ZodDiscriminatedUnion<[z.ZodObject<{
340
+ kind: z.ZodLiteral<"deposit_plus_one_remainder">;
341
+ depositAmountCents: z.ZodNumber;
342
+ depositRefundability: z.ZodEnum<{
343
+ refundable: "refundable";
344
+ non_refundable: "non_refundable";
345
+ }>;
346
+ remainderDueCount: z.ZodNumber;
347
+ intervalUnit: z.ZodEnum<{
348
+ day: "day";
349
+ week: "week";
350
+ month: "month";
351
+ }>;
352
+ }, z.core.$strip>, z.ZodObject<{
353
+ kind: z.ZodLiteral<"deposit_plus_scheduled_instalments">;
354
+ depositAmountCents: z.ZodNumber;
355
+ depositRefundability: z.ZodEnum<{
356
+ refundable: "refundable";
357
+ non_refundable: "non_refundable";
358
+ }>;
359
+ instalmentCount: z.ZodNumber;
360
+ intervalCount: z.ZodNumber;
361
+ intervalUnit: z.ZodEnum<{
362
+ day: "day";
363
+ week: "week";
364
+ month: "month";
365
+ }>;
366
+ }, z.core.$strip>, z.ZodObject<{
367
+ kind: z.ZodLiteral<"equal_scheduled_instalments">;
368
+ instalmentCount: z.ZodNumber;
369
+ intervalCount: z.ZodNumber;
370
+ intervalUnit: z.ZodEnum<{
371
+ day: "day";
372
+ week: "week";
373
+ month: "month";
374
+ }>;
375
+ }, z.core.$strip>], "kind">;
376
+ }, z.core.$strip>, z.ZodObject<{
377
+ kind: z.ZodLiteral<"flexible_balance">;
378
+ config: z.ZodObject<{
379
+ upfrontAmountCents: z.ZodNumber;
380
+ dueDateRule: z.ZodDiscriminatedUnion<[z.ZodObject<{
381
+ kind: z.ZodLiteral<"relative_to_start_date">;
382
+ daysBeforeStart: z.ZodNumber;
383
+ }, z.core.$strip>, z.ZodObject<{
384
+ kind: z.ZodLiteral<"fixed_calendar_date">;
385
+ dueAt: z.ZodString;
386
+ }, z.core.$strip>], "kind">;
387
+ depositRefundability: z.ZodEnum<{
388
+ refundable: "refundable";
389
+ non_refundable: "non_refundable";
390
+ }>;
391
+ }, z.core.$strip>;
392
+ }, z.core.$strip>], "kind">;
393
+ export declare const bookingPaymentTermsSchema: z.ZodObject<{
394
+ allowedOptions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
395
+ kind: z.ZodLiteral<"upfront">;
396
+ }, z.core.$strip>, z.ZodObject<{
397
+ kind: z.ZodLiteral<"deferred_manual">;
398
+ }, z.core.$strip>, z.ZodObject<{
399
+ kind: z.ZodLiteral<"instalment_plan">;
400
+ plan: z.ZodDiscriminatedUnion<[z.ZodObject<{
401
+ kind: z.ZodLiteral<"deposit_plus_one_remainder">;
402
+ depositAmountCents: z.ZodNumber;
403
+ depositRefundability: z.ZodEnum<{
404
+ refundable: "refundable";
405
+ non_refundable: "non_refundable";
406
+ }>;
407
+ remainderDueCount: z.ZodNumber;
408
+ intervalUnit: z.ZodEnum<{
409
+ day: "day";
410
+ week: "week";
411
+ month: "month";
412
+ }>;
413
+ }, z.core.$strip>, z.ZodObject<{
414
+ kind: z.ZodLiteral<"deposit_plus_scheduled_instalments">;
415
+ depositAmountCents: z.ZodNumber;
416
+ depositRefundability: z.ZodEnum<{
417
+ refundable: "refundable";
418
+ non_refundable: "non_refundable";
419
+ }>;
420
+ instalmentCount: z.ZodNumber;
421
+ intervalCount: z.ZodNumber;
422
+ intervalUnit: z.ZodEnum<{
423
+ day: "day";
424
+ week: "week";
425
+ month: "month";
426
+ }>;
427
+ }, z.core.$strip>, z.ZodObject<{
428
+ kind: z.ZodLiteral<"equal_scheduled_instalments">;
429
+ instalmentCount: z.ZodNumber;
430
+ intervalCount: z.ZodNumber;
431
+ intervalUnit: z.ZodEnum<{
432
+ day: "day";
433
+ week: "week";
434
+ month: "month";
435
+ }>;
436
+ }, z.core.$strip>], "kind">;
437
+ }, z.core.$strip>, z.ZodObject<{
438
+ kind: z.ZodLiteral<"flexible_balance">;
439
+ config: z.ZodObject<{
440
+ upfrontAmountCents: z.ZodNumber;
441
+ dueDateRule: z.ZodDiscriminatedUnion<[z.ZodObject<{
442
+ kind: z.ZodLiteral<"relative_to_start_date">;
443
+ daysBeforeStart: z.ZodNumber;
444
+ }, z.core.$strip>, z.ZodObject<{
445
+ kind: z.ZodLiteral<"fixed_calendar_date">;
446
+ dueAt: z.ZodString;
447
+ }, z.core.$strip>], "kind">;
448
+ depositRefundability: z.ZodEnum<{
449
+ refundable: "refundable";
450
+ non_refundable: "non_refundable";
451
+ }>;
452
+ }, z.core.$strip>;
453
+ }, z.core.$strip>], "kind">>;
454
+ }, z.core.$strip>;
455
+ export declare const bookingPaymentOptionsChoiceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
456
+ source: z.ZodLiteral<"default">;
457
+ }, z.core.$strict>, z.ZodObject<{
458
+ source: z.ZodLiteral<"custom">;
459
+ paymentTerms: z.ZodObject<{
460
+ allowedOptions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
461
+ kind: z.ZodLiteral<"upfront">;
462
+ }, z.core.$strip>, z.ZodObject<{
463
+ kind: z.ZodLiteral<"deferred_manual">;
464
+ }, z.core.$strip>, z.ZodObject<{
465
+ kind: z.ZodLiteral<"instalment_plan">;
466
+ plan: z.ZodDiscriminatedUnion<[z.ZodObject<{
467
+ kind: z.ZodLiteral<"deposit_plus_one_remainder">;
468
+ depositAmountCents: z.ZodNumber;
469
+ depositRefundability: z.ZodEnum<{
470
+ refundable: "refundable";
471
+ non_refundable: "non_refundable";
472
+ }>;
473
+ remainderDueCount: z.ZodNumber;
474
+ intervalUnit: z.ZodEnum<{
475
+ day: "day";
476
+ week: "week";
477
+ month: "month";
478
+ }>;
479
+ }, z.core.$strip>, z.ZodObject<{
480
+ kind: z.ZodLiteral<"deposit_plus_scheduled_instalments">;
481
+ depositAmountCents: z.ZodNumber;
482
+ depositRefundability: z.ZodEnum<{
483
+ refundable: "refundable";
484
+ non_refundable: "non_refundable";
485
+ }>;
486
+ instalmentCount: z.ZodNumber;
487
+ intervalCount: z.ZodNumber;
488
+ intervalUnit: z.ZodEnum<{
489
+ day: "day";
490
+ week: "week";
491
+ month: "month";
492
+ }>;
493
+ }, z.core.$strip>, z.ZodObject<{
494
+ kind: z.ZodLiteral<"equal_scheduled_instalments">;
495
+ instalmentCount: z.ZodNumber;
496
+ intervalCount: z.ZodNumber;
497
+ intervalUnit: z.ZodEnum<{
498
+ day: "day";
499
+ week: "week";
500
+ month: "month";
501
+ }>;
502
+ }, z.core.$strip>], "kind">;
503
+ }, z.core.$strip>, z.ZodObject<{
504
+ kind: z.ZodLiteral<"flexible_balance">;
505
+ config: z.ZodObject<{
506
+ upfrontAmountCents: z.ZodNumber;
507
+ dueDateRule: z.ZodDiscriminatedUnion<[z.ZodObject<{
508
+ kind: z.ZodLiteral<"relative_to_start_date">;
509
+ daysBeforeStart: z.ZodNumber;
510
+ }, z.core.$strip>, z.ZodObject<{
511
+ kind: z.ZodLiteral<"fixed_calendar_date">;
512
+ dueAt: z.ZodString;
513
+ }, z.core.$strip>], "kind">;
514
+ depositRefundability: z.ZodEnum<{
515
+ refundable: "refundable";
516
+ non_refundable: "non_refundable";
517
+ }>;
518
+ }, z.core.$strip>;
519
+ }, z.core.$strip>], "kind">>;
520
+ }, z.core.$strip>;
521
+ }, z.core.$strict>], "source">;
522
+ export {};
@@ -80,6 +80,7 @@ export type MembershipId = Brand<string, 'MembershipId'>;
80
80
  export type RetiredCourseId = Brand<string, 'RetiredCourseId'>;
81
81
  export type CustomerId = Brand<string, 'CustomerId'>;
82
82
  export type OrderId = Brand<string, 'OrderId'>;
83
+ export type OrderRetirementOperationId = Brand<string, 'OrderRetirementOperationId'>;
83
84
  export type OrderItemId = Brand<string, 'OrderItemId'>;
84
85
  export type OrderRefundId = Brand<string, 'OrderRefundId'>;
85
86
  export type OrderPaymentReceiptId = Brand<string, 'OrderPaymentReceiptId'>;
@@ -228,6 +229,7 @@ export declare const unsafeAsFormSubmissionId: (id: string) => FormSubmissionId;
228
229
  export declare const unsafeAsPassId: (id: string) => PassId;
229
230
  export declare const unsafeAsMembershipId: (id: string) => MembershipId;
230
231
  export declare const unsafeAsCustomerId: (id: string) => CustomerId;
232
+ export declare const unsafeAsOrderRetirementOperationId: (id: string) => OrderRetirementOperationId;
231
233
  export declare const unsafeAsOrderId: (id: string) => OrderId;
232
234
  export declare const unsafeAsOrderItemId: (id: string) => OrderItemId;
233
235
  export declare const unsafeAsOrderRefundId: (id: string) => OrderRefundId;
@@ -338,6 +340,7 @@ export declare const parseEventSeriesRegistrationId: (value: unknown) => Result<
338
340
  export declare const parseParticipantId: (value: unknown) => Result<ParticipantId, BrandedIdParseError>;
339
341
  export declare const parseParticipantParticipationId: (value: unknown) => Result<ParticipantParticipationId, BrandedIdParseError>;
340
342
  export declare const parseOrderItemId: (value: unknown) => Result<OrderItemId, BrandedIdParseError>;
343
+ export declare const parseOrderRetirementOperationId: (value: unknown) => Result<OrderRetirementOperationId, BrandedIdParseError>;
341
344
  export declare const parseOrderId: (value: unknown) => Result<OrderId, BrandedIdParseError>;
342
345
  export declare const parseOrderRefundId: (value: unknown) => Result<OrderRefundId, BrandedIdParseError>;
343
346
  export declare const parseOrderPaymentReceiptId: (value: unknown) => Result<OrderPaymentReceiptId, BrandedIdParseError>;
@@ -1,4 +1,9 @@
1
1
  import type { ContentEntryId, EditLeaseToken, EditorClientId, PageId, PageSurfaceId } from './branded';
2
+ /**
3
+ * How long a lease lasts without a heartbeat. The server grants for this long, and a
4
+ * reload handover is only worth presenting within it (issue 1570).
5
+ */
6
+ export declare const EDIT_LEASE_TTL_SECONDS = 60;
2
7
  export type EditLeaseScope = Readonly<{
3
8
  nodeType: 'page';
4
9
  nodeId: PageId;
@@ -18,6 +18,9 @@ export * from './money-input';
18
18
  export * from './booking-flexible-balance';
19
19
  export * from './booking-refunds';
20
20
  export * from './booking-instalments';
21
+ export * from './booking-instalment-deposit';
22
+ export * from './booking-live-payment-terms';
23
+ export * from './booking-payment-options';
21
24
  export * from './booking-date-time';
22
25
  export * from './booking-consent';
23
26
  export * from './appointment-service-categories';