@wix/bookings 1.0.1781 → 1.0.1783

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.
Files changed (63) hide show
  1. package/build/cjs/context-booking-checkout.d.ts +32 -0
  2. package/build/cjs/context-booking-checkout.js +2002 -1762
  3. package/build/cjs/context-booking-checkout.js.map +1 -1
  4. package/build/cjs/context-my-booking.d.ts +2832 -0
  5. package/build/cjs/context-my-booking.js +592 -0
  6. package/build/cjs/context-my-booking.js.map +1 -0
  7. package/build/cjs/context-my-bookings.d.ts +2862 -0
  8. package/build/cjs/context-my-bookings.js +12885 -0
  9. package/build/cjs/context-my-bookings.js.map +1 -0
  10. package/build/cjs/context-service-addons.d.ts +54 -3
  11. package/build/cjs/context-service-addons.js +1065 -578
  12. package/build/cjs/context-service-addons.js.map +1 -1
  13. package/build/cjs/context-service.d.ts +35 -24
  14. package/build/cjs/context-service.js +985 -966
  15. package/build/cjs/context-service.js.map +1 -1
  16. package/build/cjs/context-time-slots.d.ts +44 -98
  17. package/build/cjs/context-time-slots.js +456 -474
  18. package/build/cjs/context-time-slots.js.map +1 -1
  19. package/build/es/context-booking-checkout.d.mts +32 -0
  20. package/build/es/context-booking-checkout.mjs +2002 -1762
  21. package/build/es/context-booking-checkout.mjs.map +1 -1
  22. package/build/es/context-my-booking.d.mts +2832 -0
  23. package/build/es/context-my-booking.mjs +562 -0
  24. package/build/es/context-my-booking.mjs.map +1 -0
  25. package/build/es/context-my-bookings.d.mts +2862 -0
  26. package/build/es/context-my-bookings.mjs +12844 -0
  27. package/build/es/context-my-bookings.mjs.map +1 -0
  28. package/build/es/context-service-addons.d.mts +54 -3
  29. package/build/es/context-service-addons.mjs +1061 -574
  30. package/build/es/context-service-addons.mjs.map +1 -1
  31. package/build/es/context-service.d.mts +35 -24
  32. package/build/es/context-service.mjs +985 -966
  33. package/build/es/context-service.mjs.map +1 -1
  34. package/build/es/context-time-slots.d.mts +44 -98
  35. package/build/es/context-time-slots.mjs +456 -474
  36. package/build/es/context-time-slots.mjs.map +1 -1
  37. package/build/internal/cjs/context-booking-checkout.d.ts +32 -0
  38. package/build/internal/cjs/context-my-booking.d.ts +2832 -0
  39. package/build/internal/cjs/context-my-bookings.d.ts +2862 -0
  40. package/build/internal/cjs/context-service-addons.d.ts +54 -3
  41. package/build/internal/cjs/context-service.d.ts +35 -24
  42. package/build/internal/cjs/context-time-slots.d.ts +44 -98
  43. package/build/internal/es/context-booking-checkout.d.mts +32 -0
  44. package/build/internal/es/context-my-booking.d.mts +2832 -0
  45. package/build/internal/es/context-my-bookings.d.mts +2862 -0
  46. package/build/internal/es/context-service-addons.d.mts +54 -3
  47. package/build/internal/es/context-service.d.mts +35 -24
  48. package/build/internal/es/context-time-slots.d.mts +44 -98
  49. package/context/my-booking/package.json +3 -0
  50. package/context/my-bookings/package.json +3 -0
  51. package/context-runtime/context-booking-checkout/runtime.d.ts +32 -0
  52. package/context-runtime/context-booking-checkout/runtime.js +3 -3
  53. package/context-runtime/context-my-booking/runtime.d.ts +2832 -0
  54. package/context-runtime/context-my-booking/runtime.js +2 -0
  55. package/context-runtime/context-my-bookings/runtime.d.ts +2862 -0
  56. package/context-runtime/context-my-bookings/runtime.js +11 -0
  57. package/context-runtime/context-service/runtime.d.ts +35 -24
  58. package/context-runtime/context-service/runtime.js +3 -3
  59. package/context-runtime/context-service-addons/runtime.d.ts +54 -3
  60. package/context-runtime/context-service-addons/runtime.js +2 -2
  61. package/context-runtime/context-time-slots/runtime.d.ts +44 -98
  62. package/context-runtime/context-time-slots/runtime.js +3 -3
  63. package/package.json +20 -4
