@wix/auto_sdk_bookings_bookings 1.0.18 → 1.0.20

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