@riverbankcms/sdk 0.85.0 → 0.89.1
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/dist/{PreviewEditorSidebar-4PH35ZIE.mjs → PreviewEditorSidebar-JDR64FEC.mjs} +3 -3
- package/dist/{PreviewEditorUI-WHMCRJGM.mjs → PreviewEditorUI-67TMJMAF.mjs} +3 -3
- package/dist/SdkPreviewModeRuntime-ZBEMRV7N.mjs +8 -0
- package/dist/_dts/api/src/accessAdmin.d.ts +7 -0
- package/dist/_dts/api/src/endpoints.d.ts +66 -14
- package/dist/_dts/api/src/index.d.ts +5 -2
- package/dist/_dts/api/src/launchReadiness.d.ts +3 -3
- package/dist/_dts/api/src/mailchimpIntegration.d.ts +215 -0
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +35 -15
- package/dist/_dts/api/src/siteInfrastructure.d.ts +0 -14
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +5 -1
- package/dist/_dts/api/src/siteMembers.d.ts +6 -1
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +1 -13
- package/dist/_dts/api/src/types.d.ts +7 -4
- package/dist/_dts/blocks/src/PageRenderer.d.ts +1 -0
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +4 -0
- package/dist/_dts/blocks/src/index.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/cart.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/collection.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +42 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +4 -0
- package/dist/_dts/blocks/src/system/blocks/faq.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +42 -42
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup-destination.d.ts +300 -0
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +63 -3
- package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +288 -288
- package/dist/_dts/blocks/src/system/fragments/library/newsletterForm.d.ts +53 -1
- package/dist/_dts/blocks/src/system/icons/cta.d.ts +3 -3
- package/dist/_dts/blocks/src/system/icons/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/icons/registry.d.ts +2 -2
- package/dist/_dts/blocks/src/system/icons/semantic.d.ts +3 -3
- package/dist/_dts/blocks/src/system/icons/svg.d.ts +72 -0
- package/dist/_dts/blocks/src/system/manifest/richTextSchema.d.ts +27 -0
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +23 -23
- package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +11 -2
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +12 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/loadStateError.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableDates.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableDates.state.d.ts +55 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableSlots.state.d.ts +39 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useBookingFormConfig.d.ts +4 -27
- package/dist/_dts/blocks/src/system/runtime/hooks/useBookingFormConfig.state.d.ts +40 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +20 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useEventFilters.state.d.ts +31 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useEventPagination.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/hooks/useEventPagination.state.d.ts +39 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventPaginatedListView.client.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +11 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.client.state.d.ts +24 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.interactive.d.ts +15 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.submission.d.ts +32 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +5 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/MagicLinkForm.state.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/ModalShell.d.ts +5 -1
- package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.state.d.ts +35 -0
- package/dist/_dts/blocks/src/system/runtime/shared/utils/formatting.d.ts +1 -1
- package/dist/_dts/content-model/src/entry-slots/types.d.ts +54 -0
- package/dist/_dts/content-model/src/referenceFields.d.ts +1 -1
- package/dist/_dts/core/src/branded.d.ts +7 -0
- package/dist/_dts/core/src/currency-format.d.ts +37 -2
- package/dist/_dts/core/src/event-pricing.d.ts +24 -0
- package/dist/_dts/core/src/index.d.ts +1 -0
- package/dist/_dts/core/src/site-route-target.d.ts +40 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +705 -17
- package/dist/_dts/editor-blocks/src/widgets/reference/loaders.d.ts +3 -1
- package/dist/_dts/media-core/src/fileDomain.d.ts +4 -0
- package/dist/_dts/sdk/src/client/runtimeCachePolicy.d.ts +160 -0
- package/dist/_dts/sdk/src/client/types.d.ts +35 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +3 -0
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +3 -0
- package/dist/_dts/sdk/src/data/prefetchBlockData.d.ts +3 -9
- package/dist/_dts/sdk/src/index.d.ts +3 -1
- package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +1 -1
- package/dist/_dts/sdk/src/manifest/three-pass-converter.d.ts +7 -18
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +3 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +7 -3
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +4 -24
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +45 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +9 -9
- package/dist/_dts/theme-core/src/schema.d.ts +11 -11
- package/dist/{chunk-PYDHOMEO.mjs → chunk-7N46MZHI.mjs} +1 -1
- package/dist/{chunk-ZR2GQK2A.mjs → chunk-7YUAXONX.mjs} +1880 -588
- package/dist/{chunk-4QNLOTES.mjs → chunk-F645A5UV.mjs} +76 -14
- package/dist/{chunk-OCGTXHSO.mjs → chunk-HKJQERFR.mjs} +7 -7
- package/dist/{chunk-NFWGLRZZ.mjs → chunk-TGBJWKMP.mjs} +37 -3
- package/dist/{chunk-WFPYN7KA.mjs → chunk-ZQRBLCW5.mjs} +2 -2
- package/dist/cli/index.mjs +1075 -126
- package/dist/client/{accordion-2UZPBMYM.mjs → accordion-MUCVNGQ7.mjs} +2 -2
- package/dist/client/{bookingForm-36CWQUMV.mjs → bookingForm-PKD6EFIE.mjs} +193 -77
- package/dist/client/bookings.mjs +487 -197
- package/dist/client/{carousel-QH77HR6X.mjs → carousel-3TKQSNJC.mjs} +4 -3
- package/dist/client/cart-6XHSZK23.mjs +19 -0
- package/dist/client/checkout-FVSPM6FI.mjs +19 -0
- package/dist/client/{chunk-ZE5G642V.mjs → chunk-25W2EQUN.mjs} +75 -1
- package/dist/client/chunk-6N7YRNYU.mjs +183 -0
- package/dist/client/{chunk-4OXKTA3D.mjs → chunk-7DH35FGA.mjs} +2 -2
- package/dist/client/{chunk-3C2VTPWI.mjs → chunk-CQKKFEQD.mjs} +363 -66
- package/dist/client/{chunk-7UCLJ5SP.mjs → chunk-EY42X22F.mjs} +4 -7
- package/dist/client/{chunk-SYIJ5JO2.mjs → chunk-FHU6PFPM.mjs} +1 -1
- package/dist/client/{chunk-ZKUO52W3.mjs → chunk-LQFDYWPJ.mjs} +1 -1
- package/dist/client/chunk-RSQWWUAD.mjs +390 -0
- package/dist/client/{chunk-UDNSI5PY.mjs → chunk-STJ2NCQM.mjs} +2 -3
- package/dist/client/{chunk-VGDBVNOO.mjs → chunk-UQFY4AHX.mjs} +511 -406
- package/dist/client/{chunk-F5VRX5Y6.mjs → chunk-VGLXACVK.mjs} +1 -1
- package/dist/client/{chunk-DVNUDUVT.mjs → chunk-WBQG7VJA.mjs} +4 -1
- package/dist/client/{chunk-52CGCQ7B.mjs → chunk-ZJZZA5EP.mjs} +10 -80
- package/dist/client/{chunk-XSV6KW4D.mjs → chunk-ZT5XE7FK.mjs} +1 -1
- package/dist/client/client.mjs +5820 -4782
- package/dist/client/{courseRegistration-TMKU6ABO.mjs → courseRegistration-ATZSYDHM.mjs} +7 -7
- package/dist/client/{eventCalendar-G6TI32X6.mjs → eventCalendar-6T2UGKKP.mjs} +11 -11
- package/dist/client/{eventCombined-SCKEMNAR.mjs → eventCombined-Q4VANXVF.mjs} +11 -11
- package/dist/client/{eventDetails-XPIFXXPK.mjs → eventDetails-DW37E7VW.mjs} +11 -11
- package/dist/client/{eventListing-7QFMEMGT.mjs → eventListing-XURTSAUW.mjs} +11 -11
- package/dist/client/{eventRegistration-TOODSZUI.mjs → eventRegistration-MRKEVAXW.mjs} +11 -11
- package/dist/client/{form-MTCMVCZT.mjs → form-WZZFFGMU.mjs} +3 -3
- package/dist/client/{headerSection-Y5TMR3TW.mjs → headerSection-EQYVQBLM.mjs} +4 -4
- package/dist/client/hooks.mjs +1700 -1412
- package/dist/client/{locationMap-RH2LG7FZ.mjs → locationMap-MFF5VAZR.mjs} +3 -4
- package/dist/client/{newsletterForm-PCAIPFMA.mjs → newsletterForm-JQ77UYIE.mjs} +127 -43
- package/dist/client/{productDetail-OIGDR4YE.mjs → productDetail-25LMT3IZ.mjs} +9 -9
- package/dist/client/{productList-4MA5S2CX.mjs → productList-5ABEMKUG.mjs} +9 -9
- package/dist/client/rendering/client.mjs +3884 -3722
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +6774 -6331
- package/dist/client/shop-OMMQZ6YO.mjs +21 -0
- package/dist/preview-next/before-render.mjs +76 -14
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/preview-next/editor-chrome.css +56 -9
- package/dist/preview-next/middleware.mjs +76 -14
- package/dist/{sdk-runtime-QLOCYKVU.mjs → sdk-runtime-WNLBZ3ZH.mjs} +6 -6
- package/dist/server/components.mjs +2579 -2548
- package/dist/server/config-validation.mjs +1737 -1461
- package/dist/server/config.mjs +1737 -1461
- package/dist/server/data.mjs +1701 -1413
- package/dist/server/index.mjs +1048 -400
- package/dist/server/next.mjs +3602 -2858
- package/dist/server/page-converter.mjs +2193 -1169
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +2770 -2742
- package/dist/server/rendering.mjs +2961 -2886
- package/dist/server/routing.mjs +2186 -1508
- package/dist/server/server.mjs +2237 -1287
- package/dist/server/theme-bridge.mjs +260 -0
- package/dist/styles/index.css +258 -0
- package/package.json +2 -1
- package/dist/SdkPreviewModeRuntime-4FGSVUYI.mjs +0 -8
- package/dist/client/cart-X4YK4FTW.mjs +0 -19
- package/dist/client/checkout-OM2BEPWD.mjs +0 -19
- package/dist/client/chunk-3DTWLTXM.mjs +0 -204
- package/dist/client/chunk-I2MMZO53.mjs +0 -6
- package/dist/client/shop-WXSYV5QO.mjs +0 -21
package/dist/server/server.mjs
CHANGED
|
@@ -806,6 +806,64 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
806
806
|
auth: "user",
|
|
807
807
|
responseKind: "json"
|
|
808
808
|
},
|
|
809
|
+
listMailchimpAudiences: {
|
|
810
|
+
path: "/sites/{siteId}/integrations/mailchimp/audiences",
|
|
811
|
+
method: "GET",
|
|
812
|
+
tags: [TAG_TEMPLATES.site],
|
|
813
|
+
auth: "user",
|
|
814
|
+
responseKind: "json",
|
|
815
|
+
errors: ["auth:forbidden", "server:internal_error"]
|
|
816
|
+
},
|
|
817
|
+
getMailchimpSignupSyncHealth: {
|
|
818
|
+
path: "/sites/{siteId}/integrations/mailchimp/signup-sync-health",
|
|
819
|
+
method: "GET",
|
|
820
|
+
tags: [TAG_TEMPLATES.site],
|
|
821
|
+
auth: "user",
|
|
822
|
+
responseKind: "json",
|
|
823
|
+
errors: ["auth:forbidden", "server:internal_error"]
|
|
824
|
+
},
|
|
825
|
+
getMailchimpConnection: {
|
|
826
|
+
path: "/sites/{siteId}/integrations/mailchimp/connection",
|
|
827
|
+
method: "GET",
|
|
828
|
+
tags: [TAG_TEMPLATES.site],
|
|
829
|
+
auth: "user",
|
|
830
|
+
responseKind: "json",
|
|
831
|
+
errors: ["auth:forbidden", "server:internal_error"]
|
|
832
|
+
},
|
|
833
|
+
startMailchimpOAuth: {
|
|
834
|
+
path: "/sites/{siteId}/integrations/mailchimp/oauth/start",
|
|
835
|
+
method: "POST",
|
|
836
|
+
tags: [TAG_TEMPLATES.site],
|
|
837
|
+
auth: "user",
|
|
838
|
+
responseKind: "json",
|
|
839
|
+
demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
|
|
840
|
+
errors: ["auth:forbidden", "validation:invalid_input", "server:internal_error"]
|
|
841
|
+
},
|
|
842
|
+
refreshMailchimpAudiences: {
|
|
843
|
+
path: "/sites/{siteId}/integrations/mailchimp/audiences/refresh",
|
|
844
|
+
method: "POST",
|
|
845
|
+
tags: [TAG_TEMPLATES.site],
|
|
846
|
+
auth: "user",
|
|
847
|
+
responseKind: "json",
|
|
848
|
+
demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
|
|
849
|
+
errors: ["auth:forbidden", "server:internal_error"]
|
|
850
|
+
},
|
|
851
|
+
disconnectMailchimp: {
|
|
852
|
+
path: "/sites/{siteId}/integrations/mailchimp/disconnect",
|
|
853
|
+
method: "POST",
|
|
854
|
+
tags: [TAG_TEMPLATES.site],
|
|
855
|
+
auth: "user",
|
|
856
|
+
responseKind: "json",
|
|
857
|
+
demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
|
|
858
|
+
errors: ["auth:forbidden", "server:internal_error"]
|
|
859
|
+
},
|
|
860
|
+
mailchimpOAuthCallback: {
|
|
861
|
+
path: "/auth/mailchimp/callback",
|
|
862
|
+
method: "GET",
|
|
863
|
+
auth: "public",
|
|
864
|
+
responseKind: "void",
|
|
865
|
+
errors: []
|
|
866
|
+
},
|
|
809
867
|
createNewsletterList: {
|
|
810
868
|
path: "/sites/{siteId}/newsletter/lists",
|
|
811
869
|
method: "POST",
|
|
@@ -1807,6 +1865,24 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
1807
1865
|
auth: "user",
|
|
1808
1866
|
responseKind: "json"
|
|
1809
1867
|
},
|
|
1868
|
+
resendSiteInvitation: {
|
|
1869
|
+
path: "/sites/{siteId}/members/invitations/{invitationId}/resend",
|
|
1870
|
+
method: "POST",
|
|
1871
|
+
errors: [
|
|
1872
|
+
"auth:forbidden",
|
|
1873
|
+
"resource:not_found",
|
|
1874
|
+
"validation:invalid_input",
|
|
1875
|
+
"external:service_error",
|
|
1876
|
+
"server:internal_error"
|
|
1877
|
+
],
|
|
1878
|
+
tags: [
|
|
1879
|
+
"site-{siteId}",
|
|
1880
|
+
"site-members-{siteId}",
|
|
1881
|
+
"site-invite-{invitationId}"
|
|
1882
|
+
],
|
|
1883
|
+
auth: "user",
|
|
1884
|
+
responseKind: "json"
|
|
1885
|
+
},
|
|
1810
1886
|
transferSiteOwnership: {
|
|
1811
1887
|
path: "/sites/{siteId}/members/transfer-ownership",
|
|
1812
1888
|
method: "POST",
|
|
@@ -3030,20 +3106,6 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
3030
3106
|
auth: "user",
|
|
3031
3107
|
responseKind: "json"
|
|
3032
3108
|
},
|
|
3033
|
-
instagramUploadZip: {
|
|
3034
|
-
path: "/instagram/upload-zip",
|
|
3035
|
-
method: "POST",
|
|
3036
|
-
tags: ["instagram-import"],
|
|
3037
|
-
auth: "user",
|
|
3038
|
-
responseKind: "json"
|
|
3039
|
-
},
|
|
3040
|
-
createInstagramZipUploadUrl: {
|
|
3041
|
-
path: "/instagram/upload-zip-url",
|
|
3042
|
-
method: "POST",
|
|
3043
|
-
tags: ["instagram-import"],
|
|
3044
|
-
auth: "user",
|
|
3045
|
-
responseKind: "json"
|
|
3046
|
-
},
|
|
3047
3109
|
getAnalyticsReport: {
|
|
3048
3110
|
path: "/sites/{siteId}/analytics/report",
|
|
3049
3111
|
method: "GET",
|
|
@@ -6998,7 +7060,7 @@ var SimpleCache = class {
|
|
|
6998
7060
|
};
|
|
6999
7061
|
|
|
7000
7062
|
// src/version.ts
|
|
7001
|
-
var SDK_VERSION = "0.
|
|
7063
|
+
var SDK_VERSION = "0.89.1";
|
|
7002
7064
|
|
|
7003
7065
|
// src/client/error.ts
|
|
7004
7066
|
var RiverbankApiError = class _RiverbankApiError extends Error {
|
|
@@ -7155,6 +7217,476 @@ function attachResilienceStatusToError(error, resilienceStatus) {
|
|
|
7155
7217
|
return target;
|
|
7156
7218
|
}
|
|
7157
7219
|
|
|
7220
|
+
// src/public-api/runtime.ts
|
|
7221
|
+
var PUBLIC_ENDPOINT_NAMES2 = [
|
|
7222
|
+
"getSite",
|
|
7223
|
+
"getContentByPath",
|
|
7224
|
+
"listPublishedEntries",
|
|
7225
|
+
"getPublishedEntryPreview",
|
|
7226
|
+
"getPublicFormById",
|
|
7227
|
+
"listPublicForms",
|
|
7228
|
+
"getPublicBookingServices",
|
|
7229
|
+
"getPublicChallenge",
|
|
7230
|
+
"listPublicEvents",
|
|
7231
|
+
"batchBlockLoaders",
|
|
7232
|
+
"listPublicCourses",
|
|
7233
|
+
"listPublicTeamMembers",
|
|
7234
|
+
"listPublicProducts",
|
|
7235
|
+
"listPublicPasses",
|
|
7236
|
+
"listPublicMemberships",
|
|
7237
|
+
"resolveEntrySubroute",
|
|
7238
|
+
"resolveEventOccurrence",
|
|
7239
|
+
"checkRedirect",
|
|
7240
|
+
"getRoutableContent",
|
|
7241
|
+
"getPublicRoutableContent",
|
|
7242
|
+
"getPublicSitemapRoutes"
|
|
7243
|
+
];
|
|
7244
|
+
var API_ENDPOINTS2 = Object.freeze({
|
|
7245
|
+
getSite: {
|
|
7246
|
+
path: "/sites",
|
|
7247
|
+
method: "GET",
|
|
7248
|
+
revalidate: 900,
|
|
7249
|
+
tags: ["riverbank:site", "riverbank:site:id:{id}", "riverbank:site:slug:{slug}", "riverbank:site:domain:{domain}"],
|
|
7250
|
+
auth: "public",
|
|
7251
|
+
responseKind: "json"
|
|
7252
|
+
},
|
|
7253
|
+
getContentByPath: {
|
|
7254
|
+
path: "/sites/{siteId}/pages",
|
|
7255
|
+
method: "GET",
|
|
7256
|
+
tags: ["riverbank:site:{siteId}:routable-content"],
|
|
7257
|
+
auth: "public",
|
|
7258
|
+
responseKind: "json"
|
|
7259
|
+
},
|
|
7260
|
+
listPublishedEntries: {
|
|
7261
|
+
path: "/public/content/{siteId}/{type}/entries",
|
|
7262
|
+
method: "GET",
|
|
7263
|
+
revalidate: 60,
|
|
7264
|
+
tags: ["content-{siteId}-{type}"],
|
|
7265
|
+
auth: "public",
|
|
7266
|
+
responseKind: "json"
|
|
7267
|
+
},
|
|
7268
|
+
getPublishedEntryPreview: {
|
|
7269
|
+
path: "/public/content/{siteId}/{type}/{slug}/preview",
|
|
7270
|
+
method: "GET",
|
|
7271
|
+
revalidate: 60,
|
|
7272
|
+
tags: ["content-{siteId}-{type}-{slug}"],
|
|
7273
|
+
auth: "public",
|
|
7274
|
+
responseKind: "json"
|
|
7275
|
+
},
|
|
7276
|
+
getPublicFormById: {
|
|
7277
|
+
path: "/public/forms/{formId}",
|
|
7278
|
+
method: "GET",
|
|
7279
|
+
revalidate: 60,
|
|
7280
|
+
tags: ["riverbank:form:{formId}"],
|
|
7281
|
+
auth: "public",
|
|
7282
|
+
responseKind: "json"
|
|
7283
|
+
},
|
|
7284
|
+
listPublicForms: {
|
|
7285
|
+
path: "/public/sites/{siteId}/forms",
|
|
7286
|
+
method: "GET",
|
|
7287
|
+
revalidate: 60,
|
|
7288
|
+
tags: ["riverbank:site:{siteId}:forms"],
|
|
7289
|
+
auth: "public",
|
|
7290
|
+
responseKind: "json"
|
|
7291
|
+
},
|
|
7292
|
+
getPublicBookingServices: {
|
|
7293
|
+
path: "/public/bookings/services",
|
|
7294
|
+
method: "GET",
|
|
7295
|
+
revalidate: 60,
|
|
7296
|
+
tags: ["site-{siteId}"],
|
|
7297
|
+
auth: "public",
|
|
7298
|
+
responseKind: "json"
|
|
7299
|
+
},
|
|
7300
|
+
getPublicChallenge: {
|
|
7301
|
+
path: "/public/challenge",
|
|
7302
|
+
method: "GET",
|
|
7303
|
+
auth: "public",
|
|
7304
|
+
responseKind: "text"
|
|
7305
|
+
},
|
|
7306
|
+
listPublicEvents: {
|
|
7307
|
+
path: "/public/sites/{siteId}/events",
|
|
7308
|
+
method: "GET",
|
|
7309
|
+
revalidate: 60,
|
|
7310
|
+
tags: ["riverbank:site:{siteId}:public-events"],
|
|
7311
|
+
auth: "public",
|
|
7312
|
+
responseKind: "json"
|
|
7313
|
+
},
|
|
7314
|
+
batchBlockLoaders: {
|
|
7315
|
+
path: "/public/sites/{siteId}/block-loaders/batch",
|
|
7316
|
+
method: "POST",
|
|
7317
|
+
auth: "public",
|
|
7318
|
+
responseKind: "json"
|
|
7319
|
+
},
|
|
7320
|
+
listPublicCourses: {
|
|
7321
|
+
path: "/public/sites/{siteId}/courses",
|
|
7322
|
+
method: "GET",
|
|
7323
|
+
revalidate: 60,
|
|
7324
|
+
tags: ["riverbank:site:{siteId}:public-courses"],
|
|
7325
|
+
auth: "public",
|
|
7326
|
+
responseKind: "json"
|
|
7327
|
+
},
|
|
7328
|
+
listPublicTeamMembers: {
|
|
7329
|
+
path: "/public/sites/{siteId}/team-members",
|
|
7330
|
+
method: "GET",
|
|
7331
|
+
revalidate: 60,
|
|
7332
|
+
tags: ["riverbank:site:{siteId}:public-team-members"],
|
|
7333
|
+
auth: "public",
|
|
7334
|
+
responseKind: "json"
|
|
7335
|
+
},
|
|
7336
|
+
listPublicProducts: {
|
|
7337
|
+
path: "/public/sites/{siteId}/products",
|
|
7338
|
+
method: "GET",
|
|
7339
|
+
revalidate: 300,
|
|
7340
|
+
tags: ["riverbank:site:{siteId}:public-products"],
|
|
7341
|
+
auth: "public",
|
|
7342
|
+
responseKind: "json"
|
|
7343
|
+
},
|
|
7344
|
+
listPublicPasses: {
|
|
7345
|
+
path: "/public/sites/{siteId}/bookings/products/passes",
|
|
7346
|
+
method: "GET",
|
|
7347
|
+
revalidate: 300,
|
|
7348
|
+
tags: ["riverbank:site:{siteId}:public-passes"],
|
|
7349
|
+
auth: "public",
|
|
7350
|
+
responseKind: "json"
|
|
7351
|
+
},
|
|
7352
|
+
listPublicMemberships: {
|
|
7353
|
+
path: "/public/sites/{siteId}/bookings/products/memberships",
|
|
7354
|
+
method: "GET",
|
|
7355
|
+
revalidate: 300,
|
|
7356
|
+
tags: ["riverbank:site:{siteId}:public-memberships"],
|
|
7357
|
+
auth: "public",
|
|
7358
|
+
responseKind: "json"
|
|
7359
|
+
},
|
|
7360
|
+
resolveEntrySubroute: {
|
|
7361
|
+
path: "/public/sites/{siteId}/routing/subroutes/resolve",
|
|
7362
|
+
method: "GET",
|
|
7363
|
+
revalidate: 60,
|
|
7364
|
+
tags: ["site-{siteId}", "entry-subroute"],
|
|
7365
|
+
auth: "public",
|
|
7366
|
+
responseKind: "json"
|
|
7367
|
+
},
|
|
7368
|
+
resolveEventOccurrence: {
|
|
7369
|
+
path: "/public/sites/{siteId}/events/occurrences/resolve",
|
|
7370
|
+
method: "GET",
|
|
7371
|
+
revalidate: 60,
|
|
7372
|
+
tags: ["riverbank:site:{siteId}:public-events", "event-occurrence"],
|
|
7373
|
+
auth: "public",
|
|
7374
|
+
responseKind: "json"
|
|
7375
|
+
},
|
|
7376
|
+
checkRedirect: {
|
|
7377
|
+
path: "/public/content/redirect",
|
|
7378
|
+
method: "GET",
|
|
7379
|
+
revalidate: 86400,
|
|
7380
|
+
tags: ["redirect"],
|
|
7381
|
+
auth: "public",
|
|
7382
|
+
responseKind: "json"
|
|
7383
|
+
},
|
|
7384
|
+
getRoutableContent: {
|
|
7385
|
+
path: "/sites/{siteId}/routable-content",
|
|
7386
|
+
method: "GET",
|
|
7387
|
+
revalidate: 60,
|
|
7388
|
+
tags: ["riverbank:site:{siteId}:routable-content"],
|
|
7389
|
+
auth: "user",
|
|
7390
|
+
responseKind: "json"
|
|
7391
|
+
},
|
|
7392
|
+
getPublicRoutableContent: {
|
|
7393
|
+
path: "/public/sites/{siteId}/routable-content",
|
|
7394
|
+
method: "GET",
|
|
7395
|
+
revalidate: 60,
|
|
7396
|
+
tags: ["riverbank:site:{siteId}:routable-content"],
|
|
7397
|
+
auth: "public",
|
|
7398
|
+
responseKind: "json"
|
|
7399
|
+
},
|
|
7400
|
+
getPublicSitemapRoutes: {
|
|
7401
|
+
path: "/public/sites/{siteId}/sitemap",
|
|
7402
|
+
method: "GET",
|
|
7403
|
+
revalidate: 60,
|
|
7404
|
+
tags: ["riverbank:site:{siteId}:routable-content", "riverbank:site:{siteId}:settings"],
|
|
7405
|
+
auth: "public",
|
|
7406
|
+
responseKind: "json"
|
|
7407
|
+
}
|
|
7408
|
+
});
|
|
7409
|
+
|
|
7410
|
+
// src/client/runtimeCachePolicy.ts
|
|
7411
|
+
var DEFAULT_PUBLISHED_RUNTIME_CACHE_PAYLOAD_SCHEMA_VERSION = 1;
|
|
7412
|
+
var DEFAULT_STALE_TTL_SEC = 24 * 60 * 60;
|
|
7413
|
+
var DEFAULT_MEMORY_TTL_SEC = 60;
|
|
7414
|
+
var RUNTIME_CACHE_DURABILITY_OVERRIDES = {
|
|
7415
|
+
getSite: {
|
|
7416
|
+
kind: "durable-public-stale",
|
|
7417
|
+
staleTtlSec: DEFAULT_STALE_TTL_SEC
|
|
7418
|
+
},
|
|
7419
|
+
getContentByPath: {
|
|
7420
|
+
kind: "durable-public-stale",
|
|
7421
|
+
staleTtlSec: DEFAULT_STALE_TTL_SEC
|
|
7422
|
+
},
|
|
7423
|
+
listPublishedEntries: {
|
|
7424
|
+
kind: "memory-only",
|
|
7425
|
+
reason: "durable_rollout_pending"
|
|
7426
|
+
},
|
|
7427
|
+
getPublishedEntryPreview: {
|
|
7428
|
+
kind: "memory-only",
|
|
7429
|
+
reason: "durable_rollout_pending"
|
|
7430
|
+
},
|
|
7431
|
+
getPublicFormById: {
|
|
7432
|
+
kind: "memory-only",
|
|
7433
|
+
reason: "durable_rollout_pending"
|
|
7434
|
+
},
|
|
7435
|
+
listPublicForms: {
|
|
7436
|
+
kind: "memory-only",
|
|
7437
|
+
reason: "durable_rollout_pending"
|
|
7438
|
+
},
|
|
7439
|
+
getPublicBookingServices: {
|
|
7440
|
+
kind: "live-only",
|
|
7441
|
+
reason: "safety_sensitive_booking"
|
|
7442
|
+
},
|
|
7443
|
+
getPublicChallenge: {
|
|
7444
|
+
kind: "live-only",
|
|
7445
|
+
reason: "challenge_endpoint"
|
|
7446
|
+
},
|
|
7447
|
+
listPublicEvents: {
|
|
7448
|
+
kind: "memory-only",
|
|
7449
|
+
reason: "durable_rollout_pending"
|
|
7450
|
+
},
|
|
7451
|
+
batchBlockLoaders: {
|
|
7452
|
+
kind: "live-only",
|
|
7453
|
+
reason: "opaque_batch_loader"
|
|
7454
|
+
},
|
|
7455
|
+
listPublicCourses: {
|
|
7456
|
+
kind: "memory-only",
|
|
7457
|
+
reason: "durable_rollout_pending"
|
|
7458
|
+
},
|
|
7459
|
+
listPublicTeamMembers: {
|
|
7460
|
+
kind: "memory-only",
|
|
7461
|
+
reason: "durable_rollout_pending"
|
|
7462
|
+
},
|
|
7463
|
+
listPublicProducts: {
|
|
7464
|
+
kind: "memory-only",
|
|
7465
|
+
reason: "durable_rollout_pending"
|
|
7466
|
+
},
|
|
7467
|
+
listPublicPasses: {
|
|
7468
|
+
kind: "live-only",
|
|
7469
|
+
reason: "safety_sensitive_booking"
|
|
7470
|
+
},
|
|
7471
|
+
listPublicMemberships: {
|
|
7472
|
+
kind: "live-only",
|
|
7473
|
+
reason: "safety_sensitive_booking"
|
|
7474
|
+
},
|
|
7475
|
+
resolveEntrySubroute: {
|
|
7476
|
+
kind: "memory-only",
|
|
7477
|
+
reason: "durable_rollout_pending"
|
|
7478
|
+
},
|
|
7479
|
+
resolveEventOccurrence: {
|
|
7480
|
+
kind: "memory-only",
|
|
7481
|
+
reason: "durable_rollout_pending"
|
|
7482
|
+
},
|
|
7483
|
+
checkRedirect: {
|
|
7484
|
+
kind: "memory-only",
|
|
7485
|
+
reason: "durable_rollout_pending"
|
|
7486
|
+
},
|
|
7487
|
+
getRoutableContent: {
|
|
7488
|
+
kind: "live-only",
|
|
7489
|
+
reason: "auth_required"
|
|
7490
|
+
},
|
|
7491
|
+
getPublicRoutableContent: {
|
|
7492
|
+
kind: "memory-only",
|
|
7493
|
+
reason: "durable_rollout_pending"
|
|
7494
|
+
},
|
|
7495
|
+
getPublicSitemapRoutes: {
|
|
7496
|
+
kind: "memory-only",
|
|
7497
|
+
reason: "durable_rollout_pending"
|
|
7498
|
+
}
|
|
7499
|
+
};
|
|
7500
|
+
var PUBLIC_ENDPOINT_NAME_SET = new Set(PUBLIC_ENDPOINT_NAMES2);
|
|
7501
|
+
function isPublicEndpointName(endpoint) {
|
|
7502
|
+
return PUBLIC_ENDPOINT_NAME_SET.has(endpoint);
|
|
7503
|
+
}
|
|
7504
|
+
function isTruthyParam(value) {
|
|
7505
|
+
return value === true || value === "true" || value === 1 || value === "1";
|
|
7506
|
+
}
|
|
7507
|
+
function isPreviewRequest(endpoint, params) {
|
|
7508
|
+
if (endpoint === "getContentByPath") {
|
|
7509
|
+
return isTruthyParam(params.preview);
|
|
7510
|
+
}
|
|
7511
|
+
if (endpoint === "listPublishedEntries" || endpoint === "resolveEntrySubroute" || endpoint === "resolveEventOccurrence") {
|
|
7512
|
+
return params.stage === "preview";
|
|
7513
|
+
}
|
|
7514
|
+
return false;
|
|
7515
|
+
}
|
|
7516
|
+
function getEndpointFreshTtlSec(endpoint) {
|
|
7517
|
+
return API_ENDPOINTS2[endpoint].revalidate ?? DEFAULT_MEMORY_TTL_SEC;
|
|
7518
|
+
}
|
|
7519
|
+
function assertNever(value) {
|
|
7520
|
+
throw new Error(`Unhandled runtime cache policy override: ${String(value)}`);
|
|
7521
|
+
}
|
|
7522
|
+
function resolveKnownEndpointPolicy(endpoint, params) {
|
|
7523
|
+
if (isPreviewRequest(endpoint, params)) {
|
|
7524
|
+
return { kind: "live-only", endpoint, reason: "preview_request" };
|
|
7525
|
+
}
|
|
7526
|
+
if (endpoint === "getSite" && isTruthyParam(params.force)) {
|
|
7527
|
+
return { kind: "live-only", endpoint, reason: "force_refresh" };
|
|
7528
|
+
}
|
|
7529
|
+
const override = RUNTIME_CACHE_DURABILITY_OVERRIDES[endpoint];
|
|
7530
|
+
if (override.kind === "live-only") {
|
|
7531
|
+
return { kind: "live-only", endpoint, reason: override.reason };
|
|
7532
|
+
}
|
|
7533
|
+
const endpointDefinition = API_ENDPOINTS2[endpoint];
|
|
7534
|
+
if (endpointDefinition.method !== "GET") {
|
|
7535
|
+
return { kind: "live-only", endpoint, reason: "non_get_request" };
|
|
7536
|
+
}
|
|
7537
|
+
if (endpointDefinition.auth === "user") {
|
|
7538
|
+
return { kind: "live-only", endpoint, reason: "auth_required" };
|
|
7539
|
+
}
|
|
7540
|
+
switch (override.kind) {
|
|
7541
|
+
case "durable-public-stale":
|
|
7542
|
+
return {
|
|
7543
|
+
kind: "durable-public-stale",
|
|
7544
|
+
endpoint,
|
|
7545
|
+
freshTtlSec: getEndpointFreshTtlSec(endpoint),
|
|
7546
|
+
staleTtlSec: override.staleTtlSec
|
|
7547
|
+
};
|
|
7548
|
+
case "memory-only":
|
|
7549
|
+
return {
|
|
7550
|
+
kind: "memory-only",
|
|
7551
|
+
endpoint,
|
|
7552
|
+
freshTtlSec: getEndpointFreshTtlSec(endpoint),
|
|
7553
|
+
reason: override.reason
|
|
7554
|
+
};
|
|
7555
|
+
default:
|
|
7556
|
+
return assertNever(override);
|
|
7557
|
+
}
|
|
7558
|
+
}
|
|
7559
|
+
function resolveRuntimeCachePolicy(input) {
|
|
7560
|
+
if (input.method && input.method.toUpperCase() !== "GET") {
|
|
7561
|
+
return {
|
|
7562
|
+
kind: "live-only",
|
|
7563
|
+
endpoint: input.endpoint,
|
|
7564
|
+
reason: "non_get_request"
|
|
7565
|
+
};
|
|
7566
|
+
}
|
|
7567
|
+
if (!isPublicEndpointName(input.endpoint)) {
|
|
7568
|
+
return {
|
|
7569
|
+
kind: "live-only",
|
|
7570
|
+
endpoint: input.endpoint,
|
|
7571
|
+
reason: "unknown_endpoint"
|
|
7572
|
+
};
|
|
7573
|
+
}
|
|
7574
|
+
return resolveKnownEndpointPolicy(input.endpoint, input.params ?? {});
|
|
7575
|
+
}
|
|
7576
|
+
function toNonEmptyString(value) {
|
|
7577
|
+
if (value === null || value === void 0) return null;
|
|
7578
|
+
if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") {
|
|
7579
|
+
return null;
|
|
7580
|
+
}
|
|
7581
|
+
const normalized = String(value).trim();
|
|
7582
|
+
return normalized.length > 0 ? normalized : null;
|
|
7583
|
+
}
|
|
7584
|
+
function normalizeRuntimePublicPath(value) {
|
|
7585
|
+
const raw = toNonEmptyString(value) ?? "/";
|
|
7586
|
+
const withoutQuery = raw.split(/[?#]/, 1)[0] ?? "/";
|
|
7587
|
+
const withLeadingSlash = withoutQuery.startsWith("/") ? withoutQuery : `/${withoutQuery}`;
|
|
7588
|
+
const collapsed = withLeadingSlash.replace(/\/{2,}/g, "/");
|
|
7589
|
+
const withoutTrailingSlash = collapsed.length > 1 ? collapsed.replace(/\/+$/g, "") : collapsed;
|
|
7590
|
+
return withoutTrailingSlash || "/";
|
|
7591
|
+
}
|
|
7592
|
+
function normalizeRuntimeHostname(value) {
|
|
7593
|
+
const trimmed = value.trim().toLowerCase();
|
|
7594
|
+
const url = /^[a-z][a-z0-9+.-]*:\/\//.test(trimmed) ? new URL(trimmed) : new URL(`http://${trimmed}`);
|
|
7595
|
+
return url.hostname.replace(/\.$/, "");
|
|
7596
|
+
}
|
|
7597
|
+
function normalizeScalar(value) {
|
|
7598
|
+
return value.trim().toLowerCase();
|
|
7599
|
+
}
|
|
7600
|
+
function encodeKeyPart(key, value) {
|
|
7601
|
+
return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`;
|
|
7602
|
+
}
|
|
7603
|
+
function unsafeAsPublishedRuntimeCacheKey(value) {
|
|
7604
|
+
return value;
|
|
7605
|
+
}
|
|
7606
|
+
function buildPublishedRuntimeCacheKey(endpoint, normalizedParams) {
|
|
7607
|
+
const encodedParams = Object.entries(normalizedParams).sort(([left], [right]) => left.localeCompare(right)).map(([key, value]) => encodeKeyPart(key, value)).join(":");
|
|
7608
|
+
return unsafeAsPublishedRuntimeCacheKey(
|
|
7609
|
+
`published-runtime:v1:${endpoint}:${encodedParams}`
|
|
7610
|
+
);
|
|
7611
|
+
}
|
|
7612
|
+
function selectSiteRuntimeIdentity(params) {
|
|
7613
|
+
const slug = toNonEmptyString(params.slug);
|
|
7614
|
+
if (slug !== null) return { slug: normalizeScalar(slug) };
|
|
7615
|
+
const domain = toNonEmptyString(params.domain);
|
|
7616
|
+
if (domain !== null) return { domain: normalizeRuntimeHostname(domain) };
|
|
7617
|
+
const id = toNonEmptyString(params.id);
|
|
7618
|
+
if (id !== null) return { id: normalizeScalar(id) };
|
|
7619
|
+
return null;
|
|
7620
|
+
}
|
|
7621
|
+
function deriveGetSiteKey(params) {
|
|
7622
|
+
const identity = selectSiteRuntimeIdentity(params);
|
|
7623
|
+
if (identity === null) {
|
|
7624
|
+
return {
|
|
7625
|
+
ok: false,
|
|
7626
|
+
error: {
|
|
7627
|
+
kind: "missing_site_identity",
|
|
7628
|
+
acceptedParams: ["slug", "domain", "id"]
|
|
7629
|
+
}
|
|
7630
|
+
};
|
|
7631
|
+
}
|
|
7632
|
+
const normalizedParams = {
|
|
7633
|
+
...identity,
|
|
7634
|
+
currentPath: normalizeRuntimePublicPath(params.currentPath)
|
|
7635
|
+
};
|
|
7636
|
+
return {
|
|
7637
|
+
ok: true,
|
|
7638
|
+
endpoint: "getSite",
|
|
7639
|
+
key: buildPublishedRuntimeCacheKey("getSite", normalizedParams),
|
|
7640
|
+
normalizedParams
|
|
7641
|
+
};
|
|
7642
|
+
}
|
|
7643
|
+
function deriveGetContentByPathKey(params) {
|
|
7644
|
+
const siteId = toNonEmptyString(params.siteId);
|
|
7645
|
+
if (siteId === null) {
|
|
7646
|
+
return {
|
|
7647
|
+
ok: false,
|
|
7648
|
+
error: {
|
|
7649
|
+
kind: "missing_required_param",
|
|
7650
|
+
endpoint: "getContentByPath",
|
|
7651
|
+
param: "siteId"
|
|
7652
|
+
}
|
|
7653
|
+
};
|
|
7654
|
+
}
|
|
7655
|
+
const normalizedParams = {
|
|
7656
|
+
siteId: normalizeScalar(siteId),
|
|
7657
|
+
path: normalizeRuntimePublicPath(params.path)
|
|
7658
|
+
};
|
|
7659
|
+
return {
|
|
7660
|
+
ok: true,
|
|
7661
|
+
endpoint: "getContentByPath",
|
|
7662
|
+
key: buildPublishedRuntimeCacheKey("getContentByPath", normalizedParams),
|
|
7663
|
+
normalizedParams
|
|
7664
|
+
};
|
|
7665
|
+
}
|
|
7666
|
+
var DURABLE_RUNTIME_CACHE_KEY_DERIVERS = {
|
|
7667
|
+
getSite: deriveGetSiteKey,
|
|
7668
|
+
getContentByPath: deriveGetContentByPathKey
|
|
7669
|
+
};
|
|
7670
|
+
function derivePublishedRuntimeCacheKey(input) {
|
|
7671
|
+
const policy = resolveRuntimeCachePolicy({
|
|
7672
|
+
endpoint: input.endpoint,
|
|
7673
|
+
method: "GET",
|
|
7674
|
+
params: input.params
|
|
7675
|
+
});
|
|
7676
|
+
if (policy.kind !== "durable-public-stale") {
|
|
7677
|
+
return {
|
|
7678
|
+
ok: false,
|
|
7679
|
+
error: { kind: "not_durable_eligible", policy }
|
|
7680
|
+
};
|
|
7681
|
+
}
|
|
7682
|
+
switch (input.endpoint) {
|
|
7683
|
+
case "getSite":
|
|
7684
|
+
return DURABLE_RUNTIME_CACHE_KEY_DERIVERS.getSite(input.params);
|
|
7685
|
+
case "getContentByPath":
|
|
7686
|
+
return DURABLE_RUNTIME_CACHE_KEY_DERIVERS.getContentByPath(input.params);
|
|
7687
|
+
}
|
|
7688
|
+
}
|
|
7689
|
+
|
|
7158
7690
|
// src/client/resilience.ts
|
|
7159
7691
|
var DEFAULT_RETRY_CONFIG = {
|
|
7160
7692
|
maxAttempts: 3,
|
|
@@ -7464,12 +7996,57 @@ setSdkVersion(SDK_VERSION);
|
|
|
7464
7996
|
var DEFAULT_BROWSER_TIMEOUT_MS = 5e3;
|
|
7465
7997
|
var DEFAULT_SERVER_TIMEOUT_MS = 8e3;
|
|
7466
7998
|
var MAX_GET_ENTRIES_BY_IDENTIFIERS_REFS = 50;
|
|
7999
|
+
function isDurableRuntimeCacheTier(cacheTier) {
|
|
8000
|
+
return cacheTier === "durable-fresh" || cacheTier === "durable-stale";
|
|
8001
|
+
}
|
|
8002
|
+
function isDegradedResilienceStatus(source, details) {
|
|
8003
|
+
return source === "stale" || source === "error" || isDurableRuntimeCacheTier(details.cacheTier) && details.error !== void 0;
|
|
8004
|
+
}
|
|
7467
8005
|
function generateRequestId2() {
|
|
7468
8006
|
return `req-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
7469
8007
|
}
|
|
7470
8008
|
function toRecord(value) {
|
|
7471
8009
|
return value && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
7472
8010
|
}
|
|
8011
|
+
function getRuntimePayloadSiteId(value) {
|
|
8012
|
+
const site = toRecord(value).site;
|
|
8013
|
+
if (!site || typeof site !== "object" || Array.isArray(site)) {
|
|
8014
|
+
return null;
|
|
8015
|
+
}
|
|
8016
|
+
const id = site.id;
|
|
8017
|
+
return typeof id === "string" && id.trim().length > 0 ? id : null;
|
|
8018
|
+
}
|
|
8019
|
+
function getRiverbankErrorInfo(error) {
|
|
8020
|
+
if (error instanceof RiverbankApiError) {
|
|
8021
|
+
return { code: error.code, message: error.message, status: error.status };
|
|
8022
|
+
}
|
|
8023
|
+
if (error instanceof Error) {
|
|
8024
|
+
return { message: error.message };
|
|
8025
|
+
}
|
|
8026
|
+
return { message: String(error) };
|
|
8027
|
+
}
|
|
8028
|
+
function planPublishedRuntimeCache(input) {
|
|
8029
|
+
const policy = resolveRuntimeCachePolicy({
|
|
8030
|
+
endpoint: input.endpoint,
|
|
8031
|
+
method: "GET",
|
|
8032
|
+
params: input.params
|
|
8033
|
+
});
|
|
8034
|
+
if (policy.kind !== "durable-public-stale") {
|
|
8035
|
+
return null;
|
|
8036
|
+
}
|
|
8037
|
+
const keyResult = derivePublishedRuntimeCacheKey(input);
|
|
8038
|
+
if (!keyResult.ok) {
|
|
8039
|
+
return null;
|
|
8040
|
+
}
|
|
8041
|
+
return {
|
|
8042
|
+
cacheKey: keyResult.key,
|
|
8043
|
+
endpoint: keyResult.endpoint,
|
|
8044
|
+
normalizedParams: keyResult.normalizedParams,
|
|
8045
|
+
freshTtlSec: policy.freshTtlSec,
|
|
8046
|
+
staleTtlSec: policy.staleTtlSec,
|
|
8047
|
+
siteId: input.siteId ?? null
|
|
8048
|
+
};
|
|
8049
|
+
}
|
|
7473
8050
|
function normalizeEntryIdentifierRefs(identifiers) {
|
|
7474
8051
|
const trimmed = identifiers.map((identifier) => identifier.trim()).filter((identifier) => identifier.length > 0);
|
|
7475
8052
|
if (trimmed.length === 0) {
|
|
@@ -7703,6 +8280,8 @@ function createRiverbankClient(config) {
|
|
|
7703
8280
|
source,
|
|
7704
8281
|
isPreview: details.isPreview,
|
|
7705
8282
|
cacheKey: details.cacheKey,
|
|
8283
|
+
cacheTier: details.cacheTier,
|
|
8284
|
+
durableCache: details.durableCache,
|
|
7706
8285
|
error: details.error,
|
|
7707
8286
|
staleAgeSec: details.staleAgeSec,
|
|
7708
8287
|
prebuildAgeSec: details.prebuildAgeSec,
|
|
@@ -7712,7 +8291,7 @@ function createRiverbankClient(config) {
|
|
|
7712
8291
|
};
|
|
7713
8292
|
lastStatus = status;
|
|
7714
8293
|
config.resilience?.onStatusChange?.(status);
|
|
7715
|
-
const nowDegraded = source
|
|
8294
|
+
const nowDegraded = isDegradedResilienceStatus(source, details);
|
|
7716
8295
|
if (nowDegraded !== isDegraded) {
|
|
7717
8296
|
isDegraded = nowDegraded;
|
|
7718
8297
|
config.resilience?.onDegradedMode?.(nowDegraded, status);
|
|
@@ -7722,6 +8301,80 @@ function createRiverbankClient(config) {
|
|
|
7722
8301
|
resilience: status
|
|
7723
8302
|
};
|
|
7724
8303
|
}
|
|
8304
|
+
async function tryPublishedRuntimeCacheFallback(plan, statusDetails, errorInfo) {
|
|
8305
|
+
const reader = config.publishedRuntimeCache?.read;
|
|
8306
|
+
if (!plan || !reader) {
|
|
8307
|
+
return null;
|
|
8308
|
+
}
|
|
8309
|
+
try {
|
|
8310
|
+
const result = await reader({
|
|
8311
|
+
cacheKey: plan.cacheKey,
|
|
8312
|
+
endpoint: plan.endpoint,
|
|
8313
|
+
payloadSchemaVersion: DEFAULT_PUBLISHED_RUNTIME_CACHE_PAYLOAD_SCHEMA_VERSION
|
|
8314
|
+
});
|
|
8315
|
+
if (result.kind === "miss") {
|
|
8316
|
+
return {
|
|
8317
|
+
kind: "miss",
|
|
8318
|
+
diagnostic: {
|
|
8319
|
+
outcome: "miss",
|
|
8320
|
+
reason: result.reason
|
|
8321
|
+
}
|
|
8322
|
+
};
|
|
8323
|
+
}
|
|
8324
|
+
if (result.kind === "error") {
|
|
8325
|
+
return {
|
|
8326
|
+
kind: "error",
|
|
8327
|
+
diagnostic: {
|
|
8328
|
+
outcome: "error",
|
|
8329
|
+
error: result.error
|
|
8330
|
+
}
|
|
8331
|
+
};
|
|
8332
|
+
}
|
|
8333
|
+
return {
|
|
8334
|
+
kind: "hit",
|
|
8335
|
+
result: emitStatus(
|
|
8336
|
+
result.freshness === "fresh" ? "cache" : "stale",
|
|
8337
|
+
result.payload,
|
|
8338
|
+
statusDetails({
|
|
8339
|
+
error: errorInfo,
|
|
8340
|
+
staleAgeSec: result.staleAgeSec,
|
|
8341
|
+
cacheTier: result.freshness === "fresh" ? "durable-fresh" : "durable-stale"
|
|
8342
|
+
})
|
|
8343
|
+
)
|
|
8344
|
+
};
|
|
8345
|
+
} catch (error) {
|
|
8346
|
+
return {
|
|
8347
|
+
kind: "error",
|
|
8348
|
+
diagnostic: {
|
|
8349
|
+
outcome: "error",
|
|
8350
|
+
error: {
|
|
8351
|
+
kind: "adapter_exception",
|
|
8352
|
+
message: error instanceof Error ? error.message : String(error)
|
|
8353
|
+
}
|
|
8354
|
+
}
|
|
8355
|
+
};
|
|
8356
|
+
}
|
|
8357
|
+
}
|
|
8358
|
+
async function writePublishedRuntimeCache(plan, payload) {
|
|
8359
|
+
const writer = config.publishedRuntimeCache?.write;
|
|
8360
|
+
if (!plan || !writer) {
|
|
8361
|
+
return;
|
|
8362
|
+
}
|
|
8363
|
+
try {
|
|
8364
|
+
await writer({
|
|
8365
|
+
cacheKey: plan.cacheKey,
|
|
8366
|
+
endpoint: plan.endpoint,
|
|
8367
|
+
normalizedParams: plan.normalizedParams,
|
|
8368
|
+
payload,
|
|
8369
|
+
siteId: plan.siteId ?? getRuntimePayloadSiteId(payload),
|
|
8370
|
+
freshTtlSec: plan.freshTtlSec,
|
|
8371
|
+
staleTtlSec: plan.staleTtlSec,
|
|
8372
|
+
payloadSchemaVersion: DEFAULT_PUBLISHED_RUNTIME_CACHE_PAYLOAD_SCHEMA_VERSION,
|
|
8373
|
+
writeReason: "live_success"
|
|
8374
|
+
});
|
|
8375
|
+
} catch {
|
|
8376
|
+
}
|
|
8377
|
+
}
|
|
7725
8378
|
async function resilientFetch(cacheKey, fetcher, options) {
|
|
7726
8379
|
const requestId = generateRequestId2();
|
|
7727
8380
|
const startTime = Date.now();
|
|
@@ -7737,7 +8390,11 @@ function createRiverbankClient(config) {
|
|
|
7737
8390
|
if (cacheEnabled && !options.force) {
|
|
7738
8391
|
const fresh = cache.getFresh(cacheKey);
|
|
7739
8392
|
if (fresh !== null) {
|
|
7740
|
-
return emitStatus(
|
|
8393
|
+
return emitStatus(
|
|
8394
|
+
"cache",
|
|
8395
|
+
fresh,
|
|
8396
|
+
statusDetails({ cacheTier: "memory-fresh" })
|
|
8397
|
+
);
|
|
7741
8398
|
}
|
|
7742
8399
|
}
|
|
7743
8400
|
if (resilienceEnabled && circuitBreaker.isOpen()) {
|
|
@@ -7749,6 +8406,7 @@ function createRiverbankClient(config) {
|
|
|
7749
8406
|
stale.value,
|
|
7750
8407
|
statusDetails({
|
|
7751
8408
|
staleAgeSec: stale.staleAgeSec,
|
|
8409
|
+
cacheTier: "memory-stale",
|
|
7752
8410
|
error: {
|
|
7753
8411
|
code: "circuit_open",
|
|
7754
8412
|
message: "Circuit breaker is open"
|
|
@@ -7757,6 +8415,15 @@ function createRiverbankClient(config) {
|
|
|
7757
8415
|
);
|
|
7758
8416
|
}
|
|
7759
8417
|
}
|
|
8418
|
+
const durableFallback = allowFallbacks && !isPreview ? await tryPublishedRuntimeCacheFallback(
|
|
8419
|
+
options.publishedRuntimeCache,
|
|
8420
|
+
statusDetails,
|
|
8421
|
+
{ code: "circuit_open", message: "Circuit breaker is open" }
|
|
8422
|
+
) : null;
|
|
8423
|
+
const durableCache = durableFallback?.kind === "miss" || durableFallback?.kind === "error" ? durableFallback.diagnostic : void 0;
|
|
8424
|
+
if (durableFallback?.kind === "hit") {
|
|
8425
|
+
return durableFallback.result;
|
|
8426
|
+
}
|
|
7760
8427
|
if (allowFallbacks && !isPreview && options.prebuildFallback) {
|
|
7761
8428
|
const prebuildResult = options.prebuildFallback();
|
|
7762
8429
|
if (prebuildResult) {
|
|
@@ -7765,6 +8432,8 @@ function createRiverbankClient(config) {
|
|
|
7765
8432
|
prebuildResult.data,
|
|
7766
8433
|
statusDetails({
|
|
7767
8434
|
prebuildAgeSec: prebuildResult.prebuildAgeSec,
|
|
8435
|
+
cacheTier: "prebuild",
|
|
8436
|
+
durableCache,
|
|
7768
8437
|
error: {
|
|
7769
8438
|
code: "circuit_open",
|
|
7770
8439
|
message: "Circuit breaker is open"
|
|
@@ -7778,6 +8447,7 @@ function createRiverbankClient(config) {
|
|
|
7778
8447
|
"error",
|
|
7779
8448
|
null,
|
|
7780
8449
|
statusDetails({
|
|
8450
|
+
durableCache,
|
|
7781
8451
|
error: { code: "circuit_open", message: "Circuit breaker is open" }
|
|
7782
8452
|
})
|
|
7783
8453
|
);
|
|
@@ -7818,6 +8488,9 @@ function createRiverbankClient(config) {
|
|
|
7818
8488
|
if (cacheEnabled) {
|
|
7819
8489
|
cache.set(cacheKey, data);
|
|
7820
8490
|
}
|
|
8491
|
+
if (allowFallbacks && !isPreview) {
|
|
8492
|
+
await writePublishedRuntimeCache(options.publishedRuntimeCache, data);
|
|
8493
|
+
}
|
|
7821
8494
|
return emitStatus("live", data, statusDetails());
|
|
7822
8495
|
} catch (error) {
|
|
7823
8496
|
if (resilienceEnabled && error instanceof Error) {
|
|
@@ -7826,44 +8499,47 @@ function createRiverbankClient(config) {
|
|
|
7826
8499
|
if (allowFallbacks && !isPreview && staleIfError && cacheEnabled) {
|
|
7827
8500
|
const stale = cache.getStale(cacheKey);
|
|
7828
8501
|
if (stale) {
|
|
7829
|
-
const errorInfo2 = error
|
|
7830
|
-
code: error.code,
|
|
7831
|
-
message: error.message,
|
|
7832
|
-
status: error.status
|
|
7833
|
-
} : { message: error.message };
|
|
8502
|
+
const errorInfo2 = getRiverbankErrorInfo(error);
|
|
7834
8503
|
return emitStatus(
|
|
7835
8504
|
"stale",
|
|
7836
8505
|
stale.value,
|
|
7837
8506
|
statusDetails({
|
|
7838
8507
|
staleAgeSec: stale.staleAgeSec,
|
|
8508
|
+
cacheTier: "memory-stale",
|
|
7839
8509
|
error: errorInfo2
|
|
7840
8510
|
})
|
|
7841
8511
|
);
|
|
7842
8512
|
}
|
|
7843
8513
|
}
|
|
8514
|
+
const errorInfo = getRiverbankErrorInfo(error);
|
|
8515
|
+
const durableFallback = allowFallbacks && !isPreview ? await tryPublishedRuntimeCacheFallback(
|
|
8516
|
+
options.publishedRuntimeCache,
|
|
8517
|
+
statusDetails,
|
|
8518
|
+
errorInfo
|
|
8519
|
+
) : null;
|
|
8520
|
+
const durableCache = durableFallback?.kind === "miss" || durableFallback?.kind === "error" ? durableFallback.diagnostic : void 0;
|
|
8521
|
+
if (durableFallback?.kind === "hit") {
|
|
8522
|
+
return durableFallback.result;
|
|
8523
|
+
}
|
|
7844
8524
|
if (allowFallbacks && !isPreview && options.prebuildFallback) {
|
|
7845
8525
|
const prebuildResult = options.prebuildFallback();
|
|
7846
8526
|
if (prebuildResult) {
|
|
7847
|
-
const errorInfo2 = error instanceof RiverbankApiError ? {
|
|
7848
|
-
code: error.code,
|
|
7849
|
-
message: error.message,
|
|
7850
|
-
status: error.status
|
|
7851
|
-
} : { message: error.message };
|
|
7852
8527
|
return emitStatus(
|
|
7853
8528
|
"prebuild",
|
|
7854
8529
|
prebuildResult.data,
|
|
7855
8530
|
statusDetails({
|
|
7856
8531
|
prebuildAgeSec: prebuildResult.prebuildAgeSec,
|
|
7857
|
-
|
|
8532
|
+
cacheTier: "prebuild",
|
|
8533
|
+
durableCache,
|
|
8534
|
+
error: errorInfo
|
|
7858
8535
|
})
|
|
7859
8536
|
);
|
|
7860
8537
|
}
|
|
7861
8538
|
}
|
|
7862
|
-
const errorInfo = error instanceof RiverbankApiError ? { code: error.code, message: error.message, status: error.status } : { message: error.message };
|
|
7863
8539
|
const failure = emitStatus(
|
|
7864
8540
|
"error",
|
|
7865
8541
|
null,
|
|
7866
|
-
statusDetails({ error: errorInfo })
|
|
8542
|
+
statusDetails({ error: errorInfo, durableCache })
|
|
7867
8543
|
);
|
|
7868
8544
|
throw attachResilienceStatusToError(error, failure.resilience);
|
|
7869
8545
|
}
|
|
@@ -7913,8 +8589,12 @@ function createRiverbankClient(config) {
|
|
|
7913
8589
|
);
|
|
7914
8590
|
}
|
|
7915
8591
|
const siteIdentifier = slug || domain || id;
|
|
7916
|
-
const cacheKey = `site:${siteIdentifier ?? "unknown"}:${currentPath ?? ""}`;
|
|
7917
8592
|
const siteId = id || slug || domain;
|
|
8593
|
+
const publishedRuntimeCache = planPublishedRuntimeCache({
|
|
8594
|
+
endpoint: "getSite",
|
|
8595
|
+
params: { slug, domain, id, currentPath, force }
|
|
8596
|
+
});
|
|
8597
|
+
const cacheKey = publishedRuntimeCache?.cacheKey ?? `site:${siteIdentifier ?? "unknown"}:${currentPath ?? ""}`;
|
|
7918
8598
|
return resilientFetch(
|
|
7919
8599
|
cacheKey,
|
|
7920
8600
|
async (sig) => {
|
|
@@ -7937,13 +8617,19 @@ function createRiverbankClient(config) {
|
|
|
7937
8617
|
{
|
|
7938
8618
|
signal,
|
|
7939
8619
|
force,
|
|
8620
|
+
publishedRuntimeCache,
|
|
7940
8621
|
prebuildFallback: prebuildLoader && siteId ? () => prebuildLoader.loadSite(siteId) : void 0
|
|
7941
8622
|
}
|
|
7942
8623
|
);
|
|
7943
8624
|
}
|
|
7944
8625
|
async function getPageWithResilienceInternal(params) {
|
|
7945
8626
|
const { siteId, path, preview = false, signal } = params;
|
|
7946
|
-
const
|
|
8627
|
+
const publishedRuntimeCache = planPublishedRuntimeCache({
|
|
8628
|
+
endpoint: "getContentByPath",
|
|
8629
|
+
params: { siteId, path, preview },
|
|
8630
|
+
siteId
|
|
8631
|
+
});
|
|
8632
|
+
const cacheKey = publishedRuntimeCache?.cacheKey ?? `page:${siteId}:${path}:${preview}`;
|
|
7947
8633
|
return resilientFetch(
|
|
7948
8634
|
cacheKey,
|
|
7949
8635
|
async (sig) => {
|
|
@@ -7956,6 +8642,7 @@ function createRiverbankClient(config) {
|
|
|
7956
8642
|
{
|
|
7957
8643
|
preview,
|
|
7958
8644
|
signal,
|
|
8645
|
+
publishedRuntimeCache,
|
|
7959
8646
|
// Prebuild fallback only for published pages (not preview)
|
|
7960
8647
|
prebuildFallback: prebuildLoader && !preview ? () => prebuildLoader.loadPage(siteId, path) : void 0
|
|
7961
8648
|
}
|
|
@@ -8152,10 +8839,16 @@ function createRiverbankClient(config) {
|
|
|
8152
8839
|
limit,
|
|
8153
8840
|
from,
|
|
8154
8841
|
to,
|
|
8842
|
+
afterStartsAt,
|
|
8843
|
+
afterId,
|
|
8155
8844
|
stage,
|
|
8156
8845
|
categoryIds,
|
|
8157
8846
|
venueId,
|
|
8847
|
+
staffMemberId,
|
|
8158
8848
|
kind,
|
|
8849
|
+
eventSurface,
|
|
8850
|
+
eventPresets,
|
|
8851
|
+
scheduleScope,
|
|
8159
8852
|
entryId,
|
|
8160
8853
|
seriesId,
|
|
8161
8854
|
includeOccurrenceId,
|
|
@@ -8164,7 +8857,7 @@ function createRiverbankClient(config) {
|
|
|
8164
8857
|
if (!siteId) {
|
|
8165
8858
|
throw new Error("listPublicEvents() requires siteId");
|
|
8166
8859
|
}
|
|
8167
|
-
const cacheKey = `public-events:${siteId}:${limit ?? ""}:${from ?? ""}:${to ?? ""}:${stage ?? ""}:${categoryIds ?? ""}:${venueId ?? ""}:${kind ?? ""}:${entryId ?? ""}:${seriesId ?? ""}:${includeOccurrenceId ?? ""}`;
|
|
8860
|
+
const cacheKey = `public-events:${siteId}:${limit ?? ""}:${from ?? ""}:${to ?? ""}:${afterStartsAt ?? ""}:${afterId ?? ""}:${stage ?? ""}:${categoryIds ?? ""}:${venueId ?? ""}:${staffMemberId ?? ""}:${kind ?? ""}:${eventSurface ?? ""}:${eventPresets ?? ""}:${scheduleScope ?? ""}:${entryId ?? ""}:${seriesId ?? ""}:${includeOccurrenceId ?? ""}`;
|
|
8168
8861
|
return resilientFetchData(
|
|
8169
8862
|
cacheKey,
|
|
8170
8863
|
async (sig) => {
|
|
@@ -8173,10 +8866,16 @@ function createRiverbankClient(config) {
|
|
|
8173
8866
|
...typeof limit === "number" && { limit: String(limit) },
|
|
8174
8867
|
...from && { from },
|
|
8175
8868
|
...to && { to },
|
|
8869
|
+
...afterStartsAt && { afterStartsAt },
|
|
8870
|
+
...afterId && { afterId },
|
|
8176
8871
|
...stage && { stage },
|
|
8177
8872
|
...categoryIds && { categoryIds },
|
|
8178
8873
|
...venueId && { venueId },
|
|
8874
|
+
...staffMemberId && { staffMemberId },
|
|
8179
8875
|
...kind && { kind },
|
|
8876
|
+
...eventSurface && { eventSurface },
|
|
8877
|
+
...eventPresets && { eventPresets },
|
|
8878
|
+
...scheduleScope && { scheduleScope },
|
|
8180
8879
|
...entryId && { entryId },
|
|
8181
8880
|
...seriesId && { seriesId },
|
|
8182
8881
|
...includeOccurrenceId && { includeOccurrenceId }
|
|
@@ -8203,6 +8902,9 @@ function createRiverbankClient(config) {
|
|
|
8203
8902
|
venueId,
|
|
8204
8903
|
staffMemberId,
|
|
8205
8904
|
kind,
|
|
8905
|
+
eventSurface,
|
|
8906
|
+
eventPresets,
|
|
8907
|
+
scheduleScope,
|
|
8206
8908
|
entryId,
|
|
8207
8909
|
seriesId,
|
|
8208
8910
|
includeOccurrenceId,
|
|
@@ -8211,7 +8913,7 @@ function createRiverbankClient(config) {
|
|
|
8211
8913
|
if (!siteId) {
|
|
8212
8914
|
throw new Error("getPublicEventDetails() requires siteId");
|
|
8213
8915
|
}
|
|
8214
|
-
const cacheKey = `public-event-details:${siteId}:${limit ?? ""}:${from ?? ""}:${to ?? ""}:${afterStartsAt ?? ""}:${afterId ?? ""}:${stage ?? ""}:${categoryIds ?? ""}:${venueId ?? ""}:${staffMemberId ?? ""}:${kind ?? ""}:${entryId ?? ""}:${seriesId ?? ""}:${includeOccurrenceId ?? ""}`;
|
|
8916
|
+
const cacheKey = `public-event-details:${siteId}:${limit ?? ""}:${from ?? ""}:${to ?? ""}:${afterStartsAt ?? ""}:${afterId ?? ""}:${stage ?? ""}:${categoryIds ?? ""}:${venueId ?? ""}:${staffMemberId ?? ""}:${kind ?? ""}:${eventSurface ?? ""}:${eventPresets ?? ""}:${scheduleScope ?? ""}:${entryId ?? ""}:${seriesId ?? ""}:${includeOccurrenceId ?? ""}`;
|
|
8215
8917
|
return resilientFetchData(
|
|
8216
8918
|
cacheKey,
|
|
8217
8919
|
async (sig) => {
|
|
@@ -8234,6 +8936,9 @@ function createRiverbankClient(config) {
|
|
|
8234
8936
|
...venueId && { venueId },
|
|
8235
8937
|
...staffMemberId && { staffMemberId },
|
|
8236
8938
|
...kind && { kind },
|
|
8939
|
+
...eventSurface && { eventSurface },
|
|
8940
|
+
...eventPresets && { eventPresets },
|
|
8941
|
+
...scheduleScope && { scheduleScope },
|
|
8237
8942
|
...entryId && { entryId },
|
|
8238
8943
|
...seriesId && { seriesId },
|
|
8239
8944
|
...includeOccurrenceId && { includeOccurrenceId }
|
|
@@ -8482,6 +9187,48 @@ function err(error) {
|
|
|
8482
9187
|
return { ok: false, error };
|
|
8483
9188
|
}
|
|
8484
9189
|
|
|
9190
|
+
// ../core/src/assert-never.ts
|
|
9191
|
+
function assertNever2(value, message = "Unexpected variant") {
|
|
9192
|
+
throw new Error(`${message}: ${String(value)}`);
|
|
9193
|
+
}
|
|
9194
|
+
|
|
9195
|
+
// ../core/src/currency-format.ts
|
|
9196
|
+
var CURRENCY_LOCALE_BY_CODE = {
|
|
9197
|
+
USD: "en-US",
|
|
9198
|
+
GBP: "en-GB",
|
|
9199
|
+
EUR: "de-DE",
|
|
9200
|
+
AUD: "en-AU",
|
|
9201
|
+
CAD: "en-CA",
|
|
9202
|
+
NZD: "en-NZ",
|
|
9203
|
+
JPY: "ja-JP",
|
|
9204
|
+
CNY: "zh-CN",
|
|
9205
|
+
CHF: "de-CH"
|
|
9206
|
+
};
|
|
9207
|
+
function resolveCurrencyLocale(currencyCode, override) {
|
|
9208
|
+
return override ?? CURRENCY_LOCALE_BY_CODE[currencyCode] ?? "en";
|
|
9209
|
+
}
|
|
9210
|
+
function formatCurrencyAmount(amountCents, currency, options) {
|
|
9211
|
+
const currencyCode = currency.toUpperCase();
|
|
9212
|
+
const locale = resolveCurrencyLocale(currencyCode, options?.locale);
|
|
9213
|
+
try {
|
|
9214
|
+
const exactFormatter = new Intl.NumberFormat(locale, {
|
|
9215
|
+
style: "currency",
|
|
9216
|
+
currency: currencyCode
|
|
9217
|
+
});
|
|
9218
|
+
const fractionDigits = options?.decimals === "auto" ? {
|
|
9219
|
+
minimumFractionDigits: 0,
|
|
9220
|
+
maximumFractionDigits: exactFormatter.resolvedOptions().maximumFractionDigits
|
|
9221
|
+
} : {};
|
|
9222
|
+
return new Intl.NumberFormat(locale, {
|
|
9223
|
+
style: "currency",
|
|
9224
|
+
currency: currencyCode,
|
|
9225
|
+
...fractionDigits
|
|
9226
|
+
}).format(amountCents / 100);
|
|
9227
|
+
} catch {
|
|
9228
|
+
return `${(amountCents / 100).toFixed(2)} ${currencyCode}`;
|
|
9229
|
+
}
|
|
9230
|
+
}
|
|
9231
|
+
|
|
8485
9232
|
// ../core/src/event-pricing.ts
|
|
8486
9233
|
function publicEventPricingType(pricing) {
|
|
8487
9234
|
switch (pricing.kind) {
|
|
@@ -8502,6 +9249,7 @@ function isFreePublicEventPriceDisplay(display) {
|
|
|
8502
9249
|
return display.display.kind === "free";
|
|
8503
9250
|
case "exact":
|
|
8504
9251
|
case "from":
|
|
9252
|
+
case "range":
|
|
8505
9253
|
case "mixed":
|
|
8506
9254
|
case "unavailable":
|
|
8507
9255
|
return false;
|
|
@@ -8660,11 +9408,6 @@ function toLocationCoordinates(value) {
|
|
|
8660
9408
|
};
|
|
8661
9409
|
}
|
|
8662
9410
|
|
|
8663
|
-
// ../core/src/assert-never.ts
|
|
8664
|
-
function assertNever(value, message = "Unexpected variant") {
|
|
8665
|
-
throw new Error(`${message}: ${String(value)}`);
|
|
8666
|
-
}
|
|
8667
|
-
|
|
8668
9411
|
// ../api/src/accessAdmin.ts
|
|
8669
9412
|
import { z } from "zod";
|
|
8670
9413
|
var managedDomainAddOnPricingSnapshotSchema = z.object({
|
|
@@ -9864,7 +10607,7 @@ function makeBoundaryId(previousBlockId, nextBlockId) {
|
|
|
9864
10607
|
const next = encodeURIComponent(nextBlockId);
|
|
9865
10608
|
return asDesignBoundaryId(`boundary:${previous}:${next}`);
|
|
9866
10609
|
}
|
|
9867
|
-
function
|
|
10610
|
+
function assertNever3(value, message = "Unhandled Theme V2 variant") {
|
|
9868
10611
|
throw new Error(`${message}: ${String(value)}`);
|
|
9869
10612
|
}
|
|
9870
10613
|
function brandNonEmptyString(value, label) {
|
|
@@ -16245,7 +16988,7 @@ function themedHeaderShadow(theme) {
|
|
|
16245
16988
|
case "high":
|
|
16246
16989
|
return { elevation: "lg" };
|
|
16247
16990
|
default:
|
|
16248
|
-
return
|
|
16991
|
+
return assertNever3(
|
|
16249
16992
|
theme.shadow.elevation,
|
|
16250
16993
|
"Unhandled theme shadow elevation"
|
|
16251
16994
|
);
|
|
@@ -23906,15 +24649,53 @@ var newsletterFormFragment = defineFragment({
|
|
|
23906
24649
|
title: "Newsletter Form",
|
|
23907
24650
|
description: "Newsletter subscription form with preset field configurations.",
|
|
23908
24651
|
fields: [
|
|
24652
|
+
{
|
|
24653
|
+
id: "destinationProvider",
|
|
24654
|
+
type: "select",
|
|
24655
|
+
label: "Send signups to",
|
|
24656
|
+
description: "Choose where new subscribers from this form should go.",
|
|
24657
|
+
defaultValue: "riverbank",
|
|
24658
|
+
required: true,
|
|
24659
|
+
ui: { intent: "behavior" },
|
|
24660
|
+
options: [
|
|
24661
|
+
{ value: "riverbank", label: "Riverbank newsletter" }
|
|
24662
|
+
]
|
|
24663
|
+
},
|
|
23909
24664
|
{
|
|
23910
24665
|
id: "listId",
|
|
23911
24666
|
type: "reference",
|
|
23912
24667
|
label: "Newsletter list",
|
|
23913
24668
|
description: "Select the list new subscribers should be added to.",
|
|
23914
|
-
required:
|
|
24669
|
+
required: false,
|
|
23915
24670
|
referenceKind: "newsletterList",
|
|
23916
24671
|
allowManualEntry: false,
|
|
23917
|
-
ui: {
|
|
24672
|
+
ui: {
|
|
24673
|
+
intent: "behavior",
|
|
24674
|
+
visibleWhen: { field: "destinationProvider", equals: "riverbank" }
|
|
24675
|
+
}
|
|
24676
|
+
},
|
|
24677
|
+
{
|
|
24678
|
+
id: "mailchimpAudienceId",
|
|
24679
|
+
type: "reference",
|
|
24680
|
+
label: "Mailchimp audience",
|
|
24681
|
+
description: "Choose the Mailchimp audience for new subscribers.",
|
|
24682
|
+
required: false,
|
|
24683
|
+
referenceKind: "mailchimpAudience",
|
|
24684
|
+
allowManualEntry: false,
|
|
24685
|
+
ui: {
|
|
24686
|
+
intent: "behavior",
|
|
24687
|
+
visibleWhen: { field: "destinationProvider", equals: "mailchimp" }
|
|
24688
|
+
}
|
|
24689
|
+
},
|
|
24690
|
+
{
|
|
24691
|
+
id: "mailchimpTags",
|
|
24692
|
+
type: "text",
|
|
24693
|
+
label: "Mailchimp tags",
|
|
24694
|
+
description: "Optional tags to apply in Mailchimp, separated by commas or semicolons.",
|
|
24695
|
+
ui: {
|
|
24696
|
+
intent: "behavior",
|
|
24697
|
+
visibleWhen: { field: "destinationProvider", equals: "mailchimp" }
|
|
24698
|
+
}
|
|
23918
24699
|
},
|
|
23919
24700
|
{
|
|
23920
24701
|
id: "preset",
|
|
@@ -23961,13 +24742,18 @@ var newsletterFormFragment = defineFragment({
|
|
|
23961
24742
|
id: "tags",
|
|
23962
24743
|
type: "text",
|
|
23963
24744
|
label: "Tags (optional)",
|
|
23964
|
-
description: "Optional tags to apply on subscribe (comma or semicolon separated)."
|
|
24745
|
+
description: "Optional tags to apply on subscribe (comma or semicolon separated).",
|
|
24746
|
+
ui: {
|
|
24747
|
+
intent: "behavior",
|
|
24748
|
+
visibleWhen: { field: "destinationProvider", equals: "riverbank" }
|
|
24749
|
+
}
|
|
23965
24750
|
}
|
|
23966
24751
|
],
|
|
23967
24752
|
layout: [
|
|
23968
24753
|
el(
|
|
23969
24754
|
"newsletter-form",
|
|
23970
24755
|
withApiBindings({
|
|
24756
|
+
destinationProvider: { $bind: { from: "destinationProvider" } },
|
|
23971
24757
|
listId: { $bind: { from: "listId" } },
|
|
23972
24758
|
preset: { $bind: { from: "preset" } },
|
|
23973
24759
|
includePhone: { $bind: { from: "includePhone" } },
|
|
@@ -26657,7 +27443,7 @@ function planSiteChromePlacement(positioning) {
|
|
|
26657
27443
|
standaloneShellClassName: "fixed left-0 right-0 top-0 z-40 w-full"
|
|
26658
27444
|
};
|
|
26659
27445
|
default:
|
|
26660
|
-
return
|
|
27446
|
+
return assertNever3(positioning);
|
|
26661
27447
|
}
|
|
26662
27448
|
}
|
|
26663
27449
|
|
|
@@ -29811,10 +30597,10 @@ var appointmentBookingBlockDefinition = {
|
|
|
29811
30597
|
};
|
|
29812
30598
|
|
|
29813
30599
|
// ../blocks/src/system/blocks/event-registration.ts
|
|
29814
|
-
import { z as
|
|
30600
|
+
import { z as z47 } from "zod";
|
|
29815
30601
|
|
|
29816
30602
|
// ../blocks/src/system/blocks/events/shared/schemas.ts
|
|
29817
|
-
import { z as
|
|
30603
|
+
import { z as z43 } from "zod";
|
|
29818
30604
|
|
|
29819
30605
|
// ../blocks/src/lib/media.ts
|
|
29820
30606
|
import z39 from "zod";
|
|
@@ -29892,296 +30678,346 @@ var mediaSchema2 = z39.discriminatedUnion("type", [
|
|
|
29892
30678
|
archiveMediaSchema
|
|
29893
30679
|
]);
|
|
29894
30680
|
|
|
29895
|
-
// ../blocks/src/system/
|
|
30681
|
+
// ../blocks/src/system/manifest/richTextSchema.ts
|
|
29896
30682
|
import { z as z40 } from "zod";
|
|
29897
|
-
var
|
|
30683
|
+
var TipTapMarkSchema = z40.object({
|
|
30684
|
+
type: z40.string(),
|
|
30685
|
+
attrs: z40.record(z40.string(), z40.unknown()).optional()
|
|
30686
|
+
});
|
|
30687
|
+
var TipTapNodeSchema = z40.lazy(
|
|
30688
|
+
() => z40.object({
|
|
30689
|
+
type: z40.string(),
|
|
30690
|
+
content: z40.array(TipTapNodeSchema).optional(),
|
|
30691
|
+
text: z40.string().optional(),
|
|
30692
|
+
attrs: z40.record(z40.string(), z40.unknown()).optional(),
|
|
30693
|
+
marks: z40.array(TipTapMarkSchema).optional()
|
|
30694
|
+
})
|
|
30695
|
+
);
|
|
30696
|
+
var RichTextValueSchema = z40.union([
|
|
30697
|
+
// Canonical: TipTap document directly
|
|
30698
|
+
TipTapNodeSchema,
|
|
30699
|
+
// Legacy (read-tolerance only): wrapped in { doc: {...} }
|
|
30700
|
+
z40.object({
|
|
30701
|
+
doc: TipTapNodeSchema
|
|
30702
|
+
})
|
|
30703
|
+
]);
|
|
30704
|
+
var RichTextDocSchema = z40.object({
|
|
30705
|
+
type: z40.literal("doc"),
|
|
30706
|
+
content: z40.array(TipTapNodeSchema)
|
|
30707
|
+
});
|
|
30708
|
+
function unwrapRichTextRoot(value) {
|
|
30709
|
+
if (!isRecord2(value)) return value;
|
|
30710
|
+
if (!("doc" in value)) return value;
|
|
30711
|
+
const inner = value.doc;
|
|
30712
|
+
if (isRecord2(inner) && inner.type === "doc") return inner;
|
|
30713
|
+
return value;
|
|
30714
|
+
}
|
|
30715
|
+
|
|
30716
|
+
// ../blocks/src/system/blocks/shared/bookingPaymentTerms.ts
|
|
30717
|
+
import { z as z41 } from "zod";
|
|
30718
|
+
var bookingDepositRefundPolicySchema = z41.enum([
|
|
29898
30719
|
"refundable",
|
|
29899
30720
|
"non_refundable"
|
|
29900
30721
|
]);
|
|
29901
|
-
var bookingInstalmentPlanSchema =
|
|
29902
|
-
|
|
29903
|
-
kind:
|
|
29904
|
-
depositAmountCents:
|
|
30722
|
+
var bookingInstalmentPlanSchema = z41.union([
|
|
30723
|
+
z41.object({
|
|
30724
|
+
kind: z41.literal("deposit_plus_one_remainder"),
|
|
30725
|
+
depositAmountCents: z41.number().int().min(0),
|
|
29905
30726
|
depositRefundability: bookingDepositRefundPolicySchema,
|
|
29906
|
-
remainderDueCount:
|
|
29907
|
-
intervalUnit:
|
|
30727
|
+
remainderDueCount: z41.number().int().positive(),
|
|
30728
|
+
intervalUnit: z41.enum(["day", "week", "month"])
|
|
29908
30729
|
}),
|
|
29909
|
-
|
|
29910
|
-
kind:
|
|
29911
|
-
depositAmountCents:
|
|
30730
|
+
z41.object({
|
|
30731
|
+
kind: z41.literal("deposit_plus_scheduled_instalments"),
|
|
30732
|
+
depositAmountCents: z41.number().int().min(0),
|
|
29912
30733
|
depositRefundability: bookingDepositRefundPolicySchema,
|
|
29913
|
-
instalmentCount:
|
|
29914
|
-
intervalCount:
|
|
29915
|
-
intervalUnit:
|
|
30734
|
+
instalmentCount: z41.number().int().positive(),
|
|
30735
|
+
intervalCount: z41.number().int().positive(),
|
|
30736
|
+
intervalUnit: z41.enum(["day", "week", "month"])
|
|
29916
30737
|
}),
|
|
29917
|
-
|
|
29918
|
-
kind:
|
|
29919
|
-
instalmentCount:
|
|
29920
|
-
intervalCount:
|
|
29921
|
-
intervalUnit:
|
|
30738
|
+
z41.object({
|
|
30739
|
+
kind: z41.literal("equal_scheduled_instalments"),
|
|
30740
|
+
instalmentCount: z41.number().int().positive(),
|
|
30741
|
+
intervalCount: z41.number().int().positive(),
|
|
30742
|
+
intervalUnit: z41.enum(["day", "week", "month"])
|
|
29922
30743
|
})
|
|
29923
30744
|
]);
|
|
29924
|
-
var bookingFlexibleBalanceDueDateRuleSchema =
|
|
29925
|
-
|
|
29926
|
-
kind:
|
|
29927
|
-
daysBeforeStart:
|
|
30745
|
+
var bookingFlexibleBalanceDueDateRuleSchema = z41.union([
|
|
30746
|
+
z41.object({
|
|
30747
|
+
kind: z41.literal("relative_to_start_date"),
|
|
30748
|
+
daysBeforeStart: z41.number().int().positive()
|
|
29928
30749
|
}),
|
|
29929
|
-
|
|
29930
|
-
kind:
|
|
29931
|
-
dueAt:
|
|
30750
|
+
z41.object({
|
|
30751
|
+
kind: z41.literal("fixed_calendar_date"),
|
|
30752
|
+
dueAt: z41.string().datetime()
|
|
29932
30753
|
})
|
|
29933
30754
|
]);
|
|
29934
|
-
var bookingFlexibleBalanceConfigSchema =
|
|
29935
|
-
upfrontAmountCents:
|
|
30755
|
+
var bookingFlexibleBalanceConfigSchema = z41.object({
|
|
30756
|
+
upfrontAmountCents: z41.number().int().min(0),
|
|
29936
30757
|
dueDateRule: bookingFlexibleBalanceDueDateRuleSchema,
|
|
29937
30758
|
depositRefundability: bookingDepositRefundPolicySchema
|
|
29938
30759
|
});
|
|
29939
|
-
var blockBookingPaymentCollectionOptionSchema =
|
|
29940
|
-
|
|
29941
|
-
kind:
|
|
30760
|
+
var blockBookingPaymentCollectionOptionSchema = z41.union([
|
|
30761
|
+
z41.object({
|
|
30762
|
+
kind: z41.literal("upfront")
|
|
29942
30763
|
}),
|
|
29943
|
-
|
|
29944
|
-
kind:
|
|
30764
|
+
z41.object({
|
|
30765
|
+
kind: z41.literal("deferred_manual")
|
|
29945
30766
|
}),
|
|
29946
|
-
|
|
29947
|
-
kind:
|
|
30767
|
+
z41.object({
|
|
30768
|
+
kind: z41.literal("instalment_plan"),
|
|
29948
30769
|
plan: bookingInstalmentPlanSchema
|
|
29949
30770
|
}),
|
|
29950
|
-
|
|
29951
|
-
kind:
|
|
30771
|
+
z41.object({
|
|
30772
|
+
kind: z41.literal("flexible_balance"),
|
|
29952
30773
|
config: bookingFlexibleBalanceConfigSchema
|
|
29953
30774
|
})
|
|
29954
30775
|
]);
|
|
29955
|
-
var blockBookingPaymentTermsSchema =
|
|
29956
|
-
allowedOptions:
|
|
30776
|
+
var blockBookingPaymentTermsSchema = z41.object({
|
|
30777
|
+
allowedOptions: z41.array(blockBookingPaymentCollectionOptionSchema).min(1)
|
|
29957
30778
|
});
|
|
29958
30779
|
|
|
29959
30780
|
// ../blocks/src/system/blocks/courses/shared/schemas.ts
|
|
29960
|
-
import { z as
|
|
29961
|
-
var courseVenueSchema =
|
|
29962
|
-
id:
|
|
29963
|
-
name:
|
|
29964
|
-
address:
|
|
29965
|
-
});
|
|
29966
|
-
var courseSessionSchema =
|
|
29967
|
-
id:
|
|
29968
|
-
startsAt:
|
|
29969
|
-
endsAt:
|
|
29970
|
-
timeZone:
|
|
29971
|
-
capacityOverride:
|
|
29972
|
-
overrides:
|
|
29973
|
-
});
|
|
29974
|
-
var courseTeamMemberSummarySchema =
|
|
29975
|
-
id:
|
|
29976
|
-
name:
|
|
29977
|
-
roleLabel:
|
|
29978
|
-
summary:
|
|
29979
|
-
profilePath:
|
|
29980
|
-
});
|
|
29981
|
-
var coursePricingOptionSchema =
|
|
29982
|
-
id:
|
|
29983
|
-
name:
|
|
29984
|
-
description:
|
|
29985
|
-
priceAmount:
|
|
29986
|
-
isActive:
|
|
29987
|
-
sortOrder:
|
|
29988
|
-
capacityLimit:
|
|
29989
|
-
saleStartsAt:
|
|
29990
|
-
saleEndsAt:
|
|
29991
|
-
attendanceScope:
|
|
29992
|
-
});
|
|
29993
|
-
var coursePricingSchema =
|
|
29994
|
-
bookingRequirement:
|
|
29995
|
-
pricingStrategy:
|
|
29996
|
-
currency:
|
|
29997
|
-
singlePriceAmount:
|
|
30781
|
+
import { z as z42 } from "zod";
|
|
30782
|
+
var courseVenueSchema = z42.object({
|
|
30783
|
+
id: z42.string(),
|
|
30784
|
+
name: z42.string(),
|
|
30785
|
+
address: z42.string().nullable()
|
|
30786
|
+
});
|
|
30787
|
+
var courseSessionSchema = z42.object({
|
|
30788
|
+
id: z42.string(),
|
|
30789
|
+
startsAt: z42.string(),
|
|
30790
|
+
endsAt: z42.string(),
|
|
30791
|
+
timeZone: z42.string(),
|
|
30792
|
+
capacityOverride: z42.number().nullable().optional(),
|
|
30793
|
+
overrides: z42.record(z42.string(), z42.unknown()).nullable().optional()
|
|
30794
|
+
});
|
|
30795
|
+
var courseTeamMemberSummarySchema = z42.object({
|
|
30796
|
+
id: z42.string(),
|
|
30797
|
+
name: z42.string(),
|
|
30798
|
+
roleLabel: z42.string().nullable(),
|
|
30799
|
+
summary: z42.string().nullable(),
|
|
30800
|
+
profilePath: z42.string().nullable()
|
|
30801
|
+
});
|
|
30802
|
+
var coursePricingOptionSchema = z42.object({
|
|
30803
|
+
id: z42.string(),
|
|
30804
|
+
name: z42.string(),
|
|
30805
|
+
description: z42.string().nullable(),
|
|
30806
|
+
priceAmount: z42.number(),
|
|
30807
|
+
isActive: z42.boolean(),
|
|
30808
|
+
sortOrder: z42.number(),
|
|
30809
|
+
capacityLimit: z42.number().nullable(),
|
|
30810
|
+
saleStartsAt: z42.string().nullable(),
|
|
30811
|
+
saleEndsAt: z42.string().nullable(),
|
|
30812
|
+
attendanceScope: z42.enum(["in_person", "online", "both"]).nullable().optional()
|
|
30813
|
+
});
|
|
30814
|
+
var coursePricingSchema = z42.object({
|
|
30815
|
+
bookingRequirement: z42.enum(["none", "required"]),
|
|
30816
|
+
pricingStrategy: z42.enum(["free", "single", "tiered"]),
|
|
30817
|
+
currency: z42.string(),
|
|
30818
|
+
singlePriceAmount: z42.number().nullable(),
|
|
29998
30819
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
29999
|
-
options:
|
|
30000
|
-
});
|
|
30001
|
-
var publicCourseSchema =
|
|
30002
|
-
id:
|
|
30003
|
-
title:
|
|
30004
|
-
slug:
|
|
30005
|
-
description:
|
|
30006
|
-
teamMembers:
|
|
30007
|
-
enrollmentOpen:
|
|
30820
|
+
options: z42.array(coursePricingOptionSchema)
|
|
30821
|
+
});
|
|
30822
|
+
var publicCourseSchema = z42.object({
|
|
30823
|
+
id: z42.string(),
|
|
30824
|
+
title: z42.string(),
|
|
30825
|
+
slug: z42.string(),
|
|
30826
|
+
description: z42.unknown().nullable(),
|
|
30827
|
+
teamMembers: z42.array(courseTeamMemberSummarySchema).optional(),
|
|
30828
|
+
enrollmentOpen: z42.boolean(),
|
|
30008
30829
|
pricing: coursePricingSchema.optional(),
|
|
30009
|
-
priceCents:
|
|
30010
|
-
currency:
|
|
30830
|
+
priceCents: z42.number().nullable(),
|
|
30831
|
+
currency: z42.string(),
|
|
30011
30832
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
30012
|
-
enrollmentCapacity:
|
|
30013
|
-
acceptsMemberships:
|
|
30014
|
-
status:
|
|
30015
|
-
sessionsCount:
|
|
30016
|
-
enrolledCount:
|
|
30017
|
-
availableSpots:
|
|
30018
|
-
sessions:
|
|
30833
|
+
enrollmentCapacity: z42.number().nullable(),
|
|
30834
|
+
acceptsMemberships: z42.boolean(),
|
|
30835
|
+
status: z42.enum(["active", "draft", "cancelled"]),
|
|
30836
|
+
sessionsCount: z42.number(),
|
|
30837
|
+
enrolledCount: z42.number(),
|
|
30838
|
+
availableSpots: z42.number().nullable(),
|
|
30839
|
+
sessions: z42.array(courseSessionSchema),
|
|
30019
30840
|
venue: courseVenueSchema.nullable(),
|
|
30020
|
-
contentEntryId:
|
|
30841
|
+
contentEntryId: z42.string().nullable()
|
|
30021
30842
|
});
|
|
30022
|
-
var publicCoursesArraySchema =
|
|
30843
|
+
var publicCoursesArraySchema = z42.array(publicCourseSchema);
|
|
30023
30844
|
|
|
30024
30845
|
// ../blocks/src/system/blocks/events/shared/schemas.ts
|
|
30025
|
-
var eventPresetSchema =
|
|
30026
|
-
var eventScheduleScopeSchema =
|
|
30027
|
-
var eventDestinationModeSchema =
|
|
30028
|
-
var eventVenueSchema =
|
|
30029
|
-
id:
|
|
30030
|
-
name:
|
|
30031
|
-
address:
|
|
30032
|
-
location:
|
|
30033
|
-
lat:
|
|
30034
|
-
lng:
|
|
30846
|
+
var eventPresetSchema = z43.enum(["event", "class", "workshop", "retreat", "performance"]);
|
|
30847
|
+
var eventScheduleScopeSchema = z43.enum(["recurring", "oneOff"]);
|
|
30848
|
+
var eventDestinationModeSchema = z43.enum(["cms-managed", "system-managed"]);
|
|
30849
|
+
var eventVenueSchema = z43.object({
|
|
30850
|
+
id: z43.string(),
|
|
30851
|
+
name: z43.string(),
|
|
30852
|
+
address: z43.string().nullable(),
|
|
30853
|
+
location: z43.object({
|
|
30854
|
+
lat: z43.number(),
|
|
30855
|
+
lng: z43.number()
|
|
30035
30856
|
}).nullable()
|
|
30036
30857
|
});
|
|
30037
|
-
var eventCategorySchema =
|
|
30038
|
-
id:
|
|
30039
|
-
name:
|
|
30040
|
-
color:
|
|
30041
|
-
});
|
|
30042
|
-
var pricingTypeSchema =
|
|
30043
|
-
var accessRestrictionSchema =
|
|
30044
|
-
var eventPricingModeSchema =
|
|
30045
|
-
var publicCoursePriceDisplaySchema =
|
|
30046
|
-
|
|
30047
|
-
|
|
30048
|
-
|
|
30049
|
-
|
|
30858
|
+
var eventCategorySchema = z43.object({
|
|
30859
|
+
id: z43.string(),
|
|
30860
|
+
name: z43.string(),
|
|
30861
|
+
color: z43.string().nullable()
|
|
30862
|
+
});
|
|
30863
|
+
var pricingTypeSchema = z43.enum(["free", "paid"]);
|
|
30864
|
+
var accessRestrictionSchema = z43.enum(["none", "category"]);
|
|
30865
|
+
var eventPricingModeSchema = z43.enum(["single", "ticket_types"]);
|
|
30866
|
+
var publicCoursePriceDisplaySchema = z43.discriminatedUnion("kind", [
|
|
30867
|
+
z43.object({ kind: z43.literal("free"), currency: z43.string() }),
|
|
30868
|
+
z43.object({ kind: z43.literal("exact"), amount: z43.number(), currency: z43.string() }),
|
|
30869
|
+
z43.object({ kind: z43.literal("from"), amount: z43.number(), currency: z43.string() }),
|
|
30870
|
+
z43.object({ kind: z43.literal("unavailable"), currency: z43.string() })
|
|
30050
30871
|
]);
|
|
30051
|
-
var publicEventPriceDisplaySchema =
|
|
30052
|
-
|
|
30053
|
-
|
|
30054
|
-
|
|
30055
|
-
|
|
30056
|
-
|
|
30057
|
-
|
|
30872
|
+
var publicEventPriceDisplaySchema = z43.discriminatedUnion("kind", [
|
|
30873
|
+
z43.object({ kind: z43.literal("free"), currency: z43.string() }),
|
|
30874
|
+
z43.object({ kind: z43.literal("exact"), amount: z43.number(), currency: z43.string() }),
|
|
30875
|
+
z43.object({ kind: z43.literal("from"), amount: z43.number(), currency: z43.string() }),
|
|
30876
|
+
z43.object({ kind: z43.literal("range"), minAmount: z43.number(), maxAmount: z43.number(), currency: z43.string() }),
|
|
30877
|
+
z43.object({
|
|
30878
|
+
kind: z43.literal("mixed"),
|
|
30879
|
+
paidFromAmount: z43.number(),
|
|
30880
|
+
paidToAmount: z43.number(),
|
|
30881
|
+
currency: z43.string()
|
|
30882
|
+
}),
|
|
30883
|
+
z43.object({ kind: z43.literal("unavailable"), currency: z43.string() }),
|
|
30884
|
+
z43.object({ kind: z43.literal("course"), display: publicCoursePriceDisplaySchema })
|
|
30058
30885
|
]);
|
|
30059
|
-
var publicEventTicketTypePriceDisplaySchema =
|
|
30060
|
-
|
|
30061
|
-
|
|
30062
|
-
|
|
30063
|
-
|
|
30064
|
-
|
|
30886
|
+
var publicEventTicketTypePriceDisplaySchema = z43.union([
|
|
30887
|
+
z43.object({ kind: z43.literal("free"), currency: z43.string() }),
|
|
30888
|
+
z43.object({ kind: z43.literal("exact"), amount: z43.number(), currency: z43.string() }),
|
|
30889
|
+
z43.object({ kind: z43.literal("from"), amount: z43.number(), currency: z43.string() }),
|
|
30890
|
+
z43.object({ kind: z43.literal("range"), minAmount: z43.number(), maxAmount: z43.number(), currency: z43.string() }),
|
|
30891
|
+
z43.object({
|
|
30892
|
+
kind: z43.literal("mixed"),
|
|
30893
|
+
paidFromAmount: z43.number(),
|
|
30894
|
+
paidToAmount: z43.number(),
|
|
30895
|
+
currency: z43.string()
|
|
30896
|
+
}),
|
|
30897
|
+
z43.object({ kind: z43.literal("unavailable"), currency: z43.string() })
|
|
30065
30898
|
]);
|
|
30066
|
-
var publicEventAttendanceModeSchema =
|
|
30067
|
-
var publicEventAttendanceModeAvailabilitySchema =
|
|
30899
|
+
var publicEventAttendanceModeSchema = z43.enum(["in_person", "online"]);
|
|
30900
|
+
var publicEventAttendanceModeAvailabilitySchema = z43.object({
|
|
30068
30901
|
mode: publicEventAttendanceModeSchema,
|
|
30069
|
-
capacity:
|
|
30070
|
-
registeredCount:
|
|
30071
|
-
availableSpots:
|
|
30072
|
-
waitlistEnabled:
|
|
30073
|
-
});
|
|
30074
|
-
var publicEventTicketTypeAvailabilitySchema =
|
|
30075
|
-
|
|
30076
|
-
kind:
|
|
30077
|
-
remainingCapacity:
|
|
30902
|
+
capacity: z43.number().nullable(),
|
|
30903
|
+
registeredCount: z43.number(),
|
|
30904
|
+
availableSpots: z43.number().nullable(),
|
|
30905
|
+
waitlistEnabled: z43.boolean()
|
|
30906
|
+
});
|
|
30907
|
+
var publicEventTicketTypeAvailabilitySchema = z43.union([
|
|
30908
|
+
z43.object({
|
|
30909
|
+
kind: z43.literal("available"),
|
|
30910
|
+
remainingCapacity: z43.number().nullable()
|
|
30078
30911
|
}),
|
|
30079
|
-
|
|
30080
|
-
kind:
|
|
30081
|
-
reason:
|
|
30082
|
-
remainingCapacity:
|
|
30912
|
+
z43.object({
|
|
30913
|
+
kind: z43.literal("unavailable"),
|
|
30914
|
+
reason: z43.enum(["inactive", "not_on_sale_yet", "sale_ended", "sold_out", "event_sold_out"]),
|
|
30915
|
+
remainingCapacity: z43.number().nullable()
|
|
30083
30916
|
})
|
|
30084
30917
|
]);
|
|
30085
|
-
var publicEventTicketTypeSchema =
|
|
30086
|
-
id:
|
|
30087
|
-
siteId:
|
|
30088
|
-
eventSeriesId:
|
|
30089
|
-
name:
|
|
30090
|
-
description:
|
|
30091
|
-
priceAmount:
|
|
30092
|
-
isActive:
|
|
30093
|
-
sortOrder:
|
|
30094
|
-
capacityMode:
|
|
30095
|
-
capacityLimit:
|
|
30096
|
-
attendanceScope:
|
|
30097
|
-
saleStartsAt:
|
|
30098
|
-
saleEndsAt:
|
|
30918
|
+
var publicEventTicketTypeSchema = z43.object({
|
|
30919
|
+
id: z43.string(),
|
|
30920
|
+
siteId: z43.string(),
|
|
30921
|
+
eventSeriesId: z43.string(),
|
|
30922
|
+
name: z43.string(),
|
|
30923
|
+
description: z43.string().nullable(),
|
|
30924
|
+
priceAmount: z43.number(),
|
|
30925
|
+
isActive: z43.boolean(),
|
|
30926
|
+
sortOrder: z43.number(),
|
|
30927
|
+
capacityMode: z43.enum(["limited", "unlimited"]),
|
|
30928
|
+
capacityLimit: z43.number().nullable(),
|
|
30929
|
+
attendanceScope: z43.enum(["in_person", "online", "both"]).optional(),
|
|
30930
|
+
saleStartsAt: z43.string().nullable(),
|
|
30931
|
+
saleEndsAt: z43.string().nullable(),
|
|
30099
30932
|
availability: publicEventTicketTypeAvailabilitySchema,
|
|
30100
|
-
createdAt:
|
|
30101
|
-
updatedAt:
|
|
30102
|
-
});
|
|
30103
|
-
var publicEventPricingSchema =
|
|
30104
|
-
|
|
30105
|
-
kind:
|
|
30106
|
-
currency:
|
|
30107
|
-
display:
|
|
30933
|
+
createdAt: z43.string(),
|
|
30934
|
+
updatedAt: z43.string()
|
|
30935
|
+
});
|
|
30936
|
+
var publicEventPricingSchema = z43.discriminatedUnion("kind", [
|
|
30937
|
+
z43.object({
|
|
30938
|
+
kind: z43.literal("drop_in"),
|
|
30939
|
+
currency: z43.string(),
|
|
30940
|
+
display: z43.object({ kind: z43.literal("free"), currency: z43.string() })
|
|
30108
30941
|
}),
|
|
30109
|
-
|
|
30110
|
-
kind:
|
|
30111
|
-
currency:
|
|
30112
|
-
display:
|
|
30942
|
+
z43.object({
|
|
30943
|
+
kind: z43.literal("free_registration"),
|
|
30944
|
+
currency: z43.string(),
|
|
30945
|
+
display: z43.object({ kind: z43.literal("free"), currency: z43.string() })
|
|
30113
30946
|
}),
|
|
30114
|
-
|
|
30115
|
-
kind:
|
|
30116
|
-
amount:
|
|
30117
|
-
currency:
|
|
30118
|
-
display:
|
|
30947
|
+
z43.object({
|
|
30948
|
+
kind: z43.literal("single_paid"),
|
|
30949
|
+
amount: z43.number(),
|
|
30950
|
+
currency: z43.string(),
|
|
30951
|
+
display: z43.object({ kind: z43.literal("exact"), amount: z43.number(), currency: z43.string() })
|
|
30119
30952
|
}),
|
|
30120
|
-
|
|
30121
|
-
kind:
|
|
30122
|
-
currency:
|
|
30123
|
-
ticketTypes:
|
|
30953
|
+
z43.object({
|
|
30954
|
+
kind: z43.literal("ticket_types"),
|
|
30955
|
+
currency: z43.string(),
|
|
30956
|
+
ticketTypes: z43.array(publicEventTicketTypeSchema),
|
|
30124
30957
|
display: publicEventTicketTypePriceDisplaySchema
|
|
30125
30958
|
}),
|
|
30126
|
-
|
|
30127
|
-
kind:
|
|
30128
|
-
display:
|
|
30959
|
+
z43.object({
|
|
30960
|
+
kind: z43.literal("course"),
|
|
30961
|
+
display: z43.object({ kind: z43.literal("course"), display: publicCoursePriceDisplaySchema })
|
|
30129
30962
|
})
|
|
30130
30963
|
]);
|
|
30131
|
-
var publicTeamMemberSummarySchema =
|
|
30132
|
-
id:
|
|
30133
|
-
name:
|
|
30134
|
-
roleLabel:
|
|
30135
|
-
summary:
|
|
30136
|
-
profilePath:
|
|
30964
|
+
var publicTeamMemberSummarySchema = z43.object({
|
|
30965
|
+
id: z43.string(),
|
|
30966
|
+
name: z43.string(),
|
|
30967
|
+
roleLabel: z43.string().nullable(),
|
|
30968
|
+
summary: z43.string().nullable(),
|
|
30969
|
+
profilePath: z43.string().nullable()
|
|
30137
30970
|
});
|
|
30138
|
-
var publicEventSchema =
|
|
30139
|
-
kind:
|
|
30971
|
+
var publicEventSchema = z43.object({
|
|
30972
|
+
kind: z43.enum(["event", "course_session"]).optional(),
|
|
30140
30973
|
eventPreset: eventPresetSchema.optional(),
|
|
30141
30974
|
eventDestinationMode: eventDestinationModeSchema.optional(),
|
|
30142
30975
|
scheduleScope: eventScheduleScopeSchema.optional(),
|
|
30143
|
-
id:
|
|
30144
|
-
occurrenceId:
|
|
30145
|
-
seriesId:
|
|
30146
|
-
title:
|
|
30147
|
-
description:
|
|
30148
|
-
|
|
30149
|
-
|
|
30150
|
-
|
|
30976
|
+
id: z43.string(),
|
|
30977
|
+
occurrenceId: z43.string(),
|
|
30978
|
+
seriesId: z43.string(),
|
|
30979
|
+
title: z43.string(),
|
|
30980
|
+
description: z43.string().nullable(),
|
|
30981
|
+
content: z43.object({
|
|
30982
|
+
body: RichTextDocSchema.nullable().optional()
|
|
30983
|
+
}).optional(),
|
|
30984
|
+
presentation: z43.object({
|
|
30985
|
+
cardTitleOverride: z43.string().nullable().optional(),
|
|
30986
|
+
summary: z43.string().nullable().optional(),
|
|
30151
30987
|
image: mediaSchema2.nullable().optional()
|
|
30152
30988
|
}).optional(),
|
|
30153
|
-
slug:
|
|
30154
|
-
path:
|
|
30155
|
-
requiresRegistration:
|
|
30156
|
-
deliveryMode:
|
|
30157
|
-
attendanceModes:
|
|
30158
|
-
startsAt:
|
|
30159
|
-
endsAt:
|
|
30160
|
-
capacity:
|
|
30161
|
-
registeredCount:
|
|
30162
|
-
availableSpots:
|
|
30163
|
-
waitlistEnabled:
|
|
30989
|
+
slug: z43.string(),
|
|
30990
|
+
path: z43.string(),
|
|
30991
|
+
requiresRegistration: z43.boolean(),
|
|
30992
|
+
deliveryMode: z43.enum(["in_person", "online", "hybrid"]),
|
|
30993
|
+
attendanceModes: z43.array(publicEventAttendanceModeAvailabilitySchema),
|
|
30994
|
+
startsAt: z43.string(),
|
|
30995
|
+
endsAt: z43.string(),
|
|
30996
|
+
capacity: z43.number().nullable(),
|
|
30997
|
+
registeredCount: z43.number(),
|
|
30998
|
+
availableSpots: z43.number().nullable(),
|
|
30999
|
+
waitlistEnabled: z43.boolean(),
|
|
30164
31000
|
venue: eventVenueSchema.nullable(),
|
|
30165
31001
|
eventCategory: eventCategorySchema.nullable(),
|
|
30166
|
-
teamMembers:
|
|
30167
|
-
status:
|
|
30168
|
-
timeZone:
|
|
31002
|
+
teamMembers: z43.array(publicTeamMemberSummarySchema).optional(),
|
|
31003
|
+
status: z43.enum(["active", "draft", "archived"]).optional(),
|
|
31004
|
+
timeZone: z43.string(),
|
|
30169
31005
|
pricing: publicEventPricingSchema,
|
|
30170
31006
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
30171
31007
|
accessRestriction: accessRestrictionSchema,
|
|
30172
|
-
allowedCategoryIds:
|
|
30173
|
-
requireGuestDetails:
|
|
30174
|
-
acceptsPasses:
|
|
30175
|
-
acceptsMemberships:
|
|
30176
|
-
course:
|
|
30177
|
-
id:
|
|
31008
|
+
allowedCategoryIds: z43.array(z43.string()),
|
|
31009
|
+
requireGuestDetails: z43.boolean().optional(),
|
|
31010
|
+
acceptsPasses: z43.boolean().optional(),
|
|
31011
|
+
acceptsMemberships: z43.boolean().optional(),
|
|
31012
|
+
course: z43.object({
|
|
31013
|
+
id: z43.string(),
|
|
30178
31014
|
pricing: coursePricingSchema.optional(),
|
|
30179
|
-
priceCents:
|
|
30180
|
-
currency:
|
|
30181
|
-
enrollmentOpen:
|
|
31015
|
+
priceCents: z43.number().nullable(),
|
|
31016
|
+
currency: z43.string(),
|
|
31017
|
+
enrollmentOpen: z43.boolean()
|
|
30182
31018
|
}).nullable().optional()
|
|
30183
31019
|
});
|
|
30184
|
-
var publicEventsArraySchema =
|
|
31020
|
+
var publicEventsArraySchema = z43.array(publicEventSchema);
|
|
30185
31021
|
|
|
30186
31022
|
// ../blocks/src/system/blocks/events/shared/fields.ts
|
|
30187
31023
|
var cardVariantOptions2 = cardVariantRoleValues.map((value) => ({
|
|
@@ -30385,19 +31221,19 @@ function normalizeEventStaffMemberId(value) {
|
|
|
30385
31221
|
}
|
|
30386
31222
|
|
|
30387
31223
|
// ../blocks/src/system/blocks/event-registration.shared.ts
|
|
30388
|
-
import { z as
|
|
30389
|
-
var occurrenceContextSchema =
|
|
30390
|
-
id:
|
|
30391
|
-
seriesId:
|
|
30392
|
-
startsAt:
|
|
30393
|
-
endsAt:
|
|
30394
|
-
timeZone:
|
|
30395
|
-
capacityOverride:
|
|
30396
|
-
overrides:
|
|
31224
|
+
import { z as z44 } from "zod";
|
|
31225
|
+
var occurrenceContextSchema = z44.object({
|
|
31226
|
+
id: z44.string(),
|
|
31227
|
+
seriesId: z44.string(),
|
|
31228
|
+
startsAt: z44.string(),
|
|
31229
|
+
endsAt: z44.string(),
|
|
31230
|
+
timeZone: z44.string(),
|
|
31231
|
+
capacityOverride: z44.number().nullable().optional(),
|
|
31232
|
+
overrides: z44.record(z44.string(), z44.unknown()).nullable().optional()
|
|
30397
31233
|
}).nullable();
|
|
30398
31234
|
|
|
30399
31235
|
// ../blocks/src/system/runtime/nodes/event-registration.interactive.ts
|
|
30400
|
-
import { z as
|
|
31236
|
+
import { z as z46 } from "zod";
|
|
30401
31237
|
|
|
30402
31238
|
// ../blocks/src/system/constants/events.ts
|
|
30403
31239
|
var EVENT_CONTENT_TYPE_SLUGS = ["event", "events"];
|
|
@@ -30495,10 +31331,21 @@ function readLegacyPriceDisplay(value, currency) {
|
|
|
30495
31331
|
amount: readAmount(value.amount) ?? 0,
|
|
30496
31332
|
currency: displayCurrency
|
|
30497
31333
|
} : { kind: "unavailable", currency };
|
|
31334
|
+
case "range": {
|
|
31335
|
+
const minAmount = readAmount(value.minAmount);
|
|
31336
|
+
const maxAmount = readAmount(value.maxAmount);
|
|
31337
|
+
return minAmount !== null && maxAmount !== null ? {
|
|
31338
|
+
kind: "range",
|
|
31339
|
+
minAmount,
|
|
31340
|
+
maxAmount,
|
|
31341
|
+
currency: displayCurrency
|
|
31342
|
+
} : { kind: "unavailable", currency };
|
|
31343
|
+
}
|
|
30498
31344
|
case "mixed":
|
|
30499
31345
|
return readAmount(value.paidFromAmount) !== null ? {
|
|
30500
31346
|
kind: "mixed",
|
|
30501
31347
|
paidFromAmount: readAmount(value.paidFromAmount) ?? 0,
|
|
31348
|
+
paidToAmount: readAmount(value.paidToAmount) ?? readAmount(value.paidFromAmount) ?? 0,
|
|
30502
31349
|
currency: displayCurrency
|
|
30503
31350
|
} : { kind: "unavailable", currency };
|
|
30504
31351
|
case "unavailable":
|
|
@@ -30540,16 +31387,16 @@ function readAmount(value) {
|
|
|
30540
31387
|
}
|
|
30541
31388
|
|
|
30542
31389
|
// ../blocks/src/system/runtime/nodes/shared/contract-schemas.ts
|
|
30543
|
-
import { z as
|
|
30544
|
-
var previewStageSchema =
|
|
30545
|
-
var registrationButtonVariantSchema =
|
|
30546
|
-
var eventButtonVariantSchema =
|
|
30547
|
-
var eventLayoutSchema =
|
|
30548
|
-
var eventCalendarDisplayModeSchema =
|
|
30549
|
-
var columnOptionSchema =
|
|
30550
|
-
var weekStartSchema =
|
|
30551
|
-
var filterAutoShowSchema =
|
|
30552
|
-
var calendarTabViewsSchema =
|
|
31390
|
+
import { z as z45 } from "zod";
|
|
31391
|
+
var previewStageSchema = z45.enum(["preview", "published"]);
|
|
31392
|
+
var registrationButtonVariantSchema = z45.enum(["primary", "secondary", "outline"]);
|
|
31393
|
+
var eventButtonVariantSchema = z45.enum(["primary", "secondary", "outline", "link"]);
|
|
31394
|
+
var eventLayoutSchema = z45.enum(eventCalendarListLayoutValues);
|
|
31395
|
+
var eventCalendarDisplayModeSchema = z45.enum(eventCalendarDisplayModeValues);
|
|
31396
|
+
var columnOptionSchema = z45.enum(["2", "3", "4"]);
|
|
31397
|
+
var weekStartSchema = z45.enum(["sunday", "monday"]);
|
|
31398
|
+
var filterAutoShowSchema = z45.enum(["auto", "always", "never"]);
|
|
31399
|
+
var calendarTabViewsSchema = z45.enum(["both", "month", "week"]);
|
|
30553
31400
|
|
|
30554
31401
|
// ../blocks/src/system/runtime/nodes/event-registration/wizardSteps.ts
|
|
30555
31402
|
function getWizardStepsForContext(hasPreSelectedContext, needsPaymentStep) {
|
|
@@ -30609,66 +31456,68 @@ function toRegistrationEvents(events) {
|
|
|
30609
31456
|
// ../blocks/src/system/runtime/nodes/event-registration.interactive.ts
|
|
30610
31457
|
var EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS = ["Date", "Tickets", "Details"];
|
|
30611
31458
|
var EVENT_REGISTRATION_SHELL_STEP_LABELS = ["Event", "Date", "Tickets", "Details", "Payment"];
|
|
30612
|
-
var contentEntrySchema =
|
|
30613
|
-
id:
|
|
30614
|
-
slug:
|
|
30615
|
-
contentTypeSlug:
|
|
31459
|
+
var contentEntrySchema = z46.object({
|
|
31460
|
+
id: z46.string(),
|
|
31461
|
+
slug: z46.string(),
|
|
31462
|
+
contentTypeSlug: z46.string()
|
|
30616
31463
|
});
|
|
30617
|
-
var eventRegistrationPublicEventSchema =
|
|
31464
|
+
var eventRegistrationPublicEventSchema = z46.preprocess(
|
|
30618
31465
|
normalizeEventRegistrationEventInput,
|
|
30619
31466
|
publicEventSchema
|
|
30620
31467
|
);
|
|
30621
|
-
var eventRegistrationSourceSchema =
|
|
30622
|
-
siteId:
|
|
30623
|
-
apiBaseUrl:
|
|
30624
|
-
portalToken:
|
|
30625
|
-
previewToken:
|
|
31468
|
+
var eventRegistrationSourceSchema = z46.object({
|
|
31469
|
+
siteId: z46.string().optional(),
|
|
31470
|
+
apiBaseUrl: z46.string().optional(),
|
|
31471
|
+
portalToken: z46.string().nullable().optional(),
|
|
31472
|
+
previewToken: z46.string().nullable().optional(),
|
|
30626
31473
|
occurrenceContext: occurrenceContextSchema.optional(),
|
|
30627
31474
|
contentEntry: contentEntrySchema.nullable().optional(),
|
|
30628
|
-
events:
|
|
30629
|
-
className:
|
|
30630
|
-
buttonText:
|
|
30631
|
-
maxTickets:
|
|
30632
|
-
showVenue:
|
|
30633
|
-
showCapacity:
|
|
30634
|
-
successMessage:
|
|
30635
|
-
waitlistMessage:
|
|
31475
|
+
events: z46.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
31476
|
+
className: z46.string().nullable().optional(),
|
|
31477
|
+
buttonText: z46.string().nullable().optional(),
|
|
31478
|
+
maxTickets: z46.string().nullable().optional(),
|
|
31479
|
+
showVenue: z46.boolean().optional(),
|
|
31480
|
+
showCapacity: z46.boolean().optional(),
|
|
31481
|
+
successMessage: z46.string().optional(),
|
|
31482
|
+
waitlistMessage: z46.string().optional(),
|
|
30636
31483
|
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
30637
|
-
|
|
31484
|
+
overlayEnabled: z46.boolean().optional(),
|
|
31485
|
+
spamProtectionEnabled: z46.boolean().optional(),
|
|
30638
31486
|
stage: previewStageSchema.optional(),
|
|
30639
|
-
supportEmail:
|
|
30640
|
-
});
|
|
30641
|
-
var eventRegistrationDisplaySchema =
|
|
30642
|
-
kind:
|
|
30643
|
-
state:
|
|
30644
|
-
className:
|
|
30645
|
-
titleText:
|
|
30646
|
-
bodyText:
|
|
30647
|
-
stepLabels:
|
|
30648
|
-
summaryButtonText:
|
|
30649
|
-
});
|
|
30650
|
-
var eventRegistrationHydrationSchema =
|
|
31487
|
+
supportEmail: z46.string().optional()
|
|
31488
|
+
});
|
|
31489
|
+
var eventRegistrationDisplaySchema = z46.object({
|
|
31490
|
+
kind: z46.literal("event-registration"),
|
|
31491
|
+
state: z46.literal("generic-shell"),
|
|
31492
|
+
className: z46.string().nullable(),
|
|
31493
|
+
titleText: z46.string(),
|
|
31494
|
+
bodyText: z46.string(),
|
|
31495
|
+
stepLabels: z46.array(z46.enum(EVENT_REGISTRATION_SHELL_STEP_LABELS)).min(1),
|
|
31496
|
+
summaryButtonText: z46.string()
|
|
31497
|
+
});
|
|
31498
|
+
var eventRegistrationHydrationSchema = z46.object({
|
|
30651
31499
|
occurrenceContext: occurrenceContextSchema.optional(),
|
|
30652
31500
|
contentEntry: contentEntrySchema.nullable().optional(),
|
|
30653
|
-
events:
|
|
30654
|
-
maxTickets:
|
|
30655
|
-
showVenue:
|
|
30656
|
-
showCapacity:
|
|
30657
|
-
successMessage:
|
|
30658
|
-
waitlistMessage:
|
|
31501
|
+
events: z46.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
31502
|
+
maxTickets: z46.string().optional(),
|
|
31503
|
+
showVenue: z46.boolean().optional(),
|
|
31504
|
+
showCapacity: z46.boolean().optional(),
|
|
31505
|
+
successMessage: z46.string().optional(),
|
|
31506
|
+
waitlistMessage: z46.string().optional(),
|
|
30659
31507
|
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
30660
|
-
|
|
30661
|
-
|
|
31508
|
+
overlayEnabled: z46.boolean().optional(),
|
|
31509
|
+
spamProtectionEnabled: z46.boolean().optional(),
|
|
31510
|
+
supportEmail: z46.string().optional()
|
|
30662
31511
|
});
|
|
30663
|
-
var eventRegistrationRenderSchema =
|
|
31512
|
+
var eventRegistrationRenderSchema = z46.object({
|
|
30664
31513
|
display: eventRegistrationDisplaySchema,
|
|
30665
31514
|
hydration: eventRegistrationHydrationSchema
|
|
30666
31515
|
});
|
|
30667
|
-
var eventRegistrationIslandMetaCodec = createZodCodec(
|
|
30668
|
-
siteId:
|
|
30669
|
-
apiBaseUrl:
|
|
30670
|
-
portalToken:
|
|
30671
|
-
previewToken:
|
|
31516
|
+
var eventRegistrationIslandMetaCodec = createZodCodec(z46.object({
|
|
31517
|
+
siteId: z46.string().optional(),
|
|
31518
|
+
apiBaseUrl: z46.string().optional(),
|
|
31519
|
+
portalToken: z46.string().nullable().optional(),
|
|
31520
|
+
previewToken: z46.string().nullable().optional(),
|
|
30672
31521
|
stage: previewStageSchema.optional()
|
|
30673
31522
|
}));
|
|
30674
31523
|
var eventRegistrationIslandMetaKeys = defineInteractiveIslandMetaKeys(
|
|
@@ -30772,6 +31621,7 @@ var eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
30772
31621
|
successMessage: source.successMessage,
|
|
30773
31622
|
waitlistMessage: source.waitlistMessage,
|
|
30774
31623
|
buttonVariant: source.buttonVariant,
|
|
31624
|
+
overlayEnabled: source.overlayEnabled,
|
|
30775
31625
|
spamProtectionEnabled: source.spamProtectionEnabled,
|
|
30776
31626
|
supportEmail: source.supportEmail
|
|
30777
31627
|
}
|
|
@@ -30947,6 +31797,12 @@ var eventRegistrationManifest = createBlockManifest({
|
|
|
30947
31797
|
buttonVariant: {
|
|
30948
31798
|
$bind: { from: "content.buttonVariant", fallback: "primary" }
|
|
30949
31799
|
},
|
|
31800
|
+
overlayEnabled: {
|
|
31801
|
+
$bind: {
|
|
31802
|
+
from: "$root.eventRegistrationOverlayEnabled",
|
|
31803
|
+
fallback: false
|
|
31804
|
+
}
|
|
31805
|
+
},
|
|
30950
31806
|
// Event data from loader
|
|
30951
31807
|
events: { $bind: { from: "data.events" } },
|
|
30952
31808
|
// Stage for preview mode (allows registering for draft events)
|
|
@@ -30967,7 +31823,7 @@ var eventRegistrationBlockDefinition = {
|
|
|
30967
31823
|
manifest: eventRegistrationManifest,
|
|
30968
31824
|
runtime: eventRegistrationBlockRuntime,
|
|
30969
31825
|
dataSchemas: {
|
|
30970
|
-
events:
|
|
31826
|
+
events: z47.array(publicEventSchema).optional(),
|
|
30971
31827
|
occurrenceContext: occurrenceContextSchema.optional()
|
|
30972
31828
|
},
|
|
30973
31829
|
dataLoaders: {
|
|
@@ -30991,73 +31847,73 @@ var eventRegistrationBlockDefinition = {
|
|
|
30991
31847
|
};
|
|
30992
31848
|
|
|
30993
31849
|
// ../blocks/src/system/runtime/nodes/course-registration.interactive.ts
|
|
30994
|
-
import { z as
|
|
30995
|
-
var contentEntrySchema2 =
|
|
30996
|
-
id:
|
|
30997
|
-
slug:
|
|
30998
|
-
contentTypeSlug:
|
|
30999
|
-
});
|
|
31000
|
-
var courseEntrySubrouteContextSchema =
|
|
31001
|
-
|
|
31002
|
-
kind:
|
|
31003
|
-
run:
|
|
31004
|
-
courseId:
|
|
31005
|
-
seriesId:
|
|
31006
|
-
runSlug:
|
|
31007
|
-
runName:
|
|
31850
|
+
import { z as z48 } from "zod";
|
|
31851
|
+
var contentEntrySchema2 = z48.object({
|
|
31852
|
+
id: z48.string(),
|
|
31853
|
+
slug: z48.string(),
|
|
31854
|
+
contentTypeSlug: z48.string()
|
|
31855
|
+
});
|
|
31856
|
+
var courseEntrySubrouteContextSchema = z48.union([
|
|
31857
|
+
z48.object({
|
|
31858
|
+
kind: z48.literal("course-run"),
|
|
31859
|
+
run: z48.object({
|
|
31860
|
+
courseId: z48.string(),
|
|
31861
|
+
seriesId: z48.string(),
|
|
31862
|
+
runSlug: z48.string(),
|
|
31863
|
+
runName: z48.string().nullable()
|
|
31008
31864
|
})
|
|
31009
31865
|
}),
|
|
31010
|
-
|
|
31011
|
-
kind:
|
|
31866
|
+
z48.object({
|
|
31867
|
+
kind: z48.literal("event-occurrence"),
|
|
31012
31868
|
occurrence: occurrenceContextSchema
|
|
31013
31869
|
})
|
|
31014
31870
|
]);
|
|
31015
|
-
var courseRegistrationSourceSchema =
|
|
31016
|
-
siteId:
|
|
31017
|
-
apiBaseUrl:
|
|
31018
|
-
portalToken:
|
|
31871
|
+
var courseRegistrationSourceSchema = z48.object({
|
|
31872
|
+
siteId: z48.string().optional(),
|
|
31873
|
+
apiBaseUrl: z48.string().optional(),
|
|
31874
|
+
portalToken: z48.string().nullable().optional(),
|
|
31019
31875
|
contentEntry: contentEntrySchema2.nullable().optional(),
|
|
31020
31876
|
entrySubrouteContext: courseEntrySubrouteContextSchema.nullable().optional(),
|
|
31021
|
-
courses:
|
|
31022
|
-
className:
|
|
31023
|
-
showSessions:
|
|
31024
|
-
showPrice:
|
|
31025
|
-
showCapacity:
|
|
31026
|
-
showVenue:
|
|
31027
|
-
successMessage:
|
|
31028
|
-
waitlistMessage:
|
|
31029
|
-
membershipMessage:
|
|
31030
|
-
buttonText:
|
|
31877
|
+
courses: z48.array(publicCourseSchema).nullable().optional(),
|
|
31878
|
+
className: z48.string().nullable().optional(),
|
|
31879
|
+
showSessions: z48.boolean().optional(),
|
|
31880
|
+
showPrice: z48.boolean().optional(),
|
|
31881
|
+
showCapacity: z48.boolean().optional(),
|
|
31882
|
+
showVenue: z48.boolean().optional(),
|
|
31883
|
+
successMessage: z48.string().optional(),
|
|
31884
|
+
waitlistMessage: z48.string().optional(),
|
|
31885
|
+
membershipMessage: z48.string().optional(),
|
|
31886
|
+
buttonText: z48.string().nullable().optional(),
|
|
31031
31887
|
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
31032
31888
|
stage: previewStageSchema.optional()
|
|
31033
31889
|
});
|
|
31034
|
-
var courseRegistrationDisplaySchema =
|
|
31035
|
-
kind:
|
|
31036
|
-
state:
|
|
31037
|
-
className:
|
|
31038
|
-
summaryButtonText:
|
|
31890
|
+
var courseRegistrationDisplaySchema = z48.object({
|
|
31891
|
+
kind: z48.literal("course-registration"),
|
|
31892
|
+
state: z48.literal("shell"),
|
|
31893
|
+
className: z48.string().nullable(),
|
|
31894
|
+
summaryButtonText: z48.string()
|
|
31039
31895
|
});
|
|
31040
|
-
var courseRegistrationHydrationSchema =
|
|
31896
|
+
var courseRegistrationHydrationSchema = z48.object({
|
|
31041
31897
|
contentEntry: contentEntrySchema2.nullable().optional(),
|
|
31042
31898
|
entrySubrouteContext: courseEntrySubrouteContextSchema.nullable().optional(),
|
|
31043
|
-
courses:
|
|
31044
|
-
showSessions:
|
|
31045
|
-
showPrice:
|
|
31046
|
-
showCapacity:
|
|
31047
|
-
showVenue:
|
|
31048
|
-
successMessage:
|
|
31049
|
-
waitlistMessage:
|
|
31050
|
-
membershipMessage:
|
|
31899
|
+
courses: z48.array(publicCourseSchema).nullable().optional(),
|
|
31900
|
+
showSessions: z48.boolean().optional(),
|
|
31901
|
+
showPrice: z48.boolean().optional(),
|
|
31902
|
+
showCapacity: z48.boolean().optional(),
|
|
31903
|
+
showVenue: z48.boolean().optional(),
|
|
31904
|
+
successMessage: z48.string().optional(),
|
|
31905
|
+
waitlistMessage: z48.string().optional(),
|
|
31906
|
+
membershipMessage: z48.string().optional(),
|
|
31051
31907
|
buttonVariant: registrationButtonVariantSchema.optional()
|
|
31052
31908
|
});
|
|
31053
|
-
var courseRegistrationRenderSchema =
|
|
31909
|
+
var courseRegistrationRenderSchema = z48.object({
|
|
31054
31910
|
display: courseRegistrationDisplaySchema,
|
|
31055
31911
|
hydration: courseRegistrationHydrationSchema
|
|
31056
31912
|
});
|
|
31057
|
-
var courseRegistrationIslandMetaCodec = createZodCodec(
|
|
31058
|
-
siteId:
|
|
31059
|
-
apiBaseUrl:
|
|
31060
|
-
portalToken:
|
|
31913
|
+
var courseRegistrationIslandMetaCodec = createZodCodec(z48.object({
|
|
31914
|
+
siteId: z48.string().optional(),
|
|
31915
|
+
apiBaseUrl: z48.string().optional(),
|
|
31916
|
+
portalToken: z48.string().nullable().optional(),
|
|
31061
31917
|
stage: previewStageSchema.optional()
|
|
31062
31918
|
}));
|
|
31063
31919
|
var courseRegistrationIslandMetaKeys = defineInteractiveIslandMetaKeys(
|
|
@@ -31317,32 +32173,32 @@ var courseRegistrationBlockDefinition = {
|
|
|
31317
32173
|
};
|
|
31318
32174
|
|
|
31319
32175
|
// ../blocks/src/system/blocks/event-details.ts
|
|
31320
|
-
import { z as
|
|
32176
|
+
import { z as z50 } from "zod";
|
|
31321
32177
|
|
|
31322
32178
|
// ../blocks/src/system/blocks/shop.shared.ts
|
|
31323
|
-
import { z as
|
|
31324
|
-
var publicPassProductSchema =
|
|
31325
|
-
id:
|
|
31326
|
-
productUseCase:
|
|
31327
|
-
name:
|
|
31328
|
-
description:
|
|
31329
|
-
price:
|
|
31330
|
-
currency:
|
|
31331
|
-
creditsTotal:
|
|
31332
|
-
pricePerCredit:
|
|
31333
|
-
validDays:
|
|
31334
|
-
eligibleCategoryIds:
|
|
31335
|
-
eligibleCategoryNames:
|
|
31336
|
-
});
|
|
31337
|
-
var publicMembershipProductSchema =
|
|
31338
|
-
id:
|
|
31339
|
-
name:
|
|
31340
|
-
description:
|
|
31341
|
-
price:
|
|
31342
|
-
currency:
|
|
31343
|
-
billingInterval:
|
|
31344
|
-
eligibleCategoryIds:
|
|
31345
|
-
eligibleCategoryNames:
|
|
32179
|
+
import { z as z49 } from "zod";
|
|
32180
|
+
var publicPassProductSchema = z49.object({
|
|
32181
|
+
id: z49.string(),
|
|
32182
|
+
productUseCase: z49.enum(["event_pass", "appointment_package"]).default("event_pass"),
|
|
32183
|
+
name: z49.string(),
|
|
32184
|
+
description: z49.string().nullable(),
|
|
32185
|
+
price: z49.number(),
|
|
32186
|
+
currency: z49.string(),
|
|
32187
|
+
creditsTotal: z49.number(),
|
|
32188
|
+
pricePerCredit: z49.number(),
|
|
32189
|
+
validDays: z49.number().nullable(),
|
|
32190
|
+
eligibleCategoryIds: z49.array(z49.string()),
|
|
32191
|
+
eligibleCategoryNames: z49.array(z49.string())
|
|
32192
|
+
});
|
|
32193
|
+
var publicMembershipProductSchema = z49.object({
|
|
32194
|
+
id: z49.string(),
|
|
32195
|
+
name: z49.string(),
|
|
32196
|
+
description: z49.string().nullable(),
|
|
32197
|
+
price: z49.number(),
|
|
32198
|
+
currency: z49.string(),
|
|
32199
|
+
billingInterval: z49.enum(["month", "year"]),
|
|
32200
|
+
eligibleCategoryIds: z49.array(z49.string()),
|
|
32201
|
+
eligibleCategoryNames: z49.array(z49.string())
|
|
31346
32202
|
});
|
|
31347
32203
|
|
|
31348
32204
|
// ../blocks/src/system/blocks/event-details.ts
|
|
@@ -31477,40 +32333,40 @@ var eventDetailsManifest = createBlockManifest({
|
|
|
31477
32333
|
})
|
|
31478
32334
|
]
|
|
31479
32335
|
});
|
|
31480
|
-
var occurrenceContextSchema2 =
|
|
31481
|
-
id:
|
|
31482
|
-
seriesId:
|
|
31483
|
-
startsAt:
|
|
31484
|
-
endsAt:
|
|
31485
|
-
timeZone:
|
|
31486
|
-
capacityOverride:
|
|
31487
|
-
overrides:
|
|
32336
|
+
var occurrenceContextSchema2 = z50.object({
|
|
32337
|
+
id: z50.string(),
|
|
32338
|
+
seriesId: z50.string(),
|
|
32339
|
+
startsAt: z50.string(),
|
|
32340
|
+
endsAt: z50.string(),
|
|
32341
|
+
timeZone: z50.string(),
|
|
32342
|
+
capacityOverride: z50.number().nullable().optional(),
|
|
32343
|
+
overrides: z50.record(z50.string(), z50.unknown()).nullable().optional()
|
|
31488
32344
|
}).nullable();
|
|
31489
|
-
var eventAutoApplyDiscountPreviewBaseSchema =
|
|
31490
|
-
id:
|
|
31491
|
-
publicLabel:
|
|
31492
|
-
description:
|
|
31493
|
-
minTicketsRequired:
|
|
32345
|
+
var eventAutoApplyDiscountPreviewBaseSchema = z50.object({
|
|
32346
|
+
id: z50.string(),
|
|
32347
|
+
publicLabel: z50.string(),
|
|
32348
|
+
description: z50.string().nullable(),
|
|
32349
|
+
minTicketsRequired: z50.number().nullable()
|
|
31494
32350
|
});
|
|
31495
|
-
var eventAutoApplyDiscountPreviewSchema =
|
|
32351
|
+
var eventAutoApplyDiscountPreviewSchema = z50.discriminatedUnion("discountType", [
|
|
31496
32352
|
eventAutoApplyDiscountPreviewBaseSchema.extend({
|
|
31497
|
-
discountType:
|
|
31498
|
-
discountPercent:
|
|
31499
|
-
discountAmountCents:
|
|
32353
|
+
discountType: z50.literal("percent"),
|
|
32354
|
+
discountPercent: z50.number(),
|
|
32355
|
+
discountAmountCents: z50.null()
|
|
31500
32356
|
}),
|
|
31501
32357
|
eventAutoApplyDiscountPreviewBaseSchema.extend({
|
|
31502
|
-
discountType:
|
|
31503
|
-
discountPercent:
|
|
31504
|
-
discountAmountCents:
|
|
32358
|
+
discountType: z50.literal("fixed"),
|
|
32359
|
+
discountPercent: z50.null(),
|
|
32360
|
+
discountAmountCents: z50.number()
|
|
31505
32361
|
})
|
|
31506
32362
|
]);
|
|
31507
32363
|
var eventDetailsBlockDefinition = {
|
|
31508
32364
|
manifest: eventDetailsManifest,
|
|
31509
32365
|
dataSchemas: {
|
|
31510
|
-
eventDetailsData:
|
|
32366
|
+
eventDetailsData: z50.object({
|
|
31511
32367
|
events: publicEventsArraySchema,
|
|
31512
|
-
sitePasses:
|
|
31513
|
-
siteMemberships:
|
|
32368
|
+
sitePasses: z50.object({ passes: z50.array(publicPassProductSchema) }),
|
|
32369
|
+
siteMemberships: z50.object({ memberships: z50.array(publicMembershipProductSchema) }),
|
|
31514
32370
|
autoApplyDiscount: eventAutoApplyDiscountPreviewSchema.nullable().optional().default(null)
|
|
31515
32371
|
}).optional(),
|
|
31516
32372
|
occurrenceContext: occurrenceContextSchema2.optional()
|
|
@@ -31834,7 +32690,7 @@ var eventSpotlightBlockDefinition = {
|
|
|
31834
32690
|
};
|
|
31835
32691
|
|
|
31836
32692
|
// ../blocks/src/system/runtime/nodes/events/EventListing.interactive.ts
|
|
31837
|
-
import { z as
|
|
32693
|
+
import { z as z52 } from "zod";
|
|
31838
32694
|
|
|
31839
32695
|
// ../blocks/src/system/runtime/nodes/events/shared/utils.ts
|
|
31840
32696
|
var COLUMN_CLASSES = {
|
|
@@ -31942,16 +32798,16 @@ function computeMediaTransformStyle(value, style, targetAspectRatio, options) {
|
|
|
31942
32798
|
}
|
|
31943
32799
|
|
|
31944
32800
|
// ../blocks/src/system/runtime/nodes/events/shared/listOptions.ts
|
|
31945
|
-
import { z as
|
|
32801
|
+
import { z as z51 } from "zod";
|
|
31946
32802
|
var eventPageSizeValues = [3, 6, 10, 12, 20, 24, 30];
|
|
31947
|
-
var eventPageSizeSchema =
|
|
31948
|
-
|
|
31949
|
-
|
|
31950
|
-
|
|
31951
|
-
|
|
31952
|
-
|
|
31953
|
-
|
|
31954
|
-
|
|
32803
|
+
var eventPageSizeSchema = z51.union([
|
|
32804
|
+
z51.literal(3),
|
|
32805
|
+
z51.literal(6),
|
|
32806
|
+
z51.literal(10),
|
|
32807
|
+
z51.literal(12),
|
|
32808
|
+
z51.literal(20),
|
|
32809
|
+
z51.literal(24),
|
|
32810
|
+
z51.literal(30)
|
|
31955
32811
|
]);
|
|
31956
32812
|
var eventPageSizeSet = new Set(eventPageSizeValues);
|
|
31957
32813
|
function resolveEventPageSize(value, fallback = 12) {
|
|
@@ -31961,15 +32817,15 @@ function resolveEventPageSize(value, fallback = 12) {
|
|
|
31961
32817
|
function resolveEventCalendarListPageSize(input) {
|
|
31962
32818
|
return resolveEventPageSize(input.eventsPerPage);
|
|
31963
32819
|
}
|
|
31964
|
-
var eventListPaginationActionSchema =
|
|
31965
|
-
|
|
31966
|
-
kind:
|
|
31967
|
-
label:
|
|
32820
|
+
var eventListPaginationActionSchema = z51.discriminatedUnion("kind", [
|
|
32821
|
+
z51.object({
|
|
32822
|
+
kind: z51.literal("loadMore"),
|
|
32823
|
+
label: z51.string()
|
|
31968
32824
|
}),
|
|
31969
|
-
|
|
31970
|
-
kind:
|
|
31971
|
-
label:
|
|
31972
|
-
href:
|
|
32825
|
+
z51.object({
|
|
32826
|
+
kind: z51.literal("seeAllLink"),
|
|
32827
|
+
label: z51.string(),
|
|
32828
|
+
href: z51.string()
|
|
31973
32829
|
})
|
|
31974
32830
|
]);
|
|
31975
32831
|
function resolveEventListPaginationAction(input) {
|
|
@@ -31982,89 +32838,89 @@ function resolveEventListPaginationAction(input) {
|
|
|
31982
32838
|
}
|
|
31983
32839
|
|
|
31984
32840
|
// ../blocks/src/system/runtime/nodes/events/EventListing.interactive.ts
|
|
31985
|
-
var legacyEventCardVariantSchema =
|
|
31986
|
-
var eventCardVariantInputSchema =
|
|
32841
|
+
var legacyEventCardVariantSchema = z52.enum(["variant1", "variant2"]);
|
|
32842
|
+
var eventCardVariantInputSchema = z52.union([
|
|
31987
32843
|
cardVariantRoleSchema,
|
|
31988
32844
|
legacyEventCardVariantSchema
|
|
31989
32845
|
]);
|
|
31990
|
-
var cardOrientationSchema =
|
|
31991
|
-
var eventBlockKindSchema =
|
|
31992
|
-
var eventSurfaceScopeSchema =
|
|
31993
|
-
var eventScheduleScopeSchema2 =
|
|
31994
|
-
var eventListingSourceSchema =
|
|
31995
|
-
events:
|
|
31996
|
-
siteId:
|
|
31997
|
-
apiBaseUrl:
|
|
32846
|
+
var cardOrientationSchema = z52.enum(["vertical", "horizontal"]);
|
|
32847
|
+
var eventBlockKindSchema = z52.enum(eventBlockKindValues);
|
|
32848
|
+
var eventSurfaceScopeSchema = z52.enum(eventSurfaceScopeValues);
|
|
32849
|
+
var eventScheduleScopeSchema2 = z52.enum(eventScheduleScopeValues);
|
|
32850
|
+
var eventListingSourceSchema = z52.object({
|
|
32851
|
+
events: z52.array(publicEventSchema).nullable().optional(),
|
|
32852
|
+
siteId: z52.string(),
|
|
32853
|
+
apiBaseUrl: z52.string().optional(),
|
|
31998
32854
|
stage: previewStageSchema.optional(),
|
|
31999
32855
|
layout: eventLayoutSchema.optional(),
|
|
32000
32856
|
columns: columnOptionSchema.optional(),
|
|
32001
|
-
eventsPerPage:
|
|
32002
|
-
paginationMode:
|
|
32003
|
-
seeAllUrl:
|
|
32004
|
-
loadMoreText:
|
|
32857
|
+
eventsPerPage: z52.string().optional(),
|
|
32858
|
+
paginationMode: z52.enum(["loadMore", "seeAllLink"]).optional(),
|
|
32859
|
+
seeAllUrl: z52.string().optional(),
|
|
32860
|
+
loadMoreText: z52.string().optional(),
|
|
32005
32861
|
cardVariant: eventCardVariantInputSchema.optional(),
|
|
32006
32862
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
32007
|
-
buttonText:
|
|
32008
|
-
showVenue:
|
|
32009
|
-
showMap:
|
|
32010
|
-
showCapacity:
|
|
32011
|
-
emptyMessage:
|
|
32012
|
-
className:
|
|
32013
|
-
showFilters:
|
|
32863
|
+
buttonText: z52.string().optional(),
|
|
32864
|
+
showVenue: z52.boolean().optional(),
|
|
32865
|
+
showMap: z52.boolean().optional(),
|
|
32866
|
+
showCapacity: z52.boolean().optional(),
|
|
32867
|
+
emptyMessage: z52.string().optional(),
|
|
32868
|
+
className: z52.string().optional(),
|
|
32869
|
+
showFilters: z52.boolean().nullable().optional(),
|
|
32014
32870
|
showCategoryFilter: filterAutoShowSchema.optional(),
|
|
32015
|
-
showVenueFilter:
|
|
32016
|
-
showStaffFilter:
|
|
32871
|
+
showVenueFilter: z52.boolean().nullable().optional(),
|
|
32872
|
+
showStaffFilter: z52.boolean().nullable().optional(),
|
|
32017
32873
|
eventKind: eventBlockKindSchema.nullable().optional(),
|
|
32018
32874
|
eventSurface: eventSurfaceScopeSchema.nullable().optional(),
|
|
32019
|
-
filterEventPresets:
|
|
32875
|
+
filterEventPresets: z52.union([z52.string(), z52.array(z52.string())]).nullable().optional(),
|
|
32020
32876
|
scheduleScope: eventScheduleScopeSchema2.nullable().optional(),
|
|
32021
|
-
filterCategoryIds:
|
|
32022
|
-
filterStaffMemberId:
|
|
32023
|
-
filterVenueId:
|
|
32877
|
+
filterCategoryIds: z52.string().nullable().optional(),
|
|
32878
|
+
filterStaffMemberId: z52.string().nullable().optional(),
|
|
32879
|
+
filterVenueId: z52.string().nullable().optional()
|
|
32024
32880
|
});
|
|
32025
|
-
var eventListingDisplaySchema =
|
|
32026
|
-
kind:
|
|
32027
|
-
state:
|
|
32881
|
+
var eventListingDisplaySchema = z52.object({
|
|
32882
|
+
kind: z52.literal("event-listing"),
|
|
32883
|
+
state: z52.enum(["loading", "empty", "ready"]),
|
|
32028
32884
|
listLayout: eventLayoutSchema,
|
|
32029
|
-
className:
|
|
32030
|
-
emptyMessage:
|
|
32031
|
-
loadingMessage:
|
|
32032
|
-
containerClass:
|
|
32885
|
+
className: z52.string().nullable(),
|
|
32886
|
+
emptyMessage: z52.string(),
|
|
32887
|
+
loadingMessage: z52.string(),
|
|
32888
|
+
containerClass: z52.string(),
|
|
32033
32889
|
cardVariant: cardVariantRoleSchema,
|
|
32034
32890
|
buttonVariant: eventButtonVariantSchema,
|
|
32035
|
-
buttonText:
|
|
32036
|
-
showVenue:
|
|
32037
|
-
showMap:
|
|
32038
|
-
showCapacity:
|
|
32891
|
+
buttonText: z52.string(),
|
|
32892
|
+
showVenue: z52.boolean(),
|
|
32893
|
+
showMap: z52.boolean(),
|
|
32894
|
+
showCapacity: z52.boolean(),
|
|
32039
32895
|
orientation: cardOrientationSchema,
|
|
32040
|
-
events:
|
|
32896
|
+
events: z52.array(publicEventSchema)
|
|
32041
32897
|
});
|
|
32042
|
-
var eventListingHydrationSchema =
|
|
32043
|
-
siteId:
|
|
32898
|
+
var eventListingHydrationSchema = z52.object({
|
|
32899
|
+
siteId: z52.string(),
|
|
32044
32900
|
stage: previewStageSchema.optional(),
|
|
32045
32901
|
eventsPerPage: eventPageSizeSchema,
|
|
32046
32902
|
paginationAction: eventListPaginationActionSchema,
|
|
32047
|
-
showFilters:
|
|
32903
|
+
showFilters: z52.boolean(),
|
|
32048
32904
|
showCategoryFilter: filterAutoShowSchema,
|
|
32049
|
-
showVenueFilter:
|
|
32050
|
-
showStaffFilter:
|
|
32905
|
+
showVenueFilter: z52.boolean(),
|
|
32906
|
+
showStaffFilter: z52.boolean(),
|
|
32051
32907
|
eventKind: eventBlockKindSchema,
|
|
32052
32908
|
eventSurface: eventSurfaceScopeSchema,
|
|
32053
|
-
filterEventPresets:
|
|
32909
|
+
filterEventPresets: z52.string().nullable(),
|
|
32054
32910
|
scheduleScope: eventScheduleScopeSchema2,
|
|
32055
|
-
filterCategoryIds:
|
|
32056
|
-
filterStaffMemberId:
|
|
32057
|
-
filterVenueId:
|
|
32058
|
-
fetchInitialEventsOnMount:
|
|
32911
|
+
filterCategoryIds: z52.string().nullable().optional(),
|
|
32912
|
+
filterStaffMemberId: z52.string().nullable().optional(),
|
|
32913
|
+
filterVenueId: z52.string().nullable().optional(),
|
|
32914
|
+
fetchInitialEventsOnMount: z52.boolean()
|
|
32059
32915
|
});
|
|
32060
|
-
var eventListingRenderSchema =
|
|
32916
|
+
var eventListingRenderSchema = z52.object({
|
|
32061
32917
|
display: eventListingDisplaySchema,
|
|
32062
32918
|
hydration: eventListingHydrationSchema
|
|
32063
32919
|
});
|
|
32064
32920
|
var eventListingIslandMetaCodec = createZodCodec(
|
|
32065
|
-
|
|
32066
|
-
siteId:
|
|
32067
|
-
apiBaseUrl:
|
|
32921
|
+
z52.object({
|
|
32922
|
+
siteId: z52.string(),
|
|
32923
|
+
apiBaseUrl: z52.string().optional(),
|
|
32068
32924
|
stage: previewStageSchema.optional()
|
|
32069
32925
|
})
|
|
32070
32926
|
);
|
|
@@ -32431,15 +33287,15 @@ var eventListingBlockDefinition = {
|
|
|
32431
33287
|
};
|
|
32432
33288
|
|
|
32433
33289
|
// ../blocks/src/system/runtime/nodes/events/EventCalendar.interactive.ts
|
|
32434
|
-
import { z as
|
|
32435
|
-
var eventBlockKindSchema2 =
|
|
32436
|
-
var eventSurfaceScopeSchema2 =
|
|
32437
|
-
var eventScheduleScopeSchema3 =
|
|
32438
|
-
var eventCalendarSourceSchema =
|
|
33290
|
+
import { z as z53 } from "zod";
|
|
33291
|
+
var eventBlockKindSchema2 = z53.enum(eventBlockKindValues);
|
|
33292
|
+
var eventSurfaceScopeSchema2 = z53.enum(eventSurfaceScopeValues);
|
|
33293
|
+
var eventScheduleScopeSchema3 = z53.enum(eventScheduleScopeValues);
|
|
33294
|
+
var eventCalendarSourceSchema = z53.object(
|
|
32439
33295
|
{
|
|
32440
|
-
events:
|
|
32441
|
-
siteId:
|
|
32442
|
-
apiBaseUrl:
|
|
33296
|
+
events: z53.array(publicEventSchema).nullable().optional(),
|
|
33297
|
+
siteId: z53.string(),
|
|
33298
|
+
apiBaseUrl: z53.string().optional(),
|
|
32443
33299
|
stage: previewStageSchema.optional(),
|
|
32444
33300
|
variant: eventCalendarDisplayModeSchema.nullable().optional(),
|
|
32445
33301
|
displayMode: eventCalendarDisplayModeSchema.nullable().optional(),
|
|
@@ -32447,78 +33303,78 @@ var eventCalendarSourceSchema = z52.object(
|
|
|
32447
33303
|
listColumns: columnOptionSchema.optional(),
|
|
32448
33304
|
layout: eventLayoutSchema.optional(),
|
|
32449
33305
|
columns: columnOptionSchema.optional(),
|
|
32450
|
-
eventsPerPage:
|
|
32451
|
-
paginationMode:
|
|
32452
|
-
seeAllUrl:
|
|
32453
|
-
loadMoreText:
|
|
33306
|
+
eventsPerPage: z53.string().optional(),
|
|
33307
|
+
paginationMode: z53.enum(["loadMore", "seeAllLink"]).optional(),
|
|
33308
|
+
seeAllUrl: z53.string().optional(),
|
|
33309
|
+
loadMoreText: z53.string().optional(),
|
|
32454
33310
|
startOfWeek: weekStartSchema.optional(),
|
|
32455
33311
|
calendarTabViews: calendarTabViewsSchema.optional(),
|
|
32456
|
-
showFilters:
|
|
33312
|
+
showFilters: z53.boolean().nullable().optional(),
|
|
32457
33313
|
showCategoryFilter: filterAutoShowSchema.optional(),
|
|
32458
|
-
showVenueFilter:
|
|
32459
|
-
showStaffFilter:
|
|
33314
|
+
showVenueFilter: z53.boolean().nullable().optional(),
|
|
33315
|
+
showStaffFilter: z53.boolean().nullable().optional(),
|
|
32460
33316
|
kind: eventBlockKindSchema2.nullable().optional(),
|
|
32461
33317
|
eventSurface: eventSurfaceScopeSchema2.nullable().optional(),
|
|
32462
|
-
filterEventPresets:
|
|
33318
|
+
filterEventPresets: z53.union([z53.string(), z53.array(z53.string())]).nullable().optional(),
|
|
32463
33319
|
scheduleScope: eventScheduleScopeSchema3.nullable().optional(),
|
|
32464
|
-
filterCategoryIds:
|
|
32465
|
-
filterStaffMemberId:
|
|
32466
|
-
filterVenueId:
|
|
33320
|
+
filterCategoryIds: z53.union([z53.string(), z53.array(z53.string())]).nullable().optional(),
|
|
33321
|
+
filterStaffMemberId: z53.string().nullable().optional(),
|
|
33322
|
+
filterVenueId: z53.string().nullable().optional(),
|
|
32467
33323
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
32468
|
-
buttonText:
|
|
32469
|
-
showVenue:
|
|
32470
|
-
showMap:
|
|
32471
|
-
showCapacity:
|
|
32472
|
-
emptyMessage:
|
|
32473
|
-
className:
|
|
33324
|
+
buttonText: z53.string().optional(),
|
|
33325
|
+
showVenue: z53.boolean().nullable().optional(),
|
|
33326
|
+
showMap: z53.boolean().nullable().optional(),
|
|
33327
|
+
showCapacity: z53.boolean().nullable().optional(),
|
|
33328
|
+
emptyMessage: z53.string().optional(),
|
|
33329
|
+
className: z53.string().optional()
|
|
32474
33330
|
}
|
|
32475
33331
|
);
|
|
32476
|
-
var eventCalendarDisplaySchema =
|
|
32477
|
-
kind:
|
|
33332
|
+
var eventCalendarDisplaySchema = z53.object({
|
|
33333
|
+
kind: z53.literal("event-calendar"),
|
|
32478
33334
|
displayMode: eventCalendarDisplayModeSchema,
|
|
32479
|
-
className:
|
|
32480
|
-
events:
|
|
33335
|
+
className: z53.string().nullable(),
|
|
33336
|
+
events: z53.array(publicEventSchema),
|
|
32481
33337
|
listLayout: eventLayoutSchema,
|
|
32482
33338
|
listColumns: columnOptionSchema,
|
|
32483
33339
|
eventsPerPage: eventPageSizeSchema,
|
|
32484
33340
|
paginationAction: eventListPaginationActionSchema,
|
|
32485
33341
|
startOfWeek: weekStartSchema,
|
|
32486
33342
|
calendarTabViews: calendarTabViewsSchema,
|
|
32487
|
-
showFilters:
|
|
33343
|
+
showFilters: z53.boolean(),
|
|
32488
33344
|
showCategoryFilter: filterAutoShowSchema,
|
|
32489
|
-
showVenueFilter:
|
|
32490
|
-
showStaffFilter:
|
|
33345
|
+
showVenueFilter: z53.boolean(),
|
|
33346
|
+
showStaffFilter: z53.boolean(),
|
|
32491
33347
|
eventKind: eventBlockKindSchema2,
|
|
32492
33348
|
eventSurface: eventSurfaceScopeSchema2,
|
|
32493
|
-
filterEventPresets:
|
|
33349
|
+
filterEventPresets: z53.string().nullable(),
|
|
32494
33350
|
scheduleScope: eventScheduleScopeSchema3,
|
|
32495
|
-
filterCategoryIds:
|
|
32496
|
-
filterStaffMemberId:
|
|
32497
|
-
filterVenueId:
|
|
33351
|
+
filterCategoryIds: z53.string().nullable(),
|
|
33352
|
+
filterStaffMemberId: z53.string().nullable(),
|
|
33353
|
+
filterVenueId: z53.string().nullable(),
|
|
32498
33354
|
buttonVariant: eventButtonVariantSchema,
|
|
32499
|
-
buttonText:
|
|
32500
|
-
showVenue:
|
|
32501
|
-
showMap:
|
|
32502
|
-
showCapacity:
|
|
32503
|
-
emptyMessage:
|
|
32504
|
-
});
|
|
32505
|
-
var eventCalendarHydrationSchema =
|
|
32506
|
-
siteId:
|
|
33355
|
+
buttonText: z53.string(),
|
|
33356
|
+
showVenue: z53.boolean(),
|
|
33357
|
+
showMap: z53.boolean(),
|
|
33358
|
+
showCapacity: z53.boolean(),
|
|
33359
|
+
emptyMessage: z53.string()
|
|
33360
|
+
});
|
|
33361
|
+
var eventCalendarHydrationSchema = z53.object({
|
|
33362
|
+
siteId: z53.string(),
|
|
32507
33363
|
stage: previewStageSchema.optional(),
|
|
32508
|
-
prefetchedEvents:
|
|
33364
|
+
prefetchedEvents: z53.boolean(),
|
|
32509
33365
|
eventKind: eventBlockKindSchema2,
|
|
32510
33366
|
eventSurface: eventSurfaceScopeSchema2,
|
|
32511
|
-
filterEventPresets:
|
|
33367
|
+
filterEventPresets: z53.string().nullable(),
|
|
32512
33368
|
scheduleScope: eventScheduleScopeSchema3
|
|
32513
33369
|
});
|
|
32514
|
-
var eventCalendarRenderSchema =
|
|
33370
|
+
var eventCalendarRenderSchema = z53.object({
|
|
32515
33371
|
display: eventCalendarDisplaySchema,
|
|
32516
33372
|
hydration: eventCalendarHydrationSchema
|
|
32517
33373
|
});
|
|
32518
33374
|
var eventCalendarIslandMetaCodec = createZodCodec(
|
|
32519
|
-
|
|
32520
|
-
siteId:
|
|
32521
|
-
apiBaseUrl:
|
|
33375
|
+
z53.object({
|
|
33376
|
+
siteId: z53.string(),
|
|
33377
|
+
apiBaseUrl: z53.string().optional(),
|
|
32522
33378
|
stage: previewStageSchema.optional()
|
|
32523
33379
|
})
|
|
32524
33380
|
);
|
|
@@ -33227,7 +34083,7 @@ var eventCalendarBlockDefinition = {
|
|
|
33227
34083
|
};
|
|
33228
34084
|
|
|
33229
34085
|
// ../blocks/src/system/blocks/offerings-preview/index.ts
|
|
33230
|
-
import { z as
|
|
34086
|
+
import { z as z54 } from "zod";
|
|
33231
34087
|
|
|
33232
34088
|
// ../blocks/src/system/blocks/offerings-preview/model.ts
|
|
33233
34089
|
var OFFERINGS_PREVIEW_DEFAULT_ITEM_LIMIT = "3";
|
|
@@ -33319,13 +34175,13 @@ function isRecord5(value) {
|
|
|
33319
34175
|
}
|
|
33320
34176
|
|
|
33321
34177
|
// ../blocks/src/system/blocks/offerings-preview/index.ts
|
|
33322
|
-
var publicRouteCandidatesSchema =
|
|
33323
|
-
routes:
|
|
33324
|
-
entityId:
|
|
33325
|
-
path:
|
|
33326
|
-
title:
|
|
33327
|
-
kind:
|
|
33328
|
-
contentTypeKey:
|
|
34178
|
+
var publicRouteCandidatesSchema = z54.object({
|
|
34179
|
+
routes: z54.array(z54.object({
|
|
34180
|
+
entityId: z54.string(),
|
|
34181
|
+
path: z54.string(),
|
|
34182
|
+
title: z54.string(),
|
|
34183
|
+
kind: z54.enum(["page", "content"]),
|
|
34184
|
+
contentTypeKey: z54.string().nullable().optional()
|
|
33329
34185
|
}))
|
|
33330
34186
|
});
|
|
33331
34187
|
var groupOverrideFields = [
|
|
@@ -33723,7 +34579,7 @@ function isRecord6(value) {
|
|
|
33723
34579
|
}
|
|
33724
34580
|
|
|
33725
34581
|
// ../blocks/src/system/blocks/embed.ts
|
|
33726
|
-
import { z as
|
|
34582
|
+
import { z as z55 } from "zod";
|
|
33727
34583
|
var embedFields = [
|
|
33728
34584
|
// Section heading
|
|
33729
34585
|
parseFieldDefinition({
|
|
@@ -33954,18 +34810,18 @@ var embedManifest = createBlockManifest({
|
|
|
33954
34810
|
spacing: "lg"
|
|
33955
34811
|
}
|
|
33956
34812
|
});
|
|
33957
|
-
var embedEntrySchema =
|
|
33958
|
-
id:
|
|
33959
|
-
identifier:
|
|
33960
|
-
title:
|
|
33961
|
-
slug:
|
|
33962
|
-
content:
|
|
33963
|
-
publishedAt:
|
|
34813
|
+
var embedEntrySchema = z55.object({
|
|
34814
|
+
id: z55.string(),
|
|
34815
|
+
identifier: z55.string(),
|
|
34816
|
+
title: z55.string(),
|
|
34817
|
+
slug: z55.string().nullable().optional(),
|
|
34818
|
+
content: z55.record(z55.string(), z55.unknown()).optional(),
|
|
34819
|
+
publishedAt: z55.string().nullable().optional()
|
|
33964
34820
|
});
|
|
33965
34821
|
var embedBlockDefinition = {
|
|
33966
34822
|
manifest: embedManifest,
|
|
33967
34823
|
dataSchemas: {
|
|
33968
|
-
entries:
|
|
34824
|
+
entries: z55.array(embedEntrySchema).optional()
|
|
33969
34825
|
},
|
|
33970
34826
|
dataLoaders: {
|
|
33971
34827
|
entries: {
|
|
@@ -35149,56 +36005,56 @@ var fileDownloadBlockDefinition = {
|
|
|
35149
36005
|
};
|
|
35150
36006
|
|
|
35151
36007
|
// ../blocks/src/system/blocks/shop.ts
|
|
35152
|
-
import { z as
|
|
36008
|
+
import { z as z59 } from "zod";
|
|
35153
36009
|
|
|
35154
36010
|
// ../blocks/src/system/runtime/nodes/shop.interactive.ts
|
|
35155
|
-
import { z as
|
|
36011
|
+
import { z as z58 } from "zod";
|
|
35156
36012
|
|
|
35157
36013
|
// ../blocks/src/system/blocks/products/shared.ts
|
|
35158
|
-
import { z as
|
|
35159
|
-
var publicProductVariantSchema =
|
|
35160
|
-
id:
|
|
35161
|
-
title:
|
|
35162
|
-
sku:
|
|
35163
|
-
priceCents:
|
|
35164
|
-
stockQuantity:
|
|
35165
|
-
soldOut:
|
|
35166
|
-
});
|
|
35167
|
-
var publicProductSchema =
|
|
35168
|
-
id:
|
|
35169
|
-
contentEntryId:
|
|
35170
|
-
title:
|
|
35171
|
-
slug:
|
|
35172
|
-
path:
|
|
35173
|
-
status:
|
|
35174
|
-
priceCents:
|
|
35175
|
-
currency:
|
|
35176
|
-
productType:
|
|
35177
|
-
requiresShipping:
|
|
35178
|
-
hasVariants:
|
|
35179
|
-
trackInventory:
|
|
35180
|
-
soldOut:
|
|
35181
|
-
category:
|
|
35182
|
-
id:
|
|
35183
|
-
name:
|
|
35184
|
-
slug:
|
|
36014
|
+
import { z as z56 } from "zod";
|
|
36015
|
+
var publicProductVariantSchema = z56.object({
|
|
36016
|
+
id: z56.string(),
|
|
36017
|
+
title: z56.string(),
|
|
36018
|
+
sku: z56.string().nullable(),
|
|
36019
|
+
priceCents: z56.number(),
|
|
36020
|
+
stockQuantity: z56.number().nullable(),
|
|
36021
|
+
soldOut: z56.boolean()
|
|
36022
|
+
});
|
|
36023
|
+
var publicProductSchema = z56.object({
|
|
36024
|
+
id: z56.string(),
|
|
36025
|
+
contentEntryId: z56.string().nullable(),
|
|
36026
|
+
title: z56.string(),
|
|
36027
|
+
slug: z56.string(),
|
|
36028
|
+
path: z56.string().nullable(),
|
|
36029
|
+
status: z56.enum(["draft", "active"]),
|
|
36030
|
+
priceCents: z56.number(),
|
|
36031
|
+
currency: z56.string(),
|
|
36032
|
+
productType: z56.enum(["physical", "digital"]),
|
|
36033
|
+
requiresShipping: z56.boolean(),
|
|
36034
|
+
hasVariants: z56.boolean(),
|
|
36035
|
+
trackInventory: z56.boolean(),
|
|
36036
|
+
soldOut: z56.boolean(),
|
|
36037
|
+
category: z56.object({
|
|
36038
|
+
id: z56.string(),
|
|
36039
|
+
name: z56.string(),
|
|
36040
|
+
slug: z56.string()
|
|
35185
36041
|
}).nullable(),
|
|
35186
|
-
summary:
|
|
35187
|
-
body:
|
|
35188
|
-
gallery:
|
|
35189
|
-
|
|
35190
|
-
url:
|
|
35191
|
-
alt:
|
|
36042
|
+
summary: z56.string().nullable(),
|
|
36043
|
+
body: z56.unknown().nullable(),
|
|
36044
|
+
gallery: z56.array(
|
|
36045
|
+
z56.object({
|
|
36046
|
+
url: z56.string(),
|
|
36047
|
+
alt: z56.string().nullable()
|
|
35192
36048
|
})
|
|
35193
36049
|
),
|
|
35194
|
-
variants:
|
|
36050
|
+
variants: z56.array(publicProductVariantSchema)
|
|
35195
36051
|
});
|
|
35196
|
-
var publicProductsResponseSchema =
|
|
35197
|
-
products:
|
|
36052
|
+
var publicProductsResponseSchema = z56.object({
|
|
36053
|
+
products: z56.array(publicProductSchema)
|
|
35198
36054
|
});
|
|
35199
36055
|
|
|
35200
36056
|
// ../blocks/src/system/runtime/api/creditProducts.ts
|
|
35201
|
-
function
|
|
36057
|
+
function assertNever4(value) {
|
|
35202
36058
|
throw new Error(`Unhandled credit product case: ${String(value)}`);
|
|
35203
36059
|
}
|
|
35204
36060
|
function useCasesFromModules(modules) {
|
|
@@ -35231,7 +36087,7 @@ function getCreditProductCreditUnit(useCase) {
|
|
|
35231
36087
|
perCreditSuffix: "credit"
|
|
35232
36088
|
};
|
|
35233
36089
|
default:
|
|
35234
|
-
return
|
|
36090
|
+
return assertNever4(useCase);
|
|
35235
36091
|
}
|
|
35236
36092
|
}
|
|
35237
36093
|
function deriveCreditProductLabels(products, options = {}) {
|
|
@@ -35258,27 +36114,27 @@ function deriveCreditProductLabels(products, options = {}) {
|
|
|
35258
36114
|
}
|
|
35259
36115
|
|
|
35260
36116
|
// ../blocks/src/system/runtime/nodes/shop-commerce.shared.ts
|
|
35261
|
-
import { z as
|
|
35262
|
-
var storedProductCartItemSchema =
|
|
35263
|
-
kind:
|
|
35264
|
-
productId:
|
|
35265
|
-
productCategoryId:
|
|
35266
|
-
variantId:
|
|
35267
|
-
title:
|
|
35268
|
-
variantTitle:
|
|
35269
|
-
quantity:
|
|
35270
|
-
unitPriceCents:
|
|
35271
|
-
currency:
|
|
35272
|
-
imageUrl:
|
|
35273
|
-
soldOut:
|
|
35274
|
-
});
|
|
35275
|
-
var storedPassCartItemSchema =
|
|
35276
|
-
kind:
|
|
35277
|
-
passId:
|
|
35278
|
-
title:
|
|
35279
|
-
quantity:
|
|
35280
|
-
unitPriceCents:
|
|
35281
|
-
currency:
|
|
36117
|
+
import { z as z57 } from "zod";
|
|
36118
|
+
var storedProductCartItemSchema = z57.object({
|
|
36119
|
+
kind: z57.literal("product"),
|
|
36120
|
+
productId: z57.string().min(1),
|
|
36121
|
+
productCategoryId: z57.string().min(1).optional().nullable(),
|
|
36122
|
+
variantId: z57.string().min(1).optional().nullable(),
|
|
36123
|
+
title: z57.string().min(1),
|
|
36124
|
+
variantTitle: z57.string().optional().nullable(),
|
|
36125
|
+
quantity: z57.number().finite(),
|
|
36126
|
+
unitPriceCents: z57.number().finite(),
|
|
36127
|
+
currency: z57.string().min(1),
|
|
36128
|
+
imageUrl: z57.string().optional().nullable(),
|
|
36129
|
+
soldOut: z57.boolean().optional()
|
|
36130
|
+
});
|
|
36131
|
+
var storedPassCartItemSchema = z57.object({
|
|
36132
|
+
kind: z57.literal("pass"),
|
|
36133
|
+
passId: z57.string().min(1),
|
|
36134
|
+
title: z57.string().min(1),
|
|
36135
|
+
quantity: z57.number().finite().optional(),
|
|
36136
|
+
unitPriceCents: z57.number().finite(),
|
|
36137
|
+
currency: z57.string().min(1)
|
|
35282
36138
|
});
|
|
35283
36139
|
function deriveCommerceCheckoutState(state) {
|
|
35284
36140
|
if (state.items.length === 0) {
|
|
@@ -35317,10 +36173,7 @@ function resolveSelectedProduct(products, contentEntry, productSlug) {
|
|
|
35317
36173
|
|
|
35318
36174
|
// ../blocks/src/system/runtime/nodes/commerce/shared/display.ts
|
|
35319
36175
|
function formatCommercePrice(cents, currency) {
|
|
35320
|
-
return
|
|
35321
|
-
style: "currency",
|
|
35322
|
-
currency: currency.toUpperCase()
|
|
35323
|
-
}).format(cents / 100);
|
|
36176
|
+
return formatCurrencyAmount(cents, currency);
|
|
35324
36177
|
}
|
|
35325
36178
|
function getPassesHeading(passes, explicitHeading) {
|
|
35326
36179
|
if (explicitHeading) return explicitHeading;
|
|
@@ -35515,214 +36368,214 @@ function formatValidity(days) {
|
|
|
35515
36368
|
}
|
|
35516
36369
|
|
|
35517
36370
|
// ../blocks/src/system/runtime/nodes/shop.interactive.ts
|
|
35518
|
-
var shopModeSchema =
|
|
35519
|
-
var contentEntrySchema3 =
|
|
35520
|
-
id:
|
|
35521
|
-
slug:
|
|
36371
|
+
var shopModeSchema = z58.enum(["passes-memberships", "product-list", "product-detail", "cart", "checkout"]);
|
|
36372
|
+
var contentEntrySchema3 = z58.object({
|
|
36373
|
+
id: z58.string().nullable().optional(),
|
|
36374
|
+
slug: z58.string().nullable().optional()
|
|
35522
36375
|
}).nullable();
|
|
35523
|
-
var shopSourceSchema =
|
|
35524
|
-
className:
|
|
36376
|
+
var shopSourceSchema = z58.object({
|
|
36377
|
+
className: z58.string().nullable().optional(),
|
|
35525
36378
|
mode: shopModeSchema.optional(),
|
|
35526
|
-
heading:
|
|
35527
|
-
productSlug:
|
|
35528
|
-
showPasses:
|
|
35529
|
-
showMemberships:
|
|
35530
|
-
layout:
|
|
35531
|
-
columns:
|
|
35532
|
-
showDescriptions:
|
|
35533
|
-
showSummary:
|
|
35534
|
-
showBody:
|
|
35535
|
-
showPrices:
|
|
35536
|
-
showValidityPeriod:
|
|
35537
|
-
showPricePerCredit:
|
|
35538
|
-
passesHeading:
|
|
35539
|
-
membershipsHeading:
|
|
35540
|
-
buyButtonText:
|
|
35541
|
-
addButtonText:
|
|
35542
|
-
passPurchaseMode:
|
|
35543
|
-
subscribeButtonText:
|
|
35544
|
-
emptyStateText:
|
|
35545
|
-
checkoutButtonText:
|
|
35546
|
-
clearButtonText:
|
|
35547
|
-
submitButtonText:
|
|
36379
|
+
heading: z58.string().nullable().optional(),
|
|
36380
|
+
productSlug: z58.string().nullable().optional(),
|
|
36381
|
+
showPasses: z58.boolean().optional(),
|
|
36382
|
+
showMemberships: z58.boolean().optional(),
|
|
36383
|
+
layout: z58.enum(["grid", "list"]).optional(),
|
|
36384
|
+
columns: z58.string().optional(),
|
|
36385
|
+
showDescriptions: z58.boolean().optional(),
|
|
36386
|
+
showSummary: z58.boolean().optional(),
|
|
36387
|
+
showBody: z58.boolean().optional(),
|
|
36388
|
+
showPrices: z58.boolean().optional(),
|
|
36389
|
+
showValidityPeriod: z58.boolean().optional(),
|
|
36390
|
+
showPricePerCredit: z58.boolean().nullable().optional(),
|
|
36391
|
+
passesHeading: z58.string().optional(),
|
|
36392
|
+
membershipsHeading: z58.string().optional(),
|
|
36393
|
+
buyButtonText: z58.string().optional(),
|
|
36394
|
+
addButtonText: z58.string().optional(),
|
|
36395
|
+
passPurchaseMode: z58.enum(["add_to_cart", "buy_now"]).optional(),
|
|
36396
|
+
subscribeButtonText: z58.string().optional(),
|
|
36397
|
+
emptyStateText: z58.string().optional(),
|
|
36398
|
+
checkoutButtonText: z58.string().optional(),
|
|
36399
|
+
clearButtonText: z58.string().optional(),
|
|
36400
|
+
submitButtonText: z58.string().optional(),
|
|
35548
36401
|
contentEntry: contentEntrySchema3.optional(),
|
|
35549
|
-
passes:
|
|
35550
|
-
memberships:
|
|
35551
|
-
products:
|
|
35552
|
-
siteId:
|
|
35553
|
-
apiBaseUrl:
|
|
36402
|
+
passes: z58.array(publicPassProductSchema).nullable().optional(),
|
|
36403
|
+
memberships: z58.array(publicMembershipProductSchema).nullable().optional(),
|
|
36404
|
+
products: z58.array(publicProductSchema).nullable().optional(),
|
|
36405
|
+
siteId: z58.string().optional(),
|
|
36406
|
+
apiBaseUrl: z58.string().optional(),
|
|
35554
36407
|
stage: previewStageSchema.optional()
|
|
35555
36408
|
});
|
|
35556
|
-
var productVariantOptionDisplaySchema =
|
|
35557
|
-
id:
|
|
35558
|
-
label:
|
|
35559
|
-
soldOut:
|
|
35560
|
-
});
|
|
35561
|
-
var productCardDisplaySchema =
|
|
35562
|
-
productId:
|
|
35563
|
-
title:
|
|
35564
|
-
path:
|
|
35565
|
-
summary:
|
|
35566
|
-
priceLabel:
|
|
35567
|
-
image:
|
|
35568
|
-
url:
|
|
35569
|
-
alt:
|
|
36409
|
+
var productVariantOptionDisplaySchema = z58.object({
|
|
36410
|
+
id: z58.string(),
|
|
36411
|
+
label: z58.string(),
|
|
36412
|
+
soldOut: z58.boolean()
|
|
36413
|
+
});
|
|
36414
|
+
var productCardDisplaySchema = z58.object({
|
|
36415
|
+
productId: z58.string(),
|
|
36416
|
+
title: z58.string(),
|
|
36417
|
+
path: z58.string().nullable(),
|
|
36418
|
+
summary: z58.string().nullable(),
|
|
36419
|
+
priceLabel: z58.string().nullable(),
|
|
36420
|
+
image: z58.object({
|
|
36421
|
+
url: z58.string(),
|
|
36422
|
+
alt: z58.string().nullable()
|
|
35570
36423
|
}).nullable(),
|
|
35571
|
-
variantOptions:
|
|
35572
|
-
selectedVariantId:
|
|
35573
|
-
selectionLabel:
|
|
35574
|
-
actionLabel:
|
|
35575
|
-
soldOut:
|
|
35576
|
-
});
|
|
35577
|
-
var productListDisplaySchema =
|
|
35578
|
-
kind:
|
|
35579
|
-
state:
|
|
35580
|
-
heading:
|
|
35581
|
-
className:
|
|
35582
|
-
layout:
|
|
35583
|
-
columns:
|
|
35584
|
-
emptyMessage:
|
|
35585
|
-
cards:
|
|
35586
|
-
});
|
|
35587
|
-
var productDetailDisplaySchema =
|
|
35588
|
-
|
|
35589
|
-
kind:
|
|
35590
|
-
state:
|
|
35591
|
-
heading:
|
|
35592
|
-
className:
|
|
35593
|
-
emptyMessage:
|
|
36424
|
+
variantOptions: z58.array(productVariantOptionDisplaySchema),
|
|
36425
|
+
selectedVariantId: z58.string().nullable(),
|
|
36426
|
+
selectionLabel: z58.string(),
|
|
36427
|
+
actionLabel: z58.string(),
|
|
36428
|
+
soldOut: z58.boolean()
|
|
36429
|
+
});
|
|
36430
|
+
var productListDisplaySchema = z58.object({
|
|
36431
|
+
kind: z58.literal("product-list"),
|
|
36432
|
+
state: z58.enum(["empty", "ready"]),
|
|
36433
|
+
heading: z58.string().nullable(),
|
|
36434
|
+
className: z58.string().nullable(),
|
|
36435
|
+
layout: z58.enum(["grid", "list"]),
|
|
36436
|
+
columns: z58.string(),
|
|
36437
|
+
emptyMessage: z58.string(),
|
|
36438
|
+
cards: z58.array(productCardDisplaySchema)
|
|
36439
|
+
});
|
|
36440
|
+
var productDetailDisplaySchema = z58.discriminatedUnion("state", [
|
|
36441
|
+
z58.object({
|
|
36442
|
+
kind: z58.literal("product-detail"),
|
|
36443
|
+
state: z58.literal("empty"),
|
|
36444
|
+
heading: z58.string().nullable(),
|
|
36445
|
+
className: z58.string().nullable(),
|
|
36446
|
+
emptyMessage: z58.string()
|
|
35594
36447
|
}),
|
|
35595
|
-
|
|
35596
|
-
kind:
|
|
35597
|
-
state:
|
|
35598
|
-
heading:
|
|
35599
|
-
className:
|
|
35600
|
-
title:
|
|
35601
|
-
priceLabel:
|
|
35602
|
-
summary:
|
|
35603
|
-
categoryLabel:
|
|
35604
|
-
gallery:
|
|
35605
|
-
url:
|
|
35606
|
-
alt:
|
|
36448
|
+
z58.object({
|
|
36449
|
+
kind: z58.literal("product-detail"),
|
|
36450
|
+
state: z58.literal("ready"),
|
|
36451
|
+
heading: z58.string().nullable(),
|
|
36452
|
+
className: z58.string().nullable(),
|
|
36453
|
+
title: z58.string(),
|
|
36454
|
+
priceLabel: z58.string(),
|
|
36455
|
+
summary: z58.string().nullable(),
|
|
36456
|
+
categoryLabel: z58.string().nullable(),
|
|
36457
|
+
gallery: z58.array(z58.object({
|
|
36458
|
+
url: z58.string(),
|
|
36459
|
+
alt: z58.string().nullable()
|
|
35607
36460
|
})),
|
|
35608
|
-
variantOptions:
|
|
35609
|
-
selectedVariantId:
|
|
35610
|
-
selectionLabel:
|
|
35611
|
-
actionLabel:
|
|
35612
|
-
soldOut:
|
|
35613
|
-
body:
|
|
36461
|
+
variantOptions: z58.array(productVariantOptionDisplaySchema),
|
|
36462
|
+
selectedVariantId: z58.string().nullable(),
|
|
36463
|
+
selectionLabel: z58.string(),
|
|
36464
|
+
actionLabel: z58.string(),
|
|
36465
|
+
soldOut: z58.boolean(),
|
|
36466
|
+
body: z58.unknown().nullable()
|
|
35614
36467
|
})
|
|
35615
36468
|
]);
|
|
35616
|
-
var passCardDisplaySchema =
|
|
35617
|
-
id:
|
|
35618
|
-
title:
|
|
35619
|
-
description:
|
|
35620
|
-
priceLabel:
|
|
35621
|
-
creditsLabel:
|
|
35622
|
-
perCreditLabel:
|
|
35623
|
-
validityLabel:
|
|
35624
|
-
actionLabel:
|
|
35625
|
-
});
|
|
35626
|
-
var membershipCardDisplaySchema =
|
|
35627
|
-
id:
|
|
35628
|
-
title:
|
|
35629
|
-
description:
|
|
35630
|
-
priceLabel:
|
|
35631
|
-
intervalLabel:
|
|
35632
|
-
actionLabel:
|
|
35633
|
-
});
|
|
35634
|
-
var passesMembershipsDisplaySchema =
|
|
35635
|
-
kind:
|
|
35636
|
-
state:
|
|
35637
|
-
className:
|
|
35638
|
-
layout:
|
|
35639
|
-
columns:
|
|
35640
|
-
emptyMessage:
|
|
35641
|
-
passesHeading:
|
|
35642
|
-
membershipsHeading:
|
|
35643
|
-
passes:
|
|
35644
|
-
memberships:
|
|
35645
|
-
});
|
|
35646
|
-
var cartLineDisplaySchema =
|
|
35647
|
-
key:
|
|
35648
|
-
title:
|
|
35649
|
-
priceLabel:
|
|
35650
|
-
quantity:
|
|
35651
|
-
quantityEditable:
|
|
35652
|
-
});
|
|
35653
|
-
var cartDisplaySchema =
|
|
35654
|
-
kind:
|
|
35655
|
-
state:
|
|
35656
|
-
heading:
|
|
35657
|
-
className:
|
|
35658
|
-
emptyMessage:
|
|
35659
|
-
supportText:
|
|
35660
|
-
items:
|
|
35661
|
-
subtotalLabel:
|
|
35662
|
-
checkoutButtonText:
|
|
35663
|
-
clearButtonText:
|
|
35664
|
-
});
|
|
35665
|
-
var checkoutDisplaySchema =
|
|
35666
|
-
kind:
|
|
35667
|
-
state:
|
|
35668
|
-
heading:
|
|
35669
|
-
className:
|
|
35670
|
-
message:
|
|
35671
|
-
submitButtonText:
|
|
35672
|
-
});
|
|
35673
|
-
var passesMembershipsHydrationSchema =
|
|
35674
|
-
passes:
|
|
35675
|
-
memberships:
|
|
35676
|
-
passPurchaseMode:
|
|
35677
|
-
});
|
|
35678
|
-
var productListHydrationSchema =
|
|
35679
|
-
products:
|
|
35680
|
-
showSummary:
|
|
35681
|
-
showPrices:
|
|
35682
|
-
addButtonText:
|
|
35683
|
-
});
|
|
35684
|
-
var productDetailHydrationSchema =
|
|
35685
|
-
products:
|
|
35686
|
-
productId:
|
|
35687
|
-
showSummary:
|
|
35688
|
-
showBody:
|
|
35689
|
-
addButtonText:
|
|
35690
|
-
});
|
|
35691
|
-
var cartHydrationSchema =
|
|
35692
|
-
emptyStateText:
|
|
35693
|
-
checkoutButtonText:
|
|
35694
|
-
clearButtonText:
|
|
35695
|
-
});
|
|
35696
|
-
var checkoutHydrationSchema =
|
|
35697
|
-
emptyStateText:
|
|
35698
|
-
submitButtonText:
|
|
35699
|
-
});
|
|
35700
|
-
var passesMembershipsRenderSchema =
|
|
36469
|
+
var passCardDisplaySchema = z58.object({
|
|
36470
|
+
id: z58.string(),
|
|
36471
|
+
title: z58.string(),
|
|
36472
|
+
description: z58.string().nullable(),
|
|
36473
|
+
priceLabel: z58.string(),
|
|
36474
|
+
creditsLabel: z58.string(),
|
|
36475
|
+
perCreditLabel: z58.string().nullable(),
|
|
36476
|
+
validityLabel: z58.string().nullable(),
|
|
36477
|
+
actionLabel: z58.string()
|
|
36478
|
+
});
|
|
36479
|
+
var membershipCardDisplaySchema = z58.object({
|
|
36480
|
+
id: z58.string(),
|
|
36481
|
+
title: z58.string(),
|
|
36482
|
+
description: z58.string().nullable(),
|
|
36483
|
+
priceLabel: z58.string(),
|
|
36484
|
+
intervalLabel: z58.string(),
|
|
36485
|
+
actionLabel: z58.string()
|
|
36486
|
+
});
|
|
36487
|
+
var passesMembershipsDisplaySchema = z58.object({
|
|
36488
|
+
kind: z58.literal("passes-memberships"),
|
|
36489
|
+
state: z58.enum(["empty", "ready"]),
|
|
36490
|
+
className: z58.string().nullable(),
|
|
36491
|
+
layout: z58.enum(["grid", "list"]),
|
|
36492
|
+
columns: z58.string(),
|
|
36493
|
+
emptyMessage: z58.string(),
|
|
36494
|
+
passesHeading: z58.string(),
|
|
36495
|
+
membershipsHeading: z58.string(),
|
|
36496
|
+
passes: z58.array(passCardDisplaySchema),
|
|
36497
|
+
memberships: z58.array(membershipCardDisplaySchema)
|
|
36498
|
+
});
|
|
36499
|
+
var cartLineDisplaySchema = z58.object({
|
|
36500
|
+
key: z58.string(),
|
|
36501
|
+
title: z58.string(),
|
|
36502
|
+
priceLabel: z58.string(),
|
|
36503
|
+
quantity: z58.number(),
|
|
36504
|
+
quantityEditable: z58.boolean()
|
|
36505
|
+
});
|
|
36506
|
+
var cartDisplaySchema = z58.object({
|
|
36507
|
+
kind: z58.literal("cart"),
|
|
36508
|
+
state: z58.enum(["empty", "ready"]),
|
|
36509
|
+
heading: z58.string().nullable(),
|
|
36510
|
+
className: z58.string().nullable(),
|
|
36511
|
+
emptyMessage: z58.string(),
|
|
36512
|
+
supportText: z58.string().nullable(),
|
|
36513
|
+
items: z58.array(cartLineDisplaySchema),
|
|
36514
|
+
subtotalLabel: z58.string().nullable(),
|
|
36515
|
+
checkoutButtonText: z58.string(),
|
|
36516
|
+
clearButtonText: z58.string()
|
|
36517
|
+
});
|
|
36518
|
+
var checkoutDisplaySchema = z58.object({
|
|
36519
|
+
kind: z58.literal("checkout"),
|
|
36520
|
+
state: z58.enum(["empty", "blocked", "ready"]),
|
|
36521
|
+
heading: z58.string().nullable(),
|
|
36522
|
+
className: z58.string().nullable(),
|
|
36523
|
+
message: z58.string().nullable(),
|
|
36524
|
+
submitButtonText: z58.string()
|
|
36525
|
+
});
|
|
36526
|
+
var passesMembershipsHydrationSchema = z58.object({
|
|
36527
|
+
passes: z58.array(publicPassProductSchema),
|
|
36528
|
+
memberships: z58.array(publicMembershipProductSchema),
|
|
36529
|
+
passPurchaseMode: z58.enum(["add_to_cart", "buy_now"])
|
|
36530
|
+
});
|
|
36531
|
+
var productListHydrationSchema = z58.object({
|
|
36532
|
+
products: z58.array(publicProductSchema),
|
|
36533
|
+
showSummary: z58.boolean(),
|
|
36534
|
+
showPrices: z58.boolean(),
|
|
36535
|
+
addButtonText: z58.string()
|
|
36536
|
+
});
|
|
36537
|
+
var productDetailHydrationSchema = z58.object({
|
|
36538
|
+
products: z58.array(publicProductSchema),
|
|
36539
|
+
productId: z58.string().nullable(),
|
|
36540
|
+
showSummary: z58.boolean(),
|
|
36541
|
+
showBody: z58.boolean(),
|
|
36542
|
+
addButtonText: z58.string()
|
|
36543
|
+
});
|
|
36544
|
+
var cartHydrationSchema = z58.object({
|
|
36545
|
+
emptyStateText: z58.string(),
|
|
36546
|
+
checkoutButtonText: z58.string(),
|
|
36547
|
+
clearButtonText: z58.string()
|
|
36548
|
+
});
|
|
36549
|
+
var checkoutHydrationSchema = z58.object({
|
|
36550
|
+
emptyStateText: z58.string(),
|
|
36551
|
+
submitButtonText: z58.string()
|
|
36552
|
+
});
|
|
36553
|
+
var passesMembershipsRenderSchema = z58.object({
|
|
35701
36554
|
display: passesMembershipsDisplaySchema,
|
|
35702
36555
|
hydration: passesMembershipsHydrationSchema
|
|
35703
36556
|
});
|
|
35704
|
-
var productListRenderSchema =
|
|
36557
|
+
var productListRenderSchema = z58.object({
|
|
35705
36558
|
display: productListDisplaySchema,
|
|
35706
36559
|
hydration: productListHydrationSchema
|
|
35707
36560
|
});
|
|
35708
|
-
var productDetailRenderSchema =
|
|
36561
|
+
var productDetailRenderSchema = z58.object({
|
|
35709
36562
|
display: productDetailDisplaySchema,
|
|
35710
36563
|
hydration: productDetailHydrationSchema
|
|
35711
36564
|
});
|
|
35712
|
-
var cartRenderSchema =
|
|
36565
|
+
var cartRenderSchema = z58.object({
|
|
35713
36566
|
display: cartDisplaySchema,
|
|
35714
36567
|
hydration: cartHydrationSchema
|
|
35715
36568
|
});
|
|
35716
|
-
var checkoutRenderSchema =
|
|
36569
|
+
var checkoutRenderSchema = z58.object({
|
|
35717
36570
|
display: checkoutDisplaySchema,
|
|
35718
36571
|
hydration: checkoutHydrationSchema
|
|
35719
36572
|
});
|
|
35720
36573
|
function resolveShowPricePerCredit(source) {
|
|
35721
36574
|
return source.showPricePerCredit ?? true;
|
|
35722
36575
|
}
|
|
35723
|
-
var shopIslandMetaCodec = createZodCodec(
|
|
35724
|
-
siteId:
|
|
35725
|
-
apiBaseUrl:
|
|
36576
|
+
var shopIslandMetaCodec = createZodCodec(z58.object({
|
|
36577
|
+
siteId: z58.string().optional(),
|
|
36578
|
+
apiBaseUrl: z58.string().optional(),
|
|
35726
36579
|
stage: previewStageSchema.optional()
|
|
35727
36580
|
}));
|
|
35728
36581
|
var shopIslandMetaKeys = defineInteractiveIslandMetaKeys("siteId", "apiBaseUrl", "stage");
|
|
@@ -36100,9 +36953,9 @@ var shopBlockDefinition = {
|
|
|
36100
36953
|
runtime: shopBlockRuntime,
|
|
36101
36954
|
dataSchemas: {
|
|
36102
36955
|
// listPublicPasses returns { passes: [...] }
|
|
36103
|
-
passes:
|
|
36956
|
+
passes: z59.object({ passes: z59.array(publicPassProductSchema) }).optional(),
|
|
36104
36957
|
// listPublicMemberships returns { memberships: [...] }
|
|
36105
|
-
memberships:
|
|
36958
|
+
memberships: z59.object({ memberships: z59.array(publicMembershipProductSchema) }).optional()
|
|
36106
36959
|
},
|
|
36107
36960
|
dataLoaders: {
|
|
36108
36961
|
// Load passes for display
|
|
@@ -36125,7 +36978,7 @@ var shopBlockDefinition = {
|
|
|
36125
36978
|
};
|
|
36126
36979
|
|
|
36127
36980
|
// ../blocks/src/system/blocks/product-list.ts
|
|
36128
|
-
import { z as
|
|
36981
|
+
import { z as z60 } from "zod";
|
|
36129
36982
|
var productListManifest = createBlockManifest({
|
|
36130
36983
|
id: "block.product-list",
|
|
36131
36984
|
version: "1.0.0",
|
|
@@ -36258,7 +37111,7 @@ var productListBlockDefinition = {
|
|
|
36258
37111
|
}
|
|
36259
37112
|
}
|
|
36260
37113
|
};
|
|
36261
|
-
var productListDataSchema =
|
|
37114
|
+
var productListDataSchema = z60.object({
|
|
36262
37115
|
products: publicProductsResponseSchema.optional()
|
|
36263
37116
|
});
|
|
36264
37117
|
|
|
@@ -36519,72 +37372,72 @@ var checkoutBlockDefinition = {
|
|
|
36519
37372
|
};
|
|
36520
37373
|
|
|
36521
37374
|
// ../blocks/src/system/runtime/nodes/gifting.interactive.ts
|
|
36522
|
-
import { z as
|
|
36523
|
-
var publicGiftCardOfferSchema =
|
|
36524
|
-
id:
|
|
36525
|
-
kind:
|
|
36526
|
-
title:
|
|
36527
|
-
description:
|
|
36528
|
-
sortOrder:
|
|
36529
|
-
giftCard:
|
|
36530
|
-
fixedDenominations:
|
|
36531
|
-
customAmountEnabled:
|
|
36532
|
-
customAmountMinCents:
|
|
36533
|
-
customAmountMaxCents:
|
|
37375
|
+
import { z as z61 } from "zod";
|
|
37376
|
+
var publicGiftCardOfferSchema = z61.object({
|
|
37377
|
+
id: z61.string(),
|
|
37378
|
+
kind: z61.literal("gift_card"),
|
|
37379
|
+
title: z61.string(),
|
|
37380
|
+
description: z61.string().nullable(),
|
|
37381
|
+
sortOrder: z61.number().int(),
|
|
37382
|
+
giftCard: z61.object({
|
|
37383
|
+
fixedDenominations: z61.array(z61.number().int().positive()),
|
|
37384
|
+
customAmountEnabled: z61.boolean(),
|
|
37385
|
+
customAmountMinCents: z61.number().int().positive(),
|
|
37386
|
+
customAmountMaxCents: z61.number().int().positive()
|
|
36534
37387
|
}),
|
|
36535
|
-
voucher:
|
|
36536
|
-
});
|
|
36537
|
-
var publicVoucherOfferSchema =
|
|
36538
|
-
id:
|
|
36539
|
-
kind:
|
|
36540
|
-
title:
|
|
36541
|
-
description:
|
|
36542
|
-
sortOrder:
|
|
36543
|
-
giftCard:
|
|
36544
|
-
voucher:
|
|
36545
|
-
purchaseAmountCents:
|
|
37388
|
+
voucher: z61.null()
|
|
37389
|
+
});
|
|
37390
|
+
var publicVoucherOfferSchema = z61.object({
|
|
37391
|
+
id: z61.string(),
|
|
37392
|
+
kind: z61.literal("voucher"),
|
|
37393
|
+
title: z61.string(),
|
|
37394
|
+
description: z61.string().nullable(),
|
|
37395
|
+
sortOrder: z61.number().int(),
|
|
37396
|
+
giftCard: z61.null(),
|
|
37397
|
+
voucher: z61.object({
|
|
37398
|
+
purchaseAmountCents: z61.number().int().positive()
|
|
36546
37399
|
})
|
|
36547
37400
|
});
|
|
36548
|
-
var publicGiftingOffersResponseSchema =
|
|
36549
|
-
currency:
|
|
36550
|
-
giftCards:
|
|
36551
|
-
vouchers:
|
|
37401
|
+
var publicGiftingOffersResponseSchema = z61.object({
|
|
37402
|
+
currency: z61.string(),
|
|
37403
|
+
giftCards: z61.array(publicGiftCardOfferSchema),
|
|
37404
|
+
vouchers: z61.array(publicVoucherOfferSchema)
|
|
36552
37405
|
});
|
|
36553
|
-
var giftingSourceSchema =
|
|
36554
|
-
siteId:
|
|
36555
|
-
apiBaseUrl:
|
|
37406
|
+
var giftingSourceSchema = z61.object({
|
|
37407
|
+
siteId: z61.string().optional(),
|
|
37408
|
+
apiBaseUrl: z61.string().optional(),
|
|
36556
37409
|
offers: publicGiftingOffersResponseSchema.nullable().optional(),
|
|
36557
|
-
className:
|
|
36558
|
-
heading:
|
|
36559
|
-
intro:
|
|
36560
|
-
giftCardsHeading:
|
|
36561
|
-
vouchersHeading:
|
|
36562
|
-
emptyStateText:
|
|
36563
|
-
checkoutButtonText:
|
|
36564
|
-
successMessage:
|
|
36565
|
-
});
|
|
36566
|
-
var giftingDisplaySchema =
|
|
36567
|
-
kind:
|
|
36568
|
-
state:
|
|
36569
|
-
className:
|
|
36570
|
-
heading:
|
|
36571
|
-
intro:
|
|
36572
|
-
giftCardsHeading:
|
|
36573
|
-
vouchersHeading:
|
|
36574
|
-
emptyStateText:
|
|
36575
|
-
});
|
|
36576
|
-
var giftingHydrationSchema =
|
|
37410
|
+
className: z61.string().nullable().optional(),
|
|
37411
|
+
heading: z61.string().nullable().optional(),
|
|
37412
|
+
intro: z61.string().nullable().optional(),
|
|
37413
|
+
giftCardsHeading: z61.string().nullable().optional(),
|
|
37414
|
+
vouchersHeading: z61.string().nullable().optional(),
|
|
37415
|
+
emptyStateText: z61.string().nullable().optional(),
|
|
37416
|
+
checkoutButtonText: z61.string().nullable().optional(),
|
|
37417
|
+
successMessage: z61.string().nullable().optional()
|
|
37418
|
+
});
|
|
37419
|
+
var giftingDisplaySchema = z61.object({
|
|
37420
|
+
kind: z61.literal("gifting"),
|
|
37421
|
+
state: z61.literal("ready"),
|
|
37422
|
+
className: z61.string().nullable(),
|
|
37423
|
+
heading: z61.string(),
|
|
37424
|
+
intro: z61.string().nullable(),
|
|
37425
|
+
giftCardsHeading: z61.string(),
|
|
37426
|
+
vouchersHeading: z61.string(),
|
|
37427
|
+
emptyStateText: z61.string()
|
|
37428
|
+
});
|
|
37429
|
+
var giftingHydrationSchema = z61.object({
|
|
36577
37430
|
offers: publicGiftingOffersResponseSchema.nullable(),
|
|
36578
|
-
checkoutButtonText:
|
|
36579
|
-
successMessage:
|
|
37431
|
+
checkoutButtonText: z61.string(),
|
|
37432
|
+
successMessage: z61.string()
|
|
36580
37433
|
});
|
|
36581
|
-
var giftingRenderSchema =
|
|
37434
|
+
var giftingRenderSchema = z61.object({
|
|
36582
37435
|
display: giftingDisplaySchema,
|
|
36583
37436
|
hydration: giftingHydrationSchema
|
|
36584
37437
|
});
|
|
36585
|
-
var giftingIslandMetaCodec = createZodCodec(
|
|
36586
|
-
siteId:
|
|
36587
|
-
apiBaseUrl:
|
|
37438
|
+
var giftingIslandMetaCodec = createZodCodec(z61.object({
|
|
37439
|
+
siteId: z61.string().optional(),
|
|
37440
|
+
apiBaseUrl: z61.string().optional()
|
|
36588
37441
|
}));
|
|
36589
37442
|
var giftingIslandMetaKeys = defineInteractiveIslandMetaKeys(
|
|
36590
37443
|
"siteId",
|
|
@@ -36755,7 +37608,89 @@ var giftingBlockDefinition = {
|
|
|
36755
37608
|
};
|
|
36756
37609
|
|
|
36757
37610
|
// ../blocks/src/system/runtime/nodes/newsletter-form.interactive.ts
|
|
36758
|
-
import { z as
|
|
37611
|
+
import { z as z62 } from "zod";
|
|
37612
|
+
|
|
37613
|
+
// ../blocks/src/system/blocks/newsletter-signup-destination.ts
|
|
37614
|
+
function parseNewsletterSignupBlockId(value) {
|
|
37615
|
+
const trimmed = parseTrimmedString(value);
|
|
37616
|
+
return trimmed && BLOCK_ID_PATTERN.test(trimmed) ? trimmed : null;
|
|
37617
|
+
}
|
|
37618
|
+
function parseSignedNewsletterDestinationRef(value) {
|
|
37619
|
+
const trimmed = parseTrimmedString(value);
|
|
37620
|
+
return trimmed && SIGNED_DESTINATION_REF_PATTERN.test(trimmed) ? trimmed : null;
|
|
37621
|
+
}
|
|
37622
|
+
function parseNewsletterSignupDestinationProvider(value) {
|
|
37623
|
+
return value === "riverbank" || value === "mailchimp" ? value : null;
|
|
37624
|
+
}
|
|
37625
|
+
function buildNewsletterSignupBlockRef(blockId) {
|
|
37626
|
+
const parsed = parseNewsletterSignupBlockId(blockId);
|
|
37627
|
+
return parsed ? { tag: "block_ref", blockId: parsed } : null;
|
|
37628
|
+
}
|
|
37629
|
+
function normalizeNewsletterSignupEditorValuesForDestination(values) {
|
|
37630
|
+
const destinationProvider = parseNewsletterSignupDestinationProvider(values.destinationProvider) ?? "riverbank";
|
|
37631
|
+
if (destinationProvider === "mailchimp") {
|
|
37632
|
+
return {
|
|
37633
|
+
destinationProvider,
|
|
37634
|
+
mailchimpAudienceId: values.mailchimpAudienceId,
|
|
37635
|
+
mailchimpTags: values.mailchimpTags
|
|
37636
|
+
};
|
|
37637
|
+
}
|
|
37638
|
+
return {
|
|
37639
|
+
destinationProvider,
|
|
37640
|
+
listId: values.listId,
|
|
37641
|
+
tags: values.tags
|
|
37642
|
+
};
|
|
37643
|
+
}
|
|
37644
|
+
function deriveNewsletterSignupRuntimeSource(values) {
|
|
37645
|
+
const normalized = normalizeNewsletterSignupEditorValuesForDestination(values);
|
|
37646
|
+
if (normalized.destinationProvider === "mailchimp") {
|
|
37647
|
+
return {
|
|
37648
|
+
destinationProvider: "mailchimp",
|
|
37649
|
+
listId: null,
|
|
37650
|
+
tags: null
|
|
37651
|
+
};
|
|
37652
|
+
}
|
|
37653
|
+
return {
|
|
37654
|
+
destinationProvider: "riverbank",
|
|
37655
|
+
listId: parseTrimmedString(normalized.listId),
|
|
37656
|
+
tags: parseTrimmedString(normalized.tags)
|
|
37657
|
+
};
|
|
37658
|
+
}
|
|
37659
|
+
function sanitizeNewsletterSignupPublicContent(content) {
|
|
37660
|
+
if (!isRecord7(content)) return content;
|
|
37661
|
+
const provider = parseNewsletterSignupDestinationProvider(content.destinationProvider) ?? getProviderFromExplicitDestination(content.destination);
|
|
37662
|
+
const {
|
|
37663
|
+
destination: _destination,
|
|
37664
|
+
destinationProvider: _destinationProvider,
|
|
37665
|
+
mailchimpAudienceId: _mailchimpAudienceId,
|
|
37666
|
+
mailchimpTags: _mailchimpTags,
|
|
37667
|
+
listId,
|
|
37668
|
+
tags: tags2,
|
|
37669
|
+
...publicContent
|
|
37670
|
+
} = content;
|
|
37671
|
+
const mutablePublicContent = { ...publicContent };
|
|
37672
|
+
if (provider !== "mailchimp") {
|
|
37673
|
+
if ("listId" in content) mutablePublicContent.listId = listId;
|
|
37674
|
+
if ("tags" in content) mutablePublicContent.tags = tags2;
|
|
37675
|
+
}
|
|
37676
|
+
return mutablePublicContent;
|
|
37677
|
+
}
|
|
37678
|
+
function getProviderFromExplicitDestination(destination) {
|
|
37679
|
+
if (!isRecord7(destination) || typeof destination.tag !== "string") return null;
|
|
37680
|
+
if (destination.tag === "riverbank_list") return "riverbank";
|
|
37681
|
+
if (destination.tag === "mailchimp_audience") return "mailchimp";
|
|
37682
|
+
return null;
|
|
37683
|
+
}
|
|
37684
|
+
var BLOCK_ID_PATTERN = /^[A-Za-z0-9._:-]{1,200}$/;
|
|
37685
|
+
var SIGNED_DESTINATION_REF_PATTERN = /^[A-Za-z0-9._~-]{16,1000}$/;
|
|
37686
|
+
function parseTrimmedString(value) {
|
|
37687
|
+
if (typeof value !== "string") return null;
|
|
37688
|
+
const trimmed = value.trim();
|
|
37689
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
37690
|
+
}
|
|
37691
|
+
function isRecord7(value) {
|
|
37692
|
+
return typeof value === "object" && value !== null;
|
|
37693
|
+
}
|
|
36759
37694
|
|
|
36760
37695
|
// ../blocks/src/system/runtime/nodes/newsletter-form.types.ts
|
|
36761
37696
|
function getPresetFields(preset2, options) {
|
|
@@ -36808,49 +37743,65 @@ function withOptionalPhone(fields3, includePhone) {
|
|
|
36808
37743
|
}
|
|
36809
37744
|
|
|
36810
37745
|
// ../blocks/src/system/runtime/nodes/newsletter-form.interactive.ts
|
|
36811
|
-
var newsletterPresetSchema =
|
|
36812
|
-
var
|
|
36813
|
-
|
|
36814
|
-
|
|
36815
|
-
|
|
36816
|
-
|
|
36817
|
-
|
|
36818
|
-
|
|
36819
|
-
|
|
36820
|
-
|
|
36821
|
-
|
|
36822
|
-
|
|
37746
|
+
var newsletterPresetSchema = z62.enum(["emailOnly", "emailName", "emailFirstLast", "emailNameCompany"]);
|
|
37747
|
+
var newsletterDestinationProviderSchema = z62.enum(["riverbank", "mailchimp"]);
|
|
37748
|
+
var newsletterFieldSchema = z62.object({
|
|
37749
|
+
id: z62.string(),
|
|
37750
|
+
type: z62.enum(["email", "text"]),
|
|
37751
|
+
label: z62.string(),
|
|
37752
|
+
required: z62.boolean(),
|
|
37753
|
+
placeholder: z62.string().optional()
|
|
37754
|
+
});
|
|
37755
|
+
var newsletterSignupBlockIdSchema = z62.string().trim().min(1).transform(parseRequiredNewsletterSignupBlockId);
|
|
37756
|
+
var signedNewsletterDestinationRefSchema = z62.string().trim().min(1).transform(parseRequiredSignedNewsletterDestinationRef);
|
|
37757
|
+
var newsletterPublicDestinationRefSchema = z62.discriminatedUnion("tag", [
|
|
37758
|
+
z62.object({
|
|
37759
|
+
tag: z62.literal("block_ref"),
|
|
37760
|
+
blockId: newsletterSignupBlockIdSchema
|
|
37761
|
+
}),
|
|
37762
|
+
z62.object({
|
|
37763
|
+
tag: z62.literal("signed_destination_ref"),
|
|
37764
|
+
token: signedNewsletterDestinationRefSchema
|
|
37765
|
+
})
|
|
37766
|
+
]);
|
|
37767
|
+
var newsletterSourceSchema = z62.object({
|
|
37768
|
+
blockId: z62.string().nullable().optional(),
|
|
37769
|
+
siteId: z62.string().optional(),
|
|
37770
|
+
apiBaseUrl: z62.string().optional(),
|
|
37771
|
+
listId: z62.string().nullable().optional(),
|
|
37772
|
+
destinationProvider: newsletterDestinationProviderSchema.nullable().optional(),
|
|
36823
37773
|
preset: newsletterPresetSchema.optional(),
|
|
36824
|
-
includePhone:
|
|
36825
|
-
buttonLabel:
|
|
36826
|
-
successMessage:
|
|
36827
|
-
privacyNote:
|
|
36828
|
-
tags:
|
|
36829
|
-
spamProtectionEnabled:
|
|
36830
|
-
className:
|
|
36831
|
-
});
|
|
36832
|
-
var newsletterDisplaySchema =
|
|
36833
|
-
kind:
|
|
36834
|
-
className:
|
|
36835
|
-
buttonLabel:
|
|
36836
|
-
successMessage:
|
|
36837
|
-
privacyNote:
|
|
36838
|
-
fields:
|
|
36839
|
-
});
|
|
36840
|
-
var newsletterHydrationSchema =
|
|
36841
|
-
|
|
37774
|
+
includePhone: z62.boolean().optional(),
|
|
37775
|
+
buttonLabel: z62.string().nullable().optional(),
|
|
37776
|
+
successMessage: z62.string().nullable().optional(),
|
|
37777
|
+
privacyNote: z62.string().nullable().optional(),
|
|
37778
|
+
tags: z62.string().nullable().optional(),
|
|
37779
|
+
spamProtectionEnabled: z62.boolean().optional(),
|
|
37780
|
+
className: z62.string().nullable().optional()
|
|
37781
|
+
});
|
|
37782
|
+
var newsletterDisplaySchema = z62.object({
|
|
37783
|
+
kind: z62.literal("newsletter-form"),
|
|
37784
|
+
className: z62.string().nullable(),
|
|
37785
|
+
buttonLabel: z62.string(),
|
|
37786
|
+
successMessage: z62.string().nullable(),
|
|
37787
|
+
privacyNote: z62.string().nullable(),
|
|
37788
|
+
fields: z62.array(newsletterFieldSchema)
|
|
37789
|
+
});
|
|
37790
|
+
var newsletterHydrationSchema = z62.object({
|
|
37791
|
+
destinationRef: newsletterPublicDestinationRefSchema.nullable().optional(),
|
|
37792
|
+
listId: z62.string().nullable().optional(),
|
|
36842
37793
|
preset: newsletterPresetSchema,
|
|
36843
|
-
includePhone:
|
|
36844
|
-
tags:
|
|
36845
|
-
spamProtectionEnabled:
|
|
37794
|
+
includePhone: z62.boolean(),
|
|
37795
|
+
tags: z62.string().nullable().optional(),
|
|
37796
|
+
spamProtectionEnabled: z62.boolean().optional()
|
|
36846
37797
|
});
|
|
36847
|
-
var newsletterRenderSchema =
|
|
37798
|
+
var newsletterRenderSchema = z62.object({
|
|
36848
37799
|
display: newsletterDisplaySchema,
|
|
36849
37800
|
hydration: newsletterHydrationSchema
|
|
36850
37801
|
});
|
|
36851
|
-
var newsletterIslandMetaCodec = createZodCodec(
|
|
36852
|
-
siteId:
|
|
36853
|
-
apiBaseUrl:
|
|
37802
|
+
var newsletterIslandMetaCodec = createZodCodec(z62.object({
|
|
37803
|
+
siteId: z62.string().optional(),
|
|
37804
|
+
apiBaseUrl: z62.string().optional()
|
|
36854
37805
|
}));
|
|
36855
37806
|
var newsletterIslandMetaKeys = defineInteractiveIslandMetaKeys("siteId", "apiBaseUrl");
|
|
36856
37807
|
function buildNewsletterDisplay(source) {
|
|
@@ -36871,16 +37822,20 @@ var newsletterFormBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
36871
37822
|
source: createZodCodec(newsletterSourceSchema),
|
|
36872
37823
|
render: createZodCodec(newsletterRenderSchema)
|
|
36873
37824
|
},
|
|
36874
|
-
buildRender: (source) =>
|
|
36875
|
-
|
|
36876
|
-
|
|
36877
|
-
|
|
36878
|
-
|
|
36879
|
-
|
|
36880
|
-
|
|
36881
|
-
|
|
36882
|
-
|
|
36883
|
-
|
|
37825
|
+
buildRender: (source) => {
|
|
37826
|
+
const runtimeSource = deriveNewsletterSignupRuntimeSource(source);
|
|
37827
|
+
return {
|
|
37828
|
+
display: buildNewsletterDisplay(source),
|
|
37829
|
+
hydration: {
|
|
37830
|
+
destinationRef: buildNewsletterSignupBlockRef(source.blockId),
|
|
37831
|
+
listId: runtimeSource.listId,
|
|
37832
|
+
preset: source.preset ?? "emailOnly",
|
|
37833
|
+
includePhone: source.includePhone ?? false,
|
|
37834
|
+
tags: runtimeSource.tags,
|
|
37835
|
+
spamProtectionEnabled: source.spamProtectionEnabled
|
|
37836
|
+
}
|
|
37837
|
+
};
|
|
37838
|
+
}
|
|
36884
37839
|
});
|
|
36885
37840
|
var newsletterFormInteractiveIslandPropsCodec = createInteractiveIslandCodec({
|
|
36886
37841
|
runtime: newsletterFormBlockRuntime,
|
|
@@ -36892,6 +37847,20 @@ var newsletterFormInteractiveIslandPropsCodec = createInteractiveIslandCodec({
|
|
|
36892
37847
|
apiBaseUrl: value.apiBaseUrl
|
|
36893
37848
|
})
|
|
36894
37849
|
});
|
|
37850
|
+
function parseRequiredNewsletterSignupBlockId(value) {
|
|
37851
|
+
const parsed = parseNewsletterSignupBlockId(value);
|
|
37852
|
+
if (!parsed) {
|
|
37853
|
+
throw new Error("Newsletter signup block destination ref requires blockId");
|
|
37854
|
+
}
|
|
37855
|
+
return parsed;
|
|
37856
|
+
}
|
|
37857
|
+
function parseRequiredSignedNewsletterDestinationRef(value) {
|
|
37858
|
+
const parsed = parseSignedNewsletterDestinationRef(value);
|
|
37859
|
+
if (!parsed) {
|
|
37860
|
+
throw new Error("Newsletter signup signed destination ref requires token");
|
|
37861
|
+
}
|
|
37862
|
+
return parsed;
|
|
37863
|
+
}
|
|
36895
37864
|
|
|
36896
37865
|
// ../blocks/src/system/blocks/newsletter-signup.ts
|
|
36897
37866
|
var stackedComposition = composeFragments([
|
|
@@ -36971,23 +37940,23 @@ var newsletterSignupBlockDefinition = {
|
|
|
36971
37940
|
};
|
|
36972
37941
|
|
|
36973
37942
|
// ../blocks/src/system/blocks/team-members.ts
|
|
36974
|
-
import { z as
|
|
37943
|
+
import { z as z63 } from "zod";
|
|
36975
37944
|
var ITEM_NAME2 = "member";
|
|
36976
37945
|
var teamMemberPhotoSchema = mediaSchema2.refine((media2) => media2.type === "image", {
|
|
36977
37946
|
message: "Team member photos must be image media"
|
|
36978
37947
|
}).nullable();
|
|
36979
|
-
var teamMemberDataSchema =
|
|
36980
|
-
_type:
|
|
36981
|
-
id:
|
|
36982
|
-
name:
|
|
36983
|
-
role:
|
|
36984
|
-
roleLabel:
|
|
36985
|
-
bio:
|
|
36986
|
-
summary:
|
|
37948
|
+
var teamMemberDataSchema = z63.object({
|
|
37949
|
+
_type: z63.literal("teamMember"),
|
|
37950
|
+
id: z63.string(),
|
|
37951
|
+
name: z63.string(),
|
|
37952
|
+
role: z63.string().nullable(),
|
|
37953
|
+
roleLabel: z63.string().nullable(),
|
|
37954
|
+
bio: z63.string().nullable(),
|
|
37955
|
+
summary: z63.string().nullable(),
|
|
36987
37956
|
photo: teamMemberPhotoSchema,
|
|
36988
|
-
profilePath:
|
|
37957
|
+
profilePath: z63.string().nullable()
|
|
36989
37958
|
});
|
|
36990
|
-
var teamMembersDataSchema =
|
|
37959
|
+
var teamMembersDataSchema = z63.array(teamMemberDataSchema);
|
|
36991
37960
|
var dynamicSourceWhen = { equals: "site_staff" };
|
|
36992
37961
|
var manualSourceWhen = { equals: "site_staff", not: true };
|
|
36993
37962
|
var headingNode = text(
|
|
@@ -38894,7 +39863,7 @@ var defaultTransforms = createTransformRegistry(builtinTransformDefinitions);
|
|
|
38894
39863
|
// ../blocks/src/system/data/linkedContentEntries.ts
|
|
38895
39864
|
var LINKED_CONTENT_ENTRY_META_KEY = "__rbLinkedContentEntry";
|
|
38896
39865
|
function coerceLinkedContentEntriesPayload(payload) {
|
|
38897
|
-
if (!
|
|
39866
|
+
if (!isRecord8(payload)) return payload;
|
|
38898
39867
|
const response = payload;
|
|
38899
39868
|
if (!Array.isArray(response.entries)) return payload;
|
|
38900
39869
|
const contentType = parsePublicContentTypeMeta(response.contentType);
|
|
@@ -38902,12 +39871,12 @@ function coerceLinkedContentEntriesPayload(payload) {
|
|
|
38902
39871
|
return response.entries.map((entry) => enrichLinkedContentEntry(entry, contentType));
|
|
38903
39872
|
}
|
|
38904
39873
|
function enrichLinkedContentEntry(entry, contentType) {
|
|
38905
|
-
if (!
|
|
39874
|
+
if (!isRecord8(entry)) return entry;
|
|
38906
39875
|
const entryId = typeof entry.id === "string" ? entry.id : null;
|
|
38907
39876
|
if (!entryId) return entry;
|
|
38908
39877
|
const title = typeof entry.title === "string" && entry.title.trim().length > 0 ? entry.title : entryId;
|
|
38909
39878
|
const optimisticHash = typeof entry.optimisticHash === "string" && entry.optimisticHash.length > 0 ? entry.optimisticHash : null;
|
|
38910
|
-
const content =
|
|
39879
|
+
const content = isRecord8(entry.content) ? entry.content : {};
|
|
38911
39880
|
const meta = {
|
|
38912
39881
|
kind: "linked-content-entry",
|
|
38913
39882
|
entryId,
|
|
@@ -38989,7 +39958,7 @@ function resolveLinkedContentEditSupport(contentType) {
|
|
|
38989
39958
|
case "unsupported-domain-backed":
|
|
38990
39959
|
return { kind: "unsupported-domain-backed", reason: metadata.reason };
|
|
38991
39960
|
default:
|
|
38992
|
-
return
|
|
39961
|
+
return assertNever2(metadata);
|
|
38993
39962
|
}
|
|
38994
39963
|
}
|
|
38995
39964
|
function contentTypeKeyToLabel(key) {
|
|
@@ -39000,7 +39969,7 @@ function capitalize(value) {
|
|
|
39000
39969
|
return value.charAt(0).toUpperCase() + value.slice(1).toLowerCase();
|
|
39001
39970
|
}
|
|
39002
39971
|
function parsePublicContentTypeMeta(value) {
|
|
39003
|
-
if (!
|
|
39972
|
+
if (!isRecord8(value)) return null;
|
|
39004
39973
|
if (typeof value.key !== "string" || value.key.trim().length === 0) return null;
|
|
39005
39974
|
return {
|
|
39006
39975
|
key: value.key,
|
|
@@ -39010,7 +39979,7 @@ function parsePublicContentTypeMeta(value) {
|
|
|
39010
39979
|
};
|
|
39011
39980
|
}
|
|
39012
39981
|
function parsePublicContentTypeLinkedEntryEditing(value) {
|
|
39013
|
-
if (!
|
|
39982
|
+
if (!isRecord8(value) || typeof value.kind !== "string") return null;
|
|
39014
39983
|
switch (value.kind) {
|
|
39015
39984
|
case "generic":
|
|
39016
39985
|
return { kind: "generic" };
|
|
@@ -39024,7 +39993,7 @@ function parsePublicContentTypeLinkedEntryEditing(value) {
|
|
|
39024
39993
|
}
|
|
39025
39994
|
}
|
|
39026
39995
|
function parsePublicContentTypeFieldMeta(value) {
|
|
39027
|
-
if (!
|
|
39996
|
+
if (!isRecord8(value)) return [];
|
|
39028
39997
|
if (typeof value.id !== "string" || typeof value.type !== "string") return [];
|
|
39029
39998
|
return [{
|
|
39030
39999
|
id: value.id,
|
|
@@ -39038,45 +40007,10 @@ function parseStringArray(value) {
|
|
|
39038
40007
|
if (!Array.isArray(value)) return null;
|
|
39039
40008
|
return value.filter((item) => typeof item === "string");
|
|
39040
40009
|
}
|
|
39041
|
-
function
|
|
40010
|
+
function isRecord8(value) {
|
|
39042
40011
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
39043
40012
|
}
|
|
39044
40013
|
|
|
39045
|
-
// ../blocks/src/system/manifest/richTextSchema.ts
|
|
39046
|
-
import { z as z63 } from "zod";
|
|
39047
|
-
var TipTapMarkSchema = z63.object({
|
|
39048
|
-
type: z63.string(),
|
|
39049
|
-
attrs: z63.record(z63.string(), z63.unknown()).optional()
|
|
39050
|
-
});
|
|
39051
|
-
var TipTapNodeSchema = z63.lazy(
|
|
39052
|
-
() => z63.object({
|
|
39053
|
-
type: z63.string(),
|
|
39054
|
-
content: z63.array(TipTapNodeSchema).optional(),
|
|
39055
|
-
text: z63.string().optional(),
|
|
39056
|
-
attrs: z63.record(z63.string(), z63.unknown()).optional(),
|
|
39057
|
-
marks: z63.array(TipTapMarkSchema).optional()
|
|
39058
|
-
})
|
|
39059
|
-
);
|
|
39060
|
-
var RichTextValueSchema = z63.union([
|
|
39061
|
-
// Canonical: TipTap document directly
|
|
39062
|
-
TipTapNodeSchema,
|
|
39063
|
-
// Legacy (read-tolerance only): wrapped in { doc: {...} }
|
|
39064
|
-
z63.object({
|
|
39065
|
-
doc: TipTapNodeSchema
|
|
39066
|
-
})
|
|
39067
|
-
]);
|
|
39068
|
-
var RichTextDocSchema = z63.object({
|
|
39069
|
-
type: z63.literal("doc"),
|
|
39070
|
-
content: z63.array(TipTapNodeSchema)
|
|
39071
|
-
});
|
|
39072
|
-
function unwrapRichTextRoot(value) {
|
|
39073
|
-
if (!isRecord2(value)) return value;
|
|
39074
|
-
if (!("doc" in value)) return value;
|
|
39075
|
-
const inner = value.doc;
|
|
39076
|
-
if (isRecord2(inner) && inner.type === "doc") return inner;
|
|
39077
|
-
return value;
|
|
39078
|
-
}
|
|
39079
|
-
|
|
39080
40014
|
// ../theme-core/src/navigation/presets.ts
|
|
39081
40015
|
var NAV_LINK_PRESETS = {
|
|
39082
40016
|
/**
|
|
@@ -40838,7 +41772,7 @@ function preset(id, verticalId, canonicalBehaviour, label, pluralLabel, descript
|
|
|
40838
41772
|
}
|
|
40839
41773
|
|
|
40840
41774
|
// ../api/src/utils/isRecord.ts
|
|
40841
|
-
function
|
|
41775
|
+
function isRecord9(value) {
|
|
40842
41776
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
40843
41777
|
}
|
|
40844
41778
|
|
|
@@ -41145,7 +42079,7 @@ function sanitizeMarks(marks) {
|
|
|
41145
42079
|
if (mark.type === "bold" || mark.type === "strong" || mark.type === "italic" || mark.type === "em") {
|
|
41146
42080
|
return [{ type: mark.type }];
|
|
41147
42081
|
}
|
|
41148
|
-
if (mark.type === "link" &&
|
|
42082
|
+
if (mark.type === "link" && isRecord9(mark.attrs) && typeof mark.attrs.href === "string") {
|
|
41149
42083
|
const attrs = { href: mark.attrs.href };
|
|
41150
42084
|
if (typeof mark.attrs.target === "string" && mark.attrs.target.trim().length > 0) {
|
|
41151
42085
|
attrs.target = mark.attrs.target;
|
|
@@ -41160,10 +42094,10 @@ function sanitizeMarks(marks) {
|
|
|
41160
42094
|
return sanitized.length > 0 ? sanitized : void 0;
|
|
41161
42095
|
}
|
|
41162
42096
|
function unwrapRichTextValue(value) {
|
|
41163
|
-
if (
|
|
42097
|
+
if (isRecord9(value) && isRecord9(value.doc)) {
|
|
41164
42098
|
return unwrapRichTextValue(value.doc);
|
|
41165
42099
|
}
|
|
41166
|
-
if (
|
|
42100
|
+
if (isRecord9(value) && value.type === "doc") {
|
|
41167
42101
|
return {
|
|
41168
42102
|
type: "doc",
|
|
41169
42103
|
content: Array.isArray(value.content) ? value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) : []
|
|
@@ -41172,7 +42106,7 @@ function unwrapRichTextValue(value) {
|
|
|
41172
42106
|
return EMPTY_SITE_BANNER_BODY;
|
|
41173
42107
|
}
|
|
41174
42108
|
function isTipTapNodeLike(value) {
|
|
41175
|
-
return
|
|
42109
|
+
return isRecord9(value) && typeof value.type === "string";
|
|
41176
42110
|
}
|
|
41177
42111
|
function coerceTipTapNode(value) {
|
|
41178
42112
|
return {
|
|
@@ -41180,9 +42114,9 @@ function coerceTipTapNode(value) {
|
|
|
41180
42114
|
...Array.isArray(value.content) ? { content: value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) } : {},
|
|
41181
42115
|
...typeof value.text === "string" ? { text: value.text } : {},
|
|
41182
42116
|
...Array.isArray(value.marks) ? {
|
|
41183
|
-
marks: value.marks.filter((mark) =>
|
|
42117
|
+
marks: value.marks.filter((mark) => isRecord9(mark) && typeof mark.type === "string").map((mark) => ({
|
|
41184
42118
|
type: mark.type,
|
|
41185
|
-
...
|
|
42119
|
+
...isRecord9(mark.attrs) ? { attrs: mark.attrs } : {}
|
|
41186
42120
|
}))
|
|
41187
42121
|
} : {}
|
|
41188
42122
|
};
|
|
@@ -41307,21 +42241,8 @@ var MultiPageUpdateResponse = z70.object({
|
|
|
41307
42241
|
});
|
|
41308
42242
|
|
|
41309
42243
|
// src/data/prefetchBlockData.ts
|
|
41310
|
-
var SUPPORTED_LOADER_ENDPOINTS2 = [
|
|
41311
|
-
"listPublishedEntries",
|
|
41312
|
-
"getPublishedEntryPreview",
|
|
41313
|
-
"listPublicEvents",
|
|
41314
|
-
"listPublicCourses",
|
|
41315
|
-
"listPublicTeamMembers",
|
|
41316
|
-
"listPublicProducts",
|
|
41317
|
-
"listPublicPasses",
|
|
41318
|
-
"listPublicMemberships",
|
|
41319
|
-
"getPublicFormById",
|
|
41320
|
-
"getPublicBookingServices",
|
|
41321
|
-
"getPublicEventDetails"
|
|
41322
|
-
];
|
|
41323
42244
|
function isSupportedLoaderEndpoint2(endpoint) {
|
|
41324
|
-
return
|
|
42245
|
+
return SUPPORTED_LOADER_ENDPOINTS.includes(endpoint);
|
|
41325
42246
|
}
|
|
41326
42247
|
var ENTRY_REF_KEYS = [
|
|
41327
42248
|
"identifier",
|
|
@@ -41330,7 +42251,7 @@ var ENTRY_REF_KEYS = [
|
|
|
41330
42251
|
"entryId",
|
|
41331
42252
|
"slug"
|
|
41332
42253
|
];
|
|
41333
|
-
function
|
|
42254
|
+
function isRecord10(value) {
|
|
41334
42255
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
41335
42256
|
}
|
|
41336
42257
|
function extractManualEntryRef(item) {
|
|
@@ -41338,7 +42259,7 @@ function extractManualEntryRef(item) {
|
|
|
41338
42259
|
const trimmed = item.trim();
|
|
41339
42260
|
return trimmed.length > 0 ? trimmed : null;
|
|
41340
42261
|
}
|
|
41341
|
-
if (!
|
|
42262
|
+
if (!isRecord10(item)) return null;
|
|
41342
42263
|
for (const key of ENTRY_REF_KEYS) {
|
|
41343
42264
|
const raw = item[key];
|
|
41344
42265
|
if (typeof raw === "string" && raw.trim().length > 0) {
|
|
@@ -41386,6 +42307,194 @@ function parseManualEntryRefs(...values) {
|
|
|
41386
42307
|
}
|
|
41387
42308
|
return void 0;
|
|
41388
42309
|
}
|
|
42310
|
+
var loaderAdapters = {
|
|
42311
|
+
listPublishedEntries: listPublishedEntries2,
|
|
42312
|
+
getPublishedEntryPreview,
|
|
42313
|
+
listPublicEvents,
|
|
42314
|
+
getPublicEventDetails,
|
|
42315
|
+
listPublicCourses,
|
|
42316
|
+
listPublicRouteCandidates,
|
|
42317
|
+
listPublicTeamMembers,
|
|
42318
|
+
listPublicProducts,
|
|
42319
|
+
listPublicPasses,
|
|
42320
|
+
listPublicMemberships,
|
|
42321
|
+
getPublicFormById,
|
|
42322
|
+
getPublicBookingServices
|
|
42323
|
+
};
|
|
42324
|
+
function readStringParam(params, key) {
|
|
42325
|
+
const value = params[key];
|
|
42326
|
+
return value && value.length > 0 ? value : void 0;
|
|
42327
|
+
}
|
|
42328
|
+
function requireStringParam(params, key, endpoint) {
|
|
42329
|
+
const value = readStringParam(params, key);
|
|
42330
|
+
if (!value) {
|
|
42331
|
+
throw new Error(`${endpoint} requires ${key} param`);
|
|
42332
|
+
}
|
|
42333
|
+
return value;
|
|
42334
|
+
}
|
|
42335
|
+
function parsePositiveIntegerParam(params, key) {
|
|
42336
|
+
const value = params[key];
|
|
42337
|
+
const parsed = value === void 0 ? void 0 : Number.parseInt(value, 10);
|
|
42338
|
+
return typeof parsed === "number" && Number.isInteger(parsed) && parsed > 0 ? parsed : void 0;
|
|
42339
|
+
}
|
|
42340
|
+
function parseEntryOrder(value) {
|
|
42341
|
+
if (value === void 0) return void 0;
|
|
42342
|
+
switch (value) {
|
|
42343
|
+
case "order":
|
|
42344
|
+
return "manual";
|
|
42345
|
+
case "newest":
|
|
42346
|
+
case "oldest":
|
|
42347
|
+
case "title":
|
|
42348
|
+
return value;
|
|
42349
|
+
default:
|
|
42350
|
+
return void 0;
|
|
42351
|
+
}
|
|
42352
|
+
}
|
|
42353
|
+
function parsePublicEventKind(value) {
|
|
42354
|
+
if (value === void 0) return void 0;
|
|
42355
|
+
switch (value) {
|
|
42356
|
+
case "all":
|
|
42357
|
+
case "courses":
|
|
42358
|
+
case "events":
|
|
42359
|
+
return value;
|
|
42360
|
+
default:
|
|
42361
|
+
return void 0;
|
|
42362
|
+
}
|
|
42363
|
+
}
|
|
42364
|
+
async function listPublishedEntries2({ client, params }) {
|
|
42365
|
+
const siteId = requireStringParam(params, "siteId", "listPublishedEntries");
|
|
42366
|
+
const type = requireStringParam(params, "type", "listPublishedEntries");
|
|
42367
|
+
const stage = readStringParam(params, "stage");
|
|
42368
|
+
const mode = readStringParam(params, "mode");
|
|
42369
|
+
const parsedEntryRefs = mode === "manual" ? parseManualEntryRefs(params.identifiers, params.entryRefs, params.entryIds) : void 0;
|
|
42370
|
+
if (mode === "manual" && (!parsedEntryRefs || parsedEntryRefs.length === 0)) {
|
|
42371
|
+
return { entries: [] };
|
|
42372
|
+
}
|
|
42373
|
+
if (mode === "manual" && parsedEntryRefs) {
|
|
42374
|
+
return await client.getEntriesByIdentifiers({
|
|
42375
|
+
siteId,
|
|
42376
|
+
contentType: type,
|
|
42377
|
+
identifiers: parsedEntryRefs,
|
|
42378
|
+
preview: stage === "preview"
|
|
42379
|
+
});
|
|
42380
|
+
}
|
|
42381
|
+
return await client.getEntries({
|
|
42382
|
+
siteId,
|
|
42383
|
+
contentType: type,
|
|
42384
|
+
limit: parsePositiveIntegerParam(params, "limit"),
|
|
42385
|
+
order: parseEntryOrder(readStringParam(params, "orderBy")),
|
|
42386
|
+
preview: stage === "preview"
|
|
42387
|
+
});
|
|
42388
|
+
}
|
|
42389
|
+
async function getPublishedEntryPreview({ client, params }) {
|
|
42390
|
+
return await client.getEntry({
|
|
42391
|
+
siteId: requireStringParam(params, "siteId", "getPublishedEntryPreview"),
|
|
42392
|
+
contentType: requireStringParam(params, "type", "getPublishedEntryPreview"),
|
|
42393
|
+
slug: requireStringParam(params, "slug", "getPublishedEntryPreview")
|
|
42394
|
+
});
|
|
42395
|
+
}
|
|
42396
|
+
async function listPublicEvents({ client, params }) {
|
|
42397
|
+
return await client.listPublicEvents({
|
|
42398
|
+
siteId: requireStringParam(params, "siteId", "listPublicEvents"),
|
|
42399
|
+
limit: parsePositiveIntegerParam(params, "limit"),
|
|
42400
|
+
from: readStringParam(params, "from"),
|
|
42401
|
+
to: readStringParam(params, "to"),
|
|
42402
|
+
afterStartsAt: readStringParam(params, "afterStartsAt"),
|
|
42403
|
+
afterId: readStringParam(params, "afterId"),
|
|
42404
|
+
stage: readStringParam(params, "stage"),
|
|
42405
|
+
categoryIds: readStringParam(params, "categoryIds"),
|
|
42406
|
+
venueId: readStringParam(params, "venueId"),
|
|
42407
|
+
staffMemberId: readStringParam(params, "staffMemberId"),
|
|
42408
|
+
kind: parsePublicEventKind(readStringParam(params, "kind")),
|
|
42409
|
+
eventSurface: readStringParam(params, "eventSurface"),
|
|
42410
|
+
eventPresets: readStringParam(params, "eventPresets"),
|
|
42411
|
+
scheduleScope: readStringParam(params, "scheduleScope"),
|
|
42412
|
+
entryId: readStringParam(params, "entryId"),
|
|
42413
|
+
seriesId: readStringParam(params, "seriesId"),
|
|
42414
|
+
includeOccurrenceId: readStringParam(params, "includeOccurrenceId")
|
|
42415
|
+
});
|
|
42416
|
+
}
|
|
42417
|
+
async function getPublicEventDetails({ client, params }) {
|
|
42418
|
+
return await client.getPublicEventDetails({
|
|
42419
|
+
siteId: requireStringParam(params, "siteId", "getPublicEventDetails"),
|
|
42420
|
+
limit: parsePositiveIntegerParam(params, "limit"),
|
|
42421
|
+
from: readStringParam(params, "from"),
|
|
42422
|
+
to: readStringParam(params, "to"),
|
|
42423
|
+
afterStartsAt: readStringParam(params, "afterStartsAt"),
|
|
42424
|
+
afterId: readStringParam(params, "afterId"),
|
|
42425
|
+
stage: readStringParam(params, "stage"),
|
|
42426
|
+
categoryIds: readStringParam(params, "categoryIds"),
|
|
42427
|
+
venueId: readStringParam(params, "venueId"),
|
|
42428
|
+
staffMemberId: readStringParam(params, "staffMemberId"),
|
|
42429
|
+
kind: readStringParam(params, "kind"),
|
|
42430
|
+
eventSurface: readStringParam(params, "eventSurface"),
|
|
42431
|
+
eventPresets: readStringParam(params, "eventPresets"),
|
|
42432
|
+
scheduleScope: readStringParam(params, "scheduleScope"),
|
|
42433
|
+
entryId: readStringParam(params, "entryId"),
|
|
42434
|
+
seriesId: readStringParam(params, "seriesId"),
|
|
42435
|
+
includeOccurrenceId: readStringParam(params, "includeOccurrenceId")
|
|
42436
|
+
});
|
|
42437
|
+
}
|
|
42438
|
+
async function listPublicCourses({ client, params }) {
|
|
42439
|
+
return await client.listPublicCourses({
|
|
42440
|
+
siteId: requireStringParam(params, "siteId", "listPublicCourses"),
|
|
42441
|
+
limit: parsePositiveIntegerParam(params, "limit"),
|
|
42442
|
+
stage: readStringParam(params, "stage")
|
|
42443
|
+
});
|
|
42444
|
+
}
|
|
42445
|
+
async function listPublicRouteCandidates({ client, params }) {
|
|
42446
|
+
const siteId = requireStringParam(params, "siteId", "listPublicRouteCandidates");
|
|
42447
|
+
const response = await client.getAllPublishedRoutes({ siteId });
|
|
42448
|
+
return {
|
|
42449
|
+
routes: response.items.flatMap((item) => {
|
|
42450
|
+
if (!item.path) return [];
|
|
42451
|
+
return [{
|
|
42452
|
+
entityId: item.entityId,
|
|
42453
|
+
path: item.path,
|
|
42454
|
+
title: item.title,
|
|
42455
|
+
kind: item.entityType,
|
|
42456
|
+
contentTypeKey: item.contentTypeKey ?? null
|
|
42457
|
+
}];
|
|
42458
|
+
})
|
|
42459
|
+
};
|
|
42460
|
+
}
|
|
42461
|
+
async function listPublicTeamMembers({ client, params }) {
|
|
42462
|
+
return await client.listPublicTeamMembers({
|
|
42463
|
+
siteId: requireStringParam(params, "siteId", "listPublicTeamMembers"),
|
|
42464
|
+
stage: readStringParam(params, "stage")
|
|
42465
|
+
});
|
|
42466
|
+
}
|
|
42467
|
+
async function listPublicProducts({ client, params }) {
|
|
42468
|
+
return await client.listPublicProducts({
|
|
42469
|
+
siteId: requireStringParam(params, "siteId", "listPublicProducts"),
|
|
42470
|
+
stage: readStringParam(params, "stage") === "preview" ? "preview" : "published",
|
|
42471
|
+
categorySelector: parsePublicProductCategorySelector(params.categorySelector)
|
|
42472
|
+
});
|
|
42473
|
+
}
|
|
42474
|
+
async function listPublicPasses({ client, params }) {
|
|
42475
|
+
return await client.listPublicPasses({
|
|
42476
|
+
siteId: requireStringParam(params, "siteId", "listPublicPasses"),
|
|
42477
|
+
categories: readStringParam(params, "categories")
|
|
42478
|
+
});
|
|
42479
|
+
}
|
|
42480
|
+
async function listPublicMemberships({ client, params }) {
|
|
42481
|
+
return await client.listPublicMemberships({
|
|
42482
|
+
siteId: requireStringParam(params, "siteId", "listPublicMemberships"),
|
|
42483
|
+
categories: readStringParam(params, "categories")
|
|
42484
|
+
});
|
|
42485
|
+
}
|
|
42486
|
+
async function getPublicFormById({ client, params }) {
|
|
42487
|
+
return await client.getPublicFormById({
|
|
42488
|
+
formId: requireStringParam(params, "formId", "getPublicFormById"),
|
|
42489
|
+
siteId: requireStringParam(params, "siteId", "getPublicFormById")
|
|
42490
|
+
});
|
|
42491
|
+
}
|
|
42492
|
+
async function getPublicBookingServices({ client, params }) {
|
|
42493
|
+
return await client.getPublicBookingServices({
|
|
42494
|
+
siteId: requireStringParam(params, "siteId", "getPublicBookingServices"),
|
|
42495
|
+
ids: readStringParam(params, "ids")
|
|
42496
|
+
});
|
|
42497
|
+
}
|
|
41389
42498
|
async function prefetchBlockData2(page, context, client, options) {
|
|
41390
42499
|
const { customBlocks } = options ?? {};
|
|
41391
42500
|
const customBlockMap = new Map(
|
|
@@ -41395,189 +42504,11 @@ async function prefetchBlockData2(page, context, client, options) {
|
|
|
41395
42504
|
apiClient: async ({ endpoint, params }) => {
|
|
41396
42505
|
if (!isSupportedLoaderEndpoint2(endpoint)) {
|
|
41397
42506
|
throw new Error(
|
|
41398
|
-
`Unsupported loader endpoint: ${endpoint}. SDK only supports: ${
|
|
42507
|
+
`Unsupported loader endpoint: ${endpoint}. SDK only supports: ${SUPPORTED_LOADER_ENDPOINTS.join(", ")}`
|
|
41399
42508
|
);
|
|
41400
42509
|
}
|
|
41401
42510
|
const resolvedParams = normalizeLoaderParams(endpoint, params, context);
|
|
41402
|
-
|
|
41403
|
-
case "listPublishedEntries": {
|
|
41404
|
-
const {
|
|
41405
|
-
siteId,
|
|
41406
|
-
type,
|
|
41407
|
-
orderBy,
|
|
41408
|
-
limit,
|
|
41409
|
-
stage,
|
|
41410
|
-
mode,
|
|
41411
|
-
entryIds,
|
|
41412
|
-
identifiers,
|
|
41413
|
-
entryRefs
|
|
41414
|
-
} = resolvedParams ?? {};
|
|
41415
|
-
if (!siteId || !type) {
|
|
41416
|
-
throw new Error("listPublishedEntries requires siteId and type params");
|
|
41417
|
-
}
|
|
41418
|
-
const parsedLimit = typeof limit === "string" ? Number.parseInt(limit, 10) : typeof limit === "number" ? limit : void 0;
|
|
41419
|
-
const order = orderBy === "order" ? "manual" : orderBy === "newest" || orderBy === "oldest" || orderBy === "title" ? orderBy : void 0;
|
|
41420
|
-
const parsedEntryRefs = mode === "manual" ? parseManualEntryRefs(identifiers, entryRefs, entryIds) : void 0;
|
|
41421
|
-
if (mode === "manual" && (!parsedEntryRefs || parsedEntryRefs.length === 0)) {
|
|
41422
|
-
return { entries: [] };
|
|
41423
|
-
}
|
|
41424
|
-
if (mode === "manual" && parsedEntryRefs) {
|
|
41425
|
-
return await client.getEntriesByIdentifiers({
|
|
41426
|
-
siteId,
|
|
41427
|
-
contentType: type,
|
|
41428
|
-
identifiers: parsedEntryRefs,
|
|
41429
|
-
preview: stage === "preview"
|
|
41430
|
-
});
|
|
41431
|
-
}
|
|
41432
|
-
return await client.getEntries({
|
|
41433
|
-
siteId,
|
|
41434
|
-
contentType: type,
|
|
41435
|
-
limit: parsedLimit,
|
|
41436
|
-
order,
|
|
41437
|
-
preview: stage === "preview"
|
|
41438
|
-
});
|
|
41439
|
-
}
|
|
41440
|
-
case "getPublishedEntryPreview": {
|
|
41441
|
-
const { siteId, type, slug } = resolvedParams ?? {};
|
|
41442
|
-
if (!siteId || !type || !slug) {
|
|
41443
|
-
throw new Error("getPublishedEntryPreview requires siteId, type, and slug params");
|
|
41444
|
-
}
|
|
41445
|
-
return await client.getEntry({ siteId, contentType: type, slug });
|
|
41446
|
-
}
|
|
41447
|
-
case "listPublicEvents": {
|
|
41448
|
-
const {
|
|
41449
|
-
siteId,
|
|
41450
|
-
limit,
|
|
41451
|
-
from,
|
|
41452
|
-
to,
|
|
41453
|
-
stage,
|
|
41454
|
-
categoryIds,
|
|
41455
|
-
venueId,
|
|
41456
|
-
kind,
|
|
41457
|
-
entryId,
|
|
41458
|
-
seriesId,
|
|
41459
|
-
includeOccurrenceId
|
|
41460
|
-
} = resolvedParams ?? {};
|
|
41461
|
-
if (!siteId) {
|
|
41462
|
-
throw new Error("listPublicEvents requires siteId param");
|
|
41463
|
-
}
|
|
41464
|
-
const parsedLimit = typeof limit === "string" ? Number.parseInt(limit, 10) : typeof limit === "number" ? limit : void 0;
|
|
41465
|
-
return await client.listPublicEvents({
|
|
41466
|
-
siteId,
|
|
41467
|
-
limit: parsedLimit,
|
|
41468
|
-
from,
|
|
41469
|
-
to,
|
|
41470
|
-
stage,
|
|
41471
|
-
categoryIds: typeof categoryIds === "string" ? categoryIds : void 0,
|
|
41472
|
-
venueId: typeof venueId === "string" ? venueId : void 0,
|
|
41473
|
-
kind: kind === "all" || kind === "courses" || kind === "events" ? kind : void 0,
|
|
41474
|
-
entryId: typeof entryId === "string" ? entryId : void 0,
|
|
41475
|
-
seriesId: typeof seriesId === "string" ? seriesId : void 0,
|
|
41476
|
-
includeOccurrenceId: typeof includeOccurrenceId === "string" ? includeOccurrenceId : void 0
|
|
41477
|
-
});
|
|
41478
|
-
}
|
|
41479
|
-
case "getPublicEventDetails": {
|
|
41480
|
-
const {
|
|
41481
|
-
siteId,
|
|
41482
|
-
limit,
|
|
41483
|
-
from,
|
|
41484
|
-
to,
|
|
41485
|
-
afterStartsAt,
|
|
41486
|
-
afterId,
|
|
41487
|
-
stage,
|
|
41488
|
-
categoryIds,
|
|
41489
|
-
venueId,
|
|
41490
|
-
staffMemberId,
|
|
41491
|
-
kind,
|
|
41492
|
-
entryId,
|
|
41493
|
-
seriesId,
|
|
41494
|
-
includeOccurrenceId
|
|
41495
|
-
} = resolvedParams ?? {};
|
|
41496
|
-
if (!siteId) {
|
|
41497
|
-
throw new Error("getPublicEventDetails requires siteId param");
|
|
41498
|
-
}
|
|
41499
|
-
const parsedLimit = typeof limit === "string" ? Number.parseInt(limit, 10) : typeof limit === "number" ? limit : void 0;
|
|
41500
|
-
return await client.getPublicEventDetails({
|
|
41501
|
-
siteId,
|
|
41502
|
-
limit: parsedLimit,
|
|
41503
|
-
from: typeof from === "string" ? from : void 0,
|
|
41504
|
-
to: typeof to === "string" ? to : void 0,
|
|
41505
|
-
afterStartsAt: typeof afterStartsAt === "string" ? afterStartsAt : void 0,
|
|
41506
|
-
afterId: typeof afterId === "string" ? afterId : void 0,
|
|
41507
|
-
stage: typeof stage === "string" ? stage : void 0,
|
|
41508
|
-
categoryIds: typeof categoryIds === "string" ? categoryIds : void 0,
|
|
41509
|
-
venueId: typeof venueId === "string" ? venueId : void 0,
|
|
41510
|
-
staffMemberId: typeof staffMemberId === "string" ? staffMemberId : void 0,
|
|
41511
|
-
kind: typeof kind === "string" ? kind : void 0,
|
|
41512
|
-
entryId: typeof entryId === "string" ? entryId : void 0,
|
|
41513
|
-
seriesId: typeof seriesId === "string" ? seriesId : void 0,
|
|
41514
|
-
includeOccurrenceId: typeof includeOccurrenceId === "string" ? includeOccurrenceId : void 0
|
|
41515
|
-
});
|
|
41516
|
-
}
|
|
41517
|
-
case "listPublicCourses": {
|
|
41518
|
-
const { siteId, limit, stage } = resolvedParams ?? {};
|
|
41519
|
-
if (!siteId) {
|
|
41520
|
-
throw new Error("listPublicCourses requires siteId param");
|
|
41521
|
-
}
|
|
41522
|
-
const parsedLimit = typeof limit === "string" ? Number.parseInt(limit, 10) : typeof limit === "number" ? limit : void 0;
|
|
41523
|
-
return await client.listPublicCourses({ siteId, limit: parsedLimit, stage });
|
|
41524
|
-
}
|
|
41525
|
-
case "listPublicTeamMembers": {
|
|
41526
|
-
const { siteId, stage } = resolvedParams ?? {};
|
|
41527
|
-
if (!siteId) {
|
|
41528
|
-
throw new Error("listPublicTeamMembers requires siteId param");
|
|
41529
|
-
}
|
|
41530
|
-
return await client.listPublicTeamMembers({
|
|
41531
|
-
siteId,
|
|
41532
|
-
stage: typeof stage === "string" ? stage : void 0
|
|
41533
|
-
});
|
|
41534
|
-
}
|
|
41535
|
-
case "listPublicProducts": {
|
|
41536
|
-
const { siteId, stage, categorySelector } = resolvedParams ?? {};
|
|
41537
|
-
if (!siteId) {
|
|
41538
|
-
throw new Error("listPublicProducts requires siteId param");
|
|
41539
|
-
}
|
|
41540
|
-
return await client.listPublicProducts({
|
|
41541
|
-
siteId,
|
|
41542
|
-
stage: stage === "preview" ? "preview" : "published",
|
|
41543
|
-
categorySelector: parsePublicProductCategorySelector(categorySelector)
|
|
41544
|
-
});
|
|
41545
|
-
}
|
|
41546
|
-
case "getPublicFormById": {
|
|
41547
|
-
const { formId, siteId } = resolvedParams ?? {};
|
|
41548
|
-
if (!formId) {
|
|
41549
|
-
throw new Error("getPublicFormById requires formId param");
|
|
41550
|
-
}
|
|
41551
|
-
if (!siteId) {
|
|
41552
|
-
throw new Error("getPublicFormById requires siteId param");
|
|
41553
|
-
}
|
|
41554
|
-
return await client.getPublicFormById({ formId, siteId });
|
|
41555
|
-
}
|
|
41556
|
-
case "getPublicBookingServices": {
|
|
41557
|
-
const { siteId, ids } = resolvedParams ?? {};
|
|
41558
|
-
if (!siteId) {
|
|
41559
|
-
throw new Error("getPublicBookingServices requires siteId param");
|
|
41560
|
-
}
|
|
41561
|
-
return await client.getPublicBookingServices({ siteId, ids });
|
|
41562
|
-
}
|
|
41563
|
-
case "listPublicPasses": {
|
|
41564
|
-
const { siteId, categories } = resolvedParams ?? {};
|
|
41565
|
-
if (!siteId) {
|
|
41566
|
-
throw new Error("listPublicPasses requires siteId param");
|
|
41567
|
-
}
|
|
41568
|
-
return await client.listPublicPasses({ siteId, categories });
|
|
41569
|
-
}
|
|
41570
|
-
case "listPublicMemberships": {
|
|
41571
|
-
const { siteId, categories } = resolvedParams ?? {};
|
|
41572
|
-
if (!siteId) {
|
|
41573
|
-
throw new Error("listPublicMemberships requires siteId param");
|
|
41574
|
-
}
|
|
41575
|
-
return await client.listPublicMemberships({ siteId, categories });
|
|
41576
|
-
}
|
|
41577
|
-
default: {
|
|
41578
|
-
throw new Error("Unhandled endpoint");
|
|
41579
|
-
}
|
|
41580
|
-
}
|
|
42511
|
+
return await loaderAdapters[endpoint]({ client, params: resolvedParams });
|
|
41581
42512
|
},
|
|
41582
42513
|
isValidEndpoint: isSupportedLoaderEndpoint2,
|
|
41583
42514
|
onError: (error, { block, loader }) => {
|
|
@@ -41665,6 +42596,76 @@ function resolveSiteCustomBlocks(site) {
|
|
|
41665
42596
|
return void 0;
|
|
41666
42597
|
}
|
|
41667
42598
|
|
|
42599
|
+
// src/rendering/helpers/pageRuntimeSupport.ts
|
|
42600
|
+
function buildSiteRenderSupport(site, mediaAssets) {
|
|
42601
|
+
const customBlocks = resolveSiteCustomBlocks(site);
|
|
42602
|
+
return {
|
|
42603
|
+
theme: site.theme,
|
|
42604
|
+
site: site.site,
|
|
42605
|
+
sdkConfig: site.sdkConfig ?? null,
|
|
42606
|
+
bookingOfferingPresets: site.bookingOfferingPresets ?? [],
|
|
42607
|
+
...customBlocks ? { customBlocks } : {},
|
|
42608
|
+
supabaseUrl: site.supabaseUrl,
|
|
42609
|
+
routeMap: site.routes,
|
|
42610
|
+
pagesByIdentifier: site.pagesByIdentifier,
|
|
42611
|
+
entriesByIdentifier: site.entriesByIdentifier,
|
|
42612
|
+
...mediaAssets ? { mediaAssets } : {}
|
|
42613
|
+
};
|
|
42614
|
+
}
|
|
42615
|
+
function collectMediaAssetSidecar(mediaAssets) {
|
|
42616
|
+
return Array.isArray(mediaAssets) && mediaAssets.length > 0 ? mediaAssets : void 0;
|
|
42617
|
+
}
|
|
42618
|
+
function convertPageResponseBlock(block) {
|
|
42619
|
+
if (!isRecord11(block)) {
|
|
42620
|
+
throw new Error("Invalid block format in page API response");
|
|
42621
|
+
}
|
|
42622
|
+
if (typeof block.id !== "string" && block.id !== null) {
|
|
42623
|
+
throw new Error(`Invalid block id in page: expected string or null, got ${typeof block.id}`);
|
|
42624
|
+
}
|
|
42625
|
+
if (typeof block.kind !== "string") {
|
|
42626
|
+
throw new Error(`Invalid block kind in page: expected string, got ${typeof block.kind}`);
|
|
42627
|
+
}
|
|
42628
|
+
if (typeof block.purpose !== "string") {
|
|
42629
|
+
throw new Error(`Invalid block purpose in page: expected string, got ${typeof block.purpose}`);
|
|
42630
|
+
}
|
|
42631
|
+
return {
|
|
42632
|
+
id: block.id,
|
|
42633
|
+
kind: block.kind,
|
|
42634
|
+
purpose: block.purpose,
|
|
42635
|
+
content: sanitizeSdkRuntimeBlockContent(block.kind, readContentRecord(block.content) ?? {}),
|
|
42636
|
+
draftContent: sanitizeNullableSdkRuntimeBlockContent(
|
|
42637
|
+
block.kind,
|
|
42638
|
+
readNestedContentRecord(block.draftContent)
|
|
42639
|
+
)
|
|
42640
|
+
};
|
|
42641
|
+
}
|
|
42642
|
+
function buildPageOutline(input) {
|
|
42643
|
+
return {
|
|
42644
|
+
name: input.name,
|
|
42645
|
+
path: input.path ?? input.fallbackPath,
|
|
42646
|
+
purpose: input.purpose,
|
|
42647
|
+
blocks: input.blocks.map(convertPageResponseBlock)
|
|
42648
|
+
};
|
|
42649
|
+
}
|
|
42650
|
+
function isRecord11(value) {
|
|
42651
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
42652
|
+
}
|
|
42653
|
+
function readContentRecord(value) {
|
|
42654
|
+
return isRecord11(value) ? value : void 0;
|
|
42655
|
+
}
|
|
42656
|
+
function readNestedContentRecord(value) {
|
|
42657
|
+
if (!isRecord11(value)) return null;
|
|
42658
|
+
return readContentRecord(value.data) ?? null;
|
|
42659
|
+
}
|
|
42660
|
+
function sanitizeSdkRuntimeBlockContent(blockKind, content) {
|
|
42661
|
+
if (blockKind !== "block.newsletter-signup") return content;
|
|
42662
|
+
const sanitized = sanitizeNewsletterSignupPublicContent(content);
|
|
42663
|
+
return isRecord11(sanitized) ? sanitized : {};
|
|
42664
|
+
}
|
|
42665
|
+
function sanitizeNullableSdkRuntimeBlockContent(blockKind, content) {
|
|
42666
|
+
return content ? sanitizeSdkRuntimeBlockContent(blockKind, content) : null;
|
|
42667
|
+
}
|
|
42668
|
+
|
|
41668
42669
|
// src/rendering/helpers/loadPage.ts
|
|
41669
42670
|
async function loadPage(params) {
|
|
41670
42671
|
const { client, siteId, path, pageId, preview = false, dataLoaderOverrides, searchParams, forceSite } = params;
|
|
@@ -41672,45 +42673,23 @@ async function loadPage(params) {
|
|
|
41672
42673
|
client.getSite({ id: siteId, ...forceSite ? { force: true } : {} }),
|
|
41673
42674
|
client.getPage({ siteId, path, preview })
|
|
41674
42675
|
]);
|
|
41675
|
-
const customBlocks = resolveSiteCustomBlocks(site);
|
|
41676
42676
|
if ("entry" in pageResponse) {
|
|
41677
42677
|
throw new Error(
|
|
41678
42678
|
"This path resolves to a content entry, not a page. Use loadContent() instead, which handles both pages and entries. For entries, loadContent() returns the raw entry data for custom rendering."
|
|
41679
42679
|
);
|
|
41680
42680
|
}
|
|
41681
42681
|
const { page: pageData } = pageResponse;
|
|
41682
|
-
const
|
|
41683
|
-
|
|
41684
|
-
|
|
41685
|
-
|
|
41686
|
-
|
|
41687
|
-
if (typeof block.id !== "string" && block.id !== null) {
|
|
41688
|
-
throw new Error(`Invalid block id: expected string or null, got ${typeof block.id}`);
|
|
41689
|
-
}
|
|
41690
|
-
if (typeof block.kind !== "string") {
|
|
41691
|
-
throw new Error(`Invalid block kind: expected string, got ${typeof block.kind}`);
|
|
41692
|
-
}
|
|
41693
|
-
if (typeof block.purpose !== "string") {
|
|
41694
|
-
throw new Error(`Invalid block purpose: expected string, got ${typeof block.purpose}`);
|
|
41695
|
-
}
|
|
41696
|
-
const typedBlock = block;
|
|
41697
|
-
return {
|
|
41698
|
-
id: typedBlock.id,
|
|
41699
|
-
kind: typedBlock.kind,
|
|
41700
|
-
purpose: typedBlock.purpose,
|
|
41701
|
-
// Include content for PageRenderer's getRenderableContent()
|
|
41702
|
-
content: typedBlock.content ?? {},
|
|
41703
|
-
// Include draftContent if available (for preview mode)
|
|
41704
|
-
draftContent: typedBlock.draftContent?.data ?? null
|
|
41705
|
-
};
|
|
41706
|
-
});
|
|
41707
|
-
const canonicalPagePath = pageData.path ?? path;
|
|
41708
|
-
const pageOutline = {
|
|
42682
|
+
const support = buildSiteRenderSupport(
|
|
42683
|
+
site,
|
|
42684
|
+
collectMediaAssetSidecar(pageResponse.mediaAssets)
|
|
42685
|
+
);
|
|
42686
|
+
const pageOutline = buildPageOutline({
|
|
41709
42687
|
name: pageData.name,
|
|
41710
|
-
path:
|
|
42688
|
+
path: pageData.path,
|
|
42689
|
+
fallbackPath: path,
|
|
41711
42690
|
purpose: pageData.purpose,
|
|
41712
|
-
blocks
|
|
41713
|
-
};
|
|
42691
|
+
blocks: pageData.blocks
|
|
42692
|
+
});
|
|
41714
42693
|
const prefetchContext = {
|
|
41715
42694
|
siteId,
|
|
41716
42695
|
pageId: pageId ?? pageData.id,
|
|
@@ -41723,7 +42702,7 @@ async function loadPage(params) {
|
|
|
41723
42702
|
client,
|
|
41724
42703
|
{
|
|
41725
42704
|
// Pass custom blocks so their config-based loaders are discovered
|
|
41726
|
-
customBlocks
|
|
42705
|
+
customBlocks: support.customBlocks
|
|
41727
42706
|
}
|
|
41728
42707
|
);
|
|
41729
42708
|
let resolvedData = configData;
|
|
@@ -41733,22 +42712,20 @@ async function loadPage(params) {
|
|
|
41733
42712
|
}
|
|
41734
42713
|
return {
|
|
41735
42714
|
page: pageOutline,
|
|
41736
|
-
theme:
|
|
41737
|
-
sdkConfig:
|
|
42715
|
+
theme: support.theme,
|
|
42716
|
+
sdkConfig: support.sdkConfig,
|
|
41738
42717
|
siteId,
|
|
41739
42718
|
resolvedData,
|
|
41740
|
-
|
|
41741
|
-
|
|
41742
|
-
...
|
|
42719
|
+
bookingOfferingPresets: support.bookingOfferingPresets,
|
|
42720
|
+
supabaseUrl: support.supabaseUrl,
|
|
42721
|
+
...support.mediaAssets ? { mediaAssets: support.mediaAssets } : {},
|
|
42722
|
+
...support.customBlocks ? { customBlocks: support.customBlocks } : {},
|
|
41743
42723
|
// Maps for CTA link resolution (e.g., { kind: 'page', identifier: 'about' })
|
|
41744
|
-
routeMap:
|
|
41745
|
-
pagesByIdentifier:
|
|
41746
|
-
entriesByIdentifier:
|
|
42724
|
+
routeMap: support.routeMap,
|
|
42725
|
+
pagesByIdentifier: support.pagesByIdentifier,
|
|
42726
|
+
entriesByIdentifier: support.entriesByIdentifier
|
|
41747
42727
|
};
|
|
41748
42728
|
}
|
|
41749
|
-
function toMediaAssetSidecar(mediaAssets) {
|
|
41750
|
-
return mediaAssets ?? [];
|
|
41751
|
-
}
|
|
41752
42729
|
|
|
41753
42730
|
// ../blocks/src/bindings/types.ts
|
|
41754
42731
|
var TRANSFORMS = {
|
|
@@ -42023,8 +43000,10 @@ async function loadContent(params) {
|
|
|
42023
43000
|
}
|
|
42024
43001
|
const site = siteResult.value;
|
|
42025
43002
|
const contentResponse = contentResult.value;
|
|
42026
|
-
const
|
|
42027
|
-
|
|
43003
|
+
const support = buildSiteRenderSupport(
|
|
43004
|
+
site,
|
|
43005
|
+
collectMediaAssetSidecar(contentResponse.mediaAssets)
|
|
43006
|
+
);
|
|
42028
43007
|
if (isEntryResponse(contentResponse)) {
|
|
42029
43008
|
const entryData = contentResponse.entry;
|
|
42030
43009
|
const draftContent = entryData.draftContent;
|
|
@@ -42050,13 +43029,14 @@ async function loadContent(params) {
|
|
|
42050
43029
|
entry,
|
|
42051
43030
|
{ siteId, preview },
|
|
42052
43031
|
client,
|
|
42053
|
-
{ customBlocks }
|
|
43032
|
+
{ customBlocks: support.customBlocks }
|
|
42054
43033
|
);
|
|
42055
43034
|
return {
|
|
42056
43035
|
type: "entry",
|
|
42057
43036
|
entry,
|
|
42058
43037
|
templatePage,
|
|
42059
43038
|
resolvedData: resolvedData2,
|
|
43039
|
+
bookingOfferingPresets: support.bookingOfferingPresets,
|
|
42060
43040
|
dataContext: {
|
|
42061
43041
|
contentEntry: {
|
|
42062
43042
|
...entry.content ?? {},
|
|
@@ -42068,29 +43048,29 @@ async function loadContent(params) {
|
|
|
42068
43048
|
_contentTypeSlug: entry.type
|
|
42069
43049
|
}
|
|
42070
43050
|
},
|
|
42071
|
-
theme:
|
|
43051
|
+
theme: support.theme,
|
|
42072
43052
|
siteId,
|
|
42073
|
-
...customBlocks ? { customBlocks } : {},
|
|
42074
|
-
site:
|
|
42075
|
-
sdkConfig:
|
|
42076
|
-
supabaseUrl:
|
|
42077
|
-
routeMap:
|
|
42078
|
-
pagesByIdentifier:
|
|
42079
|
-
entriesByIdentifier:
|
|
42080
|
-
...mediaAssets ? { mediaAssets } : {}
|
|
43053
|
+
...support.customBlocks ? { customBlocks: support.customBlocks } : {},
|
|
43054
|
+
site: support.site,
|
|
43055
|
+
sdkConfig: support.sdkConfig,
|
|
43056
|
+
supabaseUrl: support.supabaseUrl,
|
|
43057
|
+
routeMap: support.routeMap,
|
|
43058
|
+
pagesByIdentifier: support.pagesByIdentifier,
|
|
43059
|
+
entriesByIdentifier: support.entriesByIdentifier,
|
|
43060
|
+
...support.mediaAssets ? { mediaAssets: support.mediaAssets } : {}
|
|
42081
43061
|
};
|
|
42082
43062
|
}
|
|
42083
43063
|
const { page: pageData } = contentResponse;
|
|
42084
43064
|
const pageRecord = pageData;
|
|
42085
43065
|
const canonicalPagePath = pageData.path ?? pageRecord.path ?? "/";
|
|
42086
43066
|
const draftPagePath = pageRecord.draftPath ?? pageRecord.path ?? canonicalPagePath;
|
|
42087
|
-
const
|
|
42088
|
-
const pageOutline = {
|
|
43067
|
+
const pageOutline = buildPageOutline({
|
|
42089
43068
|
name: pageData.name,
|
|
42090
43069
|
path: canonicalPagePath,
|
|
43070
|
+
fallbackPath: "/",
|
|
42091
43071
|
purpose: pageData.purpose,
|
|
42092
|
-
blocks
|
|
42093
|
-
};
|
|
43072
|
+
blocks: pageData.blocks
|
|
43073
|
+
});
|
|
42094
43074
|
const resolvedData = await prefetchBlockData2(
|
|
42095
43075
|
pageOutline,
|
|
42096
43076
|
{
|
|
@@ -42099,7 +43079,7 @@ async function loadContent(params) {
|
|
|
42099
43079
|
previewStage: preview ? "preview" : "published"
|
|
42100
43080
|
},
|
|
42101
43081
|
client,
|
|
42102
|
-
{ customBlocks }
|
|
43082
|
+
{ customBlocks: support.customBlocks }
|
|
42103
43083
|
);
|
|
42104
43084
|
return {
|
|
42105
43085
|
type: "page",
|
|
@@ -42120,56 +43100,23 @@ async function loadContent(params) {
|
|
|
42120
43100
|
ogImageId: pageRecord.ogImageId ?? null
|
|
42121
43101
|
},
|
|
42122
43102
|
page: pageOutline,
|
|
42123
|
-
theme:
|
|
43103
|
+
theme: support.theme,
|
|
42124
43104
|
siteId,
|
|
42125
|
-
...customBlocks ? { customBlocks } : {},
|
|
43105
|
+
...support.customBlocks ? { customBlocks: support.customBlocks } : {},
|
|
42126
43106
|
resolvedData,
|
|
42127
|
-
|
|
42128
|
-
|
|
42129
|
-
|
|
42130
|
-
|
|
42131
|
-
|
|
42132
|
-
|
|
42133
|
-
|
|
43107
|
+
bookingOfferingPresets: support.bookingOfferingPresets,
|
|
43108
|
+
site: support.site,
|
|
43109
|
+
sdkConfig: support.sdkConfig,
|
|
43110
|
+
supabaseUrl: support.supabaseUrl,
|
|
43111
|
+
routeMap: support.routeMap,
|
|
43112
|
+
pagesByIdentifier: support.pagesByIdentifier,
|
|
43113
|
+
entriesByIdentifier: support.entriesByIdentifier,
|
|
43114
|
+
...support.mediaAssets ? { mediaAssets: support.mediaAssets } : {}
|
|
42134
43115
|
};
|
|
42135
43116
|
}
|
|
42136
43117
|
function isEntryResponse(response) {
|
|
42137
43118
|
return "entry" in response;
|
|
42138
43119
|
}
|
|
42139
|
-
function validateAndConvertBlock(block, source) {
|
|
42140
|
-
if (!block || typeof block !== "object") {
|
|
42141
|
-
throw new Error(`Invalid block format in ${source} API response`);
|
|
42142
|
-
}
|
|
42143
|
-
const blockRecord = block;
|
|
42144
|
-
const kindField = source === "template" ? "blockKind" : "kind";
|
|
42145
|
-
const kindValue = blockRecord[kindField];
|
|
42146
|
-
if (typeof blockRecord.id !== "string" && blockRecord.id !== null) {
|
|
42147
|
-
throw new Error(`Invalid block id in ${source}: expected string or null, got ${typeof blockRecord.id}`);
|
|
42148
|
-
}
|
|
42149
|
-
if (typeof kindValue !== "string") {
|
|
42150
|
-
throw new Error(`Invalid block ${kindField} in ${source}: expected string, got ${typeof kindValue}`);
|
|
42151
|
-
}
|
|
42152
|
-
if (source === "page") {
|
|
42153
|
-
if (typeof blockRecord.purpose !== "string") {
|
|
42154
|
-
throw new Error(`Invalid block purpose in ${source}: expected string, got ${typeof blockRecord.purpose}`);
|
|
42155
|
-
}
|
|
42156
|
-
const content2 = blockRecord.content ?? {};
|
|
42157
|
-
return {
|
|
42158
|
-
id: blockRecord.id,
|
|
42159
|
-
kind: kindValue,
|
|
42160
|
-
purpose: blockRecord.purpose,
|
|
42161
|
-
content: content2
|
|
42162
|
-
};
|
|
42163
|
-
}
|
|
42164
|
-
const scope = blockRecord.scope;
|
|
42165
|
-
const content = blockRecord.content ?? {};
|
|
42166
|
-
return {
|
|
42167
|
-
id: blockRecord.id,
|
|
42168
|
-
kind: kindValue,
|
|
42169
|
-
purpose: scope === "entry" ? "entry-content" : "template-layout",
|
|
42170
|
-
content
|
|
42171
|
-
};
|
|
42172
|
-
}
|
|
42173
43120
|
async function processEntryTemplate(templates, entrySlots, entry, context, client, options) {
|
|
42174
43121
|
const template = templates?.[0];
|
|
42175
43122
|
if (!template || !template.blocks?.length) {
|
|
@@ -42213,7 +43160,10 @@ async function processEntryTemplate(templates, entrySlots, entry, context, clien
|
|
|
42213
43160
|
return { templatePage, resolvedData };
|
|
42214
43161
|
}
|
|
42215
43162
|
function resolveTemplateBlock(block, bindingContext) {
|
|
42216
|
-
const rawContent =
|
|
43163
|
+
const rawContent = sanitizeSdkRuntimeBlockContent(
|
|
43164
|
+
block.blockKind,
|
|
43165
|
+
block.content ?? {}
|
|
43166
|
+
);
|
|
42217
43167
|
const baseContent = normalizeBindingOutput2(rawContent);
|
|
42218
43168
|
if (block.scope === "template") {
|
|
42219
43169
|
return {
|