@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,2736 @@
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
+ entityAsJson?: string;
714
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
715
+ restoreInfo?: RestoreInfo;
716
+ }
717
+ export interface RestoreInfo {
718
+ deletedDate?: Date | null;
719
+ }
720
+ export interface EntityUpdatedEvent {
721
+ /**
722
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
723
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
724
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
725
+ */
726
+ currentEntityAsJson?: string;
727
+ }
728
+ export interface EntityDeletedEvent {
729
+ /** Entity that was deleted */
730
+ deletedEntityAsJson?: string | null;
731
+ }
732
+ export interface ActionEvent {
733
+ bodyAsJson?: string;
734
+ }
735
+ export interface MessageEnvelope {
736
+ /** App instance ID. */
737
+ instanceId?: string | null;
738
+ /** Event type. */
739
+ eventType?: string;
740
+ /** The identification type and identity data. */
741
+ identity?: WebhooksIdentificationData;
742
+ /** Stringify payload. */
743
+ data?: string;
744
+ }
745
+ export interface WebhooksIdentificationData extends WebhooksIdentificationDataIdOneOf {
746
+ /** ID of a site visitor that has not logged in to the site. */
747
+ anonymousVisitorId?: string;
748
+ /** ID of a site visitor that has logged in to the site. */
749
+ memberId?: string;
750
+ /** ID of a Wix user (site owner, contributor, etc.). */
751
+ wixUserId?: string;
752
+ /** ID of an app. */
753
+ appId?: string;
754
+ /** @readonly */
755
+ identityType?: WebhookIdentityType;
756
+ }
757
+ /** @oneof */
758
+ export interface WebhooksIdentificationDataIdOneOf {
759
+ /** ID of a site visitor that has not logged in to the site. */
760
+ anonymousVisitorId?: string;
761
+ /** ID of a site visitor that has logged in to the site. */
762
+ memberId?: string;
763
+ /** ID of a Wix user (site owner, contributor, etc.). */
764
+ wixUserId?: string;
765
+ /** ID of an app. */
766
+ appId?: string;
767
+ }
768
+ export declare enum WebhookIdentityType {
769
+ UNKNOWN = "UNKNOWN",
770
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
771
+ MEMBER = "MEMBER",
772
+ WIX_USER = "WIX_USER",
773
+ APP = "APP"
774
+ }
775
+ export interface CreateMultiServiceBookingRequest {
776
+ /** Single-service bookings to combine in a multi-service booking. */
777
+ bookings: Booking[];
778
+ /**
779
+ * Information about whether to notify the customer and
780
+ * the message to send.
781
+ */
782
+ participantNotification?: ParticipantNotification;
783
+ /**
784
+ * Whether to send an SMS reminder to the customer 24 hours before the
785
+ * session starts. The phone number is taken from `contactDetails.phone`.
786
+ *
787
+ * Default: `true`
788
+ */
789
+ sendSmsReminder?: boolean | null;
790
+ /**
791
+ * Whether to ignore specific standard procedures of the Wix Bookings flow.
792
+ * For example, whether to check availability before updating the status.
793
+ */
794
+ flowControlSettings?: CreateBookingFlowControlSettings;
795
+ /** Whether to return the created single-service bookings. */
796
+ returnFullEntity?: boolean;
797
+ /** Multi service booking type. */
798
+ multiServiceBookingType?: MultiServiceBookingType;
799
+ }
800
+ export interface CreateBookingFlowControlSettings {
801
+ /**
802
+ * Whether the availability is checked before creating the booking.
803
+ *
804
+ * When passing `false`, a booking is only created when the slot or schedule is available.
805
+ * Default: `false`.
806
+ */
807
+ skipAvailabilityValidation?: boolean;
808
+ /**
809
+ * Whether `PENDING` bookings are automatically set to `CONFIRMED` for
810
+ * services that normally require the owner's manual confirmation.
811
+ *
812
+ * Your app must have the `BOOKINGS.OVERRIDE_AVAILABILITY` permission scope
813
+ * when passing `true`.
814
+ * Default: `false`.
815
+ */
816
+ skipBusinessConfirmation?: boolean;
817
+ /**
818
+ * Whether customers can pay using a payment method that isn't supported
819
+ * for the service, but that's supported for other services.
820
+ *
821
+ * Your app must have the `BOOKINGS.MANAGE_PAYMENTS` permission scope when passing
822
+ * `true`.
823
+ * Default: `false`.
824
+ */
825
+ skipSelectedPaymentOptionValidation?: boolean;
826
+ }
827
+ export interface CreateMultiServiceBookingResponse {
828
+ /**
829
+ * Created multi service booking.
830
+ * Contains the booking results in the same order as specified in the request.
831
+ */
832
+ multiServiceBooking?: MultiServiceBooking;
833
+ }
834
+ export interface MultiServiceBooking {
835
+ /** Multi-service booking ID. */
836
+ id?: string | null;
837
+ /** The created bookings that are part of the multi-service booking. */
838
+ bookings?: BookingResult[];
839
+ }
840
+ export interface BookingResult {
841
+ /** Booking ID. */
842
+ bookingId?: string | null;
843
+ /** Booking entity. */
844
+ booking?: Booking;
845
+ }
846
+ export interface RescheduleMultiServiceBookingRequest {
847
+ /** ID of the multi service booking to reschedule. */
848
+ multiServiceBookingId: string | null;
849
+ /** Information about the single-service bookings to reschedule. */
850
+ rescheduleBookingsInfo: RescheduleBookingInfo[];
851
+ /**
852
+ * Information about whether to notify the customer and
853
+ * the message to send.
854
+ */
855
+ participantNotification?: ParticipantNotification;
856
+ /**
857
+ * Information about whether specific procedures of the standard Wix Bookings
858
+ * rescheduling flow are changed. For example, whether the availability of
859
+ * the new slot is checked before rescheduling the booking or if you can
860
+ * reschedule the booking even though the rescheduling policy doesn't allow it.
861
+ */
862
+ flowControlSettings?: RescheduleBookingFlowControlSettings;
863
+ /** Whether to return the rescheduled bookings entities. */
864
+ returnFullEntity?: boolean;
865
+ }
866
+ export interface V2Slot {
867
+ /** Identifier for the underlying session when the session is a single session or generated from a recurring session. */
868
+ sessionId?: string | null;
869
+ /** Service identifier. Required. */
870
+ serviceId?: string;
871
+ /** Schedule identifier. Required. */
872
+ scheduleId?: string;
873
+ /** The start time of this slot (formatted according to RFC3339). */
874
+ startDate?: string | null;
875
+ /** The end time of this slot (formatted according to RFC3339). */
876
+ endDate?: string | null;
877
+ /** The timezone according to which the slot is calculated and presented. */
878
+ timezone?: string | null;
879
+ /**
880
+ * The resource required for this slot.
881
+ * When populated, the specified resource will be assigned to the slot upon confirmation according to its availability.
882
+ * When empty, if `skip_availability_validation` is `false`, a random available resource will be assigned to the slot upon confirmation.
883
+ * Otherwise, one of the service resources will be assigned to the slot randomly upon confirmation.
884
+ */
885
+ resource?: SlotSlotResource;
886
+ /** Geographic location of the slot. */
887
+ location?: SlotLocation;
888
+ /**
889
+ * Calendar event ID - not supported.
890
+ * If not empty, on all write flows (create/update), it takes priority over `sessionId`.
891
+ * So if both `sessionId` and `eventId` are provided, the `sessionId` will be based on the `eventId`.
892
+ * Otherwise, if `eventId` is empty on write flow,
893
+ */
894
+ eventId?: string | null;
895
+ }
896
+ export declare enum LocationLocationType {
897
+ /** Undefined location type. */
898
+ UNDEFINED = "UNDEFINED",
899
+ /** The business address as set in the site’s general settings. */
900
+ OWNER_BUSINESS = "OWNER_BUSINESS",
901
+ /** The address set when creating the service. */
902
+ OWNER_CUSTOM = "OWNER_CUSTOM",
903
+ /** The address set for the individual session. */
904
+ CUSTOM = "CUSTOM"
905
+ }
906
+ export interface SlotSlotResource {
907
+ /**
908
+ * Resource ID.
909
+ * @readonly
910
+ */
911
+ id?: string | null;
912
+ /** Resource name. */
913
+ name?: string | null;
914
+ }
915
+ export interface SlotLocation {
916
+ /** Business Location ID. Present if the location is a business location. */
917
+ id?: string | null;
918
+ /** Location name. */
919
+ name?: string | null;
920
+ /** A string containing the full address of this location. */
921
+ formattedAddress?: string | null;
922
+ /** Location type. */
923
+ locationType?: LocationLocationType;
924
+ }
925
+ export interface RescheduleBookingInfo extends RescheduleBookingInfoParticipantsInfoOneOf {
926
+ /**
927
+ * Total number of participants. Available only for services with variants.
928
+ * Specify when all participants book the same variant.
929
+ */
930
+ totalParticipants?: number;
931
+ /**
932
+ * Information about the service choices to book. Available only for services with
933
+ * variants.
934
+ * Specify when not all participants book the same variant.
935
+ */
936
+ participantsChoices?: ParticipantChoices;
937
+ /** ID of the booking to reschedule. */
938
+ bookingId?: string | null;
939
+ /** Information about the new slot. */
940
+ slot?: V2Slot;
941
+ /**
942
+ * Revision number, which increments by 1 each time the booking is updated.
943
+ * To prevent conflicting changes, the current revision must be specified when
944
+ * managing the booking.
945
+ */
946
+ revision?: string | null;
947
+ }
948
+ /** @oneof */
949
+ export interface RescheduleBookingInfoParticipantsInfoOneOf {
950
+ /**
951
+ * Total number of participants. Available only for services with variants.
952
+ * Specify when all participants book the same variant.
953
+ */
954
+ totalParticipants?: number;
955
+ /**
956
+ * Information about the service choices to book. Available only for services with
957
+ * variants.
958
+ * Specify when not all participants book the same variant.
959
+ */
960
+ participantsChoices?: ParticipantChoices;
961
+ }
962
+ export interface RescheduleBookingFlowControlSettings {
963
+ /**
964
+ * Whether the rescheduling policy applies when rescheduling the booking.
965
+ *
966
+ * When passing `false`, you can only cancel a booking if the rescheduling
967
+ * policy allows it.
968
+ * Default: `false`.
969
+ */
970
+ ignoreReschedulePolicy?: boolean;
971
+ /**
972
+ * Whether the availability is checked before rescheduling the booking.
973
+ *
974
+ * When passing `false`, a booking is only created when the slot or
975
+ * schedule is available.
976
+ * Default: `false`.
977
+ */
978
+ skipAvailabilityValidation?: boolean;
979
+ /**
980
+ * Whether the rescheduled booking's status is automatically set to
981
+ * `CONFIRMED` for services that normally require the owner's manual
982
+ * confirmation.
983
+ * Default: `false`.
984
+ */
985
+ skipBusinessConfirmation?: boolean;
986
+ }
987
+ export interface RescheduleMultiServiceBookingResponse {
988
+ /** Rescheduled multi-service booking. */
989
+ multiServiceBooking?: MultiServiceBooking;
990
+ }
991
+ export interface BookingRescheduled extends BookingRescheduledPreviousParticipantsInfoOneOf {
992
+ /**
993
+ * The previous total number of participants. Available only when the booking includes
994
+ * a single service variant.
995
+ */
996
+ previousTotalParticipants?: number;
997
+ /**
998
+ * Information about the previous booked service choices and participants.
999
+ * Available only when the booking includes multiple service variants.
1000
+ */
1001
+ previousParticipantsChoices?: ParticipantChoices;
1002
+ /** The rescheduled booking object. */
1003
+ booking?: Booking;
1004
+ /** Information about whether to notify the customer about the rescheduling and the message to send. */
1005
+ participantNotification?: ParticipantNotification;
1006
+ /**
1007
+ * Information about whether specific procedures of the standard Wix Bookings
1008
+ * rescheduling flow are changed. For example, whether the availability of
1009
+ * the new slot is checked before rescheduling the booking or if you can
1010
+ * reschedule the booking even though the rescheduling policy doesn't allow it.
1011
+ */
1012
+ flowControlSettings?: RescheduleBookingFlowControlSettings;
1013
+ /** ID of the rescheduling initiator. */
1014
+ initiatedBy?: IdentificationData;
1015
+ /** The previous status of the booking. */
1016
+ previousStatus?: BookingStatus;
1017
+ /** An object describing the previous slot or schedule of the booking. */
1018
+ previousBookedEntity?: BookedEntity;
1019
+ /**
1020
+ * The previous start date of the booking.
1021
+ * For a slot, this is the start date of the slot.
1022
+ * For a schedule, this is the start date of the first session.
1023
+ */
1024
+ previousStartDate?: Date | null;
1025
+ /**
1026
+ * The previous end date of the booking.
1027
+ * For a slot, this is the end date of the slot.
1028
+ * For a schedule, this is the end date of the last session.
1029
+ */
1030
+ previousEndDate?: Date | null;
1031
+ }
1032
+ /** @oneof */
1033
+ export interface BookingRescheduledPreviousParticipantsInfoOneOf {
1034
+ /**
1035
+ * The previous total number of participants. Available only when the booking includes
1036
+ * a single service variant.
1037
+ */
1038
+ previousTotalParticipants?: number;
1039
+ /**
1040
+ * Information about the previous booked service choices and participants.
1041
+ * Available only when the booking includes multiple service variants.
1042
+ */
1043
+ previousParticipantsChoices?: ParticipantChoices;
1044
+ }
1045
+ export interface IdentificationData extends IdentificationDataIdOneOf {
1046
+ /** ID of a site visitor that has not logged in to the site. */
1047
+ anonymousVisitorId?: string;
1048
+ /** ID of a site visitor that has logged in to the site. */
1049
+ memberId?: string;
1050
+ /** ID of a Wix user (site owner, contributor, etc.). */
1051
+ wixUserId?: string;
1052
+ /** ID of an app. */
1053
+ appId?: string;
1054
+ /**
1055
+ * ID of of a contact in the site's [CRM by Ascend](https://www.wix.com/ascend/crm) system.
1056
+ * @readonly
1057
+ */
1058
+ contactId?: string | null;
1059
+ }
1060
+ /** @oneof */
1061
+ export interface IdentificationDataIdOneOf {
1062
+ /** ID of a site visitor that has not logged in to the site. */
1063
+ anonymousVisitorId?: string;
1064
+ /** ID of a site visitor that has logged in to the site. */
1065
+ memberId?: string;
1066
+ /** ID of a Wix user (site owner, contributor, etc.). */
1067
+ wixUserId?: string;
1068
+ /** ID of an app. */
1069
+ appId?: string;
1070
+ }
1071
+ export declare enum IdentityType {
1072
+ UNKNOWN = "UNKNOWN",
1073
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1074
+ MEMBER = "MEMBER",
1075
+ WIX_USER = "WIX_USER",
1076
+ APP = "APP"
1077
+ }
1078
+ export interface GetMultiServiceBookingAvailabilityRequest {
1079
+ /** ID of the multi-service booking to retrieve. */
1080
+ multiServiceBookingId: string | null;
1081
+ }
1082
+ export interface GetMultiServiceBookingAvailabilityResponse {
1083
+ /** Whether all contained single-service bookings are bookable. */
1084
+ bookable?: boolean;
1085
+ /** Total number of spots. */
1086
+ totalCapacity?: number | null;
1087
+ /** Number of open spots. */
1088
+ remainingCapacity?: number | null;
1089
+ /** Indicators for policy violations of the multi service booking. */
1090
+ policyViolations?: BookingPolicyViolations;
1091
+ /** Multi-service booking policy settings. */
1092
+ policySettings?: BookingPolicySettings;
1093
+ /** Info of the bookings this availability was calculated for. */
1094
+ multiServiceBookingInfo?: GetMultiServiceBookingAvailabilityResponseBookingInfo[];
1095
+ }
1096
+ export interface BookingPolicyViolations {
1097
+ /** Booking policy violation: Too early to book this slot. */
1098
+ tooEarlyToBook?: boolean | null;
1099
+ /** Booking policy violation: Too late to book this slot. */
1100
+ tooLateToBook?: boolean | null;
1101
+ /** Booking policy violation: Online booking is disabled for this slot. */
1102
+ bookOnlineDisabled?: boolean | null;
1103
+ }
1104
+ export interface BookingPolicySettings {
1105
+ /** Booking policy settings for a given slot or schedule. */
1106
+ maxParticipantsPerBooking?: number | null;
1107
+ }
1108
+ export interface GetMultiServiceBookingAvailabilityResponseBookingInfo {
1109
+ /** Booking ID. */
1110
+ bookingId?: string | null;
1111
+ }
1112
+ export interface CancelMultiServiceBookingRequest {
1113
+ /** ID of the multi-service booking to cancel. */
1114
+ multiServiceBookingId: string | null;
1115
+ /**
1116
+ * Information about whether to notify the customer and
1117
+ * the message to send.
1118
+ */
1119
+ participantNotification?: ParticipantNotification;
1120
+ /**
1121
+ * Information about whether specific procedures of the standard Wix Bookings
1122
+ * cancellation flow are changed. For example, whether you can cancel
1123
+ * a booking even though the cancellation policy doesn't allow it or whether
1124
+ * to issue a refund.
1125
+ */
1126
+ flowControlSettings?: CancelBookingFlowControlSettings;
1127
+ /** Whether to return the canceled single-service bookings. */
1128
+ returnFullEntity?: boolean;
1129
+ }
1130
+ export interface CancelBookingFlowControlSettings {
1131
+ /**
1132
+ * Whether the cancellation policy applies when canceling the booking.
1133
+ *
1134
+ * When passing `false`, you can only cancel a booking if the cancellation policy allows it.
1135
+ * Default: `false`.
1136
+ */
1137
+ ignoreCancellationPolicy?: boolean | null;
1138
+ /**
1139
+ * Whether to issue a refund when canceling the booking.
1140
+ *
1141
+ * The refund will be issued only if the booking is refundable.
1142
+ * Currently, a booking is considered refundable when it was paid by membership.
1143
+ * If you specify `true`, the booking flow control settings is set to include a refund.
1144
+ * If `false` is specified or the field remains empty,
1145
+ * the booking flow control settings are set without refund.
1146
+ *
1147
+ * Default: `false`.
1148
+ */
1149
+ withRefund?: boolean | null;
1150
+ }
1151
+ export interface CancelMultiServiceBookingResponse {
1152
+ /** Canceled multi-service booking. */
1153
+ multiServiceBooking?: MultiServiceBooking;
1154
+ }
1155
+ export interface BookingCanceled {
1156
+ /** The canceled booking object. */
1157
+ booking?: Booking;
1158
+ /** Information about whether to notify the customer about the cancellation and the message to send. */
1159
+ participantNotification?: ParticipantNotification;
1160
+ /**
1161
+ * Information about whether specific procedures of the standard Wix Bookings
1162
+ * cancellation flow are changed. For example, whether you can cancel
1163
+ * a booking even though the cancellation policy doesn't allow it or whether
1164
+ * to issue a refund.
1165
+ */
1166
+ flowControlSettings?: CancelBookingFlowControlSettings;
1167
+ /** ID of the cancellation initiator. */
1168
+ initiatedBy?: IdentificationData;
1169
+ /** The previous status of the booking. */
1170
+ previousStatus?: BookingStatus;
1171
+ }
1172
+ export interface MarkMultiServiceBookingAsPendingRequest {
1173
+ /** ID of the multi-service booking to mark as `PENDING`. */
1174
+ multiServiceBookingId: string | null;
1175
+ /** Information about the single-service bookings to mark as `PENDING`. */
1176
+ markAsPendingBookingsInfo?: BookingInfo[];
1177
+ /**
1178
+ * Information about whether to notify the customer and
1179
+ * the message to send.
1180
+ */
1181
+ participantNotification?: ParticipantNotification;
1182
+ /**
1183
+ * Whether to send an SMS reminder to the customer 24 hours before the
1184
+ * session starts. The phone number is taken from `contactDetails.phone`.
1185
+ *
1186
+ * Default: `true`
1187
+ */
1188
+ sendSmsReminder?: boolean | null;
1189
+ /** Whether this booking has a conflict with at least 1 other confirmed booking. */
1190
+ doubleBooked?: boolean | null;
1191
+ /** Whether to return the single-service bookings that were marked as `PENDING`. */
1192
+ returnFullEntity?: boolean;
1193
+ /**
1194
+ * Information about whether specific procedures of the standard Wix Bookings
1195
+ * creation flow are changed. For example, whether the availability is checked
1196
+ * before updating the booking.
1197
+ */
1198
+ flowControlSettings?: MarkBookingAsPendingFlowControlSettings;
1199
+ }
1200
+ export interface BookingInfo {
1201
+ /** ID of the single-service booking. */
1202
+ bookingId?: string | null;
1203
+ /**
1204
+ * Revision number, which increments by 1 each time the booking is updated.
1205
+ * To prevent conflicting changes, the current revision must be specified when
1206
+ * managing the booking.
1207
+ */
1208
+ revision?: string | null;
1209
+ /** Payment status to set for the single-service booking. */
1210
+ paymentStatus?: PaymentStatus;
1211
+ }
1212
+ export interface MarkBookingAsPendingFlowControlSettings {
1213
+ /**
1214
+ * Whether to check for double bookings before updating the booking as pending.
1215
+ *
1216
+ * When passing `false`, a booking is only updated with status `PENDING`.
1217
+ * Default: `false`.
1218
+ */
1219
+ checkAvailabilityValidation?: boolean;
1220
+ /**
1221
+ * Whether to validate that the booking to be marked as pending has a `booking.slot.serviceId`
1222
+ * of a pending approval service.
1223
+ *
1224
+ * Default: `false`.
1225
+ */
1226
+ skipPendingApprovalServiceValidation?: boolean;
1227
+ }
1228
+ export interface MarkMultiServiceBookingAsPendingResponse {
1229
+ /** Updated multi-service booking. */
1230
+ multiServiceBooking?: MultiServiceBooking;
1231
+ }
1232
+ export interface ConfirmMultiServiceBookingRequest {
1233
+ /** ID of the multi-service booking to confirm its related bookings. */
1234
+ multiServiceBookingId: string | null;
1235
+ /** Information about the single-service bookings to confirm. */
1236
+ confirmBookingsInfo?: BookingInfo[];
1237
+ /**
1238
+ * Information about whether to notify the customer and
1239
+ * the message to send.
1240
+ */
1241
+ participantNotification?: ParticipantNotification;
1242
+ /**
1243
+ * Whether to send an SMS reminder to the customer 24 hours before the
1244
+ * session starts. The phone number is taken from `contactDetails.phone`.
1245
+ *
1246
+ * Default: `true`
1247
+ */
1248
+ sendSmsReminder?: boolean | null;
1249
+ /** Whether this booking has a conflict with at least 1 other confirmed booking. */
1250
+ doubleBooked?: boolean | null;
1251
+ /** Whether to return the confirmed single-service bookings. */
1252
+ returnFullEntity?: boolean;
1253
+ /**
1254
+ * Information about whether specific procedures of the standard Wix Bookings
1255
+ * confirmation flow are changed. For example, whether the availability is
1256
+ * checked before confirming the booking.
1257
+ */
1258
+ flowControlSettings?: ConfirmBookingFlowControlSettings;
1259
+ }
1260
+ export interface ConfirmBookingFlowControlSettings {
1261
+ /**
1262
+ * Whether the availability is checked before confirming the booking.
1263
+ *
1264
+ * When specifying `false`, a booking is only updated with status `CONFIRMED`.
1265
+ * Default: `false`.
1266
+ */
1267
+ checkAvailabilityValidation?: boolean;
1268
+ }
1269
+ export interface ConfirmMultiServiceBookingResponse {
1270
+ /** Confirmed multi service booking. */
1271
+ multiServiceBooking?: MultiServiceBooking;
1272
+ }
1273
+ export interface BookingConfirmed {
1274
+ /** The confirmed booking object. */
1275
+ booking?: Booking;
1276
+ /** Information about whether to notify the customer about the confirmation and the message to send. */
1277
+ participantNotification?: ParticipantNotification;
1278
+ /**
1279
+ * Whether to send an SMS reminder to the customer 24 hours before the session starts.
1280
+ * The phone number is taken from `contactDetails.phone`.
1281
+ */
1282
+ sendSmsReminder?: boolean | null;
1283
+ /** Whether this booking overlaps with another existing confirmed booking. */
1284
+ doubleBooked?: boolean | null;
1285
+ /** ID of the confirmation initiator. */
1286
+ initiatedBy?: IdentificationData;
1287
+ /** The previous status of the booking. */
1288
+ previousStatus?: BookingStatus;
1289
+ /** The previous payment status of the booking. */
1290
+ previousPaymentStatus?: PaymentStatus;
1291
+ }
1292
+ export interface DeclineMultiServiceBookingRequest {
1293
+ /** ID of the multi service booking to decline. */
1294
+ multiServiceBookingId: string | null;
1295
+ /** Information about the single-service bookings to decline. */
1296
+ declineBookingsInfo?: BookingInfo[];
1297
+ /**
1298
+ * Information about whether to notify the customer and
1299
+ * the message to send.
1300
+ */
1301
+ participantNotification?: ParticipantNotification;
1302
+ /** Whether this booking has a conflict with at least 1 other confirmed booking. */
1303
+ doubleBooked?: boolean | null;
1304
+ /** Whether to return the declined single-service bookings. */
1305
+ returnFullEntity?: boolean;
1306
+ /**
1307
+ * Information about whether specific procedures of the standard Wix Bookings
1308
+ * declining flow are changed. For example, whether to issue a refund.
1309
+ */
1310
+ flowControlSettings?: DeclineBookingFlowControlSettings;
1311
+ }
1312
+ export interface DeclineBookingFlowControlSettings {
1313
+ /**
1314
+ * Whether to issue a refund when declining the booking.
1315
+ *
1316
+ * The refund will be issued only if the booking is refundable.
1317
+ * Currently, a booking is considered refundable when it was paid by membership.
1318
+ * If specifying `true`, the booking flow control settings will be set with a refund.
1319
+ * If you specify `false` or an empty field,
1320
+ * the booking flow control settings are set without refund.
1321
+ *
1322
+ * Default: `false`.
1323
+ */
1324
+ withRefund?: boolean | null;
1325
+ }
1326
+ export interface DeclineMultiServiceBookingResponse {
1327
+ /** Declined multi-service booking. */
1328
+ multiServiceBooking?: MultiServiceBooking;
1329
+ }
1330
+ export interface BookingDeclined {
1331
+ /** The declined booking object. */
1332
+ booking?: Booking;
1333
+ /** Information about whether to notify the customer about the decline and the message to send. */
1334
+ participantNotification?: ParticipantNotification;
1335
+ /** Whether this booking overlaps with another existing confirmed booking. */
1336
+ doubleBooked?: boolean | null;
1337
+ /** ID of the decline initiator. */
1338
+ initiatedBy?: IdentificationData;
1339
+ /** The previous status of the booking. */
1340
+ previousStatus?: BookingStatus;
1341
+ /** The previous payment status of the booking. */
1342
+ previousPaymentStatus?: PaymentStatus;
1343
+ /**
1344
+ * Information about whether specific procedures of the standard Wix Bookings
1345
+ * declining flow are changed. For example, whether to issue a refund.
1346
+ */
1347
+ flowControlSettings?: DeclineBookingFlowControlSettings;
1348
+ }
1349
+ export interface BulkGetMultiServiceBookingAllowedActionsRequest {
1350
+ /** IDs of the multi-service bookings to retrieve allowed actions for. */
1351
+ multiServiceBookingIds: string[] | null;
1352
+ }
1353
+ export interface BulkGetMultiServiceBookingAllowedActionsResponse {
1354
+ /**
1355
+ * Information about the multi-service bookings that were retrieved.
1356
+ * Including their ID, index in the bulk request and whether they were
1357
+ * successfully updated.
1358
+ */
1359
+ results?: BulkCalculateAllowedActionsResult[];
1360
+ /** Total number of successes and failures for Bulk Update Bookings. */
1361
+ bulkActionMetadata?: BulkActionMetadata;
1362
+ }
1363
+ export interface BulkCalculateAllowedActionsResult {
1364
+ /** Metadata for the booking. Including ID, index in the provided sequence, success status, and error. */
1365
+ itemMetadata?: ItemMetadata;
1366
+ /** Booking entity. */
1367
+ item?: AllowedActions;
1368
+ }
1369
+ export interface ItemMetadata {
1370
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
1371
+ id?: string | null;
1372
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
1373
+ originalIndex?: number;
1374
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
1375
+ success?: boolean;
1376
+ /** Details about the error in case of failure. */
1377
+ error?: ApplicationError;
1378
+ }
1379
+ export interface ApplicationError {
1380
+ /** Error code. */
1381
+ code?: string;
1382
+ /** Description of the error. */
1383
+ description?: string;
1384
+ /** Data related to the error. */
1385
+ data?: Record<string, any> | null;
1386
+ }
1387
+ /** Possible actions allowed for the booking. */
1388
+ export interface AllowedActions {
1389
+ /** Whether canceling the booking is allowed. */
1390
+ cancel?: boolean;
1391
+ /** Whether rescheduling the booking is allowed. */
1392
+ reschedule?: boolean;
1393
+ }
1394
+ export interface BulkActionMetadata {
1395
+ /** Number of items that were successfully processed. */
1396
+ totalSuccesses?: number;
1397
+ /** Number of items that couldn't be processed. */
1398
+ totalFailures?: number;
1399
+ /** Number of failures without details because detailed failure threshold was exceeded. */
1400
+ undetailedFailures?: number;
1401
+ }
1402
+ export interface GetMultiServiceBookingRequest {
1403
+ /** ID of the multi-service booking. */
1404
+ multiServiceBookingId: string | null;
1405
+ }
1406
+ export interface GetMultiServiceBookingResponse {
1407
+ /** Retrieved multi-service booking. */
1408
+ multiServiceBooking?: MultiServiceBooking;
1409
+ /** Details about how many single-service bookings belong to the multi-service booking. */
1410
+ metadata?: MultiServiceBookingMetadata;
1411
+ }
1412
+ export interface MultiServiceBookingMetadata {
1413
+ /**
1414
+ * Total number of `CONFIRMED` and `PENDING` single-service bookings belonging
1415
+ * to the multi-service booking. The total includes the number of single-service
1416
+ * bookings which couldn't be retrieved due to lack of permissions.
1417
+ */
1418
+ totalNumberOfScheduledBookings?: number | null;
1419
+ }
1420
+ export interface AddBookingsToMultiServiceBookingRequest {
1421
+ /** ID of the multi-service booking. */
1422
+ multiServiceBookingId: string | null;
1423
+ /** List of single-service booking IDs and their revision. */
1424
+ bookings: BookingIdAndRevision[];
1425
+ /** Whether to return the single-service bookings that were added to the multi-service booking. */
1426
+ returnFullEntity?: boolean;
1427
+ }
1428
+ export interface BookingIdAndRevision {
1429
+ /** ID of the booking. */
1430
+ bookingId?: string | null;
1431
+ /**
1432
+ * Revision number, which increments by 1 each time the booking is updated.
1433
+ * To prevent conflicting changes, the current revision must be specified when
1434
+ * managing the booking.
1435
+ */
1436
+ revision?: string | null;
1437
+ }
1438
+ export interface AddBookingsToMultiServiceBookingResponse {
1439
+ /** Single-service bookings that were added to the multi-service booking. */
1440
+ bookings?: BookingResult[];
1441
+ }
1442
+ export interface RemoveBookingsFromMultiServiceBookingRequest {
1443
+ /** ID of the multi-service booking. */
1444
+ multiServiceBookingId: string | null;
1445
+ /** List of single-service booking IDs and their revision. */
1446
+ bookings?: BookingIdAndRevision[];
1447
+ /** Whether to return the single-service bookings. */
1448
+ returnFullEntity?: boolean;
1449
+ }
1450
+ export interface RemoveBookingsFromMultiServiceBookingResponse {
1451
+ /** Single-service bookings that were removed from the multi-service booking. */
1452
+ bookings?: BookingResult[];
1453
+ }
1454
+ export interface BookingChanged {
1455
+ /** The booking before the changes. */
1456
+ previousBooking?: Booking;
1457
+ /** The booking after the changes. */
1458
+ currentBooking?: Booking;
1459
+ }
1460
+ export interface CreateBookingRequest {
1461
+ /** The booking to create. */
1462
+ booking: Booking;
1463
+ /**
1464
+ * Information about whether to notify the customer and
1465
+ * the message to send.
1466
+ */
1467
+ participantNotification?: ParticipantNotification;
1468
+ /**
1469
+ * Whether to send an SMS reminder to the customer 24 hours before the
1470
+ * session starts. The phone number is taken from `contactDetails.phone`.
1471
+ * Default: `true`.
1472
+ */
1473
+ sendSmsReminder?: boolean | null;
1474
+ /**
1475
+ * Whether to ignore specific standard procedures of the Wix Bookings flow.
1476
+ * For example, whether to check availability when creating a booking.
1477
+ */
1478
+ flowControlSettings?: CreateBookingFlowControlSettings;
1479
+ }
1480
+ export interface CreateBookingResponse {
1481
+ /** Created booking. */
1482
+ booking?: Booking;
1483
+ }
1484
+ /**
1485
+ * The `fieldMask` should not include both the `numberOfParticipants` and `participantsInfo` paths. Including both results
1486
+ * in an error. `participantsInfo` is preferred over `numberOfParticipants`.
1487
+ */
1488
+ export interface UpdateBookingRequest {
1489
+ booking?: Booking;
1490
+ }
1491
+ export interface UpdateBookingResponse {
1492
+ booking?: Booking;
1493
+ }
1494
+ export interface LegacyCreateBookingRequest {
1495
+ booking?: Booking;
1496
+ }
1497
+ export interface LegacyCreateBookingResponse {
1498
+ booking?: Booking;
1499
+ }
1500
+ /**
1501
+ * The `fieldMask` for each booking should not include both the `numberOfParticipants` and `participantsInfo` paths. Including both results
1502
+ * in an error. `participantsInfo` is preferred over `numberOfParticipants`.
1503
+ */
1504
+ export interface BulkUpdateBookingRequest {
1505
+ bookings?: MaskedBooking[];
1506
+ }
1507
+ export interface MaskedBooking {
1508
+ booking?: Booking;
1509
+ mask?: string[];
1510
+ }
1511
+ export interface BulkUpdateBookingResponse {
1512
+ /**
1513
+ * Information about the booking that was updated.
1514
+ * Including its ID, index in the bulk request and whether it was
1515
+ * successfully updated.
1516
+ */
1517
+ results?: ItemMetadata[];
1518
+ /** Total number of successes and failures for Bulk Update Bookings. */
1519
+ bulkActionMetadata?: BulkActionMetadata;
1520
+ }
1521
+ export interface BulkCreateBookingRequest {
1522
+ /**
1523
+ * Bookings to create.
1524
+ *
1525
+ * Max: 8 bookings
1526
+ */
1527
+ createBookingsInfo: CreateBookingInfo[];
1528
+ /** Whether to return the created bookings. */
1529
+ returnFullEntity?: boolean;
1530
+ }
1531
+ export interface CreateBookingInfo {
1532
+ /** Booking to create. */
1533
+ booking?: Booking;
1534
+ /**
1535
+ * Information about whether to notify the customer and
1536
+ * the message to send.
1537
+ */
1538
+ participantNotification?: ParticipantNotification;
1539
+ /**
1540
+ * Whether to send an SMS reminder to the customer 24 hours before the
1541
+ * session starts. The phone number is taken from `contactDetails.phone`.
1542
+ * Default: `true`.
1543
+ */
1544
+ sendSmsReminder?: boolean | null;
1545
+ /**
1546
+ * Whether to ignore specific standard procedures of the Wix Bookings flow.
1547
+ * For example, whether to check availability when creating a booking.
1548
+ */
1549
+ flowControlSettings?: CreateBookingFlowControlSettings;
1550
+ }
1551
+ export interface BulkCreateBookingResponse {
1552
+ /** List of individual Bulk Create Bookings results. */
1553
+ results?: BulkBookingResult[];
1554
+ /** Total number of successes and failures for Bulk Create Bookings. */
1555
+ bulkActionMetadata?: BulkActionMetadata;
1556
+ }
1557
+ export interface BulkBookingResult {
1558
+ /**
1559
+ * Information about the booking that was created or updated.
1560
+ * Including its ID, index in the bulk request and whether it was
1561
+ * successfully created or updated.
1562
+ */
1563
+ itemMetadata?: ItemMetadata;
1564
+ /**
1565
+ * Created or updated booking. Available only if you requested
1566
+ * to return the booking entity.
1567
+ */
1568
+ item?: Booking;
1569
+ }
1570
+ export interface RescheduleBookingRequest extends RescheduleBookingRequestParticipantsInfoOneOf {
1571
+ /**
1572
+ * Total number of participants. Specify when all participants have booked the
1573
+ * same service variant.
1574
+ */
1575
+ totalParticipants?: number;
1576
+ /**
1577
+ * Information about the service choices to book. Specify when not all
1578
+ * participants have booked the same service variant.
1579
+ */
1580
+ participantsChoices?: ParticipantChoices;
1581
+ /** ID of the booking to reschedule. */
1582
+ bookingId: string;
1583
+ /** New slot of the booking. */
1584
+ slot: V2Slot;
1585
+ /**
1586
+ * Revision number, which increments by 1 each time the booking is rescheduled.
1587
+ * To prevent conflicting changes, the current revision must be passed when
1588
+ * rescheduling the booking.
1589
+ */
1590
+ revision: string | null;
1591
+ /**
1592
+ * Information about whether to notify the customer about the rescheduling and
1593
+ * the message to send.
1594
+ */
1595
+ participantNotification?: ParticipantNotification;
1596
+ /**
1597
+ * Whether to ignore specific standard procedures of the Wix Bookings flow.
1598
+ * For example, whether to check availability when rescheduling a booking.
1599
+ */
1600
+ flowControlSettings?: RescheduleBookingFlowControlSettings;
1601
+ }
1602
+ /** @oneof */
1603
+ export interface RescheduleBookingRequestParticipantsInfoOneOf {
1604
+ /**
1605
+ * Total number of participants. Specify when all participants have booked the
1606
+ * same service variant.
1607
+ */
1608
+ totalParticipants?: number;
1609
+ /**
1610
+ * Information about the service choices to book. Specify when not all
1611
+ * participants have booked the same service variant.
1612
+ */
1613
+ participantsChoices?: ParticipantChoices;
1614
+ }
1615
+ export interface RescheduleBookingResponse {
1616
+ /** Rescheduled booking. */
1617
+ booking?: Booking;
1618
+ }
1619
+ export interface BulkRescheduleBookingRequest {
1620
+ /** Reschedule multiple bookings to multiple slots. */
1621
+ slotsBookings?: SlotBookings[];
1622
+ /**
1623
+ * Information about whether to notify the customer about the rescheduling and
1624
+ * the message to send.
1625
+ */
1626
+ participantNotification?: ParticipantNotification;
1627
+ }
1628
+ export interface BulkRescheduleBookingRequestBooking {
1629
+ /** ID of the booking to reschedule. */
1630
+ id?: string;
1631
+ /**
1632
+ * Revision number, which increments by 1 each time the booking is rescheduled.
1633
+ * To prevent conflicting changes,
1634
+ * the current revision must be specified when rescheduling the booking.
1635
+ */
1636
+ revision?: string | null;
1637
+ }
1638
+ /** Bookings to be rescheduled to the given slot. */
1639
+ export interface SlotBookings {
1640
+ /** The bookings details. */
1641
+ bookings?: BulkRescheduleBookingRequestBooking[];
1642
+ /**
1643
+ * The slot to which the bookings were rescheduled.
1644
+ * These bookings are automatically assigned to the session, if given. Otherwise, a new session is created.
1645
+ */
1646
+ slot?: BookedSlot;
1647
+ }
1648
+ export interface BulkRescheduleBookingResponse {
1649
+ /**
1650
+ * Information about the booking that was rescheduled.
1651
+ * Including its ID, index in the bulk request and whether it was
1652
+ * successfully rescheduled.
1653
+ */
1654
+ results?: ItemMetadata[];
1655
+ /** Total number of successes and failures for Bulk Reschedule Bookings. */
1656
+ bulkActionMetadata?: BulkActionMetadata;
1657
+ }
1658
+ /** Update the booked schedule of multiple bookings to the given schedule. */
1659
+ export interface BulkUpdateBookedScheduleRequest {
1660
+ /** The bookings whose booked schedule is to be updated to the given schedule. */
1661
+ bookings?: BookingDetails[];
1662
+ /** ID of the schedule to update. */
1663
+ scheduleId?: string;
1664
+ /**
1665
+ * Information about whether to notify the customer about the rescheduling and
1666
+ * the message to send.
1667
+ */
1668
+ participantNotification?: ParticipantNotification;
1669
+ }
1670
+ export interface BookingDetails {
1671
+ /** ID of the bookings to be updated. */
1672
+ id?: string;
1673
+ revision?: string | null;
1674
+ }
1675
+ export interface BulkUpdateBookedScheduleResponse {
1676
+ /**
1677
+ * Information about the schedule that was updated.
1678
+ * Including its ID, index in the bulk request and whether it was
1679
+ * succesfully updated.
1680
+ */
1681
+ results?: ItemMetadata[];
1682
+ /** Total number of successes and failures for Bulk Updated Booked Schedules. */
1683
+ bulkActionMetadata?: BulkActionMetadata;
1684
+ }
1685
+ export interface QueryBookingsRequest {
1686
+ /** Information about filters, paging, and sorting. */
1687
+ query?: QueryV2;
1688
+ }
1689
+ export interface QueryV2 extends QueryV2PagingMethodOneOf {
1690
+ /** Paging options to limit and skip the number of items. */
1691
+ paging?: Paging;
1692
+ /** 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`. */
1693
+ cursorPaging?: CursorPaging;
1694
+ /**
1695
+ * Filter object in the following format:
1696
+ * `"filter" : {
1697
+ * "fieldName1": "value1",
1698
+ * "fieldName2":{"$operator":"value2"}
1699
+ * }`
1700
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
1701
+ */
1702
+ filter?: Record<string, any> | null;
1703
+ /**
1704
+ * Sort object in the following format:
1705
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
1706
+ */
1707
+ sort?: Sorting[];
1708
+ /** 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. */
1709
+ fields?: string[];
1710
+ /** 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. */
1711
+ fieldsets?: string[];
1712
+ }
1713
+ /** @oneof */
1714
+ export interface QueryV2PagingMethodOneOf {
1715
+ /** Paging options to limit and skip the number of items. */
1716
+ paging?: Paging;
1717
+ /** 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`. */
1718
+ cursorPaging?: CursorPaging;
1719
+ }
1720
+ export interface Sorting {
1721
+ /** Name of the field to sort by. */
1722
+ fieldName?: string;
1723
+ /** Sort order. */
1724
+ order?: SortOrder;
1725
+ }
1726
+ export declare enum SortOrder {
1727
+ ASC = "ASC",
1728
+ DESC = "DESC"
1729
+ }
1730
+ export interface Paging {
1731
+ /** Number of items to load. */
1732
+ limit?: number | null;
1733
+ /** Number of items to skip in the current sort order. */
1734
+ offset?: number | null;
1735
+ }
1736
+ export interface CursorPaging {
1737
+ /** Maximum number of items to return in the results. */
1738
+ limit?: number | null;
1739
+ /**
1740
+ * Pointer to the next or previous page in the list of results.
1741
+ *
1742
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
1743
+ * Not relevant for the first request.
1744
+ */
1745
+ cursor?: string | null;
1746
+ }
1747
+ export interface QueryBookingsResponse {
1748
+ /** Retrieved bookings. */
1749
+ bookings?: Booking[];
1750
+ /** Paging metadata. */
1751
+ pagingMetadata?: PagingMetadataV2;
1752
+ }
1753
+ export interface PagingMetadataV2 {
1754
+ /** Number of items returned in the response. */
1755
+ count?: number | null;
1756
+ /** Offset that was requested. */
1757
+ offset?: number | null;
1758
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
1759
+ total?: number | null;
1760
+ /** Flag that indicates the server failed to calculate the `total` field. */
1761
+ tooManyToCount?: boolean | null;
1762
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
1763
+ cursors?: Cursors;
1764
+ }
1765
+ export interface Cursors {
1766
+ /** Cursor string pointing to the next page in the list of results. */
1767
+ next?: string | null;
1768
+ /** Cursor pointing to the previous page in the list of results. */
1769
+ prev?: string | null;
1770
+ }
1771
+ export interface ConfirmRequest {
1772
+ /** ID of the booking to confirm. */
1773
+ id?: string;
1774
+ /**
1775
+ * Information about whether to notify the customer about the confirmation and
1776
+ * the message to send.
1777
+ */
1778
+ participantNotification?: ParticipantNotification;
1779
+ }
1780
+ export interface ConfirmResponse {
1781
+ /** Confirmed booking. */
1782
+ booking?: Booking;
1783
+ /** Whether this booking has a conflict with at least 1 other confirmed booking. */
1784
+ doubleBooked?: boolean | null;
1785
+ }
1786
+ export interface ConfirmBookingRequest {
1787
+ /** ID of the booking to confirm. */
1788
+ bookingId: string;
1789
+ /**
1790
+ * Revision number, which increments by 1 each time the booking is updated.
1791
+ * To prevent conflicting changes, the current revision must be passed when
1792
+ * updating the booking.
1793
+ */
1794
+ revision: string | null;
1795
+ /**
1796
+ * Information about whether to notify the customer about the confirmation and
1797
+ * the message to send.
1798
+ */
1799
+ participantNotification?: ParticipantNotification;
1800
+ /**
1801
+ * Whether to send an SMS reminder to the customer 24 hours before the
1802
+ * session starts. The phone number is taken from `contactDetails.phone`.
1803
+ */
1804
+ sendSmsReminder?: boolean | null;
1805
+ /** Payment status to set for the booking. */
1806
+ paymentStatus?: PaymentStatus;
1807
+ /** Whether this booking has a conflict with at least 1 other confirmed booking. */
1808
+ doubleBooked?: boolean | null;
1809
+ /**
1810
+ * Whether to ignore specific standard procedures of the Wix Bookings flow.
1811
+ * For example, whether to check availability when confirming a booking.
1812
+ */
1813
+ flowControlSettings?: ConfirmBookingFlowControlSettings;
1814
+ }
1815
+ export interface ConfirmBookingResponse {
1816
+ /** Confirmed booking. */
1817
+ booking?: Booking;
1818
+ }
1819
+ export interface ConsistentQueryBookingsRequest {
1820
+ /** Information about filters, paging, and sorting. */
1821
+ query?: QueryV2;
1822
+ }
1823
+ export interface ConsistentQueryBookingsResponse {
1824
+ /** Retrieved bookings. */
1825
+ bookings?: Booking[];
1826
+ /** Paging metadata. */
1827
+ pagingMetadata?: PagingMetadataV2;
1828
+ }
1829
+ export interface SetBookingSessionIdRequest {
1830
+ /** ID of the booking to set `sessionId` for. */
1831
+ id?: string;
1832
+ /** ID of the session to set on the booking. */
1833
+ sessionId?: string;
1834
+ }
1835
+ export interface SetBookingSessionIdResponse {
1836
+ /** Updated booking. */
1837
+ booking?: Booking;
1838
+ }
1839
+ export interface SetBookingSubmissionIdRequest {
1840
+ /** ID of the booking to set `submissionId` for. */
1841
+ bookingId?: string;
1842
+ /** ID of the form submission to set on the booking. */
1843
+ submissionId?: string;
1844
+ }
1845
+ export interface SetBookingSubmissionIdResponse {
1846
+ /** Updated booking. */
1847
+ booking?: Booking;
1848
+ }
1849
+ export interface UpdateExtendedFieldsRequest {
1850
+ /** ID of the entity to update. */
1851
+ id: string;
1852
+ /** Identifier for the app whose extended fields are being updated. */
1853
+ namespace: string;
1854
+ /** 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. */
1855
+ namespaceData: Record<string, any> | null;
1856
+ }
1857
+ export interface UpdateExtendedFieldsResponse {
1858
+ /** Updated namespace. */
1859
+ namespace?: string;
1860
+ /** Updated data. */
1861
+ namespaceData?: Record<string, any> | null;
1862
+ }
1863
+ export interface DeclineBookingRequest {
1864
+ /** ID of the booking to decline. */
1865
+ bookingId: string;
1866
+ /**
1867
+ * Revision number, which increments by 1 each time the booking is updated.
1868
+ *
1869
+ * To prevent conflicting changes, the current revision must be specified when
1870
+ * declining the booking.
1871
+ */
1872
+ revision: string | null;
1873
+ /**
1874
+ * Information about whether to notify the customer and
1875
+ * the message to send.
1876
+ */
1877
+ participantNotification?: ParticipantNotification;
1878
+ /** Payment status to set for the booking. */
1879
+ paymentStatus?: PaymentStatus;
1880
+ /** Whether this booking has a conflict with at least 1 other confirmed booking. */
1881
+ doubleBooked?: boolean | null;
1882
+ /**
1883
+ * Whether to ignore specific standard procedures of the Wix Bookings flow.
1884
+ * For example, whether to refund a declined booking.
1885
+ */
1886
+ flowControlSettings?: DeclineBookingFlowControlSettings;
1887
+ }
1888
+ export interface DeclineBookingResponse {
1889
+ /** Declined booking. */
1890
+ booking?: Booking;
1891
+ }
1892
+ export interface CancelBookingRequest {
1893
+ /** ID of the booking to cancel. */
1894
+ bookingId: string;
1895
+ /**
1896
+ * Information about whether to notify the customer about the cancellation and
1897
+ * the message to send.
1898
+ */
1899
+ participantNotification?: ParticipantNotification;
1900
+ /**
1901
+ * Whether to ignore specific standard procedures of the Wix Bookings flow.
1902
+ * For example, whether to allow a cancellation even though the service's
1903
+ * policy doesn't allow it.
1904
+ */
1905
+ flowControlSettings?: CancelBookingFlowControlSettings;
1906
+ /**
1907
+ * Revision number, which increments by 1 each time the booking is updated.
1908
+ *
1909
+ * To prevent conflicting changes, the current revision must be specified when
1910
+ * managing the booking.
1911
+ */
1912
+ revision: string | null;
1913
+ }
1914
+ export interface CancelBookingResponse {
1915
+ /** Canceled booking. */
1916
+ booking?: Booking;
1917
+ }
1918
+ export interface UpdateNumberOfParticipantsRequest extends UpdateNumberOfParticipantsRequestParticipantsInfoOneOf {
1919
+ /**
1920
+ * Total number of participants. Specify when all participants have booked the
1921
+ * same service variant.
1922
+ */
1923
+ totalParticipants?: number;
1924
+ /**
1925
+ * Information about the service choices the participants have booked. Specify
1926
+ * when not all participants have booked the same service variant.
1927
+ */
1928
+ participantsChoices?: ParticipantChoices;
1929
+ /** ID of the booking to update the number of participants for. */
1930
+ bookingId: string;
1931
+ /**
1932
+ * Revision number, which increments by 1 each time the booking is updated.
1933
+ *
1934
+ * To prevent conflicting changes, the current revision must be specified
1935
+ * when updating the booking.
1936
+ */
1937
+ revision: string | null;
1938
+ }
1939
+ /** @oneof */
1940
+ export interface UpdateNumberOfParticipantsRequestParticipantsInfoOneOf {
1941
+ /**
1942
+ * Total number of participants. Specify when all participants have booked the
1943
+ * same service variant.
1944
+ */
1945
+ totalParticipants?: number;
1946
+ /**
1947
+ * Information about the service choices the participants have booked. Specify
1948
+ * when not all participants have booked the same service variant.
1949
+ */
1950
+ participantsChoices?: ParticipantChoices;
1951
+ }
1952
+ export interface UpdateNumberOfParticipantsResponse {
1953
+ /** Updated booking. */
1954
+ booking?: Booking;
1955
+ }
1956
+ export interface NumberOfParticipantsUpdated extends NumberOfParticipantsUpdatedPreviousParticipantsInfoOneOf {
1957
+ /**
1958
+ * The previous total number of participants. Available only when the booking includes
1959
+ * a single service variant.
1960
+ */
1961
+ previousTotalParticipants?: number;
1962
+ /**
1963
+ * Information about the previous booked service choices and participants.
1964
+ * Available only when the booking includes multiple service variants.
1965
+ */
1966
+ previousParticipantsChoices?: ParticipantChoices;
1967
+ /** The updated booking object. */
1968
+ booking?: Booking;
1969
+ /** ID of the participant number update initiator. */
1970
+ initiatedBy?: IdentificationData;
1971
+ }
1972
+ /** @oneof */
1973
+ export interface NumberOfParticipantsUpdatedPreviousParticipantsInfoOneOf {
1974
+ /**
1975
+ * The previous total number of participants. Available only when the booking includes
1976
+ * a single service variant.
1977
+ */
1978
+ previousTotalParticipants?: number;
1979
+ /**
1980
+ * Information about the previous booked service choices and participants.
1981
+ * Available only when the booking includes multiple service variants.
1982
+ */
1983
+ previousParticipantsChoices?: ParticipantChoices;
1984
+ }
1985
+ export interface BulkCalculateAllowedActionsRequest {
1986
+ /** The booking IDs for which we want to calculate the allowed actions. */
1987
+ bookingIds?: string[] | null;
1988
+ }
1989
+ export interface BulkCalculateAllowedActionsResponse {
1990
+ results?: BulkCalculateAllowedActionsResult[];
1991
+ /** Total number of successes and failures for Bulk Calculate Allowed Actions. */
1992
+ bulkActionMetadata?: BulkActionMetadata;
1993
+ }
1994
+ export interface GetSlotAvailabilityRequest {
1995
+ /** The slot for which the availability is checked. */
1996
+ slot?: V2Slot;
1997
+ /** The timezone for which availability is to be calculated. */
1998
+ timezone?: string | null;
1999
+ }
2000
+ export interface GetSlotAvailabilityResponse {
2001
+ availability?: SlotAvailability;
2002
+ bookingPolicySettings?: BookingPolicySettings;
2003
+ }
2004
+ export interface SlotAvailability {
2005
+ /** Identifier for the underlying session when the session is a single session or generated from a recurring session. Required. */
2006
+ slot?: V2Slot;
2007
+ /** Whether this available slot is bookable. */
2008
+ bookable?: boolean;
2009
+ /**
2010
+ * Total number of spots for this availability.
2011
+ * For example, for a class of 10 spots with 3 spots booked, `totalSpots` is 10 and `openSpots` is 7.
2012
+ */
2013
+ totalSpots?: number | null;
2014
+ /**
2015
+ * Number of open spots for this availability.
2016
+ * For appointments, if there are existing bookings with overlapping time, service & resource, `openSpots` is 0. Otherwise, `openSpots` is 1.
2017
+ */
2018
+ openSpots?: number | null;
2019
+ /** An object describing the slot's waiting list and its occupancy. */
2020
+ waitingList?: WaitingList;
2021
+ /** Indicators for booking policy violations for the slot. */
2022
+ bookingPolicyViolations?: BookingPolicyViolations;
2023
+ /** Indicates whether this slot is locked. */
2024
+ locked?: boolean | null;
2025
+ }
2026
+ export interface WaitingList {
2027
+ /**
2028
+ * Total number of spots and open spots for this waiting list.
2029
+ * 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.
2030
+ */
2031
+ totalSpots?: number | null;
2032
+ openSpots?: number | null;
2033
+ }
2034
+ export interface AvailableResources {
2035
+ /** Resource type ID. */
2036
+ resourceTypeId?: string | null;
2037
+ /**
2038
+ * Available resources for the slot.
2039
+ * `maxSize` is defined by 135 staff members + 3 resource types and 50 resources per type.
2040
+ * `Availability-2` currently has no `maxSize` defined.
2041
+ */
2042
+ resourceIds?: string[];
2043
+ }
2044
+ export interface GetScheduleAvailabilityRequest {
2045
+ /** ID of the schedule for which to check availability. */
2046
+ scheduleId?: string;
2047
+ }
2048
+ export interface GetScheduleAvailabilityResponse {
2049
+ availability?: ScheduleAvailability;
2050
+ bookingPolicySettings?: BookingPolicySettings;
2051
+ }
2052
+ export interface ScheduleAvailability {
2053
+ /** Total number of spots. */
2054
+ totalSpots?: number | null;
2055
+ /** Number of remaining open spots. */
2056
+ openSpots?: number | null;
2057
+ /** Indicators of booking policy violations for the specified schedule. */
2058
+ bookingPolicyViolations?: BookingPolicyViolations;
2059
+ }
2060
+ export interface MarkBookingAsPendingRequest {
2061
+ /** ID of the booking to mark as `PENDING`. */
2062
+ bookingId?: string;
2063
+ /**
2064
+ * Revision number, which increments by 1 each time the booking is updated.
2065
+ *
2066
+ * To prevent conflicting changes, the current revision must be specified when
2067
+ * managing the booking.
2068
+ */
2069
+ revision?: string | null;
2070
+ /**
2071
+ * Information about whether to notify the customer and
2072
+ * the message to send.
2073
+ */
2074
+ participantNotification?: ParticipantNotification;
2075
+ /**
2076
+ * Whether to send an SMS reminder to the customer 24 hours before the
2077
+ * session starts. The phone number is taken from `contactDetails.phone`.
2078
+ */
2079
+ sendSmsReminder?: boolean | null;
2080
+ /** Payment status to set for the booking. */
2081
+ paymentStatus?: PaymentStatus;
2082
+ /** Whether this booking has a conflict with at least 1 other confirmed booking. */
2083
+ doubleBooked?: boolean | null;
2084
+ /**
2085
+ * Whether to ignore specific standard procedures of the Wix Bookings flow.
2086
+ * For example, whether to check availability before updating the status.
2087
+ */
2088
+ flowControlSettings?: MarkBookingAsPendingFlowControlSettings;
2089
+ }
2090
+ export interface MarkBookingAsPendingResponse {
2091
+ /** Updated booking. */
2092
+ booking?: Booking;
2093
+ }
2094
+ export interface BookingMarkedAsPending {
2095
+ /** The booking object that was marked as pending. */
2096
+ booking?: Booking;
2097
+ /** Information about whether to notify the customer upon manual confirmation of the pending booking and the message to send. */
2098
+ participantNotification?: ParticipantNotification;
2099
+ /**
2100
+ * Whether to send an SMS reminder to the customer 24 hours before the session starts.
2101
+ * The phone number is taken from `contactDetails.phone`.
2102
+ */
2103
+ sendSmsReminder?: boolean | null;
2104
+ /** Whether this booking overlaps with another existing confirmed booking. */
2105
+ doubleBooked?: boolean | null;
2106
+ /** ID of the mark as pending initiator. */
2107
+ initiatedBy?: IdentificationData;
2108
+ /** The previous status of the booking. */
2109
+ previousStatus?: BookingStatus;
2110
+ /** The previous payment status of the booking. */
2111
+ previousPaymentStatus?: PaymentStatus;
2112
+ }
2113
+ export interface MigrationCheckIfClashesWithBlockedTimeRequest {
2114
+ msidAndBookingIds?: MsidAndBookingId[];
2115
+ }
2116
+ export interface MsidAndBookingId {
2117
+ msid?: string;
2118
+ bookingId?: string;
2119
+ }
2120
+ export interface MigrationCheckIfClashesWithBlockedTimeResponse {
2121
+ clashes?: Clash[];
2122
+ }
2123
+ export interface Clash {
2124
+ msid?: string;
2125
+ bookingId?: string;
2126
+ sessionId?: string;
2127
+ resourceName?: string;
2128
+ contactName?: string;
2129
+ }
2130
+ export interface CountBookingsRequest {
2131
+ /**
2132
+ * Filter object in the following format:
2133
+ * `"filter" : {
2134
+ * "fieldName1": "value1",
2135
+ * "fieldName2":{"$operator":"value2"}
2136
+ * }`
2137
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
2138
+ */
2139
+ filter?: Record<string, any> | null;
2140
+ }
2141
+ export interface CountBookingsResponse {
2142
+ /** Number of bookings matching the specified filter. */
2143
+ count?: number;
2144
+ }
2145
+ export interface ConfirmOrDeclineBookingRequest {
2146
+ /** ID of the booking to confirm or decline. */
2147
+ bookingId: string;
2148
+ /**
2149
+ * Current payment status of the booking when using a custom checkout page and
2150
+ * not the eCommerce checkout
2151
+ * ([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)).
2152
+ *
2153
+ * The booking is declined if there is a double booking conflict and you provide
2154
+ * one of these payment statuses: `UNDEFINED`, `NOT_PAID`, `REFUNDED`, or `EXEMPT`.
2155
+ */
2156
+ paymentStatus?: PaymentStatus;
2157
+ }
2158
+ export interface ConfirmOrDeclineBookingResponse {
2159
+ /** Updated booking. */
2160
+ booking?: Booking;
2161
+ }
2162
+ export interface BulkConfirmOrDeclineBookingRequest {
2163
+ /** Bookings to confirm or decline. */
2164
+ details: BulkConfirmOrDeclineBookingRequestBookingDetails[];
2165
+ /** Whether to return the confirmed or declined booking objects. */
2166
+ returnEntity?: boolean;
2167
+ }
2168
+ export interface BulkConfirmOrDeclineBookingRequestBookingDetails {
2169
+ /** ID of the booking to confirm or decline. */
2170
+ bookingId?: string;
2171
+ /**
2172
+ * Current payment status of the booking when using a custom checkout page and
2173
+ * not the eCommerce checkout
2174
+ * ([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)).
2175
+ *
2176
+ * The booking is declined if there is a double booking conflict and you provide
2177
+ * one of these payment statuses: `UNDEFINED`, `NOT_PAID`, `REFUNDED`, or `EXEMPT`.
2178
+ */
2179
+ paymentStatus?: PaymentStatus;
2180
+ }
2181
+ export interface BulkConfirmOrDeclineBookingResponse {
2182
+ /** List of confirmed or declined bookings, including metadata. */
2183
+ results?: BulkBookingResult[];
2184
+ /** Total successes and failures of the Bulk Confirm Or Decline call. */
2185
+ bulkActionMetadata?: BulkActionMetadata;
2186
+ }
2187
+ export interface V2CreateBookingRequest extends V2CreateBookingRequestBookableItemOneOf, V2CreateBookingRequestParticipantsInfoOneOf {
2188
+ /**
2189
+ * Information about the slot to create a booking for.
2190
+ * If you set `slot.location.locationType` to `CUSTOM`, the created slot's
2191
+ * location is set to `slot.location.formattedAddress` when provided.
2192
+ * Otherwise it's set to `contactDetails.fullAddress.formattedAddress`.
2193
+ */
2194
+ slot?: Slot;
2195
+ /** Information about the schedule to create a booking for. */
2196
+ schedule?: BookedSchedule;
2197
+ /** Contact details of the customer booking the service. */
2198
+ contactDetails?: ContactDetails;
2199
+ /**
2200
+ * Booking status.
2201
+ * One of:
2202
+ * - `"CREATED"` - The booking was created.
2203
+ * - `"UPDATED"` - The booking was updated.
2204
+ * - `"CONFIRMED"` - The booking has been confirmed and appears on the bookings calendar.
2205
+ * Booking can be manually confirmed using the Set As Confirmed endpoint.
2206
+ * Booking can be automatically confirmed when the following requirements are met:
2207
+ * + The service is configured as automatically confirmed.
2208
+ * + Invoking eCommerce checkout API and an order has been created.
2209
+ * - `"CANCELED"` - The booking has been canceled and synced to bookings calendar.
2210
+ * The booking can be canceled using cancel API.
2211
+ * - `"PENDING"` - The booking waiting to be confirmed or declined buy the owner and is synced to bookings calendar.
2212
+ * Bookings can be manually set as pending using setAsPending API, requires manage booking status permissions.
2213
+ * Booking can be automatically set as pending when the following requirements are met:
2214
+ * + The Service is configured as manually confirmed.
2215
+ * + Invoking the eCommerce checkout API and an order has been created.
2216
+ * - `"WAITING_LIST"` - The booking is pending on a waiting list.
2217
+ * Booking can be created with this status when invoking waiting list join API.
2218
+ * - `"DECLINED"` - The booking was declined by the owner and synced to bookings calendar.
2219
+ * Booking can be manually declined using decline API and requires manage booking permissions.
2220
+ * Booking can be automatically declined when the following requirements are met:
2221
+ * + Invoking eCommerce checkout API and the order declined event has been sent.
2222
+ * + Invoking eCommerce checkout API and order approved event has been sent, but the booking is offline and the booking causes a double booking.
2223
+ */
2224
+ status?: BookingStatus;
2225
+ /**
2226
+ * Additional custom fields of the booking form. The customer must provide
2227
+ * information for each field when booking the service. For example, that they
2228
+ * bring their own towels or whether they use a wheelchair.
2229
+ *
2230
+ * Max: 100 fields
2231
+ */
2232
+ additionalFields?: CustomFormField[];
2233
+ /**
2234
+ * Total number of participants. Available only when the service doesn't have
2235
+ * [variants](https://dev.wix.com/api/rest/wix-bookings/service-options-and-variants/introduction).
2236
+ *
2237
+ * Max: `20`
2238
+ */
2239
+ numberOfParticipants?: number | null;
2240
+ /**
2241
+ * Internal business note. Not visible to the customer.
2242
+ *
2243
+ * Max: 200 characters
2244
+ */
2245
+ internalBusinessNote?: string | null;
2246
+ /**
2247
+ * Payment option the customer intends to use.
2248
+ * Must be one of the payment options defined for the service, unless
2249
+ * you pass `flowControlSettings.skipSelectedPaymentOptionValidation` as `true`.
2250
+ */
2251
+ selectedPaymentOption?: SelectedPaymentOption;
2252
+ /**
2253
+ * Identifies the source (platform, actor and app) that created this booking.
2254
+ * This property of the booking cannot be changed.
2255
+ * The app_def_id and app_name will be resolved automatically.
2256
+ * TODO GAP See if we need this - might be able to get this data from the headers?
2257
+ */
2258
+ bookingSource?: BookingSource;
2259
+ /**
2260
+ * A user identifier of an external application user that initiated the book request.
2261
+ * Allows an external application to later identify its own bookings and correlate to its own internal users
2262
+ */
2263
+ externalUserId?: string | null;
2264
+ /** Information about a message to send to the customer. */
2265
+ participantNotification?: ParticipantNotification;
2266
+ /**
2267
+ * Whether to send an SMS reminder to the customer 24 hours before the
2268
+ * session starts. The phone number is taken from `contactDetails.phone`.
2269
+ *
2270
+ * Default: `true`.
2271
+ */
2272
+ sendSmsReminder?: boolean | null;
2273
+ /**
2274
+ * Information about whether specific procedures of the standard Wix Bookings
2275
+ * creation flow are changed. For example, whether the availability is
2276
+ * checked before creating the booking or if additional payment options are
2277
+ * accepted.
2278
+ */
2279
+ flowControlSettings?: CreateBookingRequestFlowControlSettings;
2280
+ }
2281
+ /** @oneof */
2282
+ export interface V2CreateBookingRequestBookableItemOneOf {
2283
+ /**
2284
+ * Information about the slot to create a booking for.
2285
+ * If you set `slot.location.locationType` to `CUSTOM`, the created slot's
2286
+ * location is set to `slot.location.formattedAddress` when provided.
2287
+ * Otherwise it's set to `contactDetails.fullAddress.formattedAddress`.
2288
+ */
2289
+ slot?: Slot;
2290
+ /** Information about the schedule to create a booking for. */
2291
+ schedule?: BookedSchedule;
2292
+ }
2293
+ /** @oneof */
2294
+ export interface V2CreateBookingRequestParticipantsInfoOneOf {
2295
+ }
2296
+ export interface Slot {
2297
+ /**
2298
+ * ID for the slot's corresponding session, when the session is either a single session
2299
+ * or a specific session generated from a recurring session.
2300
+ *
2301
+ * Deprecated. Please use `eventId` instead.
2302
+ * @deprecated ID for the slot's corresponding session, when the session is either a single session
2303
+ * or a specific session generated from a recurring session.
2304
+ *
2305
+ * Deprecated. Please use `eventId` instead.
2306
+ * @replacedBy event_id
2307
+ * @targetRemovalDate 2025-09-30
2308
+ */
2309
+ sessionId?: string | null;
2310
+ /** Service ID. */
2311
+ serviceId?: string;
2312
+ /** Schedule ID. */
2313
+ scheduleId?: string;
2314
+ /**
2315
+ * The start time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
2316
+ * format.
2317
+ *
2318
+ * If `timezone` is specified,
2319
+ * dates are based on the local date/time. This means that the timezone offset
2320
+ * in the `start_date` is ignored.
2321
+ */
2322
+ startDate?: string | null;
2323
+ /**
2324
+ * The end time of this slot in
2325
+ * [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) format.
2326
+ *
2327
+ * If `timezone` is specified,
2328
+ * dates are based on the local date/time. This means that the timezone offset
2329
+ * in the `end_date` is ignored.
2330
+ */
2331
+ endDate?: string | null;
2332
+ /**
2333
+ * The timezone for which slot availability is to be calculated.
2334
+ *
2335
+ * 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)
2336
+ * when calculating availability.
2337
+ */
2338
+ timezone?: string | null;
2339
+ /**
2340
+ * The resource required for this slot. Currently, the only supported resource
2341
+ * is the relevant staff member for the slot.
2342
+ */
2343
+ resource?: SlotResource;
2344
+ /** Geographic location of the slot. */
2345
+ location?: Location;
2346
+ /**
2347
+ * ID for the slot's corresponding event, when the event is either a single event
2348
+ * or a specific event generated from a recurring event.
2349
+ */
2350
+ eventId?: string | null;
2351
+ }
2352
+ export interface SlotResource {
2353
+ /**
2354
+ * Resource ID.
2355
+ * @readonly
2356
+ */
2357
+ id?: string | null;
2358
+ /** Resource name. Read only. */
2359
+ name?: string | null;
2360
+ }
2361
+ export interface CreateBookingRequestFlowControlSettings {
2362
+ /**
2363
+ * Whether the availability is checked before creating the booking. When
2364
+ * passing `false` a booking is only created when the slot or schedule is
2365
+ * available. Your app must have the `BOOKINGS.OVERRIDE_AVAILABILITY`
2366
+ * permission scope when passing `true`.
2367
+ *
2368
+ * Default: `false`.
2369
+ */
2370
+ skipAvailabilityValidation?: boolean;
2371
+ /**
2372
+ * Whether `PENDING` bookings are automatically set to `CONFIRMED` for
2373
+ * services that normally require the owner's manual confirmation. Your
2374
+ * app must have the `BOOKINGS.OVERRIDE_AVAILABILITY` permission scope
2375
+ * when passing `true`.
2376
+ *
2377
+ * Default: `false`.
2378
+ */
2379
+ skipBusinessConfirmation?: boolean;
2380
+ /**
2381
+ * Whether customers can pay using a payment method that isn't supported
2382
+ * for the service, but that's supported for other services. Your app
2383
+ * must have the `BOOKINGS.MANAGE_PAYMENTS` permission scope when passing
2384
+ * `true`.
2385
+ *
2386
+ * Default: `false`.
2387
+ */
2388
+ skipSelectedPaymentOptionValidation?: boolean;
2389
+ }
2390
+ export interface V2CreateBookingResponse {
2391
+ /** Created booking. */
2392
+ booking?: Booking;
2393
+ }
2394
+ export interface V2CancelBookingRequest {
2395
+ /** ID of the booking to cancel. */
2396
+ bookingId?: string;
2397
+ /**
2398
+ * Information about whether to notify the customer about the cancellation and
2399
+ * the message to send.
2400
+ */
2401
+ participantNotification?: ParticipantNotification;
2402
+ /**
2403
+ * Revision number, which increments by 1 each time the booking is updated.
2404
+ * To prevent conflicting changes,
2405
+ * the current revision must be passed when managing the booking.
2406
+ */
2407
+ revision?: string | null;
2408
+ }
2409
+ export interface CancelBookingRequestFlowControlSettings {
2410
+ /**
2411
+ * Whether the cancellation policy applies when canceling the booking. When
2412
+ * passing `false` you can only cancel a booking if the cancellation policy
2413
+ * allows it. Your app must have the `BOOKINGS.IGNORE_BOOKING_POLICY `
2414
+ * permission scope when passing `true`.
2415
+ *
2416
+ * Default: `false`.
2417
+ */
2418
+ ignoreCancellationPolicy?: boolean;
2419
+ /**
2420
+ * Whether to issue a refund when canceling the booking.
2421
+ * The refund will be issued only if the booking is refundable.
2422
+ * Currently, booking is considered refundable when it was paid by membership.
2423
+ * If passing `true`, the booking flow control settings will be set with refund,
2424
+ * otherwise, either if `false` is passed or the field remains empty,
2425
+ * the booking flow control settings will be set with no refund.
2426
+ *
2427
+ * Default: `false`.
2428
+ */
2429
+ withRefund?: boolean | null;
2430
+ }
2431
+ export interface V2CancelBookingResponse {
2432
+ /** Canceled booking. */
2433
+ booking?: Booking;
2434
+ }
2435
+ export interface V2RescheduleBookingRequest extends V2RescheduleBookingRequestParticipantsInfoOneOf {
2436
+ /** Id of the booking to reschedule. */
2437
+ bookingId?: string;
2438
+ /** Information about the new slot. */
2439
+ slot?: Slot;
2440
+ /**
2441
+ * Revision number, which increments by 1 each time the booking is updated.
2442
+ * To prevent conflicting changes, the current revision must be passed when
2443
+ * managing the booking.
2444
+ */
2445
+ revision?: string | null;
2446
+ /**
2447
+ * Information about whether to notify the customer about the rescheduling and
2448
+ * the message to send.
2449
+ */
2450
+ participantNotification?: ParticipantNotification;
2451
+ }
2452
+ /** @oneof */
2453
+ export interface V2RescheduleBookingRequestParticipantsInfoOneOf {
2454
+ }
2455
+ export interface RescheduleBookingRequestFlowControlSettings {
2456
+ /**
2457
+ * Whether the rescheduling policy applies when rescheduling the booking.
2458
+ * When passing `false` you can only cancel a booking if the rescheduling
2459
+ * policy allows it. Your app must have the `BOOKINGS.IGNORE_BOOKING_POLICY `
2460
+ * permission scope when passing `true`.
2461
+ *
2462
+ * Default: `false`.
2463
+ */
2464
+ ignoreReschedulePolicy?: boolean;
2465
+ /**
2466
+ * Whether the availability is checked before rescheduling the booking.
2467
+ * When passing `false` a booking is only created when the slot or
2468
+ * schedule is available. Your app must have the `BOOKINGS.OVERRIDE_AVAILABILITY`
2469
+ * permission scope when passing `true`.
2470
+ *
2471
+ * Default: `false`.
2472
+ */
2473
+ skipAvailabilityValidation?: boolean;
2474
+ /**
2475
+ * Whether the rescheduled booking's status is automatically set to
2476
+ * `CONFIRMED` for services that normally require the owner's manual
2477
+ * confirmation. Your app must have the `BOOKINGS.OVERRIDE_AVAILABILITY`
2478
+ * permission scope when passing `true`.
2479
+ *
2480
+ * Default: `false`.
2481
+ */
2482
+ skipBusinessConfirmation?: boolean;
2483
+ }
2484
+ export interface V2RescheduleBookingResponse {
2485
+ /** Rescheduled booking. */
2486
+ booking?: Booking;
2487
+ }
2488
+ export interface V2ConfirmBookingRequest {
2489
+ /** ID of the booking to confirm. */
2490
+ bookingId?: string;
2491
+ /**
2492
+ * Revision number, which increments by 1 each time the booking is updated.
2493
+ * To prevent conflicting changes, the current revision must be passed when
2494
+ * managing the booking.
2495
+ */
2496
+ revision?: string | null;
2497
+ /**
2498
+ * Information about whether to notify the customer about the confirmation and
2499
+ * the message to send.
2500
+ */
2501
+ participantNotification?: ParticipantNotification;
2502
+ }
2503
+ export interface V2ConfirmBookingResponse {
2504
+ booking?: Booking;
2505
+ }
2506
+ export interface V2DeclineBookingRequest {
2507
+ /** ID of the booking to decline. */
2508
+ bookingId?: string;
2509
+ /**
2510
+ * Revision number, which increments by 1 each time the booking is updated.
2511
+ * To prevent conflicting changes, the current revision must be passed when
2512
+ * managing the booking.
2513
+ */
2514
+ revision?: string | null;
2515
+ /**
2516
+ * Information about whether to notify the customer about the decline and
2517
+ * the message to send.
2518
+ */
2519
+ participantNotification?: ParticipantNotification;
2520
+ }
2521
+ export interface V2DeclineBookingResponse {
2522
+ /** Declined booking. */
2523
+ booking?: Booking;
2524
+ }
2525
+ export interface V2UpdateNumberOfParticipantsRequest extends V2UpdateNumberOfParticipantsRequestParticipantsInfoOneOf {
2526
+ /** ID of the booking to update the number of participants for. */
2527
+ bookingId?: string;
2528
+ /** Updated number of participants. */
2529
+ numberOfParticipants?: number | null;
2530
+ /**
2531
+ * Revision number, which increments by 1 each time the booking is updated.
2532
+ * To prevent conflicting changes, the current revision must be passed when
2533
+ * managing the booking.
2534
+ */
2535
+ revision?: string | null;
2536
+ }
2537
+ /** @oneof */
2538
+ export interface V2UpdateNumberOfParticipantsRequestParticipantsInfoOneOf {
2539
+ }
2540
+ export interface V2UpdateNumberOfParticipantsResponse {
2541
+ /** Booking with updated number of participants. */
2542
+ booking?: Booking;
2543
+ }
2544
+ interface DurationNonNullableFields {
2545
+ minutes: number;
2546
+ }
2547
+ interface ServiceChoiceNonNullableFields {
2548
+ custom: string;
2549
+ duration?: DurationNonNullableFields;
2550
+ optionId: string;
2551
+ }
2552
+ interface ServiceChoicesNonNullableFields {
2553
+ choices: ServiceChoiceNonNullableFields[];
2554
+ }
2555
+ interface ParticipantChoicesNonNullableFields {
2556
+ serviceChoices: ServiceChoicesNonNullableFields[];
2557
+ }
2558
+ interface BookedResourceNonNullableFields {
2559
+ id: string;
2560
+ }
2561
+ interface LocationNonNullableFields {
2562
+ locationType: LocationType;
2563
+ }
2564
+ interface BookedSlotNonNullableFields {
2565
+ serviceId: string;
2566
+ scheduleId: string;
2567
+ resource?: BookedResourceNonNullableFields;
2568
+ location?: LocationNonNullableFields;
2569
+ additionalResources: BookedResourceNonNullableFields[];
2570
+ }
2571
+ interface BookedScheduleNonNullableFields {
2572
+ scheduleId: string;
2573
+ location?: LocationNonNullableFields;
2574
+ }
2575
+ interface BookedEntityNonNullableFields {
2576
+ slot?: BookedSlotNonNullableFields;
2577
+ schedule?: BookedScheduleNonNullableFields;
2578
+ }
2579
+ interface StreetAddressNonNullableFields {
2580
+ number: string;
2581
+ name: string;
2582
+ apt: string;
2583
+ }
2584
+ interface SubdivisionNonNullableFields {
2585
+ code: string;
2586
+ name: string;
2587
+ }
2588
+ interface AddressNonNullableFields {
2589
+ streetAddress?: StreetAddressNonNullableFields;
2590
+ subdivisions: SubdivisionNonNullableFields[];
2591
+ }
2592
+ interface ContactDetailsNonNullableFields {
2593
+ fullAddress?: AddressNonNullableFields;
2594
+ }
2595
+ interface CustomFormFieldNonNullableFields {
2596
+ id: string;
2597
+ valueType: ValueType;
2598
+ }
2599
+ interface BookingSourceNonNullableFields {
2600
+ platform: Platform;
2601
+ actor: Actor;
2602
+ }
2603
+ interface ParticipantNotificationNonNullableFields {
2604
+ notifyParticipants: boolean;
2605
+ }
2606
+ interface CommonIdentificationDataNonNullableFields {
2607
+ anonymousVisitorId: string;
2608
+ memberId: string;
2609
+ wixUserId: string;
2610
+ appId: string;
2611
+ identityType: IdentificationDataIdentityType;
2612
+ }
2613
+ interface FlowControlSettingsNonNullableFields {
2614
+ ignoreBookingWindow: boolean;
2615
+ skipAvailabilityValidation: boolean;
2616
+ skipBusinessConfirmation: boolean;
2617
+ skipSelectedPaymentOptionValidation: boolean;
2618
+ }
2619
+ interface MultiServiceBookingInfoNonNullableFields {
2620
+ type: MultiServiceBookingType;
2621
+ }
2622
+ interface BookingNonNullableFields {
2623
+ totalParticipants: number;
2624
+ participantsChoices?: ParticipantChoicesNonNullableFields;
2625
+ bookedEntity?: BookedEntityNonNullableFields;
2626
+ contactDetails?: ContactDetailsNonNullableFields;
2627
+ additionalFields: CustomFormFieldNonNullableFields[];
2628
+ status: BookingStatus;
2629
+ paymentStatus: PaymentStatus;
2630
+ selectedPaymentOption: SelectedPaymentOption;
2631
+ bookingSource?: BookingSourceNonNullableFields;
2632
+ participantNotification?: ParticipantNotificationNonNullableFields;
2633
+ createdBy?: CommonIdentificationDataNonNullableFields;
2634
+ flowControlSettings?: FlowControlSettingsNonNullableFields;
2635
+ multiServiceBookingInfo?: MultiServiceBookingInfoNonNullableFields;
2636
+ }
2637
+ interface BookingResultNonNullableFields {
2638
+ booking?: BookingNonNullableFields;
2639
+ }
2640
+ interface MultiServiceBookingNonNullableFields {
2641
+ bookings: BookingResultNonNullableFields[];
2642
+ }
2643
+ export interface CreateMultiServiceBookingResponseNonNullableFields {
2644
+ multiServiceBooking?: MultiServiceBookingNonNullableFields;
2645
+ }
2646
+ export interface RescheduleMultiServiceBookingResponseNonNullableFields {
2647
+ multiServiceBooking?: MultiServiceBookingNonNullableFields;
2648
+ }
2649
+ export interface GetMultiServiceBookingAvailabilityResponseNonNullableFields {
2650
+ bookable: boolean;
2651
+ }
2652
+ export interface CancelMultiServiceBookingResponseNonNullableFields {
2653
+ multiServiceBooking?: MultiServiceBookingNonNullableFields;
2654
+ }
2655
+ export interface MarkMultiServiceBookingAsPendingResponseNonNullableFields {
2656
+ multiServiceBooking?: MultiServiceBookingNonNullableFields;
2657
+ }
2658
+ export interface ConfirmMultiServiceBookingResponseNonNullableFields {
2659
+ multiServiceBooking?: MultiServiceBookingNonNullableFields;
2660
+ }
2661
+ export interface DeclineMultiServiceBookingResponseNonNullableFields {
2662
+ multiServiceBooking?: MultiServiceBookingNonNullableFields;
2663
+ }
2664
+ interface ApplicationErrorNonNullableFields {
2665
+ code: string;
2666
+ description: string;
2667
+ }
2668
+ interface ItemMetadataNonNullableFields {
2669
+ originalIndex: number;
2670
+ success: boolean;
2671
+ error?: ApplicationErrorNonNullableFields;
2672
+ }
2673
+ interface AllowedActionsNonNullableFields {
2674
+ cancel: boolean;
2675
+ reschedule: boolean;
2676
+ bookAnother: boolean;
2677
+ }
2678
+ interface BulkCalculateAllowedActionsResultNonNullableFields {
2679
+ itemMetadata?: ItemMetadataNonNullableFields;
2680
+ item?: AllowedActionsNonNullableFields;
2681
+ }
2682
+ interface BulkActionMetadataNonNullableFields {
2683
+ totalSuccesses: number;
2684
+ totalFailures: number;
2685
+ undetailedFailures: number;
2686
+ }
2687
+ export interface BulkGetMultiServiceBookingAllowedActionsResponseNonNullableFields {
2688
+ results: BulkCalculateAllowedActionsResultNonNullableFields[];
2689
+ bulkActionMetadata?: BulkActionMetadataNonNullableFields;
2690
+ }
2691
+ export interface GetMultiServiceBookingResponseNonNullableFields {
2692
+ multiServiceBooking?: MultiServiceBookingNonNullableFields;
2693
+ }
2694
+ export interface AddBookingsToMultiServiceBookingResponseNonNullableFields {
2695
+ bookings: BookingResultNonNullableFields[];
2696
+ }
2697
+ export interface RemoveBookingsFromMultiServiceBookingResponseNonNullableFields {
2698
+ bookings: BookingResultNonNullableFields[];
2699
+ }
2700
+ export interface CreateBookingResponseNonNullableFields {
2701
+ booking?: BookingNonNullableFields;
2702
+ }
2703
+ interface BulkBookingResultNonNullableFields {
2704
+ itemMetadata?: ItemMetadataNonNullableFields;
2705
+ item?: BookingNonNullableFields;
2706
+ }
2707
+ export interface BulkCreateBookingResponseNonNullableFields {
2708
+ results: BulkBookingResultNonNullableFields[];
2709
+ bulkActionMetadata?: BulkActionMetadataNonNullableFields;
2710
+ }
2711
+ export interface RescheduleBookingResponseNonNullableFields {
2712
+ booking?: BookingNonNullableFields;
2713
+ }
2714
+ export interface ConfirmBookingResponseNonNullableFields {
2715
+ booking?: BookingNonNullableFields;
2716
+ }
2717
+ export interface UpdateExtendedFieldsResponseNonNullableFields {
2718
+ namespace: string;
2719
+ }
2720
+ export interface DeclineBookingResponseNonNullableFields {
2721
+ booking?: BookingNonNullableFields;
2722
+ }
2723
+ export interface CancelBookingResponseNonNullableFields {
2724
+ booking?: BookingNonNullableFields;
2725
+ }
2726
+ export interface UpdateNumberOfParticipantsResponseNonNullableFields {
2727
+ booking?: BookingNonNullableFields;
2728
+ }
2729
+ export interface ConfirmOrDeclineBookingResponseNonNullableFields {
2730
+ booking?: BookingNonNullableFields;
2731
+ }
2732
+ export interface BulkConfirmOrDeclineBookingResponseNonNullableFields {
2733
+ results: BulkBookingResultNonNullableFields[];
2734
+ bulkActionMetadata?: BulkActionMetadataNonNullableFields;
2735
+ }
2736
+ export {};