@riverbankcms/sdk 0.139.0 → 0.140.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{PreviewEditorSidebar-BDeenhi3.mjs → PreviewEditorSidebar-CUyTzd5z.mjs} +4 -4
- package/dist/{PreviewEditorUI-DSRhgjF5.mjs → PreviewEditorUI-Agkw4v5i.mjs} +3 -3
- package/dist/{PreviewQueryProvider-D2K8GLUG.mjs → PreviewQueryProvider-CN0ewic5.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-CL7wSnYu.mjs → SdkPreviewModeRuntime-DdbeAdS8.mjs} +22 -8
- package/dist/{SiteChromeCustomizeContext-BhDn-5ir.mjs → SiteChromeCustomizeContext-CqGOz-Kv.mjs} +2053 -1110
- package/dist/_dts/ai/src/contracts/proposals.d.ts +165 -165
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +212 -212
- package/dist/_dts/api/src/accessAdmin.d.ts +74 -104
- package/dist/_dts/api/src/aiEndpoints.d.ts +5 -1
- package/dist/_dts/api/src/authSubmission.d.ts +46 -0
- package/dist/_dts/api/src/billing.d.ts +8 -4
- package/dist/_dts/api/src/billingEndpointDefinitions.d.ts +23 -0
- package/dist/_dts/api/src/billingEndpointTypes.d.ts +26 -0
- package/dist/_dts/api/src/blocks.d.ts +2 -0
- package/dist/_dts/api/src/bookingRecords.d.ts +1 -2
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +8 -1
- package/dist/_dts/api/src/communications.d.ts +0 -1
- package/dist/_dts/api/src/contentRuntime.d.ts +8 -3
- package/dist/_dts/api/src/endpoints.d.ts +93 -64
- package/dist/_dts/api/src/event-destination-policy.d.ts +2 -1
- package/dist/_dts/api/src/footerSettings.d.ts +9 -6
- package/dist/_dts/api/src/index.d.ts +5 -6
- package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -1
- package/dist/_dts/api/src/indexExtendedTypes.d.ts +1 -1
- package/dist/_dts/api/src/mailingListIntegration.d.ts +8 -2
- package/dist/_dts/api/src/navigation/dashboardSettingsNav.d.ts +1 -1
- package/dist/_dts/api/src/navigation/types.d.ts +1 -1
- package/dist/_dts/api/src/onboarding/confirmationResend.d.ts +25 -0
- package/dist/_dts/api/src/onboarding/surfaceData.d.ts +32 -32
- package/dist/_dts/api/src/publicBookingAvailabilityEndpointDefinitions.d.ts +8 -0
- package/dist/_dts/api/src/publicExperience/commerceEndpoints.d.ts +1 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +11 -3
- package/dist/_dts/api/src/publicExperience/sharedTypes.d.ts +3 -29
- package/dist/_dts/api/src/publicOnboardingAttemptEndpointDefinitions.d.ts +65 -0
- package/dist/_dts/api/src/saveOutcome.d.ts +20 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +3 -22
- package/dist/_dts/api/src/sdkPushContracts.d.ts +18 -0
- package/dist/_dts/api/src/sdkThemeWire.d.ts +44 -44
- package/dist/_dts/api/src/settings/permissions.d.ts +12 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +9 -5
- package/dist/_dts/api/src/siteOnboarding.d.ts +2 -9
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +2 -4
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +3 -1
- package/dist/_dts/api/src/siteSettings.d.ts +20 -7
- package/dist/_dts/api/src/types.d.ts +77 -77
- package/dist/_dts/api/src/wholeSeriesRuns.d.ts +2 -37
- package/dist/_dts/billing/src/membership/index.d.ts +3 -0
- package/dist/_dts/billing/src/plans/types.d.ts +3 -0
- package/dist/_dts/billing/src/site-arrangements.d.ts +14 -3
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +16 -4
- package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +2 -0
- package/dist/_dts/blocks/src/pageRendererContracts.d.ts +5 -0
- package/dist/_dts/blocks/src/portal/types.d.ts +2 -4
- package/dist/_dts/blocks/src/portal/waitlist-types.d.ts +35 -0
- package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +2 -0
- 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/data/index.d.ts +2 -2
- package/dist/_dts/blocks/src/system/data/prefetchBlockData.d.ts +2 -1
- package/dist/_dts/blocks/src/system/data/types.d.ts +9 -0
- package/dist/_dts/blocks/src/system/registry.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +0 -28
- package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +7 -3
- package/dist/_dts/blocks/src/system/runtime/api/types/portal.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/waitlist-claims.d.ts +7 -2
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +30 -6
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +15 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/appointment-services.d.ts +43 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationSurface.d.ts +1 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/TicketSelectionStep.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/checkoutRecovery.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventSourceRecovery.d.ts +56 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +6 -8
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useCheckoutRecovery.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +8 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +10 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventSourceRecovery.d.ts +18 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.client.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +24 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.server.d.ts +4 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.interactive.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/resolver.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +2 -6
- package/dist/_dts/blocks/src/system/runtime/shared/index.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.d.ts +2 -0
- package/dist/_dts/commerce/src/purchase/event-registration-errors.d.ts +4 -0
- package/dist/_dts/commerce/src/purchase/orderItemMetadata.d.ts +27 -4
- package/dist/_dts/content-editor/src/controller/EntryControllerProvider.d.ts +2 -1
- package/dist/_dts/content-editor/src/hooks/useBlockAutosave.d.ts +3 -1
- package/dist/_dts/content-editor/src/useFooterComposerState.d.ts +3 -0
- package/dist/_dts/core/src/branded.d.ts +0 -8
- package/dist/_dts/core/src/index.d.ts +1 -0
- package/dist/_dts/core/src/mailing-list-setup-parser.d.ts +1 -1
- package/dist/_dts/core/src/mailing-list-setup.d.ts +14 -1
- package/dist/_dts/core/src/mailing-list-submission.d.ts +7 -27
- package/dist/_dts/core/src/participants.d.ts +2 -29
- package/dist/_dts/core/src/public-experience.d.ts +4 -0
- package/dist/_dts/core/src/public-profile.d.ts +27 -1
- package/dist/_dts/core/src/site-route-target.d.ts +9 -2
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +293 -606
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/MailingListGlobalSettingsSummary.d.ts +10 -0
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/MailingListTargetingField.d.ts +3 -2
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/context.d.ts +3 -2
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/loaders.d.ts +3 -2
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/targetingState.d.ts +19 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +14 -20
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +7 -1
- package/dist/_dts/sdk/src/rendering/helpers/templateContent.d.ts +1 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/accordions/types.d.ts +3 -3
- package/dist/_dts/theme-core/src/cards/types.d.ts +21 -21
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/header/interactionPalette.d.ts +8 -2
- package/dist/_dts/theme-core/src/header/legacyHeaderVariant.d.ts +2 -2
- package/dist/_dts/theme-core/src/inputs/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +54 -54
- package/dist/_dts/theme-core/src/runtime/buildThemeRuntimeFromBridge.d.ts +1 -4
- package/dist/_dts/theme-core/src/schema.d.ts +84 -84
- package/dist/_dts/theme-core/src/shared/componentStyles.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/backgroundAppearance.d.ts +2 -2
- package/dist/_dts/theme-core/src/surfaces/foregroundInteraction.d.ts +77 -0
- package/dist/_dts/theme-core/src/surfaces/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/typography/generateTypographyCss.d.ts +2 -2
- package/dist/_dts/ui/src/lib/use-delayed-flag.d.ts +9 -0
- package/dist/_dts/ui/src/pending-button.d.ts +10 -0
- package/dist/client/{BookingConsentAgreement-CZvTDtsK.mjs → BookingConsentAgreement-CuKa82V4.mjs} +4 -4
- package/dist/client/{DiscountCodeDisclosure-D-DsLCMU.mjs → DiscountCodeDisclosure-BbYieKWB.mjs} +1 -1
- package/dist/client/{EventCombined.client-dWqgd5ZO.mjs → EventCombined.client-LTfR1Aby.mjs} +6 -6
- package/dist/client/{EventListing.client-BMRa9IYp.mjs → EventListing.client-DUHpYSuo.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-D21W9kBZ.mjs → LeafletStaticMap-CHRupL6m.mjs} +1 -1
- package/dist/client/{accordion-FxF_ta47.mjs → accordion-6HiIFxNL.mjs} +1 -1
- package/dist/client/{bookingForm-YnwW4TGw.mjs → bookingForm-Dlmid43H.mjs} +7 -7
- package/dist/client/bookings.mjs +325 -140
- package/dist/client/{carousel-vng7fFT5.mjs → carousel-DmkZRRq_.mjs} +2 -2
- package/dist/client/{carousel.client-59G_WMr4.mjs → carousel.client-DQTjCVQT.mjs} +1 -1
- package/dist/client/{cart-DEPDsjNk.mjs → cart-CIC24330.mjs} +3 -3
- package/dist/client/{checkout-CZRWu9rW.mjs → checkout-D1Zw9imo.mjs} +3 -3
- package/dist/client/{checkoutUrls-BuseL0dw.mjs → checkoutUrls-FL6lRkrt.mjs} +1 -1
- package/dist/client/client.mjs +1717 -882
- package/dist/client/{colorStyles-CrxJrPjJ.mjs → colorStyles-3013aRAY.mjs} +3 -1
- package/dist/client/{context-DvU_WUmd.mjs → context-Cy1OayHx.mjs} +6 -19
- package/dist/client/{dates-wnPMiRl5.mjs → dates-aDcfoLHr.mjs} +2 -2
- package/dist/client/{eventCalendar-BA3Q5L15.mjs → eventCalendar-FQxMPAjf.mjs} +8 -8
- package/dist/client/{eventCombined-51wgR-1R.mjs → eventCombined-Dr3ac6Hb.mjs} +3 -3
- package/dist/client/{eventDetails-modaetpm.mjs → eventDetails-D-AzUHFQ.mjs} +4 -4
- package/dist/client/{eventListing-D8t2J3Kv.mjs → eventListing-B3XxBf3i.mjs} +3 -3
- package/dist/client/{eventRegistration-CYqtkCE_.mjs → eventRegistration-I6EaokFD.mjs} +500 -152
- package/dist/client/{form-CBKXN5In.mjs → form-BbWckVWY.mjs} +3 -3
- package/dist/client/{headerSection-DylDqNrs.mjs → headerSection-C9qU4Y7x.mjs} +2 -2
- package/dist/client/hooks.mjs +445 -180
- package/dist/client/{locationMap-CvWrG0vZ.mjs → locationMap-CLCShvlG.mjs} +3 -3
- package/dist/client/{media-BOHuueS5.mjs → media-DHpfFwd3.mjs} +1 -1
- package/dist/client/{newsletterForm-Btwk70zw.mjs → newsletterForm-Briukxzi.mjs} +130 -87
- package/dist/client/{pricing-Uzw-GQ6Y.mjs → pricing-Copadu-2.mjs} +1 -1
- package/dist/client/{productDetail-JLcUYKnd.mjs → productDetail-oujlRd-r.mjs} +3 -3
- package/dist/client/{productList-FM0cbUzj.mjs → productList-BRiIRUcd.mjs} +3 -3
- package/dist/client/{propsDecoder-DYzafZb2.mjs → propsDecoder-CB2KS_ko.mjs} +130 -24
- package/dist/client/rendering/client.mjs +911 -400
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +1696 -818
- package/dist/client/{scrollToBlock-CvXszexS.mjs → scrollToBlock-B1IS1_ua.mjs} +1 -1
- package/dist/client/{shop-BIcjvy5a.mjs → shop-Vn6yNFED.mjs} +6 -6
- package/dist/client/{shop-commerce-BZQsy7xw.mjs → shop-commerce-BVTqipYp.mjs} +7 -7
- package/dist/client/{shop-commerce-store-D5V7XAb5.mjs → shop-commerce-store-BVnJVy7v.mjs} +1 -1
- package/dist/client/{shopShared-DowkXevB.mjs → shopShared-COIeK77T.mjs} +4 -4
- package/dist/client/{useEventFilters-oMoTw_JE.mjs → useEventFilters-DzIUcS9n.mjs} +7 -7
- package/dist/preview-next/before-render.mjs +119 -64
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/keepAlive.mjs +119 -64
- package/dist/preview-next/middleware.mjs +119 -64
- package/dist/{previewAuthStore-COUyAKaX.mjs → previewAuthStore-Gjb6r6vz.mjs} +119 -64
- package/dist/{sdk-runtime-D4k2LSGF.mjs → sdk-runtime-CnCLvZRv.mjs} +2 -2
- package/dist/{separator-UGtpag4Z.mjs → separator-DKDRJ1oH.mjs} +1 -1
- package/dist/server/components.mjs +787 -323
- package/dist/server/config-validation.mjs +328 -79
- package/dist/server/config.mjs +332 -83
- package/dist/server/data.mjs +441 -180
- package/dist/server/index.mjs +126 -66
- package/dist/server/next.mjs +1031 -595
- package/dist/server/page-converter.mjs +183 -74
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1068 -592
- package/dist/server/rendering.mjs +802 -324
- package/dist/server/routing.mjs +506 -214
- package/dist/server/server.mjs +468 -244
- package/dist/server/theme-bridge.mjs +433 -100
- package/dist/server/theme.mjs +8 -2
- package/dist/styles/index.css +237 -43
- package/package.json +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/BookingOptionCompactRow.d.ts +0 -29
- package/dist/_dts/blocks/src/system/runtime/shared/components/BookingOptionList.d.ts +0 -13
package/dist/server/config.mjs
CHANGED
|
@@ -1359,10 +1359,12 @@ const unsafeAsApiKeyId = (id) => id;
|
|
|
1359
1359
|
const unsafeAsEventOfferingId = (id) => id;
|
|
1360
1360
|
const unsafeAsEventSeriesId = (id) => id;
|
|
1361
1361
|
const unsafeAsUserId = (id) => id;
|
|
1362
|
+
const unsafeAsContentVersionId = (id) => id;
|
|
1362
1363
|
const parseSiteId = (value) => parseUuidBrand(value, unsafeAsSiteId);
|
|
1363
1364
|
const parseApiKeyId = (value) => parseUuidBrand(value, unsafeAsApiKeyId);
|
|
1364
1365
|
const parseEventOfferingId = (value) => parseUuidBrand(value, unsafeAsEventOfferingId);
|
|
1365
1366
|
const parseUserId = (value) => parseUuidBrand(value, unsafeAsUserId);
|
|
1367
|
+
const parseContentVersionId = (value) => parseUuidBrand(value, unsafeAsContentVersionId);
|
|
1366
1368
|
const parseEventSeriesId = (value) => parseUuidBrand(value, unsafeAsEventSeriesId);
|
|
1367
1369
|
//#endregion
|
|
1368
1370
|
//#region ../core/src/assert-never.ts
|
|
@@ -1596,7 +1598,7 @@ function parseEventPageSurfaceDestinationMode(value) {
|
|
|
1596
1598
|
return value === "cms-managed" || value === "system-managed" ? value : void 0;
|
|
1597
1599
|
}
|
|
1598
1600
|
function parseEventPageSurfaceSubject(value) {
|
|
1599
|
-
if (!isRecord$
|
|
1601
|
+
if (!isRecord$12(value)) return err({ kind: "notObject" });
|
|
1600
1602
|
switch (value.kind) {
|
|
1601
1603
|
case "eventSeries": {
|
|
1602
1604
|
const eventSeriesId = parseEventSeriesId(value.eventSeriesId);
|
|
@@ -1651,7 +1653,7 @@ function parseEventSeriesIdList(values) {
|
|
|
1651
1653
|
}
|
|
1652
1654
|
return ok(parsed);
|
|
1653
1655
|
}
|
|
1654
|
-
function isRecord$
|
|
1656
|
+
function isRecord$12(value) {
|
|
1655
1657
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1656
1658
|
}
|
|
1657
1659
|
//#endregion
|
|
@@ -1822,7 +1824,7 @@ function toLocationCoordinates(value) {
|
|
|
1822
1824
|
}
|
|
1823
1825
|
//#endregion
|
|
1824
1826
|
//#region ../core/src/rich-text.ts
|
|
1825
|
-
function isRecord$
|
|
1827
|
+
function isRecord$11(value) {
|
|
1826
1828
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1827
1829
|
}
|
|
1828
1830
|
function hasOnlyKeys(value, allowed) {
|
|
@@ -1842,15 +1844,15 @@ function isDenseArrayOf(value, predicate) {
|
|
|
1842
1844
|
return true;
|
|
1843
1845
|
}
|
|
1844
1846
|
function isTipTapMark(value) {
|
|
1845
|
-
return isRecord$
|
|
1847
|
+
return isRecord$11(value) && hasOnlyKeys(value, markKeys) && typeof value.type === "string" && value.type.length > 0 && (value.attrs === void 0 || isRecord$11(value.attrs));
|
|
1846
1848
|
}
|
|
1847
1849
|
function isTipTapNode(value) {
|
|
1848
|
-
if (!isRecord$
|
|
1850
|
+
if (!isRecord$11(value) || !hasOnlyKeys(value, nodeKeys) || typeof value.type !== "string" || value.type.length === 0 || value.type === "doc" || value.attrs !== void 0 && !isRecord$11(value.attrs) || value.marks !== void 0 && (!Array.isArray(value.marks) || !isDenseArrayOf(value.marks, isTipTapMark)) || value.content !== void 0 && (!Array.isArray(value.content) || !isDenseArrayOf(value.content, isTipTapNode))) return false;
|
|
1849
1851
|
if (value.type === "text") return typeof value.text === "string" && value.text.length > 0 && value.content === void 0;
|
|
1850
1852
|
return value.text === void 0;
|
|
1851
1853
|
}
|
|
1852
1854
|
function isCanonicalRichTextDoc(value) {
|
|
1853
|
-
return isRecord$
|
|
1855
|
+
return isRecord$11(value) && hasOnlyKeys(value, rootKeys) && value.type === "doc" && Array.isArray(value.content) && isDenseArrayOf(value.content, isTipTapNode);
|
|
1854
1856
|
}
|
|
1855
1857
|
//#endregion
|
|
1856
1858
|
//#region ../core/src/mailing-list-identifiers.ts
|
|
@@ -1867,16 +1869,47 @@ function parsePositiveInteger(value) {
|
|
|
1867
1869
|
function parseNewsletterListId(value) {
|
|
1868
1870
|
return parseTrimmedMatchingString(value, UUID_PATTERN);
|
|
1869
1871
|
}
|
|
1872
|
+
function parseMailchimpAccountId(value) {
|
|
1873
|
+
return parseTrimmedMatchingString(value, OPAQUE_ID_PATTERN);
|
|
1874
|
+
}
|
|
1870
1875
|
function parseMailchimpAudienceId(value) {
|
|
1871
1876
|
return parseTrimmedMatchingString(value, OPAQUE_ID_PATTERN);
|
|
1872
1877
|
}
|
|
1873
1878
|
function parseMailchimpInterestId(value) {
|
|
1874
1879
|
return parseTrimmedMatchingString(value, OPAQUE_ID_PATTERN);
|
|
1875
1880
|
}
|
|
1881
|
+
function parseBrevoAccountId(value) {
|
|
1882
|
+
return parseTrimmedMatchingString(value, OPAQUE_ID_PATTERN);
|
|
1883
|
+
}
|
|
1876
1884
|
function parseBrevoListId(value) {
|
|
1877
1885
|
return parsePositiveInteger(value);
|
|
1878
1886
|
}
|
|
1879
1887
|
//#endregion
|
|
1888
|
+
//#region ../core/src/mailing-list-setup.ts
|
|
1889
|
+
function isRecord$10(value) {
|
|
1890
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1891
|
+
}
|
|
1892
|
+
const DEFAULT_MAILING_LIST_SUCCESS_MESSAGE = "Thanks — you're on the list.";
|
|
1893
|
+
function parseMailingListProviderScope(value) {
|
|
1894
|
+
if (!isRecord$10(value)) return err("invalid_mailing_list_provider_scope");
|
|
1895
|
+
if (value.provider === "native") return ok({ provider: "native" });
|
|
1896
|
+
if (value.provider === "brevo") {
|
|
1897
|
+
const accountId = parseBrevoAccountId(value.accountId);
|
|
1898
|
+
return accountId !== null ? ok({
|
|
1899
|
+
provider: "brevo",
|
|
1900
|
+
accountId
|
|
1901
|
+
}) : err("invalid_mailing_list_provider_scope");
|
|
1902
|
+
}
|
|
1903
|
+
if (value.provider === "mailchimp") {
|
|
1904
|
+
const accountId = parseMailchimpAccountId(value.accountId);
|
|
1905
|
+
return accountId !== null ? ok({
|
|
1906
|
+
provider: "mailchimp",
|
|
1907
|
+
accountId
|
|
1908
|
+
}) : err("invalid_mailing_list_provider_scope");
|
|
1909
|
+
}
|
|
1910
|
+
return err("invalid_mailing_list_provider_scope");
|
|
1911
|
+
}
|
|
1912
|
+
//#endregion
|
|
1880
1913
|
//#region ../core/src/mailing-list-setup-parser.ts
|
|
1881
1914
|
function parseMailingListGlobalForm(value) {
|
|
1882
1915
|
if (!isRecord$9(value)) return formError("shape");
|
|
@@ -1885,12 +1918,15 @@ function parseMailingListGlobalForm(value) {
|
|
|
1885
1918
|
if (typeof value.includeOptionalPhone !== "boolean") return formError("includeOptionalPhone");
|
|
1886
1919
|
const buttonLabel = parseRequiredString(value.buttonLabel);
|
|
1887
1920
|
if (buttonLabel === null) return formError("buttonLabel");
|
|
1921
|
+
const successMessage = parseRequiredString(value.successMessage);
|
|
1922
|
+
if (successMessage === null) return formError("successMessage");
|
|
1888
1923
|
const privacyNote = parseOptionalString(value.privacyNote);
|
|
1889
1924
|
if (privacyNote === void 0) return formError("privacyNote");
|
|
1890
1925
|
return ok({
|
|
1891
1926
|
fields,
|
|
1892
1927
|
includeOptionalPhone: value.includeOptionalPhone,
|
|
1893
1928
|
buttonLabel,
|
|
1929
|
+
successMessage,
|
|
1894
1930
|
privacyNote
|
|
1895
1931
|
});
|
|
1896
1932
|
}
|
|
@@ -2220,11 +2256,17 @@ function parseMailingListSignedSourceToken(value) {
|
|
|
2220
2256
|
const parsed = typeof value === "string" ? value.trim() : "";
|
|
2221
2257
|
return /^[A-Za-z0-9._~-]{16,1000}$/u.test(parsed) ? parsed : null;
|
|
2222
2258
|
}
|
|
2223
|
-
function
|
|
2224
|
-
const parsed =
|
|
2225
|
-
return parsed
|
|
2259
|
+
function parseMailingListContentVersionId(value) {
|
|
2260
|
+
const parsed = parseContentVersionId(value);
|
|
2261
|
+
return parsed.ok ? parsed.value : null;
|
|
2262
|
+
}
|
|
2263
|
+
function buildMailingListSignupBlockSourceRef(blockId, contentVersionId) {
|
|
2264
|
+
const parsedBlockId = parseMailingListBlockId(blockId);
|
|
2265
|
+
const parsedContentVersionId = parseMailingListContentVersionId(contentVersionId);
|
|
2266
|
+
return parsedBlockId !== null && parsedContentVersionId !== null ? {
|
|
2226
2267
|
tag: "block_ref",
|
|
2227
|
-
blockId:
|
|
2268
|
+
blockId: parsedBlockId,
|
|
2269
|
+
contentVersionId: parsedContentVersionId
|
|
2228
2270
|
} : null;
|
|
2229
2271
|
}
|
|
2230
2272
|
//#endregion
|
|
@@ -2729,6 +2771,14 @@ const PUBLIC_BOOKING_AVAILABILITY_ENDPOINT_DEFINITIONS = defineEndpointDefinitio
|
|
|
2729
2771
|
auth: "public",
|
|
2730
2772
|
responseKind: "json"
|
|
2731
2773
|
},
|
|
2774
|
+
getPublicBookingServiceBySlug: {
|
|
2775
|
+
path: "/public/bookings/services/by-slug/{slug}",
|
|
2776
|
+
method: "GET",
|
|
2777
|
+
revalidate: publicReadFreshnessSeconds("getPublicBookingService"),
|
|
2778
|
+
tags: [TAG_TEMPLATES.publicBookingServices],
|
|
2779
|
+
auth: "public",
|
|
2780
|
+
responseKind: "json"
|
|
2781
|
+
},
|
|
2732
2782
|
getPublicBookingResourcesReference: {
|
|
2733
2783
|
path: "/public/bookings/resources/reference",
|
|
2734
2784
|
method: "GET",
|
|
@@ -3281,16 +3331,110 @@ const PUBLIC_READ_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
3281
3331
|
responseKind: "json"
|
|
3282
3332
|
}
|
|
3283
3333
|
});
|
|
3334
|
+
//#endregion
|
|
3335
|
+
//#region ../api/src/publicOnboardingAttemptEndpointDefinitions.ts
|
|
3336
|
+
/**
|
|
3337
|
+
* The anonymous onboarding attempt, addressed by its opaque resume token.
|
|
3338
|
+
*
|
|
3339
|
+
* Every route here is reached before there is an account, so none of them can
|
|
3340
|
+
* be scoped to a site or a user: the token is the whole credential. They are
|
|
3341
|
+
* kept together so that stays obvious.
|
|
3342
|
+
*/
|
|
3343
|
+
const PUBLIC_ONBOARDING_ATTEMPT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
3344
|
+
createPublicOnboardingAttempt: {
|
|
3345
|
+
path: "/public/onboarding/attempts",
|
|
3346
|
+
method: "POST",
|
|
3347
|
+
auth: "public",
|
|
3348
|
+
errors: [],
|
|
3349
|
+
responseKind: "json"
|
|
3350
|
+
},
|
|
3351
|
+
createPublicOnboardingLogoUploadUrl: {
|
|
3352
|
+
path: "/public/onboarding/attempts/{attemptToken}/logo-upload-url",
|
|
3353
|
+
method: "POST",
|
|
3354
|
+
auth: "public",
|
|
3355
|
+
errors: [],
|
|
3356
|
+
responseKind: "json"
|
|
3357
|
+
},
|
|
3358
|
+
uploadPublicOnboardingLogo: {
|
|
3359
|
+
path: "/public/onboarding/attempts/{attemptToken}/logo",
|
|
3360
|
+
method: "POST",
|
|
3361
|
+
auth: "public",
|
|
3362
|
+
errors: [],
|
|
3363
|
+
responseKind: "json"
|
|
3364
|
+
},
|
|
3365
|
+
getPublicOnboardingAttempt: {
|
|
3366
|
+
path: "/public/onboarding/attempts/{attemptToken}",
|
|
3367
|
+
method: "GET",
|
|
3368
|
+
auth: "public",
|
|
3369
|
+
errors: [],
|
|
3370
|
+
responseKind: "json"
|
|
3371
|
+
},
|
|
3372
|
+
getPublicOnboardingAttemptProgress: {
|
|
3373
|
+
path: "/public/onboarding/attempts/{attemptToken}/status",
|
|
3374
|
+
method: "GET",
|
|
3375
|
+
auth: "public",
|
|
3376
|
+
errors: [],
|
|
3377
|
+
responseKind: "json"
|
|
3378
|
+
},
|
|
3379
|
+
updatePublicOnboardingAttempt: {
|
|
3380
|
+
path: "/public/onboarding/attempts/{attemptToken}",
|
|
3381
|
+
method: "PATCH",
|
|
3382
|
+
auth: "public",
|
|
3383
|
+
errors: [],
|
|
3384
|
+
responseKind: "json"
|
|
3385
|
+
},
|
|
3386
|
+
runPublicOnboardingAttempt: {
|
|
3387
|
+
path: "/public/onboarding/attempts/{attemptToken}/run",
|
|
3388
|
+
method: "POST",
|
|
3389
|
+
auth: "public",
|
|
3390
|
+
errors: [],
|
|
3391
|
+
responseKind: "json"
|
|
3392
|
+
},
|
|
3393
|
+
resendPublicOnboardingAttemptConfirmation: {
|
|
3394
|
+
path: "/public/onboarding/attempts/{attemptToken}/resend-confirmation",
|
|
3395
|
+
method: "POST",
|
|
3396
|
+
auth: "public",
|
|
3397
|
+
errors: [],
|
|
3398
|
+
responseKind: "json"
|
|
3399
|
+
}
|
|
3400
|
+
});
|
|
3401
|
+
//#endregion
|
|
3402
|
+
//#region ../api/src/billingEndpointDefinitions.ts
|
|
3403
|
+
const BILLING_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
3404
|
+
adminChangePlan: {
|
|
3405
|
+
path: "/admin/billing/plan",
|
|
3406
|
+
method: "POST",
|
|
3407
|
+
tags: ["admin", "billing"],
|
|
3408
|
+
auth: "admin",
|
|
3409
|
+
responseKind: "json"
|
|
3410
|
+
},
|
|
3411
|
+
changePlan: {
|
|
3412
|
+
path: "/billing/plan/change",
|
|
3413
|
+
method: "POST",
|
|
3414
|
+
tags: ["billing"],
|
|
3415
|
+
auth: "user",
|
|
3416
|
+
responseKind: "json"
|
|
3417
|
+
},
|
|
3418
|
+
createBillingPortalSession: {
|
|
3419
|
+
path: "/billing/portal/session",
|
|
3420
|
+
method: "POST",
|
|
3421
|
+
tags: ["billing"],
|
|
3422
|
+
auth: "user",
|
|
3423
|
+
responseKind: "json"
|
|
3424
|
+
}
|
|
3425
|
+
});
|
|
3284
3426
|
({
|
|
3285
3427
|
...ACCOUNT_ENDPOINT_DEFINITIONS,
|
|
3428
|
+
...PUBLIC_ONBOARDING_ATTEMPT_ENDPOINT_DEFINITIONS,
|
|
3286
3429
|
...PUBLIC_EVENT_ENDPOINT_DEFINITIONS,
|
|
3287
3430
|
...GIFTING_ENDPOINT_DEFINITIONS,
|
|
3288
|
-
...PUBLIC_READ_ENDPOINT_DEFINITIONS
|
|
3431
|
+
...PUBLIC_READ_ENDPOINT_DEFINITIONS,
|
|
3432
|
+
...BILLING_ENDPOINT_DEFINITIONS
|
|
3289
3433
|
}), TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, { ...SITE_API_KEY_ENDPOINT_DEFINITIONS }, TAG_TEMPLATES.site, TAG_TEMPLATES.siteBookingSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteBookingSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings, {
|
|
3290
3434
|
...NEWSLETTER_ENDPOINT_DEFINITIONS,
|
|
3291
3435
|
...APPOINTMENT_ENDPOINT_DEFINITIONS,
|
|
3292
3436
|
...EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS
|
|
3293
|
-
}, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteById, TAG_TEMPLATES.siteBySlug, TAG_TEMPLATES.siteByDomain, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteById, TAG_TEMPLATES.siteBySlug, TAG_TEMPLATES.siteByDomain, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.workflowRunById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.routeById, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.navigationItemById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.navigationItemById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRedirects, TAG_TEMPLATES.siteRouteOutcomes, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRedirects, TAG_TEMPLATES.siteRouteOutcomes, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.siteForms, { ...PUBLIC_BOOKING_AVAILABILITY_ENDPOINT_DEFINITIONS }, TAG_TEMPLATES.publicEventFilters, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicShop, TAG_TEMPLATES.publicCheckout, TAG_TEMPLATES.siteRoutableContent, { ...PUBLIC_EVENT_CHECKOUT_ENDPOINT_DEFINITIONS }, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEvents, { ...EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS }, { ...SDK_MEDIA_ENDPOINT_DEFINITIONS }, { ...SDK_ENDPOINT_DEFINITIONS }, { ...SDK_ENTRY_READ_ENDPOINTS };
|
|
3437
|
+
}, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteById, TAG_TEMPLATES.siteBySlug, TAG_TEMPLATES.siteByDomain, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteById, TAG_TEMPLATES.siteBySlug, TAG_TEMPLATES.siteByDomain, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.workflowRunById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.routeById, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.navigationItemById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.navigationItemById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicBookingServices, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRedirects, TAG_TEMPLATES.siteRouteOutcomes, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRedirects, TAG_TEMPLATES.siteRouteOutcomes, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.siteForms, { ...PUBLIC_BOOKING_AVAILABILITY_ENDPOINT_DEFINITIONS }, TAG_TEMPLATES.publicEventFilters, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicShop, TAG_TEMPLATES.publicCheckout, TAG_TEMPLATES.siteRoutableContent, { ...PUBLIC_EVENT_CHECKOUT_ENDPOINT_DEFINITIONS }, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEvents, { ...EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS }, { ...SDK_MEDIA_ENDPOINT_DEFINITIONS }, { ...SDK_ENDPOINT_DEFINITIONS }, { ...SDK_ENTRY_READ_ENDPOINTS };
|
|
3294
3438
|
z.object({ refreshToken: z.string().min(1).max(4096) }).strict();
|
|
3295
3439
|
z.object({
|
|
3296
3440
|
accessToken: z.string().min(1).max(4096),
|
|
@@ -6456,59 +6600,6 @@ function interpolateHex(startHex, endHex, position) {
|
|
|
6456
6600
|
const channel = (from, to) => Math.round(from + (to - from) * position).toString(16).padStart(2, "0");
|
|
6457
6601
|
return `#${channel(start.r, end.r)}${channel(start.g, end.g)}${channel(start.b, end.b)}`;
|
|
6458
6602
|
}
|
|
6459
|
-
shadeBackgroundEffect({
|
|
6460
|
-
id: "darken-background",
|
|
6461
|
-
name: "Darken on Hover",
|
|
6462
|
-
description: "Darkens the background color on hover",
|
|
6463
|
-
label: "Darken Amount (shade step)",
|
|
6464
|
-
shadeDirection: 1
|
|
6465
|
-
});
|
|
6466
|
-
shadeBackgroundEffect({
|
|
6467
|
-
id: "lighten-background",
|
|
6468
|
-
name: "Lighten on Hover",
|
|
6469
|
-
description: "Lightens the background color on hover",
|
|
6470
|
-
label: "Lighten Amount (shade step)",
|
|
6471
|
-
shadeDirection: -1
|
|
6472
|
-
});
|
|
6473
|
-
function shadeBackgroundEffect(config) {
|
|
6474
|
-
return {
|
|
6475
|
-
id: config.id,
|
|
6476
|
-
name: config.name,
|
|
6477
|
-
description: config.description,
|
|
6478
|
-
category: "background",
|
|
6479
|
-
pseudoElement: "none",
|
|
6480
|
-
applicableTo: ["button"],
|
|
6481
|
-
customizableOption: {
|
|
6482
|
-
name: "amount",
|
|
6483
|
-
type: "select",
|
|
6484
|
-
label: config.label,
|
|
6485
|
-
default: 100,
|
|
6486
|
-
options: [
|
|
6487
|
-
0,
|
|
6488
|
-
100,
|
|
6489
|
-
200,
|
|
6490
|
-
300,
|
|
6491
|
-
400,
|
|
6492
|
-
500,
|
|
6493
|
-
600,
|
|
6494
|
-
700,
|
|
6495
|
-
800,
|
|
6496
|
-
900
|
|
6497
|
-
]
|
|
6498
|
-
},
|
|
6499
|
-
isApplicable: (buttonConfig) => buttonConfig.background.type === "solid",
|
|
6500
|
-
generateCSS: ({ themeId, variantId, options, tokens, buttonConfig }) => {
|
|
6501
|
-
if (buttonConfig.background.type !== "solid") return "";
|
|
6502
|
-
const amount = (options.amount || 100) * config.shadeDirection;
|
|
6503
|
-
const baseToken = buttonConfig.background.colorToken ?? "primary-500";
|
|
6504
|
-
return `
|
|
6505
|
-
:where([data-theme-scope="${themeId}"]) .${variantId}:hover {
|
|
6506
|
-
background-color: ${tokens.getColor(tokens.adjustShade(baseToken, amount))};
|
|
6507
|
-
}
|
|
6508
|
-
`;
|
|
6509
|
-
}
|
|
6510
|
-
};
|
|
6511
|
-
}
|
|
6512
6603
|
//#endregion
|
|
6513
6604
|
//#region ../theme-core/src/palette/utils/opaqueSurfaceColor.ts
|
|
6514
6605
|
/** Resolve an opaque colour, compositing alpha against an explicit underlay. */
|
|
@@ -6793,6 +6884,59 @@ function mergeStyles(...styles) {
|
|
|
6793
6884
|
}
|
|
6794
6885
|
return Object.keys(merged).length ? merged : void 0;
|
|
6795
6886
|
}
|
|
6887
|
+
shadeBackgroundEffect({
|
|
6888
|
+
id: "darken-background",
|
|
6889
|
+
name: "Darken on Hover",
|
|
6890
|
+
description: "Darkens the background color on hover",
|
|
6891
|
+
label: "Darken Amount (shade step)",
|
|
6892
|
+
shadeDirection: 1
|
|
6893
|
+
});
|
|
6894
|
+
shadeBackgroundEffect({
|
|
6895
|
+
id: "lighten-background",
|
|
6896
|
+
name: "Lighten on Hover",
|
|
6897
|
+
description: "Lightens the background color on hover",
|
|
6898
|
+
label: "Lighten Amount (shade step)",
|
|
6899
|
+
shadeDirection: -1
|
|
6900
|
+
});
|
|
6901
|
+
function shadeBackgroundEffect(config) {
|
|
6902
|
+
return {
|
|
6903
|
+
id: config.id,
|
|
6904
|
+
name: config.name,
|
|
6905
|
+
description: config.description,
|
|
6906
|
+
category: "background",
|
|
6907
|
+
pseudoElement: "none",
|
|
6908
|
+
applicableTo: ["button"],
|
|
6909
|
+
customizableOption: {
|
|
6910
|
+
name: "amount",
|
|
6911
|
+
type: "select",
|
|
6912
|
+
label: config.label,
|
|
6913
|
+
default: 100,
|
|
6914
|
+
options: [
|
|
6915
|
+
0,
|
|
6916
|
+
100,
|
|
6917
|
+
200,
|
|
6918
|
+
300,
|
|
6919
|
+
400,
|
|
6920
|
+
500,
|
|
6921
|
+
600,
|
|
6922
|
+
700,
|
|
6923
|
+
800,
|
|
6924
|
+
900
|
|
6925
|
+
]
|
|
6926
|
+
},
|
|
6927
|
+
isApplicable: (buttonConfig) => buttonConfig.background.type === "solid",
|
|
6928
|
+
generateCSS: ({ themeId, variantId, options, tokens, buttonConfig }) => {
|
|
6929
|
+
if (buttonConfig.background.type !== "solid") return "";
|
|
6930
|
+
const amount = (options.amount || 100) * config.shadeDirection;
|
|
6931
|
+
const baseToken = buttonConfig.background.colorToken ?? "primary-500";
|
|
6932
|
+
return `
|
|
6933
|
+
:where([data-theme-scope="${themeId}"]) .${variantId}:hover {
|
|
6934
|
+
background-color: ${tokens.getColor(tokens.adjustShade(baseToken, amount))};
|
|
6935
|
+
}
|
|
6936
|
+
`;
|
|
6937
|
+
}
|
|
6938
|
+
};
|
|
6939
|
+
}
|
|
6796
6940
|
//#endregion
|
|
6797
6941
|
//#region ../theme-core/src/utils/tokenOrColor.ts
|
|
6798
6942
|
/**
|
|
@@ -10215,8 +10359,14 @@ const headerInteractionPillPaletteValues = [
|
|
|
10215
10359
|
"accent"
|
|
10216
10360
|
];
|
|
10217
10361
|
/**
|
|
10218
|
-
* "No pill":
|
|
10219
|
-
*
|
|
10362
|
+
* "No pill": a colour change on hover rather than a filled background.
|
|
10363
|
+
*
|
|
10364
|
+
* The palette step writes nothing (#1318 Phase 4c decision 2), but on a
|
|
10365
|
+
* foreground-adaptive style that is not the end of the story: the hover colour
|
|
10366
|
+
* is derived from the resolved opening foreground at render time, paired with
|
|
10367
|
+
* the resting colour, so `quiet` resolves to a definite colour rather than to
|
|
10368
|
+
* whatever brand token the recipe happened to name. See
|
|
10369
|
+
* `applyOpeningForeground`.
|
|
10220
10370
|
*
|
|
10221
10371
|
* It exists because "a colour change on hover, no filled background" was not
|
|
10222
10372
|
* expressible in the vocabulary, and it is what
|
|
@@ -27516,6 +27666,28 @@ const bookingRequirementConsentFieldSchema = z.object({
|
|
|
27516
27666
|
z.union([blockBookingConsentSchema, bookingRequirementConsentFieldSchema]);
|
|
27517
27667
|
//#endregion
|
|
27518
27668
|
//#region ../blocks/src/system/blocks/events/shared/schemas.ts
|
|
27669
|
+
const publicEventLoaderQuerySchemaShape = {
|
|
27670
|
+
limit: z.string().optional(),
|
|
27671
|
+
from: z.string().optional(),
|
|
27672
|
+
to: z.string().optional(),
|
|
27673
|
+
afterStartsAt: z.string().optional(),
|
|
27674
|
+
afterId: z.string().optional(),
|
|
27675
|
+
categoryIds: z.string().optional(),
|
|
27676
|
+
venueId: z.string().optional(),
|
|
27677
|
+
staffMemberId: z.string().optional(),
|
|
27678
|
+
eventSurface: z.string().optional(),
|
|
27679
|
+
eventPresets: z.string().optional(),
|
|
27680
|
+
scheduleScope: z.string().optional(),
|
|
27681
|
+
seriesId: z.string().optional(),
|
|
27682
|
+
seriesIds: z.string().optional(),
|
|
27683
|
+
runSeriesId: z.string().optional(),
|
|
27684
|
+
seriesSlug: z.string().optional(),
|
|
27685
|
+
includeOccurrenceId: z.string().optional(),
|
|
27686
|
+
readIntent: z.string().optional(),
|
|
27687
|
+
detailLevel: z.string().optional(),
|
|
27688
|
+
readProfile: z.string().optional()
|
|
27689
|
+
};
|
|
27690
|
+
z.object(publicEventLoaderQuerySchemaShape);
|
|
27519
27691
|
const eventPresetSchema = z.enum([
|
|
27520
27692
|
"event",
|
|
27521
27693
|
"class",
|
|
@@ -28318,6 +28490,44 @@ function toWholeSeriesRegistrationEvents(events) {
|
|
|
28318
28490
|
return groupPublicEventsByRun(events).map(toWholeSeriesRegistrationEvent).filter((event) => event !== null);
|
|
28319
28491
|
}
|
|
28320
28492
|
//#endregion
|
|
28493
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/eventSourceRecovery.ts
|
|
28494
|
+
const { limit: _rawLimit, eventSurface: _rawEventSurface, scheduleScope: _rawScheduleScope, detailLevel: _rawDetailLevel, ...stringEventQueryShape } = publicEventLoaderQuerySchemaShape;
|
|
28495
|
+
const eventRecoveryRequestSchema = z.object({
|
|
28496
|
+
...stringEventQueryShape,
|
|
28497
|
+
limit: z.coerce.number().int().positive().optional(),
|
|
28498
|
+
eventSurface: z.enum(eventSurfaceScopeValues).optional(),
|
|
28499
|
+
scheduleScope: z.enum(eventScheduleScopeValues).optional(),
|
|
28500
|
+
detailLevel: z.enum(["full", "listing"]).optional(),
|
|
28501
|
+
stage: z.enum(["preview", "published"]).optional()
|
|
28502
|
+
});
|
|
28503
|
+
function resolveEventRegistrationEventSource(input) {
|
|
28504
|
+
if (input.wholeSeriesRunEvents != null) return {
|
|
28505
|
+
kind: "loaded",
|
|
28506
|
+
events: input.wholeSeriesRunEvents
|
|
28507
|
+
};
|
|
28508
|
+
if (input.events != null) return {
|
|
28509
|
+
kind: "loaded",
|
|
28510
|
+
events: input.events
|
|
28511
|
+
};
|
|
28512
|
+
return {
|
|
28513
|
+
kind: "unresolved",
|
|
28514
|
+
request: parseEventLoaderRecoveryRequest(input.failures?.wholeSeriesRunEvents ?? input.failures?.events)
|
|
28515
|
+
};
|
|
28516
|
+
}
|
|
28517
|
+
const eventLoaderFailureSchema = z.object({
|
|
28518
|
+
endpoint: z.literal("listPublicEvents"),
|
|
28519
|
+
params: eventRecoveryRequestSchema.extend({ siteId: z.string().optional() })
|
|
28520
|
+
});
|
|
28521
|
+
function parseEventLoaderRecoveryRequest(value) {
|
|
28522
|
+
const parsed = eventLoaderFailureSchema.safeParse(value);
|
|
28523
|
+
if (!parsed.success) return null;
|
|
28524
|
+
const { siteId: _siteId, stage, ...params } = parsed.data.params;
|
|
28525
|
+
return {
|
|
28526
|
+
...params,
|
|
28527
|
+
stage: stage ?? "published"
|
|
28528
|
+
};
|
|
28529
|
+
}
|
|
28530
|
+
//#endregion
|
|
28321
28531
|
//#region ../blocks/src/system/runtime/nodes/event-registration.interactive.ts
|
|
28322
28532
|
const EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS = [
|
|
28323
28533
|
"Date",
|
|
@@ -28335,8 +28545,6 @@ const eventRegistrationPublicEventSchema = z.preprocess(normalizeEventRegistrati
|
|
|
28335
28545
|
const eventRegistrationHydrationSchemaShape = {
|
|
28336
28546
|
occurrenceContext: occurrenceContextSchema.optional(),
|
|
28337
28547
|
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
28338
|
-
events: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
28339
|
-
wholeSeriesRunEvents: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
28340
28548
|
maxTickets: z.string().optional(),
|
|
28341
28549
|
showVenue: z.boolean().optional(),
|
|
28342
28550
|
showCapacity: z.boolean().optional(),
|
|
@@ -28348,12 +28556,22 @@ const eventRegistrationHydrationSchemaShape = {
|
|
|
28348
28556
|
sitePasses: publicPassProductCollectionSchema.nullable().optional(),
|
|
28349
28557
|
siteMemberships: publicMembershipProductCollectionSchema.nullable().optional()
|
|
28350
28558
|
};
|
|
28559
|
+
const eventRegistrationEventSourceSchema = z.discriminatedUnion("kind", [z.object({
|
|
28560
|
+
kind: z.literal("loaded"),
|
|
28561
|
+
events: z.array(eventRegistrationPublicEventSchema)
|
|
28562
|
+
}), z.object({
|
|
28563
|
+
kind: z.literal("unresolved"),
|
|
28564
|
+
request: eventRecoveryRequestSchema.nullable()
|
|
28565
|
+
})]);
|
|
28351
28566
|
const eventRegistrationSourceSchema = z.object({
|
|
28352
28567
|
siteId: z.string().optional(),
|
|
28353
28568
|
apiBaseUrl: z.string().optional(),
|
|
28354
28569
|
portalToken: z.string().nullable().optional(),
|
|
28355
28570
|
previewToken: z.string().nullable().optional(),
|
|
28356
28571
|
...eventRegistrationHydrationSchemaShape,
|
|
28572
|
+
events: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
28573
|
+
wholeSeriesRunEvents: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
28574
|
+
eventLoaderFailures: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
28357
28575
|
className: z.string().nullable().optional(),
|
|
28358
28576
|
buttonText: z.string().nullable().optional(),
|
|
28359
28577
|
maxTickets: z.string().nullable().optional(),
|
|
@@ -28374,7 +28592,10 @@ const eventRegistrationDisplaySchema = z.discriminatedUnion("state", [z.object({
|
|
|
28374
28592
|
titleText: z.string(),
|
|
28375
28593
|
bodyText: z.string()
|
|
28376
28594
|
})]);
|
|
28377
|
-
const eventRegistrationHydrationSchema = z.object(
|
|
28595
|
+
const eventRegistrationHydrationSchema = z.object({
|
|
28596
|
+
...eventRegistrationHydrationSchemaShape,
|
|
28597
|
+
eventSource: eventRegistrationEventSourceSchema
|
|
28598
|
+
});
|
|
28378
28599
|
const eventRegistrationRenderSchema = z.object({
|
|
28379
28600
|
display: eventRegistrationDisplaySchema,
|
|
28380
28601
|
hydration: eventRegistrationHydrationSchema
|
|
@@ -28433,16 +28654,12 @@ function buildEventRegistrationShellStepLabels(source, scopedSourceEvents) {
|
|
|
28433
28654
|
function toScopedEventRegistrationEvents(scopedSourceEvents) {
|
|
28434
28655
|
return [...toRegistrationEvents(scopedSourceEvents), ...toWholeSeriesRegistrationEvents(scopedSourceEvents)];
|
|
28435
28656
|
}
|
|
28436
|
-
function scopeEventRegistrationSourceEvents(source) {
|
|
28437
|
-
return resolveEventRegistrationScopedEvents(
|
|
28657
|
+
function scopeEventRegistrationSourceEvents(source, eventSource) {
|
|
28658
|
+
return resolveEventRegistrationScopedEvents(eventSource.kind === "loaded" ? eventSource.events : [], {
|
|
28438
28659
|
occurrenceContext: source.occurrenceContext,
|
|
28439
28660
|
subject: source.subject
|
|
28440
28661
|
});
|
|
28441
28662
|
}
|
|
28442
|
-
function resolveLoadedEventRegistrationSourceEvents(source, scopedSourceEvents) {
|
|
28443
|
-
if (source.events == null && source.wholeSeriesRunEvents == null) return null;
|
|
28444
|
-
return [...scopedSourceEvents];
|
|
28445
|
-
}
|
|
28446
28663
|
/**
|
|
28447
28664
|
* The one run this surface is registering for, when the scoped events describe
|
|
28448
28665
|
* exactly one. More than one run means the visitor still has to choose.
|
|
@@ -28482,14 +28699,21 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
28482
28699
|
render: createZodCodec(eventRegistrationRenderSchema)
|
|
28483
28700
|
},
|
|
28484
28701
|
buildRender: (source) => {
|
|
28485
|
-
const
|
|
28486
|
-
|
|
28702
|
+
const eventSource = resolveEventRegistrationEventSource({
|
|
28703
|
+
events: source.events,
|
|
28704
|
+
wholeSeriesRunEvents: source.wholeSeriesRunEvents,
|
|
28705
|
+
failures: source.eventLoaderFailures
|
|
28706
|
+
});
|
|
28707
|
+
const scopedSourceEvents = scopeEventRegistrationSourceEvents(source, eventSource);
|
|
28487
28708
|
return {
|
|
28488
28709
|
display: buildEventRegistrationDisplayFromScopedEvents(source, scopedSourceEvents),
|
|
28489
28710
|
hydration: {
|
|
28490
28711
|
occurrenceContext: source.occurrenceContext ?? null,
|
|
28491
28712
|
subject: source.subject ?? null,
|
|
28492
|
-
|
|
28713
|
+
eventSource: eventSource.kind === "loaded" ? {
|
|
28714
|
+
...eventSource,
|
|
28715
|
+
events: [...scopedSourceEvents]
|
|
28716
|
+
} : eventSource,
|
|
28493
28717
|
maxTickets: source.maxTickets ?? void 0,
|
|
28494
28718
|
showVenue: source.showVenue,
|
|
28495
28719
|
showCapacity: source.showCapacity,
|
|
@@ -28665,6 +28889,7 @@ const eventRegistrationBlockDefinition = {
|
|
|
28665
28889
|
} },
|
|
28666
28890
|
events: { $bind: { from: "data.events" } },
|
|
28667
28891
|
wholeSeriesRunEvents: { $bind: { from: "data.wholeSeriesRunEvents" } },
|
|
28892
|
+
loaderFailures: { $bind: { from: "$root.loaderFailures" } },
|
|
28668
28893
|
sitePasses: { $bind: { from: "data.sitePasses" } },
|
|
28669
28894
|
siteMemberships: { $bind: { from: "data.siteMemberships" } },
|
|
28670
28895
|
stage: { $bind: {
|
|
@@ -35087,6 +35312,15 @@ const newsletterFieldSchema = z.object({
|
|
|
35087
35312
|
placeholder: z.string().optional()
|
|
35088
35313
|
});
|
|
35089
35314
|
const mailingListSignupBlockIdSchema = z.string().trim().min(1).transform(parseRequiredMailingListSignupBlockId);
|
|
35315
|
+
const mailingListContentVersionIdSchema = z.string().transform((value, ctx) => {
|
|
35316
|
+
const parsed = parseMailingListContentVersionId(value);
|
|
35317
|
+
if (parsed) return parsed;
|
|
35318
|
+
ctx.addIssue({
|
|
35319
|
+
code: z.ZodIssueCode.custom,
|
|
35320
|
+
message: "Invalid mailing-list content version ID"
|
|
35321
|
+
});
|
|
35322
|
+
return z.NEVER;
|
|
35323
|
+
});
|
|
35090
35324
|
const signedMailingListSourceTokenSchema = z.string().trim().min(1).transform(parseRequiredMailingListSignedSourceToken);
|
|
35091
35325
|
const newsletterSourceCommonSchema = z.object({
|
|
35092
35326
|
siteId: z.string().optional(),
|
|
@@ -35100,7 +35334,8 @@ const newsletterSourceCommonSchema = z.object({
|
|
|
35100
35334
|
const newsletterSourceSchema = z.discriminatedUnion("source", [
|
|
35101
35335
|
newsletterSourceCommonSchema.extend({
|
|
35102
35336
|
source: z.literal("block"),
|
|
35103
|
-
blockId: z.string().nullable().optional()
|
|
35337
|
+
blockId: z.string().nullable().optional(),
|
|
35338
|
+
contentVersionId: z.string().nullable().optional()
|
|
35104
35339
|
}),
|
|
35105
35340
|
newsletterSourceCommonSchema.extend({
|
|
35106
35341
|
source: z.literal("signed-footer"),
|
|
@@ -35116,6 +35351,7 @@ const newsletterDisplaySchema = z.object({
|
|
|
35116
35351
|
availability: z.enum(["ready", "unavailable"]),
|
|
35117
35352
|
className: z.string().nullable(),
|
|
35118
35353
|
buttonLabel: z.string(),
|
|
35354
|
+
successMessage: z.string(),
|
|
35119
35355
|
buttonVariant: newsletterButtonVariantSchema,
|
|
35120
35356
|
privacyNote: z.string().nullable(),
|
|
35121
35357
|
fields: z.array(newsletterFieldSchema),
|
|
@@ -35130,7 +35366,8 @@ const newsletterHydrationSchema = z.object({
|
|
|
35130
35366
|
tag: z.literal("block-source"),
|
|
35131
35367
|
sourceRef: z.object({
|
|
35132
35368
|
tag: z.literal("block_ref"),
|
|
35133
|
-
blockId: mailingListSignupBlockIdSchema
|
|
35369
|
+
blockId: mailingListSignupBlockIdSchema,
|
|
35370
|
+
contentVersionId: mailingListContentVersionIdSchema
|
|
35134
35371
|
}).nullable()
|
|
35135
35372
|
}),
|
|
35136
35373
|
z.object({
|
|
@@ -35169,6 +35406,7 @@ function buildNewsletterDisplay(source) {
|
|
|
35169
35406
|
fields: { preset: "emailOnly" },
|
|
35170
35407
|
includeOptionalPhone: false,
|
|
35171
35408
|
buttonLabel: "Subscribe",
|
|
35409
|
+
successMessage: DEFAULT_MAILING_LIST_SUCCESS_MESSAGE,
|
|
35172
35410
|
privacyNote: null
|
|
35173
35411
|
};
|
|
35174
35412
|
const targeting = source.targeting ?? { mode: "default" };
|
|
@@ -35178,6 +35416,7 @@ function buildNewsletterDisplay(source) {
|
|
|
35178
35416
|
availability: runtimeTargetingIsAvailable(context, targeting, choices) ? "ready" : "unavailable",
|
|
35179
35417
|
className: source.className ?? null,
|
|
35180
35418
|
buttonLabel: form.buttonLabel,
|
|
35419
|
+
successMessage: form.successMessage,
|
|
35181
35420
|
buttonVariant: source.buttonVariant ?? "primary",
|
|
35182
35421
|
privacyNote: form.privacyNote,
|
|
35183
35422
|
fields: getGlobalFormFields(form),
|
|
@@ -35208,7 +35447,7 @@ const newsletterFormBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
35208
35447
|
function projectNewsletterFormHydrationTarget(source) {
|
|
35209
35448
|
switch (source.source) {
|
|
35210
35449
|
case "block": {
|
|
35211
|
-
const sourceRef = buildMailingListSignupBlockSourceRef(source.blockId);
|
|
35450
|
+
const sourceRef = buildMailingListSignupBlockSourceRef(source.blockId, source.contentVersionId);
|
|
35212
35451
|
if (sourceRef?.tag === "block_ref") return {
|
|
35213
35452
|
tag: "block-source",
|
|
35214
35453
|
sourceRef
|
|
@@ -37699,7 +37938,17 @@ const riverbankSiteConfigInputSchema = z.object({
|
|
|
37699
37938
|
z.object({
|
|
37700
37939
|
config: riverbankSiteConfigInputSchema,
|
|
37701
37940
|
forceContentTypes: z.boolean().optional(),
|
|
37702
|
-
mode: z.enum(["apply", "preview"]).optional()
|
|
37941
|
+
mode: z.enum(["apply", "preview"]).optional(),
|
|
37942
|
+
expectedMailingListProviderScope: z.unknown().transform((value, ctx) => {
|
|
37943
|
+
if (value === void 0) return void 0;
|
|
37944
|
+
const parsed = parseMailingListProviderScope(value);
|
|
37945
|
+
if (parsed.ok) return parsed.value;
|
|
37946
|
+
ctx.addIssue({
|
|
37947
|
+
code: "custom",
|
|
37948
|
+
message: "Invalid mailing-list provider scope"
|
|
37949
|
+
});
|
|
37950
|
+
return z.NEVER;
|
|
37951
|
+
}).optional()
|
|
37703
37952
|
}).strict();
|
|
37704
37953
|
//#endregion
|
|
37705
37954
|
//#region ../api/src/sdkThemeWire.ts
|