@riverbankcms/sdk 0.138.0 → 0.139.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 +11 -15
- package/dist/{PreviewEditorSidebar-BVPur_CU.mjs → PreviewEditorSidebar-BDeenhi3.mjs} +4 -4
- package/dist/{PreviewEditorUI-DLhWX8oh.mjs → PreviewEditorUI-DSRhgjF5.mjs} +3 -3
- package/dist/{PreviewQueryProvider-BguJY1SW.mjs → PreviewQueryProvider-D2K8GLUG.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-Tda6qw4z.mjs → SdkPreviewModeRuntime-CL7wSnYu.mjs} +47 -27
- package/dist/{SiteChromeCustomizeContext-BHFgMjde.mjs → SiteChromeCustomizeContext-BhDn-5ir.mjs} +7771 -5863
- package/dist/_dts/ai/src/contracts/proposals.d.ts +99 -330
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +9 -30
- package/dist/_dts/api/src/billing.d.ts +10 -3
- package/dist/_dts/api/src/contentRuntime.d.ts +8 -1
- package/dist/_dts/api/src/endpoints.d.ts +182 -103
- package/dist/_dts/api/src/footerSettings.d.ts +2 -5
- package/dist/_dts/api/src/index.d.ts +11 -9
- package/dist/_dts/api/src/mailchimpIntegration.d.ts +2 -59
- package/dist/_dts/api/src/mailingListIntegration.d.ts +117 -0
- package/dist/_dts/api/src/navigation/locations.d.ts +1 -0
- package/dist/_dts/api/src/navigation.d.ts +1 -26
- package/dist/_dts/api/src/newsletterEndpointDefinitions.d.ts +109 -2
- package/dist/_dts/api/src/onboarding/surfaceData.d.ts +185 -0
- package/dist/_dts/api/src/privacyPolicy.d.ts +74 -2
- package/dist/_dts/api/src/publicBookingAvailabilityEndpointDefinitions.d.ts +6 -6
- package/dist/_dts/api/src/publicEventEndpointDefinitions.d.ts +1 -1
- package/dist/_dts/api/src/publicExperience/newsletterEndpoints.d.ts +2 -4
- package/dist/_dts/api/src/publicExperience/sharedTypes.d.ts +10 -24
- package/dist/_dts/api/src/publicReadEndpointDefinitions.d.ts +73 -0
- package/dist/_dts/api/src/schemas/site-api-keys.d.ts +1 -1
- package/dist/_dts/api/src/sdkContracts.d.ts +2 -10
- package/dist/_dts/api/src/sdkThemeWire.d.ts +2 -2
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +0 -29
- package/dist/_dts/api/src/siteOnboarding.d.ts +91 -228
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +1 -9
- package/dist/_dts/api/src/siteSettings.d.ts +20 -1
- package/dist/_dts/api/src/types.d.ts +5 -4
- package/dist/_dts/billing/src/membership/index.d.ts +14 -7
- package/dist/_dts/billing/src/plans/display.d.ts +15 -0
- package/dist/_dts/billing/src/plans/registry.d.ts +2 -0
- package/dist/_dts/billing/src/plans/standing.d.ts +19 -0
- package/dist/_dts/billing/src/plans/types.d.ts +1 -7
- package/dist/_dts/billing/src/subscriptions/evidence.d.ts +12 -0
- package/dist/_dts/billing/src/subscriptions/standingEvidence.d.ts +31 -0
- package/dist/_dts/billing/src/subscriptions/store.d.ts +23 -5
- package/dist/_dts/blocks/src/PageRenderer.d.ts +6 -15
- package/dist/_dts/blocks/src/client.d.ts +1 -1
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +32 -16
- package/dist/_dts/blocks/src/pageRendererContracts.d.ts +4 -0
- package/dist/_dts/blocks/src/pageRenderingMode.d.ts +12 -6
- package/dist/_dts/blocks/src/system/blocks/appointment-services.d.ts +11 -0
- package/dist/_dts/blocks/src/system/blocks/contact-newsletter.d.ts +39 -66
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +39 -114
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/catalogue.d.ts +18 -0
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/fields.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/index.d.ts +4 -0
- package/dist/_dts/blocks/src/system/blocks/site-footer-runtime.d.ts +7 -13
- package/dist/_dts/blocks/src/system/constants/blockKinds.d.ts +1 -1
- package/dist/_dts/blocks/src/system/data/index.d.ts +2 -2
- package/dist/_dts/blocks/src/system/data/loaderEndpoints.d.ts +1 -1
- package/dist/_dts/blocks/src/system/data/publicLoaderCachePolicy.d.ts +2 -74
- package/dist/_dts/blocks/src/system/fragments/library/newsletterForm.d.ts +33 -100
- package/dist/_dts/blocks/src/system/runtime/api/types/newsletter.d.ts +5 -15
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +48 -24
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +24 -12
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarToday.d.ts +22 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/appointment-services.d.ts +51 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +0 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +28 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/bookability.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/dates.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/duration.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/index.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/location.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/quickDates.d.ts +16 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/AgendaEventCard.d.ts +9 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/CalendarDayCell.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/CalendarDayHeaders.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/DayEventsModal.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventCard.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventModals.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventQuickDates.d.ts +15 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekAgendaView.d.ts +7 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekTimetableView.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/index.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/timetableModel.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/useHydrationReady.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.client.state.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.interactive.d.ts +56 -33
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.submission.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +13 -31
- package/dist/_dts/blocks/src/system/runtime/nodes/offerings-preview-catalogue.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/offerings-preview-content.d.ts +23 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/offerings-preview.d.ts +4 -2
- package/dist/_dts/blocks/src/system/transforms/registry/formatting.d.ts +5 -0
- package/dist/_dts/commerce/src/purchase/index.d.ts +1 -0
- package/dist/_dts/commerce/src/purchase/orderItemMetadata.d.ts +5 -12
- package/dist/_dts/commerce/src/purchase/stripeCommissionMetadata.d.ts +34 -0
- package/dist/_dts/content-editor/src/footerEngagementDraft.d.ts +6 -24
- package/dist/_dts/content-editor/src/useFooterComposerState.d.ts +1 -2
- package/dist/_dts/core/src/footer-engagement.d.ts +2 -6
- package/dist/_dts/core/src/index.d.ts +9 -1
- package/dist/_dts/core/src/mailing-list-identifiers.d.ts +21 -0
- package/dist/_dts/core/src/mailing-list-runtime.d.ts +42 -0
- package/dist/_dts/core/src/mailing-list-setup-parser.d.ts +14 -0
- package/dist/_dts/core/src/mailing-list-setup.d.ts +129 -0
- package/dist/_dts/core/src/mailing-list-submission.d.ts +244 -0
- package/dist/_dts/core/src/mailing-list-targeting-parser.d.ts +12 -0
- package/dist/_dts/core/src/mailing-list-targeting.d.ts +93 -0
- package/dist/_dts/core/src/navigation-locations.d.ts +28 -0
- package/dist/_dts/core/src/public-profile.d.ts +9 -1
- package/dist/_dts/core/src/public-read-cache-contract.d.ts +45 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +529 -373
- package/dist/_dts/editor-blocks/src/widgets/index.d.ts +1 -0
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/MailingListTargetingField.d.ts +11 -0
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/context.d.ts +13 -0
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/index.d.ts +3 -0
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/loaders.d.ts +6 -0
- package/dist/_dts/preview-next/src/client/widgets/widgetOverrides.d.ts +1 -0
- package/dist/_dts/sdk/src/client/publicAppointmentReadOperations.d.ts +12 -0
- package/dist/_dts/sdk/src/client/publicEventReadOperations.d.ts +2 -1
- package/dist/_dts/sdk/src/client/publicLoaderCacheAccess.d.ts +11 -4
- package/dist/_dts/sdk/src/config/content-types.d.ts +3 -13
- package/dist/_dts/sdk/src/config/content-validation.d.ts +5 -8
- package/dist/_dts/sdk/src/constants.d.ts +3 -3
- package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +12 -31
- package/dist/_dts/sdk/src/navigation/index.d.ts +11 -29
- package/dist/_dts/sdk/src/next/index.d.ts +4 -4
- package/dist/_dts/sdk/src/prebuild/types.d.ts +1 -5
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +33 -16
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +3 -0
- package/dist/_dts/sdk/src/rendering/client.d.ts +3 -20
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +3 -0
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +4 -0
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/index.d.ts +1 -1
- package/dist/_dts/sdk/src/types/block-kinds.d.ts +1 -1
- 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/hosted-booking-appearance.d.ts +41 -0
- package/dist/_dts/theme-core/src/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/runtime/buildThemeRuntime.d.ts +0 -1
- package/dist/_dts/theme-core/src/tokens/tokens.d.ts +7 -0
- package/dist/_dts/ui/src/badge.d.ts +1 -1
- package/dist/_dts/ui/src/callout.d.ts +1 -1
- package/dist/client/{BookingConsentAgreement-DQUik1Mx.mjs → BookingConsentAgreement-CZvTDtsK.mjs} +2 -2
- package/dist/client/{DiscountCodeDisclosure-CU67Q4vH.mjs → DiscountCodeDisclosure-D-DsLCMU.mjs} +1 -1
- package/dist/client/{EventCombined.client-a02TXUgg.mjs → EventCombined.client-dWqgd5ZO.mjs} +443 -199
- package/dist/client/{EventListing.client-99qx7jFl.mjs → EventListing.client-BMRa9IYp.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-CWzcq73L.mjs → LeafletStaticMap-D21W9kBZ.mjs} +1 -1
- package/dist/client/{accordion-D1nb3-Oj.mjs → accordion-FxF_ta47.mjs} +1 -1
- package/dist/client/{bookingForm-BGrmLhaO.mjs → bookingForm-YnwW4TGw.mjs} +5 -5
- package/dist/client/bookings.mjs +43 -2
- package/dist/client/{carousel-DSmOx3ad.mjs → carousel-vng7fFT5.mjs} +1 -1
- package/dist/client/{cart-COWeOIUk.mjs → cart-DEPDsjNk.mjs} +3 -3
- package/dist/client/{checkout-CeysaIJK.mjs → checkout-CZRWu9rW.mjs} +3 -3
- package/dist/client/client.mjs +3331 -1407
- package/dist/client/{context-DBzX85Xc.mjs → context-DvU_WUmd.mjs} +4 -3
- package/dist/client/{dates-DCYhZBlW.mjs → dates-wnPMiRl5.mjs} +21 -3
- package/dist/client/{eventCalendar-BgsN73Ul.mjs → eventCalendar-BA3Q5L15.mjs} +80 -78
- package/dist/client/{eventCombined-DcZQAMQP.mjs → eventCombined-51wgR-1R.mjs} +3 -3
- package/dist/client/{eventDetails-BWwGJ54l.mjs → eventDetails-modaetpm.mjs} +4 -4
- package/dist/client/{eventListing-DqYqV8vp.mjs → eventListing-D8t2J3Kv.mjs} +3 -3
- package/dist/client/{eventRegistration-DQGDgu_e.mjs → eventRegistration-CYqtkCE_.mjs} +49 -9
- package/dist/client/{form-ClfpasVT.mjs → form-CBKXN5In.mjs} +2 -2
- package/dist/client/{headerSection-BuOMe98N.mjs → headerSection-DylDqNrs.mjs} +2 -2
- package/dist/client/hooks.mjs +1259 -555
- package/dist/client/{locationMap-CEqu_sfa.mjs → locationMap-CvWrG0vZ.mjs} +2 -2
- package/dist/client/{newsletterForm-IbrHjMxy.mjs → newsletterForm-Btwk70zw.mjs} +117 -38
- package/dist/client/{pricing-xj7MPZlK.mjs → pricing-Uzw-GQ6Y.mjs} +1 -1
- package/dist/client/{productDetail-vxqTt5Xj.mjs → productDetail-JLcUYKnd.mjs} +3 -3
- package/dist/client/{productList-OTdZu8sb.mjs → productList-FM0cbUzj.mjs} +3 -3
- package/dist/client/{propsDecoder-CY9gGEF7.mjs → propsDecoder-DYzafZb2.mjs} +592 -152
- package/dist/client/rendering/client.mjs +2259 -835
- package/dist/client/rendering/islands.mjs +17 -17
- package/dist/client/rendering.mjs +3308 -1236
- package/dist/client/{scrollToBlock--BFV6kl-.mjs → scrollToBlock-CvXszexS.mjs} +1 -1
- package/dist/client/{shop-CP4YbDL9.mjs → shop-BIcjvy5a.mjs} +6 -6
- package/dist/client/{shop-commerce-APs4XBXE.mjs → shop-commerce-BZQsy7xw.mjs} +5 -5
- package/dist/client/{shop-commerce-store-CAVLxLFr.mjs → shop-commerce-store-D5V7XAb5.mjs} +1 -1
- package/dist/client/{shopShared-BnSRrwXI.mjs → shopShared-DowkXevB.mjs} +3 -3
- package/dist/client/{useEventFilters-1a1by4c8.mjs → useEventFilters-oMoTw_JE.mjs} +56 -9
- package/dist/preview-next/before-render.mjs +238 -111
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/keepAlive.mjs +238 -111
- package/dist/preview-next/middleware.mjs +238 -111
- package/dist/{previewAuthStore-BkEgnYPP.mjs → previewAuthStore-COUyAKaX.mjs} +238 -111
- package/dist/{sdk-runtime-DwGfsT0S.mjs → sdk-runtime-D4k2LSGF.mjs} +2 -2
- package/dist/{separator-BeqDLneQ.mjs → separator-UGtpag4Z.mjs} +1 -1
- package/dist/server/components.mjs +2697 -1023
- package/dist/server/config-validation.mjs +2424 -1720
- package/dist/server/config.mjs +2429 -1724
- package/dist/server/data.mjs +1164 -454
- package/dist/server/index.mjs +364 -280
- package/dist/server/navigation.mjs +16 -47
- package/dist/server/next.mjs +2915 -1380
- package/dist/server/page-converter.mjs +969 -522
- package/dist/server/prebuild.mjs +2 -3
- package/dist/server/rendering/server.mjs +2704 -1030
- package/dist/server/rendering.mjs +2742 -1063
- package/dist/server/routing.mjs +1386 -595
- package/dist/server/server.mjs +2878 -2324
- package/dist/server/theme-bridge.mjs +292 -24
- package/dist/styles/index.css +289 -25
- package/package.json +1 -1
- package/dist/_dts/api/src/navigation/identity.d.ts +0 -59
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup-destination.d.ts +0 -291
- package/dist/_dts/core/src/newsletter-signup-destination.d.ts +0 -38
|
@@ -5,6 +5,8 @@ export * from '../domain';
|
|
|
5
5
|
export * from './listingLayout';
|
|
6
6
|
export { EventCard } from './EventCard';
|
|
7
7
|
export { EventCompactRow } from './EventCompactRow';
|
|
8
|
+
export { EventQuickDates } from './EventQuickDates';
|
|
8
9
|
export { EmptyState } from './EmptyState';
|
|
9
10
|
export { DateTimeTile } from './DateTimeTile';
|
|
11
|
+
export { CalendarDayHeaders } from './CalendarDayHeaders';
|
|
10
12
|
export { OfferingTitle } from './OfferingTitle';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The first client render must retain the server's data-dependent shell.
|
|
3
|
+
* State becomes ready after hydration so subsequent loading transitions can
|
|
4
|
+
* use the live calendar state without changing the server markup mid-hydrate.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useHydrationReady(): boolean;
|
|
@@ -15,6 +15,7 @@ export type NewsletterFormSubmissionState = Readonly<{
|
|
|
15
15
|
error: NewsletterFormError;
|
|
16
16
|
}> | Readonly<{
|
|
17
17
|
tag: 'success';
|
|
18
|
+
outcome: 'subscribed' | 'confirmation_required';
|
|
18
19
|
}>;
|
|
19
20
|
export type NewsletterFormSubmissionAction = Readonly<{
|
|
20
21
|
type: 'submitted';
|
|
@@ -23,6 +24,7 @@ export type NewsletterFormSubmissionAction = Readonly<{
|
|
|
23
24
|
error: NewsletterFormError;
|
|
24
25
|
}> | Readonly<{
|
|
25
26
|
type: 'succeeded';
|
|
27
|
+
outcome: 'subscribed' | 'confirmation_required';
|
|
26
28
|
}>;
|
|
27
29
|
export declare const initialNewsletterFormSubmissionState: NewsletterFormSubmissionState;
|
|
28
30
|
export declare function newsletterFormSubmissionReducer(state: NewsletterFormSubmissionState, action: NewsletterFormSubmissionAction): NewsletterFormSubmissionState;
|
|
@@ -30,5 +32,6 @@ export declare function newsletterFieldError(fieldId: string, message: string):
|
|
|
30
32
|
export declare function newsletterFormError(message: string): NewsletterFormError;
|
|
31
33
|
export declare function isNewsletterFormSubmitting(state: NewsletterFormSubmissionState): boolean;
|
|
32
34
|
export declare function isNewsletterFormSuccess(state: NewsletterFormSubmissionState): boolean;
|
|
35
|
+
export declare function getNewsletterSuccessOutcome(state: NewsletterFormSubmissionState): 'subscribed' | 'confirmation_required' | null;
|
|
33
36
|
export declare function getNewsletterSubmissionFieldError(state: NewsletterFormSubmissionState, fieldId: string): string | null;
|
|
34
37
|
export declare function getNewsletterSubmissionFormError(state: NewsletterFormSubmissionState): string | null;
|
|
@@ -1,38 +1,41 @@
|
|
|
1
|
+
import { type MailingListSignupSourceRef } from '../../../../../core/src/index';
|
|
1
2
|
import { type InteractiveIslandProps } from '../../../contracts/islands';
|
|
2
|
-
import { type
|
|
3
|
-
import { type NewsletterButtonVariant, type NewsletterFieldDef, type NewsletterFormProps, type NewsletterPreset } from './newsletter-form.types';
|
|
3
|
+
import { type NewsletterButtonVariant, type NewsletterFieldDef, type NewsletterFormProps } from './newsletter-form.types';
|
|
4
4
|
export type NewsletterFormSourceProps = NewsletterFormProps;
|
|
5
5
|
export type NewsletterFormDisplay = Readonly<{
|
|
6
6
|
kind: 'newsletter-form';
|
|
7
|
+
availability: 'ready' | 'unavailable';
|
|
7
8
|
className: string | null;
|
|
8
9
|
buttonLabel: string;
|
|
9
10
|
buttonVariant: NewsletterButtonVariant;
|
|
10
|
-
successMessage: string | null;
|
|
11
11
|
privacyNote: string | null;
|
|
12
12
|
fields: readonly NewsletterFieldDef[];
|
|
13
|
+
choices: readonly Readonly<{
|
|
14
|
+
id: string;
|
|
15
|
+
label: string;
|
|
16
|
+
}>[];
|
|
13
17
|
}>;
|
|
14
18
|
export type NewsletterFormHydration = Readonly<{
|
|
15
19
|
target: NewsletterFormHydrationTarget;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
setupRevision: number | null;
|
|
21
|
+
choiceProvider: 'native' | 'brevo' | 'mailchimp' | null;
|
|
22
|
+
choicePresentation: 'hidden' | 'automatic' | 'visitor_choice';
|
|
19
23
|
spamProtectionEnabled?: boolean;
|
|
20
24
|
}>;
|
|
21
25
|
export type NewsletterFormHydrationTarget = Readonly<{
|
|
22
26
|
tag: 'block-source';
|
|
23
|
-
|
|
27
|
+
sourceRef: MailingListSignupBlockSourceRef | null;
|
|
24
28
|
}> | Readonly<{
|
|
25
29
|
tag: 'signed-footer-source';
|
|
26
|
-
|
|
30
|
+
sourceRef: MailingListSignupSignedSourceRef;
|
|
27
31
|
}> | Readonly<{
|
|
28
|
-
tag: '
|
|
29
|
-
listId: string | null;
|
|
32
|
+
tag: 'preview';
|
|
30
33
|
}>;
|
|
31
|
-
type
|
|
34
|
+
type MailingListSignupBlockSourceRef = Extract<MailingListSignupSourceRef, {
|
|
32
35
|
tag: 'block_ref';
|
|
33
36
|
}>;
|
|
34
|
-
type
|
|
35
|
-
tag: '
|
|
37
|
+
type MailingListSignupSignedSourceRef = Extract<MailingListSignupSourceRef, {
|
|
38
|
+
tag: 'signed_source_ref';
|
|
36
39
|
}>;
|
|
37
40
|
type NewsletterIslandMeta = Readonly<{
|
|
38
41
|
siteId?: string;
|
|
@@ -45,18 +48,22 @@ export declare const newsletterFormBlockRuntime: Readonly<{
|
|
|
45
48
|
buildRender: (source: NewsletterFormProps) => Readonly<{
|
|
46
49
|
display: Readonly<{
|
|
47
50
|
kind: "newsletter-form";
|
|
51
|
+
availability: "ready" | "unavailable";
|
|
48
52
|
className: string | null;
|
|
49
53
|
buttonLabel: string;
|
|
50
54
|
buttonVariant: NewsletterButtonVariant;
|
|
51
|
-
successMessage: string | null;
|
|
52
55
|
privacyNote: string | null;
|
|
53
56
|
fields: readonly NewsletterFieldDef[];
|
|
57
|
+
choices: readonly Readonly<{
|
|
58
|
+
id: string;
|
|
59
|
+
label: string;
|
|
60
|
+
}>[];
|
|
54
61
|
}>;
|
|
55
62
|
hydration: Readonly<{
|
|
56
63
|
target: NewsletterFormHydrationTarget;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
64
|
+
setupRevision: number | null;
|
|
65
|
+
choiceProvider: "native" | "brevo" | "mailchimp" | null;
|
|
66
|
+
choicePresentation: "hidden" | "automatic" | "visitor_choice";
|
|
60
67
|
spamProtectionEnabled?: boolean;
|
|
61
68
|
}>;
|
|
62
69
|
}>;
|
|
@@ -69,36 +76,44 @@ export declare const newsletterFormBlockRuntime: Readonly<{
|
|
|
69
76
|
encode: (value: Readonly<{
|
|
70
77
|
display: Readonly<{
|
|
71
78
|
kind: "newsletter-form";
|
|
79
|
+
availability: "ready" | "unavailable";
|
|
72
80
|
className: string | null;
|
|
73
81
|
buttonLabel: string;
|
|
74
82
|
buttonVariant: NewsletterButtonVariant;
|
|
75
|
-
successMessage: string | null;
|
|
76
83
|
privacyNote: string | null;
|
|
77
84
|
fields: readonly NewsletterFieldDef[];
|
|
85
|
+
choices: readonly Readonly<{
|
|
86
|
+
id: string;
|
|
87
|
+
label: string;
|
|
88
|
+
}>[];
|
|
78
89
|
}>;
|
|
79
90
|
hydration: Readonly<{
|
|
80
91
|
target: NewsletterFormHydrationTarget;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
92
|
+
setupRevision: number | null;
|
|
93
|
+
choiceProvider: "native" | "brevo" | "mailchimp" | null;
|
|
94
|
+
choicePresentation: "hidden" | "automatic" | "visitor_choice";
|
|
84
95
|
spamProtectionEnabled?: boolean;
|
|
85
96
|
}>;
|
|
86
97
|
}>) => unknown;
|
|
87
98
|
decode: (input: unknown) => import("../../../contracts").DecodeResult<Readonly<{
|
|
88
99
|
display: Readonly<{
|
|
89
100
|
kind: "newsletter-form";
|
|
101
|
+
availability: "ready" | "unavailable";
|
|
90
102
|
className: string | null;
|
|
91
103
|
buttonLabel: string;
|
|
92
104
|
buttonVariant: NewsletterButtonVariant;
|
|
93
|
-
successMessage: string | null;
|
|
94
105
|
privacyNote: string | null;
|
|
95
106
|
fields: readonly NewsletterFieldDef[];
|
|
107
|
+
choices: readonly Readonly<{
|
|
108
|
+
id: string;
|
|
109
|
+
label: string;
|
|
110
|
+
}>[];
|
|
96
111
|
}>;
|
|
97
112
|
hydration: Readonly<{
|
|
98
113
|
target: NewsletterFormHydrationTarget;
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
114
|
+
setupRevision: number | null;
|
|
115
|
+
choiceProvider: "native" | "brevo" | "mailchimp" | null;
|
|
116
|
+
choicePresentation: "hidden" | "automatic" | "visitor_choice";
|
|
102
117
|
spamProtectionEnabled?: boolean;
|
|
103
118
|
}>;
|
|
104
119
|
}>>;
|
|
@@ -117,18 +132,22 @@ export declare const newsletterFormInteractiveIslandPropsCodec: Readonly<{
|
|
|
117
132
|
} & Readonly<{
|
|
118
133
|
display: Readonly<{
|
|
119
134
|
kind: "newsletter-form";
|
|
135
|
+
availability: "ready" | "unavailable";
|
|
120
136
|
className: string | null;
|
|
121
137
|
buttonLabel: string;
|
|
122
138
|
buttonVariant: NewsletterButtonVariant;
|
|
123
|
-
successMessage: string | null;
|
|
124
139
|
privacyNote: string | null;
|
|
125
140
|
fields: readonly NewsletterFieldDef[];
|
|
141
|
+
choices: readonly Readonly<{
|
|
142
|
+
id: string;
|
|
143
|
+
label: string;
|
|
144
|
+
}>[];
|
|
126
145
|
}>;
|
|
127
146
|
hydration: Readonly<{
|
|
128
147
|
target: NewsletterFormHydrationTarget;
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
148
|
+
setupRevision: number | null;
|
|
149
|
+
choiceProvider: "native" | "brevo" | "mailchimp" | null;
|
|
150
|
+
choicePresentation: "hidden" | "automatic" | "visitor_choice";
|
|
132
151
|
spamProtectionEnabled?: boolean;
|
|
133
152
|
}>;
|
|
134
153
|
}>>;
|
|
@@ -143,18 +162,22 @@ export declare const newsletterFormInteractiveIslandPropsCodec: Readonly<{
|
|
|
143
162
|
} & Readonly<{
|
|
144
163
|
display: Readonly<{
|
|
145
164
|
kind: "newsletter-form";
|
|
165
|
+
availability: "ready" | "unavailable";
|
|
146
166
|
className: string | null;
|
|
147
167
|
buttonLabel: string;
|
|
148
168
|
buttonVariant: NewsletterButtonVariant;
|
|
149
|
-
successMessage: string | null;
|
|
150
169
|
privacyNote: string | null;
|
|
151
170
|
fields: readonly NewsletterFieldDef[];
|
|
171
|
+
choices: readonly Readonly<{
|
|
172
|
+
id: string;
|
|
173
|
+
label: string;
|
|
174
|
+
}>[];
|
|
152
175
|
}>;
|
|
153
176
|
hydration: Readonly<{
|
|
154
177
|
target: NewsletterFormHydrationTarget;
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
178
|
+
setupRevision: number | null;
|
|
179
|
+
choiceProvider: "native" | "brevo" | "mailchimp" | null;
|
|
180
|
+
choicePresentation: "hidden" | "automatic" | "visitor_choice";
|
|
158
181
|
spamProtectionEnabled?: boolean;
|
|
159
182
|
}>;
|
|
160
183
|
}>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type MailingListSignupSourceRef } from '../../../../../core/src/index';
|
|
2
2
|
import type { NewsletterFormHydrationTarget } from './newsletter-form.interactive';
|
|
3
3
|
export type NewsletterFormRawSubmissionFields = Readonly<{
|
|
4
4
|
email: FormDataEntryValue | null;
|
|
@@ -20,10 +20,10 @@ export type NewsletterFormSubmissionFields = Readonly<{
|
|
|
20
20
|
}>;
|
|
21
21
|
export type NewsletterSubmitTargetResolution = Readonly<{
|
|
22
22
|
tag: 'ready';
|
|
23
|
-
|
|
23
|
+
sourceRef: MailingListSignupSourceRef;
|
|
24
24
|
}> | Readonly<{
|
|
25
25
|
tag: 'unavailable';
|
|
26
|
-
reason: 'missing_block_source'
|
|
26
|
+
reason: 'missing_block_source';
|
|
27
27
|
}>;
|
|
28
28
|
export declare function mapNewsletterFormFieldsToSubscriberInput(fields: NewsletterFormRawSubmissionFields): NewsletterFormSubmissionFields;
|
|
29
29
|
export declare function resolveNewsletterSubmitTarget(input: NewsletterFormHydrationTarget): NewsletterSubmitTargetResolution;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Shared types for the newsletter form server and client components.
|
|
5
5
|
*/
|
|
6
|
-
import type {
|
|
6
|
+
import type { MailingListGlobalForm, MailingListPlacementTargeting, MailingListRuntimeContext, MailingListSignupSourceRef } from '../../../../../core/src/index';
|
|
7
7
|
import type { BlockButtonRole } from '../../constants/buttonRoles';
|
|
8
|
-
export type NewsletterPreset =
|
|
8
|
+
export type NewsletterPreset = MailingListGlobalForm['fields']['preset'];
|
|
9
9
|
export type NewsletterFieldDef = {
|
|
10
10
|
id: string;
|
|
11
11
|
type: 'email' | 'text';
|
|
@@ -13,27 +13,18 @@ export type NewsletterFieldDef = {
|
|
|
13
13
|
required: boolean;
|
|
14
14
|
placeholder?: string;
|
|
15
15
|
};
|
|
16
|
-
export type NewsletterDestinationProvider = 'riverbank' | 'mailchimp';
|
|
17
16
|
export type NewsletterButtonVariant = BlockButtonRole;
|
|
18
17
|
type NewsletterFormCommonProps = {
|
|
19
18
|
/** Site ID for API calls */
|
|
20
19
|
siteId?: string;
|
|
21
20
|
/** API base URL for client-side fetching */
|
|
22
21
|
apiBaseUrl?: string;
|
|
23
|
-
/**
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
|
|
27
|
-
/** Submit button label */
|
|
28
|
-
buttonLabel?: string | null;
|
|
22
|
+
/** Site-owned fields/copy and safe provider choice labels. */
|
|
23
|
+
mailingList?: MailingListRuntimeContext;
|
|
24
|
+
/** The only placement-owned mailing-list behaviour. */
|
|
25
|
+
targeting?: MailingListPlacementTargeting;
|
|
29
26
|
/** Site-style button role for the submit action */
|
|
30
27
|
buttonVariant?: NewsletterButtonVariant | null;
|
|
31
|
-
/** Message shown after successful subscription */
|
|
32
|
-
successMessage?: string | null;
|
|
33
|
-
/** Optional privacy note below the form */
|
|
34
|
-
privacyNote?: string | null;
|
|
35
|
-
/** Optional tags (comma/semicolon separated) applied on subscribe */
|
|
36
|
-
tags?: string | null;
|
|
37
28
|
/** Enable spam protection (ALTCHA) */
|
|
38
29
|
spamProtectionEnabled?: boolean;
|
|
39
30
|
/** Additional CSS class */
|
|
@@ -42,31 +33,22 @@ type NewsletterFormCommonProps = {
|
|
|
42
33
|
type BlockNewsletterFormSource = Readonly<{
|
|
43
34
|
source: 'block';
|
|
44
35
|
blockId?: string | null;
|
|
45
|
-
destinationProvider?: NewsletterSignupDestinationProvider | null;
|
|
46
|
-
/** Authoring state only; public submission authority is always blockId. */
|
|
47
|
-
listId?: string | null;
|
|
48
36
|
}>;
|
|
49
37
|
type SignedFooterNewsletterFormSource = Readonly<{
|
|
50
38
|
source: 'signed-footer';
|
|
51
|
-
|
|
52
|
-
tag: '
|
|
39
|
+
sourceRef: Extract<MailingListSignupSourceRef, {
|
|
40
|
+
tag: 'signed_source_ref';
|
|
53
41
|
}>;
|
|
54
42
|
blockId?: never;
|
|
55
|
-
destinationProvider?: never;
|
|
56
|
-
listId?: never;
|
|
57
43
|
}>;
|
|
58
|
-
type
|
|
59
|
-
source: '
|
|
60
|
-
listId: string | null;
|
|
44
|
+
type PreviewNewsletterFormSource = Readonly<{
|
|
45
|
+
source: 'preview';
|
|
61
46
|
blockId?: never;
|
|
62
|
-
|
|
63
|
-
destinationProvider?: never;
|
|
47
|
+
sourceRef?: never;
|
|
64
48
|
}>;
|
|
65
|
-
export type NewsletterFormProps = NewsletterFormCommonProps & (BlockNewsletterFormSource | SignedFooterNewsletterFormSource |
|
|
49
|
+
export type NewsletterFormProps = NewsletterFormCommonProps & (BlockNewsletterFormSource | SignedFooterNewsletterFormSource | PreviewNewsletterFormSource);
|
|
66
50
|
/**
|
|
67
51
|
* Get form fields based on preset configuration.
|
|
68
52
|
*/
|
|
69
|
-
export declare function
|
|
70
|
-
includePhone?: boolean;
|
|
71
|
-
}): NewsletterFieldDef[];
|
|
53
|
+
export declare function getGlobalFormFields(form: MailingListGlobalForm): NewsletterFieldDef[];
|
|
72
54
|
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ButtonVariant, PublicEvent } from '../../blocks/events/shared/types';
|
|
3
|
+
import { type BookingOfferingPresetSummary } from '../../blocks/offerings-preview/model';
|
|
4
|
+
export type OfferingsCatalogueProps = Readonly<{
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
bookingOfferingPresets?: readonly BookingOfferingPresetSummary[] | null;
|
|
7
|
+
catalogueEvents?: readonly PublicEvent[] | null;
|
|
8
|
+
quickDateEvents?: readonly PublicEvent[] | null;
|
|
9
|
+
pathname?: string;
|
|
10
|
+
buttonVariant?: ButtonVariant | null;
|
|
11
|
+
emptyMessage?: string | null;
|
|
12
|
+
failedMessage?: string | null;
|
|
13
|
+
}>;
|
|
14
|
+
export declare function OfferingsCatalogue(props: OfferingsCatalogueProps): React.ReactNode;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ButtonVariant } from '../../blocks/events/shared/types';
|
|
3
|
+
import { type OfferingsPreviewGroupPresentation, type OfferingsPreviewGroupRenderState, type OfferingsPreviewItem, type OfferingsPreviewRouteCandidate } from '../../blocks/offerings-preview/model';
|
|
4
|
+
export type OfferingsPreviewGroupFrame = Readonly<{
|
|
5
|
+
containerClassName: string;
|
|
6
|
+
containerStyle?: React.CSSProperties;
|
|
7
|
+
contentClassName: string;
|
|
8
|
+
}>;
|
|
9
|
+
type OfferingsPreviewContentProps = Readonly<{
|
|
10
|
+
now: Date;
|
|
11
|
+
states: readonly OfferingsPreviewGroupRenderState[];
|
|
12
|
+
buttonVariant: ButtonVariant;
|
|
13
|
+
buttonText: string;
|
|
14
|
+
routeCandidates: readonly OfferingsPreviewRouteCandidate[];
|
|
15
|
+
groupFrame: OfferingsPreviewGroupFrame;
|
|
16
|
+
renderGroupItems: (presentation: OfferingsPreviewGroupPresentation, items: readonly OfferingsPreviewItem[], options: Readonly<{
|
|
17
|
+
buttonVariant: ButtonVariant;
|
|
18
|
+
buttonText: string;
|
|
19
|
+
now: Date;
|
|
20
|
+
}>) => React.ReactNode;
|
|
21
|
+
}>;
|
|
22
|
+
export declare function OfferingsPreviewContent(props: OfferingsPreviewContentProps): React.ReactElement;
|
|
23
|
+
export {};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { type OfferingsCatalogueProps } from './offerings-preview-catalogue';
|
|
2
3
|
import type { ButtonVariant, PublicEvent } from '../../blocks/events/shared/types';
|
|
3
4
|
import type { CardStylesContent } from '../../fields/boxStyles';
|
|
4
5
|
import { type BookingOfferingPresetSummary, type OfferingsPreviewEventDataKey, type OfferingsPreviewGroupOrder, type OfferingsPreviewGroupOverride, type OfferingsPreviewRouteCandidate } from '../../blocks/offerings-preview/model';
|
|
5
|
-
type OfferingsPreviewProps = Readonly<{
|
|
6
|
+
type OfferingsPreviewProps = OfferingsCatalogueProps & Readonly<{
|
|
6
7
|
now?: Date;
|
|
8
|
+
displayMode?: 'preview' | 'catalogue';
|
|
7
9
|
bookingOfferingPresets?: readonly BookingOfferingPresetSummary[] | null;
|
|
8
10
|
groupOrder?: OfferingsPreviewGroupOrder | null;
|
|
9
11
|
groupOverrides?: readonly OfferingsPreviewGroupOverride[] | null;
|
|
@@ -19,5 +21,5 @@ type OfferingsPreviewProps = Readonly<{
|
|
|
19
21
|
}> | null;
|
|
20
22
|
wholeSeriesRunEvents?: readonly PublicEvent[] | null;
|
|
21
23
|
}> & Partial<Record<OfferingsPreviewEventDataKey, readonly PublicEvent[] | null>>;
|
|
22
|
-
export declare function OfferingsPreviewNode(props: OfferingsPreviewProps): React.JSX.Element
|
|
24
|
+
export declare function OfferingsPreviewNode(props: OfferingsPreviewProps): React.JSX.Element;
|
|
23
25
|
export default OfferingsPreviewNode;
|
|
@@ -6,6 +6,7 @@ export declare const fallbackTransform: TransformDefinition<{
|
|
|
6
6
|
}>;
|
|
7
7
|
export declare const dateFormatShort: TransformDefinition;
|
|
8
8
|
export declare const arrayLengthTransform: TransformDefinition;
|
|
9
|
+
export declare const booleanNotTransform: TransformDefinition;
|
|
9
10
|
export declare const jsonArrayTransform: TransformDefinition;
|
|
10
11
|
export declare const csvTransform: TransformDefinition;
|
|
11
12
|
declare const marqueeLoopOptionsSchema: z.ZodObject<{
|
|
@@ -26,5 +27,9 @@ declare const mapTokenOptionsSchema: z.ZodObject<{
|
|
|
26
27
|
* fallback is given, so the style property is simply omitted.
|
|
27
28
|
*/
|
|
28
29
|
export declare const mapTokenTransform: TransformDefinition<z.infer<typeof mapTokenOptionsSchema>>;
|
|
30
|
+
/** Compare a finite content value without storing derived loader flags. */
|
|
31
|
+
export declare const equalsTransform: TransformDefinition<{
|
|
32
|
+
value: string;
|
|
33
|
+
}>;
|
|
29
34
|
export declare const formattingTransforms: TransformDefinition[];
|
|
30
35
|
export {};
|
|
@@ -56,3 +56,4 @@ export * from './stripeMinimumCharge';
|
|
|
56
56
|
export * from './stripeCheckoutReturnUrl';
|
|
57
57
|
export * from './stateTransitions';
|
|
58
58
|
export * from './event-registration-errors';
|
|
59
|
+
export { STRIPE_COMMISSION_FREE_REASONS, type StripeCommissionFreeReason } from './stripeCommissionMetadata';
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
+
import { type StripeBookingCommissionOrderItemMetadata } from './stripeCommissionMetadata';
|
|
2
|
+
export { parseStripeBookingCommissionMetadata, type StripeBookingCommissionOrderItemMetadata } from './stripeCommissionMetadata';
|
|
1
3
|
import { type BrandedIdParseError, type CheckoutLineId, type RetiredCourseId, type CustomerId, type DatedOfferingCapacityHoldAuditRef, type DatedOfferingCapacityHoldId, type EventSeriesId, type EventInstanceId, type OccurrenceId, type PassId, type PricingOptionId, type Result } from '../../../core/src/index';
|
|
2
4
|
import type { OrderItemKind } from './orderTypes';
|
|
3
5
|
export type CheckoutLineMetadata = Readonly<{
|
|
4
6
|
checkoutLineId?: CheckoutLineId;
|
|
5
7
|
displayName?: string;
|
|
6
8
|
}>;
|
|
7
|
-
export type StripeBookingCommissionOrderItemMetadata = Readonly<{
|
|
8
|
-
stripeBookingCommission?: Readonly<{
|
|
9
|
-
kind: 'application_fee_amount';
|
|
10
|
-
amountCents: number;
|
|
11
|
-
percent: number;
|
|
12
|
-
}>;
|
|
13
|
-
}>;
|
|
14
9
|
export type SlidingScaleOrderItemPricingSnapshot = Readonly<{
|
|
15
10
|
kind: 'sliding_scale';
|
|
16
11
|
version: 1;
|
|
@@ -87,7 +82,7 @@ export type EventTicketOrderItemMetadata = CheckoutLineMetadata & StripeBookingC
|
|
|
87
82
|
attendeeEmail: string;
|
|
88
83
|
attendeeName: string;
|
|
89
84
|
}>;
|
|
90
|
-
export type ProductOrderItemMetadata = CheckoutLineMetadata & Readonly<{
|
|
85
|
+
export type ProductOrderItemMetadata = CheckoutLineMetadata & StripeBookingCommissionOrderItemMetadata & Readonly<{
|
|
91
86
|
productType?: 'physical' | 'digital';
|
|
92
87
|
requiresShipping?: boolean;
|
|
93
88
|
}>;
|
|
@@ -101,7 +96,7 @@ export type PassBundleFulfillmentMetadata = Readonly<{
|
|
|
101
96
|
}>;
|
|
102
97
|
export type CreditProductUseCase = 'event_pass' | 'appointment_package';
|
|
103
98
|
export declare function normalizeOrderCreditProductUseCase(value: unknown): Result<CreditProductUseCase, string>;
|
|
104
|
-
export type PassOrderItemMetadata = CheckoutLineMetadata & Readonly<{
|
|
99
|
+
export type PassOrderItemMetadata = CheckoutLineMetadata & StripeBookingCommissionOrderItemMetadata & Readonly<{
|
|
105
100
|
passId: PassId;
|
|
106
101
|
productUseCase?: CreditProductUseCase;
|
|
107
102
|
creditsTotal: number;
|
|
@@ -131,7 +126,7 @@ export type MembershipBundleFulfillmentMetadata = Readonly<{
|
|
|
131
126
|
attendeeName: string;
|
|
132
127
|
membershipName: string;
|
|
133
128
|
}>;
|
|
134
|
-
export type MembershipOrderItemMetadata = CheckoutLineMetadata & Readonly<{
|
|
129
|
+
export type MembershipOrderItemMetadata = CheckoutLineMetadata & StripeBookingCommissionOrderItemMetadata & Readonly<{
|
|
135
130
|
bundleFulfillment?: MembershipBundleFulfillmentMetadata;
|
|
136
131
|
}>;
|
|
137
132
|
export type OrderItemMetadataByKind = {
|
|
@@ -143,7 +138,6 @@ export type OrderItemMetadataByKind = {
|
|
|
143
138
|
membership: MembershipOrderItemMetadata;
|
|
144
139
|
};
|
|
145
140
|
export type OrderItemMetadata = OrderItemMetadataByKind[OrderItemKind];
|
|
146
|
-
export declare function parseStripeBookingCommissionMetadata(raw: Record<string, unknown>): Result<StripeBookingCommissionOrderItemMetadata, string>;
|
|
147
141
|
export declare function parseBookableOrderItemPricingMetadata(raw: Record<string, unknown>): Result<BookableOrderItemPricingMetadata, string>;
|
|
148
142
|
export declare function parseOrderItemMetadata(kind: 'event_ticket', raw: unknown): Result<EventTicketOrderItemMetadata, string>;
|
|
149
143
|
export declare function parseOrderItemMetadata(kind: 'product', raw: unknown): Result<ProductOrderItemMetadata, string>;
|
|
@@ -151,4 +145,3 @@ export declare function parseOrderItemMetadata(kind: 'pass', raw: unknown): Resu
|
|
|
151
145
|
export declare function parseOrderItemMetadata(kind: 'event_series_registration', raw: unknown): Result<EventSeriesRegistrationOrderItemMetadata, string>;
|
|
152
146
|
export declare function parseOrderItemMetadata(kind: 'appointment', raw: unknown): Result<AppointmentOrderItemMetadata, string>;
|
|
153
147
|
export declare function parseOrderItemMetadata(kind: 'membership', raw: unknown): Result<MembershipOrderItemMetadata, string>;
|
|
154
|
-
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type Result } from '../../../core/src/index';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
/** Reasons are payment evidence, not an independent pricing policy. */
|
|
4
|
+
export declare const STRIPE_COMMISSION_FREE_REASONS: readonly ["managed_billing", "no_commission_plan", "billing_evidence_invalid", "fee_rounds_to_zero", "non_commissionable_scope", "payment_not_stripe"];
|
|
5
|
+
export type StripeCommissionFreeReason = (typeof STRIPE_COMMISSION_FREE_REASONS)[number];
|
|
6
|
+
declare const commissionEvidenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
8
|
+
sourcePlanId: z.ZodOptional<z.ZodString>;
|
|
9
|
+
kind: z.ZodLiteral<"commission_free">;
|
|
10
|
+
reason: z.ZodEnum<{
|
|
11
|
+
managed_billing: "managed_billing";
|
|
12
|
+
no_commission_plan: "no_commission_plan";
|
|
13
|
+
billing_evidence_invalid: "billing_evidence_invalid";
|
|
14
|
+
fee_rounds_to_zero: "fee_rounds_to_zero";
|
|
15
|
+
non_commissionable_scope: "non_commissionable_scope";
|
|
16
|
+
payment_not_stripe: "payment_not_stripe";
|
|
17
|
+
}>;
|
|
18
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
19
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
20
|
+
sourcePlanId: z.ZodOptional<z.ZodString>;
|
|
21
|
+
kind: z.ZodLiteral<"application_fee_amount">;
|
|
22
|
+
amountCents: z.ZodNumber;
|
|
23
|
+
percent: z.ZodNumber;
|
|
24
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
25
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
26
|
+
sourcePlanId: z.ZodOptional<z.ZodString>;
|
|
27
|
+
kind: z.ZodLiteral<"application_fee_percent">;
|
|
28
|
+
percent: z.ZodNumber;
|
|
29
|
+
}, z.core.$strip>], "kind">;
|
|
30
|
+
export type StripeBookingCommissionOrderItemMetadata = Readonly<{
|
|
31
|
+
stripeBookingCommission?: z.infer<typeof commissionEvidenceSchema>;
|
|
32
|
+
}>;
|
|
33
|
+
export declare function parseStripeBookingCommissionMetadata(raw: Record<string, unknown>): Result<StripeBookingCommissionOrderItemMetadata, string>;
|
|
34
|
+
export {};
|
|
@@ -1,26 +1,15 @@
|
|
|
1
|
-
import { type FooterEngagementSection, type Result } from '../../core/src/index';
|
|
1
|
+
import { type FooterEngagementSection, type MailingListPlacementTargeting, type Result } from '../../core/src/index';
|
|
2
2
|
type FooterEngagementDraftBase = Readonly<{
|
|
3
3
|
treatment: FooterEngagementSection['treatment'];
|
|
4
4
|
heading: string;
|
|
5
5
|
intro: string;
|
|
6
6
|
}>;
|
|
7
|
-
type FooterMailingCopyDraft = Readonly<{
|
|
8
|
-
buttonLabel: string;
|
|
9
|
-
successMessage: string;
|
|
10
|
-
privacyNote: string;
|
|
11
|
-
}>;
|
|
12
7
|
export type FooterEngagementDraft = (FooterEngagementDraftBase & Readonly<{
|
|
13
8
|
kind: 'standard-contact';
|
|
14
9
|
formId: string;
|
|
15
|
-
}>) | (FooterEngagementDraftBase &
|
|
10
|
+
}>) | (FooterEngagementDraftBase & Readonly<{
|
|
16
11
|
kind: 'mailing-list';
|
|
17
|
-
|
|
18
|
-
provider: 'riverbank';
|
|
19
|
-
listId: string;
|
|
20
|
-
}> | Readonly<{
|
|
21
|
-
provider: 'mailchimp';
|
|
22
|
-
audienceId: string;
|
|
23
|
-
}>;
|
|
12
|
+
targeting: MailingListPlacementTargeting;
|
|
24
13
|
}>);
|
|
25
14
|
export type FooterEngagementDraftEvent = Readonly<{
|
|
26
15
|
type: 'select-kind';
|
|
@@ -38,20 +27,13 @@ export type FooterEngagementDraftEvent = Readonly<{
|
|
|
38
27
|
type: 'set-form';
|
|
39
28
|
formId: string;
|
|
40
29
|
}> | Readonly<{
|
|
41
|
-
type: '
|
|
42
|
-
|
|
43
|
-
}> | Readonly<{
|
|
44
|
-
type: 'set-mailing-destination';
|
|
45
|
-
id: string;
|
|
46
|
-
}> | Readonly<{
|
|
47
|
-
type: 'set-mailing-copy';
|
|
48
|
-
field: keyof FooterMailingCopyDraft;
|
|
49
|
-
value: string;
|
|
30
|
+
type: 'set-mailing-targeting';
|
|
31
|
+
targeting: MailingListPlacementTargeting;
|
|
50
32
|
}>;
|
|
51
33
|
export declare function reduceFooterEngagementDraft(draft: FooterEngagementDraft, event: FooterEngagementDraftEvent): FooterEngagementDraft;
|
|
52
34
|
export declare function createFooterEngagementDraft(section: FooterEngagementSection | null): FooterEngagementDraft;
|
|
53
35
|
type DraftParseError = Readonly<{
|
|
54
36
|
message: string;
|
|
55
37
|
}>;
|
|
56
|
-
export declare function parseFooterEngagementDraft(draft: FooterEngagementDraft, currentId: string
|
|
38
|
+
export declare function parseFooterEngagementDraft(draft: FooterEngagementDraft, currentId: string): Result<FooterEngagementSection, DraftParseError>;
|
|
57
39
|
export {};
|
|
@@ -32,8 +32,7 @@ export declare function useFooterComposerState({ apiClient, canEdit, initialTarg
|
|
|
32
32
|
compositionSnapshot: FooterCompositionSnapshot | null;
|
|
33
33
|
engagementOptions: Readonly<{
|
|
34
34
|
forms: readonly import("../../api/src/footerSettings").FooterFormSummary[];
|
|
35
|
-
|
|
36
|
-
mailchimp: import("../../api/src/index").ListMailchimpAudiencesResponse;
|
|
35
|
+
mailingList: import("../../core/src/index").MailingListRuntimeContext;
|
|
37
36
|
}> | null;
|
|
38
37
|
load: () => Promise<void>;
|
|
39
38
|
loadError: string | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type FormId } from './branded';
|
|
2
|
-
import {
|
|
2
|
+
import type { MailingListPlacementTargeting } from './mailing-list-targeting';
|
|
3
3
|
import { type Result } from './result';
|
|
4
4
|
import type { FooterCompositionError, FooterModuleId } from './footer-composition-types';
|
|
5
5
|
export type FooterEngagementTreatment = 'integrated' | 'separate-row';
|
|
@@ -9,12 +9,8 @@ export type FooterEngagementSource = Readonly<{
|
|
|
9
9
|
intro: string | null;
|
|
10
10
|
}> | Readonly<{
|
|
11
11
|
kind: 'mailing-list';
|
|
12
|
-
|
|
12
|
+
targeting: MailingListPlacementTargeting;
|
|
13
13
|
intro: string | null;
|
|
14
|
-
buttonLabel: string;
|
|
15
|
-
successMessage: string;
|
|
16
|
-
privacyNote: string | null;
|
|
17
|
-
fieldPreset: 'emailOnly';
|
|
18
14
|
}>;
|
|
19
15
|
export type FooterEngagementSection = Readonly<{
|
|
20
16
|
id: FooterModuleId;
|
|
@@ -41,7 +41,13 @@ export * from './footer-navigation-layout';
|
|
|
41
41
|
export * from './footer-arrangement';
|
|
42
42
|
export * from './footer-composition-types';
|
|
43
43
|
export * from './footer-engagement';
|
|
44
|
-
export * from './
|
|
44
|
+
export * from './mailing-list-identifiers';
|
|
45
|
+
export * from './mailing-list-setup';
|
|
46
|
+
export * from './mailing-list-setup-parser';
|
|
47
|
+
export * from './mailing-list-targeting';
|
|
48
|
+
export * from './mailing-list-runtime';
|
|
49
|
+
export * from './mailing-list-targeting-parser';
|
|
50
|
+
export * from './mailing-list-submission';
|
|
45
51
|
export * from './number-input';
|
|
46
52
|
export * from './field-errors';
|
|
47
53
|
export * from './form-submission-preview';
|
|
@@ -63,5 +69,7 @@ export { disabledSelection, enabledSelection, plannerNoChange, plannerPatch, pla
|
|
|
63
69
|
export type { DisabledSelection, EnabledSelection, OptionalSelection, PlannerNoChange, PlannerPatch, PlannerUpdate, PlanningClock, PlanningDateInput, PlanningTimeOptions, } from './planner';
|
|
64
70
|
export { isValidBookingTimeZone, parseBookingTimeZone, type BookingTimeZone, type BookingTimeZoneParseError, } from './booking-time-zone';
|
|
65
71
|
export { CANCELLED_SESSION_STATUS, firstLiveRunSessionStartMs, isWholeSeriesRegistrationOpen, orderedLiveRunSessions, resolveWholeSeriesBookingPhase, resolveWholeSeriesRunLifecycle, type WholeSeriesBookingPhase, type WholeSeriesRunLifecycle, type WholeSeriesScheduleSession, } from './whole-series-run-schedule';
|
|
72
|
+
export * from './public-read-cache-contract';
|
|
66
73
|
export * from './booking-verticals';
|
|
67
74
|
export * from './event-series-behaviour';
|
|
75
|
+
export * from './navigation-locations';
|