@wix/auto_sdk_bookings_bookings 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/bookings-v2-booking-bookings.context.d.ts +61 -0
  11. package/build/cjs/src/bookings-v2-booking-bookings.context.js +77 -0
  12. package/build/cjs/src/bookings-v2-booking-bookings.context.js.map +1 -0
  13. package/build/cjs/src/bookings-v2-booking-bookings.http.d.ts +507 -0
  14. package/build/cjs/src/bookings-v2-booking-bookings.http.js +1576 -0
  15. package/build/cjs/src/bookings-v2-booking-bookings.http.js.map +1 -0
  16. package/build/cjs/src/bookings-v2-booking-bookings.meta.d.ts +61 -0
  17. package/build/cjs/src/bookings-v2-booking-bookings.meta.js +427 -0
  18. package/build/cjs/src/bookings-v2-booking-bookings.meta.js.map +1 -0
  19. package/build/cjs/src/bookings-v2-booking-bookings.public.d.ts +625 -0
  20. package/build/cjs/src/bookings-v2-booking-bookings.public.js +313 -0
  21. package/build/cjs/src/bookings-v2-booking-bookings.public.js.map +1 -0
  22. package/build/cjs/src/bookings-v2-booking-bookings.types.d.ts +2736 -0
  23. package/build/cjs/src/bookings-v2-booking-bookings.types.js +165 -0
  24. package/build/cjs/src/bookings-v2-booking-bookings.types.js.map +1 -0
  25. package/build/cjs/src/bookings-v2-booking-bookings.universal.d.ts +4014 -0
  26. package/build/cjs/src/bookings-v2-booking-bookings.universal.js +1646 -0
  27. package/build/cjs/src/bookings-v2-booking-bookings.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/bookings-v2-booking-bookings.context.d.ts +61 -0
  39. package/build/es/src/bookings-v2-booking-bookings.context.js +61 -0
  40. package/build/es/src/bookings-v2-booking-bookings.context.js.map +1 -0
  41. package/build/es/src/bookings-v2-booking-bookings.http.d.ts +507 -0
  42. package/build/es/src/bookings-v2-booking-bookings.http.js +1552 -0
  43. package/build/es/src/bookings-v2-booking-bookings.http.js.map +1 -0
  44. package/build/es/src/bookings-v2-booking-bookings.meta.d.ts +61 -0
  45. package/build/es/src/bookings-v2-booking-bookings.meta.js +380 -0
  46. package/build/es/src/bookings-v2-booking-bookings.meta.js.map +1 -0
  47. package/build/es/src/bookings-v2-booking-bookings.public.d.ts +625 -0
  48. package/build/es/src/bookings-v2-booking-bookings.public.js +276 -0
  49. package/build/es/src/bookings-v2-booking-bookings.public.js.map +1 -0
  50. package/build/es/src/bookings-v2-booking-bookings.types.d.ts +2736 -0
  51. package/build/es/src/bookings-v2-booking-bookings.types.js +162 -0
  52. package/build/es/src/bookings-v2-booking-bookings.types.js.map +1 -0
  53. package/build/es/src/bookings-v2-booking-bookings.universal.d.ts +4014 -0
  54. package/build/es/src/bookings-v2-booking-bookings.universal.js +1599 -0
  55. package/build/es/src/bookings-v2-booking-bookings.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/bookings-v2-booking-bookings.context.d.ts +61 -0
  66. package/build/internal/cjs/src/bookings-v2-booking-bookings.context.js +77 -0
  67. package/build/internal/cjs/src/bookings-v2-booking-bookings.context.js.map +1 -0
  68. package/build/internal/cjs/src/bookings-v2-booking-bookings.http.d.ts +507 -0
  69. package/build/internal/cjs/src/bookings-v2-booking-bookings.http.js +1576 -0
  70. package/build/internal/cjs/src/bookings-v2-booking-bookings.http.js.map +1 -0
  71. package/build/internal/cjs/src/bookings-v2-booking-bookings.meta.d.ts +61 -0
  72. package/build/internal/cjs/src/bookings-v2-booking-bookings.meta.js +427 -0
  73. package/build/internal/cjs/src/bookings-v2-booking-bookings.meta.js.map +1 -0
  74. package/build/internal/cjs/src/bookings-v2-booking-bookings.public.d.ts +625 -0
  75. package/build/internal/cjs/src/bookings-v2-booking-bookings.public.js +313 -0
  76. package/build/internal/cjs/src/bookings-v2-booking-bookings.public.js.map +1 -0
  77. package/build/internal/cjs/src/bookings-v2-booking-bookings.types.d.ts +2736 -0
  78. package/build/internal/cjs/src/bookings-v2-booking-bookings.types.js +165 -0
  79. package/build/internal/cjs/src/bookings-v2-booking-bookings.types.js.map +1 -0
  80. package/build/internal/cjs/src/bookings-v2-booking-bookings.universal.d.ts +4014 -0
  81. package/build/internal/cjs/src/bookings-v2-booking-bookings.universal.js +1646 -0
  82. package/build/internal/cjs/src/bookings-v2-booking-bookings.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/bookings-v2-booking-bookings.context.d.ts +61 -0
  93. package/build/internal/es/src/bookings-v2-booking-bookings.context.js +61 -0
  94. package/build/internal/es/src/bookings-v2-booking-bookings.context.js.map +1 -0
  95. package/build/internal/es/src/bookings-v2-booking-bookings.http.d.ts +507 -0
  96. package/build/internal/es/src/bookings-v2-booking-bookings.http.js +1552 -0
  97. package/build/internal/es/src/bookings-v2-booking-bookings.http.js.map +1 -0
  98. package/build/internal/es/src/bookings-v2-booking-bookings.meta.d.ts +61 -0
  99. package/build/internal/es/src/bookings-v2-booking-bookings.meta.js +380 -0
  100. package/build/internal/es/src/bookings-v2-booking-bookings.meta.js.map +1 -0
  101. package/build/internal/es/src/bookings-v2-booking-bookings.public.d.ts +625 -0
  102. package/build/internal/es/src/bookings-v2-booking-bookings.public.js +276 -0
  103. package/build/internal/es/src/bookings-v2-booking-bookings.public.js.map +1 -0
  104. package/build/internal/es/src/bookings-v2-booking-bookings.types.d.ts +2736 -0
  105. package/build/internal/es/src/bookings-v2-booking-bookings.types.js +162 -0
  106. package/build/internal/es/src/bookings-v2-booking-bookings.types.js.map +1 -0
  107. package/build/internal/es/src/bookings-v2-booking-bookings.universal.d.ts +4014 -0
  108. package/build/internal/es/src/bookings-v2-booking-bookings.universal.js +1599 -0
  109. package/build/internal/es/src/bookings-v2-booking-bookings.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,4014 @@
