@wix/auto_sdk_bookings_bookings 1.0.14 → 1.0.16

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