@wix/auto_sdk_bookings_bookings 1.0.24 → 1.0.26

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