@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
|
@@ -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();
|
|
@@ -29651,68 +29661,113 @@ function createRichTextDoc(paragraphs) {
|
|
|
29651
29661
|
};
|
|
29652
29662
|
}
|
|
29653
29663
|
//#endregion
|
|
29654
|
-
//#region ../
|
|
29655
|
-
const
|
|
29656
|
-
const
|
|
29657
|
-
|
|
29658
|
-
|
|
29659
|
-
|
|
29660
|
-
|
|
29661
|
-
|
|
29662
|
-
intervalUnit: z$1.enum([
|
|
29663
|
-
"day",
|
|
29664
|
-
"week",
|
|
29665
|
-
"month"
|
|
29666
|
-
])
|
|
29667
|
-
}),
|
|
29668
|
-
z$1.object({
|
|
29669
|
-
kind: z$1.literal("deposit_plus_scheduled_instalments"),
|
|
29670
|
-
depositAmountCents: z$1.number().int().min(0),
|
|
29671
|
-
depositRefundability: bookingDepositRefundPolicySchema$1,
|
|
29672
|
-
instalmentCount: z$1.number().int().positive(),
|
|
29673
|
-
intervalCount: z$1.number().int().positive(),
|
|
29674
|
-
intervalUnit: z$1.enum([
|
|
29675
|
-
"day",
|
|
29676
|
-
"week",
|
|
29677
|
-
"month"
|
|
29678
|
-
])
|
|
29679
|
-
}),
|
|
29680
|
-
z$1.object({
|
|
29681
|
-
kind: z$1.literal("equal_scheduled_instalments"),
|
|
29682
|
-
instalmentCount: z$1.number().int().positive(),
|
|
29683
|
-
intervalCount: z$1.number().int().positive(),
|
|
29684
|
-
intervalUnit: z$1.enum([
|
|
29685
|
-
"day",
|
|
29686
|
-
"week",
|
|
29687
|
-
"month"
|
|
29688
|
-
])
|
|
29689
|
-
})
|
|
29690
|
-
]);
|
|
29691
|
-
const bookingFlexibleBalanceDueDateRuleSchema$1 = z$1.union([z$1.object({
|
|
29692
|
-
kind: z$1.literal("relative_to_start_date"),
|
|
29693
|
-
daysBeforeStart: z$1.number().int().positive()
|
|
29694
|
-
}), z$1.object({
|
|
29695
|
-
kind: z$1.literal("fixed_calendar_date"),
|
|
29696
|
-
dueAt: z$1.string().datetime()
|
|
29697
|
-
})]);
|
|
29698
|
-
const bookingFlexibleBalanceConfigSchema$1 = z$1.object({
|
|
29699
|
-
upfrontAmountCents: z$1.number().int().min(0),
|
|
29700
|
-
dueDateRule: bookingFlexibleBalanceDueDateRuleSchema$1,
|
|
29701
|
-
depositRefundability: bookingDepositRefundPolicySchema$1
|
|
29702
|
-
});
|
|
29703
|
-
const blockBookingPaymentCollectionOptionSchema = z$1.union([
|
|
29704
|
-
z$1.object({ kind: z$1.literal("upfront") }),
|
|
29705
|
-
z$1.object({ kind: z$1.literal("deferred_manual") }),
|
|
29706
|
-
z$1.object({
|
|
29707
|
-
kind: z$1.literal("instalment_plan"),
|
|
29708
|
-
plan: bookingInstalmentPlanSchema$1
|
|
29709
|
-
}),
|
|
29710
|
-
z$1.object({
|
|
29711
|
-
kind: z$1.literal("flexible_balance"),
|
|
29712
|
-
config: bookingFlexibleBalanceConfigSchema$1
|
|
29713
|
-
})
|
|
29664
|
+
//#region ../core/src/booking-payment-schemas.ts
|
|
29665
|
+
const stripObject = (shape) => z$1.object(shape);
|
|
29666
|
+
const strictObject = (shape) => z$1.strictObject(shape);
|
|
29667
|
+
const depositRefundPolicySchema = z$1.enum(["refundable", "non_refundable"]);
|
|
29668
|
+
const intervalUnitSchema = z$1.enum([
|
|
29669
|
+
"day",
|
|
29670
|
+
"week",
|
|
29671
|
+
"month"
|
|
29714
29672
|
]);
|
|
29715
|
-
const
|
|
29673
|
+
const nonNegativeIntegerSchema = z$1.number().int().nonnegative();
|
|
29674
|
+
const positiveIntegerSchema = z$1.number().int().positive();
|
|
29675
|
+
function createInstalmentPlanSchema(object) {
|
|
29676
|
+
return z$1.discriminatedUnion("kind", [
|
|
29677
|
+
object({
|
|
29678
|
+
kind: z$1.literal("deposit_plus_one_remainder"),
|
|
29679
|
+
depositAmountCents: nonNegativeIntegerSchema,
|
|
29680
|
+
depositRefundability: depositRefundPolicySchema,
|
|
29681
|
+
remainderDueCount: positiveIntegerSchema,
|
|
29682
|
+
intervalUnit: intervalUnitSchema
|
|
29683
|
+
}),
|
|
29684
|
+
object({
|
|
29685
|
+
kind: z$1.literal("deposit_plus_scheduled_instalments"),
|
|
29686
|
+
depositAmountCents: nonNegativeIntegerSchema,
|
|
29687
|
+
depositRefundability: depositRefundPolicySchema,
|
|
29688
|
+
instalmentCount: positiveIntegerSchema,
|
|
29689
|
+
intervalCount: positiveIntegerSchema,
|
|
29690
|
+
intervalUnit: intervalUnitSchema
|
|
29691
|
+
}),
|
|
29692
|
+
object({
|
|
29693
|
+
kind: z$1.literal("equal_scheduled_instalments"),
|
|
29694
|
+
instalmentCount: positiveIntegerSchema,
|
|
29695
|
+
intervalCount: positiveIntegerSchema,
|
|
29696
|
+
intervalUnit: intervalUnitSchema
|
|
29697
|
+
})
|
|
29698
|
+
]);
|
|
29699
|
+
}
|
|
29700
|
+
function createFlexibleBalanceSchemas(object) {
|
|
29701
|
+
const dueDateRule = z$1.discriminatedUnion("kind", [object({
|
|
29702
|
+
kind: z$1.literal("relative_to_start_date"),
|
|
29703
|
+
daysBeforeStart: positiveIntegerSchema
|
|
29704
|
+
}), object({
|
|
29705
|
+
kind: z$1.literal("fixed_calendar_date"),
|
|
29706
|
+
dueAt: z$1.string().datetime()
|
|
29707
|
+
})]);
|
|
29708
|
+
return {
|
|
29709
|
+
dueDateRule,
|
|
29710
|
+
config: object({
|
|
29711
|
+
upfrontAmountCents: nonNegativeIntegerSchema,
|
|
29712
|
+
dueDateRule,
|
|
29713
|
+
depositRefundability: depositRefundPolicySchema
|
|
29714
|
+
})
|
|
29715
|
+
};
|
|
29716
|
+
}
|
|
29717
|
+
const paymentOptionKindsMessages = {
|
|
29718
|
+
no_options: "Choose at least one way for customers to pay.",
|
|
29719
|
+
duplicate_kind: "Choose each payment option only once.",
|
|
29720
|
+
incompatible_collection_options: "Offer instalments or a deposit with the rest paid later, but not both."
|
|
29721
|
+
};
|
|
29722
|
+
function buildBookingPaymentOptionSchemas(object) {
|
|
29723
|
+
const instalmentPlan = createInstalmentPlanSchema(object);
|
|
29724
|
+
const flexibleBalance = createFlexibleBalanceSchemas(object);
|
|
29725
|
+
const paymentCollectionOption = z$1.discriminatedUnion("kind", [
|
|
29726
|
+
object({ kind: z$1.literal("upfront") }),
|
|
29727
|
+
object({ kind: z$1.literal("deferred_manual") }),
|
|
29728
|
+
object({
|
|
29729
|
+
kind: z$1.literal("instalment_plan"),
|
|
29730
|
+
plan: instalmentPlan
|
|
29731
|
+
}),
|
|
29732
|
+
object({
|
|
29733
|
+
kind: z$1.literal("flexible_balance"),
|
|
29734
|
+
config: flexibleBalance.config
|
|
29735
|
+
})
|
|
29736
|
+
]);
|
|
29737
|
+
const paymentTerms = object({ allowedOptions: z$1.array(paymentCollectionOption) }).superRefine(({ allowedOptions }, ctx) => {
|
|
29738
|
+
const result = validateBookingPaymentOptionKinds(allowedOptions.map(({ kind }) => kind));
|
|
29739
|
+
if (!result.ok) ctx.addIssue({
|
|
29740
|
+
code: "custom",
|
|
29741
|
+
path: ["allowedOptions"],
|
|
29742
|
+
message: paymentOptionKindsMessages[result.error]
|
|
29743
|
+
});
|
|
29744
|
+
});
|
|
29745
|
+
const paymentOptionsChoice = z$1.discriminatedUnion("source", [z$1.strictObject({ source: z$1.literal("default") }), z$1.strictObject({
|
|
29746
|
+
source: z$1.literal("custom"),
|
|
29747
|
+
paymentTerms
|
|
29748
|
+
})]);
|
|
29749
|
+
return {
|
|
29750
|
+
depositRefundPolicy: depositRefundPolicySchema,
|
|
29751
|
+
instalmentPlan,
|
|
29752
|
+
flexibleBalanceDueDateRule: flexibleBalance.dueDateRule,
|
|
29753
|
+
flexibleBalanceConfig: flexibleBalance.config,
|
|
29754
|
+
paymentCollectionOption,
|
|
29755
|
+
paymentTerms,
|
|
29756
|
+
paymentOptionsChoice
|
|
29757
|
+
};
|
|
29758
|
+
}
|
|
29759
|
+
function createBookingPaymentOptionSchemas(mode) {
|
|
29760
|
+
return mode === "strict" ? buildBookingPaymentOptionSchemas(strictObject) : buildBookingPaymentOptionSchemas(stripObject);
|
|
29761
|
+
}
|
|
29762
|
+
const bookingPaymentOptionSchemas = createBookingPaymentOptionSchemas("strip");
|
|
29763
|
+
bookingPaymentOptionSchemas.depositRefundPolicy;
|
|
29764
|
+
bookingPaymentOptionSchemas.instalmentPlan;
|
|
29765
|
+
bookingPaymentOptionSchemas.flexibleBalanceDueDateRule;
|
|
29766
|
+
bookingPaymentOptionSchemas.flexibleBalanceConfig;
|
|
29767
|
+
bookingPaymentOptionSchemas.paymentCollectionOption;
|
|
29768
|
+
const bookingPaymentTermsSchema = bookingPaymentOptionSchemas.paymentTerms;
|
|
29769
|
+
bookingPaymentOptionSchemas.paymentOptionsChoice;
|
|
29770
|
+
const blockBookingPaymentTermsSchema = bookingPaymentTermsSchema;
|
|
29716
29771
|
const blockBookingConsentSchema = z$1.object({
|
|
29717
29772
|
requirementId: z$1.string(),
|
|
29718
29773
|
title: z$1.string(),
|
|
@@ -30680,6 +30735,13 @@ const STRUCTURED_KEYS = /* @__PURE__ */ new Set([
|
|
|
30680
30735
|
"domainOperationProvider",
|
|
30681
30736
|
"domainOperationError",
|
|
30682
30737
|
"domainOperationMetadata",
|
|
30738
|
+
"previewDecision",
|
|
30739
|
+
"previewOutcome",
|
|
30740
|
+
"previewTokenTtlBucket",
|
|
30741
|
+
"previewRefreshCookiePresent",
|
|
30742
|
+
"previewDashboardStatus",
|
|
30743
|
+
"previewProviderResult",
|
|
30744
|
+
"previewUpstreamStatus",
|
|
30683
30745
|
"durationMs",
|
|
30684
30746
|
"duration",
|
|
30685
30747
|
"status",
|
|
@@ -38971,7 +39033,7 @@ const publicPassProductCollectionSchema = z$1.object({ passes: z$1.array(publicP
|
|
|
38971
39033
|
/**
|
|
38972
39034
|
* Public membership product for shop display
|
|
38973
39035
|
*/
|
|
38974
|
-
const
|
|
39036
|
+
const publicMembershipProductFields = {
|
|
38975
39037
|
id: z$1.string(),
|
|
38976
39038
|
name: z$1.string(),
|
|
38977
39039
|
description: z$1.string().nullable(),
|
|
@@ -38980,7 +39042,16 @@ const publicMembershipProductSchema = z$1.object({
|
|
|
38980
39042
|
billingInterval: z$1.enum(["month", "year"]),
|
|
38981
39043
|
eligibleCategoryIds: z$1.array(z$1.string()),
|
|
38982
39044
|
eligibleCategoryNames: z$1.array(z$1.string())
|
|
39045
|
+
};
|
|
39046
|
+
const purchasablePublicMembershipProductSchema = z$1.object({
|
|
39047
|
+
...publicMembershipProductFields,
|
|
39048
|
+
purchaseAvailability: z$1.literal("purchasable")
|
|
38983
39049
|
});
|
|
39050
|
+
const publicMembershipProductSchema = z$1.discriminatedUnion("purchaseAvailability", [purchasablePublicMembershipProductSchema, z$1.object({
|
|
39051
|
+
...publicMembershipProductFields,
|
|
39052
|
+
purchaseAvailability: z$1.literal("display_only"),
|
|
39053
|
+
unavailabilityReason: z$1.literal("online_payments_unavailable")
|
|
39054
|
+
})]);
|
|
38984
39055
|
const publicMembershipProductCollectionSchema = z$1.object({ memberships: z$1.array(publicMembershipProductSchema) });
|
|
38985
39056
|
//#endregion
|
|
38986
39057
|
//#region ../blocks/src/system/blocks/products/shared.ts
|
|
@@ -39221,7 +39292,7 @@ function buildPassesMembershipsDisplay(options) {
|
|
|
39221
39292
|
product: pass
|
|
39222
39293
|
} : {
|
|
39223
39294
|
kind: "unavailable",
|
|
39224
|
-
label: "Online purchasing
|
|
39295
|
+
label: "Online purchasing is unavailable."
|
|
39225
39296
|
}
|
|
39226
39297
|
};
|
|
39227
39298
|
});
|
|
@@ -39231,7 +39302,14 @@ function buildPassesMembershipsDisplay(options) {
|
|
|
39231
39302
|
description: options.showDescriptions ? membership.description : null,
|
|
39232
39303
|
priceLabel: formatCommercePrice(membership.price, membership.currency),
|
|
39233
39304
|
intervalLabel: formatInterval(membership.billingInterval),
|
|
39234
|
-
|
|
39305
|
+
action: membership.purchaseAvailability === "purchasable" ? {
|
|
39306
|
+
kind: "purchase",
|
|
39307
|
+
label: options.membershipActionLabel,
|
|
39308
|
+
product: membership
|
|
39309
|
+
} : {
|
|
39310
|
+
kind: "unavailable",
|
|
39311
|
+
label: "Online purchasing is unavailable."
|
|
39312
|
+
}
|
|
39235
39313
|
}));
|
|
39236
39314
|
return {
|
|
39237
39315
|
kind: "passes-memberships",
|
|
@@ -39451,7 +39529,14 @@ const membershipCardDisplaySchema = z$1.object({
|
|
|
39451
39529
|
description: z$1.string().nullable(),
|
|
39452
39530
|
priceLabel: z$1.string(),
|
|
39453
39531
|
intervalLabel: z$1.string(),
|
|
39454
|
-
|
|
39532
|
+
action: z$1.discriminatedUnion("kind", [z$1.object({
|
|
39533
|
+
kind: z$1.literal("purchase"),
|
|
39534
|
+
label: z$1.string(),
|
|
39535
|
+
product: purchasablePublicMembershipProductSchema
|
|
39536
|
+
}), z$1.object({
|
|
39537
|
+
kind: z$1.literal("unavailable"),
|
|
39538
|
+
label: z$1.string()
|
|
39539
|
+
})])
|
|
39455
39540
|
});
|
|
39456
39541
|
const passesMembershipsDisplaySchema = z$1.object({
|
|
39457
39542
|
kind: z$1.literal("passes-memberships"),
|
|
@@ -46031,11 +46116,11 @@ function ShopSSR({ blockId, siteId, apiBaseUrl, stage, children, checkoutEndpoin
|
|
|
46031
46116
|
}, pass.id)),
|
|
46032
46117
|
membershipCards: render.display.memberships.map((membership) => /* @__PURE__ */ jsx(MembershipCardView, {
|
|
46033
46118
|
display: membership,
|
|
46034
|
-
action: /* @__PURE__ */ jsx(ThemedButton, {
|
|
46119
|
+
action: membership.action.kind === "unavailable" ? /* @__PURE__ */ jsx(PassPurchaseUnavailable, { label: membership.action.label }) : /* @__PURE__ */ jsx(ThemedButton, {
|
|
46035
46120
|
type: "button",
|
|
46036
46121
|
variant: render.hydration.buttonVariant,
|
|
46037
46122
|
size: "md",
|
|
46038
|
-
label: membership.
|
|
46123
|
+
label: membership.action.label,
|
|
46039
46124
|
disabled: true,
|
|
46040
46125
|
"aria-disabled": "true"
|
|
46041
46126
|
})
|
|
@@ -80283,7 +80368,8 @@ const CLIENT_ERROR_REPORT_LIMITS = {
|
|
|
80283
80368
|
stack: 8e3,
|
|
80284
80369
|
digest: 128,
|
|
80285
80370
|
componentStack: 8e3,
|
|
80286
|
-
sourceLocation: 1024
|
|
80371
|
+
sourceLocation: 1024,
|
|
80372
|
+
navigationAgeMs: 6e4
|
|
80287
80373
|
};
|
|
80288
80374
|
const clientErrorEventSchema = z$1.enum([
|
|
80289
80375
|
"dashboard:route-error",
|
|
@@ -80300,7 +80386,17 @@ z$1.object({
|
|
|
80300
80386
|
stack: z$1.string().max(CLIENT_ERROR_REPORT_LIMITS.stack).nullable(),
|
|
80301
80387
|
digest: z$1.string().max(CLIENT_ERROR_REPORT_LIMITS.digest).nullable(),
|
|
80302
80388
|
componentStack: z$1.string().max(CLIENT_ERROR_REPORT_LIMITS.componentStack).nullable(),
|
|
80303
|
-
sourceLocation: z$1.string().max(CLIENT_ERROR_REPORT_LIMITS.sourceLocation).nullable()
|
|
80389
|
+
sourceLocation: z$1.string().max(CLIENT_ERROR_REPORT_LIMITS.sourceLocation).nullable(),
|
|
80390
|
+
navigation: z$1.object({
|
|
80391
|
+
fromPathname: z$1.string().regex(/^\/[^?#]*$/).max(CLIENT_ERROR_REPORT_LIMITS.pathname),
|
|
80392
|
+
toPathname: z$1.string().regex(/^\/[^?#]*$/).max(CLIENT_ERROR_REPORT_LIMITS.pathname),
|
|
80393
|
+
type: z$1.enum([
|
|
80394
|
+
"push",
|
|
80395
|
+
"replace",
|
|
80396
|
+
"traverse"
|
|
80397
|
+
]),
|
|
80398
|
+
ageMs: z$1.number().int().min(0).max(CLIENT_ERROR_REPORT_LIMITS.navigationAgeMs)
|
|
80399
|
+
}).strict().nullable().optional()
|
|
80304
80400
|
}).strict();
|
|
80305
80401
|
({
|
|
80306
80402
|
...SITE_LIFECYCLE_ENDPOINT_DEFINITIONS,
|
|
@@ -81191,6 +81287,7 @@ const CANONICAL_REFUND_PLANNER_ERROR_CODES = [
|
|
|
81191
81287
|
"refund_failed"
|
|
81192
81288
|
];
|
|
81193
81289
|
const CANONICAL_ADMIN_REFUND_FAILURE_CODES = [
|
|
81290
|
+
"refund_blocked_by_live_payment_terms",
|
|
81194
81291
|
...CANONICAL_REFUND_PLANNER_ERROR_CODES,
|
|
81195
81292
|
"payment_intent_not_found",
|
|
81196
81293
|
"stripe_error",
|
|
@@ -81206,6 +81303,7 @@ const CANONICAL_ADMIN_REFUND_FAILURE_CODES = [
|
|
|
81206
81303
|
//#endregion
|
|
81207
81304
|
//#region ../api/src/bookingRefundOutcomes.ts
|
|
81208
81305
|
const STANDARD_LINE_ITEM_REFUND_INVALID_CODES = [
|
|
81306
|
+
"refund_blocked_by_live_payment_terms",
|
|
81209
81307
|
"missing_amount",
|
|
81210
81308
|
"invalid_amount",
|
|
81211
81309
|
"amount_exceeds_remaining",
|
|
@@ -81598,68 +81696,6 @@ function parsePublicProductCategorySelector(value) {
|
|
|
81598
81696
|
}
|
|
81599
81697
|
z$1.enum(["public", "unlisted"], { error: "visibility must be 'public' or 'unlisted'" });
|
|
81600
81698
|
//#endregion
|
|
81601
|
-
//#region ../api/src/bookingPaymentTermSchemas.ts
|
|
81602
|
-
const bookingDepositRefundPolicySchema = z$1.enum(["refundable", "non_refundable"]);
|
|
81603
|
-
const bookingInstalmentPlanSchema = z$1.discriminatedUnion("kind", [
|
|
81604
|
-
z$1.object({
|
|
81605
|
-
kind: z$1.literal("deposit_plus_one_remainder"),
|
|
81606
|
-
depositAmountCents: z$1.number().int().nonnegative(),
|
|
81607
|
-
depositRefundability: bookingDepositRefundPolicySchema,
|
|
81608
|
-
remainderDueCount: z$1.number().int().positive(),
|
|
81609
|
-
intervalUnit: z$1.enum([
|
|
81610
|
-
"day",
|
|
81611
|
-
"week",
|
|
81612
|
-
"month"
|
|
81613
|
-
])
|
|
81614
|
-
}),
|
|
81615
|
-
z$1.object({
|
|
81616
|
-
kind: z$1.literal("deposit_plus_scheduled_instalments"),
|
|
81617
|
-
depositAmountCents: z$1.number().int().nonnegative(),
|
|
81618
|
-
depositRefundability: bookingDepositRefundPolicySchema,
|
|
81619
|
-
instalmentCount: z$1.number().int().positive(),
|
|
81620
|
-
intervalCount: z$1.number().int().positive(),
|
|
81621
|
-
intervalUnit: z$1.enum([
|
|
81622
|
-
"day",
|
|
81623
|
-
"week",
|
|
81624
|
-
"month"
|
|
81625
|
-
])
|
|
81626
|
-
}),
|
|
81627
|
-
z$1.object({
|
|
81628
|
-
kind: z$1.literal("equal_scheduled_instalments"),
|
|
81629
|
-
instalmentCount: z$1.number().int().positive(),
|
|
81630
|
-
intervalCount: z$1.number().int().positive(),
|
|
81631
|
-
intervalUnit: z$1.enum([
|
|
81632
|
-
"day",
|
|
81633
|
-
"week",
|
|
81634
|
-
"month"
|
|
81635
|
-
])
|
|
81636
|
-
})
|
|
81637
|
-
]);
|
|
81638
|
-
const bookingFlexibleBalanceDueDateRuleSchema = z$1.discriminatedUnion("kind", [z$1.object({
|
|
81639
|
-
kind: z$1.literal("relative_to_start_date"),
|
|
81640
|
-
daysBeforeStart: z$1.number().int().positive()
|
|
81641
|
-
}), z$1.object({
|
|
81642
|
-
kind: z$1.literal("fixed_calendar_date"),
|
|
81643
|
-
dueAt: z$1.string().datetime()
|
|
81644
|
-
})]);
|
|
81645
|
-
const bookingFlexibleBalanceConfigSchema = z$1.object({
|
|
81646
|
-
upfrontAmountCents: z$1.number().int().nonnegative(),
|
|
81647
|
-
dueDateRule: bookingFlexibleBalanceDueDateRuleSchema,
|
|
81648
|
-
depositRefundability: bookingDepositRefundPolicySchema
|
|
81649
|
-
});
|
|
81650
|
-
z$1.discriminatedUnion("kind", [
|
|
81651
|
-
z$1.object({ kind: z$1.literal("upfront") }),
|
|
81652
|
-
z$1.object({ kind: z$1.literal("deferred_manual") }),
|
|
81653
|
-
z$1.object({
|
|
81654
|
-
kind: z$1.literal("instalment_plan"),
|
|
81655
|
-
plan: bookingInstalmentPlanSchema
|
|
81656
|
-
}),
|
|
81657
|
-
z$1.object({
|
|
81658
|
-
kind: z$1.literal("flexible_balance"),
|
|
81659
|
-
config: bookingFlexibleBalanceConfigSchema
|
|
81660
|
-
})
|
|
81661
|
-
]);
|
|
81662
|
-
//#endregion
|
|
81663
81699
|
//#region ../api/src/navigationMenuValidation.ts
|
|
81664
81700
|
function hasChildren(item) {
|
|
81665
81701
|
return Array.isArray(item.children) && item.children.length > 0;
|