@wix/auto_sdk_bookings_bookings 1.0.17 → 1.0.19

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