@wix/auto_sdk_bookings_bookings 1.0.15 → 1.0.16

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