@wix/auto_sdk_bookings_bookings 1.0.25 → 1.0.27

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