1
+ /** An entity representing a scheduled appointment, class session, or course. */
2
+ export interface Booking extends BookingParticipantsInfoOneOf {
3
+ /**
4
+ * Total number of participants. Available only when the relevant service
5
+ * doesn't have variants and options
6
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)).
7
+ */
8
+ totalParticipants?: number;
9
+ /**
10
+ * Information about the booked service choices and participants.
11
+ * Available only when the booking includes multiple service variants
12
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)).
13
+ */
14
+ participantsChoices?: ParticipantChoices;
15
+ /**
16
+ * Booking ID.
17
+ * @readonly
18
+ */
19
+ _id?: string | null;
20
+ /**
21
+ * An object describing the slot
22
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/availability-calendar/query-availability) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings-and-time-slots/time-slots/availability-calendar/query-availability))
23
+ * or schedule
24
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction))
25
+ * that was booked.
26
+ */
27
+ bookedEntity?: BookedEntity;
28
+ /**
29
+ * Contact details of the site visitor or
30
+ * member ([SDK](https://dev.wix.com/docs/sdk/backend-modules/members/members/introduction) | [REST](https://dev.wix.com/docs/rest/crm/members-contacts/members/members/introduction))
31
+ * making the booking.
32
+ */
33
+ contactDetails?: ContactDetails;
34
+ /** Additional custom fields submitted with the booking form. */
35
+ additionalFields?: CustomFormField[];
36
+ /**
37
+ * Booking status. A booking is automatically confirmed if the service allows it
38
+ * and an eCommerce order is created. It is automatically declined if there is a
39
+ * double booking and the customer hasn't paid or is eligible for an automatic
40
+ * refund. Currently, only payments with pricing plans are automatically refundable.
41
+ */
42
+ status?: BookingStatus;
43
+ /**
44
+ * The payment status of the booking corresponds to the `paymentStatus` of the
45
+ * related eCommerce order ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/orders/setup)| [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/introduction)),
46
+ * if one exists. All payment statuses are supported for every booking `status`.
47
+ */
48
+ paymentStatus?: PaymentStatus;
49
+ /**
50
+ * Payment option selected by the customer. If the customer hasn't completed their
51
+ * checkout, they may still change the payment method. Must be one of the payment
52
+ * options offered by the service ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction)),
53
+ * unless `skipSelectedPaymentOptionValidation` is `true`.
54
+ * When undefined during an
55
+ * eCommerce checkout ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction)),
56
+ * Wix Bookings uses the service's default payment option
57
+ */
58
+ selectedPaymentOption?: SelectedPaymentOption;
59
+ /**
60
+ * Date and time the booking was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.
61
+ * @readonly
62
+ */
63
+ _createdDate?: Date | null;
64
+ /** External user ID that you can provide. */
65
+ externalUserId?: string | null;
66
+ /**
67
+ * Revision number to be used when updating, rescheduling, or cancelling the
68
+ * booking. Increments by 1 each time the booking is updated, rescheduled, or
69
+ * canceled. To prevent conflicting changes, the current revision must be
70
+ * specified when updating the booking.
71
+ */
72
+ revision?: string | null;
73
+ /**
74
+ * ID of the creator of the booking.
75
+ * If `appId` and another ID are present, the other ID takes precedence.
76
+ * @readonly
77
+ */
78
+ createdBy?: CommonIdentificationData;
79
+ /**
80
+ * The start date of the booking in `YYYY-MM-DDThh:mm:ss.sssZ` format.
81
+ * For a slot, this is the start date of the slot. For a schedule, this is the start date of the first session.
82
+ * @readonly
83
+ */
84
+ startDate?: Date | null;
85
+ /**
86
+ * The end date of the booking in `YYYY-MM-DDThh:mm:ss.sssZ` format.
87
+ * For a slot, this is the end date of the slot. For a schedule, this is the end date of the last session.
88
+ * @readonly
89
+ */
90
+ endDate?: Date | null;
91
+ /**
92
+ * Date and time the booking was updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.
93
+ * @readonly
94
+ */
95
+ _updatedDate?: Date | null;
96
+ /**
97
+ * Custom field data for this object.
98
+ * Extended fields must be configured in the app dashboard before they can be accessed with API calls.
99
+ */
100
+ extendedFields?: ExtendedFields;
101
+ /**
102
+ * Whether this booking overlaps with another confirmed booking. Returned
103
+ * only if set to `true`.
104
+ * @readonly
105
+ */
106
+ doubleBooked?: boolean | null;
107
+ }
108
+ /** @oneof */
109
+ export interface BookingParticipantsInfoOneOf {
110
+ /**
111
+ * Total number of participants. Available only when the relevant service
112
+ * doesn't have variants and options
113
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)).
114
+ */
115
+ totalParticipants?: number;
116
+ /**
117
+ * Information about the booked service choices and participants.
118
+ * Available only when the booking includes multiple service variants
119
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)).
120
+ */
121
+ participantsChoices?: ParticipantChoices;
122
+ }
123
+ /**
124
+ * A multi-service booking is considered available if all individual bookings are available as returned from List Multi Service Availability Time Slots.
125
+ * Currently, `SEPARATE_BOOKINGS` and `PARALLEL_BOOKINGS` are not supported.
126
+ * Multi-service booking is available if each of its bookings is available separately.
127
+ * For `SEQUENTIAL_BOOKINGS`, see `List Multi Service Availability Time Slots` documentation.
128
+ */
129
+ export declare enum MultiServiceBookingType {
130
+ SEQUENTIAL_BOOKINGS = "SEQUENTIAL_BOOKINGS",
131
+ SEPARATE_BOOKINGS = "SEPARATE_BOOKINGS",
132
+ PARALLEL_BOOKINGS = "PARALLEL_BOOKINGS"
133
+ }
134
+ export interface BookedEntity extends BookedEntityItemOneOf {
135
+ /**
136
+ * Booked slot
137
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/availability-calendar/query-availability) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings-and-time-slots/time-slots/availability-calendar/query-availability)).
138
+ * Available only for appointment-based services and classes.
139
+ * For appointment-based services, a new session is created, while for classes,
140
+ * the booking is automatically linked to the existing session.
141
+ */
142
+ slot?: BookedSlot;
143
+ /**
144
+ * Booked schedule
145
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)).
146
+ * Available only for course bookings.
147
+ */
148
+ schedule?: BookedSchedule;
149
+ /**
150
+ * Session title at the time of booking. If there is no pre-existing session,
151
+ * for example for appointment-based services, `title` is set to the service name.
152
+ * @readonly
153
+ */
154
+ title?: string | null;
155
+ /**
156
+ * List of tags for the booking.
157
+ *
158
+ * - "INDIVIDUAL": For bookings of appointment-based services. Including when the appointment is for a group of participants.
159
+ * - "GROUP": For bookings of individual class sessions.
160
+ * - "COURSE": For course bookings.
161
+ */
162
+ tags?: string[] | null;
163
+ }
164
+ /** @oneof */
165
+ export interface BookedEntityItemOneOf {
166
+ /**
167
+ * Booked slot
168
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/availability-calendar/query-availability) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings-and-time-slots/time-slots/availability-calendar/query-availability)).
169
+ * Available only for appointment-based services and classes.
170
+ * For appointment-based services, a new session is created, while for classes,
171
+ * the booking is automatically linked to the existing session.
172
+ */
173
+ slot?: BookedSlot;
174
+ /**
175
+ * Booked schedule
176
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)).
177
+ * Available only for course bookings.
178
+ */
179
+ schedule?: BookedSchedule;
180
+ }
181
+ export interface BookedSlot {
182
+ /** Session ID. */
183
+ sessionId?: string | null;
184
+ /** Service ID. */
185
+ serviceId?: string;
186
+ /** Schedule ID. */
187
+ scheduleId?: string;
188
+ /**
189
+ * ID of the corresponding event
190
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction)).
191
+ * Available for both appointment and class bookings, not available for course bookings.
192
+ * For appointment-based services, Wix Bookings automatically populates `eventId`
193
+ * when the booking `status` changes to `CONFIRMED`. For class bookings, it's
194
+ * automatically populated upon booking creation.
195
+ */
196
+ eventId?: string | null;
197
+ /**
198
+ * The start time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
199
+ * format.
200
+ */
201
+ startDate?: string | null;
202
+ /**
203
+ * The end time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
204
+ * format.
205
+ */
206
+ endDate?: string | null;
207
+ /** The timezone according to which the slot was shown to the user when booking, and should be shown in the future. */
208
+ timezone?: string | null;
209
+ /**
210
+ * Primary resource
211
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/introduction))
212
+ * for the booking. For example, the staff member
213
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/staff-members/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members/introduction))
214
+ * providing the
215
+ * service.
216
+ */
217
+ resource?: BookedResource;
218
+ /** Location where the session takes place. */
219
+ location?: Location;
220
+ }
221
+ export interface BookedResource {
222
+ /** ID of the booking's primary resource. */
223
+ _id?: string;
224
+ /** Resource's name at the time of booking. */
225
+ name?: string | null;
226
+ /** Resource's email at the time of booking. */
227
+ email?: string | null;
228
+ /** ID of the schedule belonging to the booking's primary resource. */
229
+ scheduleId?: string | null;
230
+ }
231
+ export interface Location {
232
+ /**
233
+ * Business location ID. Available only for locations that are business locations,
234
+ * meaning the `location_type` is `"OWNER_BUSINESS"`.
235
+ */
236
+ _id?: string | null;
237
+ /** Location name. */
238
+ name?: string | null;
239
+ /** The full address of this location. */
240
+ formattedAddress?: string | null;
241
+ /** The full translated address of this location. */
242
+ formattedAddressTranslated?: string | null;
243
+ /**
244
+ * Location type.
245
+ *
246
+ * - `"OWNER_BUSINESS"`: The business address, as set in the site’s general settings.
247
+ * - `"OWNER_CUSTOM"`: The address as set when creating the service.
248
+ * - `"CUSTOM"`: The address as set for the individual session.
249
+ */
250
+ locationType?: LocationType;
251
+ }
252
+ export declare enum LocationType {
253
+ UNDEFINED = "UNDEFINED",
254
+ OWNER_BUSINESS = "OWNER_BUSINESS",
255
+ OWNER_CUSTOM = "OWNER_CUSTOM",
256
+ CUSTOM = "CUSTOM"
257
+ }
258
+ export interface BookedSchedule {
259
+ /**
260
+ * Schedule ID
261
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)).
262
+ */
263
+ scheduleId?: string;
264
+ /** Booked service ID. */
265
+ serviceId?: string | null;
266
+ /**
267
+ * Location
268
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction))
269
+ * where the schedule's sessions take place.
270
+ * @readonly
271
+ */
272
+ location?: Location;
273
+ /**
274
+ * Timezone in which the slot or session was shown to the customer when they booked.
275
+ * Also used whenever the customer reviews the booking's timing in the future.
276
+ */
277
+ timezone?: string | null;
278
+ /**
279
+ * Start time of the first session related to the booking in
280
+ * [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) format.
281
+ * @readonly
282
+ */
283
+ firstSessionStart?: string | null;
284
+ /**
285
+ * End time of the last session related to the booking in
286
+ * [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) format.
287
+ * @readonly
288
+ */
289
+ lastSessionEnd?: string | null;
290
+ }
291
+ export interface ContactDetails {
292
+ /** Contact ID. */
293
+ contactId?: string | null;
294
+ /**
295
+ * Contact's first name. When populated from a standard booking form, this
296
+ * property corresponds to the `name` field.
297
+ */
298
+ firstName?: string | null;
299
+ /** Contact's last name. */
300
+ lastName?: string | null;
301
+ /**
302
+ * Contact's email. If no [contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/contact-object)
303
+ * with this email exist, a new contact is created.
304
+ * Used to validate coupon usage limitations per contact. If not specified,
305
+ * the coupon usage limitation will not be enforced. (Coupon usage limitation
306
+ * validation is not supported yet).
307
+ */
308
+ email?: string | null;
309
+ /** Contact's phone number. */
310
+ phone?: string | null;
311
+ /** Contact's full address. */
312
+ fullAddress?: Address;
313
+ /**
314
+ * Contact's time zone.
315
+ * @deprecated
316
+ */
317
+ timeZone?: string | null;
318
+ /**
319
+ * Contact's country in [ISO 3166-1 alpha-2 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
320
+ * format.
321
+ */
322
+ countryCode?: string | null;
323
+ }
324
+ /** Physical address */
325
+ export interface Address extends AddressStreetOneOf {
326
+ /** Street name, number and apartment number. */
327
+ streetAddress?: StreetAddress;
328
+ /** Main address line, usually street and number, as free text. */
329
+ addressLine?: string | null;
330
+ /** Country code. */
331
+ country?: string | null;
332
+ /** Subdivision. Usually state, region, prefecture or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
333
+ subdivision?: string | null;
334
+ /** City name. */
335
+ city?: string | null;
336
+ /** Zip/postal code. */
337
+ postalCode?: string | null;
338
+ /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
339
+ addressLine2?: string | null;
340
+ /** A string containing the full address of this location. */
341
+ formattedAddress?: string | null;
342
+ /** Free text to help find the address. */
343
+ hint?: string | null;
344
+ /** Coordinates of the physical address. */
345
+ geocode?: AddressLocation;
346
+ /** Country full name. */
347
+ countryFullname?: string | null;
348
+ /** Multi-level subdivisions from top to bottom. */
349
+ subdivisions?: Subdivision[];
350
+ }
351
+ /** @oneof */
352
+ export interface AddressStreetOneOf {
353
+ /** Street name, number and apartment number. */
354
+ streetAddress?: StreetAddress;
355
+ /** Main address line, usually street and number, as free text. */
356
+ addressLine?: string | null;
357
+ }
358
+ export interface StreetAddress {
359
+ /** Street number. */
360
+ number?: string;
361
+ /** Street name. */
362
+ name?: string;
363
+ /** Apartment number. */
364
+ apt?: string;
365
+ }
366
+ export interface AddressLocation {
367
+ /** Address latitude. */
368
+ latitude?: number | null;
369
+ /** Address longitude. */
370
+ longitude?: number | null;
371
+ }
372
+ export interface Subdivision {
373
+ /** Subdivision code. Usually state, region, prefecture or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
374
+ code?: string;
375
+ /** Subdivision full name. */
376
+ name?: string;
377
+ }
378
+ export interface CustomFormField {
379
+ /** ID of the form field as defined in the form. */
380
+ _id?: string;
381
+ /** Value that was submitted for this field. */
382
+ value?: string | null;
383
+ /**
384
+ * Form field's label at the time of submission.
385
+ * @readonly
386
+ */
387
+ label?: string | null;
388
+ valueType?: ValueType;
389
+ }
390
+ export declare enum ValueType {
391
+ /** Short text. This is the default value type. */
392
+ SHORT_TEXT = "SHORT_TEXT",
393
+ /** Long text. */
394
+ LONG_TEXT = "LONG_TEXT",
395
+ /** A text that represents the check box value. If selected the value is `true`, otherwise `false`. */
396
+ CHECK_BOX = "CHECK_BOX"
397
+ }
398
+ /** Booking status. */
399
+ export declare enum BookingStatus {
400
+ /**
401
+ * The booking was created, but the customer hasn't completed the related
402
+ * eCommerce order yet.
403
+ */
404
+ CREATED = "CREATED",
405
+ /**
406
+ * The merchant has confirmed the booking and it appears in the
407
+ * business calendar. Merchants can set up their services
408
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction))
409
+ * to automatically confirm all `PENDING` bookings.
410
+ */
411
+ CONFIRMED = "CONFIRMED",
412
+ /**
413
+ * The customer has canceled the booking. Depending on the relevant service's
414
+ * policy snapshot
415
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/booking-policy-snapshots/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policy-snapshots/introduction))
416
+ * they may have to pay a cancellation fee
417
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/booking-fees/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/booking-fees/introduction)).
418
+ */
419
+ CANCELED = "CANCELED",
420
+ /**
421
+ * The merchant must manually confirm the booking before it appears
422
+ * in the business calendar.
423
+ */
424
+ PENDING = "PENDING",
425
+ /** The merchant has declined the booking before the customer was charged. */
426
+ DECLINED = "DECLINED",
427
+ /**
428
+ * The booking is on a waitlist.
429
+ * Currently, you can't call Register to Waitlist
430
+ * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/waitlist/register-to-waitlist))
431
+ * for course or appointment bookings, even though this is supported in live sites.
432
+ * You can call Register to Waitlist only for class session bookings.
433
+ */
434
+ WAITING_LIST = "WAITING_LIST"
435
+ }
436
+ /**
437
+ * Payment status.
438
+ * Automatically updated when using eCommerce checkout APIs.
439
+ */
440
+ export declare enum PaymentStatus {
441
+ /** Undefined payment status. */
442
+ UNDEFINED = "UNDEFINED",
443
+ /** The booking isn't paid. */
444
+ NOT_PAID = "NOT_PAID",
445
+ /** The booking is fully paid. */
446
+ PAID = "PAID",
447
+ /** The booking is partially paid. */
448
+ PARTIALLY_PAID = "PARTIALLY_PAID",
449
+ /** The booking is refunded. */
450
+ REFUNDED = "REFUNDED",
451
+ /** The booking is free of charge. */
452
+ EXEMPT = "EXEMPT"
453
+ }
454
+ /**
455
+ * Selected payment option.
456
+ *
457
+ * One of the payment options offered by the service.
458
+ * This field is set when the user selects an option during booking.
459
+ * If left undefined, the payment option is resolved by the service configuration on checkout.
460
+ */
461
+ export declare enum SelectedPaymentOption {
462
+ /** Undefined payment option. */
463
+ UNDEFINED = "UNDEFINED",
464
+ /** Offline payment. */
465
+ OFFLINE = "OFFLINE",
466
+ /** Online payment. */
467
+ ONLINE = "ONLINE",
468
+ /** Payment using a Wix Pricing Plan. */
469
+ MEMBERSHIP = "MEMBERSHIP",
470
+ /**
471
+ * Customers can pay only in person with a Wix Pricing Plan, while the Wix user
472
+ * must manually redeem the pricing plan in the dashboard.
473
+ */
474
+ MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE"
475
+ }
476
+ export interface BookingSource {
477
+ /** Platform from which a booking was created. */
478
+ platform?: Platform;
479
+ /** Actor that created this booking. */
480
+ actor?: Actor;
481
+ /**
482
+ * Wix site ID of the application that created the booking.
483
+ * @readonly
484
+ */
485
+ appDefId?: string | null;
486
+ /**
487
+ * Name of the application that created the booking, as saved in Wix Developers Center at the time of booking.
488
+ * @readonly
489
+ */
490
+ appName?: string | null;
491
+ }
492
+ export declare enum Platform {
493
+ UNDEFINED_PLATFORM = "UNDEFINED_PLATFORM",
494
+ WEB = "WEB",
495
+ MOBILE_APP = "MOBILE_APP"
496
+ }
497
+ export declare enum Actor {
498
+ UNDEFINED_ACTOR = "UNDEFINED_ACTOR",
499
+ BUSINESS = "BUSINESS",
500
+ CUSTOMER = "CUSTOMER"
501
+ }
502
+ export interface ParticipantNotification {
503
+ /**
504
+ * Whether to send the message about the changes to the customer.
505
+ *
506
+ * Default: `false`
507
+ */
508
+ notifyParticipants?: boolean;
509
+ /** Custom message to send to the participants about the changes to the booking. */
510
+ message?: string | null;
511
+ }
512
+ export interface CommonIdentificationData extends CommonIdentificationDataIdOneOf {
513
+ /** ID of a site visitor that has not logged in to the site. */
514
+ anonymousVisitorId?: string;
515
+ /** ID of a site visitor that has logged in to the site. */
516
+ memberId?: string;
517
+ /** ID of a Wix user (site owner, contributor, etc.). */
518
+ wixUserId?: string;
519
+ /** ID of an app. */
520
+ appId?: string;
521
+ /** ID of of a contact in the site's [CRM by Ascend](https://www.wix.com/ascend/crm) system. */
522
+ contactId?: string | null;
523
+ }
524
+ /** @oneof */
525
+ export interface CommonIdentificationDataIdOneOf {
526
+ /** ID of a site visitor that has not logged in to the site. */
527
+ anonymousVisitorId?: string;
528
+ /** ID of a site visitor that has logged in to the site. */
529
+ memberId?: string;
530
+ /** ID of a Wix user (site owner, contributor, etc.). */
531
+ wixUserId?: string;
532
+ /** ID of an app. */
533
+ appId?: string;
534
+ }
535
+ export declare enum IdentificationDataIdentityType {
536
+ UNKNOWN = "UNKNOWN",
537
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
538
+ MEMBER = "MEMBER",
539
+ WIX_USER = "WIX_USER",
540
+ APP = "APP"
541
+ }
542
+ export interface FlowControlSettings {
543
+ /** Whether availability is checked when creating or confirming the booking. */
544
+ skipAvailabilityValidation?: boolean;
545
+ /**
546
+ * Whether the booking's `status` is automatically updated to `CONFIRMED` when
547
+ * the customer completes the eCommerce checkout
548
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction)),
549
+ * regardless of whether the relevant service requires manual business confirmation.
550
+ */
551
+ skipBusinessConfirmation?: boolean;
552
+ /**
553
+ * Whether the customer is allowed to pay with a payment method that isn't
554
+ * supported for the relevant service.
555
+ */
556
+ skipSelectedPaymentOptionValidation?: boolean;
557
+ /**
558
+ * Whether the customer receives an automatic refund if there's a double booking
559
+ * conflict. Only available if the customer has paid with a
560
+ * pricing plan.
561
+ */
562
+ withRefund?: boolean | null;
563
+ }
564
+ export interface ExtendedFields {
565
+ /**
566
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
567
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
568
+ *
569
+ * You can only access fields for which you have the appropriate permissions.
570
+ *
571
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
572
+ */
573
+ namespaces?: Record<string, Record<string, any>>;
574
+ }
575
+ export interface ParticipantChoices {
576
+ /** Information about the booked service choices. Includes the number of participants. */
577
+ serviceChoices?: ServiceChoices[];
578
+ }
579
+ export interface ServiceChoices {
580
+ /**
581
+ * Number of participants for this variant
582
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)).
583
+ */
584
+ numberOfParticipants?: number | null;
585
+ /** Service choices for these participants. */
586
+ choices?: ServiceChoice[];
587
+ }
588
+ export interface ServiceChoice extends ServiceChoiceChoiceOneOf {
589
+ /**
590
+ * Value for one of the choices in the [`CustomServiceOption.choices`](https://example.com) list.
591
+ * Choices are specific values for an option the customer can choose to book. For example,
592
+ * the option `ageGroup` may have these choices: `child`, `student`, `adult`, and `senior`.
593
+ * Each choice may have a different price.
594
+ */
595
+ custom?: string;
596
+ duration?: Duration;
597
+ /**
598
+ * ID of the corresponding option for the choice. For example, the choice `child`
599
+ * could correspond to the option `ageGroup`. In this case, `optionId` is the ID
600
+ * for the `ageGroup` option.
601
+ */
602
+ optionId?: string;
603
+ }
604
+ /** @oneof */
605
+ export interface ServiceChoiceChoiceOneOf {
606
+ /**
607
+ * Value for one of the choices in the [`CustomServiceOption.choices`](https://example.com) list.
608
+ * Choices are specific values for an option the customer can choose to book. For example,
609
+ * the option `ageGroup` may have these choices: `child`, `student`, `adult`, and `senior`.
610
+ * Each choice may have a different price.
611
+ */
612
+ custom?: string;
613
+ duration?: Duration;
614
+ }
615
+ export interface Duration {
616
+ /**
617
+ * Duration of the service in minutes.
618
+ * Min: 1 minute, Max: 30 days, 23 hours, and 59 minutes
619
+ */
620
+ minutes?: number;
621
+ /**
622
+ * Name of the duration option.
623
+ * Defaults to the formatted duration e.g. "1 hour, 30 minutes".
624
+ */
625
+ name?: string | null;
626
+ }
627
+ export interface MultiServiceBookingInfo {
628
+ /**
629
+ * Multi-service booking ID.
630
+ * @readonly
631
+ */
632
+ _id?: string | null;
633
+ /** Type of the multi-service booking. */
634
+ type?: MultiServiceBookingType;
635
+ }
636
+ export interface BookingFormFilled {
637
+ /** The booking object that form was filled for. */
638
+ booking?: Booking;
639
+ /**
640
+ * The submitted form data, where key is the form field and value is the data submitted for the given field.
641
+ * See the [form submission object](https://dev.wix.com/docs/rest/crm/forms/form-submissions/submission-object)
642
+ * for more details.
643
+ */
644
+ formSubmission?: Record<string, any> | null;
645
+ /**
646
+ * ID of the [form](https://dev.wix.com/docs/rest/crm/forms/form-schemas/form-object)
647
+ * that was filled.
648
+ */
649
+ formId?: string | null;
650
+ }
651
+ export interface SetBookingFormAndSubmissionIdRequest {
652
+ /** ID of the booking to set `formId` and `submissionId` for. */
653
+ bookingId?: string | null;
654
+ /** ID of the form to set on the booking. */
655
+ formId?: string | null;
656
+ /** ID of the form submission to set on the booking. */
657
+ submissionId?: string | null;
658
+ }
659
+ export interface SetBookingFormAndSubmissionIdResponse {
660
+ /** Updated booking. */
661
+ booking?: Booking;
662
+ }
663
+ export interface DomainEvent extends DomainEventBodyOneOf {
664
+ createdEvent?: EntityCreatedEvent;
665
+ updatedEvent?: EntityUpdatedEvent;
666
+ deletedEvent?: EntityDeletedEvent;
667
+ actionEvent?: ActionEvent;
668
+ /**
669
+ * Unique event ID.
670
+ * Allows clients to ignore duplicate webhooks.
671
+ */
672
+ _id?: string;
673
+ /**
674
+ * Assumes actions are also always typed to an entity_type
675
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
676
+ */
677
+ entityFqdn?: string;
678
+ /**
679
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
680
+ * This is although the created/updated/deleted notion is duplication of the oneof types
681
+ * Example: created/updated/deleted/started/completed/email_opened
682
+ */
683
+ slug?: string;
684
+ /** ID of the entity associated with the event. */
685
+ entityId?: string;
686
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
687
+ eventTime?: Date | null;
688
+ /**
689
+ * Whether the event was triggered as a result of a privacy regulation application
690
+ * (for example, GDPR).
691
+ */
692
+ triggeredByAnonymizeRequest?: boolean | null;
693
+ /** If present, indicates the action that triggered the event. */
694
+ originatedFrom?: string | null;
695
+ /**
696
+ * A sequence number defining the order of updates to the underlying entity.
697
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
698
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
699
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
700
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
701
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
702
+ */
703
+ entityEventSequence?: string | null;
704
+ }
705
+ /** @oneof */
706
+ export interface DomainEventBodyOneOf {
707
+ createdEvent?: EntityCreatedEvent;
708
+ updatedEvent?: EntityUpdatedEvent;
709
+ deletedEvent?: EntityDeletedEvent;
710
+ actionEvent?: ActionEvent;
711
+ }
712
+ export interface EntityCreatedEvent {
713
+ entity?: string;
714
+ }
715
+ export interface RestoreInfo {
716
+ deletedDate?: Date | null;
717
+ }
718
+ export interface EntityUpdatedEvent {
719
+ /**
720
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
721
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
722
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
723
+ */
724
+ currentEntity?: string;
725
+ }
726
+ export interface EntityDeletedEvent {
727
+ /** Entity that was deleted */
728
+ deletedEntity?: string | null;
729
+ }
730
+ export interface ActionEvent {
731
+ body?: string;
732
+ }
733
+ export interface MessageEnvelope {
734
+ /** App instance ID. */
735
+ instanceId?: string | null;
736
+ /** Event type. */
737
+ eventType?: string;
738
+ /** The identification type and identity data. */
739
+ identity?: WebhooksIdentificationData;
740
+ /** Stringify payload. */
741
+ data?: string;
742
+ }
743
+ export interface WebhooksIdentificationData extends WebhooksIdentificationDataIdOneOf {
744
+ /** ID of a site visitor that has not logged in to the site. */
745
+ anonymousVisitorId?: string;
746
+ /** ID of a site visitor that has logged in to the site. */
747
+ memberId?: string;
748
+ /** ID of a Wix user (site owner, contributor, etc.). */
749
+ wixUserId?: string;
750
+ /** ID of an app. */
751
+ appId?: string;
752
+ /** @readonly */
753
+ identityType?: WebhookIdentityType;
754
+ }
755
+ /** @oneof */
756
+ export interface WebhooksIdentificationDataIdOneOf {
757
+ /** ID of a site visitor that has not logged in to the site. */
758
+ anonymousVisitorId?: string;
759
+ /** ID of a site visitor that has logged in to the site. */
760
+ memberId?: string;
761
+ /** ID of a Wix user (site owner, contributor, etc.). */
762
+ wixUserId?: string;
763
+ /** ID of an app. */
764
+ appId?: string;
765
+ }
766
+ export declare enum WebhookIdentityType {
767
+ UNKNOWN = "UNKNOWN",
768
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
769
+ MEMBER = "MEMBER",
770
+ WIX_USER = "WIX_USER",
771
+ APP = "APP"
772
+ }
773
+ export interface CreateMultiServiceBookingRequest {
774
+ /** Single-service bookings to combine in a multi-service booking. */
775
+ bookings: Booking[];
776
+ /**
777
+ * Information about whether to notify the customer and
778
+ * the message to send.
779
+ */
780
+ participantNotification?: ParticipantNotification;
781
+ /**
782
+ * Whether to send an SMS reminder to the customer 24 hours before the
783
+ * session starts. The phone number is taken from `contactDetails.phone`.
784
+ *
785
+ * Default: `true`
786
+ */
787
+ sendSmsReminder?: boolean | null;
788
+ /**
789
+ * Whether to ignore specific standard procedures of the Wix Bookings flow.
790
+ * For example, whether to check availability before updating the status.
791
+ */
792
+ flowControlSettings?: CreateBookingFlowControlSettings;
793
+ /** Whether to return the created single-service bookings. */
794
+ returnFullEntity?: boolean;
795
+ /** Multi service booking type. */
796
+ multiServiceBookingType?: MultiServiceBookingType;
797
+ }
798
+ export interface CreateBookingFlowControlSettings {
799
+ /**
800
+ * Whether the availability is checked before creating the booking.
801
+ *
802
+ * When passing `false`, a booking is only created when the slot or schedule is available.
803
+ * Default: `false`.
804
+ */
805
+ skipAvailabilityValidation?: boolean;
806
+ /**
807
+ * Whether `PENDING` bookings are automatically set to `CONFIRMED` for
808
+ * services that normally require the owner's manual confirmation.
809
+ *
810
+ * Your app must have the `BOOKINGS.OVERRIDE_AVAILABILITY` permission scope
811
+ * when passing `true`.
812
+ * Default: `false`.
813
+ */
814
+ skipBusinessConfirmation?: boolean;
815
+ /**
816
+ * Whether customers can pay using a payment method that isn't supported
817
+ * for the service, but that's supported for other services.
818
+ *
819
+ * Your app must have the `BOOKINGS.MANAGE_PAYMENTS` permission scope when passing
820
+ * `true`.
821
+ * Default: `false`.
822
+ */
823
+ skipSelectedPaymentOptionValidation?: boolean;
824
+ }
825
+ export interface CreateMultiServiceBookingResponse {
826
+ /**
827
+ * Created multi service booking.
828
+ * Contains the booking results in the same order as specified in the request.
829
+ */
830
+ multiServiceBooking?: MultiServiceBooking;
831
+ }
832
+ export interface MultiServiceBooking {
833
+ /** Multi-service booking ID. */
834
+ _id?: string | null;
835
+ /** The created bookings that are part of the multi-service booking. */
836
+ bookings?: BookingResult[];
837
+ }
838
+ export interface BookingResult {
839
+ /** Booking ID. */
840
+ bookingId?: string | null;
841
+ /** Booking entity. */
842
+ booking?: Booking;
843
+ }
844
+ export interface RescheduleMultiServiceBookingRequest {
845
+ /** ID of the multi service booking to reschedule. */
846
+ multiServiceBookingId: string | null;
847
+ /** Information about the single-service bookings to reschedule. */
848
+ rescheduleBookingsInfo: RescheduleBookingInfo[];
849
+ /**
850
+ * Information about whether to notify the customer and
851
+ * the message to send.
852
+ */
853
+ participantNotification?: ParticipantNotification;
854
+ /**
855
+ * Information about whether specific procedures of the standard Wix Bookings
856
+ * rescheduling flow are changed. For example, whether the availability of
857
+ * the new slot is checked before rescheduling the booking or if you can
858
+ * reschedule the booking even though the rescheduling policy doesn't allow it.
859
+ */
860
+ flowControlSettings?: RescheduleBookingFlowControlSettings;
861
+ /** Whether to return the rescheduled bookings entities. */
862
+ returnFullEntity?: boolean;
863
+ }
864
+ export interface V2Slot {
865
+ /** Identifier for the underlying session when the session is a single session or generated from a recurring session. */
866
+ sessionId?: string | null;
867
+ /** Service identifier. Required. */
868
+ serviceId?: string;
869
+ /** Schedule identifier. Required. */
870
+ scheduleId?: string;
871
+ /** The start time of this slot (formatted according to RFC3339). */
872
+ startDate?: string | null;
873
+ /** The end time of this slot (formatted according to RFC3339). */
874
+ endDate?: string | null;
875
+ /** The timezone according to which the slot is calculated and presented. */
876
+ timezone?: string | null;
877
+ /**
878
+ * The resource required for this slot.
879
+ * When populated, the specified resource will be assigned to the slot upon confirmation according to its availability.
880
+ * When empty, if `skip_availability_validation` is `false`, a random available resource will be assigned to the slot upon confirmation.
881
+ * Otherwise, one of the service resources will be assigned to the slot randomly upon confirmation.
882
+ */
883
+ resource?: SlotSlotResource;
884
+ /** Geographic location of the slot. */
885
+ location?: SlotLocation;
886
+ /**
887
+ * Calendar event ID - not supported.
888
+ * If not empty, on all write flows (create/update), it takes priority over `sessionId`.
889
+ * So if both `sessionId` and `eventId` are provided, the `sessionId` will be based on the `eventId`.
890
+ * Otherwise, if `eventId` is empty on write flow,
891
+ */
892
+ eventId?: string | null;
893
+ }
894
+ export declare enum LocationLocationType {
895
+ /** Undefined location type. */
896
+ UNDEFINED = "UNDEFINED",
897
+ /** The business address as set in the site’s general settings. */
898
+ OWNER_BUSINESS = "OWNER_BUSINESS",
899
+ /** The address set when creating the service. */
900
+ OWNER_CUSTOM = "OWNER_CUSTOM",
901
+ /** The address set for the individual session. */
902
+ CUSTOM = "CUSTOM"
903
+ }
904
+ export interface SlotSlotResource {
905
+ /**
906
+ * Resource ID.
907
+ * @readonly
908
+ */
909
+ _id?: string | null;
910
+ /** Resource name. */
911
+ name?: string | null;
912
+ }
913
+ export interface SlotLocation {
914
+ /** Business Location ID. Present if the location is a business location. */
915
+ _id?: string | null;
916
+ /** Location name. */
917
+ name?: string | null;
918
+ /** A string containing the full address of this location. */
919
+ formattedAddress?: string | null;
920
+ /** Location type. */
921
+ locationType?: LocationLocationType;
922
+ }
923
+ export interface RescheduleBookingInfo extends RescheduleBookingInfoParticipantsInfoOneOf {
924
+ /**
925
+ * Total number of participants. Available only for services with variants.
926
+ * Specify when all participants book the same variant.
927
+ */
928
+ totalParticipants?: number;
929
+ /**
930
+ * Information about the service choices to book. Available only for services with
931
+ * variants.
932
+ * Specify when not all participants book the same variant.
933
+ */
934
+ participantsChoices?: ParticipantChoices;
935
+ /** ID of the booking to reschedule. */
936
+ bookingId?: string | null;
937
+ /** Information about the new slot. */
938
+ slot?: V2Slot;
939
+ /**
940
+ * Revision number, which increments by 1 each time the booking is updated.
941
+ * To prevent conflicting changes, the current revision must be specified when
942
+ * managing the booking.
943
+ */
944
+ revision?: string | null;
945
+ }
946
+ /** @oneof */
947
+ export interface RescheduleBookingInfoParticipantsInfoOneOf {
948
+ /**
949
+ * Total number of participants. Available only for services with variants.
950
+ * Specify when all participants book the same variant.
951
+ */
952
+ totalParticipants?: number;
953
+ /**
954
+ * Information about the service choices to book. Available only for services with
955
+ * variants.
956
+ * Specify when not all participants book the same variant.
957
+ */
958
+ participantsChoices?: ParticipantChoices;
959
+ }
960
+ export interface RescheduleBookingFlowControlSettings {
961
+ /**
962
+ * Whether the rescheduling policy applies when rescheduling the booking.
963
+ *
964
+ * When passing `false`, you can only cancel a booking if the rescheduling
965
+ * policy allows it.
966
+ * Default: `false`.
967
+ */
968
+ ignoreReschedulePolicy?: boolean;
969
+ /**
970
+ * Whether the availability is checked before rescheduling the booking.
971
+ *
972
+ * When passing `false`, a booking is only created when the slot or
973
+ * schedule is available.
974
+ * Default: `false`.
975
+ */
976
+ skipAvailabilityValidation?: boolean;
977
+ /**
978
+ * Whether the rescheduled booking's status is automatically set to
979
+ * `CONFIRMED` for services that normally require the owner's manual
980
+ * confirmation.
981
+ * Default: `false`.
982
+ */
983
+ skipBusinessConfirmation?: boolean;
984
+ }
985
+ export interface RescheduleMultiServiceBookingResponse {
986
+ /** Rescheduled multi-service booking. */
987
+ multiServiceBooking?: MultiServiceBooking;
988
+ }
989
+ export interface BookingRescheduled extends BookingRescheduledPreviousParticipantsInfoOneOf {
990
+ /**
991
+ * The previous total number of participants. Available only when the booking includes
992
+ * a single service variant.
993
+ */
994
+ previousTotalParticipants?: number;
995
+ /**
996
+ * Information about the previous booked service choices and participants.
997
+ * Available only when the booking includes multiple service variants.
998
+ */
999
+ previousParticipantsChoices?: ParticipantChoices;
1000
+ /** The rescheduled booking object. */
1001
+ booking?: Booking;
1002
+ /** Information about whether to notify the customer about the rescheduling and the message to send. */
1003
+ participantNotification?: ParticipantNotification;
1004
+ /**
1005
+ * Information about whether specific procedures of the standard Wix Bookings
1006
+ * rescheduling flow are changed. For example, whether the availability of
1007
+ * the new slot is checked before rescheduling the booking or if you can
1008
+ * reschedule the booking even though the rescheduling policy doesn't allow it.
1009
+ */
1010
+ flowControlSettings?: RescheduleBookingFlowControlSettings;
1011
+ /** ID of the rescheduling initiator. */
1012
+ initiatedBy?: IdentificationData;
1013
+ /** The previous status of the booking. */
1014
+ previousStatus?: BookingStatus;
1015
+ /** An object describing the previous slot or schedule of the booking. */
1016
+ previousBookedEntity?: BookedEntity;
1017
+ /**
1018
+ * The previous start date of the booking.
1019
+ * For a slot, this is the start date of the slot.
1020
+ * For a schedule, this is the start date of the first session.
1021
+ */
1022
+ previousStartDate?: Date | null;
1023
+ /**
1024
+ * The previous end date of the booking.
1025
+ * For a slot, this is the end date of the slot.
1026
+ * For a schedule, this is the end date of the last session.
1027
+ */
1028
+ previousEndDate?: Date | null;
1029
+ }
1030
+ /** @oneof */
1031
+ export interface BookingRescheduledPreviousParticipantsInfoOneOf {
1032
+ /**
1033
+ * The previous total number of participants. Available only when the booking includes
1034
+ * a single service variant.
1035
+ */
1036
+ previousTotalParticipants?: number;
1037
+ /**
1038
+ * Information about the previous booked service choices and participants.
1039
+ * Available only when the booking includes multiple service variants.
1040
+ */
1041
+ previousParticipantsChoices?: ParticipantChoices;
1042
+ }
1043
+ export interface IdentificationData extends IdentificationDataIdOneOf {
1044
+ /** ID of a site visitor that has not logged in to the site. */
1045
+ anonymousVisitorId?: string;
1046
+ /** ID of a site visitor that has logged in to the site. */
1047
+ memberId?: string;
1048
+ /** ID of a Wix user (site owner, contributor, etc.). */
1049
+ wixUserId?: string;
1050
+ /** ID of an app. */
1051
+ appId?: string;
1052
+ /**
1053
+ * ID of of a contact in the site's [CRM by Ascend](https://www.wix.com/ascend/crm) system.
1054
+ * @readonly
1055
+ */
1056
+ contactId?: string | null;
1057
+ }
1058
+ /** @oneof */
1059
+ export interface IdentificationDataIdOneOf {
1060
+ /** ID of a site visitor that has not logged in to the site. */
1061
+ anonymousVisitorId?: string;
1062
+ /** ID of a site visitor that has logged in to the site. */
1063
+ memberId?: string;
1064
+ /** ID of a Wix user (site owner, contributor, etc.). */
1065
+ wixUserId?: string;
1066
+ /** ID of an app. */
1067
+ appId?: string;
1068
+ }
1069
+ export declare enum IdentityType {
1070
+ UNKNOWN = "UNKNOWN",
1071
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1072
+ MEMBER = "MEMBER",
1073
+ WIX_USER = "WIX_USER",
1074
+ APP = "APP"
1075
+ }
1076
+ export interface GetMultiServiceBookingAvailabilityRequest {
1077
+ /** ID of the multi-service booking to retrieve. */
1078
+ multiServiceBookingId: string | null;
1079
+ }
1080
+ export interface GetMultiServiceBookingAvailabilityResponse {
1081
+ /** Whether all contained single-service bookings are bookable. */
1082
+ bookable?: boolean;
1083
+ /** Total number of spots. */
1084
+ totalCapacity?: number | null;
1085
+ /** Number of open spots. */
1086
+ remainingCapacity?: number | null;
1087
+ /** Indicators for policy violations of the multi service booking. */
1088
+ policyViolations?: BookingPolicyViolations;
1089
+ /** Multi-service booking policy settings. */
1090
+ policySettings?: BookingPolicySettings;
1091
+ /** Info of the bookings this availability was calculated for. */
1092
+ multiServiceBookingInfo?: GetMultiServiceBookingAvailabilityResponseBookingInfo[];
1093
+ }
1094
+ export interface BookingPolicyViolations {
1095
+ /** Booking policy violation: Too early to book this slot. */
1096
+ tooEarlyToBook?: boolean | null;
1097
+ /** Booking policy violation: Too late to book this slot. */
1098
+ tooLateToBook?: boolean | null;
1099
+ /** Booking policy violation: Online booking is disabled for this slot. */
1100
+ bookOnlineDisabled?: boolean | null;
1101
+ }
1102
+ export interface BookingPolicySettings {
1103
+ /** Booking policy settings for a given slot or schedule. */
1104
+ maxParticipantsPerBooking?: number | null;
1105
+ }
1106
+ export interface GetMultiServiceBookingAvailabilityResponseBookingInfo {
1107
+ /** Booking ID. */
1108
+ bookingId?: string | null;
1109
+ }
1110
+ export interface CancelMultiServiceBookingRequest {
1111
+ /** ID of the multi-service booking to cancel. */
1112
+ multiServiceBookingId: string | null;
1113
+ /**
1114
+ * Information about whether to notify the customer and
1115
+ * the message to send.
1116
+ */
1117
+ participantNotification?: ParticipantNotification;
1118
+ /**
1119
+ * Information about whether specific procedures of the standard Wix Bookings
1120
+ * cancellation flow are changed. For example, whether you can cancel
1121
+ * a booking even though the cancellation policy doesn't allow it or whether
1122
+ * to issue a refund.
1123
+ */
1124
+ flowControlSettings?: CancelBookingFlowControlSettings;
1125
+ /** Whether to return the canceled single-service bookings. */
1126
+ returnFullEntity?: boolean;
1127
+ }
1128
+ export interface CancelBookingFlowControlSettings {
1129
+ /**
1130
+ * Whether the cancellation policy applies when canceling the booking.
1131
+ *
1132
+ * When passing `false`, you can only cancel a booking if the cancellation policy allows it.
1133
+ * Default: `false`.
1134
+ */
1135
+ ignoreCancellationPolicy?: boolean | null;
1136
+ /**
1137
+ * Whether to issue a refund when canceling the booking.
1138
+ *
1139
+ * The refund will be issued only if the booking is refundable.
1140
+ * Currently, a booking is considered refundable when it was paid by membership.
1141
+ * If you specify `true`, the booking flow control settings is set to include a refund.
1142
+ * If `false` is specified or the field remains empty,
1143
+ * the booking flow control settings are set without refund.
1144
+ *
1145
+ * Default: `false`.
1146
+ */
1147
+ withRefund?: boolean | null;
1148
+ }
1149
+ export interface CancelMultiServiceBookingResponse {
1150
+ /** Canceled multi-service booking. */
1151
+ multiServiceBooking?: MultiServiceBooking;
1152
+ }
1153
+ export interface BookingCanceled {
1154
+ /** The canceled booking object. */
1155
+ booking?: Booking;
1156
+ /** Information about whether to notify the customer about the cancellation and the message to send. */
1157
+ participantNotification?: ParticipantNotification;
1158
+ /**
1159
+ * Information about whether specific procedures of the standard Wix Bookings
1160
+ * cancellation flow are changed. For example, whether you can cancel
1161
+ * a booking even though the cancellation policy doesn't allow it or whether
1162
+ * to issue a refund.
1163
+ */
1164
+ flowControlSettings?: CancelBookingFlowControlSettings;
1165
+ /** ID of the cancellation initiator. */
1166
+ initiatedBy?: IdentificationData;
1167
+ /** The previous status of the booking. */
1168
+ previousStatus?: BookingStatus;
1169
+ }
1170
+ export interface MarkMultiServiceBookingAsPendingRequest {
1171
+ /** ID of the multi-service booking to mark as `PENDING`. */
1172
+ multiServiceBookingId: string | null;
1173
+ /** Information about the single-service bookings to mark as `PENDING`. */
1174
+ markAsPendingBookingsInfo?: BookingInfo[];
1175
+ /**
1176
+ * Information about whether to notify the customer and
1177
+ * the message to send.
1178
+ */
1179
+ participantNotification?: ParticipantNotification;
1180
+ /**
1181
+ * Whether to send an SMS reminder to the customer 24 hours before the
1182
+ * session starts. The phone number is taken from `contactDetails.phone`.
1183
+ *
1184
+ * Default: `true`
1185
+ */
1186
+ sendSmsReminder?: boolean | null;
1187
+ /** Whether this booking has a conflict with at least 1 other confirmed booking. */
1188
+ doubleBooked?: boolean | null;
1189
+ /** Whether to return the single-service bookings that were marked as `PENDING`. */
1190
+ returnFullEntity?: boolean;
1191
+ /**
1192
+ * Information about whether specific procedures of the standard Wix Bookings
1193
+ * creation flow are changed. For example, whether the availability is checked
1194
+ * before updating the booking.
1195
+ */
1196
+ flowControlSettings?: MarkBookingAsPendingFlowControlSettings;
1197
+ }
1198
+ export interface BookingInfo {
1199
+ /** ID of the single-service booking. */
1200
+ bookingId?: string | null;
1201
+ /**
1202
+ * Revision number, which increments by 1 each time the booking is updated.
1203
+ * To prevent conflicting changes, the current revision must be specified when
1204
+ * managing the booking.
1205
+ */
1206
+ revision?: string | null;
1207
+ /** Payment status to set for the single-service booking. */
1208
+ paymentStatus?: PaymentStatus;
1209
+ }
1210
+ export interface MarkBookingAsPendingFlowControlSettings {
1211
+ /**
1212
+ * Whether to check for double bookings before updating the booking as pending.
1213
+ *
1214
+ * When passing `false`, a booking is only updated with status `PENDING`.
1215
+ * Default: `false`.
1216
+ */
1217
+ checkAvailabilityValidation?: boolean;
1218
+ /**
1219
+ * Whether to validate that the booking to be marked as pending has a `booking.slot.serviceId`
1220
+ * of a pending approval service.
1221
+ *
1222
+ * Default: `false`.
1223
+ */
1224
+ skipPendingApprovalServiceValidation?: boolean;
1225
+ }
1226
+ export interface MarkMultiServiceBookingAsPendingResponse {
1227
+ /** Updated multi-service booking. */
1228
+ multiServiceBooking?: MultiServiceBooking;
1229
+ }
1230
+ export interface ConfirmMultiServiceBookingRequest {
1231
+ /** ID of the multi-service booking to confirm its related bookings. */
1232
+ multiServiceBookingId: string | null;
1233
+ /** Information about the single-service bookings to confirm. */
1234
+ confirmBookingsInfo?: BookingInfo[];
1235
+ /**
1236
+ * Information about whether to notify the customer and
1237
+ * the message to send.
1238
+ */
1239
+ participantNotification?: ParticipantNotification;
1240
+ /**
1241
+ * Whether to send an SMS reminder to the customer 24 hours before the
1242
+ * session starts. The phone number is taken from `contactDetails.phone`.
1243
+ *
1244
+ * Default: `true`
1245
+ */
1246
+ sendSmsReminder?: boolean | null;
1247
+ /** Whether this booking has a conflict with at least 1 other confirmed booking. */
1248
+ doubleBooked?: boolean | null;
1249
+ /** Whether to return the confirmed single-service bookings. */
1250
+ returnFullEntity?: boolean;
1251
+ /**
1252
+ * Information about whether specific procedures of the standard Wix Bookings
1253
+ * confirmation flow are changed. For example, whether the availability is
1254
+ * checked before confirming the booking.
1255
+ */
1256
+ flowControlSettings?: ConfirmBookingFlowControlSettings;
1257
+ }
1258
+ export interface ConfirmBookingFlowControlSettings {
1259
+ /**
1260
+ * Whether the availability is checked before confirming the booking.
1261
+ *
1262
+ * When specifying `false`, a booking is only updated with status `CONFIRMED`.
1263
+ * Default: `false`.
1264
+ */
1265
+ checkAvailabilityValidation?: boolean;
1266
+ }
1267
+ export interface ConfirmMultiServiceBookingResponse {
1268
+ /** Confirmed multi service booking. */
1269
+ multiServiceBooking?: MultiServiceBooking;
1270
+ }
1271
+ export interface BookingConfirmed {
1272
+ /** The confirmed booking object. */
1273
+ booking?: Booking;
1274
+ /** Information about whether to notify the customer about the confirmation and the message to send. */
1275
+ participantNotification?: ParticipantNotification;
1276
+ /**
1277
+ * Whether to send an SMS reminder to the customer 24 hours before the session starts.
1278
+ * The phone number is taken from `contactDetails.phone`.
1279
+ */
1280
+ sendSmsReminder?: boolean | null;
1281
+ /** Whether this booking overlaps with another existing confirmed booking. */
1282
+ doubleBooked?: boolean | null;
1283
+ /** ID of the confirmation initiator. */
1284
+ initiatedBy?: IdentificationData;
1285
+ /** The previous status of the booking. */
1286
+ previousStatus?: BookingStatus;
1287
+ /** The previous payment status of the booking. */
1288
+ previousPaymentStatus?: PaymentStatus;
1289
+ }
1290
+ export interface DeclineMultiServiceBookingRequest {
1291
+ /** ID of the multi service booking to decline. */
1292
+ multiServiceBookingId: string | null;
1293
+ /** Information about the single-service bookings to decline. */
1294
+ declineBookingsInfo?: BookingInfo[];
1295
+ /**
1296
+ * Information about whether to notify the customer and
1297
+ * the message to send.
1298
+ */
1299
+ participantNotification?: ParticipantNotification;
1300
+ /** Whether this booking has a conflict with at least 1 other confirmed booking. */
1301
+ doubleBooked?: boolean | null;
1302
+ /** Whether to return the declined single-service bookings. */
1303
+ returnFullEntity?: boolean;
1304
+ /**
1305
+ * Information about whether specific procedures of the standard Wix Bookings
1306
+ * declining flow are changed. For example, whether to issue a refund.
1307
+ */
1308
+ flowControlSettings?: DeclineBookingFlowControlSettings;
1309
+ }
1310
+ export interface DeclineBookingFlowControlSettings {
1311
+ /**
1312
+ * Whether to issue a refund when declining the booking.
1313
+ *
1314
+ * The refund will be issued only if the booking is refundable.
1315
+ * Currently, a booking is considered refundable when it was paid by membership.
1316
+ * If specifying `true`, the booking flow control settings will be set with a refund.
1317
+ * If you specify `false` or an empty field,
1318
+ * the booking flow control settings are set without refund.
1319
+ *
1320
+ * Default: `false`.
1321
+ */
1322
+ withRefund?: boolean | null;
1323
+ }
1324
+ export interface DeclineMultiServiceBookingResponse {
1325
+ /** Declined multi-service booking. */
1326
+ multiServiceBooking?: MultiServiceBooking;
1327
+ }
1328
+ export interface BookingDeclined {
1329
+ /** The declined booking object. */
1330
+ booking?: Booking;
1331
+ /** Information about whether to notify the customer about the decline and the message to send. */
1332
+ participantNotification?: ParticipantNotification;
1333
+ /** Whether this booking overlaps with another existing confirmed booking. */
1334
+ doubleBooked?: boolean | null;
1335
+ /** ID of the decline initiator. */
1336
+ initiatedBy?: IdentificationData;
1337
+ /** The previous status of the booking. */
1338
+ previousStatus?: BookingStatus;
1339
+ /** The previous payment status of the booking. */
1340
+ previousPaymentStatus?: PaymentStatus;
1341
+ /**
1342
+ * Information about whether specific procedures of the standard Wix Bookings
1343
+ * declining flow are changed. For example, whether to issue a refund.
1344
+ */
1345
+ flowControlSettings?: DeclineBookingFlowControlSettings;
1346
+ }
1347
+ export interface BulkGetMultiServiceBookingAllowedActionsRequest {
1348
+ /** IDs of the multi-service bookings to retrieve allowed actions for. */
1349
+ multiServiceBookingIds: string[] | null;
1350
+ }
1351
+ export interface BulkGetMultiServiceBookingAllowedActionsResponse {
1352
+ /**
1353
+ * Information about the multi-service bookings that were retrieved.
1354
+ * Including their ID, index in the bulk request and whether they were
1355
+ * successfully updated.
1356
+ */
1357
+ results?: BulkCalculateAllowedActionsResult[];
1358
+ /** Total number of successes and failures for Bulk Update Bookings. */
1359
+ bulkActionMetadata?: BulkActionMetadata;
1360
+ }
1361
+ export interface BulkCalculateAllowedActionsResult {
1362
+ /** Metadata for the booking. Including ID, index in the provided sequence, success status, and error. */
1363
+ itemMetadata?: ItemMetadata;
1364
+ /** Booking entity. */
1365
+ item?: AllowedActions;
1366
+ }
1367
+ export interface ItemMetadata {
1368
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
1369
+ _id?: string | null;
1370
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
1371
+ originalIndex?: number;
1372
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
1373
+ success?: boolean;
1374
+ /** Details about the error in case of failure. */
1375
+ error?: ApplicationError;
1376
+ }
1377
+ export interface ApplicationError {
1378
+ /** Error code. */
1379
+ code?: string;
1380
+ /** Description of the error. */
1381
+ description?: string;
1382
+ /** Data related to the error. */
1383
+ data?: Record<string, any> | null;
1384
+ }
1385
+ /** Possible actions allowed for the booking. */
1386
+ export interface AllowedActions {
1387
+ /** Whether canceling the booking is allowed. */
1388
+ cancel?: boolean;
1389
+ /** Whether rescheduling the booking is allowed. */
1390
+ reschedule?: boolean;
1391
+ }
1392
+ export interface BulkActionMetadata {
1393
+ /** Number of items that were successfully processed. */
1394
+ totalSuccesses?: number;
1395
+ /** Number of items that couldn't be processed. */
1396
+ totalFailures?: number;
1397
+ /** Number of failures without details because detailed failure threshold was exceeded. */
1398
+ undetailedFailures?: number;
1399
+ }
1400
+ export interface GetMultiServiceBookingRequest {
1401
+ /** ID of the multi-service booking. */
1402
+ multiServiceBookingId: string | null;
1403
+ }
1404
+ export interface GetMultiServiceBookingResponse {
1405
+ /** Retrieved multi-service booking. */
1406
+ multiServiceBooking?: MultiServiceBooking;
1407
+ /** Details about how many single-service bookings belong to the multi-service booking. */
1408
+ metadata?: MultiServiceBookingMetadata;
1409
+ }
1410
+ export interface MultiServiceBookingMetadata {
1411
+ /**
1412
+ * Total number of `CONFIRMED` and `PENDING` single-service bookings belonging
1413
+ * to the multi-service booking. The total includes the number of single-service
1414
+ * bookings which couldn't be retrieved due to lack of permissions.
1415
+ */
1416
+ totalNumberOfScheduledBookings?: number | null;
1417
+ }
1418
+ export interface AddBookingsToMultiServiceBookingRequest {
1419
+ /** ID of the multi-service booking. */
1420
+ multiServiceBookingId: string | null;
1421
+ /** List of single-service booking IDs and their revision. */
1422
+ bookings: BookingIdAndRevision[];
1423
+ /** Whether to return the single-service bookings that were added to the multi-service booking. */
1424
+ returnFullEntity?: boolean;
1425
+ }
1426
+ export interface BookingIdAndRevision {
1427
+ /** ID of the booking. */
1428
+ bookingId?: string | null;
1429
+ /**
1430
+ * Revision number, which increments by 1 each time the booking is updated.
1431
+ * To prevent conflicting changes, the current revision must be specified when
1432
+ * managing the booking.
1433
+ */
1434
+ revision?: string | null;
1435
+ }
1436
+ export interface AddBookingsToMultiServiceBookingResponse {
1437
+ /** Single-service bookings that were added to the multi-service booking. */
1438
+ bookings?: BookingResult[];
1439
+ }
1440
+ export interface RemoveBookingsFromMultiServiceBookingRequest {
1441
+ /** ID of the multi-service booking. */
1442
+ multiServiceBookingId: string | null;
1443
+ /** List of single-service booking IDs and their revision. */
1444
+ bookings?: BookingIdAndRevision[];
1445
+ /** Whether to return the single-service bookings. */
1446
+ returnFullEntity?: boolean;
1447
+ }
1448
+ export interface RemoveBookingsFromMultiServiceBookingResponse {
1449
+ /** Single-service bookings that were removed from the multi-service booking. */
1450
+ bookings?: BookingResult[];
1451
+ }
1452
+ export interface BookingChanged {
1453
+ /** The booking before the changes. */
1454
+ previousBooking?: Booking;
1455
+ /** The booking after the changes. */
1456
+ currentBooking?: Booking;
1457
+ }
1458
+ export interface CreateBookingRequest {
1459
+ /** The booking to create. */
1460
+ booking: Booking;
1461
+ /**
1462
+ * Information about whether to notify the customer and
1463
+ * the message to send.
1464
+ */
1465
+ participantNotification?: ParticipantNotification;
1466
+ /**
1467
+ * Whether to send an SMS reminder to the customer 24 hours before the
1468
+ * session starts. The phone number is taken from `contactDetails.phone`.
1469
+ * Default: `true`.
1470
+ */
1471
+ sendSmsReminder?: boolean | null;
1472
+ /**
1473
+ * Whether to ignore specific standard procedures of the Wix Bookings flow.
1474
+ * For example, whether to check availability when creating a booking.
1475
+ */
1476
+ flowControlSettings?: CreateBookingFlowControlSettings;
1477
+ }
1478
+ export interface CreateBookingResponse {
1479
+ /** Created booking. */
1480
+ booking?: Booking;
1481
+ }
1482
+ /**
1483
+ * The `fieldMask` should not include both the `numberOfParticipants` and `participantsInfo` paths. Including both results
1484
+ * in an error. `participantsInfo` is preferred over `numberOfParticipants`.
1485
+ */
1486
+ export interface UpdateBookingRequest {
1487
+ booking?: Booking;
1488
+ }
1489
+ export interface UpdateBookingResponse {
1490
+ booking?: Booking;
1491
+ }
1492
+ export interface LegacyCreateBookingRequest {
1493
+ booking?: Booking;
1494
+ }
1495
+ export interface LegacyCreateBookingResponse {
1496
+ booking?: Booking;
1497
+ }
1498
+ /**
1499
+ * The `fieldMask` for each booking should not include both the `numberOfParticipants` and `participantsInfo` paths. Including both results
1500
+ * in an error. `participantsInfo` is preferred over `numberOfParticipants`.
1501
+ */
1502
+ export interface BulkUpdateBookingRequest {
1503
+ bookings?: MaskedBooking[];
1504
+ }
1505
+ export interface MaskedBooking {
1506
+ booking?: Booking;
1507
+ mask?: string[];
1508
+ }
1509
+ export interface BulkUpdateBookingResponse {
1510
+ /**
1511
+ * Information about the booking that was updated.
1512
+ * Including its ID, index in the bulk request and whether it was
1513
+ * successfully updated.
1514
+ */
1515
+ results?: ItemMetadata[];
1516
+ /** Total number of successes and failures for Bulk Update Bookings. */
1517
+ bulkActionMetadata?: BulkActionMetadata;
1518
+ }
1519
+ export interface BulkCreateBookingRequest {
1520
+ /**
1521
+ * Bookings to create.
1522
+ *
1523
+ * Max: 8 bookings
1524
+ */
1525
+ createBookingsInfo: CreateBookingInfo[];
1526
+ /** Whether to return the created bookings. */
1527
+ returnFullEntity?: boolean;
1528
+ }
1529
+ export interface CreateBookingInfo {
1530
+ /** Booking to create. */
1531
+ booking?: Booking;
1532
+ /**
1533
+ * Information about whether to notify the customer and
1534
+ * the message to send.
1535
+ */
1536
+ participantNotification?: ParticipantNotification;
1537
+ /**
1538
+ * Whether to send an SMS reminder to the customer 24 hours before the
1539
+ * session starts. The phone number is taken from `contactDetails.phone`.
1540
+ * Default: `true`.
1541
+ */
1542
+ sendSmsReminder?: boolean | null;
1543
+ /**
1544
+ * Whether to ignore specific standard procedures of the Wix Bookings flow.
1545
+ * For example, whether to check availability when creating a booking.
1546
+ */
1547
+ flowControlSettings?: CreateBookingFlowControlSettings;
1548
+ }
1549
+ export interface BulkCreateBookingResponse {
1550
+ /** List of individual Bulk Create Bookings results. */
1551
+ results?: BulkBookingResult[];
1552
+ /** Total number of successes and failures for Bulk Create Bookings. */
1553
+ bulkActionMetadata?: BulkActionMetadata;
1554
+ }
1555
+ export interface BulkBookingResult {
1556
+ /**
1557
+ * Information about the booking that was created or updated.
1558
+ * Including its ID, index in the bulk request and whether it was
1559
+ * successfully created or updated.
1560
+ */
1561
+ itemMetadata?: ItemMetadata;
1562
+ /**
1563
+ * Created or updated booking. Available only if you requested
1564
+ * to return the booking entity.
1565
+ */
1566
+ item?: Booking;
1567
+ }
1568
+ export interface RescheduleBookingRequest extends RescheduleBookingRequestParticipantsInfoOneOf {
1569
+ /**
1570
+ * Total number of participants. Specify when all participants have booked the
1571
+ * same service variant.
1572
+ */
1573
+ totalParticipants?: number;
1574
+ /**
1575
+ * Information about the service choices to book. Specify when not all
1576
+ * participants have booked the same service variant.
1577
+ */
1578
+ participantsChoices?: ParticipantChoices;
1579
+ /** ID of the booking to reschedule. */
1580
+ bookingId: string;
1581
+ /** New slot of the booking. */
1582
+ slot: V2Slot;
1583
+ /**
1584
+ * Revision number, which increments by 1 each time the booking is rescheduled.
1585
+ * To prevent conflicting changes, the current revision must be passed when
1586
+ * rescheduling the booking.
1587
+ */
1588
+ revision: string | null;
1589
+ /**
1590
+ * Information about whether to notify the customer about the rescheduling and
1591
+ * the message to send.
1592
+ */
1593
+ participantNotification?: ParticipantNotification;
1594
+ /**
1595
+ * Whether to ignore specific standard procedures of the Wix Bookings flow.
1596
+ * For example, whether to check availability when rescheduling a booking.
1597
+ */
1598
+ flowControlSettings?: RescheduleBookingFlowControlSettings;
1599
+ }
1600
+ /** @oneof */
1601
+ export interface RescheduleBookingRequestParticipantsInfoOneOf {
1602
+ /**
1603
+ * Total number of participants. Specify when all participants have booked the
1604
+ * same service variant.
1605
+ */
1606
+ totalParticipants?: number;
1607
+ /**
1608
+ * Information about the service choices to book. Specify when not all
1609
+ * participants have booked the same service variant.
1610
+ */
1611
+ participantsChoices?: ParticipantChoices;
1612
+ }
1613
+ export interface RescheduleBookingResponse {
1614
+ /** Rescheduled booking. */
1615
+ booking?: Booking;
1616
+ }
1617
+ export interface BulkRescheduleBookingRequest {
1618
+ /** Reschedule multiple bookings to multiple slots. */
1619
+ slotsBookings?: SlotBookings[];
1620
+ /**
1621
+ * Information about whether to notify the customer about the rescheduling and
1622
+ * the message to send.
1623
+ */
1624
+ participantNotification?: ParticipantNotification;
1625
+ }
1626
+ export interface BulkRescheduleBookingRequestBooking {
1627
+ /** ID of the booking to reschedule. */
1628
+ _id?: string;
1629
+ /**
1630
+ * Revision number, which increments by 1 each time the booking is rescheduled.
1631
+ * To prevent conflicting changes,
1632
+ * the current revision must be specified when rescheduling the booking.
1633
+ */
1634
+ revision?: string | null;
1635
+ }
1636
+ /** Bookings to be rescheduled to the given slot. */
1637
+ export interface SlotBookings {
1638
+ /** The bookings details. */
1639
+ bookings?: BulkRescheduleBookingRequestBooking[];
1640
+ /**
1641
+ * The slot to which the bookings were rescheduled.
1642
+ * These bookings are automatically assigned to the session, if given. Otherwise, a new session is created.
1643
+ */
1644
+ slot?: BookedSlot;
1645
+ }
1646
+ export interface BulkRescheduleBookingResponse {
1647
+ /**
1648
+ * Information about the booking that was rescheduled.
1649
+ * Including its ID, index in the bulk request and whether it was
1650
+ * successfully rescheduled.
1651
+ */
1652
+ results?: ItemMetadata[];
1653
+ /** Total number of successes and failures for Bulk Reschedule Bookings. */
1654
+ bulkActionMetadata?: BulkActionMetadata;
1655
+ }
1656
+ /** Update the booked schedule of multiple bookings to the given schedule. */
1657
+ export interface BulkUpdateBookedScheduleRequest {
1658
+ /** The bookings whose booked schedule is to be updated to the given schedule. */
1659
+ bookings?: BookingDetails[];
1660
+ /** ID of the schedule to update. */
1661
+ scheduleId?: string;
1662
+ /**
1663
+ * Information about whether to notify the customer about the rescheduling and
1664
+ * the message to send.
1665
+ */
1666
+ participantNotification?: ParticipantNotification;
1667
+ }
1668
+ export interface BookingDetails {
1669
+ /** ID of the bookings to be updated. */
1670
+ _id?: string;
1671
+ revision?: string | null;
1672
+ }
1673
+ export interface BulkUpdateBookedScheduleResponse {
1674
+ /**
1675
+ * Information about the schedule that was updated.
1676
+ * Including its ID, index in the bulk request and whether it was
1677
+ * succesfully updated.
1678
+ */
1679
+ results?: ItemMetadata[];
1680
+ /** Total number of successes and failures for Bulk Updated Booked Schedules. */
1681
+ bulkActionMetadata?: BulkActionMetadata;
1682
+ }
1683
+ export interface QueryBookingsRequest {
1684
+ /** Information about filters, paging, and sorting. */
1685
+ query?: QueryV2;
1686
+ }
1687
+ export interface QueryV2 extends QueryV2PagingMethodOneOf {
1688
+ /** Paging options to limit and skip the number of items. */
1689
+ paging?: Paging;
1690
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
1691
+ cursorPaging?: CursorPaging;
1692
+ /**
1693
+ * Filter object in the following format:
1694
+ * `"filter" : {
1695
+ * "fieldName1": "value1",
1696
+ * "fieldName2":{"$operator":"value2"}
1697
+ * }`
1698
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
1699
+ */
1700
+ filter?: Record<string, any> | null;
1701
+ /**
1702
+ * Sort object in the following format:
1703
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
1704
+ */
1705
+ sort?: Sorting[];
1706
+ /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
1707
+ fields?: string[];
1708
+ /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
1709
+ fieldsets?: string[];
1710
+ }
1711
+ /** @oneof */
1712
+ export interface QueryV2PagingMethodOneOf {
1713
+ /** Paging options to limit and skip the number of items. */
1714
+ paging?: Paging;
1715
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
1716
+ cursorPaging?: CursorPaging;
1717
+ }
1718
+ export interface Sorting {
1719
+ /** Name of the field to sort by. */
1720
+ fieldName?: string;
1721
+ /** Sort order. */
1722
+ order?: SortOrder;
1723
+ }
1724
+ export declare enum SortOrder {
1725
+ ASC = "ASC",
1726
+ DESC = "DESC"
1727
+ }
1728
+ export interface Paging {
1729
+ /** Number of items to load. */
1730
+ limit?: number | null;
1731
+ /** Number of items to skip in the current sort order. */
1732
+ offset?: number | null;
1733
+ }
1734
+ export interface CursorPaging {
1735
+ /** Maximum number of items to return in the results. */
1736
+ limit?: number | null;
1737
+ /**
1738
+ * Pointer to the next or previous page in the list of results.
1739
+ *
1740
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
1741
+ * Not relevant for the first request.
1742
+ */
1743
+ cursor?: string | null;
1744
+ }
1745
+ export interface QueryBookingsResponse {
1746
+ /** Retrieved bookings. */
1747
+ bookings?: Booking[];
1748
+ /** Paging metadata. */
1749
+ pagingMetadata?: PagingMetadataV2;
1750
+ }
1751
+ export interface PagingMetadataV2 {
1752
+ /** Number of items returned in the response. */
1753
+ count?: number | null;
1754
+ /** Offset that was requested. */
1755
+ offset?: number | null;
1756
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
1757
+ total?: number | null;
1758
+ /** Flag that indicates the server failed to calculate the `total` field. */
1759
+ tooManyToCount?: boolean | null;
1760
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
1761
+ cursors?: Cursors;
1762
+ }
1763
+ export interface Cursors {
1764
+ /** Cursor string pointing to the next page in the list of results. */
1765
+ next?: string | null;
1766
+ /** Cursor pointing to the previous page in the list of results. */
1767
+ prev?: string | null;
1768
+ }
1769
+ export interface ConfirmRequest {
1770
+ /** ID of the booking to confirm. */
1771
+ _id?: string;
1772
+ /**
1773
+ * Information about whether to notify the customer about the confirmation and
1774
+ * the message to send.
1775
+ */
1776
+ participantNotification?: ParticipantNotification;
1777
+ }
1778
+ export interface ConfirmResponse {
1779
+ /** Confirmed booking. */
1780
+ booking?: Booking;
1781
+ /** Whether this booking has a conflict with at least 1 other confirmed booking. */
1782
+ doubleBooked?: boolean | null;
1783
+ }
1784
+ export interface ConfirmBookingRequest {
1785
+ /** ID of the booking to confirm. */
1786
+ bookingId: string;
1787
+ /**
1788
+ * Revision number, which increments by 1 each time the booking is updated.
1789
+ * To prevent conflicting changes, the current revision must be passed when
1790
+ * updating the booking.
1791
+ */
1792
+ revision: string | null;
1793
+ /**
1794
+ * Information about whether to notify the customer about the confirmation and
1795
+ * the message to send.
1796
+ */
1797
+ participantNotification?: ParticipantNotification;
1798
+ /**
1799
+ * Whether to send an SMS reminder to the customer 24 hours before the
1800
+ * session starts. The phone number is taken from `contactDetails.phone`.
1801
+ */
1802
+ sendSmsReminder?: boolean | null;
1803
+ /** Payment status to set for the booking. */
1804
+ paymentStatus?: PaymentStatus;
1805
+ /** Whether this booking has a conflict with at least 1 other confirmed booking. */
1806
+ doubleBooked?: boolean | null;
1807
+ /**
1808
+ * Whether to ignore specific standard procedures of the Wix Bookings flow.
1809
+ * For example, whether to check availability when confirming a booking.
1810
+ */
1811
+ flowControlSettings?: ConfirmBookingFlowControlSettings;
1812
+ }
1813
+ export interface ConfirmBookingResponse {
1814
+ /** Confirmed booking. */
1815
+ booking?: Booking;
1816
+ }
1817
+ export interface ConsistentQueryBookingsRequest {
1818
+ /** Information about filters, paging, and sorting. */
1819
+ query?: QueryV2;
1820
+ }
1821
+ export interface ConsistentQueryBookingsResponse {
1822
+ /** Retrieved bookings. */
1823
+ bookings?: Booking[];
1824
+ /** Paging metadata. */
1825
+ pagingMetadata?: PagingMetadataV2;
1826
+ }
1827
+ export interface SetBookingSessionIdRequest {
1828
+ /** ID of the booking to set `sessionId` for. */
1829
+ _id?: string;
1830
+ /** ID of the session to set on the booking. */
1831
+ sessionId?: string;
1832
+ }
1833
+ export interface SetBookingSessionIdResponse {
1834
+ /** Updated booking. */
1835
+ booking?: Booking;
1836
+ }
1837
+ export interface SetBookingSubmissionIdRequest {
1838
+ /** ID of the booking to set `submissionId` for. */
1839
+ bookingId?: string;
1840
+ /** ID of the form submission to set on the booking. */
1841
+ submissionId?: string;
1842
+ }
1843
+ export interface SetBookingSubmissionIdResponse {
1844
+ /** Updated booking. */
1845
+ booking?: Booking;
1846
+ }
1847
+ export interface UpdateExtendedFieldsRequest {
1848
+ /** ID of the entity to update. */
1849
+ _id: string;
1850
+ /** Identifier for the app whose extended fields are being updated. */
1851
+ namespace: string;
1852
+ /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */
1853
+ namespaceData: Record<string, any> | null;
1854
+ }
1855
+ export interface UpdateExtendedFieldsResponse {
1856
+ /** Updated namespace. */
1857
+ namespace?: string;
1858
+ /** Updated data. */
1859
+ namespaceData?: Record<string, any> | null;
1860
+ }
1861
+ export interface DeclineBookingRequest {
1862
+ /** ID of the booking to decline. */
1863
+ bookingId: string;
1864
+ /**
1865
+ * Revision number, which increments by 1 each time the booking is updated.
1866
+ *
1867
+ * To prevent conflicting changes, the current revision must be specified when
1868
+ * declining the booking.
1869
+ */
1870
+ revision: string | null;
1871
+ /**
1872
+ * Information about whether to notify the customer and
1873
+ * the message to send.
1874
+ */
1875
+ participantNotification?: ParticipantNotification;
1876
+ /** Payment status to set for the booking. */
1877
+ paymentStatus?: PaymentStatus;
1878
+ /** Whether this booking has a conflict with at least 1 other confirmed booking. */
1879
+ doubleBooked?: boolean | null;
1880
+ /**
1881
+ * Whether to ignore specific standard procedures of the Wix Bookings flow.
1882
+ * For example, whether to refund a declined booking.
1883
+ */
1884
+ flowControlSettings?: DeclineBookingFlowControlSettings;
1885
+ }
1886
+ export interface DeclineBookingResponse {
1887
+ /** Declined booking. */
1888
+ booking?: Booking;
1889
+ }
1890
+ export interface CancelBookingRequest {
1891
+ /** ID of the booking to cancel. */
1892
+ bookingId: string;
1893
+ /**
1894
+ * Information about whether to notify the customer about the cancellation and
1895
+ * the message to send.
1896
+ */
1897
+ participantNotification?: ParticipantNotification;
1898
+ /**
1899
+ * Whether to ignore specific standard procedures of the Wix Bookings flow.
1900
+ * For example, whether to allow a cancellation even though the service's
1901
+ * policy doesn't allow it.
1902
+ */
1903
+ flowControlSettings?: CancelBookingFlowControlSettings;
1904
+ /**
1905
+ * Revision number, which increments by 1 each time the booking is updated.
1906
+ *
1907
+ * To prevent conflicting changes, the current revision must be specified when
1908
+ * managing the booking.
1909
+ */
1910
+ revision: string | null;
1911
+ }
1912
+ export interface CancelBookingResponse {
1913
+ /** Canceled booking. */
1914
+ booking?: Booking;
1915
+ }
1916
+ export interface UpdateNumberOfParticipantsRequest extends UpdateNumberOfParticipantsRequestParticipantsInfoOneOf {
1917
+ /**
1918
+ * Total number of participants. Specify when all participants have booked the
1919
+ * same service variant.
1920
+ */
1921
+ totalParticipants?: number;
1922
+ /**
1923
+ * Information about the service choices the participants have booked. Specify
1924
+ * when not all participants have booked the same service variant.
1925
+ */
1926
+ participantsChoices?: ParticipantChoices;
1927
+ /** ID of the booking to update the number of participants for. */
1928
+ bookingId: string;
1929
+ /**
1930
+ * Revision number, which increments by 1 each time the booking is updated.
1931
+ *
1932
+ * To prevent conflicting changes, the current revision must be specified
1933
+ * when updating the booking.
1934
+ */
1935
+ revision: string | null;
1936
+ }
1937
+ /** @oneof */
1938
+ export interface UpdateNumberOfParticipantsRequestParticipantsInfoOneOf {
1939
+ /**
1940
+ * Total number of participants. Specify when all participants have booked the
1941
+ * same service variant.
1942
+ */
1943
+ totalParticipants?: number;
1944
+ /**
1945
+ * Information about the service choices the participants have booked. Specify
1946
+ * when not all participants have booked the same service variant.
1947
+ */
1948
+ participantsChoices?: ParticipantChoices;
1949
+ }
1950
+ export interface UpdateNumberOfParticipantsResponse {
1951
+ /** Updated booking. */
1952
+ booking?: Booking;
1953
+ }
1954
+ export interface NumberOfParticipantsUpdated extends NumberOfParticipantsUpdatedPreviousParticipantsInfoOneOf {
1955
+ /**
1956
+ * The previous total number of participants. Available only when the booking includes
1957
+ * a single service variant.
1958
+ */
1959
+ previousTotalParticipants?: number;
1960
+ /**
1961
+ * Information about the previous booked service choices and participants.
1962
+ * Available only when the booking includes multiple service variants.
1963
+ */
1964
+ previousParticipantsChoices?: ParticipantChoices;
1965
+ /** The updated booking object. */
1966
+ booking?: Booking;
1967
+ /** ID of the participant number update initiator. */
1968
+ initiatedBy?: IdentificationData;
1969
+ }
1970
+ /** @oneof */
1971
+ export interface NumberOfParticipantsUpdatedPreviousParticipantsInfoOneOf {
1972
+ /**
1973
+ * The previous total number of participants. Available only when the booking includes
1974
+ * a single service variant.
1975
+ */
1976
+ previousTotalParticipants?: number;
1977
+ /**
1978
+ * Information about the previous booked service choices and participants.
1979
+ * Available only when the booking includes multiple service variants.
1980
+ */
1981
+ previousParticipantsChoices?: ParticipantChoices;
1982
+ }
1983
+ export interface BulkCalculateAllowedActionsRequest {
1984
+ /** The booking IDs for which we want to calculate the allowed actions. */
1985
+ bookingIds?: string[] | null;
1986
+ }
1987
+ export interface BulkCalculateAllowedActionsResponse {
1988
+ results?: BulkCalculateAllowedActionsResult[];
1989
+ /** Total number of successes and failures for Bulk Calculate Allowed Actions. */
1990
+ bulkActionMetadata?: BulkActionMetadata;
1991
+ }
1992
+ export interface GetSlotAvailabilityRequest {
1993
+ /** The slot for which the availability is checked. */
1994
+ slot?: V2Slot;
1995
+ /** The timezone for which availability is to be calculated. */
1996
+ timezone?: string | null;
1997
+ }
1998
+ export interface GetSlotAvailabilityResponse {
1999
+ availability?: SlotAvailability;
2000
+ bookingPolicySettings?: BookingPolicySettings;
2001
+ }
2002
+ export interface SlotAvailability {
2003
+ /** Identifier for the underlying session when the session is a single session or generated from a recurring session. Required. */
2004
+ slot?: V2Slot;
2005
+ /** Whether this available slot is bookable. */
2006
+ bookable?: boolean;
2007
+ /**
2008
+ * Total number of spots for this availability.
2009
+ * For example, for a class of 10 spots with 3 spots booked, `totalSpots` is 10 and `openSpots` is 7.
2010
+ */
2011
+ totalSpots?: number | null;
2012
+ /**
2013
+ * Number of open spots for this availability.
2014
+ * For appointments, if there are existing bookings with overlapping time, service & resource, `openSpots` is 0. Otherwise, `openSpots` is 1.
2015
+ */
2016
+ openSpots?: number | null;
2017
+ /** An object describing the slot's waiting list and its occupancy. */
2018
+ waitingList?: WaitingList;
2019
+ /** Indicators for booking policy violations for the slot. */
2020
+ bookingPolicyViolations?: BookingPolicyViolations;
2021
+ /** Indicates whether this slot is locked. */
2022
+ locked?: boolean | null;
2023
+ }
2024
+ export interface WaitingList {
2025
+ /**
2026
+ * Total number of spots and open spots for this waiting list.
2027
+ * For example, a Yoga class of 10 waiting list spots with 3 registered on the waiting list has `total_spots`: 10 and `open_spots`: 7.
2028
+ */
2029
+ totalSpots?: number | null;
2030
+ openSpots?: number | null;
2031
+ }
2032
+ export interface AvailableResources {
2033
+ /** Resource type ID. */
2034
+ resourceTypeId?: string | null;
2035
+ /**
2036
+ * Available resources for the slot.
2037
+ * `maxSize` is defined by 135 staff members + 3 resource types and 50 resources per type.
2038
+ * `Availability-2` currently has no `maxSize` defined.
2039
+ */
2040
+ resourceIds?: string[];
2041
+ }
2042
+ export interface GetScheduleAvailabilityRequest {
2043
+ /** ID of the schedule for which to check availability. */
2044
+ scheduleId?: string;
2045
+ }
2046
+ export interface GetScheduleAvailabilityResponse {
2047
+ availability?: ScheduleAvailability;
2048
+ bookingPolicySettings?: BookingPolicySettings;
2049
+ }
2050
+ export interface ScheduleAvailability {
2051
+ /** Total number of spots. */
2052
+ totalSpots?: number | null;
2053
+ /** Number of remaining open spots. */
2054
+ openSpots?: number | null;
2055
+ /** Indicators of booking policy violations for the specified schedule. */
2056
+ bookingPolicyViolations?: BookingPolicyViolations;
2057
+ }
2058
+ export interface MarkBookingAsPendingRequest {
2059
+ /** ID of the booking to mark as `PENDING`. */
2060
+ bookingId?: string;
2061
+ /**
2062
+ * Revision number, which increments by 1 each time the booking is updated.
2063
+ *
2064
+ * To prevent conflicting changes, the current revision must be specified when
2065
+ * managing the booking.
2066
+ */
2067
+ revision?: string | null;
2068
+ /**
2069
+ * Information about whether to notify the customer and
2070
+ * the message to send.
2071
+ */
2072
+ participantNotification?: ParticipantNotification;
2073
+ /**
2074
+ * Whether to send an SMS reminder to the customer 24 hours before the
2075
+ * session starts. The phone number is taken from `contactDetails.phone`.
2076
+ */
2077
+ sendSmsReminder?: boolean | null;
2078
+ /** Payment status to set for the booking. */
2079
+ paymentStatus?: PaymentStatus;
2080
+ /** Whether this booking has a conflict with at least 1 other confirmed booking. */
2081
+ doubleBooked?: boolean | null;
2082
+ /**
2083
+ * Whether to ignore specific standard procedures of the Wix Bookings flow.
2084
+ * For example, whether to check availability before updating the status.
2085
+ */
2086
+ flowControlSettings?: MarkBookingAsPendingFlowControlSettings;
2087
+ }
2088
+ export interface MarkBookingAsPendingResponse {
2089
+ /** Updated booking. */
2090
+ booking?: Booking;
2091
+ }
2092
+ export interface BookingMarkedAsPending {
2093
+ /** The booking object that was marked as pending. */
2094
+ booking?: Booking;
2095
+ /** Information about whether to notify the customer upon manual confirmation of the pending booking and the message to send. */
2096
+ participantNotification?: ParticipantNotification;
2097
+ /**
2098
+ * Whether to send an SMS reminder to the customer 24 hours before the session starts.
2099
+ * The phone number is taken from `contactDetails.phone`.
2100
+ */
2101
+ sendSmsReminder?: boolean | null;
2102
+ /** Whether this booking overlaps with another existing confirmed booking. */
2103
+ doubleBooked?: boolean | null;
2104
+ /** ID of the mark as pending initiator. */
2105
+ initiatedBy?: IdentificationData;
2106
+ /** The previous status of the booking. */
2107
+ previousStatus?: BookingStatus;
2108
+ /** The previous payment status of the booking. */
2109
+ previousPaymentStatus?: PaymentStatus;
2110
+ }
2111
+ export interface MigrationCheckIfClashesWithBlockedTimeRequest {
2112
+ msidAndBookingIds?: MsidAndBookingId[];
2113
+ }
2114
+ export interface MsidAndBookingId {
2115
+ msid?: string;
2116
+ bookingId?: string;
2117
+ }
2118
+ export interface MigrationCheckIfClashesWithBlockedTimeResponse {
2119
+ clashes?: Clash[];
2120
+ }
2121
+ export interface Clash {
2122
+ msid?: string;
2123
+ bookingId?: string;
2124
+ sessionId?: string;
2125
+ resourceName?: string;
2126
+ contactName?: string;
2127
+ }
2128
+ export interface CountBookingsRequest {
2129
+ /**
2130
+ * Filter object in the following format:
2131
+ * `"filter" : {
2132
+ * "fieldName1": "value1",
2133
+ * "fieldName2":{"$operator":"value2"}
2134
+ * }`
2135
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
2136
+ */
2137
+ filter?: Record<string, any> | null;
2138
+ }
2139
+ export interface CountBookingsResponse {
2140
+ /** Number of bookings matching the specified filter. */
2141
+ count?: number;
2142
+ }
2143
+ export interface ConfirmOrDeclineBookingRequest {
2144
+ /** ID of the booking to confirm or decline. */
2145
+ bookingId: string;
2146
+ /**
2147
+ * Current payment status of the booking when using a custom checkout page and
2148
+ * not the eCommerce checkout
2149
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction)).
2150
+ *
2151
+ * The booking is declined if there is a double booking conflict and you provide
2152
+ * one of these payment statuses: `UNDEFINED`, `NOT_PAID`, `REFUNDED`, or `EXEMPT`.
2153
+ */
2154
+ paymentStatus?: PaymentStatus;
2155
+ }
2156
+ export interface ConfirmOrDeclineBookingResponse {
2157
+ /** Updated booking. */
2158
+ booking?: Booking;
2159
+ }
2160
+ export interface BulkConfirmOrDeclineBookingRequest {
2161
+ /** Bookings to confirm or decline. */
2162
+ details: BulkConfirmOrDeclineBookingRequestBookingDetails[];
2163
+ /** Whether to return the confirmed or declined booking objects. */
2164
+ returnEntity?: boolean;
2165
+ }
2166
+ export interface BulkConfirmOrDeclineBookingRequestBookingDetails {
2167
+ /** ID of the booking to confirm or decline. */
2168
+ bookingId?: string;
2169
+ /**
2170
+ * Current payment status of the booking when using a custom checkout page and
2171
+ * not the eCommerce checkout
2172
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction)).
2173
+ *
2174
+ * The booking is declined if there is a double booking conflict and you provide
2175
+ * one of these payment statuses: `UNDEFINED`, `NOT_PAID`, `REFUNDED`, or `EXEMPT`.
2176
+ */
2177
+ paymentStatus?: PaymentStatus;
2178
+ }
2179
+ export interface BulkConfirmOrDeclineBookingResponse {
2180
+ /** List of confirmed or declined bookings, including metadata. */
2181
+ results?: BulkBookingResult[];
2182
+ /** Total successes and failures of the Bulk Confirm Or Decline call. */
2183
+ bulkActionMetadata?: BulkActionMetadata;
2184
+ }
2185
+ export interface V2CreateBookingRequest extends V2CreateBookingRequestBookableItemOneOf, V2CreateBookingRequestParticipantsInfoOneOf {
2186
+ /**
2187
+ * Information about the slot to create a booking for.
2188
+ * If you set `slot.location.locationType` to `CUSTOM`, the created slot's
2189
+ * location is set to `slot.location.formattedAddress` when provided.
2190
+ * Otherwise it's set to `contactDetails.fullAddress.formattedAddress`.
2191
+ */
2192
+ slot?: Slot;
2193
+ /** Information about the schedule to create a booking for. */
2194
+ schedule?: BookedSchedule;
2195
+ /** Contact details of the customer booking the service. */
2196
+ contactDetails?: ContactDetails;
2197
+ /**
2198
+ * Booking status.
2199
+ * One of:
2200
+ * - `"CREATED"` - The booking was created.
2201
+ * - `"UPDATED"` - The booking was updated.
2202
+ * - `"CONFIRMED"` - The booking has been confirmed and appears on the bookings calendar.
2203
+ * Booking can be manually confirmed using the Set As Confirmed endpoint.
2204
+ * Booking can be automatically confirmed when the following requirements are met:
2205
+ * + The service is configured as automatically confirmed.
2206
+ * + Invoking eCommerce checkout API and an order has been created.
2207
+ * - `"CANCELED"` - The booking has been canceled and synced to bookings calendar.
2208
+ * The booking can be canceled using cancel API.
2209
+ * - `"PENDING"` - The booking waiting to be confirmed or declined buy the owner and is synced to bookings calendar.
2210
+ * Bookings can be manually set as pending using setAsPending API, requires manage booking status permissions.
2211
+ * Booking can be automatically set as pending when the following requirements are met:
2212
+ * + The Service is configured as manually confirmed.
2213
+ * + Invoking the eCommerce checkout API and an order has been created.
2214
+ * - `"WAITING_LIST"` - The booking is pending on a waiting list.
2215
+ * Booking can be created with this status when invoking waiting list join API.
2216
+ * - `"DECLINED"` - The booking was declined by the owner and synced to bookings calendar.
2217
+ * Booking can be manually declined using decline API and requires manage booking permissions.
2218
+ * Booking can be automatically declined when the following requirements are met:
2219
+ * + Invoking eCommerce checkout API and the order declined event has been sent.
2220
+ * + Invoking eCommerce checkout API and order approved event has been sent, but the booking is offline and the booking causes a double booking.
2221
+ */
2222
+ status?: BookingStatus;
2223
+ /**
2224
+ * Additional custom fields of the booking form. The customer must provide
2225
+ * information for each field when booking the service. For example, that they
2226
+ * bring their own towels or whether they use a wheelchair.
2227
+ *
2228
+ * Max: 100 fields
2229
+ */
2230
+ additionalFields?: CustomFormField[];
2231
+ /**
2232
+ * Total number of participants. Available only when the service doesn't have
2233
+ * [variants](https://dev.wix.com/api/rest/wix-bookings/service-options-and-variants/introduction).
2234
+ *
2235
+ * Max: `20`
2236
+ */
2237
+ numberOfParticipants?: number | null;
2238
+ /**
2239
+ * Internal business note. Not visible to the customer.
2240
+ *
2241
+ * Max: 200 characters
2242
+ */
2243
+ internalBusinessNote?: string | null;
2244
+ /**
2245
+ * Payment option the customer intends to use.
2246
+ * Must be one of the payment options defined for the service, unless
2247
+ * you pass `flowControlSettings.skipSelectedPaymentOptionValidation` as `true`.
2248
+ */
2249
+ selectedPaymentOption?: SelectedPaymentOption;
2250
+ /**
2251
+ * Identifies the source (platform, actor and app) that created this booking.
2252
+ * This property of the booking cannot be changed.
2253
+ * The app_def_id and app_name will be resolved automatically.
2254
+ * TODO GAP See if we need this - might be able to get this data from the headers?
2255
+ */
2256
+ bookingSource?: BookingSource;
2257
+ /**
2258
+ * A user identifier of an external application user that initiated the book request.
2259
+ * Allows an external application to later identify its own bookings and correlate to its own internal users
2260
+ */
2261
+ externalUserId?: string | null;
2262
+ /** Information about a message to send to the customer. */
2263
+ participantNotification?: ParticipantNotification;
2264
+ /**
2265
+ * Whether to send an SMS reminder to the customer 24 hours before the
2266
+ * session starts. The phone number is taken from `contactDetails.phone`.
2267
+ *
2268
+ * Default: `true`.
2269
+ */
2270
+ sendSmsReminder?: boolean | null;
2271
+ /**
2272
+ * Information about whether specific procedures of the standard Wix Bookings
2273
+ * creation flow are changed. For example, whether the availability is
2274
+ * checked before creating the booking or if additional payment options are
2275
+ * accepted.
2276
+ */
2277
+ flowControlSettings?: CreateBookingRequestFlowControlSettings;
2278
+ }
2279
+ /** @oneof */
2280
+ export interface V2CreateBookingRequestBookableItemOneOf {
2281
+ /**
2282
+ * Information about the slot to create a booking for.
2283
+ * If you set `slot.location.locationType` to `CUSTOM`, the created slot's
2284
+ * location is set to `slot.location.formattedAddress` when provided.
2285
+ * Otherwise it's set to `contactDetails.fullAddress.formattedAddress`.
2286
+ */
2287
+ slot?: Slot;
2288
+ /** Information about the schedule to create a booking for. */
2289
+ schedule?: BookedSchedule;
2290
+ }
2291
+ /** @oneof */
2292
+ export interface V2CreateBookingRequestParticipantsInfoOneOf {
2293
+ }
2294
+ export interface Slot {
2295
+ /**
2296
+ * ID for the slot's corresponding session, when the session is either a single session
2297
+ * or a specific session generated from a recurring session.
2298
+ *
2299
+ * Deprecated. Please use `eventId` instead.
2300
+ * @deprecated ID for the slot's corresponding session, when the session is either a single session
2301
+ * or a specific session generated from a recurring session.
2302
+ *
2303
+ * Deprecated. Please use `eventId` instead.
2304
+ * @replacedBy event_id
2305
+ * @targetRemovalDate 2025-09-30
2306
+ */
2307
+ sessionId?: string | null;
2308
+ /** Service ID. */
2309
+ serviceId?: string;
2310
+ /** Schedule ID. */
2311
+ scheduleId?: string;
2312
+ /**
2313
+ * The start time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
2314
+ * format.
2315
+ *
2316
+ * If `timezone` is specified,
2317
+ * dates are based on the local date/time. This means that the timezone offset
2318
+ * in the `start_date` is ignored.
2319
+ */
2320
+ startDate?: string | null;
2321
+ /**
2322
+ * The end time of this slot in
2323
+ * [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) format.
2324
+ *
2325
+ * If `timezone` is specified,
2326
+ * dates are based on the local date/time. This means that the timezone offset
2327
+ * in the `end_date` is ignored.
2328
+ */
2329
+ endDate?: string | null;
2330
+ /**
2331
+ * The timezone for which slot availability is to be calculated.
2332
+ *
2333
+ * Learn more about [handling Daylight Savings Time (DST) for local time zones](https://dev.wix.com/api/rest/wix-bookings/availability-calendar/query-availability#wix-bookings_availability-calendar_query-availability_handling-daylight-savings-time-dst-for-local-time-zones)
2334
+ * when calculating availability.
2335
+ */
2336
+ timezone?: string | null;
2337
+ /**
2338
+ * The resource required for this slot. Currently, the only supported resource
2339
+ * is the relevant staff member for the slot.
2340
+ */
2341
+ resource?: SlotResource;
2342
+ /** Geographic location of the slot. */
2343
+ location?: Location;
2344
+ /**
2345
+ * ID for the slot's corresponding event, when the event is either a single event
2346
+ * or a specific event generated from a recurring event.
2347
+ */
2348
+ eventId?: string | null;
2349
+ }
2350
+ export interface SlotResource {
2351
+ /**
2352
+ * Resource ID.
2353
+ * @readonly
2354
+ */
2355
+ _id?: string | null;
2356
+ /** Resource name. Read only. */
2357
+ name?: string | null;
2358
+ }
2359
+ export interface CreateBookingRequestFlowControlSettings {
2360
+ /**
2361
+ * Whether the availability is checked before creating the booking. When
2362
+ * passing `false` a booking is only created when the slot or schedule is
2363
+ * available. Your app must have the `BOOKINGS.OVERRIDE_AVAILABILITY`
2364
+ * permission scope when passing `true`.
2365
+ *
2366
+ * Default: `false`.
2367
+ */
2368
+ skipAvailabilityValidation?: boolean;
2369
+ /**
2370
+ * Whether `PENDING` bookings are automatically set to `CONFIRMED` for
2371
+ * services that normally require the owner's manual confirmation. Your
2372
+ * app must have the `BOOKINGS.OVERRIDE_AVAILABILITY` permission scope
2373
+ * when passing `true`.
2374
+ *
2375
+ * Default: `false`.
2376
+ */
2377
+ skipBusinessConfirmation?: boolean;
2378
+ /**
2379
+ * Whether customers can pay using a payment method that isn't supported
2380
+ * for the service, but that's supported for other services. Your app
2381
+ * must have the `BOOKINGS.MANAGE_PAYMENTS` permission scope when passing
2382
+ * `true`.
2383
+ *
2384
+ * Default: `false`.
2385
+ */
2386
+ skipSelectedPaymentOptionValidation?: boolean;
2387
+ }
2388
+ export interface V2CreateBookingResponse {
2389
+ /** Created booking. */
2390
+ booking?: Booking;
2391
+ }
2392
+ export interface V2CancelBookingRequest {
2393
+ /** ID of the booking to cancel. */
2394
+ bookingId?: string;
2395
+ /**
2396
+ * Information about whether to notify the customer about the cancellation and
2397
+ * the message to send.
2398
+ */
2399
+ participantNotification?: ParticipantNotification;
2400
+ /**
2401
+ * Revision number, which increments by 1 each time the booking is updated.
2402
+ * To prevent conflicting changes,
2403
+ * the current revision must be passed when managing the booking.
2404
+ */
2405
+ revision?: string | null;
2406
+ }
2407
+ export interface CancelBookingRequestFlowControlSettings {
2408
+ /**
2409
+ * Whether the cancellation policy applies when canceling the booking. When
2410
+ * passing `false` you can only cancel a booking if the cancellation policy
2411
+ * allows it. Your app must have the `BOOKINGS.IGNORE_BOOKING_POLICY `
2412
+ * permission scope when passing `true`.
2413
+ *
2414
+ * Default: `false`.
2415
+ */
2416
+ ignoreCancellationPolicy?: boolean;
2417
+ /**
2418
+ * Whether to issue a refund when canceling the booking.
2419
+ * The refund will be issued only if the booking is refundable.
2420
+ * Currently, booking is considered refundable when it was paid by membership.
2421
+ * If passing `true`, the booking flow control settings will be set with refund,
2422
+ * otherwise, either if `false` is passed or the field remains empty,
2423
+ * the booking flow control settings will be set with no refund.
2424
+ *
2425
+ * Default: `false`.
2426
+ */
2427
+ withRefund?: boolean | null;
2428
+ }
2429
+ export interface V2CancelBookingResponse {
2430
+ /** Canceled booking. */
2431
+ booking?: Booking;
2432
+ }
2433
+ export interface V2RescheduleBookingRequest extends V2RescheduleBookingRequestParticipantsInfoOneOf {
2434
+ /** Id of the booking to reschedule. */
2435
+ bookingId?: string;
2436
+ /** Information about the new slot. */
2437
+ slot?: Slot;
2438
+ /**
2439
+ * Revision number, which increments by 1 each time the booking is updated.
2440
+ * To prevent conflicting changes, the current revision must be passed when
2441
+ * managing the booking.
2442
+ */
2443
+ revision?: string | null;
2444
+ /**
2445
+ * Information about whether to notify the customer about the rescheduling and
2446
+ * the message to send.
2447
+ */
2448
+ participantNotification?: ParticipantNotification;
2449
+ }
2450
+ /** @oneof */
2451
+ export interface V2RescheduleBookingRequestParticipantsInfoOneOf {
2452
+ }
2453
+ export interface RescheduleBookingRequestFlowControlSettings {
2454
+ /**
2455
+ * Whether the rescheduling policy applies when rescheduling the booking.
2456
+ * When passing `false` you can only cancel a booking if the rescheduling
2457
+ * policy allows it. Your app must have the `BOOKINGS.IGNORE_BOOKING_POLICY `
2458
+ * permission scope when passing `true`.
2459
+ *
2460
+ * Default: `false`.
2461
+ */
2462
+ ignoreReschedulePolicy?: boolean;
2463
+ /**
2464
+ * Whether the availability is checked before rescheduling the booking.
2465
+ * When passing `false` a booking is only created when the slot or
2466
+ * schedule is available. Your app must have the `BOOKINGS.OVERRIDE_AVAILABILITY`
2467
+ * permission scope when passing `true`.
2468
+ *
2469
+ * Default: `false`.
2470
+ */
2471
+ skipAvailabilityValidation?: boolean;
2472
+ /**
2473
+ * Whether the rescheduled booking's status is automatically set to
2474
+ * `CONFIRMED` for services that normally require the owner's manual
2475
+ * confirmation. Your app must have the `BOOKINGS.OVERRIDE_AVAILABILITY`
2476
+ * permission scope when passing `true`.
2477
+ *
2478
+ * Default: `false`.
2479
+ */
2480
+ skipBusinessConfirmation?: boolean;
2481
+ }
2482
+ export interface V2RescheduleBookingResponse {
2483
+ /** Rescheduled booking. */
2484
+ booking?: Booking;
2485
+ }
2486
+ export interface V2ConfirmBookingRequest {
2487
+ /** ID of the booking to confirm. */
2488
+ bookingId?: string;
2489
+ /**
2490
+ * Revision number, which increments by 1 each time the booking is updated.
2491
+ * To prevent conflicting changes, the current revision must be passed when
2492
+ * managing the booking.
2493
+ */
2494
+ revision?: string | null;
2495
+ /**
2496
+ * Information about whether to notify the customer about the confirmation and
2497
+ * the message to send.
2498
+ */
2499
+ participantNotification?: ParticipantNotification;
2500
+ }
2501
+ export interface V2ConfirmBookingResponse {
2502
+ booking?: Booking;
2503
+ }
2504
+ export interface V2DeclineBookingRequest {
2505
+ /** ID of the booking to decline. */
2506
+ bookingId?: string;
2507
+ /**
2508
+ * Revision number, which increments by 1 each time the booking is updated.
2509
+ * To prevent conflicting changes, the current revision must be passed when
2510
+ * managing the booking.
2511
+ */
2512
+ revision?: string | null;
2513
+ /**
2514
+ * Information about whether to notify the customer about the decline and
2515
+ * the message to send.
2516
+ */
2517
+ participantNotification?: ParticipantNotification;
2518
+ }
2519
+ export interface V2DeclineBookingResponse {
2520
+ /** Declined booking. */
2521
+ booking?: Booking;
2522
+ }
2523
+ export interface V2UpdateNumberOfParticipantsRequest extends V2UpdateNumberOfParticipantsRequestParticipantsInfoOneOf {
2524
+ /** ID of the booking to update the number of participants for. */
2525
+ bookingId?: string;
2526
+ /** Updated number of participants. */
2527
+ numberOfParticipants?: number | null;
2528
+ /**
2529
+ * Revision number, which increments by 1 each time the booking is updated.
2530
+ * To prevent conflicting changes, the current revision must be passed when
2531
+ * managing the booking.
2532
+ */
2533
+ revision?: string | null;
2534
+ }
2535
+ /** @oneof */
2536
+ export interface V2UpdateNumberOfParticipantsRequestParticipantsInfoOneOf {
2537
+ }
2538
+ export interface V2UpdateNumberOfParticipantsResponse {
2539
+ /** Booking with updated number of participants. */
2540
+ booking?: Booking;
2541
+ }
2542
+ interface DurationNonNullableFields {
2543
+ minutes: number;
2544
+ }
2545
+ interface ServiceChoiceNonNullableFields {
2546
+ custom: string;
2547
+ duration?: DurationNonNullableFields;
2548
+ optionId: string;
2549
+ }
2550
+ interface ServiceChoicesNonNullableFields {
2551
+ choices: ServiceChoiceNonNullableFields[];
2552
+ }
2553
+ interface ParticipantChoicesNonNullableFields {
2554
+ serviceChoices: ServiceChoicesNonNullableFields[];
2555
+ }
2556
+ interface BookedResourceNonNullableFields {
2557
+ _id: string;
2558
+ }
2559
+ interface LocationNonNullableFields {
2560
+ locationType: LocationType;
2561
+ }
2562
+ interface BookedSlotNonNullableFields {
2563
+ serviceId: string;
2564
+ scheduleId: string;
2565
+ resource?: BookedResourceNonNullableFields;
2566
+ location?: LocationNonNullableFields;
2567
+ additionalResources: BookedResourceNonNullableFields[];
2568
+ }
2569
+ interface BookedScheduleNonNullableFields {
2570
+ scheduleId: string;
2571
+ location?: LocationNonNullableFields;
2572
+ }
2573
+ interface BookedEntityNonNullableFields {
2574
+ slot?: BookedSlotNonNullableFields;
2575
+ schedule?: BookedScheduleNonNullableFields;
2576
+ }
2577
+ interface StreetAddressNonNullableFields {
2578
+ number: string;
2579
+ name: string;
2580
+ apt: string;
2581
+ }
2582
+ interface SubdivisionNonNullableFields {
2583
+ code: string;
2584
+ name: string;
2585
+ }
2586
+ interface AddressNonNullableFields {
2587
+ streetAddress?: StreetAddressNonNullableFields;
2588
+ subdivisions: SubdivisionNonNullableFields[];
2589
+ }
2590
+ interface ContactDetailsNonNullableFields {
2591
+ fullAddress?: AddressNonNullableFields;
2592
+ }
2593
+ interface CustomFormFieldNonNullableFields {
2594
+ _id: string;
2595
+ valueType: ValueType;
2596
+ }
2597
+ interface BookingSourceNonNullableFields {
2598
+ platform: Platform;
2599
+ actor: Actor;
2600
+ }
2601
+ interface ParticipantNotificationNonNullableFields {
2602
+ notifyParticipants: boolean;
2603
+ }
2604
+ interface CommonIdentificationDataNonNullableFields {
2605
+ anonymousVisitorId: string;
2606
+ memberId: string;
2607
+ wixUserId: string;
2608
+ appId: string;
2609
+ identityType: IdentificationDataIdentityType;
2610
+ }
2611
+ interface FlowControlSettingsNonNullableFields {
2612
+ ignoreBookingWindow: boolean;
2613
+ skipAvailabilityValidation: boolean;
2614
+ skipBusinessConfirmation: boolean;
2615
+ skipSelectedPaymentOptionValidation: boolean;
2616
+ }
2617
+ interface MultiServiceBookingInfoNonNullableFields {
2618
+ type: MultiServiceBookingType;
2619
+ }
2620
+ interface BookingNonNullableFields {
2621
+ totalParticipants: number;
2622
+ participantsChoices?: ParticipantChoicesNonNullableFields;
2623
+ bookedEntity?: BookedEntityNonNullableFields;
2624
+ contactDetails?: ContactDetailsNonNullableFields;
2625
+ additionalFields: CustomFormFieldNonNullableFields[];
2626
+ status: BookingStatus;
2627
+ paymentStatus: PaymentStatus;
2628
+ selectedPaymentOption: SelectedPaymentOption;
2629
+ bookingSource?: BookingSourceNonNullableFields;
2630
+ participantNotification?: ParticipantNotificationNonNullableFields;
2631
+ createdBy?: CommonIdentificationDataNonNullableFields;
2632
+ flowControlSettings?: FlowControlSettingsNonNullableFields;
2633
+ multiServiceBookingInfo?: MultiServiceBookingInfoNonNullableFields;
2634
+ }
2635
+ interface BookingResultNonNullableFields {
2636
+ booking?: BookingNonNullableFields;
2637
+ }
2638
+ export interface MultiServiceBookingNonNullableFields {
2639
+ bookings: BookingResultNonNullableFields[];
2640
+ }
2641
+ export interface CreateMultiServiceBookingResponseNonNullableFields {
2642
+ multiServiceBooking?: MultiServiceBookingNonNullableFields;
2643
+ }
2644
+ export interface RescheduleMultiServiceBookingResponseNonNullableFields {
2645
+ multiServiceBooking?: MultiServiceBookingNonNullableFields;
2646
+ }
2647
+ export interface GetMultiServiceBookingAvailabilityResponseNonNullableFields {
2648
+ bookable: boolean;
2649
+ }
2650
+ export interface CancelMultiServiceBookingResponseNonNullableFields {
2651
+ multiServiceBooking?: MultiServiceBookingNonNullableFields;
2652
+ }
2653
+ export interface MarkMultiServiceBookingAsPendingResponseNonNullableFields {
2654
+ multiServiceBooking?: MultiServiceBookingNonNullableFields;
2655
+ }
2656
+ export interface ConfirmMultiServiceBookingResponseNonNullableFields {
2657
+ multiServiceBooking?: MultiServiceBookingNonNullableFields;
2658
+ }
2659
+ export interface DeclineMultiServiceBookingResponseNonNullableFields {
2660
+ multiServiceBooking?: MultiServiceBookingNonNullableFields;
2661
+ }
2662
+ interface ApplicationErrorNonNullableFields {
2663
+ code: string;
2664
+ description: string;
2665
+ }
2666
+ interface ItemMetadataNonNullableFields {
2667
+ originalIndex: number;
2668
+ success: boolean;
2669
+ error?: ApplicationErrorNonNullableFields;
2670
+ }
2671
+ interface AllowedActionsNonNullableFields {
2672
+ cancel: boolean;
2673
+ reschedule: boolean;
2674
+ bookAnother: boolean;
2675
+ }
2676
+ interface BulkCalculateAllowedActionsResultNonNullableFields {
2677
+ itemMetadata?: ItemMetadataNonNullableFields;
2678
+ item?: AllowedActionsNonNullableFields;
2679
+ }
2680
+ interface BulkActionMetadataNonNullableFields {
2681
+ totalSuccesses: number;
2682
+ totalFailures: number;
2683
+ undetailedFailures: number;
2684
+ }
2685
+ export interface BulkGetMultiServiceBookingAllowedActionsResponseNonNullableFields {
2686
+ results: BulkCalculateAllowedActionsResultNonNullableFields[];
2687
+ bulkActionMetadata?: BulkActionMetadataNonNullableFields;
2688
+ }
2689
+ export interface GetMultiServiceBookingResponseNonNullableFields {
2690
+ multiServiceBooking?: MultiServiceBookingNonNullableFields;
2691
+ }
2692
+ export interface AddBookingsToMultiServiceBookingResponseNonNullableFields {
2693
+ bookings: BookingResultNonNullableFields[];
2694
+ }
2695
+ export interface RemoveBookingsFromMultiServiceBookingResponseNonNullableFields {
2696
+ bookings: BookingResultNonNullableFields[];
2697
+ }
2698
+ export interface CreateBookingResponseNonNullableFields {
2699
+ booking?: BookingNonNullableFields;
2700
+ }
2701
+ interface BulkBookingResultNonNullableFields {
2702
+ itemMetadata?: ItemMetadataNonNullableFields;
2703
+ item?: BookingNonNullableFields;
2704
+ }
2705
+ export interface BulkCreateBookingResponseNonNullableFields {
2706
+ results: BulkBookingResultNonNullableFields[];
2707
+ bulkActionMetadata?: BulkActionMetadataNonNullableFields;
2708
+ }
2709
+ export interface RescheduleBookingResponseNonNullableFields {
2710
+ booking?: BookingNonNullableFields;
2711
+ }
2712
+ export interface ConfirmBookingResponseNonNullableFields {
2713
+ booking?: BookingNonNullableFields;
2714
+ }
2715
+ export interface UpdateExtendedFieldsResponseNonNullableFields {
2716
+ namespace: string;
2717
+ }
2718
+ export interface DeclineBookingResponseNonNullableFields {
2719
+ booking?: BookingNonNullableFields;
2720
+ }
2721
+ export interface CancelBookingResponseNonNullableFields {
2722
+ booking?: BookingNonNullableFields;
2723
+ }
2724
+ export interface UpdateNumberOfParticipantsResponseNonNullableFields {
2725
+ booking?: BookingNonNullableFields;
2726
+ }
2727
+ export interface ConfirmOrDeclineBookingResponseNonNullableFields {
2728
+ booking?: BookingNonNullableFields;
2729
+ }
2730
+ export interface BulkConfirmOrDeclineBookingResponseNonNullableFields {
2731
+ results: BulkBookingResultNonNullableFields[];
2732
+ bulkActionMetadata?: BulkActionMetadataNonNullableFields;
2733
+ }
2734
+ export interface BaseEventMetadata {
2735
+ /** App instance ID. */
2736
+ instanceId?: string | null;
2737
+ /** Event type. */
2738
+ eventType?: string;
2739
+ /** The identification type and identity data. */
2740
+ identity?: WebhooksIdentificationData;
2741
+ }
2742
+ export interface EventMetadata extends BaseEventMetadata {
2743
+ /**
2744
+ * Unique event ID.
2745
+ * Allows clients to ignore duplicate webhooks.
2746
+ */
2747
+ _id?: string;
2748
+ /**
2749
+ * Assumes actions are also always typed to an entity_type
2750
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
2751
+ */
2752
+ entityFqdn?: string;
2753
+ /**
2754
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
2755
+ * This is although the created/updated/deleted notion is duplication of the oneof types
2756
+ * Example: created/updated/deleted/started/completed/email_opened
2757
+ */
2758
+ slug?: string;
2759
+ /** ID of the entity associated with the event. */
2760
+ entityId?: string;
2761
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
2762
+ eventTime?: Date | null;
2763
+ /**
2764
+ * Whether the event was triggered as a result of a privacy regulation application
2765
+ * (for example, GDPR).
2766
+ */
2767
+ triggeredByAnonymizeRequest?: boolean | null;
2768
+ /** If present, indicates the action that triggered the event. */
2769
+ originatedFrom?: string | null;
2770
+ /**
2771
+ * A sequence number defining the order of updates to the underlying entity.
2772
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
2773
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
2774
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
2775
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
2776
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
2777
+ */
2778
+ entityEventSequence?: string | null;
2779
+ }
2780
+ export interface BookingCanceledEnvelope {
2781
+ data: BookingCanceled;
2782
+ metadata: EventMetadata;
2783
+ }
2784
+ /**
2785
+ * Triggered when a booking is canceled.
2786
+ * @permissionScope Manage Bookings
2787
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
2788
+ * @permissionScope Read Bookings - Including Participants
2789
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
2790
+ * @permissionScope Read Bookings - all read permissions
2791
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
2792
+ * @permissionScope Manage Bookings - all permissions
2793
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
2794
+ * @permissionScope Read bookings calendar - including participants
2795
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR-WITH-PARTICIPANTS
2796
+ * @permissionId BOOKINGS.BOOKING_READ
2797
+ * @webhook
2798
+ * @eventType wix.bookings.v2.booking_canceled
2799
+ */
2800
+ export declare function onBookingCanceled(handler: (event: BookingCanceledEnvelope) => void | Promise<void>): void;
2801
+ export interface BookingConfirmedEnvelope {
2802
+ data: BookingConfirmed;
2803
+ metadata: EventMetadata;
2804
+ }
2805
+ /**
2806
+ * Triggered when a booking is confirmed.
2807
+ * @permissionScope Manage Bookings
2808
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
2809
+ * @permissionScope Read Bookings - Including Participants
2810
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
2811
+ * @permissionScope Read Bookings - all read permissions
2812
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
2813
+ * @permissionScope Manage Bookings - all permissions
2814
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
2815
+ * @permissionScope Read bookings calendar - including participants
2816
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR-WITH-PARTICIPANTS
2817
+ * @permissionId BOOKINGS.BOOKING_READ
2818
+ * @webhook
2819
+ * @eventType wix.bookings.v2.booking_confirmed
2820
+ */
2821
+ export declare function onBookingConfirmed(handler: (event: BookingConfirmedEnvelope) => void | Promise<void>): void;
2822
+ export interface BookingCreatedEnvelope {
2823
+ entity: Booking;
2824
+ metadata: EventMetadata;
2825
+ }
2826
+ /**
2827
+ * Triggered when a booking is created.
2828
+ * @permissionScope Manage Bookings
2829
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
2830
+ * @permissionScope Read Bookings - Including Participants
2831
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
2832
+ * @permissionScope Read Bookings - all read permissions
2833
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
2834
+ * @permissionScope Manage Bookings - all permissions
2835
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
2836
+ * @permissionId BOOKINGS.READ_BOOKINGS
2837
+ * @permissionId BOOKINGS.BOOKING_READ
2838
+ * @webhook
2839
+ * @eventType wix.bookings.v2.booking_created
2840
+ */
2841
+ export declare function onBookingCreated(handler: (event: BookingCreatedEnvelope) => void | Promise<void>): void;
2842
+ export interface BookingDeclinedEnvelope {
2843
+ data: BookingDeclined;
2844
+ metadata: EventMetadata;
2845
+ }
2846
+ /**
2847
+ * Triggered when a booking is declined.
2848
+ * @permissionScope Manage Bookings
2849
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
2850
+ * @permissionScope Read Bookings - Including Participants
2851
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
2852
+ * @permissionScope Read Bookings - all read permissions
2853
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
2854
+ * @permissionScope Manage Bookings - all permissions
2855
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
2856
+ * @permissionScope Read bookings calendar - including participants
2857
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR-WITH-PARTICIPANTS
2858
+ * @permissionId BOOKINGS.BOOKING_READ
2859
+ * @webhook
2860
+ * @eventType wix.bookings.v2.booking_declined
2861
+ */
2862
+ export declare function onBookingDeclined(handler: (event: BookingDeclinedEnvelope) => void | Promise<void>): void;
2863
+ export interface BookingRescheduledEnvelope {
2864
+ data: BookingRescheduled;
2865
+ metadata: EventMetadata;
2866
+ }
2867
+ /**
2868
+ * Triggered when a booking is rescheduled.
2869
+ * @permissionScope Manage Bookings
2870
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
2871
+ * @permissionScope Read Bookings - Including Participants
2872
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
2873
+ * @permissionScope Read Bookings - all read permissions
2874
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
2875
+ * @permissionScope Manage Bookings - all permissions
2876
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
2877
+ * @permissionScope Read bookings calendar - including participants
2878
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR-WITH-PARTICIPANTS
2879
+ * @permissionId BOOKINGS.BOOKING_READ
2880
+ * @webhook
2881
+ * @eventType wix.bookings.v2.booking_rescheduled
2882
+ */
2883
+ export declare function onBookingRescheduled(handler: (event: BookingRescheduledEnvelope) => void | Promise<void>): void;
2884
+ export interface BookingUpdatedEnvelope {
2885
+ entity: Booking;
2886
+ metadata: EventMetadata;
2887
+ }
2888
+ /**
2889
+ * Triggered when a booked schedule is updated.
2890
+ * @permissionScope Manage Bookings
2891
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
2892
+ * @permissionScope Read Bookings - Including Participants
2893
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
2894
+ * @permissionScope Read Bookings - all read permissions
2895
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
2896
+ * @permissionScope Manage Bookings - all permissions
2897
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
2898
+ * @permissionId BOOKINGS.READ_BOOKINGS
2899
+ * @permissionId BOOKINGS.BOOKING_READ
2900
+ * @webhook
2901
+ * @eventType wix.bookings.v2.booking_updated
2902
+ */
2903
+ export declare function onBookingUpdated(handler: (event: BookingUpdatedEnvelope) => void | Promise<void>): void;
2904
+ export interface BookingNumberOfParticipantsUpdatedEnvelope {
2905
+ data: NumberOfParticipantsUpdated;
2906
+ metadata: EventMetadata;
2907
+ }
2908
+ /**
2909
+ * Triggered when the number of participants is updated.
2910
+ * @permissionScope Manage Bookings
2911
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
2912
+ * @permissionScope Read Bookings - Including Participants
2913
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
2914
+ * @permissionScope Read Bookings - all read permissions
2915
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
2916
+ * @permissionScope Manage Bookings - all permissions
2917
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
2918
+ * @permissionScope Read bookings calendar - including participants
2919
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR-WITH-PARTICIPANTS
2920
+ * @permissionId BOOKINGS.BOOKING_READ
2921
+ * @webhook
2922
+ * @eventType wix.bookings.v2.booking_number_of_participants_updated
2923
+ */
2924
+ export declare function onBookingNumberOfParticipantsUpdated(handler: (event: BookingNumberOfParticipantsUpdatedEnvelope) => void | Promise<void>): void;
2925
+ /**
2926
+ * Creates a multi-service booking.
2927
+ *
2928
+ *
2929
+ * See Create Booking for more information.
2930
+ * @param bookings - Single-service bookings to combine in a multi-service booking.
2931
+ * @public
2932
+ * @documentationMaturity preview
2933
+ * @requiredField bookings
2934
+ * @requiredField bookings.additionalFields._id
2935
+ * @requiredField bookings.bookedEntity
2936
+ * @requiredField bookings.bookedEntity.slot
2937
+ * @requiredField bookings.bookedEntity.slot.endDate
2938
+ * @requiredField bookings.bookedEntity.slot.location.locationType
2939
+ * @requiredField bookings.bookedEntity.slot.scheduleId
2940
+ * @requiredField bookings.bookedEntity.slot.startDate
2941
+ * @permissionId MULTI_SERVICE_BOOKINGS.MULTI_SERVICE_BOOKING_CREATE
2942
+ * @permissionScope Manage Bookings
2943
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
2944
+ * @permissionScope Manage Bookings - all permissions
2945
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
2946
+ * @applicableIdentity APP
2947
+ * @applicableIdentity VISITOR
2948
+ * @fqn com.wixpress.bookings.bookings.v2.MultiServiceBookings.CreateMultiServiceBooking
2949
+ */
2950
+ export declare function createMultiServiceBooking(bookings: Booking[], options?: CreateMultiServiceBookingOptions): Promise<CreateMultiServiceBookingResponse & CreateMultiServiceBookingResponseNonNullableFields>;
2951
+ export interface CreateMultiServiceBookingOptions {
2952
+ /**
2953
+ * Information about whether to notify the customer and
2954
+ * the message to send.
2955
+ */
2956
+ participantNotification?: ParticipantNotification;
2957
+ /**
2958
+ * Whether to send an SMS reminder to the customer 24 hours before the
2959
+ * session starts. The phone number is taken from `contactDetails.phone`.
2960
+ *
2961
+ * Default: `true`
2962
+ */
2963
+ sendSmsReminder?: boolean | null;
2964
+ /**
2965
+ * Whether to ignore specific standard procedures of the Wix Bookings flow.
2966
+ * For example, whether to check availability before updating the status.
2967
+ */
2968
+ flowControlSettings?: CreateBookingFlowControlSettings;
2969
+ /** Whether to return the created single-service bookings. */
2970
+ returnFullEntity?: boolean;
2971
+ /** Multi service booking type. */
2972
+ multiServiceBookingType?: MultiServiceBookingType;
2973
+ }
2974
+ /**
2975
+ * Reschedules a multi-service booking.
2976
+ *
2977
+ *
2978
+ * The call fails if at least 1 individual booking can't be rescheduled due
2979
+ * the service being unavailable or a rescheduling policy violation.
2980
+ *
2981
+ *
2982
+ * See Reschedule Booking for more information.
2983
+ * @param multiServiceBookingId - ID of the multi service booking to reschedule.
2984
+ * @param rescheduleBookingsInfo - Information about the single-service bookings to reschedule.
2985
+ * @public
2986
+ * @documentationMaturity preview
2987
+ * @requiredField multiServiceBookingId
2988
+ * @requiredField rescheduleBookingsInfo
2989
+ * @requiredField rescheduleBookingsInfo.bookingId
2990
+ * @requiredField rescheduleBookingsInfo.revision
2991
+ * @requiredField rescheduleBookingsInfo.slot
2992
+ * @permissionId MULTI_SERVICE_BOOKINGS.MULTI_SERVICE_BOOKING_RESCHEDULE
2993
+ * @permissionScope Manage Bookings
2994
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
2995
+ * @permissionScope Manage Bookings - all permissions
2996
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
2997
+ * @applicableIdentity APP
2998
+ * @applicableIdentity MEMBER
2999
+ * @fqn com.wixpress.bookings.bookings.v2.MultiServiceBookings.RescheduleMultiServiceBooking
3000
+ */
3001
+ export declare function rescheduleMultiServiceBooking(multiServiceBookingId: string | null, rescheduleBookingsInfo: RescheduleBookingInfo[], options?: RescheduleMultiServiceBookingOptions): Promise<RescheduleMultiServiceBookingResponse & RescheduleMultiServiceBookingResponseNonNullableFields>;
3002
+ export interface RescheduleMultiServiceBookingOptions {
3003
+ /**
3004
+ * Information about whether to notify the customer and
3005
+ * the message to send.
3006
+ */
3007
+ participantNotification?: ParticipantNotification;
3008
+ /**
3009
+ * Information about whether specific procedures of the standard Wix Bookings
3010
+ * rescheduling flow are changed. For example, whether the availability of
3011
+ * the new slot is checked before rescheduling the booking or if you can
3012
+ * reschedule the booking even though the rescheduling policy doesn't allow it.
3013
+ */
3014
+ flowControlSettings?: RescheduleBookingFlowControlSettings;
3015
+ /** Whether to return the rescheduled bookings entities. */
3016
+ returnFullEntity?: boolean;
3017
+ }
3018
+ /**
3019
+ * Retrieves a multi-service booking's availability.
3020
+ *
3021
+ *
3022
+ * Use List Multi Service Availability Time Slots to check availability for a
3023
+ * `SEQUENTIAL_BOOKINGS` multi-service booking.
3024
+ * @param multiServiceBookingId - ID of the multi-service booking to retrieve.
3025
+ * @public
3026
+ * @documentationMaturity preview
3027
+ * @requiredField multiServiceBookingId
3028
+ * @permissionId MULTI_SERVICE_BOOKINGS.MULTI_SERVICE_BOOKING_GET_AVAILABILITY
3029
+ * @permissionScope Read Bookings - Public Data
3030
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
3031
+ * @permissionScope Manage Bookings Services and Settings
3032
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
3033
+ * @permissionScope Manage Bookings
3034
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
3035
+ * @permissionScope Read Bookings - Including Participants
3036
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
3037
+ * @permissionScope Read Bookings - all read permissions
3038
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
3039
+ * @permissionScope Read Bookings Calendar Availability
3040
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR
3041
+ * @permissionScope Manage Bookings - all permissions
3042
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
3043
+ * @applicableIdentity APP
3044
+ * @applicableIdentity VISITOR
3045
+ * @fqn com.wixpress.bookings.bookings.v2.MultiServiceBookings.GetMultiServiceBookingAvailability
3046
+ */
3047
+ export declare function getMultiServiceBookingAvailability(multiServiceBookingId: string | null): Promise<GetMultiServiceBookingAvailabilityResponse & GetMultiServiceBookingAvailabilityResponseNonNullableFields>;
3048
+ /**
3049
+ * Cancels a multi-service booking and thus all its individual bookings.
3050
+ * @param multiServiceBookingId - ID of the multi-service booking to cancel.
3051
+ * @public
3052
+ * @documentationMaturity preview
3053
+ * @requiredField multiServiceBookingId
3054
+ * @permissionId MULTI_SERVICE_BOOKINGS.MULTI_SERVICE_BOOKING_CANCEL
3055
+ * @permissionScope Manage Bookings
3056
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
3057
+ * @permissionScope Manage Bookings - all permissions
3058
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
3059
+ * @applicableIdentity APP
3060
+ * @applicableIdentity MEMBER
3061
+ * @fqn com.wixpress.bookings.bookings.v2.MultiServiceBookings.CancelMultiServiceBooking
3062
+ */
3063
+ export declare function cancelMultiServiceBooking(multiServiceBookingId: string | null, options?: CancelMultiServiceBookingOptions): Promise<CancelMultiServiceBookingResponse & CancelMultiServiceBookingResponseNonNullableFields>;
3064
+ export interface CancelMultiServiceBookingOptions {
3065
+ /**
3066
+ * Information about whether to notify the customer and
3067
+ * the message to send.
3068
+ */
3069
+ participantNotification?: ParticipantNotification;
3070
+ /**
3071
+ * Information about whether specific procedures of the standard Wix Bookings
3072
+ * cancellation flow are changed. For example, whether you can cancel
3073
+ * a booking even though the cancellation policy doesn't allow it or whether
3074
+ * to issue a refund.
3075
+ */
3076
+ flowControlSettings?: CancelBookingFlowControlSettings;
3077
+ /** Whether to return the canceled single-service bookings. */
3078
+ returnFullEntity?: boolean;
3079
+ }
3080
+ /**
3081
+ * Updates the status of a multi-service booking to `PENDING`.
3082
+ *
3083
+ *
3084
+ * Also updates the status of each of individual bookings within the multi-service booking to `PENDING`.
3085
+ *
3086
+ * The call fails if the status for at least a single individual booking can't be updated.
3087
+ *
3088
+ * See Mark Booking as Pending for more information.
3089
+ * @param multiServiceBookingId - ID of the multi-service booking to mark as `PENDING`.
3090
+ * @public
3091
+ * @documentationMaturity preview
3092
+ * @requiredField multiServiceBookingId
3093
+ * @permissionId MULTI_SERVICE_BOOKINGS.MULTI_SERVICE_BOOKING_MARK_AS_PENDING
3094
+ * @permissionScope Manage Bookings
3095
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
3096
+ * @permissionScope Manage Bookings - all permissions
3097
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
3098
+ * @applicableIdentity APP
3099
+ * @fqn com.wixpress.bookings.bookings.v2.MultiServiceBookings.MarkMultiServiceBookingAsPending
3100
+ */
3101
+ export declare function markMultiServiceBookingAsPending(multiServiceBookingId: string | null, options?: MarkMultiServiceBookingAsPendingOptions): Promise<MarkMultiServiceBookingAsPendingResponse & MarkMultiServiceBookingAsPendingResponseNonNullableFields>;
3102
+ export interface MarkMultiServiceBookingAsPendingOptions {
3103
+ /** Information about the single-service bookings to mark as `PENDING`. */
3104
+ markAsPendingBookingsInfo?: BookingInfo[];
3105
+ /**
3106
+ * Information about whether to notify the customer and
3107
+ * the message to send.
3108
+ */
3109
+ participantNotification?: ParticipantNotification;
3110
+ /**
3111
+ * Whether to send an SMS reminder to the customer 24 hours before the
3112
+ * session starts. The phone number is taken from `contactDetails.phone`.
3113
+ *
3114
+ * Default: `true`
3115
+ */
3116
+ sendSmsReminder?: boolean | null;
3117
+ /** Whether this booking has a conflict with at least 1 other confirmed booking. */
3118
+ doubleBooked?: boolean | null;
3119
+ /** Whether to return the single-service bookings that were marked as `PENDING`. */
3120
+ returnFullEntity?: boolean;
3121
+ /**
3122
+ * Information about whether specific procedures of the standard Wix Bookings
3123
+ * creation flow are changed. For example, whether the availability is checked
3124
+ * before updating the booking.
3125
+ */
3126
+ flowControlSettings?: MarkBookingAsPendingFlowControlSettings;
3127
+ }
3128
+ /**
3129
+ * Updates the status of a multi-service booking to `CONFIRMED`.
3130
+ *
3131
+ *
3132
+ * Also updates the status of each of individual bookings within the multi-service booking to `CONFIRMED`.
3133
+ *
3134
+ * The call fails if the status for at least a single individual booking can't be updated.
3135
+ *
3136
+ * See Confirm Booking for more information.
3137
+ * @param multiServiceBookingId - ID of the multi-service booking to confirm its related bookings.
3138
+ * @public
3139
+ * @documentationMaturity preview
3140
+ * @requiredField multiServiceBookingId
3141
+ * @permissionId MULTI_SERVICE_BOOKINGS.MULTI_SERVICE_BOOKING_CONFIRM
3142
+ * @permissionScope Manage Bookings
3143
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
3144
+ * @permissionScope Manage Bookings - all permissions
3145
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
3146
+ * @applicableIdentity APP
3147
+ * @fqn com.wixpress.bookings.bookings.v2.MultiServiceBookings.ConfirmMultiServiceBooking
3148
+ */
3149
+ export declare function confirmMultiServiceBooking(multiServiceBookingId: string | null, options?: ConfirmMultiServiceBookingOptions): Promise<ConfirmMultiServiceBookingResponse & ConfirmMultiServiceBookingResponseNonNullableFields>;
3150
+ export interface ConfirmMultiServiceBookingOptions {
3151
+ /** Information about the single-service bookings to confirm. */
3152
+ confirmBookingsInfo?: BookingInfo[];
3153
+ /**
3154
+ * Information about whether to notify the customer and
3155
+ * the message to send.
3156
+ */
3157
+ participantNotification?: ParticipantNotification;
3158
+ /**
3159
+ * Whether to send an SMS reminder to the customer 24 hours before the
3160
+ * session starts. The phone number is taken from `contactDetails.phone`.
3161
+ *
3162
+ * Default: `true`
3163
+ */
3164
+ sendSmsReminder?: boolean | null;
3165
+ /** Whether this booking has a conflict with at least 1 other confirmed booking. */
3166
+ doubleBooked?: boolean | null;
3167
+ /** Whether to return the confirmed single-service bookings. */
3168
+ returnFullEntity?: boolean;
3169
+ /**
3170
+ * Information about whether specific procedures of the standard Wix Bookings
3171
+ * confirmation flow are changed. For example, whether the availability is
3172
+ * checked before confirming the booking.
3173
+ */
3174
+ flowControlSettings?: ConfirmBookingFlowControlSettings;
3175
+ }
3176
+ /**
3177
+ * Updates the status of a multi-service booking to `DECLINED`.
3178
+ *
3179
+ *
3180
+ * Also updates the status of each of individual bookings within the multi-service booking to `DECLINED`.
3181
+ *
3182
+ * The call fails if the status for at least a single individual booking can't be updated.
3183
+ *
3184
+ * See Decline Booking for more information.
3185
+ * @param multiServiceBookingId - ID of the multi service booking to decline.
3186
+ * @public
3187
+ * @documentationMaturity preview
3188
+ * @requiredField multiServiceBookingId
3189
+ * @permissionId MULTI_SERVICE_BOOKINGS.MULTI_SERVICE_BOOKING_DECLINE
3190
+ * @permissionScope Manage Bookings
3191
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
3192
+ * @permissionScope Manage Bookings - all permissions
3193
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
3194
+ * @applicableIdentity APP
3195
+ * @fqn com.wixpress.bookings.bookings.v2.MultiServiceBookings.DeclineMultiServiceBooking
3196
+ */
3197
+ export declare function declineMultiServiceBooking(multiServiceBookingId: string | null, options?: DeclineMultiServiceBookingOptions): Promise<DeclineMultiServiceBookingResponse & DeclineMultiServiceBookingResponseNonNullableFields>;
3198
+ export interface DeclineMultiServiceBookingOptions {
3199
+ /** Information about the single-service bookings to decline. */
3200
+ declineBookingsInfo?: BookingInfo[];
3201
+ /**
3202
+ * Information about whether to notify the customer and
3203
+ * the message to send.
3204
+ */
3205
+ participantNotification?: ParticipantNotification;
3206
+ /** Whether this booking has a conflict with at least 1 other confirmed booking. */
3207
+ doubleBooked?: boolean | null;
3208
+ /** Whether to return the declined single-service bookings. */
3209
+ returnFullEntity?: boolean;
3210
+ /**
3211
+ * Information about whether specific procedures of the standard Wix Bookings
3212
+ * declining flow are changed. For example, whether to issue a refund.
3213
+ */
3214
+ flowControlSettings?: DeclineBookingFlowControlSettings;
3215
+ }
3216
+ /**
3217
+ * Retrieves the allowed actions for a list of multi-service bookings.
3218
+ * @param multiServiceBookingIds - IDs of the multi-service bookings to retrieve allowed actions for.
3219
+ * @public
3220
+ * @documentationMaturity preview
3221
+ * @requiredField multiServiceBookingIds
3222
+ * @permissionId MULTI_SERVICE_BOOKINGS.MULTI_SERVICE_BOOKING_GET_ALLOWED_ACTIONS
3223
+ * @permissionScope Read Bookings - Public Data
3224
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
3225
+ * @permissionScope Manage Bookings
3226
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
3227
+ * @permissionScope Read Bookings - Including Participants
3228
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
3229
+ * @permissionScope Read Bookings - all read permissions
3230
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
3231
+ * @permissionScope Manage Bookings - all permissions
3232
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
3233
+ * @applicableIdentity APP
3234
+ * @applicableIdentity VISITOR
3235
+ * @fqn com.wixpress.bookings.bookings.v2.MultiServiceBookings.BulkGetMultiServiceBookingAllowedActions
3236
+ */
3237
+ export declare function bulkGetMultiServiceBookingAllowedActions(multiServiceBookingIds: string[] | null): Promise<BulkGetMultiServiceBookingAllowedActionsResponse & BulkGetMultiServiceBookingAllowedActionsResponseNonNullableFields>;
3238
+ /**
3239
+ * Retrieves all single-service bookings belonging to a multi-service booking.
3240
+ *
3241
+ *
3242
+ * If you call as an [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities)
3243
+ * who has permissions to read only part of the bookings,
3244
+ * only the permitted bookings are retrieved. The returned total number of
3245
+ * bookings includes also the bookings for which you don't have permissions.
3246
+ * @param multiServiceBookingId - ID of the multi-service booking.
3247
+ * @public
3248
+ * @documentationMaturity preview
3249
+ * @requiredField multiServiceBookingId
3250
+ * @permissionId MULTI_SERVICE_BOOKINGS.MULTI_SERVICE_BOOKING_READ
3251
+ * @permissionScope Read Bookings - Public Data
3252
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
3253
+ * @permissionScope Manage Bookings
3254
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
3255
+ * @permissionScope Read Bookings - Including Participants
3256
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
3257
+ * @permissionScope Read Bookings - all read permissions
3258
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
3259
+ * @permissionScope Read Bookings Calendar Availability
3260
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR
3261
+ * @permissionScope Manage Bookings - all permissions
3262
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
3263
+ * @applicableIdentity APP
3264
+ * @returns Retrieved multi-service booking.
3265
+ * @fqn com.wixpress.bookings.bookings.v2.MultiServiceBookings.GetMultiServiceBooking
3266
+ */
3267
+ export declare function getMultiServiceBooking(multiServiceBookingId: string | null): Promise<MultiServiceBooking & MultiServiceBookingNonNullableFields>;
3268
+ /**
3269
+ * Adds a list of single-service bookings to a multi-service booking.
3270
+ *
3271
+ *
3272
+ * The call fails, if at least 1 of the specified booking is already part of a
3273
+ * multi-service booking.
3274
+ * @param multiServiceBookingId - ID of the multi-service booking.
3275
+ * @public
3276
+ * @documentationMaturity preview
3277
+ * @requiredField multiServiceBookingId
3278
+ * @requiredField options.bookings
3279
+ * @requiredField options.bookings.bookingId
3280
+ * @requiredField options.bookings.revision
3281
+ * @permissionId MULTI_SERVICE_BOOKINGS.MULTI_SERVICE_BOOKING_ADD_BOOKINGS
3282
+ * @fqn com.wixpress.bookings.bookings.v2.MultiServiceBookings.AddBookingsToMultiServiceBooking
3283
+ */
3284
+ export declare function addBookingsToMultiServiceBooking(multiServiceBookingId: string | null, options?: AddBookingsToMultiServiceBookingOptions): Promise<AddBookingsToMultiServiceBookingResponse & AddBookingsToMultiServiceBookingResponseNonNullableFields>;
3285
+ export interface AddBookingsToMultiServiceBookingOptions {
3286
+ /** List of single-service booking IDs and their revision. */
3287
+ bookings: BookingIdAndRevision[];
3288
+ /** Whether to return the single-service bookings that were added to the multi-service booking. */
3289
+ returnFullEntity?: boolean;
3290
+ }
3291
+ /**
3292
+ * Removes single-service bookings from a multi-service booking and returns the
3293
+ * removed bookings.
3294
+ *
3295
+ *
3296
+ * If you specify an empty `bookings` array, all single-service bookings for which
3297
+ * the call's [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities)
3298
+ * has read permissions are removed from the multi-service booking.
3299
+ *
3300
+ * If the call would create a multi-service booking including only 1 single-service
3301
+ * booking, the multi-service booking is also deleted.
3302
+ * @param multiServiceBookingId - ID of the multi-service booking.
3303
+ * @public
3304
+ * @documentationMaturity preview
3305
+ * @requiredField multiServiceBookingId
3306
+ * @permissionId MULTI_SERVICE_BOOKINGS.MULTI_SERVICE_BOOKING_REMOVE_BOOKINGS
3307
+ * @permissionScope Manage Bookings
3308
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
3309
+ * @permissionScope Manage Bookings - all permissions
3310
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
3311
+ * @applicableIdentity APP
3312
+ * @fqn com.wixpress.bookings.bookings.v2.MultiServiceBookings.RemoveBookingsFromMultiServiceBooking
3313
+ */
3314
+ export declare function removeBookingsFromMultiServiceBooking(multiServiceBookingId: string | null, options?: RemoveBookingsFromMultiServiceBookingOptions): Promise<RemoveBookingsFromMultiServiceBookingResponse & RemoveBookingsFromMultiServiceBookingResponseNonNullableFields>;
3315
+ export interface RemoveBookingsFromMultiServiceBookingOptions {
3316
+ /** List of single-service booking IDs and their revision. */
3317
+ bookings?: BookingIdAndRevision[];
3318
+ /** Whether to return the single-service bookings. */
3319
+ returnFullEntity?: boolean;
3320
+ }
3321
+ /**
3322
+ * Creates a booking.
3323
+ *
3324
+ *
3325
+ * ## Appointment booking
3326
+ *
3327
+ * For appointment-based services, specify the relevant `slot` in
3328
+ * `bookedEntity.slot`. We recommend specifying the complete
3329
+ * `availabilityEntries.slot` returned in Query Availability
3330
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/availability-calendar/query-availability) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/time-slots/availability-calendar/query-availability))
3331
+ * in your call's request to avoid failed calls due to unavailability.
3332
+ *
3333
+ * ## Class session booking
3334
+ *
3335
+ * For class services, specify the relevant event ID
3336
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction))
3337
+ * as `bookedEntity.slot.eventId`.
3338
+ * We recommend retrieving the event ID from Query Availability's
3339
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/availability-calendar/query-availability) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/time-slots/availability-calendar/query-availability))
3340
+ * `availabilityEntries.slot.eventId` to avoid failed calls due to unavailability.
3341
+ * Specifying an event ID leads to automatic calculations of `slot.startDate`, `slot.endDate`,
3342
+ * `slot.timezone`, `slot.resource`, and `slot.location`. All manually specified
3343
+ * values are overridden.
3344
+ *
3345
+ * ## Course booking
3346
+ *
3347
+ * For course services, specify the course's schedule ID in `bookedEntity.schedule.scheduleId`.
3348
+ * We recommend following [this sample flow](https://dev.wix.com/docs/rest/business-solutions/bookings/sample-booking-flows#book-a-course)
3349
+ * to minimize failed calls due to unavailability.
3350
+ *
3351
+ * ## Related resources
3352
+ *
3353
+ * Specifying a `resource` triggers an availability check, resulting in a failed
3354
+ * call if the resource is unavailable. Omitting a resource allows Wix Bookings
3355
+ * to assign a resource belonging to the relevant type randomly when the merchant
3356
+ * confirms the booking.
3357
+ *
3358
+ * ## Participant information
3359
+ *
3360
+ * You must specify either `participantsChoices` or `totalParticipants`.
3361
+ * The call fails if the specified `participantsChoices` aren't among the supported
3362
+ * service options and variants
3363
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)).
3364
+ *
3365
+ * ## Notify customers
3366
+ *
3367
+ * You can specify a `participantNotification.message` for the customer that's send
3368
+ * immediately. Ensure `participantNotification.notifyParticipants` is set to `true`
3369
+ * to send the message.
3370
+ *
3371
+ * If you specify `{"sendSmsReminder": true}`, the customer receives an SMS 24 hours
3372
+ * before the session starts. The phone number is taken from `contactDetails.phone`.
3373
+ *
3374
+ * ## Booking status
3375
+ *
3376
+ * Bookings default to the `CREATED` status, not affecting the business calendar
3377
+ * or resource availability. You can specify a different status when the calling
3378
+ * [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities)
3379
+ * has `Manage Bookings` permissions.
3380
+ *
3381
+ * ## Payment options
3382
+ *
3383
+ * The specified `selectedPaymentOption` indicates how the customer intends to
3384
+ * pay, allowing for later changes to a different method supported by the service.
3385
+ *
3386
+ * ## Payment status
3387
+ *
3388
+ * A booking is initially created with `{"paymentStatus": "UNDEFINED"}` regardless
3389
+ * of the payment status specified in Create Booking. If a customer uses an eCommerce
3390
+ * checkout ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/orders/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction)),
3391
+ * Wix Bookings automatically syncs the booking's payment status from
3392
+ * the corresponding eCommerce order ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/introduction)).
3393
+ *
3394
+ * If a booking doesn't have a corresponding eCommerce order, for example, since
3395
+ * the customer didn't use the eCommerce checkout, you can update the booking's
3396
+ * payment status with Confirm Or Decline Booking
3397
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/bookings/confirm-or-decline-booking) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-or-decline-booking)).
3398
+ *
3399
+ * ## Booking form data
3400
+ *
3401
+ * When customers sign up for a service, they must fill out the booking form.
3402
+ * To create a booking with a completed booking form, specify the relevant data in
3403
+ * `formSubmission`. Ensure the values of the corresponding fields in
3404
+ * `booking.contactDetails` and `formSubmission` are identical. If these values
3405
+ * don't match, Create Booking fails. Therefore, we recommend specifying
3406
+ * only `booking.contactDetails.contactId` when providing `formSubmission`.
3407
+ *
3408
+ * ## Admin overwrites
3409
+ *
3410
+ * There are small but important differences when you specify special
3411
+ * `flowControlSettings`:
3412
+ *
3413
+ * - `{"skipAvailabilityValidation": true}`: The call succeeds
3414
+ * regardless of availability. If you don't specify any resource, the call
3415
+ * succeeds even if no resource of the relevant type is available.
3416
+ * - `{"skipBusinessConfirmation": true}`: Automatically confirms `PENDING`
3417
+ * bookings that require manual confirmation.
3418
+ * - `{"skipSelectedPaymentOptionValidation": true}`: Allows customers to pay
3419
+ * with payment methods that aren't supported for the service.
3420
+ *
3421
+ * When using special `flowControlSettings`, ensure you have sufficient
3422
+ * permissions. If you encounter failed calls due to insufficient permissions,
3423
+ * consider the following options:
3424
+ *
3425
+ * - **App developers** can use a higher
3426
+ * [permission](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions),
3427
+ * such as `MANAGE BOOKINGS - ALL PERMISSIONS`.
3428
+ * - **Site developers** can utilize
3429
+ * [elevation](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/authorization/elevation).
3430
+ *
3431
+ * Granting additional permissions and using elevation permits method calls that
3432
+ * would typically fail due to authorization checks. Therefore, you should use
3433
+ * them intentionally and securely.
3434
+ * @param booking - The booking to create.
3435
+ * @public
3436
+ * @requiredField booking
3437
+ * @requiredField booking.additionalFields._id
3438
+ * @requiredField booking.bookedEntity
3439
+ * @permissionId BOOKINGS.BOOKING_CREATE
3440
+ * @permissionScope Manage Bookings
3441
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
3442
+ * @permissionScope Manage Bookings - all permissions
3443
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
3444
+ * @applicableIdentity APP
3445
+ * @applicableIdentity VISITOR
3446
+ * @fqn com.wixpress.bookings.bookings.v2.Bookings.CreateBooking
3447
+ */
3448
+ export declare function createBooking(booking: Booking, options?: CreateBookingOptions): Promise<CreateBookingResponse & CreateBookingResponseNonNullableFields>;
3449
+ export interface CreateBookingOptions {
3450
+ /**
3451
+ * Information about whether to notify the customer and
3452
+ * the message to send.
3453
+ */
3454
+ participantNotification?: ParticipantNotification;
3455
+ /**
3456
+ * Whether to send an SMS reminder to the customer 24 hours before the
3457
+ * session starts. The phone number is taken from `contactDetails.phone`.
3458
+ * Default: `true`.
3459
+ */
3460
+ sendSmsReminder?: boolean | null;
3461
+ /**
3462
+ * Whether to ignore specific standard procedures of the Wix Bookings flow.
3463
+ * For example, whether to check availability when creating a booking.
3464
+ */
3465
+ flowControlSettings?: CreateBookingFlowControlSettings;
3466
+ }
3467
+ /**
3468
+ * Creates up to 8 bookings.
3469
+ *
3470
+ *
3471
+ * See Create Booking ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/bookings/create-booking) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/create-booking))
3472
+ * for more information.
3473
+ *
3474
+ * If any of the specified bookings is missing a required field the entire call
3475
+ * fails.
3476
+ *
3477
+ * If you specify 1 or more unavailable bookings, the call succeeds
3478
+ * while the unavailable bookings aren't created. Instead, they're counted as
3479
+ * failures in the returned `bulkActionMetadata`.
3480
+ * @param createBookingsInfo - Bookings to create.
3481
+ *
3482
+ * Max: 8 bookings
3483
+ * @public
3484
+ * @requiredField createBookingsInfo
3485
+ * @requiredField createBookingsInfo.booking
3486
+ * @requiredField createBookingsInfo.booking.additionalFields._id
3487
+ * @requiredField createBookingsInfo.booking.bookedEntity
3488
+ * @permissionId BOOKINGS.BOOKING_CREATE
3489
+ * @permissionScope Manage Bookings
3490
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
3491
+ * @permissionScope Manage Bookings - all permissions
3492
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
3493
+ * @applicableIdentity APP
3494
+ * @applicableIdentity VISITOR
3495
+ * @fqn com.wixpress.bookings.bookings.v2.Bookings.BulkCreateBooking
3496
+ */
3497
+ export declare function bulkCreateBooking(createBookingsInfo: CreateBookingInfo[], options?: BulkCreateBookingOptions): Promise<BulkCreateBookingResponse & BulkCreateBookingResponseNonNullableFields>;
3498
+ export interface BulkCreateBookingOptions {
3499
+ /** Whether to return the created bookings. */
3500
+ returnFullEntity?: boolean;
3501
+ }
3502
+ /**
3503
+ * Reschedules an appointment booking to a different slot or a class booking to
3504
+ * a different session.
3505
+ *
3506
+ *
3507
+ * ## Course booking limitation
3508
+ *
3509
+ * You can't reschedule course bookings.
3510
+ *
3511
+ * ## Appointment sessions
3512
+ *
3513
+ * For appointments, the old session is removed from the business calendar
3514
+ * while a new session is added. We recommend calling Query Availability
3515
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/availability-calendar/query-availability) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/time-slots/availability-calendar/query-availability))
3516
+ * first and specifying the entire retrieved `slot`.
3517
+ *
3518
+ * ## Class sessions
3519
+ *
3520
+ * For classes, the new session must be an existing session belonging to the
3521
+ * same class. We recommend retrieving `availabilityEntries.slot.eventId`
3522
+ * from Query Availability
3523
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/availability-calendar/query-availability) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/time-slots/availability-calendar/query-availability))
3524
+ * to avoid failed Reschedule Booking calls due to unavailability. Specify
3525
+ * only `slot.eventId` instead of the entire `slot` object.
3526
+ *
3527
+ * ## Notify customers
3528
+ *
3529
+ * You can specify a `participantNotification.message` for the customer. To send
3530
+ * the message, you must also specify `participantNotification.notifyParticipants`
3531
+ * as `true`.
3532
+ *
3533
+ * ## Admin overwrites
3534
+ *
3535
+ * There are small but important differences when you specify special
3536
+ * `flowControlSettings`:
3537
+ *
3538
+ * - `{"ignoreReschedulePolicy": true}`: The call succeeds even if the
3539
+ * service's `reschedulePolicy` doesn't allow it.
3540
+ * - `{"skipAvailabilityValidation": true}`: The call succeeds even if
3541
+ * the specified session, slot, or resource isn't available. If you don't
3542
+ * specify any resource, the call succeeds even if no resource of the relevant
3543
+ * type is available.
3544
+ * - `{"skipBusinessConfirmation": true}`: Any `PENDING` booking is
3545
+ * automatically confirmed even if the services requires the merchants's
3546
+ * manual confirmation.
3547
+ *
3548
+ * When using special `flowControlSettings`, ensure you have sufficient
3549
+ * permissions. If you encounter failed calls due to insufficient permissions,
3550
+ * consider the following options:
3551
+ *
3552
+ * - **App developers** can use a higher
3553
+ * [permission](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions),
3554
+ * such as `MANAGE BOOKINGS - ALL PERMISSIONS`.
3555
+ * - **Site developers** can utilize
3556
+ * [elevation](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/authorization/elevation).
3557
+ *
3558
+ * Granting additional permissions and using elevation permits method calls that
3559
+ * would typically fail due to authorization checks. Therefore, you should use
3560
+ * them intentionally and securely.
3561
+ * @param bookingId - ID of the booking to reschedule.
3562
+ * @param slot - New slot of the booking.
3563
+ * @public
3564
+ * @requiredField bookingId
3565
+ * @requiredField options.revision
3566
+ * @requiredField slot
3567
+ * @param options - An object representing the available options for rescheduling a booking.
3568
+ * @permissionId BOOKINGS.BOOKING_RESCHEDULE
3569
+ * @permissionScope Manage Bookings
3570
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
3571
+ * @permissionScope Manage Bookings - all permissions
3572
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
3573
+ * @applicableIdentity APP
3574
+ * @applicableIdentity MEMBER
3575
+ * @fqn com.wixpress.bookings.bookings.v2.Bookings.RescheduleBooking
3576
+ */
3577
+ export declare function rescheduleBooking(bookingId: string, slot: V2Slot, options?: RescheduleBookingOptions): Promise<RescheduleBookingResponse & RescheduleBookingResponseNonNullableFields>;
3578
+ export interface RescheduleBookingOptions extends RescheduleBookingRequestParticipantsInfoOneOf {
3579
+ /**
3580
+ * Revision number, which increments by 1 each time the booking is rescheduled.
3581
+ * To prevent conflicting changes, the current revision must be passed when
3582
+ * rescheduling the booking.
3583
+ */
3584
+ revision: string | null;
3585
+ /**
3586
+ * Information about whether to notify the customer about the rescheduling and
3587
+ * the message to send.
3588
+ */
3589
+ participantNotification?: ParticipantNotification;
3590
+ /**
3591
+ * Whether to ignore specific standard procedures of the Wix Bookings flow.
3592
+ * For example, whether to check availability when rescheduling a booking.
3593
+ */
3594
+ flowControlSettings?: RescheduleBookingFlowControlSettings;
3595
+ /**
3596
+ * Total number of participants. Specify when all participants have booked the
3597
+ * same service variant.
3598
+ */
3599
+ totalParticipants?: number;
3600
+ /**
3601
+ * Information about the service choices to book. Specify when not all
3602
+ * participants have booked the same service variant.
3603
+ */
3604
+ participantsChoices?: ParticipantChoices;
3605
+ }
3606
+ /**
3607
+ * Updates the booking status to `CONFIRMED` and updates the relevant session's
3608
+ * `participants.approvalStatus` to `APPROVED` without checking whether the relevant
3609
+ * slot or schedule is still available.
3610
+ *
3611
+ * ## eCommerce checkout restriction
3612
+ *
3613
+ * Call this method only when using a custom checkout page. Don't
3614
+ * call it when using a Wix eCommerce checkout
3615
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/orders/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction)).
3616
+ * In such cases, Wix automatically updates the booking status based on
3617
+ * the `paymentStatus` of the corresponding Wix eCommerce order
3618
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/introduction)).
3619
+ *
3620
+ * ## When to call Confirm Or Decline Booking instead
3621
+ *
3622
+ * Confirm Booking doesn't check whether a slot or schedule is still available. For
3623
+ * these checks you can call Confirm or Decline Booking
3624
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/bookings/confirm-or-decline-booking) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-or-decline-booking)).
3625
+ *
3626
+ * ## Original status validation
3627
+ *
3628
+ * You can only confirm bookings with a status of `PENDING`, `CREATED`, or
3629
+ * `WAITING_LIST`.
3630
+ *
3631
+ * ## Double bookings
3632
+ *
3633
+ * Confirm Booking doesn't check whether a slot or schedule is still available.
3634
+ * You can specify
3635
+ *
3636
+ * ```json
3637
+ * {
3638
+ * "flowControlSettings": {
3639
+ * "checkAvailabilityValidation": true
3640
+ * },
3641
+ * "doubleBooked": true
3642
+ * }
3643
+ * ```
3644
+ * to forcefully set the booking's `doubleBooked` flag to `true`, regardless of
3645
+ * a potential double booking conflict. You must call with `Manage Bookings`
3646
+ * permissions to do so. For the default flow control settings
3647
+ * `{"checkAvailabilityValidation": false}`, the specified `doubleBooked` value
3648
+ * is ignored.
3649
+ *
3650
+ * ## Payment status
3651
+ *
3652
+ * Also updates the booking's `paymentStatus`, if you specify a new payment
3653
+ * status.
3654
+ *
3655
+ * ## Notify customers
3656
+ *
3657
+ * You can specify a `participantNotification.message` for the customer. To send
3658
+ * the message, you must also specify `participantNotification.notifyParticipants`
3659
+ * as `true`.
3660
+ * @param bookingId - ID of the booking to confirm.
3661
+ * @param revision - Revision number, which increments by 1 each time the booking is updated.
3662
+ * To prevent conflicting changes, the current revision must be passed when
3663
+ * updating the booking.
3664
+ * @public
3665
+ * @requiredField bookingId
3666
+ * @requiredField revision
3667
+ * @param options - An object representing the available options for canceling a booking.
3668
+ * @permissionId BOOKINGS.BOOKING_CONFIRM
3669
+ * @permissionScope Manage Bookings
3670
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
3671
+ * @permissionScope Manage Bookings - all permissions
3672
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
3673
+ * @applicableIdentity APP
3674
+ * @fqn com.wixpress.bookings.bookings.v2.Bookings.ConfirmBooking
3675
+ */
3676
+ export declare function confirmBooking(bookingId: string, revision: string | null, options?: ConfirmBookingOptions): Promise<ConfirmBookingResponse & ConfirmBookingResponseNonNullableFields>;
3677
+ export interface ConfirmBookingOptions {
3678
+ /**
3679
+ * Information about whether to notify the customer about the confirmation and
3680
+ * the message to send.
3681
+ */
3682
+ participantNotification?: ParticipantNotification;
3683
+ /**
3684
+ * Whether to send an SMS reminder to the customer 24 hours before the
3685
+ * session starts. The phone number is taken from `contactDetails.phone`.
3686
+ */
3687
+ sendSmsReminder?: boolean | null;
3688
+ /** Payment status to set for the booking. */
3689
+ paymentStatus?: PaymentStatus;
3690
+ /** Whether this booking has a conflict with at least 1 other confirmed booking. */
3691
+ doubleBooked?: boolean | null;
3692
+ /**
3693
+ * Whether to ignore specific standard procedures of the Wix Bookings flow.
3694
+ * For example, whether to check availability when confirming a booking.
3695
+ */
3696
+ flowControlSettings?: ConfirmBookingFlowControlSettings;
3697
+ }
3698
+ /**
3699
+ * Updates the extended fields for a booking.
3700
+ *
3701
+ *
3702
+ * If you specify an extended field `namespace` that doesn't exist yet, it's
3703
+ * created.
3704
+ *
3705
+ * Learn more about [extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/about-backend-extensions#schema-plugin-extensions).
3706
+ * @public
3707
+ * @requiredField _id
3708
+ * @requiredField namespace
3709
+ * @requiredField options
3710
+ * @requiredField options.namespaceData
3711
+ * @param _id - ID of the booking for which to update extended fields.
3712
+ * @param namespace - [Namespace](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-reading-and-writing-schema-plugin-fields#namespaces) of the app for which to update extended fields.
3713
+ * @param options - Options for updating the booking's extended fields.
3714
+ * @permissionId BOOKINGS.BOOKING_UPDATE_EXTENDED_FIELDS
3715
+ * @permissionScope Manage Bookings
3716
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
3717
+ * @permissionScope Manage Bookings - all permissions
3718
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
3719
+ * @applicableIdentity APP
3720
+ * @fqn com.wixpress.bookings.bookings.v2.Bookings.UpdateExtendedFields
3721
+ */
3722
+ export declare function updateExtendedFields(_id: string, namespace: string, options: UpdateExtendedFieldsOptions): Promise<UpdateExtendedFieldsResponse & UpdateExtendedFieldsResponseNonNullableFields>;
3723
+ export interface UpdateExtendedFieldsOptions {
3724
+ /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */
3725
+ namespaceData: Record<string, any> | null;
3726
+ }
3727
+ /**
3728
+ * Updates the booking status to `DECLINED` and updates the relevant session's
3729
+ * `participants.approvalStatus` to `DECLINED` without checking whether the relevant
3730
+ * slot or schedule is still available.
3731
+ *
3732
+ *
3733
+ * ## eCommerce checkout restriction
3734
+ *
3735
+ * Call this method only when using a custom checkout page. Don't
3736
+ * call it when using a Wix eCommerce checkout
3737
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/orders/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction)).
3738
+ * In such cases, Wix automatically updates the booking status based on
3739
+ * the `paymentStatus` of the corresponding Wix eCommerce order
3740
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/introduction)).
3741
+ *
3742
+ * ## When to call Confirm Or Decline Booking instead
3743
+ *
3744
+ * The method doesn't check whether a slot or schedule is still available. For
3745
+ * these checks you can call Confirm or Decline Booking
3746
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/bookings/confirm-or-decline-booking) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-or-decline-booking)).
3747
+ *
3748
+ * ## Original status validation
3749
+ *
3750
+ * You can only decline bookings with a `status` of `PENDING`, `CREATED`, or
3751
+ * `WAITING_LIST`.
3752
+ *
3753
+ * ## Payment status
3754
+ *
3755
+ * Also updates the booking's `paymentStatus`, if you specify a new payment
3756
+ * status.
3757
+ *
3758
+ * ## Notify customers
3759
+ *
3760
+ * You can specify a `participantNotification.message` for the customer. To send
3761
+ * the message, you must also specify `participantNotification.notifyParticipants`
3762
+ * as `true`.
3763
+ * @param bookingId - ID of the booking to decline.
3764
+ * @param revision - Revision number, which increments by 1 each time the booking is updated.
3765
+ *
3766
+ * To prevent conflicting changes, the current revision must be specified when
3767
+ * declining the booking.
3768
+ * @public
3769
+ * @requiredField bookingId
3770
+ * @requiredField revision
3771
+ * @param options - An object representing the available options for declining a booking.
3772
+ * @permissionId BOOKINGS.BOOKING_DECLINE
3773
+ * @permissionScope Manage Bookings
3774
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
3775
+ * @permissionScope Manage Bookings - all permissions
3776
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
3777
+ * @applicableIdentity APP
3778
+ * @fqn com.wixpress.bookings.bookings.v2.Bookings.DeclineBooking
3779
+ */
3780
+ export declare function declineBooking(bookingId: string, revision: string | null, options?: DeclineBookingOptions): Promise<DeclineBookingResponse & DeclineBookingResponseNonNullableFields>;
3781
+ export interface DeclineBookingOptions {
3782
+ /**
3783
+ * Information about whether to notify the customer and
3784
+ * the message to send.
3785
+ */
3786
+ participantNotification?: ParticipantNotification;
3787
+ /** Payment status to set for the booking. */
3788
+ paymentStatus?: PaymentStatus;
3789
+ /** Whether this booking has a conflict with at least 1 other confirmed booking. */
3790
+ doubleBooked?: boolean | null;
3791
+ /**
3792
+ * Whether to ignore specific standard procedures of the Wix Bookings flow.
3793
+ * For example, whether to refund a declined booking.
3794
+ */
3795
+ flowControlSettings?: DeclineBookingFlowControlSettings;
3796
+ }
3797
+ /**
3798
+ * Updates the booking status to `CANCELED`.
3799
+ *
3800
+ *
3801
+ * ## Appointments
3802
+ *
3803
+ * For appointments, the corresponding event is removed from the Bookings
3804
+ * calendar.
3805
+ *
3806
+ * ## Class and course bookings
3807
+ *
3808
+ * For class or course bookings, the relevant participants are removed
3809
+ * from the class session or the course. However, the class session or course
3810
+ * remain on the business calendar.
3811
+ *
3812
+ * ## Notify customers
3813
+ *
3814
+ * You can specify a `participantNotification.message` for the customer. To send
3815
+ * the message, you must also specify `participantNotification.notifyParticipants`
3816
+ * as `true`.
3817
+ *
3818
+ * ## Admin overwrites
3819
+ *
3820
+ * There are small but important differences when you specify special
3821
+ * `flowControlSettings`:
3822
+ *
3823
+ * - `{"ignoreCancellationPolicy": true}`: The call succeeds even if the
3824
+ * service's `cancellationPolicy` doesn't allow it.
3825
+ * - `{"withRefund": true}`: The customer is refunded even if the service's
3826
+ * `refundPolicy` doesn't allow it.
3827
+ * - `{"waiveCancellationFee": true}`: The customer doesn't have to pay
3828
+ * the cancellation fee, even if the service's `cancellationPolicy` requires it.
3829
+ *
3830
+ * When using special `flowControlSettings`, ensure you have sufficient
3831
+ * permissions. If you encounter failed calls due to insufficient permissions,
3832
+ * consider the following options:
3833
+ *
3834
+ * - **App developers** can use a higher
3835
+ * [permission](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions),
3836
+ * such as `MANAGE BOOKINGS - ALL PERMISSIONS`.
3837
+ * - **Site developers** can utilize
3838
+ * [elevation](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/authorization/elevation).
3839
+ *
3840
+ * Granting additional permissions and using elevation permits method calls that
3841
+ * would typically fail due to authorization checks. Therefore, you should use
3842
+ * them intentionally and securely.
3843
+ * @param bookingId - ID of the booking to cancel.
3844
+ * @public
3845
+ * @requiredField bookingId
3846
+ * @requiredField options.revision
3847
+ * @param options - An object representing the available options for canceling a booking.
3848
+ * @permissionId BOOKINGS.BOOKING_CANCEL
3849
+ * @permissionScope Manage Bookings
3850
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
3851
+ * @permissionScope Manage Bookings - all permissions
3852
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
3853
+ * @applicableIdentity APP
3854
+ * @applicableIdentity MEMBER
3855
+ * @fqn com.wixpress.bookings.bookings.v2.Bookings.CancelBooking
3856
+ */
3857
+ export declare function cancelBooking(bookingId: string, options?: CancelBookingOptions): Promise<CancelBookingResponse & CancelBookingResponseNonNullableFields>;
3858
+ export interface CancelBookingOptions {
3859
+ /**
3860
+ * Information about whether to notify the customer about the cancellation and
3861
+ * the message to send.
3862
+ */
3863
+ participantNotification?: ParticipantNotification;
3864
+ /**
3865
+ * Whether to ignore specific standard procedures of the Wix Bookings flow.
3866
+ * For example, whether to allow a cancellation even though the service's
3867
+ * policy doesn't allow it.
3868
+ */
3869
+ flowControlSettings?: CancelBookingFlowControlSettings;
3870
+ /**
3871
+ * Revision number, which increments by 1 each time the booking is updated.
3872
+ *
3873
+ * To prevent conflicting changes, the current revision must be specified when
3874
+ * managing the booking.
3875
+ */
3876
+ revision: string | null;
3877
+ }
3878
+ /**
3879
+ * Updates the number of participants for a class or course booking and changes
3880
+ * the `totalNumberOfParticipants` for the relevant sessions.
3881
+ *
3882
+ *
3883
+ * ## Appointment limitation
3884
+ *
3885
+ * You can't update the number of participants for appointment bookings.
3886
+ *
3887
+ * ## Participant information
3888
+ *
3889
+ * You must specify either `participantsChoices` or `totalParticipants`.
3890
+ * The call fails if the specified `participantsChoices` aren't among the
3891
+ * supported service options and variants
3892
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)).
3893
+ * @param bookingId - ID of the booking to update the number of participants for.
3894
+ * @public
3895
+ * @requiredField bookingId
3896
+ * @requiredField options.revision
3897
+ * @permissionId BOOKINGS.NUMBER_OF_PARTICIPANTS_UPDATE
3898
+ * @permissionScope Manage Bookings
3899
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
3900
+ * @permissionScope Manage Bookings - all permissions
3901
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
3902
+ * @applicableIdentity APP
3903
+ * @fqn com.wixpress.bookings.bookings.v2.Bookings.UpdateNumberOfParticipants
3904
+ */
3905
+ export declare function updateNumberOfParticipants(bookingId: string, options?: UpdateNumberOfParticipantsOptions): Promise<UpdateNumberOfParticipantsResponse & UpdateNumberOfParticipantsResponseNonNullableFields>;
3906
+ export interface UpdateNumberOfParticipantsOptions extends UpdateNumberOfParticipantsRequestParticipantsInfoOneOf {
3907
+ /**
3908
+ * Revision number, which increments by 1 each time the booking is updated.
3909
+ *
3910
+ * To prevent conflicting changes, the current revision must be specified
3911
+ * when updating the booking.
3912
+ */
3913
+ revision: string | null;
3914
+ /**
3915
+ * Total number of participants. Specify when all participants have booked the
3916
+ * same service variant.
3917
+ */
3918
+ totalParticipants?: number;
3919
+ /**
3920
+ * Information about the service choices the participants have booked. Specify
3921
+ * when not all participants have booked the same service variant.
3922
+ */
3923
+ participantsChoices?: ParticipantChoices;
3924
+ }
3925
+ /**
3926
+ * Updates the booking `status` to `CONFIRMED`, `PENDING`, or `DECLINED` based
3927
+ * on the `paymentStatus` you provide, double booking conflicts, and whether
3928
+ * the service requires business approval.
3929
+ *
3930
+ * ## eCommerce checkout restriction
3931
+ *
3932
+ * Call this method only when using a custom checkout page. Don't
3933
+ * call it when using a Wix eCommerce checkout
3934
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/orders/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction)).
3935
+ * In such cases, Wix automatically updates the booking status based on
3936
+ * the `paymentStatus` of the corresponding Wix eCommerce order
3937
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/introduction)).
3938
+ *
3939
+ * ## New booking status
3940
+ *
3941
+ * The booking `status` is set to `DECLINED` if both of the following conditions
3942
+ * are met:
3943
+ * + You provide `UNDEFINED`, `NOT_PAID`, `REFUNDED`, or `EXEMPT` as payment status.
3944
+ * + There is a double booking conflict.
3945
+ *
3946
+ * If only one or none of these conditions is met, `status` is set to `PENDING`
3947
+ * or `CONFIRMED` depending on whether the service requires business approval.
3948
+ *
3949
+ * ## Double bookings
3950
+ *
3951
+ * If there is a double booking conflict, but the booking has already been at least
3952
+ * partially paid, the method still marks the booking as `PENDING` or `CONFIRMED`.
3953
+ * Then, it also sets `doubleBooked` to `true`.
3954
+ *
3955
+ * ## Admin overwrites
3956
+ *
3957
+ * There are small but important differences in confirmation behavior if the
3958
+ * booking was created with special `flowControlSettings`:
3959
+ * + If the booking's `flowControlSettings.skipAvailabilityValidation` was set to
3960
+ * `true`, the booking is never declined regardless of double booking conflicts.
3961
+ * Instead, it's marked `CONFIRMED` or `PENDING`, depending on whether the
3962
+ * service requires business approval.
3963
+ * + If the booking's `flowControlSettings.skipBusinessConfirmation` was set to
3964
+ * `true`, the booking skips `PENDING` status and is marked `CONFIRMED`
3965
+ * immediately.
3966
+ * @param bookingId - ID of the booking to confirm or decline.
3967
+ * @public
3968
+ * @requiredField bookingId
3969
+ * @permissionId BOOKINGS.BOOKING_CONFIRM_OR_DECLINE
3970
+ * @permissionScope Manage Bookings
3971
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
3972
+ * @permissionScope Manage Bookings - all permissions
3973
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
3974
+ * @applicableIdentity APP
3975
+ * @fqn com.wixpress.bookings.confirmator.v2.Confirmator.ConfirmOrDeclineBooking
3976
+ */
3977
+ export declare function confirmOrDeclineBooking(bookingId: string, options?: ConfirmOrDeclineBookingOptions): Promise<ConfirmOrDeclineBookingResponse & ConfirmOrDeclineBookingResponseNonNullableFields>;
3978
+ export interface ConfirmOrDeclineBookingOptions {
3979
+ /**
3980
+ * Current payment status of the booking when using a custom checkout page and
3981
+ * not the eCommerce checkout
3982
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction)).
3983
+ *
3984
+ * The booking is declined if there is a double booking conflict and you provide
3985
+ * one of these payment statuses: `UNDEFINED`, `NOT_PAID`, `REFUNDED`, or `EXEMPT`.
3986
+ */
3987
+ paymentStatus?: PaymentStatus;
3988
+ }
3989
+ /**
3990
+ * Confirms or declines up to 300 bookings.
3991
+ *
3992
+ *
3993
+ * See Confirm Or Decline Booking
3994
+ * ([SDK](https://dev.wix.com/docs/velo/api-reference/wix-bookings-v2/bookings/confirm-or-decline-booking) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-or-decline-booking))
3995
+ * for details about when a booking is confirmed or declined.
3996
+ * @param details - Bookings to confirm or decline.
3997
+ * @public
3998
+ * @documentationMaturity preview
3999
+ * @requiredField details
4000
+ * @requiredField details.bookingId
4001
+ * @permissionId BOOKINGS.BOOKING_CONFIRM_OR_DECLINE
4002
+ * @permissionScope Manage Bookings
4003
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
4004
+ * @permissionScope Manage Bookings - all permissions
4005
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
4006
+ * @applicableIdentity APP
4007
+ * @fqn com.wixpress.bookings.confirmator.v2.Confirmator.BulkConfirmOrDeclineBooking
4008
+ */
4009
+ export declare function bulkConfirmOrDeclineBooking(details: BulkConfirmOrDeclineBookingRequestBookingDetails[], options?: BulkConfirmOrDeclineBookingOptions): Promise<BulkConfirmOrDeclineBookingResponse & BulkConfirmOrDeclineBookingResponseNonNullableFields>;
4010
+ export interface BulkConfirmOrDeclineBookingOptions {
4011
+ /** Whether to return the confirmed or declined booking objects. */
4012
+ returnEntity?: boolean;
4013
+ }
4014
+ export {};