@riverbankcms/sdk 0.139.0 → 0.140.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{PreviewEditorSidebar-BDeenhi3.mjs → PreviewEditorSidebar-CUyTzd5z.mjs} +4 -4
- package/dist/{PreviewEditorUI-DSRhgjF5.mjs → PreviewEditorUI-Agkw4v5i.mjs} +3 -3
- package/dist/{PreviewQueryProvider-D2K8GLUG.mjs → PreviewQueryProvider-CN0ewic5.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-CL7wSnYu.mjs → SdkPreviewModeRuntime-DdbeAdS8.mjs} +22 -8
- package/dist/{SiteChromeCustomizeContext-BhDn-5ir.mjs → SiteChromeCustomizeContext-CqGOz-Kv.mjs} +2053 -1110
- package/dist/_dts/ai/src/contracts/proposals.d.ts +165 -165
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +212 -212
- package/dist/_dts/api/src/accessAdmin.d.ts +74 -104
- package/dist/_dts/api/src/aiEndpoints.d.ts +5 -1
- package/dist/_dts/api/src/authSubmission.d.ts +46 -0
- package/dist/_dts/api/src/billing.d.ts +8 -4
- package/dist/_dts/api/src/billingEndpointDefinitions.d.ts +23 -0
- package/dist/_dts/api/src/billingEndpointTypes.d.ts +26 -0
- package/dist/_dts/api/src/blocks.d.ts +2 -0
- package/dist/_dts/api/src/bookingRecords.d.ts +1 -2
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +8 -1
- package/dist/_dts/api/src/communications.d.ts +0 -1
- package/dist/_dts/api/src/contentRuntime.d.ts +8 -3
- package/dist/_dts/api/src/endpoints.d.ts +93 -64
- package/dist/_dts/api/src/event-destination-policy.d.ts +2 -1
- package/dist/_dts/api/src/footerSettings.d.ts +9 -6
- package/dist/_dts/api/src/index.d.ts +5 -6
- package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -1
- package/dist/_dts/api/src/indexExtendedTypes.d.ts +1 -1
- package/dist/_dts/api/src/mailingListIntegration.d.ts +8 -2
- package/dist/_dts/api/src/navigation/dashboardSettingsNav.d.ts +1 -1
- package/dist/_dts/api/src/navigation/types.d.ts +1 -1
- package/dist/_dts/api/src/onboarding/confirmationResend.d.ts +25 -0
- package/dist/_dts/api/src/onboarding/surfaceData.d.ts +32 -32
- package/dist/_dts/api/src/publicBookingAvailabilityEndpointDefinitions.d.ts +8 -0
- package/dist/_dts/api/src/publicExperience/commerceEndpoints.d.ts +1 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +11 -3
- package/dist/_dts/api/src/publicExperience/sharedTypes.d.ts +3 -29
- package/dist/_dts/api/src/publicOnboardingAttemptEndpointDefinitions.d.ts +65 -0
- package/dist/_dts/api/src/saveOutcome.d.ts +20 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +3 -22
- package/dist/_dts/api/src/sdkPushContracts.d.ts +18 -0
- package/dist/_dts/api/src/sdkThemeWire.d.ts +44 -44
- package/dist/_dts/api/src/settings/permissions.d.ts +12 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +9 -5
- package/dist/_dts/api/src/siteOnboarding.d.ts +2 -9
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +2 -4
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +3 -1
- package/dist/_dts/api/src/siteSettings.d.ts +20 -7
- package/dist/_dts/api/src/types.d.ts +77 -77
- package/dist/_dts/api/src/wholeSeriesRuns.d.ts +2 -37
- package/dist/_dts/billing/src/membership/index.d.ts +3 -0
- package/dist/_dts/billing/src/plans/types.d.ts +3 -0
- package/dist/_dts/billing/src/site-arrangements.d.ts +14 -3
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +16 -4
- package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +2 -0
- package/dist/_dts/blocks/src/pageRendererContracts.d.ts +5 -0
- package/dist/_dts/blocks/src/portal/types.d.ts +2 -4
- package/dist/_dts/blocks/src/portal/waitlist-types.d.ts +35 -0
- package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +42 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +4 -0
- package/dist/_dts/blocks/src/system/data/index.d.ts +2 -2
- package/dist/_dts/blocks/src/system/data/prefetchBlockData.d.ts +2 -1
- package/dist/_dts/blocks/src/system/data/types.d.ts +9 -0
- package/dist/_dts/blocks/src/system/registry.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +0 -28
- package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +7 -3
- package/dist/_dts/blocks/src/system/runtime/api/types/portal.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/waitlist-claims.d.ts +7 -2
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +30 -6
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +15 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/appointment-services.d.ts +43 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationSurface.d.ts +1 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/TicketSelectionStep.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/checkoutRecovery.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventSourceRecovery.d.ts +56 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +6 -8
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useCheckoutRecovery.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +8 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +10 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventSourceRecovery.d.ts +18 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.client.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +24 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.server.d.ts +4 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.interactive.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/resolver.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +2 -6
- package/dist/_dts/blocks/src/system/runtime/shared/index.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.d.ts +2 -0
- package/dist/_dts/commerce/src/purchase/event-registration-errors.d.ts +4 -0
- package/dist/_dts/commerce/src/purchase/orderItemMetadata.d.ts +27 -4
- package/dist/_dts/content-editor/src/controller/EntryControllerProvider.d.ts +2 -1
- package/dist/_dts/content-editor/src/hooks/useBlockAutosave.d.ts +3 -1
- package/dist/_dts/content-editor/src/useFooterComposerState.d.ts +3 -0
- package/dist/_dts/core/src/branded.d.ts +0 -8
- package/dist/_dts/core/src/index.d.ts +1 -0
- package/dist/_dts/core/src/mailing-list-setup-parser.d.ts +1 -1
- package/dist/_dts/core/src/mailing-list-setup.d.ts +14 -1
- package/dist/_dts/core/src/mailing-list-submission.d.ts +7 -27
- package/dist/_dts/core/src/participants.d.ts +2 -29
- package/dist/_dts/core/src/public-experience.d.ts +4 -0
- package/dist/_dts/core/src/public-profile.d.ts +27 -1
- package/dist/_dts/core/src/site-route-target.d.ts +9 -2
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +293 -606
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/MailingListGlobalSettingsSummary.d.ts +10 -0
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/MailingListTargetingField.d.ts +3 -2
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/context.d.ts +3 -2
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/loaders.d.ts +3 -2
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/targetingState.d.ts +19 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +14 -20
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +7 -1
- package/dist/_dts/sdk/src/rendering/helpers/templateContent.d.ts +1 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/accordions/types.d.ts +3 -3
- package/dist/_dts/theme-core/src/cards/types.d.ts +21 -21
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/header/interactionPalette.d.ts +8 -2
- package/dist/_dts/theme-core/src/header/legacyHeaderVariant.d.ts +2 -2
- package/dist/_dts/theme-core/src/inputs/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +54 -54
- package/dist/_dts/theme-core/src/runtime/buildThemeRuntimeFromBridge.d.ts +1 -4
- package/dist/_dts/theme-core/src/schema.d.ts +84 -84
- package/dist/_dts/theme-core/src/shared/componentStyles.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/backgroundAppearance.d.ts +2 -2
- package/dist/_dts/theme-core/src/surfaces/foregroundInteraction.d.ts +77 -0
- package/dist/_dts/theme-core/src/surfaces/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/typography/generateTypographyCss.d.ts +2 -2
- package/dist/_dts/ui/src/lib/use-delayed-flag.d.ts +9 -0
- package/dist/_dts/ui/src/pending-button.d.ts +10 -0
- package/dist/client/{BookingConsentAgreement-CZvTDtsK.mjs → BookingConsentAgreement-CuKa82V4.mjs} +4 -4
- package/dist/client/{DiscountCodeDisclosure-D-DsLCMU.mjs → DiscountCodeDisclosure-BbYieKWB.mjs} +1 -1
- package/dist/client/{EventCombined.client-dWqgd5ZO.mjs → EventCombined.client-LTfR1Aby.mjs} +6 -6
- package/dist/client/{EventListing.client-BMRa9IYp.mjs → EventListing.client-DUHpYSuo.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-D21W9kBZ.mjs → LeafletStaticMap-CHRupL6m.mjs} +1 -1
- package/dist/client/{accordion-FxF_ta47.mjs → accordion-6HiIFxNL.mjs} +1 -1
- package/dist/client/{bookingForm-YnwW4TGw.mjs → bookingForm-Dlmid43H.mjs} +7 -7
- package/dist/client/bookings.mjs +325 -140
- package/dist/client/{carousel-vng7fFT5.mjs → carousel-DmkZRRq_.mjs} +2 -2
- package/dist/client/{carousel.client-59G_WMr4.mjs → carousel.client-DQTjCVQT.mjs} +1 -1
- package/dist/client/{cart-DEPDsjNk.mjs → cart-CIC24330.mjs} +3 -3
- package/dist/client/{checkout-CZRWu9rW.mjs → checkout-D1Zw9imo.mjs} +3 -3
- package/dist/client/{checkoutUrls-BuseL0dw.mjs → checkoutUrls-FL6lRkrt.mjs} +1 -1
- package/dist/client/client.mjs +1717 -882
- package/dist/client/{colorStyles-CrxJrPjJ.mjs → colorStyles-3013aRAY.mjs} +3 -1
- package/dist/client/{context-DvU_WUmd.mjs → context-Cy1OayHx.mjs} +6 -19
- package/dist/client/{dates-wnPMiRl5.mjs → dates-aDcfoLHr.mjs} +2 -2
- package/dist/client/{eventCalendar-BA3Q5L15.mjs → eventCalendar-FQxMPAjf.mjs} +8 -8
- package/dist/client/{eventCombined-51wgR-1R.mjs → eventCombined-Dr3ac6Hb.mjs} +3 -3
- package/dist/client/{eventDetails-modaetpm.mjs → eventDetails-D-AzUHFQ.mjs} +4 -4
- package/dist/client/{eventListing-D8t2J3Kv.mjs → eventListing-B3XxBf3i.mjs} +3 -3
- package/dist/client/{eventRegistration-CYqtkCE_.mjs → eventRegistration-I6EaokFD.mjs} +500 -152
- package/dist/client/{form-CBKXN5In.mjs → form-BbWckVWY.mjs} +3 -3
- package/dist/client/{headerSection-DylDqNrs.mjs → headerSection-C9qU4Y7x.mjs} +2 -2
- package/dist/client/hooks.mjs +445 -180
- package/dist/client/{locationMap-CvWrG0vZ.mjs → locationMap-CLCShvlG.mjs} +3 -3
- package/dist/client/{media-BOHuueS5.mjs → media-DHpfFwd3.mjs} +1 -1
- package/dist/client/{newsletterForm-Btwk70zw.mjs → newsletterForm-Briukxzi.mjs} +130 -87
- package/dist/client/{pricing-Uzw-GQ6Y.mjs → pricing-Copadu-2.mjs} +1 -1
- package/dist/client/{productDetail-JLcUYKnd.mjs → productDetail-oujlRd-r.mjs} +3 -3
- package/dist/client/{productList-FM0cbUzj.mjs → productList-BRiIRUcd.mjs} +3 -3
- package/dist/client/{propsDecoder-DYzafZb2.mjs → propsDecoder-CB2KS_ko.mjs} +130 -24
- package/dist/client/rendering/client.mjs +911 -400
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +1696 -818
- package/dist/client/{scrollToBlock-CvXszexS.mjs → scrollToBlock-B1IS1_ua.mjs} +1 -1
- package/dist/client/{shop-BIcjvy5a.mjs → shop-Vn6yNFED.mjs} +6 -6
- package/dist/client/{shop-commerce-BZQsy7xw.mjs → shop-commerce-BVTqipYp.mjs} +7 -7
- package/dist/client/{shop-commerce-store-D5V7XAb5.mjs → shop-commerce-store-BVnJVy7v.mjs} +1 -1
- package/dist/client/{shopShared-DowkXevB.mjs → shopShared-COIeK77T.mjs} +4 -4
- package/dist/client/{useEventFilters-oMoTw_JE.mjs → useEventFilters-DzIUcS9n.mjs} +7 -7
- package/dist/preview-next/before-render.mjs +119 -64
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/keepAlive.mjs +119 -64
- package/dist/preview-next/middleware.mjs +119 -64
- package/dist/{previewAuthStore-COUyAKaX.mjs → previewAuthStore-Gjb6r6vz.mjs} +119 -64
- package/dist/{sdk-runtime-D4k2LSGF.mjs → sdk-runtime-CnCLvZRv.mjs} +2 -2
- package/dist/{separator-UGtpag4Z.mjs → separator-DKDRJ1oH.mjs} +1 -1
- package/dist/server/components.mjs +787 -323
- package/dist/server/config-validation.mjs +328 -79
- package/dist/server/config.mjs +332 -83
- package/dist/server/data.mjs +441 -180
- package/dist/server/index.mjs +126 -66
- package/dist/server/next.mjs +1031 -595
- package/dist/server/page-converter.mjs +183 -74
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1068 -592
- package/dist/server/rendering.mjs +802 -324
- package/dist/server/routing.mjs +506 -214
- package/dist/server/server.mjs +468 -244
- package/dist/server/theme-bridge.mjs +433 -100
- package/dist/server/theme.mjs +8 -2
- package/dist/styles/index.css +237 -43
- package/package.json +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/BookingOptionCompactRow.d.ts +0 -29
- package/dist/_dts/blocks/src/system/runtime/shared/components/BookingOptionList.d.ts +0 -13
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AppointmentId, type AttendeeId, type Brand, type CustomerId, type EventSeriesRegistrationId, type
|
|
1
|
+
import { type AppointmentId, type AttendeeId, type Brand, type CustomerId, type EventSeriesRegistrationId, type ParticipantId } from './branded';
|
|
2
2
|
import { type Result } from './result';
|
|
3
3
|
export type ParticipantEmail = Brand<string, 'ParticipantEmail'>;
|
|
4
4
|
export type ParticipantSlotKey = Brand<string, 'ParticipantSlotKey'>;
|
|
@@ -14,26 +14,6 @@ export type ParticipantCountParseError = {
|
|
|
14
14
|
} | {
|
|
15
15
|
kind: 'non_positive_participant_count';
|
|
16
16
|
};
|
|
17
|
-
export type ProvisionalParticipantIdentity = Readonly<{
|
|
18
|
-
kind: 'event_guest';
|
|
19
|
-
eventAttendeeGuestId: EventAttendeeGuestId;
|
|
20
|
-
slotKey: ParticipantSlotKey;
|
|
21
|
-
}>;
|
|
22
|
-
export type ProvisionalParticipantIdentityMetadata = Readonly<{
|
|
23
|
-
kind: 'event_guest';
|
|
24
|
-
source: 'event_guest_backfill';
|
|
25
|
-
eventAttendeeGuestId: EventAttendeeGuestId;
|
|
26
|
-
slotKey: ParticipantSlotKey;
|
|
27
|
-
}>;
|
|
28
|
-
export type ProvisionalParticipantIdentityParseError = {
|
|
29
|
-
kind: 'not_an_object';
|
|
30
|
-
} | {
|
|
31
|
-
kind: 'unsupported_identity_kind';
|
|
32
|
-
} | {
|
|
33
|
-
kind: 'missing_event_attendee_guest_id';
|
|
34
|
-
} | {
|
|
35
|
-
kind: 'missing_slot_key';
|
|
36
|
-
};
|
|
37
17
|
export declare function unsafeAsParticipantSlotKey(value: string): ParticipantSlotKey;
|
|
38
18
|
export declare function unsafeAsParticipantCount(value: number): ParticipantCount;
|
|
39
19
|
/**
|
|
@@ -45,12 +25,6 @@ export declare function unsafeAsParticipantCount(value: number): ParticipantCoun
|
|
|
45
25
|
export declare function normalizeParticipantEmail(value: string | null | undefined): ParticipantEmail | null;
|
|
46
26
|
export declare function parseParticipantEmail(value: string | null | undefined): Result<ParticipantEmail, ParticipantEmailNormalizationError>;
|
|
47
27
|
export declare function parseParticipantCount(value: number): Result<ParticipantCount, ParticipantCountParseError>;
|
|
48
|
-
export declare function provisionalEventGuestParticipantIdentity(input: Readonly<{
|
|
49
|
-
eventAttendeeGuestId: EventAttendeeGuestId;
|
|
50
|
-
slotKey: ParticipantSlotKey;
|
|
51
|
-
}>): ProvisionalParticipantIdentity;
|
|
52
|
-
export declare function encodeProvisionalParticipantIdentity(identity: ProvisionalParticipantIdentity): ProvisionalParticipantIdentityMetadata;
|
|
53
|
-
export declare function parseProvisionalParticipantIdentity(value: unknown): Result<ProvisionalParticipantIdentity, ProvisionalParticipantIdentityParseError>;
|
|
54
28
|
export declare function deriveParticipantDisplayLabel(input: Readonly<{
|
|
55
29
|
displayName: string | null;
|
|
56
30
|
emailNormalized: ParticipantEmail | null;
|
|
@@ -100,7 +74,7 @@ export type ParticipantParticipation = {
|
|
|
100
74
|
} | {
|
|
101
75
|
kind: 'event_guest';
|
|
102
76
|
attendeeId: AttendeeId;
|
|
103
|
-
|
|
77
|
+
guestIndex: number;
|
|
104
78
|
} | {
|
|
105
79
|
kind: 'event_series_registration';
|
|
106
80
|
registrationId: EventSeriesRegistrationId;
|
|
@@ -177,7 +151,6 @@ export type EventRegistrationParticipantProjectionInput = Readonly<{
|
|
|
177
151
|
customerId: CustomerId;
|
|
178
152
|
};
|
|
179
153
|
guests: readonly (ParticipantContactInput & {
|
|
180
|
-
guestId: EventAttendeeGuestId;
|
|
181
154
|
guestIndex: number;
|
|
182
155
|
})[];
|
|
183
156
|
}>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const PUBLIC_EXPERIENCES: readonly ["website", "hosted_booking"];
|
|
2
|
+
export type PublicExperience = (typeof PUBLIC_EXPERIENCES)[number];
|
|
3
|
+
export declare function isPublicExperience(value: unknown): value is PublicExperience;
|
|
4
|
+
export declare function parsePublicExperience(value: unknown): PublicExperience | null;
|
|
@@ -62,14 +62,35 @@ export type PublicSocialLink = Readonly<{
|
|
|
62
62
|
* `shown`.
|
|
63
63
|
*/
|
|
64
64
|
export type PublicAddressVisibility = 'shown' | 'hidden';
|
|
65
|
+
/**
|
|
66
|
+
* Whether each contact method is published on the site. Both default to shown,
|
|
67
|
+
* because that is what a saved contact has always meant. A hidden email can
|
|
68
|
+
* still be the privacy policy's contact: hiding it withholds it from the page,
|
|
69
|
+
* not from the policy.
|
|
70
|
+
*/
|
|
71
|
+
export type PublicContactVisibility = Readonly<{
|
|
72
|
+
phone: PublicAddressVisibility;
|
|
73
|
+
email: PublicAddressVisibility;
|
|
74
|
+
}>;
|
|
65
75
|
export type PublicProfile = Readonly<{
|
|
66
76
|
contact: PublicContactDetails | null;
|
|
77
|
+
contactVisibility: PublicContactVisibility;
|
|
67
78
|
openingHours: WeeklyOpeningHours | null;
|
|
68
79
|
socialLinks: readonly PublicSocialLink[];
|
|
69
80
|
addressVisibility: PublicAddressVisibility;
|
|
81
|
+
/**
|
|
82
|
+
* Whether the business runs from a place people come to, which is what the
|
|
83
|
+
* address and opening hours belong to.
|
|
84
|
+
*
|
|
85
|
+
* Null means nobody has answered yet, and it stays null rather than
|
|
86
|
+
* defaulting to false: a site that already has a saved address plainly has
|
|
87
|
+
* premises, and only the caller holding that address can say so. Resolve it
|
|
88
|
+
* with `resolvePublicProfilePremises`.
|
|
89
|
+
*/
|
|
90
|
+
premises: boolean | null;
|
|
70
91
|
}>;
|
|
71
92
|
export type PublicProfileParseError = Readonly<{
|
|
72
|
-
code: 'invalid_shape' | 'contact_method_required' | 'invalid_email' | 'invalid_phone' | 'invalid_timezone' | 'invalid_weekdays' | 'invalid_time' | 'invalid_interval' | 'overlapping_intervals' | 'invalid_social_link' | 'invalid_address_visibility' | 'duplicate_social_link_id';
|
|
93
|
+
code: 'invalid_shape' | 'contact_method_required' | 'invalid_email' | 'invalid_phone' | 'invalid_timezone' | 'invalid_weekdays' | 'invalid_time' | 'invalid_interval' | 'overlapping_intervals' | 'invalid_social_link' | 'invalid_address_visibility' | 'invalid_contact_visibility' | 'invalid_premises' | 'duplicate_social_link_id';
|
|
73
94
|
path: string;
|
|
74
95
|
message: string;
|
|
75
96
|
}>;
|
|
@@ -78,4 +99,9 @@ export declare function parsePublicProfileTimeZone(value: unknown): Result<Publi
|
|
|
78
99
|
export declare function parseWeeklyOpeningHours(value: unknown): Result<WeeklyOpeningHours, PublicProfileParseError>;
|
|
79
100
|
export declare function parsePublicSocialLinks(value: unknown): Result<readonly PublicSocialLink[], PublicProfileParseError>;
|
|
80
101
|
export declare function parsePublicProfile(value: unknown): Result<PublicProfile, PublicProfileParseError>;
|
|
102
|
+
/**
|
|
103
|
+
* Resolves whether a site has premises, falling back to whether it already
|
|
104
|
+
* holds a business address for every profile saved before the switch existed.
|
|
105
|
+
*/
|
|
106
|
+
export declare function resolvePublicProfilePremises(profile: PublicProfile, hasBusinessAddress: boolean): boolean;
|
|
81
107
|
export declare function emptyPublicProfile(): PublicProfile;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type BrandedIdParseError, type ContentEntryId, type PageId, type PageSurfaceId } from './branded';
|
|
1
|
+
import { type BrandedIdParseError, type ContentEntryId, type AppointmentServiceId, type PageId, type PageSurfaceId } from './branded';
|
|
2
2
|
import { type Result } from './result';
|
|
3
|
-
export declare const SITE_ROUTE_NODE_TYPES: readonly ["page", "content_entry", "page_surface"];
|
|
3
|
+
export declare const SITE_ROUTE_NODE_TYPES: readonly ["page", "content_entry", "page_surface", "appointment_service"];
|
|
4
4
|
export type SiteRouteNodeType = (typeof SITE_ROUTE_NODE_TYPES)[number];
|
|
5
5
|
export type SiteRouteTarget = Readonly<{
|
|
6
6
|
kind: 'page';
|
|
@@ -11,6 +11,9 @@ export type SiteRouteTarget = Readonly<{
|
|
|
11
11
|
}> | Readonly<{
|
|
12
12
|
kind: 'pageSurface';
|
|
13
13
|
surfaceId: PageSurfaceId;
|
|
14
|
+
}> | Readonly<{
|
|
15
|
+
kind: 'appointmentService';
|
|
16
|
+
serviceId: AppointmentServiceId;
|
|
14
17
|
}>;
|
|
15
18
|
export type SiteRouteTargetParseError = Readonly<{
|
|
16
19
|
kind: 'invalid-node-type';
|
|
@@ -27,6 +30,9 @@ export type SiteRouteTargetParseError = Readonly<{
|
|
|
27
30
|
}> | Readonly<{
|
|
28
31
|
kind: 'invalid-page-surface-id';
|
|
29
32
|
error: BrandedIdParseError;
|
|
33
|
+
}> | Readonly<{
|
|
34
|
+
kind: 'invalid-appointment-service-id';
|
|
35
|
+
error: BrandedIdParseError;
|
|
30
36
|
}>;
|
|
31
37
|
export declare function parseSiteRouteTarget(input: Readonly<{
|
|
32
38
|
nodeType: unknown;
|
|
@@ -37,4 +43,5 @@ export declare function foldSiteRouteTarget<TValue>(target: SiteRouteTarget, cas
|
|
|
37
43
|
page: (pageId: PageId) => TValue;
|
|
38
44
|
contentEntry: (entryId: ContentEntryId) => TValue;
|
|
39
45
|
pageSurface: (surfaceId: PageSurfaceId) => TValue;
|
|
46
|
+
appointmentService: (serviceId: AppointmentServiceId) => TValue;
|
|
40
47
|
}>): TValue;
|