@riverbankcms/sdk 0.67.0 → 0.68.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 +21 -11
- package/dist/_dts/api/src/aiPlayground.d.ts +62 -14
- package/dist/_dts/api/src/billing.d.ts +7 -40
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +4 -1
- package/dist/_dts/api/src/bookingOperations.d.ts +32 -1
- package/dist/_dts/api/src/endpoints.d.ts +7 -0
- package/dist/_dts/api/src/public/types.d.ts +1 -1
- package/dist/_dts/billing/src/components/index.d.ts +426 -0
- package/dist/_dts/blocks/src/PageRenderer.d.ts +4 -0
- package/dist/_dts/blocks/src/client.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableDates.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableSlots.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.d.ts +140 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.state.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useVisibleTabPolling.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.default-ui.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +484 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +5 -2
- package/dist/_dts/sdk/src/bookings/index.d.ts +5 -2
- package/dist/_dts/sdk/src/bookings/types.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/commands/push/scopes/commandBackedDatedOfferingScope.d.ts +32 -0
- package/dist/_dts/sdk/src/cli/commands/push/scopes/types.d.ts +5 -1
- package/dist/_dts/sdk/src/cli/site-commands/commandRuntime.d.ts +41 -11
- package/dist/_dts/sdk/src/cli/site-commands/commandRuntimeCompat.d.ts +21 -0
- package/dist/_dts/sdk/src/cli/site-commands/commandSurfaceDispatch.d.ts +27 -0
- package/dist/_dts/sdk/src/cli/site-commands/datedOfferingCommands.d.ts +56 -0
- package/dist/_dts/sdk/src/cli/site-commands/entryCommands.d.ts +3 -1
- package/dist/_dts/sdk/src/cli/site-commands/footerCommands.d.ts +7 -1
- package/dist/_dts/sdk/src/cli/site-commands/formCommands.d.ts +4 -8
- package/dist/_dts/sdk/src/cli/site-commands/index.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/site-commands/navigationCommands.d.ts +4 -8
- package/dist/_dts/sdk/src/cli/site-commands/pageCommands.d.ts +4 -8
- package/dist/_dts/sdk/src/cli/site-commands/pushExecution.d.ts +14 -68
- package/dist/_dts/sdk/src/cli/site-commands/pushExecutionPlan.d.ts +8 -0
- package/dist/_dts/sdk/src/cli/site-commands/pushExecutionTypes.d.ts +97 -0
- package/dist/_dts/sdk/src/cli/site-commands/residualSettingsTrimming.d.ts +15 -0
- package/dist/_dts/sdk/src/cli/sync/index.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/sync/syncResultAggregation.d.ts +4 -0
- package/dist/_dts/sdk/src/rendering/overrides.d.ts +2 -0
- package/dist/_dts/sdk/src/theme-bridge/ThemeBridgeProvider.d.ts +4 -4
- package/dist/_dts/sdk/src/theme-bridge/generateCssVars.d.ts +4 -12
- package/dist/_dts/sdk/src/theme-bridge/index.d.ts +1 -1
- package/dist/_dts/sdk/src/theme-bridge/types.d.ts +17 -9
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +228 -1
- package/dist/_dts/site-commands/src/domain.d.ts +1 -1
- package/dist/_dts/site-commands/src/index.d.ts +1 -0
- package/dist/_dts/site-commands/src/metadata.d.ts +66 -1
- package/dist/_dts/site-commands/src/refContributions.d.ts +1 -0
- package/dist/_dts/site-commands/src/refs.d.ts +7 -1
- package/dist/_dts/{sdk/src/cli/merge-remote → site-commands/src}/stableJson.d.ts +2 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/index.d.ts +1 -1
- package/dist/_dts/theme-core/src/runtime/buildThemeRuntimeFromBridge.d.ts +30 -23
- package/dist/cli/index.mjs +1699 -766
- package/dist/client/bookings.mjs +5107 -3348
- package/dist/client/client.mjs +4004 -3522
- package/dist/client/hooks.mjs +14 -0
- package/dist/client/rendering/client.mjs +4185 -3721
- package/dist/client/rendering/islands.mjs +4317 -3853
- package/dist/client/rendering.mjs +4076 -3592
- package/dist/preview-next/before-render.mjs +14 -0
- package/dist/preview-next/client/runtime.mjs +2770 -2268
- package/dist/preview-next/middleware.mjs +14 -0
- package/dist/server/components.mjs +172 -58
- package/dist/server/config-validation.mjs +14 -0
- package/dist/server/config.mjs +14 -0
- package/dist/server/data.mjs +14 -0
- package/dist/server/index.mjs +15 -1
- package/dist/server/next.mjs +166 -52
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +174 -58
- package/dist/server/rendering.mjs +174 -58
- package/dist/server/routing.mjs +14 -0
- package/dist/server/server.mjs +15 -1
- package/dist/server/theme-bridge.mjs +1247 -4825
- package/dist/styles/index.css +38 -38
- package/package.json +1 -1
- package/dist/_dts/blocks/src/system/runtime/components/booking/DateTimeSelectionStep.d.ts +0 -18
- package/dist/_dts/blocks/src/system/runtime/components/booking/PaymentOptionSelectionStep.d.ts +0 -9
- package/dist/_dts/blocks/src/system/runtime/components/booking/ServiceResourceSelector.d.ts +0 -44
- package/dist/_dts/blocks/src/system/runtime/components/booking/ServiceResourceSelector.state.d.ts +0 -23
- package/dist/_dts/blocks/src/system/runtime/components/booking/ServiceSelectionStep.d.ts +0 -18
- package/dist/_dts/blocks/src/system/runtime/components/booking/slotDisplay.d.ts +0 -2
- package/dist/_dts/blocks/src/system/runtime/components/multi-step/MultiStepForm.d.ts +0 -21
- package/dist/_dts/blocks/src/system/runtime/components/multi-step/useMultiStep.d.ts +0 -15
- package/dist/_dts/blocks/src/system/runtime/components/multi-step/useMultiStep.state.d.ts +0 -51
- package/dist/_dts/blocks/src/system/runtime/hooks/useBookingSteps.d.ts +0 -22
|
@@ -0,0 +1,484 @@
|
|
|
1
|
+
import type { BlockApiConfig, EligibleAppointmentPackage } from "../api/types";
|
|
2
|
+
import type { TimeSlot } from "../api/types";
|
|
3
|
+
import type { BookingFormConfig, BookingFormData, BookingFormField, BookingPaymentStepResolution, BookingFormServicesSource, BookingFormService, BookingSelectedCollectionOptionKind, BookingSubmissionData } from "./booking-form.state";
|
|
4
|
+
export type LoadState<T> = Readonly<{
|
|
5
|
+
tag: "idle";
|
|
6
|
+
}> | Readonly<{
|
|
7
|
+
tag: "loading";
|
|
8
|
+
}> | Readonly<{
|
|
9
|
+
tag: "loaded";
|
|
10
|
+
value: T;
|
|
11
|
+
}> | Readonly<{
|
|
12
|
+
tag: "error";
|
|
13
|
+
message: string;
|
|
14
|
+
}>;
|
|
15
|
+
export type BookingFlowStepId = "service-selection" | "datetime-selection" | "payment-selection" | "custom-fields";
|
|
16
|
+
export type BookingFlowStepState = "complete" | "active" | "available" | "blocked" | "hidden";
|
|
17
|
+
export type BookingFlowStep = Readonly<{
|
|
18
|
+
id: BookingFlowStepId;
|
|
19
|
+
label: string;
|
|
20
|
+
state: BookingFlowStepState;
|
|
21
|
+
index: number;
|
|
22
|
+
visibleIndex: number | null;
|
|
23
|
+
errors: BookingValidationErrors;
|
|
24
|
+
canEnter: boolean;
|
|
25
|
+
canLeave: boolean;
|
|
26
|
+
}>;
|
|
27
|
+
export type BookingValidationErrors = Readonly<{
|
|
28
|
+
formError: string | null;
|
|
29
|
+
fieldErrors: Readonly<Record<string, string>>;
|
|
30
|
+
}>;
|
|
31
|
+
export type BookingFieldValue = string | number | boolean | readonly string[] | null;
|
|
32
|
+
export type BookingSlotView = Readonly<{
|
|
33
|
+
key: string;
|
|
34
|
+
startAt: string;
|
|
35
|
+
endAt: string;
|
|
36
|
+
resourceId: string;
|
|
37
|
+
resourceName?: string;
|
|
38
|
+
label?: string;
|
|
39
|
+
}>;
|
|
40
|
+
export type BookingResourceView = Readonly<{
|
|
41
|
+
id: string;
|
|
42
|
+
label: string;
|
|
43
|
+
}>;
|
|
44
|
+
export type BookingFlowFeedback = Readonly<{
|
|
45
|
+
kind: "none";
|
|
46
|
+
}> | Readonly<{
|
|
47
|
+
kind: "success";
|
|
48
|
+
message: string;
|
|
49
|
+
resourceName: string | null;
|
|
50
|
+
}> | Readonly<{
|
|
51
|
+
kind: "error";
|
|
52
|
+
scope: "submission" | "verification" | "discount" | "altcha" | "availability" | "payment";
|
|
53
|
+
message: string;
|
|
54
|
+
}> | Readonly<{
|
|
55
|
+
kind: "info";
|
|
56
|
+
scope: "verification" | "payment";
|
|
57
|
+
message: string;
|
|
58
|
+
}>;
|
|
59
|
+
export type AvailabilitySelectionInvalidation = Readonly<{
|
|
60
|
+
kind: "preserve";
|
|
61
|
+
}> | Readonly<{
|
|
62
|
+
kind: "date_unavailable";
|
|
63
|
+
message: string;
|
|
64
|
+
}> | Readonly<{
|
|
65
|
+
kind: "slot_unavailable";
|
|
66
|
+
message: string;
|
|
67
|
+
}>;
|
|
68
|
+
export type BookingFlowStatus = Readonly<{
|
|
69
|
+
tag: "ready";
|
|
70
|
+
}> | Readonly<{
|
|
71
|
+
tag: "submitting";
|
|
72
|
+
}> | Readonly<{
|
|
73
|
+
tag: "success";
|
|
74
|
+
resourceName: string | null;
|
|
75
|
+
}> | Readonly<{
|
|
76
|
+
tag: "error";
|
|
77
|
+
message: string;
|
|
78
|
+
}>;
|
|
79
|
+
export type BookingFlowView = Readonly<{
|
|
80
|
+
kind: "missing";
|
|
81
|
+
message: string;
|
|
82
|
+
}> | Readonly<{
|
|
83
|
+
kind: "form";
|
|
84
|
+
}> | Readonly<{
|
|
85
|
+
kind: "success";
|
|
86
|
+
message: string;
|
|
87
|
+
resourceName: string | null;
|
|
88
|
+
}> | Readonly<{
|
|
89
|
+
kind: "error";
|
|
90
|
+
message: string;
|
|
91
|
+
}>;
|
|
92
|
+
export type BookingFlowActionResult = Readonly<{
|
|
93
|
+
ok: true;
|
|
94
|
+
}> | Readonly<{
|
|
95
|
+
ok: false;
|
|
96
|
+
reason: "validation-failed";
|
|
97
|
+
errors: BookingValidationErrors;
|
|
98
|
+
}> | Readonly<{
|
|
99
|
+
ok: false;
|
|
100
|
+
reason: "blocked";
|
|
101
|
+
message: string;
|
|
102
|
+
}> | Readonly<{
|
|
103
|
+
ok: false;
|
|
104
|
+
reason: "submission-failed";
|
|
105
|
+
message: string;
|
|
106
|
+
}>;
|
|
107
|
+
export type BookingSubmitOptions = Readonly<{
|
|
108
|
+
/**
|
|
109
|
+
* Checkout return URLs apply only to standard paid bookings. Appointment
|
|
110
|
+
* package submissions complete directly through the portal booking API and
|
|
111
|
+
* intentionally ignore these URLs.
|
|
112
|
+
*/
|
|
113
|
+
redirect?: "manual" | "auto";
|
|
114
|
+
successUrl?: string;
|
|
115
|
+
cancelUrl?: string;
|
|
116
|
+
}>;
|
|
117
|
+
export type BookingSubmitActionResult = Readonly<{
|
|
118
|
+
ok: true;
|
|
119
|
+
outcome: {
|
|
120
|
+
kind: "booked";
|
|
121
|
+
appointmentId: string;
|
|
122
|
+
resourceName: string | null;
|
|
123
|
+
};
|
|
124
|
+
}> | Readonly<{
|
|
125
|
+
ok: true;
|
|
126
|
+
outcome: {
|
|
127
|
+
kind: "checkout_redirect";
|
|
128
|
+
checkoutUrl: string;
|
|
129
|
+
};
|
|
130
|
+
}> | Exclude<BookingFlowActionResult, Readonly<{
|
|
131
|
+
ok: true;
|
|
132
|
+
}>>;
|
|
133
|
+
export type BookingFieldView = Readonly<{
|
|
134
|
+
field: BookingFormField;
|
|
135
|
+
id: string;
|
|
136
|
+
label: string;
|
|
137
|
+
type: BookingFormField["type"];
|
|
138
|
+
value: BookingFieldValue;
|
|
139
|
+
required: boolean;
|
|
140
|
+
error: string | null;
|
|
141
|
+
helpText: string | null;
|
|
142
|
+
inputId: string;
|
|
143
|
+
labelId: string;
|
|
144
|
+
helpTextId: string | null;
|
|
145
|
+
errorId: string | null;
|
|
146
|
+
describedBy: string | undefined;
|
|
147
|
+
ariaInvalid: boolean;
|
|
148
|
+
}>;
|
|
149
|
+
export type BookingFlowReducerState = Readonly<{
|
|
150
|
+
currentStepId: BookingFlowStepId;
|
|
151
|
+
selectedServiceId?: string;
|
|
152
|
+
selectedResourceId?: string;
|
|
153
|
+
selectedDate?: string;
|
|
154
|
+
selectedSlot: BookingSlotView | null;
|
|
155
|
+
fieldValues: Readonly<Record<string, BookingFieldValue>>;
|
|
156
|
+
touchedFields: Readonly<Record<string, boolean>>;
|
|
157
|
+
discountCode: string;
|
|
158
|
+
selectedCollectionOptionKind?: BookingSelectedCollectionOptionKind;
|
|
159
|
+
selectedAppointmentPackageId?: string;
|
|
160
|
+
altchaSolution: string | null;
|
|
161
|
+
validationErrors: BookingValidationErrors;
|
|
162
|
+
feedback: BookingFlowFeedback;
|
|
163
|
+
isSubmitting: boolean;
|
|
164
|
+
}>;
|
|
165
|
+
export type BookingFlowEvent = Readonly<{
|
|
166
|
+
type: "service-selected";
|
|
167
|
+
serviceId: string;
|
|
168
|
+
}> | Readonly<{
|
|
169
|
+
type: "resource-selected";
|
|
170
|
+
resourceId: string | null;
|
|
171
|
+
}> | Readonly<{
|
|
172
|
+
type: "date-selected";
|
|
173
|
+
date: string | null;
|
|
174
|
+
}> | Readonly<{
|
|
175
|
+
type: "slot-selected";
|
|
176
|
+
slot: BookingSlotView | null;
|
|
177
|
+
}> | Readonly<{
|
|
178
|
+
type: "field-updated";
|
|
179
|
+
fieldId: string;
|
|
180
|
+
value: BookingFieldValue;
|
|
181
|
+
}> | Readonly<{
|
|
182
|
+
type: "field-touched";
|
|
183
|
+
fieldId: string;
|
|
184
|
+
}> | Readonly<{
|
|
185
|
+
type: "payment-option-selected";
|
|
186
|
+
kind: BookingSelectedCollectionOptionKind | null;
|
|
187
|
+
}> | Readonly<{
|
|
188
|
+
type: "appointment-package-selected";
|
|
189
|
+
packageId: string | null;
|
|
190
|
+
}> | Readonly<{
|
|
191
|
+
type: "discount-code-changed";
|
|
192
|
+
code: string;
|
|
193
|
+
}> | Readonly<{
|
|
194
|
+
type: "altcha-solution-set";
|
|
195
|
+
solution: string | null;
|
|
196
|
+
}> | Readonly<{
|
|
197
|
+
type: "altcha-solution-invalidated";
|
|
198
|
+
}> | Readonly<{
|
|
199
|
+
type: "step-changed";
|
|
200
|
+
stepId: BookingFlowStepId;
|
|
201
|
+
}> | Readonly<{
|
|
202
|
+
type: "validation-errors-set";
|
|
203
|
+
errors: BookingValidationErrors;
|
|
204
|
+
}> | Readonly<{
|
|
205
|
+
type: "feedback-set";
|
|
206
|
+
feedback: BookingFlowFeedback;
|
|
207
|
+
}> | Readonly<{
|
|
208
|
+
type: "availability-selection-invalidated";
|
|
209
|
+
invalidation: Exclude<AvailabilitySelectionInvalidation, {
|
|
210
|
+
kind: "preserve";
|
|
211
|
+
}>;
|
|
212
|
+
}> | Readonly<{
|
|
213
|
+
type: "feedback-cleared";
|
|
214
|
+
}> | Readonly<{
|
|
215
|
+
type: "submission-started";
|
|
216
|
+
}> | Readonly<{
|
|
217
|
+
type: "submission-finished";
|
|
218
|
+
}> | Readonly<{
|
|
219
|
+
type: "reset";
|
|
220
|
+
initial: BookingFlowReducerState;
|
|
221
|
+
}>;
|
|
222
|
+
export type BuildBookingStepPlanInput = Readonly<{
|
|
223
|
+
form: BookingFormConfig | null;
|
|
224
|
+
services: readonly BookingFormService[];
|
|
225
|
+
data: Partial<BookingFormData>;
|
|
226
|
+
defaultServiceId?: string;
|
|
227
|
+
defaultResourceId?: string;
|
|
228
|
+
requiresServiceSelection?: boolean;
|
|
229
|
+
requiresResourceSelection?: boolean;
|
|
230
|
+
enableAppointmentPackages?: boolean;
|
|
231
|
+
}>;
|
|
232
|
+
export type BookingStepPlanItem = Readonly<{
|
|
233
|
+
id: BookingFlowStepId;
|
|
234
|
+
label: string;
|
|
235
|
+
visible: boolean;
|
|
236
|
+
}>;
|
|
237
|
+
export type BookingStepValidationResult = Readonly<{
|
|
238
|
+
ok: true;
|
|
239
|
+
}> | Readonly<{
|
|
240
|
+
ok: false;
|
|
241
|
+
errors: BookingValidationErrors;
|
|
242
|
+
}>;
|
|
243
|
+
export type DeriveBookingFlowStepsInput = Readonly<{
|
|
244
|
+
form: BookingFormConfig | null;
|
|
245
|
+
services: readonly BookingFormService[];
|
|
246
|
+
data: Partial<BookingFormData>;
|
|
247
|
+
defaultServiceId?: string;
|
|
248
|
+
defaultResourceId?: string;
|
|
249
|
+
currentStepId: BookingFlowStepId;
|
|
250
|
+
requiresServiceSelection?: boolean;
|
|
251
|
+
requiresResourceSelection?: boolean;
|
|
252
|
+
enableAppointmentPackages?: boolean;
|
|
253
|
+
}>;
|
|
254
|
+
export type DerivedBookingFlowSteps = Readonly<{
|
|
255
|
+
steps: readonly BookingFlowStep[];
|
|
256
|
+
currentStepIndex: number;
|
|
257
|
+
currentStep: BookingFlowStep | null;
|
|
258
|
+
stepIds: readonly BookingFlowStepId[];
|
|
259
|
+
validations: ReadonlyMap<BookingFlowStepId, BookingStepValidationResult>;
|
|
260
|
+
}>;
|
|
261
|
+
export type BookingAvailabilityQuery = Readonly<{
|
|
262
|
+
ok: true;
|
|
263
|
+
key: string;
|
|
264
|
+
serviceId: string;
|
|
265
|
+
resourceId?: string;
|
|
266
|
+
selectedDate?: string;
|
|
267
|
+
timezone: string;
|
|
268
|
+
}> | Readonly<{
|
|
269
|
+
ok: false;
|
|
270
|
+
reason: "missing-service" | "missing-date";
|
|
271
|
+
key: string;
|
|
272
|
+
}>;
|
|
273
|
+
export type BookingSubmitRedirectMode = "manual" | "auto";
|
|
274
|
+
export type BookingSubmitPlan = Readonly<{
|
|
275
|
+
ok: true;
|
|
276
|
+
redirect: BookingSubmitRedirectMode;
|
|
277
|
+
value: BookingSubmissionData;
|
|
278
|
+
}> | Readonly<{
|
|
279
|
+
ok: false;
|
|
280
|
+
errors: BookingValidationErrors;
|
|
281
|
+
message: string;
|
|
282
|
+
}>;
|
|
283
|
+
export type BookingAppointmentPackagesModel = Readonly<{
|
|
284
|
+
kind: "disabled";
|
|
285
|
+
enabled: false;
|
|
286
|
+
canLoad: false;
|
|
287
|
+
unavailableReason: "disabled";
|
|
288
|
+
state: Readonly<{
|
|
289
|
+
tag: "idle";
|
|
290
|
+
}>;
|
|
291
|
+
items: readonly [];
|
|
292
|
+
selected: null;
|
|
293
|
+
}> | Readonly<{
|
|
294
|
+
kind: "unavailable";
|
|
295
|
+
enabled: true;
|
|
296
|
+
canLoad: false;
|
|
297
|
+
unavailableReason: "missing-portal-auth" | "missing-priced-service";
|
|
298
|
+
state: Readonly<{
|
|
299
|
+
tag: "idle";
|
|
300
|
+
}>;
|
|
301
|
+
items: readonly [];
|
|
302
|
+
selected: null;
|
|
303
|
+
}> | Readonly<{
|
|
304
|
+
kind: "idle";
|
|
305
|
+
enabled: true;
|
|
306
|
+
canLoad: true;
|
|
307
|
+
unavailableReason: null;
|
|
308
|
+
state: Readonly<{
|
|
309
|
+
tag: "idle";
|
|
310
|
+
}>;
|
|
311
|
+
items: readonly [];
|
|
312
|
+
selected: null;
|
|
313
|
+
}> | Readonly<{
|
|
314
|
+
kind: "loading";
|
|
315
|
+
enabled: true;
|
|
316
|
+
canLoad: true;
|
|
317
|
+
unavailableReason: null;
|
|
318
|
+
state: Readonly<{
|
|
319
|
+
tag: "loading";
|
|
320
|
+
}>;
|
|
321
|
+
items: readonly [];
|
|
322
|
+
selected: null;
|
|
323
|
+
}> | Readonly<{
|
|
324
|
+
kind: "error";
|
|
325
|
+
enabled: true;
|
|
326
|
+
canLoad: true;
|
|
327
|
+
unavailableReason: null;
|
|
328
|
+
state: Readonly<{
|
|
329
|
+
tag: "error";
|
|
330
|
+
message: string;
|
|
331
|
+
}>;
|
|
332
|
+
items: readonly [];
|
|
333
|
+
selected: null;
|
|
334
|
+
}> | Readonly<{
|
|
335
|
+
kind: "ready";
|
|
336
|
+
enabled: true;
|
|
337
|
+
canLoad: true;
|
|
338
|
+
unavailableReason: null;
|
|
339
|
+
state: Readonly<{
|
|
340
|
+
tag: "loaded";
|
|
341
|
+
value: readonly EligibleAppointmentPackage[];
|
|
342
|
+
}>;
|
|
343
|
+
items: readonly EligibleAppointmentPackage[];
|
|
344
|
+
selected: EligibleAppointmentPackage | null;
|
|
345
|
+
}>;
|
|
346
|
+
export type BookingAppointmentPackagesUnavailableReason = "disabled" | "missing-portal-auth" | "missing-priced-service";
|
|
347
|
+
export type AppointmentBookingOverrideData = Readonly<{
|
|
348
|
+
form?: BookingFormConfig | Record<string, unknown> | null;
|
|
349
|
+
services?: BookingFormServicesSource | Record<string, unknown> | null;
|
|
350
|
+
}>;
|
|
351
|
+
export type AppointmentBookingOverrideContent = Readonly<{
|
|
352
|
+
formId?: string;
|
|
353
|
+
serviceId?: string;
|
|
354
|
+
resourceId?: string;
|
|
355
|
+
requiresServiceSelection?: boolean;
|
|
356
|
+
requiresResourceSelection?: boolean;
|
|
357
|
+
shouldAutoSelectSingleResource?: boolean;
|
|
358
|
+
spamProtectionEnabled?: boolean;
|
|
359
|
+
successMessage?: string;
|
|
360
|
+
}>;
|
|
361
|
+
export type AppointmentBookingOverridePropsLike = Readonly<{
|
|
362
|
+
content?: AppointmentBookingOverrideContent | null;
|
|
363
|
+
data?: AppointmentBookingOverrideData | Record<string, unknown> | null;
|
|
364
|
+
siteId?: string;
|
|
365
|
+
apiBaseUrl?: string;
|
|
366
|
+
portalToken?: string | null;
|
|
367
|
+
blockId?: string | null;
|
|
368
|
+
}>;
|
|
369
|
+
export type AppointmentBookingOverrideInput = Readonly<{
|
|
370
|
+
siteId: string;
|
|
371
|
+
apiBaseUrl: string;
|
|
372
|
+
portalToken: string | null;
|
|
373
|
+
formId: string;
|
|
374
|
+
form: BookingFormConfig;
|
|
375
|
+
services: readonly BookingFormService[];
|
|
376
|
+
initialServiceId?: string;
|
|
377
|
+
initialResourceId?: string;
|
|
378
|
+
requiresServiceSelection: boolean;
|
|
379
|
+
requiresResourceSelection: boolean;
|
|
380
|
+
shouldAutoSelectSingleResource: boolean;
|
|
381
|
+
spamProtectionEnabled?: boolean;
|
|
382
|
+
successMessage?: string;
|
|
383
|
+
blockId?: string | null;
|
|
384
|
+
}>;
|
|
385
|
+
export type AppointmentBookingOverrideInputResult = Readonly<{
|
|
386
|
+
ok: true;
|
|
387
|
+
value: AppointmentBookingOverrideInput;
|
|
388
|
+
}> | Readonly<{
|
|
389
|
+
ok: false;
|
|
390
|
+
reason: "missing-site-id" | "missing-api-base-url" | "missing-form" | "missing-form-id" | "missing-services";
|
|
391
|
+
message: string;
|
|
392
|
+
}>;
|
|
393
|
+
export declare function createEmptyBookingValidationErrors(): BookingValidationErrors;
|
|
394
|
+
export declare function createFormBookingValidationError(formError: string): BookingValidationErrors;
|
|
395
|
+
export declare function createFieldBookingValidationErrors(fieldErrors: Readonly<Record<string, string>>): BookingValidationErrors;
|
|
396
|
+
export declare function hasBookingValidationErrors(errors: BookingValidationErrors): boolean;
|
|
397
|
+
export declare function createInitialBookingFlowReducerState(input: Readonly<{
|
|
398
|
+
defaultServiceId?: string;
|
|
399
|
+
defaultResourceId?: string;
|
|
400
|
+
initialData?: Partial<BookingFormData>;
|
|
401
|
+
}>): BookingFlowReducerState;
|
|
402
|
+
export declare function bookingFlowReducer(state: BookingFlowReducerState, event: BookingFlowEvent): BookingFlowReducerState;
|
|
403
|
+
export declare function resolveAvailabilitySelectionInvalidation(input: Readonly<{
|
|
404
|
+
selectedDate?: string;
|
|
405
|
+
selectedSlot: BookingSlotView | null;
|
|
406
|
+
availableDates: readonly string[];
|
|
407
|
+
slots: readonly BookingSlotView[];
|
|
408
|
+
}>): AvailabilitySelectionInvalidation;
|
|
409
|
+
export declare function toBookingSlotView(slot: TimeSlot): BookingSlotView;
|
|
410
|
+
export declare function toBookingSlotViews(slots: readonly TimeSlot[]): BookingSlotView[];
|
|
411
|
+
export declare function toBookingFormData(state: BookingFlowReducerState): BookingFormData;
|
|
412
|
+
export declare function buildBookingStepPlan(input: BuildBookingStepPlanInput): readonly BookingStepPlanItem[];
|
|
413
|
+
export declare function validateBookingStep(input: Readonly<{
|
|
414
|
+
stepId: BookingFlowStepId;
|
|
415
|
+
form: BookingFormConfig | null;
|
|
416
|
+
services: readonly BookingFormService[];
|
|
417
|
+
data: Partial<BookingFormData>;
|
|
418
|
+
defaultServiceId?: string;
|
|
419
|
+
defaultResourceId?: string;
|
|
420
|
+
requiresResourceSelection?: boolean;
|
|
421
|
+
paymentResolution?: BookingPaymentStepResolution;
|
|
422
|
+
}>): BookingStepValidationResult;
|
|
423
|
+
export declare function validateBookingFields(input: Readonly<{
|
|
424
|
+
fields: readonly BookingFormField[];
|
|
425
|
+
values: Readonly<Record<string, unknown>>;
|
|
426
|
+
}>): Record<string, string>;
|
|
427
|
+
export declare function validateBookingField(field: BookingFormField, value: unknown): string | null;
|
|
428
|
+
export declare function deriveBookingFlowSteps(input: DeriveBookingFlowStepsInput): DerivedBookingFlowSteps;
|
|
429
|
+
export declare function buildBookingAvailabilityQuery(input: Readonly<{
|
|
430
|
+
serviceId?: string;
|
|
431
|
+
resourceId?: string;
|
|
432
|
+
selectedDate?: string;
|
|
433
|
+
timezone: string;
|
|
434
|
+
requireDate?: boolean;
|
|
435
|
+
}>): BookingAvailabilityQuery;
|
|
436
|
+
export declare function deriveBookingFieldViews(input: Readonly<{
|
|
437
|
+
form: BookingFormConfig | null;
|
|
438
|
+
values: Readonly<Record<string, BookingFieldValue>>;
|
|
439
|
+
errors: Readonly<Record<string, string>>;
|
|
440
|
+
touched?: Readonly<Record<string, boolean>>;
|
|
441
|
+
idPrefix: string;
|
|
442
|
+
}>): readonly BookingFieldView[];
|
|
443
|
+
export declare function buildBookingSubmitPlan(input: Readonly<{
|
|
444
|
+
formId: string;
|
|
445
|
+
form: BookingFormConfig | null;
|
|
446
|
+
state: BookingFlowReducerState;
|
|
447
|
+
services: readonly BookingFormService[];
|
|
448
|
+
defaultServiceId?: string;
|
|
449
|
+
defaultResourceId?: string;
|
|
450
|
+
requiresResourceSelection?: boolean;
|
|
451
|
+
altchaSolution?: string | null;
|
|
452
|
+
viewerTimeZone: string;
|
|
453
|
+
redirect: BookingSubmitRedirectMode;
|
|
454
|
+
successUrl?: string;
|
|
455
|
+
cancelUrl?: string;
|
|
456
|
+
}>): BookingSubmitPlan;
|
|
457
|
+
export declare function getAppointmentBookingOverrideInput(props: AppointmentBookingOverridePropsLike): AppointmentBookingOverrideInputResult;
|
|
458
|
+
export declare function createBookingBlockApiConfig(input: Readonly<{
|
|
459
|
+
siteId: string;
|
|
460
|
+
apiBaseUrl: string;
|
|
461
|
+
portalToken?: string | null;
|
|
462
|
+
}>): BlockApiConfig;
|
|
463
|
+
export declare function resolveHeadlessBookingSelectedService(input: Readonly<{
|
|
464
|
+
state: BookingFlowReducerState;
|
|
465
|
+
services: readonly BookingFormService[];
|
|
466
|
+
defaultServiceId?: string;
|
|
467
|
+
}>): BookingFormService | null;
|
|
468
|
+
export declare function resolveAppointmentPackagesModel(input: Readonly<{
|
|
469
|
+
enabled: boolean;
|
|
470
|
+
canLoad: boolean;
|
|
471
|
+
unavailableReason: BookingAppointmentPackagesUnavailableReason | null;
|
|
472
|
+
state: LoadState<readonly EligibleAppointmentPackage[]>;
|
|
473
|
+
items: readonly EligibleAppointmentPackage[];
|
|
474
|
+
selected: EligibleAppointmentPackage | null;
|
|
475
|
+
}>): BookingAppointmentPackagesModel;
|
|
476
|
+
export declare function resolveHeadlessBookingStatus(input: Readonly<{
|
|
477
|
+
feedback: BookingFlowFeedback;
|
|
478
|
+
isSubmitting: boolean;
|
|
479
|
+
}>): BookingFlowStatus;
|
|
480
|
+
export declare function resolveHeadlessBookingView(input: Readonly<{
|
|
481
|
+
form: BookingFormConfig | null;
|
|
482
|
+
feedback: BookingFlowFeedback;
|
|
483
|
+
}>): BookingFlowView;
|
|
484
|
+
export declare function describeUnknownError(error: unknown, fallback: string): string;
|
|
@@ -50,6 +50,7 @@ export type BookingFormSourceRecord = Readonly<{
|
|
|
50
50
|
createdAt: string;
|
|
51
51
|
updatedAt: string;
|
|
52
52
|
}>;
|
|
53
|
+
export type BookingFormConfigSource = BookingFormConfig | BookingFormSourceRecord | Readonly<Record<string, unknown>>;
|
|
53
54
|
type BlockBookingPaymentTermsAvailability = Readonly<{
|
|
54
55
|
kind: "available";
|
|
55
56
|
paymentTerms: BlockBookingPaymentTerms;
|
|
@@ -196,8 +197,10 @@ export declare function deriveBookingFormViewState(input: Readonly<{
|
|
|
196
197
|
verificationState: AppointmentCheckoutVerificationState;
|
|
197
198
|
}>): BookingFormViewState;
|
|
198
199
|
export declare function resolveBookingSiteId(siteId: string | undefined, form: BookingFormSourceRecord | null | undefined): string;
|
|
199
|
-
export declare function normalizeBookingFormConfig(form:
|
|
200
|
-
export declare function normalizeBookingServices(services:
|
|
200
|
+
export declare function normalizeBookingFormConfig(form: unknown): BookingFormConfig | null;
|
|
201
|
+
export declare function normalizeBookingServices(services: unknown): readonly BookingFormService[];
|
|
202
|
+
export declare const BOOKING_FORM_DATA_RESERVED_KEYS: Set<string>;
|
|
203
|
+
export declare function toSelectedCollectionOptionKind(value: unknown): BookingSelectedCollectionOptionKind | undefined;
|
|
201
204
|
export declare function getBookingServicePaymentSelectionMode(service: BookingFormService | undefined): BookingPaymentSelectionMode;
|
|
202
205
|
export declare function resolveDefaultBookingServiceId(formConfig: BookingFormConfig | null | undefined, services: readonly BookingFormService[]): string | null;
|
|
203
206
|
export declare function resolveBookingSelectedService(input: Readonly<{
|
|
@@ -25,8 +25,11 @@
|
|
|
25
25
|
* @packageDocumentation
|
|
26
26
|
*/
|
|
27
27
|
import * as React from 'react';
|
|
28
|
-
import
|
|
28
|
+
import { HeadlessBookingAltchaWidget, createBookingBlockApiConfig, getAppointmentBookingOverrideInput, useHeadlessBookingFlow } from '@riverbankcms/blocks/client';
|
|
29
|
+
import type { BookingFormClientProps, HeadlessBookingProviderProps, UseBookingFormConfigResult } from './types';
|
|
29
30
|
export declare const BookingFormClient: React.FC<BookingFormClientProps>;
|
|
30
31
|
export declare function useBookingFormConfig(siteId: string, formId: string): UseBookingFormConfigResult;
|
|
32
|
+
export declare const HeadlessBookingProvider: React.FC<HeadlessBookingProviderProps>;
|
|
33
|
+
export { HeadlessBookingAltchaWidget, createBookingBlockApiConfig, getAppointmentBookingOverrideInput, useHeadlessBookingFlow, };
|
|
31
34
|
export type { BookingService, BookingFormConfig } from './types';
|
|
32
|
-
export type { Service, TimeSlot, BookingFormSettings, BookingFormSchema, BookingFormField, BookingFormData, BookingSubmissionData, BookingSubmissionResult, BookingFormClientProps, BookingFormClientForm, BookingFormClientService, UseBookingFormConfigResult, } from './types';
|
|
35
|
+
export type { Service, TimeSlot, BookingFormSettings, BookingFormSchema, BookingFormField, BookingFormData, BookingSubmissionData, BookingSubmissionResult, BookingFormClientProps, BookingFormClientForm, BookingFormClientService, HeadlessBookingFlow, HeadlessBookingFlowOptions, HeadlessBookingProviderProps, AppointmentBookingOverrideData, AppointmentBookingOverrideInput, AppointmentBookingOverrideInputResult, BookingAvailabilityQuery, BookingAppointmentPackagesModel, BookingAppointmentPackagesUnavailableReason, BookingPaymentOptionViewModel, BookingPaymentSelectionViewModel, BookingFieldValue, BookingFieldView, BookingFlowActionResult, BookingFlowFeedback, BookingFlowStatus, BookingResourceView, BookingResourcesModel, BookingFlowStep, BookingFlowStepId, BookingFlowView, BookingSlotView, BookingSubmitActionResult, BookingSubmitOptions, BookingValidationErrors, DerivedBookingFlowSteps, DeriveBookingFlowStepsInput, UseBookingFormConfigResult, } from './types';
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
* These types are exported for SDK sites to use when building custom booking UIs.
|
|
5
5
|
*/
|
|
6
6
|
import type { BookingFlexibleBalanceConfig, BookingInstalmentPlanConfig } from '@riverbankcms/core';
|
|
7
|
+
import type { AppointmentBookingOverrideData, AppointmentBookingOverrideInput, AppointmentBookingOverrideInputResult, BookingAvailabilityQuery, BookingAppointmentPackagesModel, BookingAppointmentPackagesUnavailableReason, BookingPaymentOptionViewModel, BookingPaymentSelectionViewModel, BookingFieldValue, BookingFieldView, BookingFlowActionResult, BookingFlowFeedback, BookingFlowStatus, BookingResourceView, BookingFlowStep, BookingFlowStepId, BookingFlowView, BookingResourcesModel, BookingSlotView, BookingSubmitActionResult, BookingSubmitOptions, BookingValidationErrors, DerivedBookingFlowSteps, DeriveBookingFlowStepsInput, HeadlessBookingFlow, HeadlessBookingFlowOptions, HeadlessBookingProviderProps } from '@riverbankcms/blocks/client';
|
|
8
|
+
export type { AppointmentBookingOverrideData, AppointmentBookingOverrideInput, AppointmentBookingOverrideInputResult, BookingAvailabilityQuery, BookingAppointmentPackagesModel, BookingAppointmentPackagesUnavailableReason, BookingPaymentOptionViewModel, BookingPaymentSelectionViewModel, BookingFieldValue, BookingFieldView, BookingFlowActionResult, BookingFlowFeedback, BookingFlowStatus, BookingResourceView, BookingFlowStep, BookingFlowStepId, BookingFlowView, BookingResourcesModel, BookingSlotView, BookingSubmitActionResult, BookingSubmitOptions, BookingValidationErrors, DerivedBookingFlowSteps, DeriveBookingFlowStepsInput, HeadlessBookingFlow, HeadlessBookingFlowOptions, HeadlessBookingProviderProps, };
|
|
7
9
|
/**
|
|
8
10
|
* A bookable service (e.g., "30-minute consultation", "Hair cut")
|
|
9
11
|
*
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { SiteId } from '@riverbankcms/core';
|
|
2
|
+
import { type CliDatedOfferingCommandBatchSource, type CliDatedOfferingCommandCompileInput, type DatedOfferingReportSubject, type DatedOfferingUpsertItem } from '../../../site-commands';
|
|
3
|
+
import type { WriterOptions } from '../../../content/writer';
|
|
4
|
+
import type { PushScopeResult, ScopePushContext } from './types';
|
|
5
|
+
type CommandBackedDatedOfferingScopeConfig<TLocal, TRemote> = Readonly<{
|
|
6
|
+
source: CliDatedOfferingCommandBatchSource;
|
|
7
|
+
scopeName: string;
|
|
8
|
+
itemLabelSingular: string;
|
|
9
|
+
scopeCommand: DatedOfferingReportSubject['scopeCommand'];
|
|
10
|
+
getIdentifier: (item: TLocal) => string;
|
|
11
|
+
getDisplayLabel: (item: TLocal) => string;
|
|
12
|
+
shouldPushItem?: (item: TLocal) => boolean;
|
|
13
|
+
readLocal: (contentDir: string) => Promise<TLocal[]>;
|
|
14
|
+
readMeta: (contentDir: string) => Promise<Record<string, {
|
|
15
|
+
updatedAt?: string;
|
|
16
|
+
}> | null>;
|
|
17
|
+
fetchRemote: () => Promise<TRemote[]>;
|
|
18
|
+
getRemoteUpdatedAt: (remote: TRemote) => string;
|
|
19
|
+
findRemote: (remoteItems: readonly TRemote[], identifier: string) => TRemote | undefined;
|
|
20
|
+
getRemoteIdentifier: (remote: TRemote) => string;
|
|
21
|
+
updateLocalMeta: (contentDir: string, options?: WriterOptions) => Promise<void>;
|
|
22
|
+
readOnlyStatusWarning?: (item: TLocal) => string | null;
|
|
23
|
+
buildCompileInput: (input: Readonly<{
|
|
24
|
+
source: CliDatedOfferingCommandBatchSource;
|
|
25
|
+
siteId: SiteId;
|
|
26
|
+
targetEnv: ScopePushContext['targetEnv'];
|
|
27
|
+
upserts: readonly DatedOfferingUpsertItem<TLocal>[];
|
|
28
|
+
deletes: readonly string[];
|
|
29
|
+
}>) => CliDatedOfferingCommandCompileInput;
|
|
30
|
+
}>;
|
|
31
|
+
export declare function pushCommandBackedDatedOfferingScope<TLocal, TRemote>(ctx: ScopePushContext, config: CommandBackedDatedOfferingScopeConfig<TLocal, TRemote>): Promise<PushScopeResult>;
|
|
32
|
+
export {};
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import type { OutputContext } from '../../../output';
|
|
2
2
|
import type { ManagementClient } from '../../../../client/management';
|
|
3
3
|
import type { WriterOptions } from '../../../content/writer';
|
|
4
|
+
import type { SiteId } from '@riverbankcms/core';
|
|
5
|
+
import type { EnvTarget } from '../../../helpers';
|
|
4
6
|
export interface ScopePushContext {
|
|
5
7
|
output: OutputContext;
|
|
6
8
|
contentDir: string;
|
|
9
|
+
siteId: SiteId;
|
|
10
|
+
targetEnv: EnvTarget;
|
|
7
11
|
client: ManagementClient;
|
|
8
12
|
dryRun: boolean;
|
|
9
13
|
force: boolean;
|
|
@@ -14,7 +18,7 @@ export interface ScopePushContext {
|
|
|
14
18
|
skipMeta: boolean;
|
|
15
19
|
humanDiff: boolean;
|
|
16
20
|
}
|
|
17
|
-
export type PushScopeResultStatus = 'noop' | 'dry-run' | 'aborted' | 'pushed';
|
|
21
|
+
export type PushScopeResultStatus = 'noop' | 'dry-run' | 'aborted' | 'failed' | 'pushed';
|
|
18
22
|
export interface PushScopeItemError {
|
|
19
23
|
identifier: string;
|
|
20
24
|
error: string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type Result, type SiteId } from '@riverbankcms/core';
|
|
2
2
|
import { type DryRunReport, type SiteCommandBatch, type SiteCommandExecutionSuccess, type SiteCommandOf, type SiteCommandPlanFor, type SiteCommandRef, type SiteCommandType, type SiteCommandValidationError } from '@riverbankcms/site-commands';
|
|
3
3
|
import type { EnvTarget } from '../helpers';
|
|
4
|
-
import { type SyncResult } from '../sync';
|
|
5
4
|
export type CliCommandBatchRefInput<TSource extends string = string> = Readonly<{
|
|
6
5
|
source: TSource;
|
|
7
6
|
siteId: SiteId;
|
|
@@ -46,7 +45,32 @@ export type CliCommandExecutionReportFailure<TSubject> = Readonly<{
|
|
|
46
45
|
message: string;
|
|
47
46
|
subject?: TSubject;
|
|
48
47
|
}>;
|
|
48
|
+
export type CliCommandOutcome<TSubject> = Readonly<{
|
|
49
|
+
status: 'applied';
|
|
50
|
+
commandRef: SiteCommandRef;
|
|
51
|
+
commandType: SiteCommandType;
|
|
52
|
+
subject: TSubject;
|
|
53
|
+
}> | Readonly<{
|
|
54
|
+
status: 'failed';
|
|
55
|
+
commandRef: SiteCommandRef;
|
|
56
|
+
commandType: SiteCommandType;
|
|
57
|
+
identifier: string;
|
|
58
|
+
message: string;
|
|
59
|
+
subject?: TSubject;
|
|
60
|
+
}> | Readonly<{
|
|
61
|
+
status: 'skipped_by_stop_policy';
|
|
62
|
+
commandRef: SiteCommandRef;
|
|
63
|
+
commandType: SiteCommandType;
|
|
64
|
+
identifier: string;
|
|
65
|
+
subject: TSubject;
|
|
66
|
+
}> | Readonly<{
|
|
67
|
+
status: 'compile_failed';
|
|
68
|
+
identifier: string;
|
|
69
|
+
message: string;
|
|
70
|
+
subject?: TSubject;
|
|
71
|
+
}>;
|
|
49
72
|
export type CliCommandExecutionReport<TSubject> = Readonly<{
|
|
73
|
+
outcomes: readonly CliCommandOutcome<TSubject>[];
|
|
50
74
|
appliedSubjects: readonly TSubject[];
|
|
51
75
|
failure: CliCommandExecutionReportFailure<TSubject> | null;
|
|
52
76
|
warnings: readonly string[];
|
|
@@ -94,21 +118,27 @@ export declare function commandExecutionToReport<TCommand extends Readonly<{
|
|
|
94
118
|
commandDisplayIdentifier: (command: TCommand) => string;
|
|
95
119
|
includeFailureSubject?: boolean;
|
|
96
120
|
}>): CliCommandExecutionReport<TSubject>;
|
|
97
|
-
export declare function
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
121
|
+
export declare function commandCompileFailureToReport<TSubject>(input: Readonly<{
|
|
122
|
+
identifier: string;
|
|
123
|
+
message: string;
|
|
124
|
+
subject?: TSubject;
|
|
125
|
+
warnings?: readonly string[];
|
|
126
|
+
}>): CliCommandExecutionReport<TSubject>;
|
|
127
|
+
export declare function executeCompiledCliCommandPlanAsReport<TCompiledPlan extends Readonly<{
|
|
103
128
|
plan: Readonly<{
|
|
104
129
|
commands: readonly unknown[];
|
|
105
130
|
}>;
|
|
106
|
-
}>, TExecutionResult>(input: Readonly<{
|
|
131
|
+
}>, TExecutionResult, TSubject>(input: Readonly<{
|
|
107
132
|
compiledPlan: TCompiledPlan;
|
|
108
133
|
onBeforeExecute?: (commandCount: number) => void;
|
|
109
134
|
executePlan: (plan: TCompiledPlan['plan']) => Promise<TExecutionResult>;
|
|
110
|
-
|
|
135
|
+
executionToReport: (input: Readonly<{
|
|
111
136
|
execution: TExecutionResult;
|
|
112
137
|
compiledPlan: TCompiledPlan;
|
|
113
|
-
}>) =>
|
|
114
|
-
}>): Promise<
|
|
138
|
+
}>) => CliCommandExecutionReport<TSubject>;
|
|
139
|
+
}>): Promise<CliCommandExecutionReport<TSubject>>;
|
|
140
|
+
export declare function reportFromOutcomes<TSubject>(input: Readonly<{
|
|
141
|
+
outcomes: readonly CliCommandOutcome<TSubject>[];
|
|
142
|
+
warnings?: readonly string[];
|
|
143
|
+
}>): CliCommandExecutionReport<TSubject>;
|
|
144
|
+
export declare function commandReportHasFailures(report: CliCommandExecutionReport<unknown>): boolean;
|