@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.
- package/README.md +1 -1
- package/dist/{PreviewEditorSidebar-DvEPG3Z2.mjs → PreviewEditorSidebar-DBKln68M.mjs} +103 -66
- package/dist/{PreviewEditorUI-D6eb6fkx.mjs → PreviewEditorUI-DpRX4Mum.mjs} +3 -6
- package/dist/{PreviewQueryProvider-5znTyJuz.mjs → PreviewQueryProvider-C0mndwHB.mjs} +3 -3
- package/dist/{SdkPreviewModeRuntime-DJ6utQ_R.mjs → SdkPreviewModeRuntime-DJPmPY-r.mjs} +95 -67
- package/dist/{SiteChromeCustomizeContext-CFJYh6vo.mjs → SiteChromeCustomizeContext-JYA0cJ_Z.mjs} +982 -734
- package/dist/_dts/api/src/bookingConfig.d.ts +33 -48
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +2 -6
- package/dist/_dts/api/src/bookingOperations.d.ts +5 -7
- package/dist/_dts/api/src/bookingRecords.d.ts +15 -11
- package/dist/_dts/api/src/bookingRefundOutcomes.d.ts +5 -5
- package/dist/_dts/api/src/clientErrorReporting.d.ts +11 -0
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +0 -2
- package/dist/_dts/api/src/common/cancellation.d.ts +23 -0
- package/dist/_dts/api/src/customerMembershipOutcomes.d.ts +1 -1
- package/dist/_dts/api/src/endpoints.d.ts +2 -10
- package/dist/_dts/api/src/eventManagementContracts.d.ts +4 -7
- package/dist/_dts/api/src/index.d.ts +3 -3
- package/dist/_dts/api/src/publicAppointmentBookingContracts.d.ts +2 -2
- package/dist/_dts/api/src/publicExperience/commerceEndpoints.d.ts +2 -29
- package/dist/_dts/api/src/request.d.ts +1 -1
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +1 -1
- package/dist/_dts/api/src/sdkPullEventContracts.d.ts +1 -1
- package/dist/_dts/api/src/siteOperations.d.ts +6 -2
- package/dist/_dts/blocks/src/contracts/index.d.ts +1 -1
- package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +2 -2
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +38 -10
- package/dist/_dts/blocks/src/portal/types.d.ts +9 -6
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +24 -24
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/shared/bookingPaymentTerms.d.ts +84 -160
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/shop.shared.d.ts +31 -4
- package/dist/_dts/blocks/src/system/runtime/api/types/appointments.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/api/types/core.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +48 -6
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +24 -3
- package/dist/_dts/blocks/src/system/runtime/hooks/useBookingNowIso.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/commerce/shared/display.d.ts +9 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/presentation.d.ts +14 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/PaymentSelectionStep.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +24 -24
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.interactive.d.ts +41 -6
- package/dist/_dts/blocks/src/system/runtime/shared/bookingPaymentOptions.d.ts +7 -2
- package/dist/_dts/commerce/src/purchase/bookingPaymentSelection.d.ts +54 -0
- package/dist/_dts/commerce/src/purchase/checkoutCommitPlan.d.ts +58 -13
- package/dist/_dts/commerce/src/purchase/checkoutErrorCodes.d.ts +1 -1
- package/dist/_dts/commerce/src/purchase/checkoutPaymentPlanPlanning.d.ts +16 -21
- package/dist/_dts/commerce/src/purchase/checkoutPaymentTerms.d.ts +23 -40
- package/dist/_dts/commerce/src/purchase/checkoutSessionMetadata.d.ts +2 -2
- package/dist/_dts/commerce/src/purchase/checkoutStripeSessionPlanning.d.ts +5 -4
- package/dist/_dts/commerce/src/purchase/index.d.ts +1 -3
- package/dist/_dts/commerce/src/purchase/membershipOrderItemMetadata.d.ts +4 -0
- package/dist/_dts/commerce/src/purchase/oneTimeCheckoutPlanning.d.ts +9 -4
- package/dist/_dts/commerce/src/purchase/orderInstalmentClosure.d.ts +13 -1
- package/dist/_dts/commerce/src/purchase/orderInstalmentLifecycle.d.ts +5 -0
- package/dist/_dts/commerce/src/purchase/orderItemMetadata.d.ts +3 -1
- package/dist/_dts/commerce/src/purchase/orderTypes.d.ts +7 -1
- package/dist/_dts/commerce/src/purchase/refundRailSplit.d.ts +1 -1
- package/dist/_dts/commerce/src/purchase/stateTransitions.d.ts +2 -2
- package/dist/_dts/commerce/src/purchase/stripeMinimumCharge.d.ts +6 -0
- package/dist/_dts/commerce/src/purchase/types.d.ts +2 -1
- package/dist/_dts/content-editor/src/controller/editLeaseHandover.d.ts +30 -0
- package/dist/_dts/content-editor/src/lib/browserStorage.d.ts +5 -0
- package/dist/_dts/core/src/booking-flexible-balance.d.ts +2 -2
- package/dist/_dts/core/src/booking-instalment-deposit.d.ts +20 -0
- package/dist/_dts/core/src/booking-live-payment-terms.d.ts +72 -0
- package/dist/_dts/core/src/booking-payment-options.d.ts +24 -0
- package/dist/_dts/core/src/booking-payment-schemas.d.ts +522 -0
- package/dist/_dts/core/src/branded.d.ts +3 -0
- package/dist/_dts/core/src/edit-lease.d.ts +5 -0
- package/dist/_dts/core/src/index.d.ts +3 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +297 -36
- package/dist/_dts/media-editor/src/MediaPickerDialog.d.ts +3 -1
- package/dist/_dts/media-editor/src/MediaPickerMiniDialog.d.ts +10 -0
- package/dist/_dts/media-editor/src/index.d.ts +2 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewEntryControllerProvider.d.ts +0 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/previewAuthStore.d.ts +7 -0
- package/dist/_dts/preview-next/src/constants.d.ts +4 -0
- package/dist/_dts/preview-next/src/keepAlive.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +2 -12
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/pageDesignIntent.d.ts +0 -5
- package/dist/_dts/ui/src/color-picker.d.ts +1 -1
- package/dist/_dts/ui/src/palette/useHexDraft.d.ts +7 -0
- package/dist/client/{BookingMailingListNote-CzRt2dF_.mjs → BookingMailingListNote-Cr3EeTP5.mjs} +408 -69
- package/dist/client/{DemoBookingPortalAccess-mxqwap3f.mjs → DemoBookingPortalAccess-BFGB1Fay.mjs} +2 -2
- package/dist/client/{EventCombined.client-CDb11igO.mjs → EventCombined.client-DKYV0_ft.mjs} +6 -6
- package/dist/client/{EventListing.client-EgYhzKPa.mjs → EventListing.client-B9UIcEYc.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-gtmtaA2b.mjs → LeafletStaticMap-CFLPkP0K.mjs} +1 -1
- package/dist/client/{TerminalPanel-DvNUP5ot.mjs → TerminalPanel-JjmgxEsR.mjs} +1 -1
- package/dist/client/{ThemedButton-C7CeUJjW.mjs → ThemedButton-CKV1Jh2m.mjs} +1 -1
- package/dist/client/{accordion-kjvt49rA.mjs → accordion-DXWIfT3T.mjs} +1 -1
- package/dist/client/{bookingForm-pbRZordh.mjs → bookingForm-CjZgHNvv.mjs} +11 -8
- package/dist/client/bookings.mjs +424 -320
- package/dist/client/{carousel-f4Zbmicv.mjs → carousel-DSLikmvZ.mjs} +1 -1
- package/dist/client/{cart-DO20An50.mjs → cart-HDjWReFt.mjs} +3 -3
- package/dist/client/{checkout-Du5amDR_.mjs → checkout-CUvRZA3W.mjs} +3 -3
- package/dist/client/client.mjs +963 -866
- package/dist/client/{context-eW97E945.mjs → context-DFmaZa-Q.mjs} +1 -1
- package/dist/client/{dates-jPCirRea.mjs → dates-BBep1JnF.mjs} +2 -2
- package/dist/client/{eventCalendar-C2M-iE4j.mjs → eventCalendar-zEobhxo4.mjs} +9 -9
- package/dist/client/{eventCombined-W6ns3LHg.mjs → eventCombined-Dp7bz5k-.mjs} +4 -4
- package/dist/client/{eventDetails-CR-GT0f0.mjs → eventDetails-FE-zqTt7.mjs} +4 -4
- package/dist/client/{eventListing-BK8AfYZz.mjs → eventListing-BMt5snal.mjs} +4 -4
- package/dist/client/{eventRegistration-BJSd4KUu.mjs → eventRegistration-O6ZxHfOb.mjs} +67 -342
- package/dist/client/{form-BvpfbQaT.mjs → form-DFa1D8vt.mjs} +3 -3
- package/dist/client/{headerSection-I5sUQ8x-.mjs → headerSection-CmjHLR-N.mjs} +3 -3
- package/dist/client/hooks.mjs +160 -129
- package/dist/client/{locationMap-BLvwf9_f.mjs → locationMap-BXKP_lGh.mjs} +3 -3
- package/dist/client/{newsletterForm-DrQ2weE8.mjs → newsletterForm-CU-HmxGx.mjs} +3 -3
- package/dist/client/{pricing-BES87mrR.mjs → pricing-KEAEsibq.mjs} +1 -1
- package/dist/client/{productDetail-Url9jcc5.mjs → productDetail-Ckp7MGnt.mjs} +3 -3
- package/dist/client/{productList-DE7ngEZJ.mjs → productList-D91V0sYa.mjs} +3 -3
- package/dist/client/{propsDecoder-D1OtGXDV.mjs → propsDecoder-DZd6RJeA.mjs} +155 -77
- package/dist/client/rendering/client.mjs +3356 -3192
- package/dist/client/rendering/islands.mjs +17 -17
- package/dist/client/rendering.mjs +956 -841
- package/dist/client/{routeIslandApiConfig-BG9Y-SHg.mjs → routeIslandApiConfig-E1EkhhYY.mjs} +1 -1
- package/dist/client/{shop-CJkuySJ3.mjs → shop-4F2jLQPI.mjs} +12 -13
- package/dist/client/{shop-commerce-4rKj5n9h.mjs → shop-commerce-BbfCJjB3.mjs} +6 -6
- package/dist/client/{shop-commerce-store-Bxm75Pg6.mjs → shop-commerce-store-vicweP2K.mjs} +1 -1
- package/dist/client/{shopShared-DpoQDWfz.mjs → shopShared-DlONJt0T.mjs} +4 -4
- package/dist/client/{useEventFilters-D8HliSqR.mjs → useEventFilters-COYyL3m7.mjs} +6 -6
- package/dist/preview-next/before-render.mjs +15 -22
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/constants.mjs +5 -1
- package/dist/preview-next/index.mjs +5 -1
- package/dist/preview-next/keepAlive.mjs +149 -82
- package/dist/preview-next/middleware.mjs +15 -22
- package/dist/{previewAuthStore-BXXF3hhW.mjs → previewAuthStore-BBmV7UsW.mjs} +49 -29
- package/dist/{sdk-runtime-C2a05WjL.mjs → sdk-runtime-CwvFFjB-.mjs} +2 -2
- package/dist/{separator-CuNhBAhS.mjs → separator-ByL72zUT.mjs} +1 -1
- package/dist/server/components.mjs +167 -131
- package/dist/server/config-validation.mjs +160 -129
- package/dist/server/config.mjs +160 -129
- package/dist/server/data.mjs +160 -129
- package/dist/server/index.mjs +20 -27
- package/dist/server/next.mjs +174 -156
- package/dist/server/page-converter.mjs +145 -65
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +169 -131
- package/dist/server/rendering.mjs +167 -131
- package/dist/server/routing.mjs +165 -118
- package/dist/server/server.mjs +167 -154
- package/package.json +1 -1
- package/dist/_dts/api/src/bookingPaymentTermSchemas.d.ts +0 -123
- package/dist/_dts/commerce/src/purchase/checkoutPaymentTermPlanning.d.ts +0 -10
- package/dist/_dts/commerce/src/purchase/checkoutValidatedItemPlanning.d.ts +0 -55
- package/dist/_dts/commerce/src/purchase/orderInstalmentPayoff.d.ts +0 -24
|
@@ -2749,7 +2749,8 @@ const CLIENT_ERROR_REPORT_LIMITS = {
|
|
|
2749
2749
|
stack: 8e3,
|
|
2750
2750
|
digest: 128,
|
|
2751
2751
|
componentStack: 8e3,
|
|
2752
|
-
sourceLocation: 1024
|
|
2752
|
+
sourceLocation: 1024,
|
|
2753
|
+
navigationAgeMs: 6e4
|
|
2753
2754
|
};
|
|
2754
2755
|
const clientErrorEventSchema = z.enum([
|
|
2755
2756
|
"dashboard:route-error",
|
|
@@ -2766,7 +2767,17 @@ z.object({
|
|
|
2766
2767
|
stack: z.string().max(CLIENT_ERROR_REPORT_LIMITS.stack).nullable(),
|
|
2767
2768
|
digest: z.string().max(CLIENT_ERROR_REPORT_LIMITS.digest).nullable(),
|
|
2768
2769
|
componentStack: z.string().max(CLIENT_ERROR_REPORT_LIMITS.componentStack).nullable(),
|
|
2769
|
-
sourceLocation: z.string().max(CLIENT_ERROR_REPORT_LIMITS.sourceLocation).nullable()
|
|
2770
|
+
sourceLocation: z.string().max(CLIENT_ERROR_REPORT_LIMITS.sourceLocation).nullable(),
|
|
2771
|
+
navigation: z.object({
|
|
2772
|
+
fromPathname: z.string().regex(/^\/[^?#]*$/).max(CLIENT_ERROR_REPORT_LIMITS.pathname),
|
|
2773
|
+
toPathname: z.string().regex(/^\/[^?#]*$/).max(CLIENT_ERROR_REPORT_LIMITS.pathname),
|
|
2774
|
+
type: z.enum([
|
|
2775
|
+
"push",
|
|
2776
|
+
"replace",
|
|
2777
|
+
"traverse"
|
|
2778
|
+
]),
|
|
2779
|
+
ageMs: z.number().int().min(0).max(CLIENT_ERROR_REPORT_LIMITS.navigationAgeMs)
|
|
2780
|
+
}).strict().nullable().optional()
|
|
2770
2781
|
}).strict();
|
|
2771
2782
|
const API_ENDPOINTS = {
|
|
2772
2783
|
...SITE_LIFECYCLE_ENDPOINT_DEFINITIONS,
|
|
@@ -6523,24 +6534,6 @@ const API_ENDPOINTS = {
|
|
|
6523
6534
|
"server:internal_error"
|
|
6524
6535
|
]
|
|
6525
6536
|
},
|
|
6526
|
-
syncBookingPassWithStripe: {
|
|
6527
|
-
path: "/sites/{siteId}/bookings/passes/{passId}/sync-stripe",
|
|
6528
|
-
method: "POST",
|
|
6529
|
-
tags: [
|
|
6530
|
-
"site-{siteId}",
|
|
6531
|
-
"passes-{siteId}",
|
|
6532
|
-
"pass-{passId}"
|
|
6533
|
-
],
|
|
6534
|
-
auth: "user",
|
|
6535
|
-
responseKind: "json",
|
|
6536
|
-
errors: [
|
|
6537
|
-
"validation:invalid_input",
|
|
6538
|
-
"auth:forbidden",
|
|
6539
|
-
"resource:not_found",
|
|
6540
|
-
"resource:conflict",
|
|
6541
|
-
"server:internal_error"
|
|
6542
|
-
]
|
|
6543
|
-
},
|
|
6544
6537
|
refundCustomerPass: {
|
|
6545
6538
|
path: "/sites/{siteId}/bookings/customer-passes/{customerPassId}/refund",
|
|
6546
6539
|
method: "POST",
|
|
@@ -8004,7 +7997,7 @@ const API_ENDPOINTS = {
|
|
|
8004
7997
|
]
|
|
8005
7998
|
},
|
|
8006
7999
|
cancelFlexibleBalanceBookingDueToNonPayment: {
|
|
8007
|
-
path: "/sites/{siteId}/shop/orders/{orderId}/
|
|
8000
|
+
path: "/sites/{siteId}/shop/orders/{orderId}/flexible-balance/cancel-due-to-non-payment",
|
|
8008
8001
|
method: "POST",
|
|
8009
8002
|
auth: "user",
|
|
8010
8003
|
responseKind: "json",
|
|
@@ -8015,7 +8008,7 @@ const API_ENDPOINTS = {
|
|
|
8015
8008
|
]
|
|
8016
8009
|
},
|
|
8017
8010
|
reopenFlexibleBalanceBookingAfterNonPaymentCancellation: {
|
|
8018
|
-
path: "/sites/{siteId}/shop/orders/{orderId}/
|
|
8011
|
+
path: "/sites/{siteId}/shop/orders/{orderId}/flexible-balance/reopen",
|
|
8019
8012
|
method: "POST",
|
|
8020
8013
|
auth: "user",
|
|
8021
8014
|
responseKind: "json",
|
|
@@ -8646,14 +8639,14 @@ async function parseSuccessResponse(endpoint, response, config) {
|
|
|
8646
8639
|
default: return buildSuccessEnvelope(void 0, requestId);
|
|
8647
8640
|
}
|
|
8648
8641
|
}
|
|
8649
|
-
function createRawCMSClient(
|
|
8642
|
+
function createRawCMSClient(getHeaders = () => ({}), baseUrl) {
|
|
8650
8643
|
return ({ endpoint, body, params, options = {} }) => {
|
|
8651
8644
|
const plan = buildApiRequestPlan({
|
|
8652
8645
|
endpoint,
|
|
8653
8646
|
body,
|
|
8654
8647
|
params,
|
|
8655
8648
|
options,
|
|
8656
|
-
headers,
|
|
8649
|
+
headers: getHeaders(),
|
|
8657
8650
|
baseUrl: normalizeCmsApiBaseUrl(baseUrl ?? resolveApiBaseUrl()),
|
|
8658
8651
|
sdkVersion
|
|
8659
8652
|
});
|
|
@@ -8758,11 +8751,8 @@ function createParsedClient(rawClient) {
|
|
|
8758
8751
|
return parseSuccessResponse(endpoint, response, config);
|
|
8759
8752
|
};
|
|
8760
8753
|
}
|
|
8761
|
-
function createCMSClient(headers = {}, baseUrl) {
|
|
8762
|
-
return createParsedClient(createRawCMSClient(headers, baseUrl));
|
|
8763
|
-
}
|
|
8764
8754
|
function createBearerAPIClient(token, baseUrl) {
|
|
8765
|
-
return
|
|
8755
|
+
return createParsedClient(createRawCMSClient(() => ({ Authorization: `Bearer ${typeof token === "function" ? token() : token}` }), baseUrl));
|
|
8766
8756
|
}
|
|
8767
8757
|
//#endregion
|
|
8768
8758
|
//#region ../preview-next/src/auth-contract.ts
|
|
@@ -8788,6 +8778,7 @@ function getPreviewRuntimeSessionAuthMode(session) {
|
|
|
8788
8778
|
//#endregion
|
|
8789
8779
|
//#region ../preview-next/src/client/previewAuthStore.ts
|
|
8790
8780
|
const listeners = /* @__PURE__ */ new Set();
|
|
8781
|
+
const handledApiAuthErrors = /* @__PURE__ */ new WeakSet();
|
|
8791
8782
|
let internal = {
|
|
8792
8783
|
state: "expired",
|
|
8793
8784
|
session: null,
|
|
@@ -8832,6 +8823,15 @@ function usePreviewAuth() {
|
|
|
8832
8823
|
function usePreviewToken() {
|
|
8833
8824
|
return useSyncExternalStore(subscribe, getState, getState).token;
|
|
8834
8825
|
}
|
|
8826
|
+
function getPreviewAccessToken() {
|
|
8827
|
+
const { token, state } = getState();
|
|
8828
|
+
if (token && state === "ok") return token;
|
|
8829
|
+
markPreviewAuthExpired("query");
|
|
8830
|
+
throw new Error("Preview access token is unavailable");
|
|
8831
|
+
}
|
|
8832
|
+
function setPreviewAccessToken(token) {
|
|
8833
|
+
if (getState().state === "ok") setState({ token });
|
|
8834
|
+
}
|
|
8835
8835
|
function normalizePreviewRuntimeSession(input) {
|
|
8836
8836
|
if ("session" in input) return input.session;
|
|
8837
8837
|
return resolvePreviewRuntimeSession({
|
|
@@ -8860,6 +8860,26 @@ function markPreviewAuthExpired(source) {
|
|
|
8860
8860
|
token: null
|
|
8861
8861
|
});
|
|
8862
8862
|
}
|
|
8863
|
+
/** Handle bearer 401s at the request boundary, including calls outside the query cache. */
|
|
8864
|
+
function createGuardedPreviewApiClient(baseUrl) {
|
|
8865
|
+
return async (params) => {
|
|
8866
|
+
const requestToken = getPreviewAccessToken();
|
|
8867
|
+
try {
|
|
8868
|
+
return await createBearerAPIClient(requestToken, baseUrl)(params);
|
|
8869
|
+
} catch (error) {
|
|
8870
|
+
if (error instanceof ApiRequestError && error.status === 401) {
|
|
8871
|
+
handledApiAuthErrors.add(error);
|
|
8872
|
+
const current = getState();
|
|
8873
|
+
if (current.state === "ok" && current.token === requestToken) markPreviewAuthExpired("query");
|
|
8874
|
+
}
|
|
8875
|
+
throw error;
|
|
8876
|
+
}
|
|
8877
|
+
};
|
|
8878
|
+
}
|
|
8879
|
+
/** Query callbacks receive the same error after the request guard has decided auth state. */
|
|
8880
|
+
function wasPreviewApiAuthErrorHandled(error) {
|
|
8881
|
+
return error instanceof ApiRequestError && handledApiAuthErrors.has(error);
|
|
8882
|
+
}
|
|
8863
8883
|
function usePreviewAuthFetch(baseFetch) {
|
|
8864
8884
|
return React$1.useCallback(async (input, init, source) => {
|
|
8865
8885
|
if (getState().state === "expired") {
|
|
@@ -8883,4 +8903,4 @@ function usePreviewAuthFetch(baseFetch) {
|
|
|
8883
8903
|
}, [baseFetch]);
|
|
8884
8904
|
}
|
|
8885
8905
|
//#endregion
|
|
8886
|
-
export {
|
|
8906
|
+
export { SURFACE_IDS as _, usePreviewAuth as a, wasPreviewApiAuthErrorHandled as c, ApiEnvelopeError as d, extractApiEnvelopeErrorDetails as f, SURFACE_DOCUMENT_DATA_ATTRIBUTE as g, DEFAULT_SURFACE_ID as h, setPreviewAccessToken as i, isPreviewRuntimeSessionEditable as l, getDashboardUrl as m, initPreviewAuth as n, usePreviewAuthFetch as o, unwrapResponse as p, markPreviewAuthExpired as r, usePreviewToken as s, createGuardedPreviewApiClient as t, ApiRequestError as u, resolveSurfaceDocumentAttributes as v, API_ENDPOINTS as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "./PreviewQueryProvider-
|
|
3
|
-
import { i as PreviewShellLayout, r as PreviewShell } from "./SdkPreviewModeRuntime-
|
|
2
|
+
import "./PreviewQueryProvider-C0mndwHB.mjs";
|
|
3
|
+
import { i as PreviewShellLayout, r as PreviewShell } from "./SdkPreviewModeRuntime-DJPmPY-r.mjs";
|
|
4
4
|
export { PreviewShell, PreviewShellLayout };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { fo as Primitive, zo as cn } from "./SiteChromeCustomizeContext-
|
|
2
|
+
import { fo as Primitive, zo as cn } from "./SiteChromeCustomizeContext-JYA0cJ_Z.mjs";
|
|
3
3
|
import * as React$1 from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region ../../node_modules/.pnpm/@radix-ui+react-separator@1.1.10_@types+react-dom@19.2.3_@types+react@19.2.17__@types+r_adfab47c9055efb8b0c4b77a2b96b053/node_modules/@radix-ui/react-separator/dist/index.mjs
|
|
@@ -389,6 +389,16 @@ function isRecord$41(value) {
|
|
|
389
389
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
390
390
|
}
|
|
391
391
|
//#endregion
|
|
392
|
+
//#region ../core/src/booking-payment-options.ts
|
|
393
|
+
/** Automatic instalments and a flexible balance cannot share one booking offer. */
|
|
394
|
+
function validateBookingPaymentOptionKinds(kinds) {
|
|
395
|
+
if (kinds.length === 0) return err$3("no_options");
|
|
396
|
+
const uniqueKinds = new Set(kinds);
|
|
397
|
+
if (uniqueKinds.size !== kinds.length) return err$3("duplicate_kind");
|
|
398
|
+
if (uniqueKinds.has("instalment_plan") && uniqueKinds.has("flexible_balance")) return err$3("incompatible_collection_options");
|
|
399
|
+
return ok$3(void 0);
|
|
400
|
+
}
|
|
401
|
+
//#endregion
|
|
392
402
|
//#region ../core/src/booking-time-zone.ts
|
|
393
403
|
const TIME_ZONE_VALIDITY_CACHE_LIMIT = 100;
|
|
394
404
|
const timeZoneValidityCache = /* @__PURE__ */ new Map();
|
|
@@ -29514,68 +29524,113 @@ function createRichTextDoc(paragraphs) {
|
|
|
29514
29524
|
};
|
|
29515
29525
|
}
|
|
29516
29526
|
//#endregion
|
|
29517
|
-
//#region ../
|
|
29518
|
-
const
|
|
29519
|
-
const
|
|
29520
|
-
|
|
29521
|
-
|
|
29522
|
-
|
|
29523
|
-
|
|
29524
|
-
|
|
29525
|
-
intervalUnit: z$1.enum([
|
|
29526
|
-
"day",
|
|
29527
|
-
"week",
|
|
29528
|
-
"month"
|
|
29529
|
-
])
|
|
29530
|
-
}),
|
|
29531
|
-
z$1.object({
|
|
29532
|
-
kind: z$1.literal("deposit_plus_scheduled_instalments"),
|
|
29533
|
-
depositAmountCents: z$1.number().int().min(0),
|
|
29534
|
-
depositRefundability: bookingDepositRefundPolicySchema$1,
|
|
29535
|
-
instalmentCount: z$1.number().int().positive(),
|
|
29536
|
-
intervalCount: z$1.number().int().positive(),
|
|
29537
|
-
intervalUnit: z$1.enum([
|
|
29538
|
-
"day",
|
|
29539
|
-
"week",
|
|
29540
|
-
"month"
|
|
29541
|
-
])
|
|
29542
|
-
}),
|
|
29543
|
-
z$1.object({
|
|
29544
|
-
kind: z$1.literal("equal_scheduled_instalments"),
|
|
29545
|
-
instalmentCount: z$1.number().int().positive(),
|
|
29546
|
-
intervalCount: z$1.number().int().positive(),
|
|
29547
|
-
intervalUnit: z$1.enum([
|
|
29548
|
-
"day",
|
|
29549
|
-
"week",
|
|
29550
|
-
"month"
|
|
29551
|
-
])
|
|
29552
|
-
})
|
|
29553
|
-
]);
|
|
29554
|
-
const bookingFlexibleBalanceDueDateRuleSchema$1 = z$1.union([z$1.object({
|
|
29555
|
-
kind: z$1.literal("relative_to_start_date"),
|
|
29556
|
-
daysBeforeStart: z$1.number().int().positive()
|
|
29557
|
-
}), z$1.object({
|
|
29558
|
-
kind: z$1.literal("fixed_calendar_date"),
|
|
29559
|
-
dueAt: z$1.string().datetime()
|
|
29560
|
-
})]);
|
|
29561
|
-
const bookingFlexibleBalanceConfigSchema$1 = z$1.object({
|
|
29562
|
-
upfrontAmountCents: z$1.number().int().min(0),
|
|
29563
|
-
dueDateRule: bookingFlexibleBalanceDueDateRuleSchema$1,
|
|
29564
|
-
depositRefundability: bookingDepositRefundPolicySchema$1
|
|
29565
|
-
});
|
|
29566
|
-
const blockBookingPaymentCollectionOptionSchema = z$1.union([
|
|
29567
|
-
z$1.object({ kind: z$1.literal("upfront") }),
|
|
29568
|
-
z$1.object({ kind: z$1.literal("deferred_manual") }),
|
|
29569
|
-
z$1.object({
|
|
29570
|
-
kind: z$1.literal("instalment_plan"),
|
|
29571
|
-
plan: bookingInstalmentPlanSchema$1
|
|
29572
|
-
}),
|
|
29573
|
-
z$1.object({
|
|
29574
|
-
kind: z$1.literal("flexible_balance"),
|
|
29575
|
-
config: bookingFlexibleBalanceConfigSchema$1
|
|
29576
|
-
})
|
|
29527
|
+
//#region ../core/src/booking-payment-schemas.ts
|
|
29528
|
+
const stripObject = (shape) => z$1.object(shape);
|
|
29529
|
+
const strictObject = (shape) => z$1.strictObject(shape);
|
|
29530
|
+
const depositRefundPolicySchema = z$1.enum(["refundable", "non_refundable"]);
|
|
29531
|
+
const intervalUnitSchema = z$1.enum([
|
|
29532
|
+
"day",
|
|
29533
|
+
"week",
|
|
29534
|
+
"month"
|
|
29577
29535
|
]);
|
|
29578
|
-
const
|
|
29536
|
+
const nonNegativeIntegerSchema = z$1.number().int().nonnegative();
|
|
29537
|
+
const positiveIntegerSchema = z$1.number().int().positive();
|
|
29538
|
+
function createInstalmentPlanSchema(object) {
|
|
29539
|
+
return z$1.discriminatedUnion("kind", [
|
|
29540
|
+
object({
|
|
29541
|
+
kind: z$1.literal("deposit_plus_one_remainder"),
|
|
29542
|
+
depositAmountCents: nonNegativeIntegerSchema,
|
|
29543
|
+
depositRefundability: depositRefundPolicySchema,
|
|
29544
|
+
remainderDueCount: positiveIntegerSchema,
|
|
29545
|
+
intervalUnit: intervalUnitSchema
|
|
29546
|
+
}),
|
|
29547
|
+
object({
|
|
29548
|
+
kind: z$1.literal("deposit_plus_scheduled_instalments"),
|
|
29549
|
+
depositAmountCents: nonNegativeIntegerSchema,
|
|
29550
|
+
depositRefundability: depositRefundPolicySchema,
|
|
29551
|
+
instalmentCount: positiveIntegerSchema,
|
|
29552
|
+
intervalCount: positiveIntegerSchema,
|
|
29553
|
+
intervalUnit: intervalUnitSchema
|
|
29554
|
+
}),
|
|
29555
|
+
object({
|
|
29556
|
+
kind: z$1.literal("equal_scheduled_instalments"),
|
|
29557
|
+
instalmentCount: positiveIntegerSchema,
|
|
29558
|
+
intervalCount: positiveIntegerSchema,
|
|
29559
|
+
intervalUnit: intervalUnitSchema
|
|
29560
|
+
})
|
|
29561
|
+
]);
|
|
29562
|
+
}
|
|
29563
|
+
function createFlexibleBalanceSchemas(object) {
|
|
29564
|
+
const dueDateRule = z$1.discriminatedUnion("kind", [object({
|
|
29565
|
+
kind: z$1.literal("relative_to_start_date"),
|
|
29566
|
+
daysBeforeStart: positiveIntegerSchema
|
|
29567
|
+
}), object({
|
|
29568
|
+
kind: z$1.literal("fixed_calendar_date"),
|
|
29569
|
+
dueAt: z$1.string().datetime()
|
|
29570
|
+
})]);
|
|
29571
|
+
return {
|
|
29572
|
+
dueDateRule,
|
|
29573
|
+
config: object({
|
|
29574
|
+
upfrontAmountCents: nonNegativeIntegerSchema,
|
|
29575
|
+
dueDateRule,
|
|
29576
|
+
depositRefundability: depositRefundPolicySchema
|
|
29577
|
+
})
|
|
29578
|
+
};
|
|
29579
|
+
}
|
|
29580
|
+
const paymentOptionKindsMessages = {
|
|
29581
|
+
no_options: "Choose at least one way for customers to pay.",
|
|
29582
|
+
duplicate_kind: "Choose each payment option only once.",
|
|
29583
|
+
incompatible_collection_options: "Offer instalments or a deposit with the rest paid later, but not both."
|
|
29584
|
+
};
|
|
29585
|
+
function buildBookingPaymentOptionSchemas(object) {
|
|
29586
|
+
const instalmentPlan = createInstalmentPlanSchema(object);
|
|
29587
|
+
const flexibleBalance = createFlexibleBalanceSchemas(object);
|
|
29588
|
+
const paymentCollectionOption = z$1.discriminatedUnion("kind", [
|
|
29589
|
+
object({ kind: z$1.literal("upfront") }),
|
|
29590
|
+
object({ kind: z$1.literal("deferred_manual") }),
|
|
29591
|
+
object({
|
|
29592
|
+
kind: z$1.literal("instalment_plan"),
|
|
29593
|
+
plan: instalmentPlan
|
|
29594
|
+
}),
|
|
29595
|
+
object({
|
|
29596
|
+
kind: z$1.literal("flexible_balance"),
|
|
29597
|
+
config: flexibleBalance.config
|
|
29598
|
+
})
|
|
29599
|
+
]);
|
|
29600
|
+
const paymentTerms = object({ allowedOptions: z$1.array(paymentCollectionOption) }).superRefine(({ allowedOptions }, ctx) => {
|
|
29601
|
+
const result = validateBookingPaymentOptionKinds(allowedOptions.map(({ kind }) => kind));
|
|
29602
|
+
if (!result.ok) ctx.addIssue({
|
|
29603
|
+
code: "custom",
|
|
29604
|
+
path: ["allowedOptions"],
|
|
29605
|
+
message: paymentOptionKindsMessages[result.error]
|
|
29606
|
+
});
|
|
29607
|
+
});
|
|
29608
|
+
const paymentOptionsChoice = z$1.discriminatedUnion("source", [z$1.strictObject({ source: z$1.literal("default") }), z$1.strictObject({
|
|
29609
|
+
source: z$1.literal("custom"),
|
|
29610
|
+
paymentTerms
|
|
29611
|
+
})]);
|
|
29612
|
+
return {
|
|
29613
|
+
depositRefundPolicy: depositRefundPolicySchema,
|
|
29614
|
+
instalmentPlan,
|
|
29615
|
+
flexibleBalanceDueDateRule: flexibleBalance.dueDateRule,
|
|
29616
|
+
flexibleBalanceConfig: flexibleBalance.config,
|
|
29617
|
+
paymentCollectionOption,
|
|
29618
|
+
paymentTerms,
|
|
29619
|
+
paymentOptionsChoice
|
|
29620
|
+
};
|
|
29621
|
+
}
|
|
29622
|
+
function createBookingPaymentOptionSchemas(mode) {
|
|
29623
|
+
return mode === "strict" ? buildBookingPaymentOptionSchemas(strictObject) : buildBookingPaymentOptionSchemas(stripObject);
|
|
29624
|
+
}
|
|
29625
|
+
const bookingPaymentOptionSchemas = createBookingPaymentOptionSchemas("strip");
|
|
29626
|
+
bookingPaymentOptionSchemas.depositRefundPolicy;
|
|
29627
|
+
bookingPaymentOptionSchemas.instalmentPlan;
|
|
29628
|
+
bookingPaymentOptionSchemas.flexibleBalanceDueDateRule;
|
|
29629
|
+
bookingPaymentOptionSchemas.flexibleBalanceConfig;
|
|
29630
|
+
bookingPaymentOptionSchemas.paymentCollectionOption;
|
|
29631
|
+
const bookingPaymentTermsSchema = bookingPaymentOptionSchemas.paymentTerms;
|
|
29632
|
+
bookingPaymentOptionSchemas.paymentOptionsChoice;
|
|
29633
|
+
const blockBookingPaymentTermsSchema = bookingPaymentTermsSchema;
|
|
29579
29634
|
const blockBookingConsentSchema = z$1.object({
|
|
29580
29635
|
requirementId: z$1.string(),
|
|
29581
29636
|
title: z$1.string(),
|
|
@@ -30543,6 +30598,13 @@ const STRUCTURED_KEYS = /* @__PURE__ */ new Set([
|
|
|
30543
30598
|
"domainOperationProvider",
|
|
30544
30599
|
"domainOperationError",
|
|
30545
30600
|
"domainOperationMetadata",
|
|
30601
|
+
"previewDecision",
|
|
30602
|
+
"previewOutcome",
|
|
30603
|
+
"previewTokenTtlBucket",
|
|
30604
|
+
"previewRefreshCookiePresent",
|
|
30605
|
+
"previewDashboardStatus",
|
|
30606
|
+
"previewProviderResult",
|
|
30607
|
+
"previewUpstreamStatus",
|
|
30546
30608
|
"durationMs",
|
|
30547
30609
|
"duration",
|
|
30548
30610
|
"status",
|
|
@@ -38834,7 +38896,7 @@ const publicPassProductCollectionSchema = z$1.object({ passes: z$1.array(publicP
|
|
|
38834
38896
|
/**
|
|
38835
38897
|
* Public membership product for shop display
|
|
38836
38898
|
*/
|
|
38837
|
-
const
|
|
38899
|
+
const publicMembershipProductFields = {
|
|
38838
38900
|
id: z$1.string(),
|
|
38839
38901
|
name: z$1.string(),
|
|
38840
38902
|
description: z$1.string().nullable(),
|
|
@@ -38843,7 +38905,16 @@ const publicMembershipProductSchema = z$1.object({
|
|
|
38843
38905
|
billingInterval: z$1.enum(["month", "year"]),
|
|
38844
38906
|
eligibleCategoryIds: z$1.array(z$1.string()),
|
|
38845
38907
|
eligibleCategoryNames: z$1.array(z$1.string())
|
|
38908
|
+
};
|
|
38909
|
+
const purchasablePublicMembershipProductSchema = z$1.object({
|
|
38910
|
+
...publicMembershipProductFields,
|
|
38911
|
+
purchaseAvailability: z$1.literal("purchasable")
|
|
38846
38912
|
});
|
|
38913
|
+
const publicMembershipProductSchema = z$1.discriminatedUnion("purchaseAvailability", [purchasablePublicMembershipProductSchema, z$1.object({
|
|
38914
|
+
...publicMembershipProductFields,
|
|
38915
|
+
purchaseAvailability: z$1.literal("display_only"),
|
|
38916
|
+
unavailabilityReason: z$1.literal("online_payments_unavailable")
|
|
38917
|
+
})]);
|
|
38847
38918
|
const publicMembershipProductCollectionSchema = z$1.object({ memberships: z$1.array(publicMembershipProductSchema) });
|
|
38848
38919
|
//#endregion
|
|
38849
38920
|
//#region ../blocks/src/system/blocks/products/shared.ts
|
|
@@ -39084,7 +39155,7 @@ function buildPassesMembershipsDisplay(options) {
|
|
|
39084
39155
|
product: pass
|
|
39085
39156
|
} : {
|
|
39086
39157
|
kind: "unavailable",
|
|
39087
|
-
label: "Online purchasing
|
|
39158
|
+
label: "Online purchasing is unavailable."
|
|
39088
39159
|
}
|
|
39089
39160
|
};
|
|
39090
39161
|
});
|
|
@@ -39094,7 +39165,14 @@ function buildPassesMembershipsDisplay(options) {
|
|
|
39094
39165
|
description: options.showDescriptions ? membership.description : null,
|
|
39095
39166
|
priceLabel: formatCommercePrice(membership.price, membership.currency),
|
|
39096
39167
|
intervalLabel: formatInterval(membership.billingInterval),
|
|
39097
|
-
|
|
39168
|
+
action: membership.purchaseAvailability === "purchasable" ? {
|
|
39169
|
+
kind: "purchase",
|
|
39170
|
+
label: options.membershipActionLabel,
|
|
39171
|
+
product: membership
|
|
39172
|
+
} : {
|
|
39173
|
+
kind: "unavailable",
|
|
39174
|
+
label: "Online purchasing is unavailable."
|
|
39175
|
+
}
|
|
39098
39176
|
}));
|
|
39099
39177
|
return {
|
|
39100
39178
|
kind: "passes-memberships",
|
|
@@ -39314,7 +39392,14 @@ const membershipCardDisplaySchema = z$1.object({
|
|
|
39314
39392
|
description: z$1.string().nullable(),
|
|
39315
39393
|
priceLabel: z$1.string(),
|
|
39316
39394
|
intervalLabel: z$1.string(),
|
|
39317
|
-
|
|
39395
|
+
action: z$1.discriminatedUnion("kind", [z$1.object({
|
|
39396
|
+
kind: z$1.literal("purchase"),
|
|
39397
|
+
label: z$1.string(),
|
|
39398
|
+
product: purchasablePublicMembershipProductSchema
|
|
39399
|
+
}), z$1.object({
|
|
39400
|
+
kind: z$1.literal("unavailable"),
|
|
39401
|
+
label: z$1.string()
|
|
39402
|
+
})])
|
|
39318
39403
|
});
|
|
39319
39404
|
const passesMembershipsDisplaySchema = z$1.object({
|
|
39320
39405
|
kind: z$1.literal("passes-memberships"),
|
|
@@ -45894,11 +45979,11 @@ function ShopSSR({ blockId, siteId, apiBaseUrl, stage, children, checkoutEndpoin
|
|
|
45894
45979
|
}, pass.id)),
|
|
45895
45980
|
membershipCards: render.display.memberships.map((membership) => /* @__PURE__ */ jsx(MembershipCardView, {
|
|
45896
45981
|
display: membership,
|
|
45897
|
-
action: /* @__PURE__ */ jsx(ThemedButton, {
|
|
45982
|
+
action: membership.action.kind === "unavailable" ? /* @__PURE__ */ jsx(PassPurchaseUnavailable, { label: membership.action.label }) : /* @__PURE__ */ jsx(ThemedButton, {
|
|
45898
45983
|
type: "button",
|
|
45899
45984
|
variant: render.hydration.buttonVariant,
|
|
45900
45985
|
size: "md",
|
|
45901
|
-
label: membership.
|
|
45986
|
+
label: membership.action.label,
|
|
45902
45987
|
disabled: true,
|
|
45903
45988
|
"aria-disabled": "true"
|
|
45904
45989
|
})
|
|
@@ -79590,7 +79675,8 @@ const CLIENT_ERROR_REPORT_LIMITS = {
|
|
|
79590
79675
|
stack: 8e3,
|
|
79591
79676
|
digest: 128,
|
|
79592
79677
|
componentStack: 8e3,
|
|
79593
|
-
sourceLocation: 1024
|
|
79678
|
+
sourceLocation: 1024,
|
|
79679
|
+
navigationAgeMs: 6e4
|
|
79594
79680
|
};
|
|
79595
79681
|
const clientErrorEventSchema = z$1.enum([
|
|
79596
79682
|
"dashboard:route-error",
|
|
@@ -79607,7 +79693,17 @@ z$1.object({
|
|
|
79607
79693
|
stack: z$1.string().max(CLIENT_ERROR_REPORT_LIMITS.stack).nullable(),
|
|
79608
79694
|
digest: z$1.string().max(CLIENT_ERROR_REPORT_LIMITS.digest).nullable(),
|
|
79609
79695
|
componentStack: z$1.string().max(CLIENT_ERROR_REPORT_LIMITS.componentStack).nullable(),
|
|
79610
|
-
sourceLocation: z$1.string().max(CLIENT_ERROR_REPORT_LIMITS.sourceLocation).nullable()
|
|
79696
|
+
sourceLocation: z$1.string().max(CLIENT_ERROR_REPORT_LIMITS.sourceLocation).nullable(),
|
|
79697
|
+
navigation: z$1.object({
|
|
79698
|
+
fromPathname: z$1.string().regex(/^\/[^?#]*$/).max(CLIENT_ERROR_REPORT_LIMITS.pathname),
|
|
79699
|
+
toPathname: z$1.string().regex(/^\/[^?#]*$/).max(CLIENT_ERROR_REPORT_LIMITS.pathname),
|
|
79700
|
+
type: z$1.enum([
|
|
79701
|
+
"push",
|
|
79702
|
+
"replace",
|
|
79703
|
+
"traverse"
|
|
79704
|
+
]),
|
|
79705
|
+
ageMs: z$1.number().int().min(0).max(CLIENT_ERROR_REPORT_LIMITS.navigationAgeMs)
|
|
79706
|
+
}).strict().nullable().optional()
|
|
79611
79707
|
}).strict();
|
|
79612
79708
|
({
|
|
79613
79709
|
...SITE_LIFECYCLE_ENDPOINT_DEFINITIONS,
|
|
@@ -80498,6 +80594,7 @@ const CANONICAL_REFUND_PLANNER_ERROR_CODES = [
|
|
|
80498
80594
|
"refund_failed"
|
|
80499
80595
|
];
|
|
80500
80596
|
const CANONICAL_ADMIN_REFUND_FAILURE_CODES = [
|
|
80597
|
+
"refund_blocked_by_live_payment_terms",
|
|
80501
80598
|
...CANONICAL_REFUND_PLANNER_ERROR_CODES,
|
|
80502
80599
|
"payment_intent_not_found",
|
|
80503
80600
|
"stripe_error",
|
|
@@ -80513,6 +80610,7 @@ const CANONICAL_ADMIN_REFUND_FAILURE_CODES = [
|
|
|
80513
80610
|
//#endregion
|
|
80514
80611
|
//#region ../api/src/bookingRefundOutcomes.ts
|
|
80515
80612
|
const STANDARD_LINE_ITEM_REFUND_INVALID_CODES = [
|
|
80613
|
+
"refund_blocked_by_live_payment_terms",
|
|
80516
80614
|
"missing_amount",
|
|
80517
80615
|
"invalid_amount",
|
|
80518
80616
|
"amount_exceeds_remaining",
|
|
@@ -80878,68 +80976,6 @@ function stableSerialize(value) {
|
|
|
80878
80976
|
}
|
|
80879
80977
|
z$1.enum(["public", "unlisted"], { error: "visibility must be 'public' or 'unlisted'" });
|
|
80880
80978
|
//#endregion
|
|
80881
|
-
//#region ../api/src/bookingPaymentTermSchemas.ts
|
|
80882
|
-
const bookingDepositRefundPolicySchema = z$1.enum(["refundable", "non_refundable"]);
|
|
80883
|
-
const bookingInstalmentPlanSchema = z$1.discriminatedUnion("kind", [
|
|
80884
|
-
z$1.object({
|
|
80885
|
-
kind: z$1.literal("deposit_plus_one_remainder"),
|
|
80886
|
-
depositAmountCents: z$1.number().int().nonnegative(),
|
|
80887
|
-
depositRefundability: bookingDepositRefundPolicySchema,
|
|
80888
|
-
remainderDueCount: z$1.number().int().positive(),
|
|
80889
|
-
intervalUnit: z$1.enum([
|
|
80890
|
-
"day",
|
|
80891
|
-
"week",
|
|
80892
|
-
"month"
|
|
80893
|
-
])
|
|
80894
|
-
}),
|
|
80895
|
-
z$1.object({
|
|
80896
|
-
kind: z$1.literal("deposit_plus_scheduled_instalments"),
|
|
80897
|
-
depositAmountCents: z$1.number().int().nonnegative(),
|
|
80898
|
-
depositRefundability: bookingDepositRefundPolicySchema,
|
|
80899
|
-
instalmentCount: z$1.number().int().positive(),
|
|
80900
|
-
intervalCount: z$1.number().int().positive(),
|
|
80901
|
-
intervalUnit: z$1.enum([
|
|
80902
|
-
"day",
|
|
80903
|
-
"week",
|
|
80904
|
-
"month"
|
|
80905
|
-
])
|
|
80906
|
-
}),
|
|
80907
|
-
z$1.object({
|
|
80908
|
-
kind: z$1.literal("equal_scheduled_instalments"),
|
|
80909
|
-
instalmentCount: z$1.number().int().positive(),
|
|
80910
|
-
intervalCount: z$1.number().int().positive(),
|
|
80911
|
-
intervalUnit: z$1.enum([
|
|
80912
|
-
"day",
|
|
80913
|
-
"week",
|
|
80914
|
-
"month"
|
|
80915
|
-
])
|
|
80916
|
-
})
|
|
80917
|
-
]);
|
|
80918
|
-
const bookingFlexibleBalanceDueDateRuleSchema = z$1.discriminatedUnion("kind", [z$1.object({
|
|
80919
|
-
kind: z$1.literal("relative_to_start_date"),
|
|
80920
|
-
daysBeforeStart: z$1.number().int().positive()
|
|
80921
|
-
}), z$1.object({
|
|
80922
|
-
kind: z$1.literal("fixed_calendar_date"),
|
|
80923
|
-
dueAt: z$1.string().datetime()
|
|
80924
|
-
})]);
|
|
80925
|
-
const bookingFlexibleBalanceConfigSchema = z$1.object({
|
|
80926
|
-
upfrontAmountCents: z$1.number().int().nonnegative(),
|
|
80927
|
-
dueDateRule: bookingFlexibleBalanceDueDateRuleSchema,
|
|
80928
|
-
depositRefundability: bookingDepositRefundPolicySchema
|
|
80929
|
-
});
|
|
80930
|
-
z$1.discriminatedUnion("kind", [
|
|
80931
|
-
z$1.object({ kind: z$1.literal("upfront") }),
|
|
80932
|
-
z$1.object({ kind: z$1.literal("deferred_manual") }),
|
|
80933
|
-
z$1.object({
|
|
80934
|
-
kind: z$1.literal("instalment_plan"),
|
|
80935
|
-
plan: bookingInstalmentPlanSchema
|
|
80936
|
-
}),
|
|
80937
|
-
z$1.object({
|
|
80938
|
-
kind: z$1.literal("flexible_balance"),
|
|
80939
|
-
config: bookingFlexibleBalanceConfigSchema
|
|
80940
|
-
})
|
|
80941
|
-
]);
|
|
80942
|
-
//#endregion
|
|
80943
80979
|
//#region ../api/src/navigationMenuValidation.ts
|
|
80944
80980
|
function hasChildren(item) {
|
|
80945
80981
|
return Array.isArray(item.children) && item.children.length > 0;
|