@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
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { BillingInterval, BillingPlanId, PlanEntitlements } from '../plans/types';
|
|
2
|
-
import type
|
|
2
|
+
import { type SubscriptionRepository, type SubscriptionRecord } from '../subscriptions/store';
|
|
3
|
+
import { type PlanStanding } from '../plans/standing';
|
|
3
4
|
export interface MembershipState {
|
|
4
5
|
userId: string;
|
|
5
6
|
planId: BillingPlanId;
|
|
@@ -8,24 +9,30 @@ export interface MembershipState {
|
|
|
8
9
|
currentPeriodEnd: string;
|
|
9
10
|
cancelAtPeriodEnd: boolean;
|
|
10
11
|
trialEndsAt?: string | null;
|
|
11
|
-
isPaid: boolean;
|
|
12
|
-
active: boolean;
|
|
13
12
|
entitlements: PlanEntitlements;
|
|
14
13
|
}
|
|
15
14
|
export interface MembershipSummary {
|
|
16
15
|
userId: string;
|
|
16
|
+
/** Effective entitlement plan. Provider subscription identity remains in the repository. */
|
|
17
17
|
planId: BillingPlanId;
|
|
18
18
|
interval: BillingInterval;
|
|
19
19
|
status: SubscriptionRecord['status'];
|
|
20
20
|
currentPeriodEnd: string;
|
|
21
21
|
cancelAtPeriodEnd: boolean;
|
|
22
22
|
trialEndsAt?: string | null;
|
|
23
|
-
isPaid: boolean;
|
|
24
|
-
active: boolean;
|
|
25
23
|
}
|
|
24
|
+
export type InvalidMembership = Readonly<{
|
|
25
|
+
kind: 'review_required';
|
|
26
|
+
userId: string;
|
|
27
|
+
reason: Extract<PlanStanding, {
|
|
28
|
+
kind: 'review_required';
|
|
29
|
+
}>['reason'];
|
|
30
|
+
}>;
|
|
31
|
+
export type MembershipRead = MembershipSummary | InvalidMembership | null;
|
|
32
|
+
export declare function isMembershipReviewRequired(value: MembershipRead): value is InvalidMembership;
|
|
26
33
|
export interface MembershipContext {
|
|
27
34
|
subscriptions: SubscriptionRepository;
|
|
28
35
|
}
|
|
29
36
|
export declare function toMembershipSummary(state: MembershipState): MembershipSummary;
|
|
30
|
-
export declare function getMembershipState(userId: string, context: MembershipContext): Promise<MembershipState | null>;
|
|
31
|
-
export declare function getMembershipSummary(userId: string, context: MembershipContext): Promise<
|
|
37
|
+
export declare function getMembershipState(userId: string, context: MembershipContext): Promise<MembershipState | InvalidMembership | null>;
|
|
38
|
+
export declare function getMembershipSummary(userId: string, context: MembershipContext): Promise<MembershipRead>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type BillingPlanId } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* What each plan is called in front of a customer.
|
|
4
|
+
*
|
|
5
|
+
* It lives apart from the registry because the registry reaches Stripe on
|
|
6
|
+
* import, and a name is the one thing a browser bundle needs. The registry
|
|
7
|
+
* reads its `name` fields from here, so there is still one source.
|
|
8
|
+
*/
|
|
9
|
+
export declare const BILLING_PLAN_NAMES: {
|
|
10
|
+
readonly free: "Free";
|
|
11
|
+
readonly core: "Core";
|
|
12
|
+
readonly solo: "Solo";
|
|
13
|
+
readonly studio: "Studio";
|
|
14
|
+
};
|
|
15
|
+
export declare function billingPlanName(planId: BillingPlanId): string;
|
|
@@ -3,6 +3,8 @@ export declare function listPlans(): PlanDefinition[];
|
|
|
3
3
|
export declare function isBillingPlanId(planId: string): planId is BillingPlanId;
|
|
4
4
|
export declare function ensureBillingPlanId(planId: string): BillingPlanId;
|
|
5
5
|
export declare function getPlanById(planId: string): PlanDefinition | undefined;
|
|
6
|
+
/** Total lookup for a plan ID already validated at a trust boundary. */
|
|
7
|
+
export declare function getKnownPlan(planId: BillingPlanId): PlanDefinition;
|
|
6
8
|
export declare function ensurePlan(planId: string): PlanDefinition;
|
|
7
9
|
export declare function getPlanEntitlements(planId: string): PlanDefinition['entitlements'];
|
|
8
10
|
export declare function getMacadamiaSiteAllowance(planId: string): PlanDefinition['entitlements']['macadamiaSiteAllowance'];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SubscriptionStandingEvidence, SubscriptionStandingEvidenceError, SubscriptionStandingInput } from '../subscriptions/standingEvidence';
|
|
2
|
+
import { type SubscriptionRead } from '../subscriptions/store';
|
|
3
|
+
type PaidStandingDetails = Pick<SubscriptionStandingEvidence, 'planId' | 'interval' | 'currentPeriodEnd' | 'cancelAtPeriodEnd'>;
|
|
4
|
+
export type PlanStanding = Readonly<{
|
|
5
|
+
kind: 'paid';
|
|
6
|
+
} & PaidStandingDetails> | Readonly<{
|
|
7
|
+
kind: 'payment_recovery';
|
|
8
|
+
} & PaidStandingDetails> | Readonly<{
|
|
9
|
+
kind: 'free';
|
|
10
|
+
reason: 'no_subscription' | 'canceled' | 'unpaid' | 'incomplete' | 'incomplete_expired';
|
|
11
|
+
}> | Readonly<{
|
|
12
|
+
kind: 'review_required';
|
|
13
|
+
reason: SubscriptionStandingEvidenceError | 'unsupported_subscription_status';
|
|
14
|
+
}>;
|
|
15
|
+
/** Stripe owns lifecycle timing. Period dates are display evidence, not a second expiry clock. */
|
|
16
|
+
export declare function resolvePlanStanding(input: SubscriptionStandingInput): PlanStanding;
|
|
17
|
+
/** Repository reads have already parsed provider evidence; never validate it again here. */
|
|
18
|
+
export declare function resolveStoredPlanStanding(record: SubscriptionRead): PlanStanding;
|
|
19
|
+
export {};
|
|
@@ -28,8 +28,6 @@ export declare const BILLING_PLAN_IDS: readonly ["free", "core", "solo", "studio
|
|
|
28
28
|
export type BillingPlanId = (typeof BILLING_PLAN_IDS)[number];
|
|
29
29
|
export declare const PAID_BILLING_PLAN_IDS: readonly ["core", "solo", "studio"];
|
|
30
30
|
export type PaidBillingPlanId = (typeof PAID_BILLING_PLAN_IDS)[number];
|
|
31
|
-
export declare const CONTENT_FLEXIBILITY_TIERS: readonly ["limited", "full"];
|
|
32
|
-
export type ContentFlexibilityTier = (typeof CONTENT_FLEXIBILITY_TIERS)[number];
|
|
33
31
|
export declare const FORMS_TIERS: readonly ["limited", "full"];
|
|
34
32
|
export type FormsTier = (typeof FORMS_TIERS)[number];
|
|
35
33
|
export declare const SEO_TIERS: readonly ["none", "basic", "advanced"];
|
|
@@ -62,7 +60,7 @@ export type WebsiteCollaborationPolicy = Readonly<{
|
|
|
62
60
|
managementRoles: readonly ['owner', 'administrator'];
|
|
63
61
|
}>;
|
|
64
62
|
export type WebsiteCollaborationTier = WebsiteCollaborationPolicy['kind'];
|
|
65
|
-
export declare const PLAN_BOOLEAN_FEATURE_KEYS: readonly ["customDomain", "
|
|
63
|
+
export declare const PLAN_BOOLEAN_FEATURE_KEYS: readonly ["customDomain", "analytics", "passes", "memberships", "discountCodes", "advancedPaymentSchemes", "multiplePractitioners"];
|
|
66
64
|
export type PlanBooleanFeatureKey = (typeof PLAN_BOOLEAN_FEATURE_KEYS)[number];
|
|
67
65
|
export type StripeBookingCommission = Readonly<{
|
|
68
66
|
kind: 'none';
|
|
@@ -84,20 +82,16 @@ export interface PlanEntitlements {
|
|
|
84
82
|
monthlyPricePence: number;
|
|
85
83
|
}>;
|
|
86
84
|
}>;
|
|
87
|
-
monthlyBookingLimit: number | null;
|
|
88
85
|
durableStorageQuota: StorageQuota;
|
|
89
86
|
stripeBookingCommission: StripeBookingCommission;
|
|
90
87
|
customDomain: boolean;
|
|
91
|
-
customContentTypes: boolean;
|
|
92
88
|
analytics: boolean;
|
|
93
89
|
passes: boolean;
|
|
94
90
|
memberships: boolean;
|
|
95
91
|
discountCodes: boolean;
|
|
96
92
|
advancedPaymentSchemes: boolean;
|
|
97
|
-
internalNotes: boolean;
|
|
98
93
|
multiplePractitioners: boolean;
|
|
99
94
|
websiteCollaboration: WebsiteCollaborationPolicy;
|
|
100
|
-
contentFlexibility: ContentFlexibilityTier;
|
|
101
95
|
forms: FormsTier;
|
|
102
96
|
seo: SeoTier;
|
|
103
97
|
newsletter: NewsletterTier;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type Stripe from 'stripe';
|
|
2
|
+
import { type Result, type UtcIsoDateTimeString } from '../../../core/src/index';
|
|
3
|
+
import type { PaidBillingPlanId } from '../plans/types';
|
|
4
|
+
import type { SubscriptionRecord, SubscriptionStatus } from './store';
|
|
5
|
+
export type SubscriptionEvidenceError = 'missing_identity' | 'invalid_plan' | 'invalid_interval' | 'invalid_status' | 'invalid_period_end' | 'invalid_cancellation' | 'invalid_trial_end';
|
|
6
|
+
export type ProviderSubscriptionRecord = Omit<SubscriptionRecord, 'planId' | 'currentPeriodEnd'> & {
|
|
7
|
+
planId: PaidBillingPlanId;
|
|
8
|
+
currentPeriodEnd: UtcIsoDateTimeString;
|
|
9
|
+
};
|
|
10
|
+
export type SubscriptionEvidenceResult = Result<ProviderSubscriptionRecord, SubscriptionEvidenceError>;
|
|
11
|
+
export declare function isSubscriptionStatus(value: unknown): value is SubscriptionStatus;
|
|
12
|
+
export declare function parseProviderSubscription(subscription: Stripe.Subscription): SubscriptionEvidenceResult;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type Result, type UtcIsoDateTimeString } from '../../../core/src/index';
|
|
2
|
+
import type { BillingInterval, PaidBillingPlanId } from '../plans/types';
|
|
3
|
+
import type { SubscriptionStatus } from './store';
|
|
4
|
+
/** Untrusted stored columns, before defaults, casts or membership projection. */
|
|
5
|
+
export type RawSubscriptionStandingEvidence = Readonly<{
|
|
6
|
+
planId: unknown;
|
|
7
|
+
interval: unknown;
|
|
8
|
+
status: unknown;
|
|
9
|
+
currentPeriodEnd: unknown;
|
|
10
|
+
cancelAtPeriodEnd: unknown;
|
|
11
|
+
}>;
|
|
12
|
+
export type SubscriptionStandingEvidenceError = 'invalid_plan' | 'invalid_interval' | 'invalid_status' | 'invalid_period_end' | 'invalid_cancellation';
|
|
13
|
+
export type SubscriptionStandingEvidence = Readonly<{
|
|
14
|
+
planId: PaidBillingPlanId;
|
|
15
|
+
interval: BillingInterval;
|
|
16
|
+
status: SubscriptionStatus;
|
|
17
|
+
currentPeriodEnd: UtcIsoDateTimeString;
|
|
18
|
+
cancelAtPeriodEnd: boolean;
|
|
19
|
+
}>;
|
|
20
|
+
export type SubscriptionStandingInput = Readonly<{
|
|
21
|
+
kind: 'absent';
|
|
22
|
+
}> | Readonly<{
|
|
23
|
+
kind: 'valid';
|
|
24
|
+
subscription: SubscriptionStandingEvidence;
|
|
25
|
+
}> | Readonly<{
|
|
26
|
+
kind: 'invalid';
|
|
27
|
+
reason: SubscriptionStandingEvidenceError;
|
|
28
|
+
}>;
|
|
29
|
+
export declare function parseSubscriptionStandingEvidence(raw: RawSubscriptionStandingEvidence): Result<SubscriptionStandingEvidence, SubscriptionStandingEvidenceError>;
|
|
30
|
+
/** Only a successful DB read with no row may supply null. Transport errors propagate. */
|
|
31
|
+
export declare function readSubscriptionStandingInput(raw: RawSubscriptionStandingEvidence | null): SubscriptionStandingInput;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import type { ProviderSubscriptionRecord } from './evidence';
|
|
2
|
+
import { type RawSubscriptionStandingEvidence, type SubscriptionStandingEvidenceError } from './standingEvidence';
|
|
1
3
|
import type { BillingInterval } from '../plans/types';
|
|
2
4
|
import type { BillingSubscriptionOrigin } from '../site-arrangements';
|
|
3
|
-
export type SubscriptionStatus = 'incomplete' | 'trialing' | 'active' | 'past_due' | 'canceled' | 'unpaid';
|
|
5
|
+
export type SubscriptionStatus = 'incomplete_expired' | 'paused' | 'incomplete' | 'trialing' | 'active' | 'past_due' | 'canceled' | 'unpaid';
|
|
4
6
|
export interface SubscriptionRecord {
|
|
5
7
|
id: string;
|
|
6
8
|
userId: string;
|
|
@@ -14,17 +16,33 @@ export interface SubscriptionRecord {
|
|
|
14
16
|
trialEnds_at?: string | null;
|
|
15
17
|
raw?: Record<string, unknown>;
|
|
16
18
|
}
|
|
19
|
+
export type InvalidSubscriptionRecord = Readonly<{
|
|
20
|
+
kind: 'invalid';
|
|
21
|
+
id: string;
|
|
22
|
+
userId: string;
|
|
23
|
+
customerId: string;
|
|
24
|
+
reason: SubscriptionStandingEvidenceError;
|
|
25
|
+
}>;
|
|
26
|
+
export type SubscriptionRead = ProviderSubscriptionRecord | InvalidSubscriptionRecord | null;
|
|
27
|
+
export declare function isInvalidSubscriptionRecord(value: SubscriptionRead): value is InvalidSubscriptionRecord;
|
|
28
|
+
export declare class InvalidSubscriptionEvidenceError extends Error {
|
|
29
|
+
readonly evidence: InvalidSubscriptionRecord;
|
|
30
|
+
constructor(evidence: InvalidSubscriptionRecord);
|
|
31
|
+
}
|
|
32
|
+
/** For mutation boundaries that cannot operate without valid subscription evidence. */
|
|
33
|
+
export declare function requireSubscriptionRecord(value: SubscriptionRead): ProviderSubscriptionRecord | null;
|
|
34
|
+
export declare function readSubscriptionRecord(raw: Omit<SubscriptionRecord, keyof RawSubscriptionStandingEvidence> & RawSubscriptionStandingEvidence): ProviderSubscriptionRecord | InvalidSubscriptionRecord;
|
|
17
35
|
export interface SubscriptionRepository {
|
|
18
36
|
upsert(record: SubscriptionRecord): Promise<void>;
|
|
19
|
-
getByUserId(userId: string): Promise<
|
|
20
|
-
getBySubscriptionId(subscriptionId: string): Promise<
|
|
37
|
+
getByUserId(userId: string): Promise<SubscriptionRead>;
|
|
38
|
+
getBySubscriptionId(subscriptionId: string): Promise<SubscriptionRead>;
|
|
21
39
|
removeBySubscriptionId(subscriptionId: string): Promise<void>;
|
|
22
40
|
}
|
|
23
41
|
export declare class InMemorySubscriptionRepository implements SubscriptionRepository {
|
|
24
42
|
private byUser;
|
|
25
43
|
private byId;
|
|
26
44
|
upsert(record: SubscriptionRecord): Promise<void>;
|
|
27
|
-
getByUserId(userId: string): Promise<
|
|
28
|
-
getBySubscriptionId(subscriptionId: string): Promise<
|
|
45
|
+
getByUserId(userId: string): Promise<SubscriptionRead>;
|
|
46
|
+
getBySubscriptionId(subscriptionId: string): Promise<SubscriptionRead>;
|
|
29
47
|
removeBySubscriptionId(subscriptionId: string): Promise<void>;
|
|
30
48
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { ResolverContext } from './system';
|
|
3
3
|
import type { PageOutline } from './structure/schema';
|
|
4
|
-
import type { Theme } from '../../theme-core/src/schema';
|
|
5
4
|
import type { SdkCustomBlock } from './system/manifest/schema';
|
|
6
|
-
import type { ThemeTokens } from './system/theme';
|
|
7
5
|
import type { RouteMap } from './system/transforms';
|
|
6
|
+
import { type OverrideOnlyRenderMode, type ThemedRenderMode, type TokensOnlyRenderMode } from './pageRenderingMode';
|
|
8
7
|
import { type PageBoundaryWrapper, type PageRuntimeBoundary } from './pageRendererBoundaries';
|
|
9
|
-
import type
|
|
8
|
+
import { type BlockOverrides, type PageRendererDataContext, type SdkConfigForRenderer } from './pageRendererContracts';
|
|
10
9
|
import { type RenderablePageOutline } from './pageRenderAdmission';
|
|
11
10
|
export type { PageBlockRenderAdmissionError, RenderablePageBlock, RenderablePageOutline, } from './pageRenderAdmission';
|
|
12
11
|
export type { BlockOverrideComponent, BlockOverrideProps, BlockOverrides, EntrySubrouteContextData, OccurrenceContextData, SdkConfigForRenderer, } from './pageRendererContracts';
|
|
@@ -25,20 +24,12 @@ type PageRendererCommonProps<TPage> = {
|
|
|
25
24
|
customBlocks?: SdkCustomBlock[];
|
|
26
25
|
previewAuthoring?: ResolverContext['previewAuthoring'];
|
|
27
26
|
};
|
|
28
|
-
type ThemedPageRendererProps<TPage> = PageRendererCommonProps<TPage> &
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
themeTokens?: ThemeTokens;
|
|
32
|
-
};
|
|
33
|
-
type OverrideOnlyPageRendererProps<TPage> = PageRendererCommonProps<TPage> & {
|
|
34
|
-
rendering: {
|
|
35
|
-
kind: 'overrides-only';
|
|
36
|
-
};
|
|
37
|
-
theme?: never;
|
|
38
|
-
themeTokens?: never;
|
|
27
|
+
type ThemedPageRendererProps<TPage> = PageRendererCommonProps<TPage> & ThemedRenderMode;
|
|
28
|
+
type TokensOnlyPageRendererProps<TPage> = PageRendererCommonProps<TPage> & TokensOnlyRenderMode;
|
|
29
|
+
type OverrideOnlyPageRendererProps<TPage> = PageRendererCommonProps<TPage> & OverrideOnlyRenderMode & {
|
|
39
30
|
blockOverrides: BlockOverrides;
|
|
40
31
|
};
|
|
41
|
-
export type PageRendererProps = ThemedPageRendererProps<RenderablePageOutline> | OverrideOnlyPageRendererProps<RenderablePageOutline>;
|
|
32
|
+
export type PageRendererProps = ThemedPageRendererProps<RenderablePageOutline> | TokensOnlyPageRendererProps<RenderablePageOutline> | OverrideOnlyPageRendererProps<RenderablePageOutline>;
|
|
42
33
|
export type EditorPageRendererProps = ThemedPageRendererProps<PageOutline> | OverrideOnlyPageRendererProps<PageOutline>;
|
|
43
34
|
export default function PageRenderer(props: PageRendererProps): React.JSX.Element;
|
|
44
35
|
export declare function EditorPageRenderer(props: EditorPageRendererProps): React.JSX.Element;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* For server-safe rendering, use './server'.
|
|
9
9
|
*/
|
|
10
|
-
export { BlockApiProvider, useBlockApi, type BlockApiConfig, } from './system/runtime/api';
|
|
10
|
+
export { BlockApiProvider, useBlockApi, type BlockApiClient, type BlockApiConfig, } from './system/runtime/api';
|
|
11
11
|
export { clientComponentRegistry } from './system/runtime/components/registry.client';
|
|
12
12
|
export type { ComponentRegistry } from './system/runtime/resolver';
|
|
13
13
|
export type { BookingPaymentOptionViewModel, BookingPaymentSelectionViewModel, } from './system/runtime/shared/bookingPaymentOptions';
|
|
@@ -418,18 +418,22 @@ export declare const proofBlockIslandCodecs: {
|
|
|
418
418
|
} & Readonly<{
|
|
419
419
|
display: Readonly<{
|
|
420
420
|
kind: "newsletter-form";
|
|
421
|
+
availability: "ready" | "unavailable";
|
|
421
422
|
className: string | null;
|
|
422
423
|
buttonLabel: string;
|
|
423
424
|
buttonVariant: import("../system/runtime/nodes/newsletter-form.types").NewsletterButtonVariant;
|
|
424
|
-
successMessage: string | null;
|
|
425
425
|
privacyNote: string | null;
|
|
426
426
|
fields: readonly import("../system/runtime/nodes/newsletter-form.types").NewsletterFieldDef[];
|
|
427
|
+
choices: readonly Readonly<{
|
|
428
|
+
id: string;
|
|
429
|
+
label: string;
|
|
430
|
+
}>[];
|
|
427
431
|
}>;
|
|
428
432
|
hydration: Readonly<{
|
|
429
433
|
target: import("../system/runtime/nodes/newsletter-form.interactive").NewsletterFormHydrationTarget;
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
434
|
+
setupRevision: number | null;
|
|
435
|
+
choiceProvider: "native" | "brevo" | "mailchimp" | null;
|
|
436
|
+
choicePresentation: "hidden" | "automatic" | "visitor_choice";
|
|
433
437
|
spamProtectionEnabled?: boolean;
|
|
434
438
|
}>;
|
|
435
439
|
}>>;
|
|
@@ -444,18 +448,22 @@ export declare const proofBlockIslandCodecs: {
|
|
|
444
448
|
} & Readonly<{
|
|
445
449
|
display: Readonly<{
|
|
446
450
|
kind: "newsletter-form";
|
|
451
|
+
availability: "ready" | "unavailable";
|
|
447
452
|
className: string | null;
|
|
448
453
|
buttonLabel: string;
|
|
449
454
|
buttonVariant: import("../system/runtime/nodes/newsletter-form.types").NewsletterButtonVariant;
|
|
450
|
-
successMessage: string | null;
|
|
451
455
|
privacyNote: string | null;
|
|
452
456
|
fields: readonly import("../system/runtime/nodes/newsletter-form.types").NewsletterFieldDef[];
|
|
457
|
+
choices: readonly Readonly<{
|
|
458
|
+
id: string;
|
|
459
|
+
label: string;
|
|
460
|
+
}>[];
|
|
453
461
|
}>;
|
|
454
462
|
hydration: Readonly<{
|
|
455
463
|
target: import("../system/runtime/nodes/newsletter-form.interactive").NewsletterFormHydrationTarget;
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
464
|
+
setupRevision: number | null;
|
|
465
|
+
choiceProvider: "native" | "brevo" | "mailchimp" | null;
|
|
466
|
+
choicePresentation: "hidden" | "automatic" | "visitor_choice";
|
|
459
467
|
spamProtectionEnabled?: boolean;
|
|
460
468
|
}>;
|
|
461
469
|
}>>;
|
|
@@ -1340,18 +1348,22 @@ export declare const runtimeIslandCodecs: {
|
|
|
1340
1348
|
} & Readonly<{
|
|
1341
1349
|
display: Readonly<{
|
|
1342
1350
|
kind: "newsletter-form";
|
|
1351
|
+
availability: "ready" | "unavailable";
|
|
1343
1352
|
className: string | null;
|
|
1344
1353
|
buttonLabel: string;
|
|
1345
1354
|
buttonVariant: import("../system/runtime/nodes/newsletter-form.types").NewsletterButtonVariant;
|
|
1346
|
-
successMessage: string | null;
|
|
1347
1355
|
privacyNote: string | null;
|
|
1348
1356
|
fields: readonly import("../system/runtime/nodes/newsletter-form.types").NewsletterFieldDef[];
|
|
1357
|
+
choices: readonly Readonly<{
|
|
1358
|
+
id: string;
|
|
1359
|
+
label: string;
|
|
1360
|
+
}>[];
|
|
1349
1361
|
}>;
|
|
1350
1362
|
hydration: Readonly<{
|
|
1351
1363
|
target: import("../system/runtime/nodes/newsletter-form.interactive").NewsletterFormHydrationTarget;
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1364
|
+
setupRevision: number | null;
|
|
1365
|
+
choiceProvider: "native" | "brevo" | "mailchimp" | null;
|
|
1366
|
+
choicePresentation: "hidden" | "automatic" | "visitor_choice";
|
|
1355
1367
|
spamProtectionEnabled?: boolean;
|
|
1356
1368
|
}>;
|
|
1357
1369
|
}>>;
|
|
@@ -1366,18 +1378,22 @@ export declare const runtimeIslandCodecs: {
|
|
|
1366
1378
|
} & Readonly<{
|
|
1367
1379
|
display: Readonly<{
|
|
1368
1380
|
kind: "newsletter-form";
|
|
1381
|
+
availability: "ready" | "unavailable";
|
|
1369
1382
|
className: string | null;
|
|
1370
1383
|
buttonLabel: string;
|
|
1371
1384
|
buttonVariant: import("../system/runtime/nodes/newsletter-form.types").NewsletterButtonVariant;
|
|
1372
|
-
successMessage: string | null;
|
|
1373
1385
|
privacyNote: string | null;
|
|
1374
1386
|
fields: readonly import("../system/runtime/nodes/newsletter-form.types").NewsletterFieldDef[];
|
|
1387
|
+
choices: readonly Readonly<{
|
|
1388
|
+
id: string;
|
|
1389
|
+
label: string;
|
|
1390
|
+
}>[];
|
|
1375
1391
|
}>;
|
|
1376
1392
|
hydration: Readonly<{
|
|
1377
1393
|
target: import("../system/runtime/nodes/newsletter-form.interactive").NewsletterFormHydrationTarget;
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1394
|
+
setupRevision: number | null;
|
|
1395
|
+
choiceProvider: "native" | "brevo" | "mailchimp" | null;
|
|
1396
|
+
choicePresentation: "hidden" | "automatic" | "visitor_choice";
|
|
1381
1397
|
spamProtectionEnabled?: boolean;
|
|
1382
1398
|
}>;
|
|
1383
1399
|
}>>;
|
|
@@ -131,6 +131,8 @@ export type SdkConfigForRenderer = {
|
|
|
131
131
|
export type PageRendererDataContext = {
|
|
132
132
|
siteId?: string;
|
|
133
133
|
pageId?: string;
|
|
134
|
+
/** Canonical request pathname used by blocks when resolving same-site destinations. */
|
|
135
|
+
pathname?: string;
|
|
134
136
|
resolvedData?: Record<string, Record<string, unknown>>;
|
|
135
137
|
previewStage?: 'published' | 'preview';
|
|
136
138
|
previewToken?: string | null;
|
|
@@ -149,6 +151,8 @@ export type PageRendererDataContext = {
|
|
|
149
151
|
apiBaseUrl?: string;
|
|
150
152
|
portalToken?: string | null;
|
|
151
153
|
bookingOfferingPresets?: readonly BookingOfferingPresetSummary[];
|
|
154
|
+
mailingList?: import('../../core/src/index').MailingListRuntimeContext;
|
|
152
155
|
bookingTimeZone?: string;
|
|
153
156
|
eventRegistrationOverlayEnabled?: boolean;
|
|
154
157
|
};
|
|
158
|
+
export declare function buildPageRendererRootRuntime(dataContext: PageRendererDataContext | undefined): Readonly<Record<string, unknown>>;
|
|
@@ -8,24 +8,31 @@ export declare class MissingBlockOverrideError extends Error {
|
|
|
8
8
|
export type PageThemeResources = Readonly<{
|
|
9
9
|
kind: 'available';
|
|
10
10
|
tokens: ThemeTokens;
|
|
11
|
-
config
|
|
11
|
+
config?: Theme;
|
|
12
12
|
}> | Readonly<{
|
|
13
13
|
kind: 'unavailable';
|
|
14
14
|
}>;
|
|
15
|
-
type
|
|
15
|
+
export type ThemedRenderMode = Readonly<{
|
|
16
16
|
rendering?: never;
|
|
17
17
|
theme: Theme;
|
|
18
18
|
themeTokens?: ThemeTokens;
|
|
19
19
|
}>;
|
|
20
|
-
type
|
|
20
|
+
export type TokensOnlyRenderMode = Readonly<{
|
|
21
|
+
rendering: {
|
|
22
|
+
kind: 'tokens-only';
|
|
23
|
+
};
|
|
24
|
+
theme?: never;
|
|
25
|
+
themeTokens: ThemeTokens;
|
|
26
|
+
}>;
|
|
27
|
+
export type OverrideOnlyRenderMode = Readonly<{
|
|
21
28
|
rendering: {
|
|
22
29
|
kind: 'overrides-only';
|
|
23
30
|
};
|
|
24
31
|
theme?: never;
|
|
25
32
|
themeTokens?: never;
|
|
26
33
|
}>;
|
|
27
|
-
type
|
|
28
|
-
export declare function resolvePageThemeResources(props:
|
|
34
|
+
export type PublicRenderMode = ThemedRenderMode | TokensOnlyRenderMode | OverrideOnlyRenderMode;
|
|
35
|
+
export declare function resolvePageThemeResources(props: PublicRenderMode): PageThemeResources;
|
|
29
36
|
export declare function requireBlockOverride(resources: PageThemeResources, override: unknown, blockKind: string): void;
|
|
30
37
|
export declare function overrideThemeProps(resources: PageThemeResources): Readonly<{
|
|
31
38
|
theme?: ThemeTokens;
|
|
@@ -34,4 +41,3 @@ export declare function overrideThemeProps(resources: PageThemeResources): Reado
|
|
|
34
41
|
export declare function requireThemeResources(resources: PageThemeResources, blockKind: string): Extract<PageThemeResources, {
|
|
35
42
|
kind: 'available';
|
|
36
43
|
}>;
|
|
37
|
-
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SystemBlockDefinition } from '../registry';
|
|
2
|
+
import { type SectionStylesContent } from '../fields/boxStyles';
|
|
3
|
+
import type { BlockManifest } from '../manifest';
|
|
4
|
+
declare const appointmentServicesManifest: BlockManifest;
|
|
5
|
+
export type AppointmentServicesContent = Readonly<{
|
|
6
|
+
heading?: string | null;
|
|
7
|
+
description?: unknown;
|
|
8
|
+
_sectionStyles?: SectionStylesContent;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const appointmentServicesBlockDefinition: SystemBlockDefinition<AppointmentServicesContent>;
|
|
11
|
+
export { appointmentServicesManifest };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SystemBlockDefinition } from "../registry";
|
|
2
2
|
import type { SectionStylesContent } from "../fields/boxStyles";
|
|
3
3
|
import { type RichTextDoc } from "./form";
|
|
4
|
-
import type {
|
|
4
|
+
import type { MailingListPlacementTargeting } from '../../../../core/src/index';
|
|
5
5
|
export declare const contactNewsletterManifest: import("..").DefinedBlockManifest<import("..").BlockContentShapeInput<{
|
|
6
6
|
readonly id: "block.contact-newsletter";
|
|
7
7
|
readonly title: "Contact + Newsletter";
|
|
@@ -33,81 +33,58 @@ export declare const contactNewsletterManifest: import("..").DefinedBlockManifes
|
|
|
33
33
|
readonly type: "richText";
|
|
34
34
|
readonly label: "Newsletter intro";
|
|
35
35
|
}, {
|
|
36
|
-
readonly id: "
|
|
37
|
-
readonly type: "
|
|
38
|
-
readonly label: "
|
|
39
|
-
readonly description: "
|
|
36
|
+
readonly id: "targeting";
|
|
37
|
+
readonly type: "group";
|
|
38
|
+
readonly label: "Mailing-list targeting";
|
|
39
|
+
readonly description: "Choose what kind of emails people signing up here will receive.";
|
|
40
40
|
readonly required: true;
|
|
41
|
-
readonly
|
|
42
|
-
|
|
41
|
+
readonly defaultValue: {
|
|
42
|
+
readonly mode: "default";
|
|
43
|
+
};
|
|
43
44
|
readonly ui: {
|
|
44
45
|
readonly intent: "behavior";
|
|
46
|
+
readonly widget: "mailingListTargeting";
|
|
45
47
|
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
readonly schema: {
|
|
49
|
+
readonly fields: [{
|
|
50
|
+
readonly id: "mode";
|
|
51
|
+
readonly type: "select";
|
|
52
|
+
readonly label: "Mode";
|
|
53
|
+
readonly required: true;
|
|
54
|
+
readonly defaultValue: "default";
|
|
55
|
+
readonly options: [{
|
|
56
|
+
readonly value: "default";
|
|
57
|
+
readonly label: "Default";
|
|
58
|
+
}, {
|
|
59
|
+
readonly value: "custom";
|
|
60
|
+
readonly label: "Custom";
|
|
61
|
+
}];
|
|
62
|
+
readonly ui: {
|
|
63
|
+
readonly hidden: true;
|
|
64
|
+
};
|
|
65
|
+
}];
|
|
53
66
|
};
|
|
54
|
-
readonly options: [{
|
|
55
|
-
readonly value: "emailOnly";
|
|
56
|
-
readonly label: "Email only";
|
|
57
|
-
}, {
|
|
58
|
-
readonly value: "emailName";
|
|
59
|
-
readonly label: "Email + Name";
|
|
60
|
-
}, {
|
|
61
|
-
readonly value: "emailFirstLast";
|
|
62
|
-
readonly label: "Email + First/Last Name";
|
|
63
|
-
}, {
|
|
64
|
-
readonly value: "emailNameCompany";
|
|
65
|
-
readonly label: "Email + Name + Company (B2B)";
|
|
66
|
-
}];
|
|
67
67
|
}, {
|
|
68
|
-
readonly id: "
|
|
69
|
-
readonly type: "boolean";
|
|
70
|
-
readonly label: "Include phone field";
|
|
71
|
-
readonly defaultValue: false;
|
|
72
|
-
readonly ui: {
|
|
73
|
-
readonly intent: "display";
|
|
74
|
-
};
|
|
75
|
-
}, {
|
|
76
|
-
readonly id: "newsletterButtonLabel";
|
|
68
|
+
readonly id: "contactTitle";
|
|
77
69
|
readonly type: "text";
|
|
78
|
-
readonly label: "
|
|
79
|
-
readonly defaultValue: "
|
|
80
|
-
readonly ui: {
|
|
81
|
-
readonly intent: "display";
|
|
82
|
-
};
|
|
70
|
+
readonly label: "Contact title";
|
|
71
|
+
readonly defaultValue: "Get in touch";
|
|
83
72
|
}, {
|
|
84
|
-
readonly id: "
|
|
73
|
+
readonly id: "mailingListSource";
|
|
85
74
|
readonly type: "text";
|
|
86
|
-
readonly label: "
|
|
87
|
-
readonly defaultValue: "Thanks for subscribing!";
|
|
75
|
+
readonly label: "Mailing-list source";
|
|
88
76
|
readonly ui: {
|
|
77
|
+
readonly hidden: true;
|
|
89
78
|
readonly intent: "behavior";
|
|
90
79
|
};
|
|
91
80
|
}, {
|
|
92
|
-
readonly id: "
|
|
81
|
+
readonly id: "mailingListSourceToken";
|
|
93
82
|
readonly type: "text";
|
|
94
|
-
readonly label: "
|
|
95
|
-
readonly ui: {
|
|
96
|
-
readonly intent: "display";
|
|
97
|
-
};
|
|
98
|
-
}, {
|
|
99
|
-
readonly id: "newsletterTags";
|
|
100
|
-
readonly type: "text";
|
|
101
|
-
readonly label: "Newsletter tags";
|
|
102
|
-
readonly description: "Optional tags to apply on subscribe, separated by comma or semicolon.";
|
|
83
|
+
readonly label: "Mailing-list source token";
|
|
103
84
|
readonly ui: {
|
|
85
|
+
readonly hidden: true;
|
|
104
86
|
readonly intent: "behavior";
|
|
105
87
|
};
|
|
106
|
-
}, {
|
|
107
|
-
readonly id: "contactTitle";
|
|
108
|
-
readonly type: "text";
|
|
109
|
-
readonly label: "Contact title";
|
|
110
|
-
readonly defaultValue: "Get in touch";
|
|
111
88
|
}, {
|
|
112
89
|
readonly id: "contactIntro";
|
|
113
90
|
readonly type: "richText";
|
|
@@ -157,13 +134,9 @@ export declare const contactNewsletterManifest: import("..").DefinedBlockManifes
|
|
|
157
134
|
export type ContactNewsletterContent = {
|
|
158
135
|
newsletterTitle?: string | null;
|
|
159
136
|
newsletterSubtitle?: RichTextDoc | null;
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
newsletterButtonLabel?: string | null;
|
|
164
|
-
newsletterSuccessMessage?: string | null;
|
|
165
|
-
newsletterPrivacyNote?: string | null;
|
|
166
|
-
newsletterTags?: string | null;
|
|
137
|
+
targeting: MailingListPlacementTargeting;
|
|
138
|
+
mailingListSource?: 'signed-footer' | null;
|
|
139
|
+
mailingListSourceToken?: string | null;
|
|
167
140
|
contactTitle?: string | null;
|
|
168
141
|
contactIntro?: RichTextDoc | null;
|
|
169
142
|
formSlug: string;
|