@riverbankcms/sdk 0.146.0 → 0.147.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/CHANGELOG.md +12 -0
- package/dist/{PreviewEditorSidebar-kg2r2Fyi.mjs → PreviewEditorSidebar-DtpB3_sS.mjs} +51 -33
- package/dist/{PreviewEditorUI-sWMLp5dT.mjs → PreviewEditorUI-DxTLgaHo.mjs} +3 -3
- package/dist/{PreviewQueryProvider-Cg51xq1w.mjs → PreviewQueryProvider-Dd4dxOiU.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-h2ti3Hch.mjs → SdkPreviewModeRuntime-DMMNCngt.mjs} +39 -12
- package/dist/{SiteChromeCustomizeContext-DEACFH9m.mjs → SiteChromeCustomizeContext-DQXZXiqS.mjs} +2499 -1682
- package/dist/_dts/ai/src/contracts/proposals.d.ts +198 -0
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +18 -0
- package/dist/_dts/api/src/accountApi.d.ts +5 -5
- package/dist/_dts/api/src/bookingConfig.d.ts +16 -0
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +4 -13
- package/dist/_dts/api/src/bookingOperations.d.ts +2 -44
- package/dist/_dts/api/src/bookingPeople.d.ts +92 -0
- package/dist/_dts/api/src/bookingPeopleEndpointDefinitions.d.ts +38 -0
- package/dist/_dts/api/src/bookingRecords.d.ts +11 -49
- package/dist/_dts/api/src/bookingSettingsSections.d.ts +1 -1
- package/dist/_dts/api/src/bookings.d.ts +1 -0
- package/dist/_dts/api/src/endpoints.d.ts +587 -561
- package/dist/_dts/api/src/eventManagementContracts.d.ts +23 -8
- package/dist/_dts/api/src/eventManagementEndpointDefinitions.d.ts +1 -1
- package/dist/_dts/api/src/index.d.ts +3 -2
- package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -1
- package/dist/_dts/api/src/launchReadiness.d.ts +1 -6
- package/dist/_dts/api/src/mailingListIntegration.d.ts +6 -0
- package/dist/_dts/api/src/navigation/dashboardBookingsNav.d.ts +1 -1
- package/dist/_dts/api/src/newsletterEndpointDefinitions.d.ts +15 -0
- package/dist/_dts/api/src/occurrenceScheduling.d.ts +19 -0
- package/dist/_dts/api/src/publicAppointmentBookingContracts.d.ts +48 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +7 -0
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +15 -0
- package/dist/_dts/api/src/sdkCourseBooking.d.ts +4 -4
- package/dist/_dts/api/src/siteLifecycleEndpoints.d.ts +61 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +5 -18
- package/dist/_dts/api/src/siteOnboarding.d.ts +2 -14
- package/dist/_dts/blocks/src/PageRenderer.d.ts +3 -4
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +8 -0
- package/dist/_dts/blocks/src/index.d.ts +1 -1
- package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +22 -4
- package/dist/_dts/blocks/src/pageRendererContracts.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +4 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/appointments.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +12 -0
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +12 -0
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessEventRegistrationFlow.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.completion.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.interactive.d.ts +19 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.mailing-list-choice.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.mailing-list-note.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.mailing-list-state.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.reserved-fields.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.submit-handler.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.submit-success.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-runtime-sources.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/AttendeeDetailsStep.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/SuccessStep.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/sessionStorage.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.block-submission.d.ts +2 -4
- package/dist/_dts/blocks/src/system/runtime/resolver.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/BookingMailingListNote.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/shared/mailingListSignupCopy.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/shared/types.d.ts +1 -0
- package/dist/_dts/blocks/src/system/transforms/registry/_utils/surfaceForegroundStyles.d.ts +3 -2
- package/dist/_dts/blocks/src/system/transforms/registry/core.d.ts +2 -0
- package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +1 -3
- package/dist/_dts/core/src/index.d.ts +1 -1
- package/dist/_dts/core/src/mailing-list-runtime.d.ts +15 -0
- package/dist/_dts/core/src/mailing-list-setup.d.ts +2 -0
- package/dist/_dts/core/src/mailing-list-submission.d.ts +6 -0
- package/dist/_dts/core/src/navigation-portal-labels.d.ts +9 -0
- package/dist/_dts/core/src/participants.d.ts +0 -38
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +102 -22
- package/dist/_dts/editor-blocks/src/block-editor/actionPresentation.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/blocks/EditablePageRenderer.d.ts +7 -1
- package/dist/_dts/preview-next/src/client/blocks/composer/types.d.ts +4 -3
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +2 -2
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/effects/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/footer/effectiveNavLinkStyle.d.ts +13 -0
- package/dist/_dts/theme-core/src/footer/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/header/effectiveNavLinkStyle.d.ts +17 -0
- package/dist/_dts/theme-core/src/header/generateHeaderLogoStyles.d.ts +15 -0
- package/dist/_dts/theme-core/src/header/generateHeaderNavLinkStyles.d.ts +4 -0
- package/dist/_dts/theme-core/src/header/index.d.ts +3 -0
- package/dist/_dts/theme-core/src/header/legacyNavLinkStyle.d.ts +1 -1
- package/dist/_dts/theme-core/src/header/openingForegroundProjection.d.ts +7 -0
- package/dist/_dts/theme-core/src/header/rootPaint.d.ts +4 -0
- package/dist/_dts/theme-core/src/navigation/effectPolicy.d.ts +38 -0
- package/dist/_dts/theme-core/src/navigation/generateNavLinkCSS.d.ts +4 -0
- package/dist/_dts/theme-core/src/navigation/types.d.ts +4 -0
- package/dist/_dts/theme-core/src/site-styles/accessibleSurfaces.d.ts +1 -1
- package/dist/_dts/theme-core/src/surfaces/foregroundContract.d.ts +7 -0
- package/dist/_dts/theme-core/src/surfaces/foregroundInteraction.d.ts +29 -22
- package/dist/_dts/theme-core/src/surfaces/foregroundRoles.d.ts +10 -2
- package/dist/_dts/theme-core/src/surfaces/resolveSurfaceForeground.d.ts +9 -0
- package/dist/_dts/theme-core/src/utils/cssDeclarations.d.ts +2 -0
- package/dist/_dts/ui/src/badge.d.ts +2 -1
- package/dist/_dts/ui/src/button.d.ts +1 -1
- package/dist/_dts/ui/src/combobox-keys.d.ts +23 -0
- package/dist/_dts/ui/src/combobox-rows.d.ts +34 -0
- package/dist/_dts/ui/src/combobox.d.ts +26 -1
- package/dist/_dts/ui/src/date-picker.d.ts +5 -8
- package/dist/_dts/ui/src/editor-item-card.d.ts +1 -0
- package/dist/_dts/ui/src/field-trigger.d.ts +39 -0
- package/dist/_dts/ui/src/fieldControl.d.ts +27 -0
- package/dist/_dts/ui/src/index.d.ts +4 -1
- package/dist/_dts/ui/src/native-select.d.ts +8 -0
- package/dist/_dts/ui/src/popover.d.ts +7 -1
- package/dist/_dts/ui/src/segmented-control.d.ts +4 -0
- package/dist/_dts/ui/src/surface.d.ts +1 -1
- package/dist/client/{BookingConsentAgreement-BQKL045f.mjs → BookingMailingListNote-1n4Ch_u_.mjs} +15 -4
- package/dist/client/{CheckboxChoice--W2n6yKs.mjs → CheckboxChoice-B33MqoUo.mjs} +1 -1
- package/dist/client/{DiscountCodeDisclosure-CsOtjFY7.mjs → DiscountCodeDisclosure-CKJtz0mY.mjs} +1 -1
- package/dist/client/{EventCombined.client-BdRjVbhH.mjs → EventCombined.client-C0pgma9y.mjs} +7 -7
- package/dist/client/{EventListing.client-DBxC6xOU.mjs → EventListing.client-4fhLOvHP.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-mHEJKrTs.mjs → LeafletStaticMap-DScC4F3w.mjs} +1 -1
- package/dist/client/{scrollToBlock-BNgaEUpo.mjs → TerminalPanel-B5ZUsYhe.mjs} +77 -77
- package/dist/client/{ThemedButton-CE5KYT6z.mjs → ThemedButton-DoVIV1Ao.mjs} +2 -2
- package/dist/client/{accordion-BEQNSptH.mjs → accordion-CoT5g7zo.mjs} +1 -1
- package/dist/client/{bookingForm-AMr-s5vw.mjs → bookingForm-BWxB46xD.mjs} +226 -106
- package/dist/client/bookings.mjs +367 -188
- package/dist/client/{carousel-Bbt_QgJy.mjs → carousel-DtNYWFd3.mjs} +2 -2
- package/dist/client/{carousel.client-jahpU9Vz.mjs → carousel.client-A2lG-9od.mjs} +1 -1
- package/dist/client/{cart-CnWi30zJ.mjs → cart-z4qZih1Y.mjs} +3 -3
- package/dist/client/{checkout-f3nkWgd4.mjs → checkout-DpL7euFH.mjs} +3 -3
- package/dist/client/{checkoutUrls-CW3-78uu.mjs → checkoutUrls-BEfR7kVu.mjs} +1 -1
- package/dist/client/client.mjs +2125 -1420
- package/dist/client/{colorStyles-CuJBiS-1.mjs → colorStyles-j5U9v5JA.mjs} +5 -1
- package/dist/client/{context-Bc8T6pCe.mjs → context-C8TinPJc.mjs} +1 -1
- package/dist/client/{dates-DUsCEzLb.mjs → dates-vwwxTeB0.mjs} +2 -2
- package/dist/client/{eventCalendar-CKwgXui5.mjs → eventCalendar-DIbHfJXO.mjs} +10 -10
- package/dist/client/{eventCombined-CBAOSTGR.mjs → eventCombined-DoGMJ6cg.mjs} +4 -4
- package/dist/client/{eventDetails-Dh-_WiBD.mjs → eventDetails-BjN9v6a1.mjs} +4 -4
- package/dist/client/{eventListing-CA3frIH5.mjs → eventListing-DajjWgOv.mjs} +4 -4
- package/dist/client/{eventRegistration-BHtsgdcg.mjs → eventRegistration-DMq9gMA-.mjs} +109 -41
- package/dist/client/{form-C2h3YAcg.mjs → form-Qf6qTbos.mjs} +5 -5
- package/dist/client/{headerSection-lwMuMTH9.mjs → headerSection-D7qJrqFX.mjs} +3 -3
- package/dist/client/hooks.mjs +661 -116
- package/dist/client/{locationMap-DJ2bLODV.mjs → locationMap-CCF9-t_0.mjs} +4 -4
- package/dist/client/{FieldValidationMessage-AYanWFb-.mjs → mailingListSignupCopy-DZSHZrm6.mjs} +14 -1
- package/dist/client/{media-BtJ37tzS.mjs → media-CwBGetqC.mjs} +1 -1
- package/dist/client/{newsletterForm-8Pu5K32g.mjs → newsletterForm-DzCLSP4S.mjs} +6 -6
- package/dist/client/{pricing-HHx3IgBz.mjs → pricing-Cgxv2KLC.mjs} +1 -1
- package/dist/client/{productDetail-C_1odnAf.mjs → productDetail-ru9w5GHx.mjs} +3 -3
- package/dist/client/{productList-CtCv-Nmx.mjs → productList-zaapKSl-.mjs} +3 -3
- package/dist/client/{propsDecoder-Dcgsncxb.mjs → propsDecoder-CwvvNOHx.mjs} +52 -6
- package/dist/client/rendering/client.mjs +951 -369
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +2153 -1393
- package/dist/client/{routeIslandApiConfig-CWLP7wu3.mjs → routeIslandApiConfig-BwVFo0Y4.mjs} +1 -1
- package/dist/client/{shop-commerce-B88zmWWo.mjs → shop-commerce-De7gEnkA.mjs} +8 -8
- package/dist/client/{shop-commerce-store-DtSfkKuX.mjs → shop-commerce-store-B3MCxIBW.mjs} +1 -1
- package/dist/client/{shop-DQXrQ8kJ.mjs → shop-mktkXvbV.mjs} +7 -7
- package/dist/client/{shopShared-cuaONpkJ.mjs → shopShared-TqExh235.mjs} +5 -5
- package/dist/client/{useEventFilters-Bukew6Gb.mjs → useEventFilters-n_OjkIjX.mjs} +8 -8
- package/dist/preview-next/before-render.mjs +122 -50
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/editor-base.css +53 -2
- package/dist/preview-next/editor-chrome.css +7 -4
- package/dist/preview-next/keepAlive.mjs +122 -50
- package/dist/preview-next/middleware.mjs +122 -50
- package/dist/{previewAuthStore-h5IgbSp4.mjs → previewAuthStore-C_EHQ5XA.mjs} +122 -50
- package/dist/{sdk-runtime-DTc1uIXn.mjs → sdk-runtime-BIkJg5y1.mjs} +2 -2
- package/dist/{separator-BpHS1KZK.mjs → separator-C9qDP95Z.mjs} +1 -1
- package/dist/server/components.mjs +25345 -24942
- package/dist/server/config-validation.mjs +711 -163
- package/dist/server/config.mjs +711 -163
- package/dist/server/data.mjs +709 -162
- package/dist/server/index.mjs +123 -51
- package/dist/server/navigation.mjs +13 -2
- package/dist/server/next.mjs +4538 -4169
- package/dist/server/page-converter.mjs +107 -64
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +2509 -2104
- package/dist/server/rendering.mjs +25526 -25104
- package/dist/server/routing.mjs +750 -289
- package/dist/server/server.mjs +671 -148
- package/dist/server/theme-bridge.mjs +66 -17
- package/dist/server/theme.mjs +5 -1
- package/dist/styles/index.css +32 -4
- package/package.json +1 -1
- package/dist/_dts/core/src/participant-identity.d.ts +0 -135
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { TimeSlot } from './availability';
|
|
2
|
+
import type { PublicCreateBookingAppointmentRequest, PublicCreateBookingAppointmentResponse } from './publicAppointmentBookingContracts';
|
|
3
|
+
export type { PublicCreateBookingAppointmentRequest, PublicCreateBookingAppointmentResponse, PublicBookingAppointmentSummary, PublicBookingCustomerSummary, } from './publicAppointmentBookingContracts';
|
|
2
4
|
import type { InviteSiteMemberEmailResult, SiteInvitation, StaffOperationalCapability } from './accessAdmin';
|
|
3
5
|
import type { EventSeriesRegistrationRefundFailedCode, EventAttendeeRefundFailedCode } from './bookingRefundOutcomes';
|
|
4
6
|
/**
|
|
@@ -647,50 +649,6 @@ export type PublicWeeklySlotAvailabilityResponse = {
|
|
|
647
649
|
startDate: string;
|
|
648
650
|
endDate: string;
|
|
649
651
|
};
|
|
650
|
-
export type PublicCreateBookingAppointmentRequest = {
|
|
651
|
-
formId: string;
|
|
652
|
-
serviceId: string;
|
|
653
|
-
resourceId?: string | null;
|
|
654
|
-
startAt: string;
|
|
655
|
-
endAt: string;
|
|
656
|
-
customFields: Record<string, unknown>;
|
|
657
|
-
timezone?: string;
|
|
658
|
-
discountCode?: string;
|
|
659
|
-
selectedSlidingAmount?: number;
|
|
660
|
-
selectedCollectionOptionKind?: 'upfront' | 'deferred_manual' | 'instalment_plan' | 'flexible_balance';
|
|
661
|
-
altchaSolution?: string | null;
|
|
662
|
-
successUrl?: string;
|
|
663
|
-
cancelUrl?: string;
|
|
664
|
-
};
|
|
665
|
-
export type PublicBookingAppointmentSummary = {
|
|
666
|
-
id: string;
|
|
667
|
-
status: 'confirmed' | 'pending' | 'cancelled';
|
|
668
|
-
startAt: string;
|
|
669
|
-
endAt: string;
|
|
670
|
-
timezone: string;
|
|
671
|
-
resourceName: string | null;
|
|
672
|
-
};
|
|
673
|
-
export type PublicBookingCustomerSummary = {
|
|
674
|
-
id: string;
|
|
675
|
-
email: string | null;
|
|
676
|
-
name: string | null;
|
|
677
|
-
phone: string | null;
|
|
678
|
-
};
|
|
679
|
-
export type PublicCreateBookingAppointmentResponse = {
|
|
680
|
-
type: 'booked';
|
|
681
|
-
orderId: string;
|
|
682
|
-
orderNumber: string;
|
|
683
|
-
appointment: PublicBookingAppointmentSummary;
|
|
684
|
-
customer: PublicBookingCustomerSummary;
|
|
685
|
-
} | {
|
|
686
|
-
type: 'checkout_redirect';
|
|
687
|
-
orderId: string;
|
|
688
|
-
orderNumber: string;
|
|
689
|
-
checkoutUrl: string;
|
|
690
|
-
sessionId: string;
|
|
691
|
-
appointment: PublicBookingAppointmentSummary;
|
|
692
|
-
customer: PublicBookingCustomerSummary;
|
|
693
|
-
};
|
|
694
652
|
export type PublicBookingAppointmentStatusResponse = {
|
|
695
653
|
appointmentId: string;
|
|
696
654
|
appointmentStatus: 'pending' | 'confirmed' | 'cancelled';
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { APIEndpoint } from './apiEndpointTypes';
|
|
2
|
+
import type { CustomerAggregateSnapshot } from './bookingRecords';
|
|
3
|
+
export declare const PEOPLE_LIST_SORT_VALUES: readonly ["name", "passes", "memberships", "lastBooking", "added"];
|
|
4
|
+
export type PeopleListSort = (typeof PEOPLE_LIST_SORT_VALUES)[number];
|
|
5
|
+
export declare const PEOPLE_LIST_FILTER_VALUES: readonly ["everyone", "hasBought", "hasActivePass", "hasMembership", "guests", "nothingBought"];
|
|
6
|
+
export type PeopleListFilter = (typeof PEOPLE_LIST_FILTER_VALUES)[number];
|
|
7
|
+
/**
|
|
8
|
+
* A person's customer account, when they have one. Guests have none: someone
|
|
9
|
+
* else booked for them and they haven't booked or bought anything themselves.
|
|
10
|
+
*/
|
|
11
|
+
export type PersonListAccount = {
|
|
12
|
+
kind: 'guest';
|
|
13
|
+
} | {
|
|
14
|
+
kind: 'customer';
|
|
15
|
+
customerId: string;
|
|
16
|
+
/** Lifecycle facts; only loaded for the rows on the current page. */
|
|
17
|
+
aggregate: CustomerAggregateSnapshot | null;
|
|
18
|
+
};
|
|
19
|
+
export type PersonListItem = {
|
|
20
|
+
personId: string;
|
|
21
|
+
name: string | null;
|
|
22
|
+
email: string | null;
|
|
23
|
+
phone: string | null;
|
|
24
|
+
addedAt: string;
|
|
25
|
+
activePassesCount: number;
|
|
26
|
+
activeMembershipsCount: number;
|
|
27
|
+
hasBought: boolean;
|
|
28
|
+
/** Latest start among the person's own non-cancelled bookings, upcoming included. */
|
|
29
|
+
lastBookingAt: string | null;
|
|
30
|
+
account: PersonListAccount;
|
|
31
|
+
};
|
|
32
|
+
export type ListPeopleRequest = {
|
|
33
|
+
page?: number;
|
|
34
|
+
limit?: number;
|
|
35
|
+
search?: string;
|
|
36
|
+
sortBy?: PeopleListSort;
|
|
37
|
+
sortDirection?: 'asc' | 'desc';
|
|
38
|
+
filter?: PeopleListFilter;
|
|
39
|
+
};
|
|
40
|
+
export type ListPeopleResponse = {
|
|
41
|
+
people: PersonListItem[];
|
|
42
|
+
pagination: {
|
|
43
|
+
page: number;
|
|
44
|
+
limit: number;
|
|
45
|
+
total: number;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
/** What can be attached to a person, in the order the dialog lists it. */
|
|
49
|
+
export declare const PERSON_DELETION_BLOCKER_CATEGORY_VALUES: readonly ["bookings", "guest_places", "waitlist_places", "payments", "orders", "passes", "memberships", "credit", "digital_products", "discounts", "gifts", "notes", "forms", "uploads", "contact_corrections"];
|
|
50
|
+
export type PersonDeletionBlockerCategory = (typeof PERSON_DELETION_BLOCKER_CATEGORY_VALUES)[number];
|
|
51
|
+
/** One attached category with a count above zero. */
|
|
52
|
+
export type PersonDeletionBlocker = {
|
|
53
|
+
category: PersonDeletionBlockerCategory;
|
|
54
|
+
count: number;
|
|
55
|
+
};
|
|
56
|
+
/** GET .../people/{personId}/deletion-check */
|
|
57
|
+
export type PersonDeletionCheckResponse = {
|
|
58
|
+
kind: 'deletable';
|
|
59
|
+
/** A newsletter subscriber with the same email is a separate record and stays. */
|
|
60
|
+
stillOnNewsletterList: boolean;
|
|
61
|
+
} | {
|
|
62
|
+
kind: 'blocked';
|
|
63
|
+
blockers: PersonDeletionBlocker[];
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* DELETE .../people/{personId}. `blocked` means something was attached by the
|
|
67
|
+
* time of the delete, with the fresh counts, so the dialog can say so without
|
|
68
|
+
* a second call.
|
|
69
|
+
*/
|
|
70
|
+
export type DeletePersonResponse = {
|
|
71
|
+
kind: 'deleted';
|
|
72
|
+
} | {
|
|
73
|
+
kind: 'blocked';
|
|
74
|
+
blockers: PersonDeletionBlocker[];
|
|
75
|
+
};
|
|
76
|
+
/** The People endpoints' request and response types. */
|
|
77
|
+
export type BookingPeopleEndpoints = {
|
|
78
|
+
listPeople: APIEndpoint<never, {
|
|
79
|
+
siteId: string;
|
|
80
|
+
} & ListPeopleRequest, ListPeopleResponse>;
|
|
81
|
+
exportPeopleCsv: APIEndpoint<never, {
|
|
82
|
+
siteId: string;
|
|
83
|
+
} & ListPeopleRequest, Blob>;
|
|
84
|
+
checkPersonDeletion: APIEndpoint<never, {
|
|
85
|
+
siteId: string;
|
|
86
|
+
personId: string;
|
|
87
|
+
}, PersonDeletionCheckResponse>;
|
|
88
|
+
deletePerson: APIEndpoint<never, {
|
|
89
|
+
siteId: string;
|
|
90
|
+
personId: string;
|
|
91
|
+
}, DeletePersonResponse>;
|
|
92
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* People endpoints (#1356): the People list, its CSV export, and deleting a
|
|
3
|
+
* person when nothing is attached to them.
|
|
4
|
+
*/
|
|
5
|
+
export declare const BOOKING_PEOPLE_ENDPOINT_DEFINITIONS: {
|
|
6
|
+
listPeople: {
|
|
7
|
+
path: "/sites/{siteId}/bookings/people";
|
|
8
|
+
method: "GET";
|
|
9
|
+
tags: ("site-{siteId}" | "customers-{siteId}")[];
|
|
10
|
+
auth: "user";
|
|
11
|
+
responseKind: "json";
|
|
12
|
+
errors: "server:internal_error"[];
|
|
13
|
+
};
|
|
14
|
+
exportPeopleCsv: {
|
|
15
|
+
path: "/sites/{siteId}/bookings/people/export.csv";
|
|
16
|
+
method: "GET";
|
|
17
|
+
tags: ("site-{siteId}" | "customers-{siteId}")[];
|
|
18
|
+
auth: "user";
|
|
19
|
+
errors: never[];
|
|
20
|
+
responseKind: "blob";
|
|
21
|
+
};
|
|
22
|
+
checkPersonDeletion: {
|
|
23
|
+
path: "/sites/{siteId}/bookings/people/{personId}/deletion-check";
|
|
24
|
+
method: "GET";
|
|
25
|
+
tags: ("site-{siteId}" | "customers-{siteId}")[];
|
|
26
|
+
auth: "user";
|
|
27
|
+
responseKind: "json";
|
|
28
|
+
errors: ("auth:forbidden" | "resource:not_found" | "server:internal_error")[];
|
|
29
|
+
};
|
|
30
|
+
deletePerson: {
|
|
31
|
+
path: "/sites/{siteId}/bookings/people/{personId}";
|
|
32
|
+
method: "DELETE";
|
|
33
|
+
tags: ("site-{siteId}" | "customers-{siteId}")[];
|
|
34
|
+
auth: "user";
|
|
35
|
+
responseKind: "json";
|
|
36
|
+
errors: ("auth:forbidden" | "resource:not_found" | "server:internal_error")[];
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -99,9 +99,6 @@ export type BookingBeforeYouComeReview = {
|
|
|
99
99
|
};
|
|
100
100
|
export type { PersonRecordNoteKind };
|
|
101
101
|
export type PersonRecordEntrySubject = {
|
|
102
|
-
kind: 'customer';
|
|
103
|
-
customerId: string;
|
|
104
|
-
} | {
|
|
105
102
|
kind: 'appointment';
|
|
106
103
|
appointmentId: string;
|
|
107
104
|
} | {
|
|
@@ -253,18 +250,6 @@ export type EventOccurrenceListRecord = EventOccurrenceRecord & {
|
|
|
253
250
|
status: string;
|
|
254
251
|
};
|
|
255
252
|
};
|
|
256
|
-
export type CreateOccurrenceRequest = {
|
|
257
|
-
startsAt: string;
|
|
258
|
-
endsAt: string;
|
|
259
|
-
staffAssignmentMode?: StaffAssignmentMode;
|
|
260
|
-
staffMemberIds?: string[];
|
|
261
|
-
mainHostStaffMemberId?: string | null;
|
|
262
|
-
capacityOverride?: number | null;
|
|
263
|
-
overridesJson?: EventOccurrenceOverrides;
|
|
264
|
-
onlineDetailsOverride?: EventOnlineDetailsInput | null;
|
|
265
|
-
isException?: boolean;
|
|
266
|
-
metadata?: Record<string, unknown>;
|
|
267
|
-
};
|
|
268
253
|
export type VenueLocation = {
|
|
269
254
|
lat: number;
|
|
270
255
|
lng: number;
|
|
@@ -482,25 +467,6 @@ export type CustomerAggregateSnapshot = {
|
|
|
482
467
|
export type BookingCustomerListItem = BookingCustomerWithCounts & {
|
|
483
468
|
aggregate: CustomerAggregateSnapshot | null;
|
|
484
469
|
};
|
|
485
|
-
export type ListBookingCustomersResponse = {
|
|
486
|
-
customers: BookingCustomerListItem[];
|
|
487
|
-
pagination: {
|
|
488
|
-
page: number;
|
|
489
|
-
limit: number;
|
|
490
|
-
total: number;
|
|
491
|
-
};
|
|
492
|
-
};
|
|
493
|
-
export type CustomerSortColumn = 'name' | 'email' | 'createdAt' | 'passesCount' | 'membershipsCount';
|
|
494
|
-
export type CustomerFilter = 'all' | 'hasActivePass' | 'hasActiveProducts' | 'hasMembership' | 'noProducts';
|
|
495
|
-
export type ListBookingCustomersRequest = {
|
|
496
|
-
page?: number;
|
|
497
|
-
limit?: number;
|
|
498
|
-
search?: string;
|
|
499
|
-
sortBy?: CustomerSortColumn;
|
|
500
|
-
sortDirection?: 'asc' | 'desc';
|
|
501
|
-
filter?: CustomerFilter;
|
|
502
|
-
includeAggregates?: boolean;
|
|
503
|
-
};
|
|
504
470
|
export type CreateBookingCustomerRequest = {
|
|
505
471
|
name?: string;
|
|
506
472
|
email?: string;
|
|
@@ -508,6 +474,8 @@ export type CreateBookingCustomerRequest = {
|
|
|
508
474
|
};
|
|
509
475
|
export type CreateBookingCustomerResponse = {
|
|
510
476
|
customer: BookingCustomerWithCounts;
|
|
477
|
+
/** The person the database created for the new customer. */
|
|
478
|
+
personId: string;
|
|
511
479
|
};
|
|
512
480
|
export type CustomerContactField = 'name' | 'email' | 'phone';
|
|
513
481
|
export type CustomerContactChange = {
|
|
@@ -596,8 +564,15 @@ export type SiteCustomerRecord = {
|
|
|
596
564
|
email: string;
|
|
597
565
|
name: string | null;
|
|
598
566
|
};
|
|
567
|
+
/**
|
|
568
|
+
* A pass or membership holder; `personId` links to their person page. Every
|
|
569
|
+
* customer has exactly one person, so it is always present.
|
|
570
|
+
*/
|
|
571
|
+
export type SiteHolderRecord = SiteCustomerRecord & {
|
|
572
|
+
personId: string;
|
|
573
|
+
};
|
|
599
574
|
export type SiteCustomerPassRecord = CustomerPassRecord & {
|
|
600
|
-
customer:
|
|
575
|
+
customer: SiteHolderRecord;
|
|
601
576
|
redemptions: {
|
|
602
577
|
count: number;
|
|
603
578
|
creditsUsed: number;
|
|
@@ -638,7 +613,7 @@ export type ListCustomerMembershipsResponse = {
|
|
|
638
613
|
memberships: CustomerMembershipRecord[];
|
|
639
614
|
};
|
|
640
615
|
export type SiteCustomerMembershipRecord = CustomerMembershipRecord & {
|
|
641
|
-
customer:
|
|
616
|
+
customer: SiteHolderRecord;
|
|
642
617
|
cancelAtPeriodEnd: boolean;
|
|
643
618
|
/** True when this membership is managed by Stripe (has a subscription ID). */
|
|
644
619
|
stripeManaged: boolean;
|
|
@@ -1149,11 +1124,6 @@ export type ListDiscountRedemptionsResponse = {
|
|
|
1149
1124
|
hasMore: boolean;
|
|
1150
1125
|
};
|
|
1151
1126
|
};
|
|
1152
|
-
export type ListCustomerAttendancesRequest = {
|
|
1153
|
-
limit?: number;
|
|
1154
|
-
offset?: number;
|
|
1155
|
-
status?: 'confirmed' | 'waitlist' | 'cancelled';
|
|
1156
|
-
};
|
|
1157
1127
|
export type CustomerAttendancePaymentMethod = 'free' | 'pass' | 'membership' | 'stripe';
|
|
1158
1128
|
export type CustomerAttendancePaymentStatus = 'not_required' | 'pending' | 'completed' | 'failed' | 'refunded';
|
|
1159
1129
|
export type CustomerAttendanceLivePayment = {
|
|
@@ -1184,11 +1154,3 @@ export type CustomerAttendanceRecord = {
|
|
|
1184
1154
|
};
|
|
1185
1155
|
payment: CustomerAttendancePayment;
|
|
1186
1156
|
};
|
|
1187
|
-
export type ListCustomerAttendancesResponse = {
|
|
1188
|
-
attendances: CustomerAttendanceRecord[];
|
|
1189
|
-
pagination: {
|
|
1190
|
-
total: number;
|
|
1191
|
-
limit: number;
|
|
1192
|
-
offset: number;
|
|
1193
|
-
};
|
|
1194
|
-
};
|
|
@@ -3,7 +3,7 @@ export declare const BOOKING_SETTINGS_SECTION_LABELS: Record<BookingSettingsSect
|
|
|
3
3
|
export declare const BOOKING_SETTINGS_SECTION_KEYS: {
|
|
4
4
|
readonly basics: readonly ["modules", "verticalConfig", "eventTypePresets", "personRecordMode", "defaultTimezone", "calendarDisplay", "icsFeedsEnabled", "waitlists", "teamMemberProfilePages"];
|
|
5
5
|
readonly payments: readonly ["paymentDefaults", "currency", "refundsIssueCredit"];
|
|
6
|
-
readonly events: readonly ["defaultVenueId", "eventReminderHours", "eventReminderOverrides", "eventScheduleWindowMonths", "eventOrganizerNotifications", "eventOrganizerEmail", "eventTicketingDefaultEnabled", "collectAllAttendeeDetails", "eventBookingPolicies", "defaultEventImage", "eventDestinationPolicy"];
|
|
6
|
+
readonly events: readonly ["defaultVenueId", "eventReminderHours", "eventReminderOverrides", "eventScheduleWindowMonths", "eventOrganizerNotifications", "eventOrganizerEmail", "eventTicketingDefaultEnabled", "collectAllAttendeeDetails", "eventTypeBookingDefaults", "eventBookingPolicies", "defaultEventImage", "eventDestinationPolicy"];
|
|
7
7
|
readonly appointments: readonly ["appointmentReminderHours", "appointmentReminderOverrides", "appointmentRescheduleHours", "appointmentDefaultMinLeadMinutes", "appointmentDefaultMaxBookingNoticeMinutes", "appointmentBookingPolicies"];
|
|
8
8
|
readonly messages: readonly ["remindersEnabled", "notificationSettings", "appointmentStaffReminder", "appointmentStaffChangeNotifications", "eventFeedback", "appointmentFollowUp"];
|
|
9
9
|
};
|
|
@@ -2,6 +2,7 @@ import type { ApiClient } from './request';
|
|
|
2
2
|
import type { RichTextDoc, SensitiveCollectionConfirmationVersion, SensitiveCollectionMode } from '../../core/src/index';
|
|
3
3
|
import type { BookingSettingsResponse, UpdateBookingSettingsRequest, DeleteEventOfferingResponse, AddEventSeriesRegistrationRequest, AddEventSeriesRegistrationResponse, AddEventOccurrenceAttendeeRequest, AddEventOccurrenceAttendeeResponse, UpdateEventSeriesRegistrationRequest, UpdateEventSeriesRegistrationResponse } from './types';
|
|
4
4
|
export { CUSTOMER_MEMBERSHIP_STATUS_VALUES, CUSTOMER_PASS_STATUS_VALUES, } from './bookingRecords';
|
|
5
|
+
export { PERSON_DELETION_BLOCKER_CATEGORY_VALUES } from './bookingPeople';
|
|
5
6
|
export type { CustomerMembershipStatus, CustomerPassStatus, } from './bookingRecords';
|
|
6
7
|
export { DELETE_EVENT_OFFERING_CONFLICT_REASONS, isDeleteEventOfferingConflictReason, } from './wholeSeriesRuns';
|
|
7
8
|
export type { DeleteEventOfferingConflictReason } from './wholeSeriesRuns';
|