@@ -0,0 +1,2832 @@
1
+ import React, { FC, PropsWithChildren } from 'react';
2
+
3
+ //#region ../../node_modules/@wix/editor-react-types/dist/links.d.ts
4
+ type LinkTarget = '_self' | '_blank';
5
+ /**
6
+ * A link to a URL, used for navigation within components.
7
+ *
8
+ * @example
9
+ * ```tsx
10
+ * import type { Link } from '@wix/editor-react-types';
11
+ *
12
+ * interface MyComponentProps {
13
+ * link?: Link;
14
+ * }
15
+ * ```
16
+ */
17
+ type Link = {
18
+ /**
19
+ * The link URL. For partial links (see `pageRole`), this is the router prefix
20
+ * (e.g. `https://www.my-site.com/prefix`) rather than a fully resolved URL.
21
+ */
22
+ href?: string;
23
+ /**
24
+ * Where this link should open.
25
+ * - `'_self'` — opens in the same page.
26
+ * - `'_blank'` — opens in a new tab.
27
+ */
28
+ target?: LinkTarget; /** The `rel` attribute of the link. Accepts LinkRel values separated by a space. */
29
+ rel?: string;
30
+ /**
31
+ * Page role identifier. Present only on partial links, where only the router prefix is
32
+ * known and the full URL format is owned by the Router/App. Applications can use such
33
+ * links in functions to resolve the complete URL at runtime (e.g. for binding links).
34
+ * Resolved links will not have this field.
35
+ */
36
+ pageRole?: string;
37
+ };
38
+ //#endregion
39
+ //#region ../../node_modules/@wix/editor-react-types/dist/image.d.ts
40
+ type Point = {
41
+ x: number;
42
+ y: number;
43
+ };
44
+ type Crop = Point & {
45
+ width: number;
46
+ height: number;
47
+ };
48
+ /**
49
+ * An image from Wix Media.
50
+ *
51
+ * @example
52
+ * ```tsx
53
+ * import type { Image } from '@wix/editor-react-types';
54
+ *
55
+ * interface MyComponentProps {
56
+ * image?: Image;
57
+ * }
58
+ *
59
+ * const MyComponent = ({ image }: MyComponentProps) => (
60
+ * <img src={image?.url} alt={image?.alt} />
61
+ * );
62
+ * ```
63
+ */
64
+ type Image = {
65
+ /** The image URI. */uri?: string; /** The image URL. */
66
+ url: string; /** The image file name. */
67
+ name?: string; /** The image height in pixels. */
68
+ height?: number; /** The image width in pixels. */
69
+ width?: number; /** Whether the image is animated (e.g. GIF). */
70
+ animated?: boolean; /** The crop region applied to the image. */
71
+ crop?: Crop; /** The image quality, as a percentage from 0 to 100. */
72
+ quality?: number; /** The image alt text for accessibility. */
73
+ alt?: string;
74
+ };
75
+ //#endregion
76
+ //#region ../../node_modules/@wix/editor-react-types/dist/base.d.ts
77
+ /**
78
+ * Rich text content with resolved links.
79
+ *
80
+ * @example
81
+ * ```tsx
82
+ * import type { RichText } from '@wix/editor-react-types';
83
+ *
84
+ * interface MyComponentProps {
85
+ * description?: RichText;
86
+ * }
87
+ *
88
+ * const MyComponent = ({ description }: MyComponentProps) => (
89
+ * <div>
90
+ * {description?.html}
91
+ * {description?.linkList.map((link) => (
92
+ * <a key={link.href} href={link.href}>{link.href}</a>
93
+ * ))}
94
+ * </div>
95
+ * );
96
+ * ```
97
+ */
98
+ type RichText = {
99
+ /** The original rich text content. */text: string; /** The HTML content with all links resolved. */
100
+ html: string; /** All links present in the rich text content. */
101
+ linkList: Array<Link>;
102
+ };
103
+ //#endregion
104
+ //#region ../../node_modules/type-fest/source/observable-like.d.ts
105
+ declare global {
106
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
107
+ interface SymbolConstructor {
108
+ readonly observable: symbol;
109
+ }
110
+ }
111
+ /**
112
+ @remarks
113
+ The TC39 observable proposal defines a `closed` property, but some implementations (such as xstream) do not as of 10/08/2021.
114
+ As well, some guidance on making an `Observable` to not include `closed` property.
115
+ @see https://github.com/tc39/proposal-observable/blob/master/src/Observable.js#L129-L130
116
+ @see https://github.com/staltz/xstream/blob/6c22580c1d84d69773ee4b0905df44ad464955b3/src/index.ts#L79-L85
117
+ @see https://github.com/benlesh/symbol-observable#making-an-object-observable
118
+
119
+ @category Observable
120
+ */
121
+ //#endregion
122
+ //#region ../../node_modules/@wix/sdk-types/internal/build/index.d.ts
123
+ declare global {
124
+ interface ContextualClient {}
125
+ }
126
+ /**
127
+ * Creates concrete types from SDK descriptors when a contextual client is
128
+ * available.
129
+ *
130
+ * For a REST descriptor the built (bound) API is intersected with the original
131
+ * descriptor, matching what `contextualizeRESTModuleV2` returns at runtime — a
132
+ * value callable as the bound API and still usable as a descriptor. Keeping the
133
+ * descriptor half lets contextual modules be passed to descriptor-constrained
134
+ * helpers such as `elevate` from `@wix/sdk/context` (FEDINF-14092).
135
+ *
136
+ * The `& T` is scoped to REST descriptors — the only shape codegen wraps in
137
+ * `MaybeContext` — so `BuildDescriptors` (used by `createClient().use`) is left
138
+ * unchanged and stays bound-only. The fix lives here rather than in `elevate`,
139
+ * which is kept strict on purpose (see #941) so it still rejects bound-only
140
+ * functions that are unsafe through `createRESTModule`.
141
+ */
142
+ declare global {
143
+ /**
144
+ * A global interface to set the exposure toggle for the SDK.
145
+ * @example
146
+ * ```ts
147
+ * declare global {
148
+ * interface SDKExposureToggle {
149
+ * alpha: true;
150
+ * }
151
+ * }
152
+ */
153
+ interface SDKExposureToggle {}
154
+ }
155
+ declare global {
156
+ /**
157
+ * A global interface to set the type mode for the SDK.
158
+ * @example
159
+ * ```ts
160
+ * declare global {
161
+ * interface SDKTypeMode {
162
+ * strict: true;
163
+ * }
164
+ * }
165
+ */
166
+ interface SDKTypeMode {}
167
+ }
168
+ //#endregion
169
+ //#region ../../node_modules/@wix/auto_sdk_bookings_extended-bookings/build/es/index.typings.d.mts
170
+ declare enum AttendanceStatus$1 {
171
+ /** There is no available attendance information. */
172
+ NOT_SET = "NOT_SET",
173
+ /** At least a single participant attended the session. */
174
+ ATTENDED = "ATTENDED",
175
+ /** No participants attended the session. */
176
+ NOT_ATTENDED = "NOT_ATTENDED"
177
+ }
178
+ /** @enumType */
179
+ type AttendanceStatusWithLiterals = AttendanceStatus$1 | 'NOT_SET' | 'ATTENDED' | 'NOT_ATTENDED';
180
+ /** An entity representing a scheduled appointment, class session, or course. */
181
+ interface Booking extends BookingParticipantsInfoOneOf {
182
+ /**
183
+ * Total number of participants.
184
+ * When creating a booking, use this field only if the relevant service has fixed pricing and doesn't offer [variants and options](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction).
185
+ * @min 1
186
+ */
187
+ totalParticipants?: number;
188
+ /**
189
+ * Information about the booked service choices and participant count for each choice.
190
+ * When creating a booking, use this field only if the booking includes multiple [service variants](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction).
191
+ *
192
+ * For example, use this for a spa package booking that includes different service levels:
193
+ * - 2 participants chose "Standard Package".
194
+ * - 1 participant chose "VIP Package".
195
+ */
196
+ participantsChoices?: ParticipantChoices;
197
+ /**
198
+ * Booking ID.
199
+ * @format GUID
200
+ * @readonly
201
+ */
202
+ _id?: string | null;
203
+ /**
204
+ * An object describing the bookable entity - either a specific time slot or a recurring schedule.
205
+ *
206
+ * The structure depends on the type of service being booked:
207
+ *
208
+ * __For appointment services__: Use `slot` to book a specific time slot with a
209
+ * service provider. Appointments are typically one-time sessions at a specific date and time.
210
+ *
211
+ * __For class services__: Use `slot` to book a specific class session. Classes
212
+ * are individual sessions that can have multiple participants.
213
+ *
214
+ * __For course services__: Use `schedule` to book an entire course consisting of
215
+ * multiple sessions over time. Courses are recurring, multi-session offerings.
216
+ *
217
+ * Choose the appropriate field based on your service type and booking requirements.
218
+ */
219
+ bookedEntity?: BookedEntity;
220
+ /**
221
+ * Contact details of the site visitor or [member](https://dev.wix.com/docs/api-reference/crm/members-contacts/members/members/introduction)
222
+ * making the booking.
223
+ */
224
+ contactDetails?: ContactDetails;
225
+ /**
226
+ * Additional custom fields submitted with the booking form.
227
+ * Deprecated due to Bookings integrating with Wix Forms.
228
+ * You can call Wix Forms' [Get Submission](https://dev.wix.com/docs/api-reference/crm/forms/form-submissions/get-submission) specifying `formSubmissionId` as the `id` to get the submitted booking form data.
229
+ * Read more about the [Bookings Forms integration](https://dev.wix.com/docs/api-reference/business-solutions/bookings/wix-forms-integration).
230
+ * @deprecated Additional custom fields submitted with the booking form.
231
+ * Deprecated due to Bookings integrating with Wix Forms.
232
+ * You can call Wix Forms' [Get Submission](https://dev.wix.com/docs/api-reference/crm/forms/form-submissions/get-submission) specifying `formSubmissionId` as the `id` to get the submitted booking form data.
233
+ * Read more about the [Bookings Forms integration](https://dev.wix.com/docs/api-reference/business-solutions/bookings/wix-forms-integration).
234
+ * @replacedBy form_submission_id
235
+ * @targetRemovalDate 2026-03-31
236
+ */
237
+ additionalFields?: CustomFormField[];
238
+ /**
239
+ * Booking status. A booking is automatically confirmed if the service allows it
240
+ * and an eCommerce order is created. It is automatically declined if there is a
241
+ * double booking and the customer hasn't paid or is eligible for an automatic
242
+ * refund. Currently, only payments with pricing plans are automatically refundable.
243
+ */
244
+ status?: BookingStatusWithLiterals;
245
+ /**
246
+ * The payment status of the booking. This field automatically syncs with the
247
+ * `paymentStatus` of the corresponding [eCommerce order](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/introduction)
248
+ * when customers use Wix eCommerce checkout.
249
+ *
250
+ * ### Integration patterns
251
+ *
252
+ * __When using Wix eCommerce checkout__: Wix Bookings automatically syncs the payment status based on the eCommerce order's payment status.
253
+ * Do not manually update this field.
254
+ *
255
+ * __When using custom payment flows__: You can manually update the payment status with [Confirm Booking or Decline Booking](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings/bookings-writer-v2/confirm-or-decline-booking) to reflect the customer's payment state.
256
+ *
257
+ * __For membership/pricing plan payments__: Wix Bookings automatically manages the payment status when customers pay with an active [pricing plan](https://dev.wix.com/docs/api-reference/business-solutions/pricing-plans/pricing-plans/introduction) subscription.
258
+ *
259
+ * All payment statuses are supported for every booking `status`.
260
+ */
261
+ paymentStatus?: PaymentStatusWithLiterals;
262
+ /**
263
+ * Payment option selected by the customer. If the customer hasn't completed their checkout, they may still change the payment method. Must be one of the payment options offered by the [service](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/introduction), unless `skipSelectedPaymentOptionValidation` is `true`.
264
+ *
265
+ * When the customer pays with a [Wix eCommerce checkout](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/checkout/introduction), this field is required.
266
+ * Otherwise, the Create Booking call fails.
267
+ * For custom checkouts, you don't have to specify this field.
268
+ */
269
+ selectedPaymentOption?: SelectedPaymentOptionWithLiterals;
270
+ /**
271
+ * Date and time the booking was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.
272
+ * @readonly
273
+ */
274
+ _createdDate?: Date | null;
275
+ /** External user ID that you can provide. */
276
+ externalUserId?: string | null;
277
+ /**
278
+ * Revision number to be used when updating, rescheduling, or cancelling the booking.
279
+ * Increments by 1 each time the booking is updated, rescheduled, or canceled. To prevent conflicting changes, the current revision must be specified when updating the booking.
280
+ */
281
+ revision?: string | null;
282
+ /**
283
+ * ID of the creator of the booking.
284
+ * If `appId` and another ID are present, the other ID takes precedence.
285
+ * @readonly
286
+ */
287
+ createdBy?: IdentificationData;
288
+ /**
289
+ * The start date of the booking in `YYYY-MM-DDThh:mm:ss.sssZ` format.
290
+ * For a slot, this is the start date of the slot. For a schedule, this is the start date of the first session.
291
+ * @readonly
292
+ */
293
+ startDate?: Date | null;
294
+ /**
295
+ * The end date of the booking in `YYYY-MM-DDThh:mm:ss.sssZ` format.
296
+ * For a slot, this is the end date of the slot. For a schedule, this is the end date of the last session.
297
+ * @readonly
298
+ */
299
+ endDate?: Date | null;
300
+ /**
301
+ * Date and time the booking was updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.
302
+ * @readonly
303
+ */
304
+ _updatedDate?: Date | null;
305
+ /**
306
+ * Custom field data for this object.
307
+ * Extended fields must be configured in the app dashboard before they can be accessed with API calls.
308
+ */
309
+ extendedFields?: ExtendedFields$1;
310
+ /**
311
+ * Whether this booking overlaps with another confirmed booking. Returned
312
+ * only if set to `true`.
313
+ * @readonly
314
+ */
315
+ doubleBooked?: boolean | null;
316
+ /**
317
+ * Multi-service booking info of which the booking is part of.
318
+ * @readonly
319
+ */
320
+ multiServiceBookingInfo?: MultiServiceBookingInfo;
321
+ /**
322
+ * ID of the [form submission](https://dev.wix.com/docs/rest/crm/forms/form-submissions/introduction)
323
+ * associated with this booking.
324
+ * @format GUID
325
+ */
326
+ formSubmissionId?: string | null;
327
+ /**
328
+ * ID of the [form](https://dev.wix.com/docs/rest/crm/forms/form-schemas/form-object)
329
+ * associated with this booking. The value depends on how the
330
+ * booking was created:
331
+ * - For bookings created with Create Booking or Bulk Create Booking, `formId`
332
+ * is identical to ID of the booking form that's associated with the relevant
333
+ * service.
334
+ * - For bookings created via Create Multi Service Booking, `formId` is set to
335
+ * `00000000-0000-0000-0000-000000000000` (the default booking form ID).
336
+ * @format GUID
337
+ * @readonly
338
+ */
339
+ formId?: string | null;
340
+ /**
341
+ * List of [add-ons](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/introduction) associated with the booking.
342
+ * @maxSize 21
343
+ */
344
+ bookedAddOns?: BookedAddOn[];
345
+ /**
346
+ * ID of the app that's associated with the booking.
347
+ * Inherited from the `appId` of the service associated with the booking.
348
+ * Bookings are displayed in Wix Bookings only if they are associated with the Wix Bookings app ID or have no associated app ID.
349
+ * For bookings from Wix apps, the following values apply:
350
+ * - Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
351
+ * - Wix Services: `"cc552162-24a4-45e0-9695-230c4931ef40"`
352
+ * - Wix Meetings: `"6646a75c-2027-4f49-976c-58f3d713ed0f"`
353
+ * [Full list of apps created by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).
354
+ * <!-- TODO: Uncomment when Platform docs are published - Learn more about [app identity in the Bookings Platform](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings-platform/app-identity-in-the-bookings-platform). -->
355
+ * @format GUID
356
+ * @readonly
357
+ */
358
+ appId?: string | null;
359
+ /**
360
+ * ID of the app that created the booking. This field is used for analytics, auditing, and tracking creation sources.
361
+ * This read-only field is automatically populated during booking creation by checking these sources in order:
362
+ * 1. The caller's App ID from the request identity context (external app or server identity).
363
+ * 2. The booking's `appId` field (inherited from the service's `appId`).
364
+ * 3. The Wix Bookings App ID (`13d21c63-b5ec-5912-8397-c3a5ddb27a97`) as the final fallback.
365
+ * <!-- TODO: Uncomment when Platform docs are published - Learn more about [app identity in the Bookings Platform](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings-platform/app-identity-in-the-bookings-platform). -->
366
+ * @format GUID
367
+ * @readonly
368
+ */
369
+ createdByAppId?: string | null;
370
+ /**
371
+ * Whether the customer chooses to pay only the deposit amount upfront.
372
+ *
373
+ * - `true`: The customer pays only the deposit amount upfront.
374
+ * - `false`: The customer pays the full price upfront.
375
+ *
376
+ * Used only when `selectedPaymentOption` is `ONLINE` and the [service](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/introduction) has a deposit amount set.
377
+ *
378
+ * When the service supports deposit payments and `fullUpfrontPaymentAllowed` is `false`, this field must be `true`.
379
+ * When the service supports deposit payments and `fullUpfrontPaymentAllowed` is `true`, this field can be `true` or `false`.
380
+ */
381
+ depositSelected?: boolean | null;
382
+ }
383
+ /** @oneof */
384
+ interface BookingParticipantsInfoOneOf {
385
+ /**
386
+ * Total number of participants.
387
+ * When creating a booking, use this field only if the relevant service has fixed pricing and doesn't offer [variants and options](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction).
388
+ * @min 1
389
+ */
390
+ totalParticipants?: number;
391
+ /**
392
+ * Information about the booked service choices and participant count for each choice.
393
+ * When creating a booking, use this field only if the booking includes multiple [service variants](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction).
394
+ *
395
+ * For example, use this for a spa package booking that includes different service levels:
396
+ * - 2 participants chose "Standard Package".
397
+ * - 1 participant chose "VIP Package".
398
+ */
399
+ participantsChoices?: ParticipantChoices;
400
+ }
401
+ /**
402
+ * Type of multi-service booking.
403
+ * Defines how individual bookings within a multi-service package are scheduled relative to each other.
404
+ */
405
+ declare enum MultiServiceBookingType {
406
+ /**
407
+ * Bookings must be scheduled back-to-back.
408
+ * Each booking starts when the previous one ends, with no gaps between them.
409
+ */
410
+ SEQUENTIAL_BOOKINGS = "SEQUENTIAL_BOOKINGS",
411
+ /**
412
+ * Bookings can be scheduled separately.
413
+ * Each booking can be at different times, not necessarily consecutive.
414
+ * Not currently supported.
415
+ */
416
+ SEPARATE_BOOKINGS = "SEPARATE_BOOKINGS",
417
+ /**
418
+ * Bookings occur at the same time.
419
+ * All bookings in the package are scheduled for the same time slot.
420
+ * Not currently supported.
421
+ */
422
+ PARALLEL_BOOKINGS = "PARALLEL_BOOKINGS"
423
+ }
424
+ /** @enumType */
425
+ type MultiServiceBookingTypeWithLiterals = MultiServiceBookingType | 'SEQUENTIAL_BOOKINGS' | 'SEPARATE_BOOKINGS' | 'PARALLEL_BOOKINGS';
426
+ interface BookedEntity extends BookedEntityItemOneOf {
427
+ /**
428
+ * [Booked slot](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings-and-time-slots/time-slots/availability-calendar/query-availability).
429
+ *
430
+ * Specify `slot` when creating bookings for:
431
+ * - __Appointment-based services__: Individual sessions with service providers (consultations, treatments).
432
+ * Wix Bookings creates a new session when the booking is confirmed.
433
+ * - __Class services__: Group sessions at specific times (fitness classes, workshops).
434
+ * Wix Bookings links the booking to an existing scheduled session.
435
+ *
436
+ * For course services, specify `schedule` instead of `slot`.
437
+ */
438
+ slot?: BookedSlot;
439
+ /**
440
+ * [Booked schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction).
441
+ *
442
+ * Specify `schedule` when creating bookings for:
443
+ * - __Course services__: Multi-session offerings spanning weeks or months (educational courses, training programs).
444
+ * Wix Bookings enrolls participants in all sessions defined by the course schedule.
445
+ */
446
+ schedule?: BookedSchedule;
447
+ /**
448
+ * Session title at the time of booking. If there is no pre-existing session,
449
+ * for example for appointment-based services, Wix Bookings sets `title` to the service name.
450
+ * @readonly
451
+ * @maxLength 6000
452
+ */
453
+ title?: string | null;
454
+ /**
455
+ * List of tags for the booking.
456
+ *
457
+ * - "INDIVIDUAL": For bookings of appointment-based services. Including when the appointment is for a group of participants.
458
+ * - "GROUP": For bookings of individual class sessions.
459
+ * - "COURSE": For course bookings.
460
+ */
461
+ tags?: string[] | null;
462
+ }
463
+ /** @oneof */
464
+ interface BookedEntityItemOneOf {
465
+ /**
466
+ * [Booked slot](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings-and-time-slots/time-slots/availability-calendar/query-availability).
467
+ *
468
+ * Specify `slot` when creating bookings for:
469
+ * - __Appointment-based services__: Individual sessions with service providers (consultations, treatments).
470
+ * Wix Bookings creates a new session when the booking is confirmed.
471
+ * - __Class services__: Group sessions at specific times (fitness classes, workshops).
472
+ * Wix Bookings links the booking to an existing scheduled session.
473
+ *
474
+ * For course services, specify `schedule` instead of `slot`.
475
+ */
476
+ slot?: BookedSlot;
477
+ /**
478
+ * [Booked schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction).
479
+ *
480
+ * Specify `schedule` when creating bookings for:
481
+ * - __Course services__: Multi-session offerings spanning weeks or months (educational courses, training programs).
482
+ * Wix Bookings enrolls participants in all sessions defined by the course schedule.
483
+ */
484
+ schedule?: BookedSchedule;
485
+ }
486
+ interface BookedSlot {
487
+ /**
488
+ * Session ID. For class bookings, this is the ID of the existing session.
489
+ * For appointment bookings, this field is typically empty during booking creation and gets populated when the booking is confirmed.
490
+ *
491
+ * __Migration Guidance__: Replace usage of this field with `eventId` from the [Time Slots V2 API](https://dev.wix.com/docs/api-reference/business-solutions/bookings/time-slots/time-slots-v2/introduction).
492
+ * You can follow [these sample flows](https://dev.wix.com/docs/api-reference/business-solutions/bookings/end-to-end-booking-flows) for step-by-step guidance about determining availability and creating bookings.
493
+ * @deprecated Session ID. For class bookings, this is the ID of the existing session.
494
+ * For appointment bookings, this field is typically empty during booking creation and gets populated when the booking is confirmed.
495
+ *
496
+ * __Migration Guidance__: Replace usage of this field with `eventId` from the [Time Slots V2 API](https://dev.wix.com/docs/api-reference/business-solutions/bookings/time-slots/time-slots-v2/introduction).
497
+ * You can follow [these sample flows](https://dev.wix.com/docs/api-reference/business-solutions/bookings/end-to-end-booking-flows) for step-by-step guidance about determining availability and creating bookings.
498
+ * @replacedBy event_id
499
+ * @targetRemovalDate 2026-03-31
500
+ */
501
+ sessionId?: string | null;
502
+ /** Service ID. */
503
+ serviceId?: string;
504
+ /** Schedule ID. */
505
+ scheduleId?: string;
506
+ /**
507
+ * ID of the corresponding [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction).
508
+ * Available for both appointment and class bookings, not available for course bookings.
509
+ * For appointment-based services, Wix Bookings automatically populates `eventId` when the booking `status` changes to `CONFIRMED`.
510
+ * For class bookings, Wix Bookings automatically populates `eventId` upon booking creation.
511
+ * @minLength 36
512
+ * @maxLength 250
513
+ */
514
+ eventId?: string | null;
515
+ /** The start time of this slot in `YYYY-MM-DDThh:mm:ss`, `YYYY-MM-DDThh:mm:ss:SSS`, or `YYYY-MM-DDThh:mm:ss:SSSZZ` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601). For example, `2026-01-30T13:30:00`, `2026-01-30T13:30:00:000`, or `2026-01-30T13:30:00:000-05:00`. */
516
+ startDate?: string | null;
517
+ /** The end time of this slot in `YYYY-MM-DDThh:mm:ss`, `YYYY-MM-DDThh:mm:ss:SSS`, or `YYYY-MM-DDThh:mm:ss:SSSZZ` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601). For example, `2026-01-30T13:30:00`, `2026-01-30T13:30:00:000`, or `2026-01-30T13:30:00:000-05:00`. */
518
+ endDate?: string | null;
519
+ /**
520
+ * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database).
521
+ * For example, `America/New_York` or `UTC`. This is the time zone in which the slot was shown to the customer at the time of booking. Wix Bookings ensures that the slot is always displayed in this same time zone to the customer, including when they view or edit their booking in the future.
522
+ */
523
+ timezone?: string | null;
524
+ /**
525
+ * [Primary resource](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/introduction) for the booking.
526
+ * For example, the [staff member](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members/introduction) providing the service.
527
+ */
528
+ resource?: BookedResource;
529
+ /** Location where the session takes place. */
530
+ location?: Location;
531
+ /**
532
+ * Information about how the customer has selected resources for the booking.
533
+ * Each resource type may have a different selection method.
534
+ * Check `resource` for resource details.
535
+ * @maxSize 3
536
+ */
537
+ resourceSelections?: ResourceSelection[];
538
+ /**
539
+ * Whether the booked slot spans one or more full days.
540
+ * For class bookings, this value is synced from the linked calendar event.
541
+ * For appointment bookings, this value is derived from the availability slot at booking creation or reschedule time.
542
+ *
543
+ * When `true`, `startDate` is set to `00:00:00` of the first day and `endDate` is set to `00:00:00` of the day after the last day (exclusive). Midnight boundaries are interpreted in the slot's `timezone`.
544
+ *
545
+ * Default: `false`
546
+ */
547
+ allDay?: boolean | null;
548
+ /**
549
+ * Duration unit type for the booking. Populated only for bookings of [services](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/service-object) configured with a duration range, such as hourly or daily duration-range services. Use together with `durationUnitCount` to determine the booked duration.
550
+ *
551
+ * Returned only when the service has a `schedule.availabilityConstraints.durationRange`.
552
+ * @readonly
553
+ */
554
+ durationUnitType?: DurationUnitTypeWithLiterals;
555
+ /**
556
+ * Number of booked duration units. Populated only for bookings of [services](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/service-object) configured with a duration range.
557
+ * The meaning depends on `durationUnitType`:
558
+ * - `HOUR`: Duration in minutes. For example, `120` for a 2-hour booking.
559
+ * - `DAY`: Duration in days. For example, `3` for a 3-day booking.
560
+ *
561
+ * Returned only when the service has a `schedule.availabilityConstraints.durationRange`.
562
+ * @min 1
563
+ * @max 1440
564
+ * @readonly
565
+ */
566
+ durationUnitCount?: number | null;
567
+ }
568
+ interface BookedResource {
569
+ /**
570
+ * ID of the booking's primary resource.
571
+ * @format GUID
572
+ */
573
+ _id?: string;
574
+ /**
575
+ * Resource's name at the time of booking.
576
+ * @maxLength 40
577
+ */
578
+ name?: string | null;
579
+ /**
580
+ * Resource's email at the time of booking.
581
+ * @maxLength 500
582
+ */
583
+ email?: string | null;
584
+ /**
585
+ * ID of the schedule belonging to the booking's primary resource.
586
+ * @format GUID
587
+ */
588
+ scheduleId?: string | null;
589
+ /**
590
+ * ID of the [resource type](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resource-types-v2/introduction) associated with this resource.
591
+ * For example, `"1cd44cf8-756f-41c3-bd90-3e2ffcaf1155"` for a staff member resource type.
592
+ * @format GUID
593
+ * @readonly
594
+ */
595
+ type?: string | null;
596
+ }
597
+ interface Location {
598
+ /**
599
+ * Business location ID. Available only for locations that are business locations,
600
+ * meaning the `location_type` is `"OWNER_BUSINESS"`.
601
+ * @format GUID
602
+ */
603
+ _id?: string | null;
604
+ /** Location name. */
605
+ name?: string | null;
606
+ /** The full address of this location. */
607
+ formattedAddress?: string | null;
608
+ /**
609
+ * The full translated address of this location.
610
+ * @maxLength 512
611
+ */
612
+ formattedAddressTranslated?: string | null;
613
+ /** Location type. */
614
+ locationType?: LocationTypeWithLiterals;
615
+ }
616
+ declare enum LocationType {
617
+ /** Undefined location type. */
618
+ UNDEFINED = "UNDEFINED",
619
+ /** The business address, as set in the site’s general settings. */
620
+ OWNER_BUSINESS = "OWNER_BUSINESS",
621
+ /** The address as set when creating the service. */
622
+ OWNER_CUSTOM = "OWNER_CUSTOM",
623
+ /** The address as set for the individual session. */
624
+ CUSTOM = "CUSTOM"
625
+ }
626
+ /** @enumType */
627
+ type LocationTypeWithLiterals = LocationType | 'UNDEFINED' | 'OWNER_BUSINESS' | 'OWNER_CUSTOM' | 'CUSTOM';
628
+ /** TODO: should we import it from services-2? */
629
+ interface ResourceSelection {
630
+ /**
631
+ * ID of the [resource type](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resource-types-v2/introduction).
632
+ * @format GUID
633
+ */
634
+ resourceTypeId?: string | null;
635
+ /** Information about how the customer has selected the resource for this resource type. */
636
+ selectionMethod?: SelectionMethodWithLiterals;
637
+ /**
638
+ * Gender the customer narrowed "any available resource" to, for a staff member resource type.
639
+ *
640
+ * Populated only when `selectionMethod` is `ANY_RESOURCE`, the resource type is the staff member resource type, and the business allows customers to narrow "any available" by gender.
641
+ *
642
+ * Omit the field for a plain "any available staff member" with no gender narrowing.
643
+ *
644
+ * Requires `genderPubliclyAccessible` to be enabled in the business's [staff member settings](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-member-settings/introduction). Creating a booking with this field fails when it's disabled.
645
+ */
646
+ requestedGender?: RequestedGenderValue;
647
+ }
648
+ declare enum SelectionMethod {
649
+ /** The customer explicitly chose a particular resource. */
650
+ SPECIFIC_RESOURCE = "SPECIFIC_RESOURCE",
651
+ /** The customer explicitly chose "any available resource" for this resource type. */
652
+ ANY_RESOURCE = "ANY_RESOURCE",
653
+ /** The customer wasn't offered a resource selection or agreement option for this resource type. */
654
+ NO_SELECTION = "NO_SELECTION"
655
+ }
656
+ /** @enumType */
657
+ type SelectionMethodWithLiterals = SelectionMethod | 'SPECIFIC_RESOURCE' | 'ANY_RESOURCE' | 'NO_SELECTION';
658
+ /** Gender a customer requested when narrowing "any available staff member" to a gender. */
659
+ interface RequestedGenderValue {
660
+ /** Requested gender. */
661
+ gender?: RequestedGenderWithLiterals;
662
+ }
663
+ declare enum RequestedGender {
664
+ /** The customer requested any available male staff member. */
665
+ ANY_MALE = "ANY_MALE",
666
+ /** The customer requested any available female staff member. */
667
+ ANY_FEMALE = "ANY_FEMALE"
668
+ }
669
+ /** @enumType */
670
+ type RequestedGenderWithLiterals = RequestedGender | 'ANY_MALE' | 'ANY_FEMALE';
671
+ declare enum DurationUnitType {
672
+ /** Hourly duration. When `durationUnitType` is `HOUR`, `durationUnitCount` represents the booked duration in minutes. */
673
+ HOUR = "HOUR",
674
+ /** Daily duration. When `durationUnitType` is `DAY`, `durationUnitCount` represents the booked duration in days. */
675
+ DAY = "DAY"
676
+ }
677
+ /** @enumType */
678
+ type DurationUnitTypeWithLiterals = DurationUnitType | 'HOUR' | 'DAY';
679
+ interface BookedSchedule {
680
+ /** [Schedule ID](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction). */
681
+ scheduleId?: string;
682
+ /**
683
+ * Booked service ID.
684
+ * @format GUID
685
+ */
686
+ serviceId?: string | null;
687
+ /**
688
+ * [Location](https://dev.wix.com/docs/rest/business-management/locations/introduction) where the schedule's sessions take place.
689
+ * @readonly
690
+ */
691
+ location?: Location;
692
+ /**
693
+ * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database).
694
+ * For example, `America/New_York` or `UTC`. This is the time zone in which the schedule was shown to the customer at the time of booking. Wix Bookings ensures that the schedule is always displayed in this same time zone to the customer, including when they view or edit their booking in the future.
695
+ */
696
+ timezone?: string | null;
697
+ /**
698
+ * Start time of the first session related to the booking in `YYYY-MM-DDThh:mm:ss`, `YYYY-MM-DDThh:mm:ss:SSS`, or `YYYY-MM-DDThh:mm:ss:SSSZZ` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601). For example, `2026-01-30T13:30:00`, `2026-01-30T13:30:00:000`, or `2026-01-30T13:30:00:000-05:00`.
699
+ * @readonly
700
+ */
701
+ firstSessionStart?: string | null;
702
+ /**
703
+ * End time of the last session related to the booking in `YYYY-MM-DDThh:mm:ss`, `YYYY-MM-DDThh:mm:ss:SSS`, or `YYYY-MM-DDThh:mm:ss:SSSZZ` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601). For example, `2026-01-30T13:30:00`, `2026-01-30T13:30:00:000`, or `2026-01-30T13:30:00:000-05:00`.
704
+ * @readonly
705
+ */
706
+ lastSessionEnd?: string | null;
707
+ }
708
+ interface ContactDetails {
709
+ /**
710
+ * Contact ID.
711
+ * @format GUID
712
+ */
713
+ contactId?: string | null;
714
+ /**
715
+ * Contact's first name. When populated from a standard booking form, this
716
+ * property corresponds to the `name` field.
717
+ */
718
+ firstName?: string | null;
719
+ /** Contact's last name. */
720
+ lastName?: string | null;
721
+ /**
722
+ * Contact's email. If no [contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/contact-object)
723
+ * with this email exist, a new contact is created.
724
+ * Used to validate coupon usage limitations per contact. If not specified,
725
+ * the coupon usage limitation will not be enforced. (Coupon usage limitation
726
+ * validation is not supported yet).
727
+ * @format EMAIL
728
+ */
729
+ email?: string | null;
730
+ /** Contact's phone number. */
731
+ phone?: string | null;
732
+ /** Contact's full address. */
733
+ fullAddress?: Address;
734
+ /**
735
+ * Contact's time zone.
736
+ * @deprecated Contact's time zone.
737
+ * @targetRemovalDate 2026-03-31
738
+ */
739
+ timeZone?: string | null;
740
+ /**
741
+ * Contact's country in [ISO 3166-1 alpha-2 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
742
+ * format.
743
+ * @format COUNTRY
744
+ */
745
+ countryCode?: string | null;
746
+ }
747
+ /** Physical address */
748
+ interface Address extends AddressStreetOneOf {
749
+ /** Street name, number and apartment number. */
750
+ streetAddress?: StreetAddress;
751
+ /** Main address line, usually street and number, as free text. */
752
+ addressLine?: string | null;
753
+ /**
754
+ * Country code.
755
+ * @format COUNTRY
756
+ */
757
+ country?: string | null;
758
+ /** Subdivision. Usually state, region, prefecture or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
759
+ subdivision?: string | null;
760
+ /** City name. */
761
+ city?: string | null;
762
+ /** Zip/postal code. */
763
+ postalCode?: string | null;
764
+ /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
765
+ addressLine2?: string | null;
766
+ /** A string containing the full address of this location. */
767
+ formattedAddress?: string | null;
768
+ /** Free text to help find the address. */
769
+ hint?: string | null;
770
+ /** Coordinates of the physical address. */
771
+ geocode?: AddressLocation;
772
+ /** Country full name. */
773
+ countryFullname?: string | null;
774
+ /** Multi-level subdivisions from top to bottom. */
775
+ subdivisions?: Subdivision[];
776
+ }
777
+ /** @oneof */
778
+ interface AddressStreetOneOf {
779
+ /** Street name, number and apartment number. */
780
+ streetAddress?: StreetAddress;
781
+ /** Main address line, usually street and number, as free text. */
782
+ addressLine?: string | null;
783
+ }
784
+ interface StreetAddress {
785
+ /** Street number. */
786
+ number?: string;
787
+ /** Street name. */
788
+ name?: string;
789
+ /** Apartment number. */
790
+ apt?: string;
791
+ }
792
+ interface AddressLocation {
793
+ /** Address latitude. */
794
+ latitude?: number | null;
795
+ /** Address longitude. */
796
+ longitude?: number | null;
797
+ }
798
+ interface Subdivision {
799
+ /** Subdivision code. Usually state, region, prefecture or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
800
+ code?: string;
801
+ /** Subdivision full name. */
802
+ name?: string;
803
+ }
804
+ interface CustomFormField {
805
+ /**
806
+ * ID of the form field as defined in the form.
807
+ * @format GUID
808
+ */
809
+ _id?: string;
810
+ /** Value that was submitted for this field. */
811
+ value?: string | null;
812
+ /**
813
+ * Form field's label at the time of submission.
814
+ * @readonly
815
+ */
816
+ label?: string | null;
817
+ /** flynt-disable-next-line missing-field-comments */
818
+ valueType?: ValueTypeWithLiterals;
819
+ }
820
+ declare enum ValueType {
821
+ /** Short text. This is the default value type. */
822
+ SHORT_TEXT = "SHORT_TEXT",
823
+ /** Long text. */
824
+ LONG_TEXT = "LONG_TEXT",
825
+ /** A text that represents the check box value. If selected the value is `true`, otherwise `false`. */
826
+ CHECK_BOX = "CHECK_BOX"
827
+ }
828
+ /** @enumType */
829
+ type ValueTypeWithLiterals = ValueType | 'SHORT_TEXT' | 'LONG_TEXT' | 'CHECK_BOX';
830
+ /** Booking status. */
831
+ declare enum BookingStatus$1 {
832
+ /** The booking was created, but the customer hasn't completed the related eCommerce order yet. */
833
+ CREATED = "CREATED",
834
+ /** The merchant has confirmed the booking and it appears in the business calendar. Merchants can set up their [services](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction) to automatically confirm all `PENDING` bookings. */
835
+ CONFIRMED = "CONFIRMED",
836
+ /**
837
+ * The customer has canceled the booking. Depending on the relevant service's [policy snapshot](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policy-snapshots/introduction)
838
+ * they may have to pay a [cancellation fee](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/booking-fees/introduction).
839
+ */
840
+ CANCELED = "CANCELED",
841
+ /** The merchant must manually confirm the booking before it appears in the business calendar. */
842
+ PENDING = "PENDING",
843
+ /** The merchant has declined the booking before the customer was charged. */
844
+ DECLINED = "DECLINED",
845
+ /** Currently, you can't call [Register to Waitlist](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/waitlist/register-to-waitlist) for course or appointment bookings, even though this is supported in live sites. */
846
+ WAITING_LIST = "WAITING_LIST"
847
+ }
848
+ /** @enumType */
849
+ type BookingStatusWithLiterals = BookingStatus$1 | 'CREATED' | 'CONFIRMED' | 'CANCELED' | 'PENDING' | 'DECLINED' | 'WAITING_LIST';
850
+ /**
851
+ * Payment status.
852
+ * Automatically updated when using eCommerce checkout APIs.
853
+ */
854
+ declare enum PaymentStatus {
855
+ /** Undefined payment status. */
856
+ UNDEFINED = "UNDEFINED",
857
+ /** The booking isn't paid. */
858
+ NOT_PAID = "NOT_PAID",
859
+ /** The booking is fully paid. */
860
+ PAID = "PAID",
861
+ /** The booking is partially paid. */
862
+ PARTIALLY_PAID = "PARTIALLY_PAID",
863
+ /** The booking is refunded. */
864
+ REFUNDED = "REFUNDED",
865
+ /** The booking is free of charge. */
866
+ EXEMPT = "EXEMPT",
867
+ /**
868
+ * The most recent subscription payment for this booking failed. If the payment is later recovered, the status changes back to `PAID`. Returned only for course bookings with subscription pricing.
869
+ * @documentationMaturity preview
870
+ */
871
+ FAILED = "FAILED"
872
+ }
873
+ /** @enumType */
874
+ type PaymentStatusWithLiterals = PaymentStatus | 'UNDEFINED' | 'NOT_PAID' | 'PAID' | 'PARTIALLY_PAID' | 'REFUNDED' | 'EXEMPT' | 'FAILED';
875
+ /**
876
+ * Selected payment option.
877
+ *
878
+ * One of the payment options offered by the service.
879
+ * This field is set when the user selects an option during booking.
880
+ * If left undefined, the payment option is resolved by the service configuration on checkout.
881
+ */
882
+ declare enum SelectedPaymentOption {
883
+ /** Undefined payment option. */
884
+ UNDEFINED = "UNDEFINED",
885
+ /** Offline payment. */
886
+ OFFLINE = "OFFLINE",
887
+ /** Online payment. */
888
+ ONLINE = "ONLINE",
889
+ /** Payment using a Wix Pricing Plan. */
890
+ MEMBERSHIP = "MEMBERSHIP",
891
+ /**
892
+ * Customers can pay only in person with a Wix Pricing Plan, while the Wix user
893
+ * must manually redeem the pricing plan in the dashboard.
894
+ */
895
+ MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE"
896
+ }
897
+ /** @enumType */
898
+ type SelectedPaymentOptionWithLiterals = SelectedPaymentOption | 'UNDEFINED' | 'OFFLINE' | 'ONLINE' | 'MEMBERSHIP' | 'MEMBERSHIP_OFFLINE';
899
+ interface IdentificationData extends IdentificationDataIdOneOf {
900
+ /**
901
+ * ID of a site visitor that has not logged in to the site.
902
+ * @format GUID
903
+ */
904
+ anonymousVisitorId?: string;
905
+ /**
906
+ * ID of a site visitor that has logged in to the site.
907
+ * @format GUID
908
+ */
909
+ memberId?: string;
910
+ /**
911
+ * ID of a Wix user (site owner, contributor, etc.).
912
+ * @format GUID
913
+ */
914
+ wixUserId?: string;
915
+ /**
916
+ * ID of an app.
917
+ * @format GUID
918
+ */
919
+ appId?: string;
920
+ /**
921
+ * ID of of a contact in the site's [CRM by Ascend](https://www.wix.com/ascend/crm) system.
922
+ * @format GUID
923
+ */
924
+ contactId?: string | null;
925
+ }
926
+ /** @oneof */
927
+ interface IdentificationDataIdOneOf {
928
+ /**
929
+ * ID of a site visitor that has not logged in to the site.
930
+ * @format GUID
931
+ */
932
+ anonymousVisitorId?: string;
933
+ /**
934
+ * ID of a site visitor that has logged in to the site.
935
+ * @format GUID
936
+ */
937
+ memberId?: string;
938
+ /**
939
+ * ID of a Wix user (site owner, contributor, etc.).
940
+ * @format GUID
941
+ */
942
+ wixUserId?: string;
943
+ /**
944
+ * ID of an app.
945
+ * @format GUID
946
+ */
947
+ appId?: string;
948
+ }
949
+ interface ExtendedFields$1 {
950
+ /**
951
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
952
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
953
+ *
954
+ * You can only access fields for which you have the appropriate permissions.
955
+ *
956
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
957
+ */
958
+ namespaces?: Record<string, Record<string, any>>;
959
+ }
960
+ interface ParticipantChoices {
961
+ /**
962
+ * Information about the booked service choices. Includes the number of participants.
963
+ * @minSize 1
964
+ * @maxSize 20
965
+ */
966
+ serviceChoices?: ServiceChoices[];
967
+ }
968
+ interface ServiceChoices {
969
+ /**
970
+ * Number of participants for this [variant](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction).
971
+ * @min 1
972
+ */
973
+ numberOfParticipants?: number | null;
974
+ /**
975
+ * Service choices for these participants.
976
+ * @maxSize 5
977
+ */
978
+ choices?: ServiceChoice[];
979
+ }
980
+ interface ServiceChoice extends ServiceChoiceChoiceOneOf {
981
+ /**
982
+ * Value for one of the choices in the [`CustomServiceOption.choices`](https://example.com) list.
983
+ * Choices are specific values for an option the customer can choose to book. For example,
984
+ * the option `ageGroup` may have these choices: `child`, `student`, `adult`, and `senior`.
985
+ * Each choice may have a different price.
986
+ */
987
+ custom?: string;
988
+ duration?: Duration;
989
+ /** The matched date-time pricing rule. Available only for `DATE_TIME` options. */
990
+ dateTime?: DateTimeRule;
991
+ /** The matched participants pricing rule. Available only for `NUMBER_OF_PARTICIPANTS` options. */
992
+ participantRange?: ParticipantsRange;
993
+ /**
994
+ * ID of the corresponding option for the choice. For example, the choice `child`
995
+ * could correspond to the option `ageGroup`. In this case, `optionId` is the ID
996
+ * for the `ageGroup` option.
997
+ * @format GUID
998
+ */
999
+ optionId?: string;
1000
+ /**
1001
+ * ID of the service choice. When provided, the choice details are automatically populated based on this ID.
1002
+ * @format GUID
1003
+ */
1004
+ choiceId?: string | null;
1005
+ }
1006
+ /** @oneof */
1007
+ interface ServiceChoiceChoiceOneOf {
1008
+ /**
1009
+ * Value for one of the choices in the [`CustomServiceOption.choices`](https://example.com) list.
1010
+ * Choices are specific values for an option the customer can choose to book. For example,
1011
+ * the option `ageGroup` may have these choices: `child`, `student`, `adult`, and `senior`.
1012
+ * Each choice may have a different price.
1013
+ */
1014
+ custom?: string;
1015
+ duration?: Duration;
1016
+ /** The matched date-time pricing rule. Available only for `DATE_TIME` options. */
1017
+ dateTime?: DateTimeRule;
1018
+ /** The matched participants pricing rule. Available only for `NUMBER_OF_PARTICIPANTS` options. */
1019
+ participantRange?: ParticipantsRange;
1020
+ }
1021
+ interface Duration {
1022
+ /**
1023
+ * Duration of the service in minutes.
1024
+ * Min: 1 minute, Max: 30 days, 23 hours, and 59 minutes
1025
+ * @min 1
1026
+ * @max 44639
1027
+ */
1028
+ minutes?: number;
1029
+ /**
1030
+ * Name of the duration option.
1031
+ * Defaults to the formatted duration e.g. "1 hour, 30 minutes".
1032
+ * @maxLength 255
1033
+ */
1034
+ name?: string | null;
1035
+ }
1036
+ interface DateTimeRule {
1037
+ /**
1038
+ * Name of the date-time rule. For example, "Weekend mornings".
1039
+ * @maxLength 255
1040
+ */
1041
+ name?: string | null;
1042
+ }
1043
+ interface ParticipantsRange {
1044
+ /**
1045
+ * Name of the participants range. For example, "Large group".
1046
+ * @maxLength 255
1047
+ */
1048
+ name?: string | null;
1049
+ }
1050
+ interface MultiServiceBookingInfo {
1051
+ /**
1052
+ * Multi-service booking ID.
1053
+ * @format GUID
1054
+ * @readonly
1055
+ */
1056
+ _id?: string | null;
1057
+ /** Type of the multi-service booking. */
1058
+ type?: MultiServiceBookingTypeWithLiterals;
1059
+ }
1060
+ interface BookedAddOn {
1061
+ /**
1062
+ * The ID of the add-on.
1063
+ * @format GUID
1064
+ */
1065
+ _id?: string;
1066
+ /**
1067
+ * The ID of the add-on group.
1068
+ * @format GUID
1069
+ */
1070
+ groupId?: string;
1071
+ /**
1072
+ * The add-on duration in minutes at the time of booking.
1073
+ * Populated for duration-based add-ons.
1074
+ * @min 1
1075
+ * @max 1440
1076
+ * @readonly
1077
+ */
1078
+ durationInMinutes?: number | null;
1079
+ /**
1080
+ * The quantity of booked add-ons.
1081
+ * For duration-based add-ons, `quantity` is not applicable.
1082
+ * If `quantity` is provided as `1` for a duration-based add-on, it will be accepted but the value will be cleared.
1083
+ * If any other value is provided, an `INVALID_ARGUMENT` error will be returned with the message: "Invalid AddOn details: either duration or quantity must be set correctly".
1084
+ * @min 1
1085
+ * @max 1000
1086
+ */
1087
+ quantity?: number | null;
1088
+ /**
1089
+ * Add-on `name` at the time of booking.
1090
+ * @maxLength 100
1091
+ * @readonly
1092
+ */
1093
+ name?: string | null;
1094
+ /**
1095
+ * Add-on name translated to the language the customer used during booking.
1096
+ * @maxLength 100
1097
+ * @readonly
1098
+ */
1099
+ nameTranslated?: string | null;
1100
+ }
1101
+ /** Server-computed datetime adjusted to a requested timezone. */
1102
+ interface Attendance {
1103
+ /**
1104
+ * ID of the attendance object.
1105
+ * @format GUID
1106
+ * @readonly
1107
+ */
1108
+ _id?: string | null;
1109
+ /** General information about the booking's attendance. */
1110
+ status?: AttendanceStatusWithLiterals;
1111
+ /**
1112
+ * Total number of participants who attended the session. Can
1113
+ * be greater than `1` for bookings with multiple participants.
1114
+ */
1115
+ numberOfAttendees?: number;
1116
+ }
1117
+ //#endregion
1118
+ //#region ../../node_modules/@wix/auto_sdk_bookings_services/build/es/bookings-services-v2-service-services.universal-C8fV-5oa.d.mts
1119
+ /** The `service` object represents an offering that a business provides to its customers. */
1120
+ interface Service {
1121
+ /**
1122
+ * Service ID.
1123
+ * @format GUID
1124
+ * @readonly
1125
+ */
1126
+ _id?: string | null;
1127
+ /**
1128
+ * ID of the app associated with the service. You can't update `appId`.
1129
+ * Services are displayed in Wix Bookings only if they are associated with the Wix Bookings appId or have no associated app ID.
1130
+ * Default: `13d21c63-b5ec-5912-8397-c3a5ddb27a97` (Wix Bookings app ID)
1131
+ * For services from Wix apps, the following values apply:
1132
+ * - Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
1133
+ * - Wix Services: `"cc552162-24a4-45e0-9695-230c4931ef40"`
1134
+ * - Wix Meetings: `"6646a75c-2027-4f49-976c-58f3d713ed0f"`.<!-- [Scheduling Form Fields](https://dev.wix.com/docs/api-reference/business-solutions/bookings/about-scheduling-form-fields) services also use this app ID. Use `createdByAppId` to distinguish between Wix Meetings and Scheduling Form Fields services.-->
1135
+ * [Full list of apps created by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).
1136
+ * <!-- TODO: Uncomment when Platform docs are published - Learn more about [app identity in the Bookings Platform](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings-platform/app-identity-in-the-bookings-platform). -->
1137
+ * @format GUID
1138
+ * @immutable
1139
+ */
1140
+ appId?: string | null;
1141
+ /**
1142
+ * ID of the app that created the service. This field is used for analytics, auditing, and tracking creation sources.
1143
+ * This read-only field is automatically populated during service creation by checking these sources in order:
1144
+ * 1. The caller's App ID from the request identity context.
1145
+ * 2. The service's `appId` field.
1146
+ * 3. The Wix Bookings App ID (`13d21c63-b5ec-5912-8397-c3a5ddb27a97`) as the final fallback.
1147
+ * <!-- TODO: Uncomment when Platform docs are published - Learn more about [app identity in the Bookings Platform](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings-platform/app-identity-in-the-bookings-platform). -->
1148
+ * @format GUID
1149
+ * @readonly
1150
+ */
1151
+ createdByAppId?: string | null;
1152
+ /**
1153
+ * Service type.
1154
+ * Learn more about [service types](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-types).
1155
+ */
1156
+ type?: ServiceTypeWithLiterals;
1157
+ /** Order of the service within a [category](https://dev.wix.com/docs/rest/business-solutions/bookings/services/categories-v1/category-object). */
1158
+ sortOrder?: number | null;
1159
+ /**
1160
+ * Service name.
1161
+ * @maxLength 400
1162
+ * @minLength 1
1163
+ */
1164
+ name?: string | null;
1165
+ /**
1166
+ * Service description. For example, `High-class hair styling, cuts, straightening and color`.
1167
+ * @maxLength 7000
1168
+ */
1169
+ description?: string | null;
1170
+ /**
1171
+ * Short service description, such as `Hair styling`.
1172
+ * @maxLength 6000
1173
+ */
1174
+ tagLine?: string | null;
1175
+ /**
1176
+ * Default maximum number of customers that can book the service. The service cannot be booked beyond this capacity.
1177
+ * @min 1
1178
+ * @max 1000
1179
+ */
1180
+ defaultCapacity?: number | null;
1181
+ /** Media associated with the service. */
1182
+ media?: Media;
1183
+ /** Whether the service is hidden from Wix Bookings pages and widgets. */
1184
+ hidden?: boolean | null;
1185
+ /**
1186
+ * [Category](https://dev.wix.com/docs/rest/business-solutions/bookings/services/categories-v2/introduction)
1187
+ * the service is associated with. Services aren't automatically assigned to a category.
1188
+ * Without an associated category, the service isn't visible on the live site.
1189
+ */
1190
+ category?: V2Category;
1191
+ /** Form the customer filled out when booking the service. */
1192
+ form?: Form;
1193
+ /**
1194
+ * Payment options for booking the service.
1195
+ * Learn more about [service payments](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-payments).
1196
+ */
1197
+ payment?: Payment;
1198
+ /** Online booking settings. */
1199
+ onlineBooking?: OnlineBooking;
1200
+ /** Conferencing options for the service. */
1201
+ conferencing?: Conferencing;
1202
+ /**
1203
+ * The locations this service is offered at. Read more about [service locations](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations).
1204
+ * @immutable
1205
+ * @maxSize 500
1206
+ */
1207
+ locations?: V2Location[];
1208
+ /**
1209
+ * [Policy](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/introduction)
1210
+ * determining under what conditions this service can be booked. For example, whether the service can only be booked up to 30 minutes before it begins.
1211
+ */
1212
+ bookingPolicy?: BookingPolicy;
1213
+ /**
1214
+ * The service's [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction),
1215
+ * which can be used to manage the service's [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction).
1216
+ */
1217
+ schedule?: Schedule;
1218
+ /**
1219
+ * IDs of the [resources](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resources-v2/introduction) associated with the [staff members](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/introduction) providing the service.
1220
+ * Note that these are the resource IDs, not the staff member IDs.
1221
+ *
1222
+ * For appointment-based services, set this field when creating or updating the service.
1223
+ * For classes and courses, this field is read-only and is automatically derived from staff assigned to the service's recurring scheduled sessions.
1224
+ * Staff assigned only to single, non-recurring events are not included.
1225
+ * Once all of a staff member's upcoming recurring sessions have ended, their ID is removed from this field.
1226
+ * To retrieve the full list of staff for classes or courses, query the service's calendar events instead.
1227
+ * Learn more about [retrieving staff for classes and courses](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/sample-flows#retrieve-staff-members-for-a-class-or-course).
1228
+ * @maxSize 220
1229
+ * @format GUID
1230
+ */
1231
+ staffMemberIds?: string[];
1232
+ /** Staff members details. Returned only if `STAFF_MEMBER_DETAILS` conditional field was specified. */
1233
+ staffMemberDetails?: StaffMemberDetails;
1234
+ /**
1235
+ * Information about which resources must be available so customers can book the service.
1236
+ * For example, a meeting room or equipment.
1237
+ * Some nested fields are only returned when specific conditional fields are requested:
1238
+ * pass `RESOURCE_TYPE_DETAILS` to retrieve `resourceType.name`, and `RESOURCE_DETAILS` to retrieve `resourceDetails.resources`.
1239
+ * @maxSize 8
1240
+ */
1241
+ serviceResources?: ServiceResource[];
1242
+ /**
1243
+ * A slug is the last part of the URL address that serves as a unique identifier of the service.
1244
+ * The list of supported slugs includes past service names for backwards compatibility, and a custom slug if one was set by the business owner.
1245
+ * @readonly
1246
+ * @maxSize 100
1247
+ */
1248
+ supportedSlugs?: Slug[];
1249
+ /**
1250
+ * Active slug for the service.
1251
+ * Learn more about [service slugs](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-slugs).
1252
+ * @readonly
1253
+ */
1254
+ mainSlug?: Slug;
1255
+ /**
1256
+ * URLs to various service-related pages, such as the calendar page and the booking page.
1257
+ * @readonly
1258
+ */
1259
+ urls?: URLs;
1260
+ /** Extensions enabling users to save custom data related to the service. */
1261
+ extendedFields?: ExtendedFields;
1262
+ /** Custom SEO data for the service. */
1263
+ seoData?: SeoSchema;
1264
+ /**
1265
+ * Date and time the service was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.
1266
+ * @readonly
1267
+ */
1268
+ _createdDate?: Date | null;
1269
+ /**
1270
+ * Date and time the service was updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.
1271
+ * @readonly
1272
+ */
1273
+ _updatedDate?: Date | null;
1274
+ /**
1275
+ * Revision number, which increments by 1 each time the service is updated. To
1276
+ * prevent conflicting changes, the existing revision must be used when updating
1277
+ * a service.
1278
+ * @readonly
1279
+ */
1280
+ revision?: string | null;
1281
+ /**
1282
+ * Information about the [add-on groups](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/about-add-on-groups) associated with the service.
1283
+ * @maxSize 3
1284
+ */
1285
+ addOnGroups?: AddOnGroup[];
1286
+ /**
1287
+ * Details about all [add-ons](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/introduction) customers can choose when booking the service.
1288
+ * @readonly
1289
+ * @maxSize 50
1290
+ */
1291
+ addOnDetails?: AddOnDetails[];
1292
+ /** Taxable address used to calculate tax */
1293
+ taxableAddress?: TaxableAddress;
1294
+ /**
1295
+ * ID of the [resource type](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resource-types-v2/introduction)
1296
+ * that serves as the primary resource for this appointment service. The primary resource type
1297
+ * determines which resources drive slot assignment and availability resolution.
1298
+ *
1299
+ * For example, when set to a "Meeting Rooms" resource type, availability is calculated
1300
+ * based on the rooms' schedules rather than staff schedules.
1301
+ *
1302
+ * Default: The staff resource type.
1303
+ * @format GUID
1304
+ */
1305
+ primaryResourceType?: string | null;
1306
+ }
1307
+ declare enum ServiceType$1 {
1308
+ /** Appointment-based service. */
1309
+ APPOINTMENT = "APPOINTMENT",
1310
+ /** Class service. */
1311
+ CLASS = "CLASS",
1312
+ /** Course service. */
1313
+ COURSE = "COURSE"
1314
+ }
1315
+ /** @enumType */
1316
+ type ServiceTypeWithLiterals = ServiceType$1 | 'APPOINTMENT' | 'CLASS' | 'COURSE';
1317
+ interface Media {
1318
+ /**
1319
+ * Media items associated with the service.
1320
+ * @maxSize 100
1321
+ */
1322
+ items?: MediaItem[];
1323
+ /** Primary media associated with the service. */
1324
+ mainMedia?: MediaItem;
1325
+ /** Cover media associated with the service. */
1326
+ coverMedia?: MediaItem;
1327
+ }
1328
+ interface MediaItem extends MediaItemItemOneOf {
1329
+ /** Details of the image associated with the service, such as URL and size. */
1330
+ image?: string;
1331
+ }
1332
+ /** @oneof */
1333
+ interface MediaItemItemOneOf {
1334
+ /** Details of the image associated with the service, such as URL and size. */
1335
+ image?: string;
1336
+ }
1337
+ interface V2Category {
1338
+ /**
1339
+ * Category ID.
1340
+ * @format GUID
1341
+ */
1342
+ _id?: string;
1343
+ /**
1344
+ * Category name.
1345
+ * @maxLength 500
1346
+ * @readonly
1347
+ */
1348
+ name?: string | null;
1349
+ /**
1350
+ * Order of a category within a category list.
1351
+ * @readonly
1352
+ */
1353
+ sortOrder?: number | null;
1354
+ }
1355
+ interface Form {
1356
+ /**
1357
+ * ID of the form associated with the service.
1358
+ * The form information that you submit when booking includes contact details, participants, and other form fields set up for the service.
1359
+ * You can manage the service booking form fields using the Bookings Forms API.
1360
+ * @format GUID
1361
+ */
1362
+ _id?: string;
1363
+ }
1364
+ interface Payment extends PaymentRateOneOf {
1365
+ /**
1366
+ * The details for the fixed price of the service.
1367
+ *
1368
+ * Required when: `rateType` is `FIXED`
1369
+ */
1370
+ fixed?: FixedPayment;
1371
+ /**
1372
+ * The details for the custom price of the service.
1373
+ *
1374
+ * Required when: `rateType` is `CUSTOM`
1375
+ */
1376
+ custom?: CustomPayment;
1377
+ /**
1378
+ * The details for the varied pricing of the service.
1379
+ * Read more about [varied price options](https://support.wix.com/en/article/wix-bookings-about-getting-paid-online#offering-varied-price-options).
1380
+ *
1381
+ * Required when: `rateType` is `VARIED`
1382
+ */
1383
+ varied?: VariedPayment;
1384
+ /**
1385
+ * Subscription pricing details for the service. Supported for course services only.
1386
+ * The business charges recurring monthly payments instead of a one-time fee.
1387
+ *
1388
+ * Required when: `rateType` is `SUBSCRIPTION`.
1389
+ */
1390
+ subscription?: SubscriptionPayment;
1391
+ /** The rate the customer is expected to pay for the service. */
1392
+ rateType?: RateTypeWithLiterals;
1393
+ /** The payment options a customer can use to pay for the service. */
1394
+ options?: PaymentOptions;
1395
+ /**
1396
+ * IDs of pricing plans that can be used as payment for the service.
1397
+ * Read more about [service payment options](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/about-service-payments).
1398
+ * @readonly
1399
+ * @maxSize 75
1400
+ * @format GUID
1401
+ */
1402
+ pricingPlanIds?: string[];
1403
+ /**
1404
+ * How customers can pay for add-ons when paying for the related booking with a [pricing plan](https://dev.wix.com/docs/api-reference/business-solutions/pricing-plans/pricing-plans/introduction).
1405
+ * If customers pay for the booking using any method other than a pricing plan, the value of this field is ignored.
1406
+ */
1407
+ addOnOption?: AddOnPaymentOptionsWithLiterals;
1408
+ /**
1409
+ * Estimated discount information for the service based on active [eCommerce discounts](https://dev.wix.com/docs/rest/business-solutions/e-commerce/extensions/discounts/introduction).
1410
+ * The final discount is determined during eCommerce checkout and may differ from the estimate,
1411
+ * for example when discounts depend on cart totals.
1412
+ *
1413
+ * A discount is considered active when its start time has passed and its end time hasn't.
1414
+ * If multiple active discounts apply, the most recently created one is returned.
1415
+ *
1416
+ * Returned only when `DISCOUNT_INFO_DETAILS` is requested.
1417
+ * @readonly
1418
+ */
1419
+ discountInfo?: DiscountInfo;
1420
+ }
1421
+ /** @oneof */
1422
+ interface PaymentRateOneOf {
1423
+ /**
1424
+ * The details for the fixed price of the service.
1425
+ *
1426
+ * Required when: `rateType` is `FIXED`
1427
+ */
1428
+ fixed?: FixedPayment;
1429
+ /**
1430
+ * The details for the custom price of the service.
1431
+ *
1432
+ * Required when: `rateType` is `CUSTOM`
1433
+ */
1434
+ custom?: CustomPayment;
1435
+ /**
1436
+ * The details for the varied pricing of the service.
1437
+ * Read more about [varied price options](https://support.wix.com/en/article/wix-bookings-about-getting-paid-online#offering-varied-price-options).
1438
+ *
1439
+ * Required when: `rateType` is `VARIED`
1440
+ */
1441
+ varied?: VariedPayment;
1442
+ /**
1443
+ * Subscription pricing details for the service. Supported for course services only.
1444
+ * The business charges recurring monthly payments instead of a one-time fee.
1445
+ *
1446
+ * Required when: `rateType` is `SUBSCRIPTION`.
1447
+ */
1448
+ subscription?: SubscriptionPayment;
1449
+ }
1450
+ declare enum RateType {
1451
+ /** The service has a fixed price. */
1452
+ FIXED = "FIXED",
1453
+ /** The service has a custom price, expressed as a price description. */
1454
+ CUSTOM = "CUSTOM",
1455
+ /** This service is offered with a set of different prices based on different terms. */
1456
+ VARIED = "VARIED",
1457
+ /** This service is offered free of charge. */
1458
+ NO_FEE = "NO_FEE",
1459
+ /**
1460
+ * The service charges recurring monthly payments. Supported for course services only.
1461
+ * @documentationMaturity preview
1462
+ */
1463
+ SUBSCRIPTION = "SUBSCRIPTION"
1464
+ }
1465
+ /** @enumType */
1466
+ type RateTypeWithLiterals = RateType | 'FIXED' | 'CUSTOM' | 'VARIED' | 'NO_FEE' | 'SUBSCRIPTION';
1467
+ interface FixedPayment {
1468
+ /**
1469
+ * The fixed price required to book the service.
1470
+ *
1471
+ * Required when: `rateType` is `FIXED`
1472
+ */
1473
+ price?: Money;
1474
+ /**
1475
+ * The deposit price required to book the service.
1476
+ *
1477
+ * Required when: `rateType` is `FIXED` and `paymentOptions.deposit` is `true`
1478
+ */
1479
+ deposit?: Money;
1480
+ /**
1481
+ * Whether customers can choose to pay the full service price upfront instead of only the deposit.
1482
+ *
1483
+ * Used only when a `deposit` amount is set.
1484
+ *
1485
+ * Default: `false`.
1486
+ */
1487
+ fullUpfrontPaymentAllowed?: boolean | null;
1488
+ }
1489
+ /**
1490
+ * Money.
1491
+ * Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003.
1492
+ */
1493
+ interface Money {
1494
+ /**
1495
+ * Monetary amount. Decimal string with a period as a decimal separator. For example `25.05`.
1496
+ * @format DECIMAL_VALUE
1497
+ * @decimalValue options { gt:0, maxScale:2 }
1498
+ */
1499
+ value?: string;
1500
+ /**
1501
+ * Currency code in [ISO 4217 format](https://en.wikipedia.org/wiki/ISO_4217). For example, `USD`.
1502
+ * @format CURRENCY
1503
+ * @readonly
1504
+ */
1505
+ currency?: string;
1506
+ /**
1507
+ * Monetary amount. Decimal string in local format. For example, `1 000,30`.
1508
+ * @maxLength 50
1509
+ */
1510
+ formattedValue?: string | null;
1511
+ }
1512
+ /**
1513
+ * A deposit expressed as exactly one of a fixed monetary amount or a percentage of the full service price.
1514
+ * Structurally exclusive: at most one of `amount` or `percentage` may be set.
1515
+ */
1516
+ interface CustomPayment {
1517
+ /**
1518
+ * A custom description explaining to the customer how to pay for the service.
1519
+ * @maxLength 50
1520
+ */
1521
+ description?: string | null;
1522
+ }
1523
+ interface VariedPayment {
1524
+ /** The default price for the service without any variants. It will also be used as the default price for any new variant. */
1525
+ defaultPrice?: Money;
1526
+ /**
1527
+ * The deposit price required to book the service.
1528
+ *
1529
+ * Required when: `rateType` is `VARIED` and `paymentOptions.deposit` is `true`
1530
+ */
1531
+ deposit?: Money;
1532
+ /**
1533
+ * The minimal price a customer may pay for this service, based on its variants.
1534
+ * @readonly
1535
+ */
1536
+ minPrice?: Money;
1537
+ /**
1538
+ * The maximum price a customer may pay for this service, based on its variants.
1539
+ * @readonly
1540
+ */
1541
+ maxPrice?: Money;
1542
+ /**
1543
+ * Whether customers can choose to pay the full service price upfront instead of only the deposit.
1544
+ *
1545
+ * Used only when a `deposit` amount is set.
1546
+ *
1547
+ * Default: `false`.
1548
+ */
1549
+ fullUpfrontPaymentAllowed?: boolean | null;
1550
+ }
1551
+ interface SubscriptionPayment {
1552
+ /**
1553
+ * Base price charged per billing cycle before tax and discounts.
1554
+ * The actual amount charged may differ after checkout applies tax and discounts.
1555
+ */
1556
+ amountPerBillingCycle?: Money;
1557
+ /**
1558
+ * Billing frequency for recurring subscription charges.
1559
+ * Reflected as `billingFrequency` in the booking's subscription info.
1560
+ *
1561
+ * Currently supports `MONTHLY` only.
1562
+ */
1563
+ frequency?: FrequencyTypeWithLiterals;
1564
+ /**
1565
+ * Total number of billing cycles in the subscription. For example, `12` for a 12-month subscription with monthly payments.
1566
+ * Reflected as `totalCycles` in the booking's subscription info.
1567
+ *
1568
+ * Required when: `rateType` is `SUBSCRIPTION`.
1569
+ * @min 2
1570
+ */
1571
+ totalPayments?: number | null;
1572
+ /** Determines when the first billing cycle payment is charged. Used together with `recurringStartDate` to define the subscription billing schedule. */
1573
+ firstChargeDate?: FirstChargeDateTypeWithLiterals;
1574
+ /**
1575
+ * Date and time when recurring billing starts.
1576
+ *
1577
+ * When `firstChargeDate` is `CHECKOUT`, the first charge occurs at checkout and subsequent billing cycles start from this date.
1578
+ *
1579
+ * When `firstChargeDate` is `SCHEDULED`, the first charge occurs on this date.
1580
+ *
1581
+ * Customers who book after recurring billing starts are billed for the remaining billing cycles only.
1582
+ *
1583
+ * Required when: `rateType` is `SUBSCRIPTION`.
1584
+ */
1585
+ recurringStartDate?: Date | null;
1586
+ /**
1587
+ * Deprecated.
1588
+ * @deprecated Deprecated.
1589
+ * @targetRemovalDate 2026-07-01
1590
+ */
1591
+ enrollmentFeeAmount?: Money;
1592
+ }
1593
+ declare enum FrequencyType {
1594
+ /** Billing cycle repeats once per month. */
1595
+ MONTHLY = "MONTHLY"
1596
+ }
1597
+ /** @enumType */
1598
+ type FrequencyTypeWithLiterals = FrequencyType | 'MONTHLY';
1599
+ declare enum FirstChargeDateType {
1600
+ /** The first billing cycle is charged at checkout. Recurring billing continues from the `recurringStartDate`. */
1601
+ CHECKOUT = "CHECKOUT",
1602
+ /** The first billing cycle is charged on the `recurringStartDate`. */
1603
+ SCHEDULED = "SCHEDULED"
1604
+ }
1605
+ /** @enumType */
1606
+ type FirstChargeDateTypeWithLiterals = FirstChargeDateType | 'CHECKOUT' | 'SCHEDULED';
1607
+ /**
1608
+ * The payment options a customer can use to pay for the service.
1609
+ * For payments of type `FIXED` or `VARIED`, at least one of `online`, `inPerson`, or `pricingPlan` must be `true`.
1610
+ */
1611
+ interface PaymentOptions {
1612
+ /**
1613
+ * Customers can pay for the service online.
1614
+ * When `true`:
1615
+ * + `rateType` must be `FIXED`, `VARIED`, or `SUBSCRIPTION`.
1616
+ * + `fixed.price`, `varied.defaultPrice`, or `subscription.amountPerBillingCycle` must be specified respectively.
1617
+ *
1618
+ * Required when: `rateType` is `SUBSCRIPTION`.
1619
+ * Read more about [getting paid online](https://support.wix.com/en/article/wix-bookings-about-getting-paid-online).
1620
+ */
1621
+ online?: boolean | null;
1622
+ /** Customers can pay for the service in person. */
1623
+ inPerson?: boolean | null;
1624
+ /**
1625
+ * This service requires a deposit to be made online in order to book it.
1626
+ * When `true`:
1627
+ * + `rateType` must be `VARIED` or `FIXED`.
1628
+ * + A `deposit` must be specified.
1629
+ * + `online` must be `true`.
1630
+ * + `inPerson` must be `false`.
1631
+ */
1632
+ deposit?: boolean | null;
1633
+ /**
1634
+ * Whether customers can pay for the service using a pricing plan.
1635
+ * Read more about [service payment options](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/about-service-payments).
1636
+ */
1637
+ pricingPlan?: boolean | null;
1638
+ }
1639
+ declare enum AddOnPaymentOptions {
1640
+ /** Customers are required to pay online for add-ons when the booking is paid for with a pricing plan. */
1641
+ ONLINE = "ONLINE",
1642
+ /** Customers are required to pay in person for add-ons when the booking is paid for with a pricing plan. */
1643
+ IN_PERSON = "IN_PERSON"
1644
+ }
1645
+ /** @enumType */
1646
+ type AddOnPaymentOptionsWithLiterals = AddOnPaymentOptions | 'ONLINE' | 'IN_PERSON';
1647
+ /** Estimated discount information for a service based on active eCommerce discounts. */
1648
+ interface DiscountInfo {
1649
+ /**
1650
+ * Name of the discount. For example, `Summer Sale - 20% Off`.
1651
+ * @minLength 1
1652
+ * @maxLength 50
1653
+ */
1654
+ discountName?: string;
1655
+ /**
1656
+ * Estimated price after applying the discount. The final price is determined at checkout and may differ when additional discounts are applied or rules are re-evaluated with complete booking information.
1657
+ *
1658
+ * Not returned when the discount depends on booking or cart context, for example a discount that applies to a service only when booked together with another service, or when the discount requires information only available at checkout.
1659
+ */
1660
+ priceAfterDiscount?: Money;
1661
+ }
1662
+ interface OnlineBooking {
1663
+ /**
1664
+ * Whether the service can be booked online.
1665
+ * When set to `true`, customers can book the service online. Configure the payment options via the `service.payment` property.
1666
+ * When set to `false`, customers cannot book the service online, and the service can only be paid for in person.
1667
+ */
1668
+ enabled?: boolean | null;
1669
+ /** Booking the service requires approval by the Wix user. */
1670
+ requireManualApproval?: boolean | null;
1671
+ /** Multiple customers can request to book the same time slot. This is relevant when `requireManualApproval` is `true`. */
1672
+ allowMultipleRequests?: boolean | null;
1673
+ }
1674
+ interface Conferencing {
1675
+ /** Whether a conference link is generated for the service's sessions. */
1676
+ enabled?: boolean | null;
1677
+ }
1678
+ interface V2Location extends V2LocationOptionsOneOf {
1679
+ /** Information about business locations. Required when `type` is `BUSINESS`. */
1680
+ business?: BusinessLocationOptions;
1681
+ /** Information about custom locations. Required when `type` is `CUSTOM`. */
1682
+ custom?: CustomLocationOptions;
1683
+ /**
1684
+ * Location ID.
1685
+ * @format GUID
1686
+ * @readonly
1687
+ */
1688
+ _id?: string;
1689
+ /**
1690
+ * Location type.
1691
+ *
1692
+ * Default: `CUSTOM`
1693
+ */
1694
+ type?: LocationTypeEnumLocationTypeWithLiterals;
1695
+ /**
1696
+ * Location address. Empty for `{"type": "CUSTOMER"}`.
1697
+ * @readonly
1698
+ */
1699
+ calculatedAddress?: CommonAddress;
1700
+ }
1701
+ /** @oneof */
1702
+ interface V2LocationOptionsOneOf {
1703
+ /** Information about business locations. Required when `type` is `BUSINESS`. */
1704
+ business?: BusinessLocationOptions;
1705
+ /** Information about custom locations. Required when `type` is `CUSTOM`. */
1706
+ custom?: CustomLocationOptions;
1707
+ }
1708
+ declare enum LocationTypeEnumLocationType {
1709
+ /** Location set by the business that is not a standard business [location](https://dev.wix.com/docs/api-reference/business-management/locations/introduction). */
1710
+ CUSTOM = "CUSTOM",
1711
+ /** Business [location](https://dev.wix.com/docs/api-reference/business-management/locations/introduction). */
1712
+ BUSINESS = "BUSINESS",
1713
+ /**
1714
+ * The customer specifies any address when booking. Available only for
1715
+ * appointment-based services.
1716
+ */
1717
+ CUSTOMER = "CUSTOMER"
1718
+ }
1719
+ /** @enumType */
1720
+ type LocationTypeEnumLocationTypeWithLiterals = LocationTypeEnumLocationType | 'CUSTOM' | 'BUSINESS' | 'CUSTOMER';
1721
+ interface CommonAddress extends CommonAddressStreetOneOf {
1722
+ /** Street name and number. */
1723
+ streetAddress?: CommonStreetAddress;
1724
+ /** @maxLength 255 */
1725
+ addressLine1?: string | null;
1726
+ /**
1727
+ * 2-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
1728
+ * @format COUNTRY
1729
+ */
1730
+ country?: string | null;
1731
+ /**
1732
+ * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format.
1733
+ * @maxLength 255
1734
+ */
1735
+ subdivision?: string | null;
1736
+ /**
1737
+ * City name.
1738
+ * @maxLength 255
1739
+ */
1740
+ city?: string | null;
1741
+ /**
1742
+ * Postal or zip code.
1743
+ * @maxLength 255
1744
+ */
1745
+ postalCode?: string | null;
1746
+ /**
1747
+ * Full address of the location.
1748
+ * @maxLength 512
1749
+ */
1750
+ formatted?: string | null;
1751
+ }
1752
+ /** @oneof */
1753
+ interface CommonAddressStreetOneOf {
1754
+ /** Street name and number. */
1755
+ streetAddress?: CommonStreetAddress;
1756
+ /** @maxLength 255 */
1757
+ addressLine?: string | null;
1758
+ }
1759
+ /** Street address. Includes street name, number, and apartment number in separate fields. */
1760
+ interface CommonStreetAddress {
1761
+ /**
1762
+ * Street number.
1763
+ * @maxLength 255
1764
+ */
1765
+ number?: string;
1766
+ /**
1767
+ * Street name.
1768
+ * @maxLength 255
1769
+ */
1770
+ name?: string;
1771
+ /**
1772
+ * Apartment number.
1773
+ * @maxLength 255
1774
+ */
1775
+ apt?: string;
1776
+ }
1777
+ interface BusinessLocationOptions {
1778
+ /**
1779
+ * ID of the business [location](https://dev.wix.com/docs/api-reference/business-management/locations/introduction).
1780
+ * When setting a business location, specify only the location ID. Other location details are overwritten.
1781
+ * @format GUID
1782
+ */
1783
+ _id?: string;
1784
+ /**
1785
+ * Business location name.
1786
+ * @readonly
1787
+ * @maxLength 150
1788
+ */
1789
+ name?: string;
1790
+ /**
1791
+ * Whether this is the default location. There can only be a single default location per site.
1792
+ * @readonly
1793
+ */
1794
+ default?: boolean | null;
1795
+ /**
1796
+ * Business location address.
1797
+ * @readonly
1798
+ */
1799
+ address?: CommonAddress;
1800
+ /**
1801
+ * Business location email.
1802
+ * @format EMAIL
1803
+ * @readonly
1804
+ */
1805
+ email?: string | null;
1806
+ /**
1807
+ * Business location phone.
1808
+ * @format PHONE
1809
+ * @readonly
1810
+ */
1811
+ phone?: string | null;
1812
+ }
1813
+ interface CustomLocationOptions {
1814
+ /**
1815
+ * ID of the custom location.
1816
+ * @format GUID
1817
+ * @readonly
1818
+ */
1819
+ _id?: string;
1820
+ /** Address of the custom location. */
1821
+ address?: CommonAddress;
1822
+ }
1823
+ /**
1824
+ * `BookingPolicy` is the main entity of `BookingPolicyService` and specifies a set of rules for booking a service
1825
+ * by visitors and members.
1826
+ *
1827
+ * Each `BookingPolicy` consists of a number of sub-policies. When the Bookings App is provisioned to a meta site then a
1828
+ * default `BookingPolicy` will be created with defaults for each of these sub-policies. This also applies when a request
1829
+ * is received to create a new `BookingPolicy` and one or more of these sub-policies are not provided.
1830
+ *
1831
+ * Sub-policies are defined in separate objects as specified below.
1832
+ *
1833
+ * - The `LimitEarlyBookingPolicy` object defines the policy for limiting early bookings.
1834
+ * - The `LimitLateBookingPolicy` object defines the policy for limiting late bookings.
1835
+ * - The `BookAfterStartPolicy` object defines the policy for booking after the start of the schedule.
1836
+ * - The `CancellationPolicy` object defines the policy for canceling a booked entity.
1837
+ * - The `ReschedulePolicy` object defines the policy for rescheduling booked entity.
1838
+ * - The `WaitlistPolicy` object defines the policy for a waitlist.
1839
+ * - The `ParticipantsPolicy` object defines the policy regarding the participants per booking.
1840
+ * - The `ResourcesPolicy` object defines the policy regarding the resources per booking.
1841
+ * - The `CancellationFeePolicy` object defines the policy regarding cancellation fees.
1842
+ * - The `SaveCreditCardPolicy` object defines the policy for saving credit card details.
1843
+ *
1844
+ * By default each sub-policy is disabled. A more detailed specification of the default settings of each sub-policy
1845
+ * can be found in the description of the corresponding object.
1846
+ *
1847
+ * Partial updates are supported on the main entity level, however in order to update a sub-policy the client needs to provide the whole sub-policy object.
1848
+ */
1849
+ interface BookingPolicy {
1850
+ /**
1851
+ * The ID to the policy for the booking.
1852
+ * @format GUID
1853
+ */
1854
+ _id?: string;
1855
+ /**
1856
+ * Date and time the policy was created.
1857
+ * @readonly
1858
+ */
1859
+ _createdDate?: Date | null;
1860
+ /**
1861
+ * Date and time the policy was updated.
1862
+ * @readonly
1863
+ */
1864
+ _updatedDate?: Date | null;
1865
+ /**
1866
+ * Name of the policy.
1867
+ * @maxLength 400
1868
+ * @readonly
1869
+ */
1870
+ name?: string | null;
1871
+ /**
1872
+ * Custom description for the policy. This policy is displayed to the participant.
1873
+ * @readonly
1874
+ */
1875
+ customPolicyDescription?: PolicyDescription;
1876
+ /**
1877
+ * Whether the policy is the default for the meta site.
1878
+ * @readonly
1879
+ */
1880
+ default?: boolean | null;
1881
+ /**
1882
+ * Policy for limiting early bookings.
1883
+ * @readonly
1884
+ */
1885
+ limitEarlyBookingPolicy?: LimitEarlyBookingPolicy;
1886
+ /**
1887
+ * Policy for limiting late bookings.
1888
+ * @readonly
1889
+ */
1890
+ limitLateBookingPolicy?: LimitLateBookingPolicy;
1891
+ /**
1892
+ * Policy on booking an entity after the start of the schedule.
1893
+ * @readonly
1894
+ */
1895
+ bookAfterStartPolicy?: BookAfterStartPolicy;
1896
+ /**
1897
+ * Policy for canceling a booked entity.
1898
+ * @readonly
1899
+ */
1900
+ cancellationPolicy?: CancellationPolicy;
1901
+ /**
1902
+ * Policy for rescheduling a booked entity.
1903
+ * @readonly
1904
+ */
1905
+ reschedulePolicy?: ReschedulePolicy;
1906
+ /**
1907
+ * Waitlist policy for the service.
1908
+ * @readonly
1909
+ */
1910
+ waitlistPolicy?: WaitlistPolicy;
1911
+ /**
1912
+ * Policy regarding the participants per booking.
1913
+ * @readonly
1914
+ */
1915
+ participantsPolicy?: ParticipantsPolicy;
1916
+ /**
1917
+ * Policy for allocating resources.
1918
+ * @readonly
1919
+ */
1920
+ resourcesPolicy?: ResourcesPolicy;
1921
+ /**
1922
+ * Rules for cancellation fees.
1923
+ * @readonly
1924
+ */
1925
+ cancellationFeePolicy?: CancellationFeePolicy;
1926
+ /**
1927
+ * Rule for saving credit card.
1928
+ * @readonly
1929
+ */
1930
+ saveCreditCardPolicy?: SaveCreditCardPolicy;
1931
+ }
1932
+ /** A description of the policy to display to participants. */
1933
+ interface PolicyDescription {
1934
+ /**
1935
+ * Whether the description should be displayed. If `true`, the description is displayed.
1936
+ *
1937
+ * Default: `false`
1938
+ */
1939
+ enabled?: boolean;
1940
+ /**
1941
+ * The description to display.
1942
+ *
1943
+ * Default: Empty
1944
+ * Max length: 2500 characters
1945
+ * @maxLength 2500
1946
+ */
1947
+ description?: string;
1948
+ }
1949
+ /** The policy for limiting early bookings. */
1950
+ interface LimitEarlyBookingPolicy {
1951
+ /**
1952
+ * Whether there is a limit on how early a customer
1953
+ * can book. When `false`, there is no limit on the earliest
1954
+ * booking time and customers can book in advance, as early as they like.
1955
+ *
1956
+ * Default: `false`
1957
+ */
1958
+ enabled?: boolean;
1959
+ /**
1960
+ * Maximum number of minutes before the start of the session that a booking can be made. This value must be greater
1961
+ * than `latest_booking_in_minutes` in the `LimitLateBookingPolicy` policy.
1962
+ *
1963
+ * Default: 10080 minutes (7 days)
1964
+ * Min: 1 minute
1965
+ * @min 1
1966
+ */
1967
+ earliestBookingInMinutes?: number;
1968
+ }
1969
+ /**
1970
+ * The policy for limiting late bookings.
1971
+ *
1972
+ * This policy and the `BookAfterStartPolicy` policy cannot be enabled at the same time. So if this policy
1973
+ * is enabled, `BookAfterStartPolicy` must be disabled.
1974
+ */
1975
+ interface LimitLateBookingPolicy {
1976
+ /**
1977
+ * Whether there is a limit on how late a customer
1978
+ * can book. When `false`, there is no limit on the latest
1979
+ * booking time and customers can book up to the last minute.
1980
+ *
1981
+ * Default: `false`
1982
+ */
1983
+ enabled?: boolean;
1984
+ /**
1985
+ * Minimum number of minutes before the start of the session that a booking can be made.
1986
+ * For a schedule, this is relative to the start time of the next booked session, excluding past-booked sessions.
1987
+ * This value must be less than `earliest_booking_in_minutes` in the `LimitEarlyBookingPolicy` policy.
1988
+ *
1989
+ * Default: 1440 minutes (1 day)
1990
+ * Min: 1 minute
1991
+ * @min 1
1992
+ */
1993
+ latestBookingInMinutes?: number;
1994
+ }
1995
+ /**
1996
+ * The policy for whether a session can be booked after the start of the schedule.
1997
+ * This policy and `LimitLateBookingPolicy` cannot be enabled at the same time. So if this policy
1998
+ * is enabled, the `LimitLateBookingPolicy` policy must be disabled.
1999
+ */
2000
+ interface BookAfterStartPolicy {
2001
+ /**
2002
+ * Whether booking is allowed after the start of the schedule. When `true`,
2003
+ * customers can book after the start of the schedule.
2004
+ *
2005
+ * Default: `false`
2006
+ */
2007
+ enabled?: boolean;
2008
+ }
2009
+ /** The policy for canceling a booked session. */
2010
+ interface CancellationPolicy {
2011
+ /**
2012
+ * Whether canceling a booking is allowed. When `true`, customers
2013
+ * can cancel the booking.
2014
+ *
2015
+ * Default: `false`
2016
+ */
2017
+ enabled?: boolean;
2018
+ /**
2019
+ * Whether there is a limit on the latest cancellation time. When `true`,
2020
+ * a time limit is enforced.
2021
+ *
2022
+ * Default: `false`
2023
+ */
2024
+ limitLatestCancellation?: boolean;
2025
+ /**
2026
+ * Minimum number of minutes before the start of the booked session that the booking can be canceled.
2027
+ *
2028
+ * Default: 1440 minutes (1 day)
2029
+ * Min: 1 minute
2030
+ * @min 1
2031
+ */
2032
+ latestCancellationInMinutes?: number;
2033
+ /**
2034
+ * Whether this cancellation policy allows anonymous cancellations.
2035
+ *
2036
+ * **Important**: This flag only applies when `enabled` is `true`. If the cancellation
2037
+ * policy itself is disabled (`enabled` = `false`), anonymous users cannot cancel
2038
+ * regardless of this flag's value.
2039
+ *
2040
+ * When not set (null), defaults to enabled. Anonymous cancellations are allowed by default
2041
+ * so that customers aren't required to be site members to cancel their bookings.
2042
+ *
2043
+ * Default: `null` (treated as `true`)
2044
+ */
2045
+ allowAnonymous?: boolean | null;
2046
+ }
2047
+ /** The policy for rescheduling a booked session. */
2048
+ interface ReschedulePolicy {
2049
+ /**
2050
+ * Whether rescheduling a booking is allowed. When `true`, customers
2051
+ * can reschedule the booking.
2052
+ *
2053
+ * Default: `false`
2054
+ */
2055
+ enabled?: boolean;
2056
+ /**
2057
+ * Whether there is a limit on the latest reschedule time. When `true`,
2058
+ * a time limit is enforced.
2059
+ *
2060
+ * Default: `false`
2061
+ */
2062
+ limitLatestReschedule?: boolean;
2063
+ /**
2064
+ * Minimum number of minutes before the start of the booked session that the booking can be rescheduled.
2065
+ *
2066
+ * Default: 1440 minutes (1 day)
2067
+ * Min: 1 minute
2068
+ * @min 1
2069
+ */
2070
+ latestRescheduleInMinutes?: number;
2071
+ /**
2072
+ * Whether this reschedule policy allows anonymous rescheduling.
2073
+ *
2074
+ * **Important**: This flag only applies when `enabled` is `true`. If the reschedule
2075
+ * policy itself is disabled (`enabled` = `false`), anonymous users cannot reschedule
2076
+ * regardless of this flag's value.
2077
+ *
2078
+ * When not set (null), defaults to enabled. Anonymous rescheduling is allowed by default
2079
+ * so that customers aren't required to be site members to reschedule their bookings.
2080
+ *
2081
+ * Default: `null` (treated as `true`)
2082
+ */
2083
+ allowAnonymous?: boolean | null;
2084
+ }
2085
+ /** The policy for the waitlist. */
2086
+ interface WaitlistPolicy {
2087
+ /**
2088
+ * Whether the session has a waitlist. If `true`, there is a waitlist.
2089
+ *
2090
+ * Default: `false`
2091
+ */
2092
+ enabled?: boolean;
2093
+ /**
2094
+ * Number of spots available in the waitlist.
2095
+ *
2096
+ * Default: 10 spots
2097
+ * Min: 1 spot
2098
+ * @min 1
2099
+ */
2100
+ capacity?: number;
2101
+ /**
2102
+ * Amount of time a participant is given to book, once notified that a spot is available.
2103
+ *
2104
+ * Default: 10 minutes
2105
+ * Min: 1 spot
2106
+ * @min 1
2107
+ */
2108
+ reservationTimeInMinutes?: number;
2109
+ }
2110
+ /** The policy for the maximum number of participants per booking. */
2111
+ interface ParticipantsPolicy {
2112
+ /**
2113
+ * Maximum number of participants allowed.
2114
+ *
2115
+ * Default: 1 participant
2116
+ * Min: 1 participant
2117
+ * @min 1
2118
+ */
2119
+ maxParticipantsPerBooking?: number;
2120
+ }
2121
+ /** The policy regarding the allocation of resources (e.g. staff members). */
2122
+ interface ResourcesPolicy {
2123
+ /**
2124
+ * `true` if this policy is enabled, `false` otherwise.
2125
+ * When `false` then the client must always select a resource when booking an appointment.
2126
+ */
2127
+ enabled?: boolean;
2128
+ /**
2129
+ * `true`, if it is allowed to automatically assign a resource when booking an appointment,
2130
+ * `false`, if the client must always select a resource.
2131
+ *
2132
+ * Default: `false`
2133
+ */
2134
+ autoAssignAllowed?: boolean;
2135
+ }
2136
+ interface CancellationFeePolicy {
2137
+ /**
2138
+ * Whether canceling a booking will result in a cancellation fee
2139
+ *
2140
+ * Default: `false`
2141
+ */
2142
+ enabled?: boolean;
2143
+ /**
2144
+ * Cancellation windows describing the time of cancellation and the fee to charge.
2145
+ * @maxSize 2
2146
+ */
2147
+ cancellationWindows?: CancellationWindow[];
2148
+ /**
2149
+ * Whether the cancellation fee should not be automatically collected when customer cancels the booking.
2150
+ *
2151
+ * Default: `true`
2152
+ */
2153
+ autoCollectFeeEnabled?: boolean | null;
2154
+ }
2155
+ interface CancellationWindow extends CancellationWindowFeeOneOf {
2156
+ /** Amount to be charged as a cancellation fee. */
2157
+ amount?: Money;
2158
+ /**
2159
+ * Percentage of the original price to be charged as a cancellation fee.
2160
+ * @decimalValue options { gt:0, lte:100, maxScale:2 }
2161
+ */
2162
+ percentage?: string;
2163
+ /**
2164
+ * The fee will be applied if the booked session starts within this start time in minutes.
2165
+ * @min 1
2166
+ */
2167
+ startInMinutes?: number | null;
2168
+ }
2169
+ /** @oneof */
2170
+ interface CancellationWindowFeeOneOf {
2171
+ /** Amount to be charged as a cancellation fee. */
2172
+ amount?: Money;
2173
+ /**
2174
+ * Percentage of the original price to be charged as a cancellation fee.
2175
+ * @decimalValue options { gt:0, lte:100, maxScale:2 }
2176
+ */
2177
+ percentage?: string;
2178
+ }
2179
+ interface SaveCreditCardPolicy {
2180
+ /** Default: `false` */
2181
+ enabled?: boolean;
2182
+ }
2183
+ /**
2184
+ * Policy for determining how staff members are sorted and selected during the booking process.
2185
+ * This affects which staff member is chosen when multiple staff members are available for a service.
2186
+ */
2187
+ interface Schedule {
2188
+ /**
2189
+ * ID of the [schedule](https://dev.wix.com/docs/api-reference/business-management/calendar/schedules-v3/introduction)
2190
+ * to which the service's events belong.
2191
+ * @format GUID
2192
+ * @readonly
2193
+ */
2194
+ _id?: string | null;
2195
+ /**
2196
+ * Start time of the first session in the schedule. For courses only.
2197
+ * @readonly
2198
+ */
2199
+ firstSessionStart?: Date | null;
2200
+ /**
2201
+ * End time of the last session in the schedule. For courses only.
2202
+ * @readonly
2203
+ */
2204
+ lastSessionEnd?: Date | null;
2205
+ /** Limitations affecting the service availability. */
2206
+ availabilityConstraints?: AvailabilityConstraints;
2207
+ }
2208
+ interface AvailabilityConstraints {
2209
+ /**
2210
+ * Calculated list of all supported session durations for the service. For
2211
+ * appointment-based services without varied pricing based on session length, it
2212
+ * matches the single value in the `sessionDurations` array. For appointment-based
2213
+ * services with varied pricing based on session length, it includes session
2214
+ * durations for all [variants](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/service-options-and-variants/introduction),
2215
+ * while ignoring `sessionDurations`.
2216
+ * For courses and classes, it includes durations for all future
2217
+ * recurring sessions but excludes durations for one-off or past recurring sessions.
2218
+ * @readonly
2219
+ * @maxSize 50
2220
+ */
2221
+ durations?: V2Duration[];
2222
+ /**
2223
+ * List of supported session durations in minutes.
2224
+ *
2225
+ * - For appointment-based services, specify `sessionDurations` when creating a service.
2226
+ * - For appointment-based services with varied pricing by session length, you must still specify `sessionDurations`, but the values are ignored. Actual durations are taken from the [service variants](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/service-options-and-variants/introduction).
2227
+ * - For classes or courses, don't specify `sessionDurations` when creating a service.
2228
+ * @min 1
2229
+ * @max 44639
2230
+ * @maxSize 50
2231
+ */
2232
+ sessionDurations?: number[];
2233
+ /**
2234
+ * The number of minutes between the end of a session and the start of the next.
2235
+ * @max 720
2236
+ */
2237
+ timeBetweenSessions?: number;
2238
+ /**
2239
+ * Duration range for the service. When set, the customer picks a duration
2240
+ * within the configured min/max range instead of a fixed session duration.
2241
+ * Mutually exclusive with `sessionDurations`. A service uses one or the other.
2242
+ * Can't be combined with `workingHours`.
2243
+ *
2244
+ * Use `durationRange` for services where the customer chooses how long to book,
2245
+ * such as equipment or space rentals. The `unitType` determines whether the range
2246
+ * is measured in hours or days.
2247
+ */
2248
+ durationRange?: DurationRange;
2249
+ }
2250
+ interface V2Duration {
2251
+ /**
2252
+ * The duration of the service in minutes.
2253
+ * @min 1
2254
+ * @max 44639
2255
+ */
2256
+ minutes?: number;
2257
+ }
2258
+ /**
2259
+ * Duration range configuration for a service. Defines the minimum and maximum
2260
+ * booking duration a customer can select, and the unit of measurement.
2261
+ *
2262
+ * For hourly services, durations are configured in minutes via `hourOptions`.
2263
+ * For daily services, durations are configured in days via `dayOptions`.
2264
+ */
2265
+ interface DurationRange extends DurationRangeConfigOneOf {
2266
+ /** Configuration for hourly duration ranges. Set when `unitType` is `HOUR`. */
2267
+ hourOptions?: HourlyConfig;
2268
+ /** Configuration for daily duration ranges. Set when `unitType` is `DAY`. */
2269
+ dayOptions?: DailyConfig;
2270
+ /** The unit type for this duration range. Determines which configuration to use in the `config` union. */
2271
+ unitType?: UnitTypeWithLiterals;
2272
+ }
2273
+ /** @oneof */
2274
+ interface DurationRangeConfigOneOf {
2275
+ /** Configuration for hourly duration ranges. Set when `unitType` is `HOUR`. */
2276
+ hourOptions?: HourlyConfig;
2277
+ /** Configuration for daily duration ranges. Set when `unitType` is `DAY`. */
2278
+ dayOptions?: DailyConfig;
2279
+ }
2280
+ /** The booking unit for the duration range. */
2281
+ declare enum UnitType {
2282
+ /** Hourly booking unit. Durations are configured in minutes via `hourOptions`. */
2283
+ HOUR = "HOUR",
2284
+ /** Daily booking unit. Durations are configured in days via `dayOptions`. */
2285
+ DAY = "DAY"
2286
+ }
2287
+ /** @enumType */
2288
+ type UnitTypeWithLiterals = UnitType | 'HOUR' | 'DAY';
2289
+ /** Hourly duration configuration. Durations are specified in minutes. */
2290
+ interface HourlyConfig {
2291
+ /**
2292
+ * Minimum bookable duration in minutes. The customer can't book for less than this duration.
2293
+ * @min 30
2294
+ * @max 1440
2295
+ */
2296
+ minDurationInMinutes?: number;
2297
+ /**
2298
+ * Maximum bookable duration in minutes. The customer can't book for more than this duration.
2299
+ *
2300
+ * Must be greater than or equal to `minDurationInMinutes`.
2301
+ * @min 30
2302
+ * @max 1440
2303
+ */
2304
+ maxDurationInMinutes?: number;
2305
+ }
2306
+ /** Daily duration configuration. Durations are specified in days. */
2307
+ interface DailyConfig {
2308
+ /**
2309
+ * Minimum bookable duration in days. The customer can't book for less than this number of days.
2310
+ * @min 1
2311
+ * @max 40
2312
+ */
2313
+ minDurationInDays?: number;
2314
+ /**
2315
+ * Maximum bookable duration in days. The customer can't book for more than this number of days.
2316
+ *
2317
+ * Must be greater than or equal to `minDurationInDays`.
2318
+ * @min 1
2319
+ * @max 40
2320
+ */
2321
+ maxDurationInDays?: number;
2322
+ }
2323
+ /**
2324
+ * Controls how a service's own working hours combine with the working hours of its assigned
2325
+ * staff members and required resources. The hours themselves are not held here. They are the
2326
+ * `WORKING_HOURS` events on the service's schedule (`schedule.id`), and this message controls
2327
+ * only how they combine with the resources working hours.
2328
+ */
2329
+ interface StaffMember {
2330
+ /**
2331
+ * ID of the [resource](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resources-v2/introduction) associated with the staff member providing the service.
2332
+ * Despite the field name, this is the resource ID, not the staff member ID.
2333
+ * This value matches the staff member's `resourceId` from the [Staff Members API](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/introduction)
2334
+ * and corresponds to the IDs in the service's `staffMemberIds` field.
2335
+ * @format GUID
2336
+ * @readonly
2337
+ */
2338
+ staffMemberId?: string;
2339
+ /**
2340
+ * Name of the staff member
2341
+ * @maxLength 40
2342
+ * @readonly
2343
+ */
2344
+ name?: string | null;
2345
+ /**
2346
+ * Main media associated with the service.
2347
+ * @readonly
2348
+ */
2349
+ mainMedia?: StaffMediaItem;
2350
+ }
2351
+ interface StaffMediaItem extends StaffMediaItemItemOneOf {
2352
+ /** Details of the image associated with the staff, such as URL and size. */
2353
+ image?: string;
2354
+ }
2355
+ /** @oneof */
2356
+ interface StaffMediaItemItemOneOf {
2357
+ /** Details of the image associated with the staff, such as URL and size. */
2358
+ image?: string;
2359
+ }
2360
+ /**
2361
+ * Working hours location coverage derived from Calendar v3 WORKING_HOURS events
2362
+ * (`NONE` and `MASTER` recurrence types). The server paginates through Calendar results
2363
+ * (100 events per page) until all matching events are collected.
2364
+ *
2365
+ * Coverage states when enrichment is requested:
2366
+ * + `available_at_all_locations = true`: Staff applies to every business location. Set when the staff
2367
+ * uses default business working hours, or has any WORKING_HOURS event without a location ID
2368
+ * (including when mixed with location-specific events).
2369
+ * + `available_at_all_locations = false` with non-empty `location_ids`: Staff has location-specific
2370
+ * WORKING_HOURS only. Show the staff member only when the selected location is in `location_ids`.
2371
+ * + `available_at_all_locations = false` with empty `location_ids`: Staff has working-hours schedules
2372
+ * but no applicable location coverage was found.
2373
+ *
2374
+ * Recommended client filter:
2375
+ * `availableAtAllLocations || locationIds.includes(selectedLocationId)`
2376
+ *
2377
+ * Omitted when `STAFF_WORKING_HOURS_LOCATIONS` is not requested.
2378
+ */
2379
+ interface StaffMemberDetails {
2380
+ /**
2381
+ * Staff members providing the service. For appointments only.
2382
+ * @maxSize 220
2383
+ */
2384
+ staffMembers?: StaffMember[];
2385
+ }
2386
+ interface ResourceIds {
2387
+ /**
2388
+ * Values of the resource IDs.
2389
+ * @maxSize 100
2390
+ * @format GUID
2391
+ */
2392
+ values?: string[];
2393
+ }
2394
+ interface ServiceResource extends ServiceResourceSelectionOneOf {
2395
+ /**
2396
+ * IDs of specific [resources](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resources-v2/introduction)
2397
+ * assigned to this service resource. Each ID must reference a resource within the specified `resourceType`.
2398
+ *
2399
+ * When set, only these resources are considered for availability and booking.
2400
+ * When not set, all resources of the specified resource type are eligible.
2401
+ */
2402
+ resourceIds?: ResourceIds;
2403
+ /** Details about the required [resource type](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resource-types-v2/introduction). */
2404
+ resourceType?: ResourceType;
2405
+ }
2406
+ /** @oneof */
2407
+ interface ServiceResourceSelectionOneOf {
2408
+ /**
2409
+ * IDs of specific [resources](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resources-v2/introduction)
2410
+ * assigned to this service resource. Each ID must reference a resource within the specified `resourceType`.
2411
+ *
2412
+ * When set, only these resources are considered for availability and booking.
2413
+ * When not set, all resources of the specified resource type are eligible.
2414
+ */
2415
+ resourceIds?: ResourceIds;
2416
+ }
2417
+ interface ResourceType {
2418
+ /**
2419
+ * The type of the resource.
2420
+ * @format GUID
2421
+ */
2422
+ _id?: string | null;
2423
+ /**
2424
+ * The name of the resource type.
2425
+ * @readonly
2426
+ * @maxLength 40
2427
+ * @minLength 1
2428
+ */
2429
+ name?: string | null;
2430
+ }
2431
+ /** Details about the individual resources assigned to a service resource. */
2432
+ interface Slug {
2433
+ /**
2434
+ * The unique part of service's URL that identifies the service's information page. For example, `service-1` in `https:/example.com/services/service-1`.
2435
+ * @maxLength 500
2436
+ */
2437
+ name?: string;
2438
+ /**
2439
+ * Whether the slug was generated or customized. If `true`, the slug was customized manually by the business owner. Otherwise, the slug was automatically generated from the service name.
2440
+ * @readonly
2441
+ */
2442
+ custom?: boolean | null;
2443
+ /**
2444
+ * Date and time the slug was created. This is a system field.
2445
+ * @readonly
2446
+ */
2447
+ _createdDate?: Date | null;
2448
+ }
2449
+ interface URLs {
2450
+ /**
2451
+ * The URL for the service page.
2452
+ * @readonly
2453
+ */
2454
+ servicePage?: string;
2455
+ /**
2456
+ * The URL for the booking entry point. It can be either to the calendar or to the service page.
2457
+ * @readonly
2458
+ */
2459
+ bookingPage?: string;
2460
+ /**
2461
+ * The URL for the calendar. Can be empty if no calendar exists.
2462
+ * @readonly
2463
+ */
2464
+ calendarPage?: string;
2465
+ }
2466
+ interface ExtendedFields {
2467
+ /**
2468
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
2469
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
2470
+ *
2471
+ * You can only access fields for which you have the appropriate permissions.
2472
+ *
2473
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
2474
+ */
2475
+ namespaces?: Record<string, Record<string, any>>;
2476
+ }
2477
+ /**
2478
+ * The SEO schema object contains data about different types of meta tags. It makes sure that the information about your page is presented properly to search engines.
2479
+ * The search engines use this information for ranking purposes, or to display snippets in the search results.
2480
+ * This data will override other sources of tags (for example patterns) and will be included in the <head> section of the HTML document, while not being displayed on the page itself.
2481
+ */
2482
+ interface SeoSchema {
2483
+ /** SEO tag information. */
2484
+ tags?: Tag[];
2485
+ /** SEO general settings. */
2486
+ settings?: Settings;
2487
+ }
2488
+ interface Keyword {
2489
+ /** Keyword value. */
2490
+ term?: string;
2491
+ /** Whether the keyword is the main focus keyword. */
2492
+ isMain?: boolean;
2493
+ /**
2494
+ * The source that added the keyword terms to the SEO settings.
2495
+ * @maxLength 1000
2496
+ */
2497
+ origin?: string | null;
2498
+ }
2499
+ interface Tag {
2500
+ /**
2501
+ * SEO tag type.
2502
+ *
2503
+ *
2504
+ * Supported values: `title`, `meta`, `script`, `link`.
2505
+ *
2506
+ * Which of these an API actually accepts depends on where the tag is being set: this
2507
+ * list is not a blanket guarantee across every API that reuses this message. Site SEO
2508
+ * Tags in particular accepts only `meta` (see `SiteSeoTags.tags`) and rejects
2509
+ * `title`/`script`/`link` with a validation error even though they appear here —
2510
+ * check the field description of the specific `tags`-typed field you're writing to
2511
+ * for the types it actually supports and the error it returns.
2512
+ *
2513
+ * Limitation: `title` and `script` (e.g. a `script` tag with `props.type`
2514
+ * `"application/ld+json"` carrying structured data) are supported only when
2515
+ * `custom` is unset or `false`. Setting `custom: true` on a `title` or `script`
2516
+ * tag is rejected with `TAG_TYPE_NOT_ALLOWED`, because `custom: true` routes the
2517
+ * write through the site's Advanced/Custom Tags list. To write structured data,
2518
+ * omit `custom` (or set it to `false`).
2519
+ */
2520
+ type?: string;
2521
+ /**
2522
+ * A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.
2523
+ * For example: `{"name": "description", "content": "the description itself"}`.
2524
+ */
2525
+ props?: Record<string, any> | null;
2526
+ /** SEO tag metadata. For example, `{"height": 300, "width": 240}`. */
2527
+ meta?: Record<string, any> | null;
2528
+ /** SEO tag inner content. For example, `<title> inner content </title>`. */
2529
+ children?: string;
2530
+ /**
2531
+ * Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages) —
2532
+ * i.e. an entry from the site's Advanced/Custom Tags list.
2533
+ *
2534
+ * Setting this to `true` on a write restricts which `type` values are accepted
2535
+ * — the same restriction the Advanced/Custom Tags UI enforces. `title` and
2536
+ * `script` tags (including JSON-LD structured data) must be sent with `custom`
2537
+ * omitted or `false`; sending them with `custom: true` is rejected with
2538
+ * `TAG_TYPE_NOT_ALLOWED`.
2539
+ *
2540
+ * Note this is a separate restriction from Site SEO Tags' own type restriction on
2541
+ * `SiteSeoTags.tags`: even with `custom` unset, Site SEO Tags rejects `script` (e.g.
2542
+ * for site-wide structured data) unconditionally. There is currently no way to set
2543
+ * site-wide, every-page structured data through any of these APIs — write a per-page
2544
+ * `script` tag through the Item SEO Tags API instead.
2545
+ *
2546
+ * This flag is scoped to that feature only. It is NOT an indicator of whether a standard tag
2547
+ * (`title`, `description`, Open Graph, etc.) reflects a manually configured value versus a computed
2548
+ * default/pattern — standard tags always resolve with `custom: false`, even when their content comes
2549
+ * from a page's manually saved SEO title/description override. Don't use this field to verify whether
2550
+ * a live page reflects a manual per-page SEO edit.
2551
+ *
2552
+ * Limitation: when `ResolveStaticPageSeoTags` is called without `seoData`, the per-page SEO data is read
2553
+ * only from the Vibe/Wix-managed-headless override store. That store holds nothing for classic Wix Editor
2554
+ * or Wix Studio pages, so even genuine Advanced/Custom Tags saved on those pages are missing from the
2555
+ * response entirely — there, `false` means this API could not tell, not that no custom tag exists.
2556
+ * Pass `seoData` explicitly to resolve against a known set of tags.
2557
+ */
2558
+ custom?: boolean;
2559
+ /** Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines. */
2560
+ disabled?: boolean;
2561
+ }
2562
+ interface Settings {
2563
+ /**
2564
+ * Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled.
2565
+ *
2566
+ *
2567
+ * Default: `false` (automatical redirect is enabled).
2568
+ */
2569
+ preventAutoRedirect?: boolean;
2570
+ /**
2571
+ * User-selected keyword terms for a specific page.
2572
+ * @maxSize 5
2573
+ */
2574
+ keywords?: Keyword[];
2575
+ }
2576
+ interface AddOnGroup {
2577
+ /**
2578
+ * ID of the add-on group.
2579
+ * Wix Bookings automatically populates this field when creating or updating an add-on group.
2580
+ * @readonly
2581
+ * @format GUID
2582
+ */
2583
+ _id?: string | null;
2584
+ /**
2585
+ * Name of the add-on group.
2586
+ * @maxLength 100
2587
+ */
2588
+ name?: string | null;
2589
+ /**
2590
+ * Maximum number of different [add-ons](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/introduction) from the group customers can add when booking the service.
2591
+ * When empty, there's no upper limit.
2592
+ */
2593
+ maxNumberOfAddOns?: number | null;
2594
+ /**
2595
+ * List of IDs of all [add-ons](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/introduction) included in the group.
2596
+ * @format GUID
2597
+ * @maxSize 7
2598
+ */
2599
+ addOnIds?: string[] | null;
2600
+ /**
2601
+ * Description or instructional prompt of the add-on group that's displayed to customers when booking the service.
2602
+ * @maxLength 200
2603
+ */
2604
+ prompt?: string | null;
2605
+ }
2606
+ interface AddOnDetails {
2607
+ /**
2608
+ * ID of the add-on.
2609
+ * @format GUID
2610
+ */
2611
+ addOnId?: string | null;
2612
+ /**
2613
+ * Duration in minutes for add-ons that extend service time.
2614
+ * Empty for [quantity-based add-ons](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/introduction#terminology).
2615
+ */
2616
+ durationInMinutes?: number | null;
2617
+ }
2618
+ /** `TaxableAddress` defines the taxable address used for the service. */
2619
+ interface TaxableAddress {
2620
+ /** Taxable address type. */
2621
+ taxableAddressType?: TaxableAddressTypeWithLiterals;
2622
+ }
2623
+ declare enum TaxableAddressType {
2624
+ BUSINESS = "BUSINESS",
2625
+ BILLING = "BILLING"
2626
+ }
2627
+ /** @enumType */
2628
+ type TaxableAddressTypeWithLiterals = TaxableAddressType | 'BUSINESS' | 'BILLING';
2629
+ //#endregion
2630
+ //#region src/extensions/my-bookings/context-providers/bookings-context-provider/my-bookings.cancel-failures.d.ts
2631
+ /** @internal Passed on the booking value across independently bundled extensions. */
2632
+ interface CancelFailureDismissals {
2633
+ isDismissed: () => boolean;
2634
+ dismiss: () => void;
2635
+ }
2636
+ //#endregion
2637
+ //#region src/extensions/my-bookings/context-providers/bookings-context-provider/my-bookings.types.d.ts
2638
+ /** The status vocabularies are the SDK's; every surface that words one reads them from here. */
2639
+ type BookingStatus = NonNullable<Booking['status']>;
2640
+ type ServiceType = NonNullable<Service['type']>;
2641
+ type AttendanceStatus = NonNullable<Attendance['status']>;
2642
+ /** Which of the decided payment lines a booking shows, the first that holds in this order. */
2643
+ declare const PAYMENT_STATE: {
2644
+ readonly FREE: "FREE";
2645
+ readonly PLAN_PAID: "PLAN_PAID";
2646
+ readonly PAID_ONLINE: "PAID_ONLINE";
2647
+ readonly PAID_IN_PERSON: "PAID_IN_PERSON";
2648
+ readonly PARTIALLY_PAID: "PARTIALLY_PAID";
2649
+ readonly NOT_PAID: "NOT_PAID";
2650
+ };
2651
+ type PaymentState = (typeof PAYMENT_STATE)[keyof typeof PAYMENT_STATE];
2652
+ interface BookingAddOn {
2653
+ name: string;
2654
+ quantity: number;
2655
+ }
2656
+ /** The terms one cancellation fee was charged under, as the member agreed to them. */
2657
+ interface BookingCancellationPolicy {
2658
+ description: string;
2659
+ serviceName: string;
2660
+ }
2661
+ /** The terms a service shows its participants, named with the service they belong to. */
2662
+ interface BookingServicePolicy {
2663
+ description: string;
2664
+ serviceName: string;
2665
+ }
2666
+ /** One submitted field, as the form's own formatter words it. */
2667
+ interface FormAnswer {
2668
+ key: string;
2669
+ label: string;
2670
+ value: string;
2671
+ }
2672
+ type FormSubmissionReading = {
2673
+ type: 'success';
2674
+ answers: FormAnswer[];
2675
+ } | {
2676
+ type: 'error';
2677
+ message: string;
2678
+ };
2679
+ /** One booked session inside a group. A single-service group has exactly one. */
2680
+ interface BookingSession {
2681
+ /** @internal */
2682
+ bookingId: string;
2683
+ /** @internal */
2684
+ serviceId: string;
2685
+ serviceName: string;
2686
+ serviceImage: Image | null;
2687
+ startDate: string | null;
2688
+ endDate: string | null;
2689
+ /** IANA zone this session is shown in; sessions of one group may differ. */
2690
+ timeZone: string;
2691
+ bookedDuration: string;
2692
+ staffName: string;
2693
+ addOns: BookingAddOn[];
2694
+ /** This session's own slot flag; sessions of one group may differ. */
2695
+ isAllDay: boolean;
2696
+ /** @internal this session's service page; empty for a service with no page or one the owner hid. */
2697
+ servicePageUrl: string;
2698
+ /** This session's service has a page of its own that the site owner has not hidden. */
2699
+ canViewServiceDetails: boolean;
2700
+ /** Loads this session's service page as a new document. */
2701
+ onViewServiceDetails: () => void;
2702
+ }
2703
+ /** One session of a course, as the header's Upcoming sessions list shows it. */
2704
+ interface CourseSession {
2705
+ /** Full ISO-8601 string, or null where the calendar gave none. */
2706
+ startDate: string | null;
2707
+ endDate: string | null;
2708
+ /** IANA zone the session is shown in: the course booking's own, as the row's timeZone. */
2709
+ timeZone: string;
2710
+ /** Worded exactly the way BookingSession.bookedDuration is, e.g. "1 hour, 30 minutes". */
2711
+ duration: string;
2712
+ staffName: string;
2713
+ }
2714
+ /** What a booking cost: the price it was sold at, and the plan that covered it where one did. */
2715
+ interface BookingPayment {
2716
+ planName: string;
2717
+ hasPlan: boolean;
2718
+ /** True exactly where `state` is set, so the payment line and its label can hide together. */
2719
+ hasSummary: boolean;
2720
+ state: PaymentState | null;
2721
+ /** What the state names beside it, formatted: an amount, or the owner's custom price text. */
2722
+ amount: string;
2723
+ /** Resolved own-line price; empty when unknown or paid with a plan. */
2724
+ amountPaid: string;
2725
+ }
2726
+ /**
2727
+ * One row of the list: a multi-service booking group, or a single booking standing alone.
2728
+ * Singular fields aggregate the group's sessions.
2729
+ */
2730
+ interface BookingGroup {
2731
+ /** @internal the group's id, under the name the platform Repeater keys its rows by. */
2732
+ _id: string;
2733
+ /** The first service's name, `null` where neither the catalogue nor the booking names it. Components join `serviceNames` themselves (`GEN-1`). */
2734
+ title: string | null;
2735
+ serviceNames: string[];
2736
+ /** True for a multi-service booking, however many of its sessions the timeframe shows. */
2737
+ isMultiService: boolean;
2738
+ serviceImage: Image | null;
2739
+ startDate: string | null;
2740
+ endDate: string | null;
2741
+ /** IANA zone the group is shown in, from the first session. */
2742
+ timeZone: string;
2743
+ isAllDay: boolean;
2744
+ location: string;
2745
+ /** Whether `location` carries anything, so a label and its value can both be hidden. */
2746
+ hasLocation: boolean;
2747
+ bookedDuration: string;
2748
+ /** Every add-on across the group's sessions as one line; empty where the group has none. */
2749
+ addOnsSummary: string;
2750
+ /** Whether `addOnsSummary` carries anything, so a label and its value can both be hidden. */
2751
+ hasBookedAddOns: boolean;
2752
+ /** Every form this group was booked with as one line. Empty where it was booked with none. */
2753
+ submittedFormsSummary: string;
2754
+ /** Whether `submittedFormsSummary` carries anything, so a label and its value can both hide. */
2755
+ hasSubmittedForms: boolean;
2756
+ /** Whether any of `location`, the payment line or `submittedFormsSummary` shows, so a divider above them can hide. */
2757
+ hasDetails: boolean;
2758
+ hasFormSubmission: boolean;
2759
+ staffName: string;
2760
+ participantCount: number;
2761
+ /** A course is enrolled in rather than scheduled, so cancelling one ends the whole enrollment. */
2762
+ isCourse: boolean;
2763
+ /** How many sessions a course runs, cancelled ones left out; 0 for any other row or an unread count. */
2764
+ courseSessionCount: number;
2765
+ /** A course row's sessions still to start, non-cancelled, in start order; empty for any other row or when the calendar could not be read. */
2766
+ courseSessions: CourseSession[];
2767
+ /** The first service's kind; `null` for a service the catalogue no longer carries. */
2768
+ serviceType: ServiceType | null;
2769
+ status: BookingStatus;
2770
+ /** @internal called off, or its last session has ended, judged on the raw instant. */
2771
+ isOver: boolean;
2772
+ attendanceStatus: AttendanceStatus | null;
2773
+ /** Words a status the way the Status Badge does, for a Text bound to `status`; `null` for none. */
2774
+ statusToRichText: (status: BookingStatus | null) => RichText | null;
2775
+ /** Words an attendance the way the Status Badge does; `null` before it is recorded. */
2776
+ attendanceStatusToRichText: (attendanceStatus: AttendanceStatus | null) => RichText | null;
2777
+ isAvailableOnline: boolean;
2778
+ /** The conferencing guest URL, as a link element takes it; `null` where the booking has none. */
2779
+ videoConferenceLink: Link | null;
2780
+ /** The SDK's conferencing details: the guest URL as a link, `null` where the member has no place to join with. */
2781
+ conferencingDetails: {
2782
+ guestUrl: Link | null;
2783
+ };
2784
+ videoConferencePassword: string;
2785
+ /** @internal the service's own page; empty for a service with no page or one the owner hid. */
2786
+ servicePageUrl: string;
2787
+ /** Resolves `true` once cancelled and `false` when the cancel failed; never rejects (`CTX-6`). */
2788
+ onCancel: () => Promise<boolean>;
2789
+ onReschedule: () => void;
2790
+ onBookAgain: () => void;
2791
+ onJoinVideoCall: () => void;
2792
+ /** Opens the booking in Google Calendar's new-event template, in a new tab. */
2793
+ onAddToCalendar: () => void;
2794
+ /** True where a plan or an eCom order backs the payment, so the payment line's link can hide. */
2795
+ hasPaymentLink: boolean;
2796
+ /** Opens the booked service's own page through the router. */
2797
+ onViewServiceDetails: () => void;
2798
+ onLoadFormSubmission: () => Promise<FormSubmissionReading>;
2799
+ canCancel: boolean;
2800
+ canReschedule: boolean;
2801
+ canBookAgain: boolean;
2802
+ /** A session still to come that the member holds a place in, with every session dated. */
2803
+ canAddToCalendar: boolean;
2804
+ /** A service with a page of its own that the site owner has not hidden. */
2805
+ canViewServiceDetails: boolean;
2806
+ cancellationFee: string;
2807
+ /** False when the fee read failed, so an empty `cancellationFee` is not read as free. */
2808
+ canStateCancellationFee: boolean;
2809
+ /** The terms behind `cancellationFee`, one entry per booking that owes one. */
2810
+ cancellationPolicies: BookingCancellationPolicy[];
2811
+ /** The booking policy each booked service shows its participants, one entry per service. */
2812
+ bookingPolicies: BookingServicePolicy[];
2813
+ hasBookingPolicy: boolean;
2814
+ isCancelling: boolean;
2815
+ /** True on a row put back because its cancel failed, so the failure survives the row's remount. */
2816
+ hasCancelFailed: boolean;
2817
+ /** @internal Remembers dismissal across row remounts and extension bundles. */
2818
+ cancelFailureDismissals?: CancelFailureDismissals;
2819
+ payment: BookingPayment;
2820
+ sessions: BookingSession[];
2821
+ }
2822
+ //#endregion
2823
+ //#region src/extensions/my-bookings/context-providers/booking-context-provider/booking-context-provider.d.ts
2824
+ type BookingContextValue = BookingGroup;
2825
+ declare const BookingContext: React.Context<BookingGroup | null>;
2826
+ declare const useBooking: () => BookingContextValue;
2827
+ interface BookingContextProviderProps {
2828
+ bookingData: BookingGroup;
2829
+ }
2830
+ declare const BookingContextProvider: FC<PropsWithChildren<BookingContextProviderProps>>;
2831
+
2832
+ export { type AttendanceStatus, type BookingAddOn, BookingContext, type BookingContextProviderProps, type BookingContextValue, type BookingGroup, type BookingPayment, type BookingSession, type BookingStatus, BookingContextProvider as MyBookingContextProvider, BookingContextProvider as default, useBooking };