@riverbankcms/sdk 0.91.0 → 0.93.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/dist/{PreviewEditorSidebar-3TT47WCF.mjs → PreviewEditorSidebar-D3PAF7NW.mjs} +3 -3
- package/dist/{PreviewEditorUI-ORCLLUNZ.mjs → PreviewEditorUI-G5JVJEIJ.mjs} +3 -3
- package/dist/SdkPreviewModeRuntime-NHTLRNQD.mjs +8 -0
- package/dist/_dts/api/src/bookingConfig.d.ts +13 -1
- package/dist/_dts/api/src/bookingOperations.d.ts +1 -0
- package/dist/_dts/api/src/bookingRefundOutcomes.d.ts +6 -6
- package/dist/_dts/api/src/common/envelope.d.ts +10 -0
- package/dist/_dts/api/src/customerMembershipOutcomes.d.ts +4 -4
- package/dist/_dts/api/src/index.d.ts +2 -2
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +6 -0
- package/dist/_dts/api/src/request.d.ts +1 -1
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +32 -0
- package/dist/_dts/blocks/src/system/blocks/courses/shared/pricing.d.ts +12 -1
- package/dist/_dts/blocks/src/system/blocks/courses/shared/schemas.d.ts +12 -0
- package/dist/_dts/blocks/src/system/blocks/courses/shared/types.d.ts +4 -1
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +44 -0
- package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +8 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.d.ts +8 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.state.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.interactive.d.ts +40 -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.state.d.ts +29 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-runtime-sources.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/components.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationWizard.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/TicketSelectionStep.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +9 -0
- package/dist/_dts/content-editor/src/controller/EntryControllerProvider.d.ts +14 -14
- package/dist/_dts/content-editor/src/controller/useEntrySyncHelpers.d.ts +1 -1
- package/dist/_dts/content-editor/src/hooks/useEntryActions.d.ts +5 -15
- package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +46 -0
- package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +43 -36
- package/dist/_dts/content-model/src/entry-slots/types.d.ts +110 -2
- package/dist/_dts/core/src/branded.d.ts +3 -0
- package/dist/_dts/core/src/event-pricing.d.ts +18 -1
- package/dist/_dts/core/src/money-input.d.ts +34 -4
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +70 -0
- package/dist/_dts/media-core/src/fileAssetCompatibility.d.ts +1 -1
- package/dist/_dts/media-core/src/filePersistence.d.ts +5 -1
- package/dist/_dts/media-core/src/fileStorage.d.ts +1 -0
- package/dist/_dts/media-core/src/fileUploadFinalization.d.ts +29 -1
- package/dist/_dts/media-core/src/index.d.ts +1 -0
- package/dist/_dts/media-core/src/legacyMediaValue.d.ts +11 -0
- package/dist/_dts/media-core/src/videoPrep.d.ts +15 -6
- package/dist/_dts/media-core/src/videoSlotPolicy.d.ts +5 -5
- package/dist/_dts/media-react/src/hooks/useApiMediaUploader.d.ts +2 -1
- package/dist/_dts/sdk/src/cli/commands/push/execute/diff.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/commands/push/execute/localMediaReporting.d.ts +23 -0
- package/dist/_dts/sdk/src/cli/commands/push/scopes/commandBackedDatedOfferingScope.d.ts +54 -0
- package/dist/_dts/sdk/src/cli/commands/push/scopes/mediaPrep.d.ts +7 -2
- package/dist/_dts/sdk/src/cli/commands/push/scopes/types.d.ts +6 -0
- package/dist/_dts/sdk/src/cli/media/local-sync.d.ts +35 -0
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +23 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/{chunk-GDT2QGIL.mjs → chunk-A63UXN3P.mjs} +21 -19
- package/dist/{chunk-U5YM4AWE.mjs → chunk-AJZGT6YG.mjs} +1 -1
- package/dist/{chunk-AFPMCLS7.mjs → chunk-AQ6RT6LZ.mjs} +2 -2
- package/dist/{chunk-ZA2S7H34.mjs → chunk-NT76QGIJ.mjs} +98 -1
- package/dist/{chunk-RQUZYSES.mjs → chunk-PCNCETBI.mjs} +1196 -426
- package/dist/{chunk-S3YHJWEU.mjs → chunk-XIK2HYI3.mjs} +7 -7
- package/dist/cli/index.mjs +749 -166
- package/dist/client/{accordion-AFX37652.mjs → accordion-RNQIPG55.mjs} +2 -2
- package/dist/client/{bookingForm-32V5QCOW.mjs → bookingForm-HYEEVRLP.mjs} +89 -14
- package/dist/client/bookings.mjs +243 -17
- package/dist/client/{carousel-TJGQJ7ER.mjs → carousel-W7DQ3YPU.mjs} +3 -3
- package/dist/client/{cart-JUU2JEW4.mjs → cart-PXJ3SXXO.mjs} +7 -7
- package/dist/client/{checkout-RD6BTFX4.mjs → checkout-X3JYSOXI.mjs} +7 -7
- package/dist/client/{chunk-MLBNVN4H.mjs → chunk-6SYGVVWA.mjs} +67 -4
- package/dist/client/{chunk-E6VIWZUG.mjs → chunk-DUOHLWLF.mjs} +3 -3
- package/dist/client/{chunk-6QZIBNGV.mjs → chunk-IXDSXF2D.mjs} +154 -16
- package/dist/client/{chunk-CKXEUWWA.mjs → chunk-J6TMMMXW.mjs} +3 -3
- package/dist/client/{chunk-PMNAV6LO.mjs → chunk-JNE6UI6U.mjs} +7 -6
- package/dist/client/{chunk-ISAUXU5R.mjs → chunk-OLAOAZEO.mjs} +1 -1
- package/dist/client/{chunk-RWYFG625.mjs → chunk-PCHACQEB.mjs} +30 -2
- package/dist/client/{chunk-FMZZHAIR.mjs → chunk-PICR3NTQ.mjs} +52 -5
- package/dist/client/{chunk-6RN62XBV.mjs → chunk-Q47XGAGS.mjs} +1 -1
- package/dist/client/{chunk-WHZQDPBZ.mjs → chunk-TNGL2WJF.mjs} +1 -0
- package/dist/client/{chunk-C4LP6BPG.mjs → chunk-WERRJXNJ.mjs} +1 -1
- package/dist/client/{chunk-RMOFBBNA.mjs → chunk-YYVGSYBO.mjs} +6 -6
- package/dist/client/client.mjs +641 -54
- package/dist/client/{courseRegistration-X63QAIVV.mjs → courseRegistration-QZ67PVHO.mjs} +111 -11
- package/dist/client/{eventCalendar-5T24GCZL.mjs → eventCalendar-V3BDHQNT.mjs} +9 -9
- package/dist/client/{eventCombined-AZVTF22X.mjs → eventCombined-XYFRN2RG.mjs} +9 -9
- package/dist/client/{eventDetails-7GPFNLGF.mjs → eventDetails-TFE5TWKV.mjs} +9 -9
- package/dist/client/{eventListing-QEUMTMUM.mjs → eventListing-IQ6AGWZ6.mjs} +9 -9
- package/dist/client/{eventRegistration-P2EDKCQZ.mjs → eventRegistration-WGJVFKQJ.mjs} +9 -9
- package/dist/client/{form-NUJ7H4IN.mjs → form-6UZY6RUA.mjs} +3 -3
- package/dist/client/{headerSection-JB7LECPL.mjs → headerSection-RSFXY6V3.mjs} +3 -3
- package/dist/client/hooks.mjs +57 -5
- package/dist/client/{locationMap-UEYWUCSW.mjs → locationMap-24FH67I4.mjs} +3 -3
- package/dist/client/{newsletterForm-S2YZQ2X7.mjs → newsletterForm-QVL3MLTN.mjs} +3 -3
- package/dist/client/{productDetail-H5MADGG7.mjs → productDetail-ZDYN3G4T.mjs} +7 -7
- package/dist/client/{productList-DK7YON7H.mjs → productList-4BMJLQHZ.mjs} +7 -7
- package/dist/client/rendering/client.mjs +503 -36
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +583 -39
- package/dist/client/{shop-6PA7RDRJ.mjs → shop-U5C634FF.mjs} +7 -7
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/{sdk-runtime-JP5347OB.mjs → sdk-runtime-VGV46WVB.mjs} +6 -6
- package/dist/server/components.mjs +287 -68
- package/dist/server/config-validation.mjs +58 -5
- package/dist/server/config.mjs +58 -5
- package/dist/server/data.mjs +57 -5
- package/dist/server/index.mjs +104 -29
- package/dist/server/next.mjs +347 -85
- package/dist/server/page-converter.mjs +22 -5
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +287 -68
- package/dist/server/rendering.mjs +287 -68
- package/dist/server/routing.mjs +131 -67
- package/dist/server/server.mjs +189 -94
- package/package.json +1 -1
- package/dist/SdkPreviewModeRuntime-GMCDQPZZ.mjs +0 -8
|
@@ -116,6 +116,7 @@ export interface BookingSubmitRequest {
|
|
|
116
116
|
customFields: Record<string, unknown>;
|
|
117
117
|
timezone: string;
|
|
118
118
|
discountCode?: string;
|
|
119
|
+
selectedSlidingAmount?: number;
|
|
119
120
|
selectedCollectionOptionKind?: "upfront" | "deferred_manual" | "instalment_plan" | "flexible_balance";
|
|
120
121
|
altchaSolution?: string | null;
|
|
121
122
|
successUrl?: string;
|
|
@@ -212,6 +213,7 @@ export interface BookingService {
|
|
|
212
213
|
title: string;
|
|
213
214
|
description?: string;
|
|
214
215
|
durationMinutes?: number;
|
|
216
|
+
pricing?: import("../nodes/booking-form.state").BookingFormServicePricing;
|
|
215
217
|
priceAmount?: number | null;
|
|
216
218
|
priceCurrency?: string | null;
|
|
217
219
|
paymentTerms?: import("../../blocks/shared/bookingPaymentTerms").BlockBookingPaymentTerms;
|
|
@@ -339,6 +341,7 @@ export interface EventRegisterRequest {
|
|
|
339
341
|
occurrenceId: string;
|
|
340
342
|
attendanceMode?: 'in_person' | 'online';
|
|
341
343
|
ticketTypeId?: string;
|
|
344
|
+
selectedSlidingAmount?: number;
|
|
342
345
|
email: string;
|
|
343
346
|
name: string;
|
|
344
347
|
ticketsCount: number;
|
|
@@ -424,6 +427,7 @@ export interface EligibilityCheckRequest {
|
|
|
424
427
|
occurrenceId: string;
|
|
425
428
|
attendanceMode?: 'in_person' | 'online';
|
|
426
429
|
ticketTypeId?: string;
|
|
430
|
+
selectedSlidingAmount?: number;
|
|
427
431
|
email: string;
|
|
428
432
|
ticketsCount: number;
|
|
429
433
|
}
|
|
@@ -436,7 +440,7 @@ export interface EligibilityCheckResponse {
|
|
|
436
440
|
membership: EligibleMembership | null;
|
|
437
441
|
passes: EligiblePass[];
|
|
438
442
|
requiresPayment: boolean;
|
|
439
|
-
pricingMode?: "single" | "ticket_types";
|
|
443
|
+
pricingMode?: "single" | "ticket_types" | "sliding_scale";
|
|
440
444
|
selectedTicketTypeId?: string | null;
|
|
441
445
|
ticketTypes?: EligibilityEventTicketType[];
|
|
442
446
|
eventPrice: number | null;
|
|
@@ -469,6 +473,7 @@ export interface CourseEnrollRequest {
|
|
|
469
473
|
siteId: string;
|
|
470
474
|
courseId: string;
|
|
471
475
|
pricingOptionId?: string;
|
|
476
|
+
selectedSlidingAmount?: number;
|
|
472
477
|
email: string;
|
|
473
478
|
name: string;
|
|
474
479
|
phone?: string;
|
|
@@ -528,6 +533,7 @@ export interface CourseCheckoutRequest {
|
|
|
528
533
|
siteId: string;
|
|
529
534
|
courseId: string;
|
|
530
535
|
pricingOptionId?: string;
|
|
536
|
+
selectedSlidingAmount?: number;
|
|
531
537
|
email: string;
|
|
532
538
|
name: string;
|
|
533
539
|
phone?: string;
|
|
@@ -744,6 +750,7 @@ export type UnifiedCheckoutItem = {
|
|
|
744
750
|
type: "course_enrollment";
|
|
745
751
|
courseId: string;
|
|
746
752
|
pricingOptionId?: string;
|
|
753
|
+
selectedSlidingAmount?: number;
|
|
747
754
|
attendeeInfo: {
|
|
748
755
|
email: string;
|
|
749
756
|
name: string;
|
|
@@ -3,7 +3,7 @@ import { type BlockApiConfig } from "../api";
|
|
|
3
3
|
import type { AutoAppliedDiscountPreview } from "../api/types";
|
|
4
4
|
import type { BookingFormConfig, BookingFormData, BookingFormService, BookingSelectedCollectionOptionKind } from "../nodes/booking-form.state";
|
|
5
5
|
import { type BookingPaymentSelectionViewModel } from "../shared/bookingPaymentOptions";
|
|
6
|
-
import { createBookingBlockApiConfig, type BookingAppointmentPackagesModel, type BookingFieldValue, type BookingFieldView, type BookingFlowActionResult, type BookingFlowFeedback, type BookingFlowStatus, type BookingFlowView, type BookingResourceView, type BookingFlowStep, type BookingFlowStepId, type BookingSlotSelection, type BookingSlotView, type BookingSubmitActionResult, type BookingSubmitOptions, type LoadState } from "./useHeadlessBookingFlow.state";
|
|
6
|
+
import { createBookingBlockApiConfig, type BookingAppointmentPackagesModel, type BookingFieldValue, type BookingFieldView, type BookingFlowActionResult, type BookingFlowFeedback, type BookingFlowStatus, type BookingFlowView, type BookingResourceView, type BookingFlowStep, type BookingFlowStepId, type BookingSlotSelection, type BookingSlotView, type BookingSubmitActionResult, type BookingSubmitOptions, getBookingServiceSlidingScale, type LoadState } from "./useHeadlessBookingFlow.state";
|
|
7
7
|
export type { BlockApiConfig };
|
|
8
8
|
export type { BookingAppointmentPackagesModel };
|
|
9
9
|
export { createBookingBlockApiConfig };
|
|
@@ -61,6 +61,9 @@ export type BookingPaymentModel = Readonly<{
|
|
|
61
61
|
selection: null;
|
|
62
62
|
selectedCollectionOptionKind?: BookingSelectedCollectionOptionKind;
|
|
63
63
|
selectedAppointmentPackageId?: string;
|
|
64
|
+
selectedSlidingAmountInput: string;
|
|
65
|
+
selectedSlidingAmount: number | null;
|
|
66
|
+
slidingScale: ReturnType<typeof getBookingServiceSlidingScale>;
|
|
64
67
|
appointmentPackages: BookingAppointmentPackagesModel;
|
|
65
68
|
errorMessage: string;
|
|
66
69
|
}> | Readonly<{
|
|
@@ -69,6 +72,9 @@ export type BookingPaymentModel = Readonly<{
|
|
|
69
72
|
selection: BookingPaymentSelectionViewModel | null;
|
|
70
73
|
selectedCollectionOptionKind?: BookingSelectedCollectionOptionKind;
|
|
71
74
|
selectedAppointmentPackageId?: string;
|
|
75
|
+
selectedSlidingAmountInput: string;
|
|
76
|
+
selectedSlidingAmount: number | null;
|
|
77
|
+
slidingScale: ReturnType<typeof getBookingServiceSlidingScale>;
|
|
72
78
|
appointmentPackages: BookingAppointmentPackagesModel;
|
|
73
79
|
}>;
|
|
74
80
|
export type BookingDiscountModel = Readonly<{
|
|
@@ -101,6 +107,7 @@ export type BookingFlowActions = Readonly<{
|
|
|
101
107
|
markFieldTouched: (fieldId: string) => void;
|
|
102
108
|
selectPaymentOption: (kind: BookingSelectedCollectionOptionKind | null) => void;
|
|
103
109
|
selectAppointmentPackage: (packageId: string | null) => void;
|
|
110
|
+
setSlidingAmountInput: (value: string) => void;
|
|
104
111
|
setDiscountCode: (code: string) => void;
|
|
105
112
|
clearDiscountCode: () => void;
|
|
106
113
|
setAltchaSolution: (solution: string | null) => void;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { unsafeAsBookingFieldId, bookingFlowReducer, buildBookingAvailabilityQuery, buildBookingStepPlan, buildBookingSubmitPlan, createBookingBlockApiConfig, createEmptyBookingValidationErrors, createFieldBookingValidationErrors, createFormBookingValidationError, createInitialBookingFlowReducerState, describeUnknownError, deriveBookingFieldViews, deriveBookingFlowSteps, getAppointmentBookingOverrideInput, hasBookingValidationErrors, resolveAppointmentPackagesModel, resolveAvailabilitySelectionInvalidation, resolveHeadlessBookingStatus, resolveHeadlessBookingView, toBookingFormData, toBookingSlotView, toBookingSlotViews, toOptionalAppointmentResourceId, toOptionalAppointmentServiceId, validateBookingField, validateBookingFields, validateBookingStep, } from "../nodes/booking-form.headless.state";
|
|
2
|
+
export { formatBookingCentsAsCurrencyInput, getBookingServiceSlidingScale, parseBookingCurrencyInputToCents, } from "../nodes/booking-form.state";
|
|
2
3
|
export type { AppointmentBookingOverrideData, AppointmentBookingOverrideInput, AppointmentBookingOverrideInputResult, AppointmentBookingOverridePropsLike, BookingAvailabilityQuery, BookingAppointmentPackagesModel, BookingAppointmentPackagesUnavailableReason, BookingFieldId, BookingFieldValue, BookingFieldView, BookingFlowActionResult, BookingFlowFeedback, BookingFlowStatus, BookingFlowStep, BookingFlowStepId, BookingFlowView, BookingResourceView, BookingSlotSelection, BookingSlotView, BookingSubmitActionResult, BookingSubmitOptions, BookingValidationErrors, DerivedBookingFlowSteps, DeriveBookingFlowStepsInput, LoadState, } from "../nodes/booking-form.headless.state";
|
|
@@ -167,6 +167,7 @@ export type BookingFlowReducerState = Readonly<{
|
|
|
167
167
|
fieldValues: Readonly<Record<string, BookingFieldValue>>;
|
|
168
168
|
touchedFields: Readonly<Record<string, boolean>>;
|
|
169
169
|
discountCode: string;
|
|
170
|
+
selectedSlidingAmountInput: string;
|
|
170
171
|
selectedCollectionOptionKind?: BookingSelectedCollectionOptionKind;
|
|
171
172
|
selectedAppointmentPackageId?: CustomerPassId;
|
|
172
173
|
altchaSolution: string | null;
|
|
@@ -195,6 +196,9 @@ export type BookingFlowEvent = Readonly<{
|
|
|
195
196
|
}> | Readonly<{
|
|
196
197
|
type: "payment-option-selected";
|
|
197
198
|
kind: BookingSelectedCollectionOptionKind | null;
|
|
199
|
+
}> | Readonly<{
|
|
200
|
+
type: "sliding-amount-changed";
|
|
201
|
+
value: string;
|
|
198
202
|
}> | Readonly<{
|
|
199
203
|
type: "appointment-package-selected";
|
|
200
204
|
packageId: CustomerPassId | null;
|
|
@@ -152,6 +152,14 @@ export declare const bookingFormBlockRuntime: Readonly<{
|
|
|
152
152
|
title: string;
|
|
153
153
|
description?: string;
|
|
154
154
|
durationMinutes?: number;
|
|
155
|
+
pricing?: Readonly<{
|
|
156
|
+
pricingStrategy: "free" | "single" | "tiered" | "sliding_scale";
|
|
157
|
+
currency: string;
|
|
158
|
+
singlePriceAmount?: number | null;
|
|
159
|
+
slidingMinAmount?: number | null;
|
|
160
|
+
slidingMaxAmount?: number | null;
|
|
161
|
+
slidingSuggestedAmount?: number | null;
|
|
162
|
+
}>;
|
|
155
163
|
priceAmount?: number | null;
|
|
156
164
|
priceCurrency?: string | null;
|
|
157
165
|
paymentTerms?: import("../../blocks/shared/bookingPaymentTerms").BlockBookingPaymentTerms;
|
|
@@ -348,6 +356,14 @@ export declare const bookingFormBlockRuntime: Readonly<{
|
|
|
348
356
|
title: string;
|
|
349
357
|
description?: string;
|
|
350
358
|
durationMinutes?: number;
|
|
359
|
+
pricing?: Readonly<{
|
|
360
|
+
pricingStrategy: "free" | "single" | "tiered" | "sliding_scale";
|
|
361
|
+
currency: string;
|
|
362
|
+
singlePriceAmount?: number | null;
|
|
363
|
+
slidingMinAmount?: number | null;
|
|
364
|
+
slidingMaxAmount?: number | null;
|
|
365
|
+
slidingSuggestedAmount?: number | null;
|
|
366
|
+
}>;
|
|
351
367
|
priceAmount?: number | null;
|
|
352
368
|
priceCurrency?: string | null;
|
|
353
369
|
paymentTerms?: import("../../blocks/shared/bookingPaymentTerms").BlockBookingPaymentTerms;
|
|
@@ -424,6 +440,14 @@ export declare const bookingFormBlockRuntime: Readonly<{
|
|
|
424
440
|
title: string;
|
|
425
441
|
description?: string;
|
|
426
442
|
durationMinutes?: number;
|
|
443
|
+
pricing?: Readonly<{
|
|
444
|
+
pricingStrategy: "free" | "single" | "tiered" | "sliding_scale";
|
|
445
|
+
currency: string;
|
|
446
|
+
singlePriceAmount?: number | null;
|
|
447
|
+
slidingMinAmount?: number | null;
|
|
448
|
+
slidingMaxAmount?: number | null;
|
|
449
|
+
slidingSuggestedAmount?: number | null;
|
|
450
|
+
}>;
|
|
427
451
|
priceAmount?: number | null;
|
|
428
452
|
priceCurrency?: string | null;
|
|
429
453
|
paymentTerms?: import("../../blocks/shared/bookingPaymentTerms").BlockBookingPaymentTerms;
|
|
@@ -512,6 +536,14 @@ export declare const bookingFormInteractiveIslandPropsCodec: Readonly<{
|
|
|
512
536
|
title: string;
|
|
513
537
|
description?: string;
|
|
514
538
|
durationMinutes?: number;
|
|
539
|
+
pricing?: Readonly<{
|
|
540
|
+
pricingStrategy: "free" | "single" | "tiered" | "sliding_scale";
|
|
541
|
+
currency: string;
|
|
542
|
+
singlePriceAmount?: number | null;
|
|
543
|
+
slidingMinAmount?: number | null;
|
|
544
|
+
slidingMaxAmount?: number | null;
|
|
545
|
+
slidingSuggestedAmount?: number | null;
|
|
546
|
+
}>;
|
|
515
547
|
priceAmount?: number | null;
|
|
516
548
|
priceCurrency?: string | null;
|
|
517
549
|
paymentTerms?: import("../../blocks/shared/bookingPaymentTerms").BlockBookingPaymentTerms;
|
|
@@ -597,6 +629,14 @@ export declare const bookingFormInteractiveIslandPropsCodec: Readonly<{
|
|
|
597
629
|
title: string;
|
|
598
630
|
description?: string;
|
|
599
631
|
durationMinutes?: number;
|
|
632
|
+
pricing?: Readonly<{
|
|
633
|
+
pricingStrategy: "free" | "single" | "tiered" | "sliding_scale";
|
|
634
|
+
currency: string;
|
|
635
|
+
singlePriceAmount?: number | null;
|
|
636
|
+
slidingMinAmount?: number | null;
|
|
637
|
+
slidingMaxAmount?: number | null;
|
|
638
|
+
slidingSuggestedAmount?: number | null;
|
|
639
|
+
}>;
|
|
600
640
|
priceAmount?: number | null;
|
|
601
641
|
priceCurrency?: string | null;
|
|
602
642
|
paymentTerms?: import("../../blocks/shared/bookingPaymentTerms").BlockBookingPaymentTerms;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const APPOINTMENT_BOOKING_BLOCK_ID: "block.appointment-booking";
|
|
2
|
-
export declare const BOOKING_FORM_DATA_RESERVED_KEY_VALUES: readonly ["serviceId", "resourceId", "selectedDate", "selectedSlot", "discountCode", "selectedCollectionOptionKind", "selectedAppointmentPackageId"];
|
|
2
|
+
export declare const BOOKING_FORM_DATA_RESERVED_KEY_VALUES: readonly ["serviceId", "resourceId", "selectedDate", "selectedSlot", "discountCode", "selectedSlidingAmountInput", "selectedCollectionOptionKind", "selectedAppointmentPackageId"];
|
|
3
3
|
export type BookingFormDataReservedKey = (typeof BOOKING_FORM_DATA_RESERVED_KEY_VALUES)[number];
|
|
4
4
|
export type BookingReservedFieldCollision = Readonly<{
|
|
5
5
|
fieldId: BookingFormDataReservedKey;
|
|
@@ -61,12 +61,21 @@ type BlockBookingPaymentTermsAvailability = Readonly<{
|
|
|
61
61
|
paymentTerms: BlockBookingPaymentTerms;
|
|
62
62
|
reason: "online_payment_configured_before_launch";
|
|
63
63
|
}>;
|
|
64
|
+
export type BookingFormServicePricing = Readonly<{
|
|
65
|
+
pricingStrategy: "free" | "single" | "tiered" | "sliding_scale";
|
|
66
|
+
currency: string;
|
|
67
|
+
singlePriceAmount?: number | null;
|
|
68
|
+
slidingMinAmount?: number | null;
|
|
69
|
+
slidingMaxAmount?: number | null;
|
|
70
|
+
slidingSuggestedAmount?: number | null;
|
|
71
|
+
}>;
|
|
64
72
|
export type BookingFormService = Readonly<{
|
|
65
73
|
id: string;
|
|
66
74
|
siteId: string;
|
|
67
75
|
title: string;
|
|
68
76
|
description?: string;
|
|
69
77
|
durationMinutes?: number;
|
|
78
|
+
pricing?: BookingFormServicePricing;
|
|
70
79
|
priceAmount?: number | null;
|
|
71
80
|
priceCurrency?: string | null;
|
|
72
81
|
paymentTerms?: BlockBookingPaymentTerms;
|
|
@@ -85,6 +94,7 @@ export type BookingFormData<TCustomFieldId extends string = never> = Readonly<{
|
|
|
85
94
|
selectedDate?: string;
|
|
86
95
|
selectedSlot?: string;
|
|
87
96
|
discountCode?: string;
|
|
97
|
+
selectedSlidingAmountInput?: string;
|
|
88
98
|
selectedCollectionOptionKind?: BookingSelectedCollectionOptionKind;
|
|
89
99
|
selectedAppointmentPackageId?: string;
|
|
90
100
|
}> & BookingCustomFieldData<TCustomFieldId>;
|
|
@@ -101,6 +111,7 @@ type BookingSubmissionCommon = Readonly<{
|
|
|
101
111
|
export type BookingSubmissionData = (BookingSubmissionCommon & Readonly<{
|
|
102
112
|
kind: "standard";
|
|
103
113
|
discountCode?: string;
|
|
114
|
+
selectedSlidingAmount?: number;
|
|
104
115
|
selectedCollectionOptionKind?: BookingSelectedCollectionOptionKind;
|
|
105
116
|
altchaSolution?: string | null;
|
|
106
117
|
successUrl?: string;
|
|
@@ -111,6 +122,12 @@ export type BookingSubmissionData = (BookingSubmissionCommon & Readonly<{
|
|
|
111
122
|
}>);
|
|
112
123
|
export type BookingPaymentStepMode = "hidden" | "disclosure_only" | "choice_required" | "unsupported";
|
|
113
124
|
type BookingPaymentSelectionMode = "implicit_upfront" | "implicit_deferred_manual" | "implicit_instalment_plan" | "implicit_flexible_balance" | "choice_required" | "pending_stripe_setup" | "unsupported";
|
|
125
|
+
export type BookingServiceSlidingScale = Readonly<{
|
|
126
|
+
minAmount: number;
|
|
127
|
+
maxAmount: number;
|
|
128
|
+
suggestedAmount: number | null;
|
|
129
|
+
currency: string;
|
|
130
|
+
}>;
|
|
114
131
|
export type BookingPaymentStepResolution = Readonly<{
|
|
115
132
|
mode: BookingPaymentStepMode;
|
|
116
133
|
service: BookingFormService | null;
|
|
@@ -169,6 +186,14 @@ export type BookingSubmissionPreparationError = Readonly<{
|
|
|
169
186
|
tag: "payment-option-required";
|
|
170
187
|
serviceId: string;
|
|
171
188
|
serviceTitle: string;
|
|
189
|
+
}> | Readonly<{
|
|
190
|
+
tag: "sliding-amount-required";
|
|
191
|
+
serviceId: string;
|
|
192
|
+
serviceTitle: string;
|
|
193
|
+
}> | Readonly<{
|
|
194
|
+
tag: "sliding-amount-out-of-range";
|
|
195
|
+
serviceId: string;
|
|
196
|
+
serviceTitle: string;
|
|
172
197
|
}> | Readonly<{
|
|
173
198
|
tag: "payment-option-unsupported";
|
|
174
199
|
serviceId: string;
|
|
@@ -206,6 +231,10 @@ export declare function resolveBookingSiteId(siteId: string | undefined, form: B
|
|
|
206
231
|
export declare function normalizeBookingFormConfig(form: unknown): BookingFormConfig | null;
|
|
207
232
|
export declare function normalizeBookingServices(services: unknown): readonly BookingFormService[];
|
|
208
233
|
export declare function toSelectedCollectionOptionKind(value: unknown): BookingSelectedCollectionOptionKind | undefined;
|
|
234
|
+
export declare function getBookingServiceSlidingScale(service: BookingFormService | null | undefined): BookingServiceSlidingScale | null;
|
|
235
|
+
export declare function parseBookingCurrencyInputToCents(value: string | undefined): number | null;
|
|
236
|
+
export declare function formatBookingCentsAsCurrencyInput(amount: number): string;
|
|
237
|
+
export declare function isBookingServiceSlidingAmountInRange(slidingScale: BookingServiceSlidingScale, selectedAmount: number | null): selectedAmount is number;
|
|
209
238
|
export declare function getBookingServicePaymentSelectionMode(service: BookingFormService | undefined): BookingPaymentSelectionMode;
|
|
210
239
|
export declare function resolveDefaultBookingServiceId(formConfig: BookingFormConfig | null | undefined, services: readonly BookingFormService[]): string | null;
|
|
211
240
|
export declare function resolveBookingSelectedService(input: Readonly<{
|
|
@@ -91,6 +91,7 @@ export type AppointmentBookingServiceSourceInput = Readonly<{
|
|
|
91
91
|
title: string;
|
|
92
92
|
description?: string | null;
|
|
93
93
|
durationMinutes?: number;
|
|
94
|
+
pricing?: BookingFormService["pricing"];
|
|
94
95
|
priceAmount?: number | null;
|
|
95
96
|
priceCurrency?: string | null;
|
|
96
97
|
paymentTerms?: BookingFormService["paymentTerms"];
|
|
@@ -27,6 +27,12 @@ interface CoursePricingSelectorProps {
|
|
|
27
27
|
onSelect: (pricingOptionId: string) => void;
|
|
28
28
|
}
|
|
29
29
|
export declare function CoursePricingSelector({ pricing, selectedPricingOptionId, onSelect, }: CoursePricingSelectorProps): React.JSX.Element | null;
|
|
30
|
+
interface CourseSlidingScaleInputProps {
|
|
31
|
+
pricing: ResolvedCoursePricingState;
|
|
32
|
+
value: string;
|
|
33
|
+
onChange: (value: string) => void;
|
|
34
|
+
}
|
|
35
|
+
export declare function CourseSlidingScaleInput({ pricing, value, onChange, }: CourseSlidingScaleInputProps): React.JSX.Element | null;
|
|
30
36
|
interface EnrollmentFormProps {
|
|
31
37
|
formData: FormData;
|
|
32
38
|
errors: Partial<Record<keyof FormData, string>>;
|
|
@@ -10,12 +10,20 @@ export declare function useCourseRegistrationWizard(props: CourseRegistrationCli
|
|
|
10
10
|
selectedCourse: PublicCourse | null;
|
|
11
11
|
selectedPricingOptionId: string | null;
|
|
12
12
|
setSelectedPricingOptionId: import("react").Dispatch<import("react").SetStateAction<string | null>>;
|
|
13
|
+
selectedSlidingAmountInput: string;
|
|
14
|
+
setSelectedSlidingAmountInput: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
13
15
|
selectedCoursePricing: Readonly<{
|
|
14
16
|
currency: string;
|
|
15
17
|
display: import("../../../blocks/courses/shared").CoursePriceDisplay;
|
|
16
18
|
selectableOptions: readonly import("../../../blocks/courses/shared").CoursePricingOption[];
|
|
17
19
|
requiresSelection: boolean;
|
|
18
20
|
selectedOption: import("../../../blocks/courses/shared").CoursePricingOption | null;
|
|
21
|
+
slidingScale: Readonly<{
|
|
22
|
+
minAmount: number;
|
|
23
|
+
maxAmount: number;
|
|
24
|
+
suggestedAmount: number | null;
|
|
25
|
+
}> | null;
|
|
26
|
+
selectedSlidingAmount: number | null;
|
|
19
27
|
selectedPriceAmount: number | null;
|
|
20
28
|
selectedRequiresPayment: boolean;
|
|
21
29
|
hasPaidSelection: boolean;
|
package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/TicketSelectionStep.d.ts
CHANGED
|
@@ -9,6 +9,14 @@ type TicketSelectionStepProps = {
|
|
|
9
9
|
maxTickets: number;
|
|
10
10
|
selectedTicketTypeId?: string | null;
|
|
11
11
|
onTicketTypeChange?: (ticketTypeId: string) => void;
|
|
12
|
+
slidingScale?: Readonly<{
|
|
13
|
+
minAmount: number;
|
|
14
|
+
maxAmount: number;
|
|
15
|
+
suggestedAmount: number | null;
|
|
16
|
+
}> | null;
|
|
17
|
+
selectedSlidingAmountInput?: string;
|
|
18
|
+
slidingScaleSelectionMessage?: string | null;
|
|
19
|
+
onSlidingAmountChange?: (amount: string) => void;
|
|
12
20
|
onTicketsChange: (count: number) => void;
|
|
13
21
|
};
|
|
14
22
|
/**
|
|
@@ -41,6 +41,7 @@ export declare function useEligibility(params: {
|
|
|
41
41
|
occurrenceId: string;
|
|
42
42
|
attendanceMode?: 'in_person' | 'online' | null;
|
|
43
43
|
ticketTypeId: string | null;
|
|
44
|
+
selectedSlidingAmount?: number | null;
|
|
44
45
|
email: string;
|
|
45
46
|
ticketsCount: number;
|
|
46
47
|
}): UseEligibilityResult;
|
|
@@ -43,7 +43,7 @@ export type EligibilityData = {
|
|
|
43
43
|
/** Whether the selected event/ticket type currently requires payment. */
|
|
44
44
|
requiresPayment: boolean;
|
|
45
45
|
/** Persisted pricing mode for the underlying event series. */
|
|
46
|
-
pricingMode?: 'single' | 'ticket_types';
|
|
46
|
+
pricingMode?: 'single' | 'ticket_types' | 'sliding_scale';
|
|
47
47
|
/** Selected ticket type echoed back from the eligibility API, if any. */
|
|
48
48
|
selectedTicketTypeId?: string | null;
|
|
49
49
|
/** Public ticket types available for selection in ticket-type mode. */
|
package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export declare function useEventRegistrationSubmit(options: {
|
|
|
26
26
|
registrationTarget: RegistrationTarget | null;
|
|
27
27
|
selectedAttendanceMode: 'in_person' | 'online' | null;
|
|
28
28
|
selectedTicketTypeId: string | null;
|
|
29
|
+
selectedSlidingAmount: number | null;
|
|
29
30
|
ticketsCount: number;
|
|
30
31
|
formData: FormData;
|
|
31
32
|
altchaSolution: string | null;
|
package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts
CHANGED
|
@@ -50,6 +50,15 @@ export declare function useEventRegistrationWizard(options: {
|
|
|
50
50
|
setSelectedAttendanceMode: import("react").Dispatch<import("react").SetStateAction<"in_person" | "online" | null>>;
|
|
51
51
|
selectedTicketTypeId: string | null;
|
|
52
52
|
setSelectedTicketTypeId: import("react").Dispatch<import("react").SetStateAction<string | null>>;
|
|
53
|
+
selectedSlidingAmountInput: string;
|
|
54
|
+
setSelectedSlidingAmountInput: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
55
|
+
selectedSlidingAmount: number | null;
|
|
56
|
+
selectedEventSlidingScale: Readonly<{
|
|
57
|
+
minAmount: number;
|
|
58
|
+
maxAmount: number;
|
|
59
|
+
suggestedAmount: number | null;
|
|
60
|
+
}> | null;
|
|
61
|
+
slidingScaleSelectionMessage: string | null;
|
|
53
62
|
selectedTicketType: import("./utils").SelectableEventTicketType | null;
|
|
54
63
|
visibleTicketTypes: import("./utils").SelectableEventTicketType[];
|
|
55
64
|
ticketTypeSelectionRequired: boolean;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { type ContentEntrySnapshot, type ContentTypeSchema, type ToolbarState } from
|
|
2
|
-
import type { EditorBlockId } from
|
|
3
|
-
import type { BlockItem } from
|
|
4
|
-
import { type ReactNode } from
|
|
5
|
-
import { type PublishOptions } from
|
|
6
|
-
import { type ApiClient } from
|
|
7
|
-
import type { DraftWorkflowStatus } from
|
|
8
|
-
import { type EditorUiState } from
|
|
9
|
-
import type { ResolveBlockManifest } from
|
|
1
|
+
import { type ContentEntrySnapshot, type ContentTypeSchema, type ToolbarState } from '../../../content-model/src/index';
|
|
2
|
+
import type { EditorBlockId } from '../../../core/src/index';
|
|
3
|
+
import type { BlockItem } from '../../../editor-blocks/src/block-editor/types';
|
|
4
|
+
import { type ReactNode } from 'react';
|
|
5
|
+
import { type PublishOptions } from '../hooks/useEntryActions';
|
|
6
|
+
import { type ApiClient } from '../services';
|
|
7
|
+
import type { DraftWorkflowStatus } from '../types';
|
|
8
|
+
import { type EditorUiState } from '../ui/editorUiStore';
|
|
9
|
+
import type { ResolveBlockManifest } from '../ui/blockValidationView';
|
|
10
10
|
export type EntryControllerBlocksSlice = {
|
|
11
11
|
list: BlockItem[];
|
|
12
|
-
status:
|
|
12
|
+
status: 'idle' | 'loading' | 'error';
|
|
13
13
|
actions: {
|
|
14
14
|
setList: (next: BlockItem[]) => void;
|
|
15
15
|
};
|
|
@@ -75,7 +75,7 @@ type BaseInternalProps = {
|
|
|
75
75
|
entityLabel?: string | null;
|
|
76
76
|
initialEntry?: ContentEntrySnapshot | null;
|
|
77
77
|
/** Autosave mode (default: auto). Manual disables background autosave triggers. */
|
|
78
|
-
saveMode?:
|
|
78
|
+
saveMode?: 'auto' | 'manual';
|
|
79
79
|
/** Initial content values for content entries - used to hydrate content store */
|
|
80
80
|
initialContent?: Record<string, unknown> | null;
|
|
81
81
|
/** Published content values for content entries - used to detect unpublished changes */
|
|
@@ -85,13 +85,13 @@ type BaseInternalProps = {
|
|
|
85
85
|
resolveBlockManifest?: ResolveBlockManifest;
|
|
86
86
|
};
|
|
87
87
|
type PageInternalProps = BaseInternalProps & {
|
|
88
|
-
kind:
|
|
89
|
-
initialStatus?:
|
|
88
|
+
kind: 'page';
|
|
89
|
+
initialStatus?: 'draft' | 'scheduled' | 'published';
|
|
90
90
|
} & {
|
|
91
91
|
initialBlocks?: BlockItem[];
|
|
92
92
|
};
|
|
93
93
|
type ContentInternalProps = BaseInternalProps & {
|
|
94
|
-
kind:
|
|
94
|
+
kind: 'content';
|
|
95
95
|
initialBlocks?: BlockItem[];
|
|
96
96
|
};
|
|
97
97
|
type EntryControllerProviderProps = PageInternalProps | ContentInternalProps;
|
|
@@ -22,7 +22,7 @@ export declare function useEntrySyncHelpers({ uiStore, setErrorMessage, }: UseEn
|
|
|
22
22
|
resetFromSnapshot: (snapshot: {
|
|
23
23
|
baseline: Record<string, unknown>;
|
|
24
24
|
values: Record<string, unknown>;
|
|
25
|
-
}
|
|
25
|
+
}) => void;
|
|
26
26
|
handleMetadataAutosaveSuccess: (nextEntry: ContentEntrySnapshot) => void;
|
|
27
27
|
markAutosaveError: (error: unknown) => string;
|
|
28
28
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { type ContentEntrySnapshot, type RoutingHelpers } from
|
|
2
|
-
import type { EditorUiStoreInstance } from
|
|
3
|
-
import type { PublishEntryResult } from
|
|
1
|
+
import { type ContentEntrySnapshot, type RoutingHelpers } from '../../../content-model/src/index';
|
|
2
|
+
import type { EditorUiStoreInstance } from '../ui/editorUiStore';
|
|
3
|
+
import type { PublishEntryResult } from '../services/contentEntryServices';
|
|
4
4
|
/** Services interface for entry operations */
|
|
5
5
|
export type EntryServices = {
|
|
6
6
|
deleteEntry: () => Promise<void>;
|
|
7
7
|
};
|
|
8
8
|
export type PublishOptions = {
|
|
9
|
-
mode?:
|
|
9
|
+
mode?: 'default' | 'now';
|
|
10
10
|
};
|
|
11
11
|
/** Definition with services */
|
|
12
12
|
export type EntryDefinition = {
|
|
@@ -15,16 +15,6 @@ export type EntryDefinition = {
|
|
|
15
15
|
buildPayload?: (values: Record<string, unknown>, entry: ContentEntrySnapshot) => unknown;
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
|
-
/**
|
|
19
|
-
* Options for resetting from snapshot.
|
|
20
|
-
*/
|
|
21
|
-
export type ResetFromSnapshotOptions = {
|
|
22
|
-
/**
|
|
23
|
-
* When true, preserves current form values after reset.
|
|
24
|
-
* Useful after publish to keep the UI showing the just-published values.
|
|
25
|
-
*/
|
|
26
|
-
keepValues?: boolean;
|
|
27
|
-
};
|
|
28
18
|
export type EntryActionsOptions<TEntry extends ContentEntrySnapshot> = {
|
|
29
19
|
/** Current entry snapshot */
|
|
30
20
|
entry: TEntry;
|
|
@@ -55,7 +45,7 @@ export type EntryActionsOptions<TEntry extends ContentEntrySnapshot> = {
|
|
|
55
45
|
resetFromSnapshot: (snapshot: {
|
|
56
46
|
baseline: Record<string, unknown>;
|
|
57
47
|
values: Record<string, unknown>;
|
|
58
|
-
}
|
|
48
|
+
}) => void;
|
|
59
49
|
/** Function to set error message */
|
|
60
50
|
setErrorMessage: (message: string | null) => void;
|
|
61
51
|
};
|
|
@@ -59,6 +59,40 @@ export type EditorValueSnapshot<TValue extends EditorValueRecord | null> = Reado
|
|
|
59
59
|
publishedBaseline: TValue;
|
|
60
60
|
syncState: EditorSyncState;
|
|
61
61
|
}>;
|
|
62
|
+
export type EditorValuePublicationState<TValue extends EditorValueRecord | null> = Readonly<{
|
|
63
|
+
kind: 'empty';
|
|
64
|
+
hasUnpublishedChanges: false;
|
|
65
|
+
}> | Readonly<{
|
|
66
|
+
kind: 'unpublished-draft';
|
|
67
|
+
current: Exclude<TValue, null>;
|
|
68
|
+
hasUnpublishedChanges: true;
|
|
69
|
+
}> | Readonly<{
|
|
70
|
+
kind: 'published-clean';
|
|
71
|
+
published: Exclude<TValue, null>;
|
|
72
|
+
hasUnpublishedChanges: false;
|
|
73
|
+
}> | Readonly<{
|
|
74
|
+
kind: 'published-missing-current';
|
|
75
|
+
published: Exclude<TValue, null>;
|
|
76
|
+
hasUnpublishedChanges: true;
|
|
77
|
+
}> | Readonly<{
|
|
78
|
+
kind: 'published-with-unpublished-changes';
|
|
79
|
+
current: Exclude<TValue, null>;
|
|
80
|
+
published: Exclude<TValue, null>;
|
|
81
|
+
hasUnpublishedChanges: true;
|
|
82
|
+
}>;
|
|
83
|
+
export declare function deriveEditorValuePublicationState<TValue extends EditorValueRecord | null>(snapshot: EditorValueSnapshot<TValue>): EditorValuePublicationState<TValue>;
|
|
84
|
+
export type EditorPublishSuccessTransition = Readonly<{
|
|
85
|
+
metadata: Readonly<{
|
|
86
|
+
baseline: EditorMetadataValues | null;
|
|
87
|
+
current: EditorMetadataValues | null;
|
|
88
|
+
published: EditorMetadataValues | null;
|
|
89
|
+
}>;
|
|
90
|
+
content: Readonly<{
|
|
91
|
+
published: EditorContentValues | null;
|
|
92
|
+
versionAtPublishStart: number;
|
|
93
|
+
}>;
|
|
94
|
+
blockPublishedBaselines: readonly BlockPublishedBaselineInput[] | null;
|
|
95
|
+
}>;
|
|
62
96
|
type EditorMetadataSnapshot = EditorValueSnapshot<EditorMetadataValues | null>;
|
|
63
97
|
type EditorContentSnapshot = EditorValueSnapshot<EditorContentValues | null>;
|
|
64
98
|
export type EditorLinkedEntryMeta = Readonly<{
|
|
@@ -150,6 +184,9 @@ export type EditorSystemOperation = {
|
|
|
150
184
|
} | {
|
|
151
185
|
type: 'set-content-published-baseline';
|
|
152
186
|
published: EditorContentValues | null;
|
|
187
|
+
} | {
|
|
188
|
+
type: 'apply-publish-success';
|
|
189
|
+
transition: EditorPublishSuccessTransition;
|
|
153
190
|
} | {
|
|
154
191
|
type: 'autosave-metadata-succeeded';
|
|
155
192
|
savedValues: EditorMetadataValues | null;
|
|
@@ -242,6 +279,7 @@ export declare function hydrateMetadataSnapshot(snapshot: EditorHistorySnapshot,
|
|
|
242
279
|
export declare function hydrateContentSnapshot(snapshot: EditorHistorySnapshot, baseline: EditorContentValues | null, current?: EditorContentValues | null, published?: EditorContentValues | null): EditorHistorySnapshot;
|
|
243
280
|
export declare function setMetadataPublishedBaseline(snapshot: EditorHistorySnapshot, published: EditorMetadataValues | null): EditorHistorySnapshot;
|
|
244
281
|
export declare function setContentPublishedBaseline(snapshot: EditorHistorySnapshot, published: EditorContentValues | null): EditorHistorySnapshot;
|
|
282
|
+
export declare function applyPublishSuccessTransition(snapshot: EditorHistorySnapshot, transition: EditorPublishSuccessTransition): EditorHistorySnapshot;
|
|
245
283
|
export declare function autosaveMetadataSucceeded(snapshot: EditorHistorySnapshot, savedValues: EditorMetadataValues | null, acknowledgedVersion: number): EditorHistorySnapshot;
|
|
246
284
|
export declare function autosaveContentSucceeded(snapshot: EditorHistorySnapshot, savedValues: EditorContentValues | null, acknowledgedVersion: number): EditorHistorySnapshot;
|
|
247
285
|
export declare function autosaveMetadataFailed(snapshot: EditorHistorySnapshot, message?: string): EditorHistorySnapshot;
|
|
@@ -271,4 +309,12 @@ export declare function replaceEditorBlockList(snapshot: EditorHistorySnapshot,
|
|
|
271
309
|
export declare function getDraftSnapshot(snapshot: EditorHistorySnapshot, blockId: string): EditorDraftSnapshot | null;
|
|
272
310
|
export declare function inspectDrafts(snapshot: EditorHistorySnapshot): EditorDraftSnapshot[];
|
|
273
311
|
export declare function getLinkedEntrySnapshot(snapshot: EditorHistorySnapshot, entryId: string): EditorLinkedEntrySnapshot | null;
|
|
312
|
+
export type EditorDraftUnpublishedBlockChange = Readonly<{
|
|
313
|
+
blockId: EditorBlockId;
|
|
314
|
+
kind: string;
|
|
315
|
+
reason: 'missing_published' | 'missing_current' | 'different';
|
|
316
|
+
currentContent: EditorBlockValues | null;
|
|
317
|
+
publishedContent: EditorBlockValues | null;
|
|
318
|
+
}>;
|
|
319
|
+
export declare function getFirstUnpublishedDraftChange(snapshot: EditorHistorySnapshot): EditorDraftUnpublishedBlockChange | null;
|
|
274
320
|
export declare function hasUnpublishedDraftChanges(snapshot: EditorHistorySnapshot): boolean;
|