@wix/auto_sdk_bookings_event-time-slots 1.0.0

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 (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/bookings-availability-v2-time-slot-event-time-slots.context.d.ts +6 -0
  11. package/build/cjs/src/bookings-availability-v2-time-slot-event-time-slots.context.js +10 -0
  12. package/build/cjs/src/bookings-availability-v2-time-slot-event-time-slots.context.js.map +1 -0
  13. package/build/cjs/src/bookings-availability-v2-time-slot-event-time-slots.http.d.ts +18 -0
  14. package/build/cjs/src/bookings-availability-v2-time-slot-event-time-slots.http.js +209 -0
  15. package/build/cjs/src/bookings-availability-v2-time-slot-event-time-slots.http.js.map +1 -0
  16. package/build/cjs/src/bookings-availability-v2-time-slot-event-time-slots.meta.d.ts +16 -0
  17. package/build/cjs/src/bookings-availability-v2-time-slot-event-time-slots.meta.js +66 -0
  18. package/build/cjs/src/bookings-availability-v2-time-slot-event-time-slots.meta.js.map +1 -0
  19. package/build/cjs/src/bookings-availability-v2-time-slot-event-time-slots.public.d.ts +32 -0
  20. package/build/cjs/src/bookings-availability-v2-time-slot-event-time-slots.public.js +20 -0
  21. package/build/cjs/src/bookings-availability-v2-time-slot-event-time-slots.public.js.map +1 -0
  22. package/build/cjs/src/bookings-availability-v2-time-slot-event-time-slots.types.d.ts +885 -0
  23. package/build/cjs/src/bookings-availability-v2-time-slot-event-time-slots.types.js +14 -0
  24. package/build/cjs/src/bookings-availability-v2-time-slot-event-time-slots.types.js.map +1 -0
  25. package/build/cjs/src/bookings-availability-v2-time-slot-event-time-slots.universal.d.ts +1026 -0
  26. package/build/cjs/src/bookings-availability-v2-time-slot-event-time-slots.universal.js +174 -0
  27. package/build/cjs/src/bookings-availability-v2-time-slot-event-time-slots.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/bookings-availability-v2-time-slot-event-time-slots.context.d.ts +6 -0
  39. package/build/es/src/bookings-availability-v2-time-slot-event-time-slots.context.js +6 -0
  40. package/build/es/src/bookings-availability-v2-time-slot-event-time-slots.context.js.map +1 -0
  41. package/build/es/src/bookings-availability-v2-time-slot-event-time-slots.http.d.ts +18 -0
  42. package/build/es/src/bookings-availability-v2-time-slot-event-time-slots.http.js +204 -0
  43. package/build/es/src/bookings-availability-v2-time-slot-event-time-slots.http.js.map +1 -0
  44. package/build/es/src/bookings-availability-v2-time-slot-event-time-slots.meta.d.ts +16 -0
  45. package/build/es/src/bookings-availability-v2-time-slot-event-time-slots.meta.js +38 -0
  46. package/build/es/src/bookings-availability-v2-time-slot-event-time-slots.meta.js.map +1 -0
  47. package/build/es/src/bookings-availability-v2-time-slot-event-time-slots.public.d.ts +32 -0
  48. package/build/es/src/bookings-availability-v2-time-slot-event-time-slots.public.js +14 -0
  49. package/build/es/src/bookings-availability-v2-time-slot-event-time-slots.public.js.map +1 -0
  50. package/build/es/src/bookings-availability-v2-time-slot-event-time-slots.types.d.ts +885 -0
  51. package/build/es/src/bookings-availability-v2-time-slot-event-time-slots.types.js +11 -0
  52. package/build/es/src/bookings-availability-v2-time-slot-event-time-slots.types.js.map +1 -0
  53. package/build/es/src/bookings-availability-v2-time-slot-event-time-slots.universal.d.ts +1026 -0
  54. package/build/es/src/bookings-availability-v2-time-slot-event-time-slots.universal.js +146 -0
  55. package/build/es/src/bookings-availability-v2-time-slot-event-time-slots.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/bookings-availability-v2-time-slot-event-time-slots.context.d.ts +6 -0
  66. package/build/internal/cjs/src/bookings-availability-v2-time-slot-event-time-slots.context.js +10 -0
  67. package/build/internal/cjs/src/bookings-availability-v2-time-slot-event-time-slots.context.js.map +1 -0
  68. package/build/internal/cjs/src/bookings-availability-v2-time-slot-event-time-slots.http.d.ts +18 -0
  69. package/build/internal/cjs/src/bookings-availability-v2-time-slot-event-time-slots.http.js +209 -0
  70. package/build/internal/cjs/src/bookings-availability-v2-time-slot-event-time-slots.http.js.map +1 -0
  71. package/build/internal/cjs/src/bookings-availability-v2-time-slot-event-time-slots.meta.d.ts +16 -0
  72. package/build/internal/cjs/src/bookings-availability-v2-time-slot-event-time-slots.meta.js +66 -0
  73. package/build/internal/cjs/src/bookings-availability-v2-time-slot-event-time-slots.meta.js.map +1 -0
  74. package/build/internal/cjs/src/bookings-availability-v2-time-slot-event-time-slots.public.d.ts +32 -0
  75. package/build/internal/cjs/src/bookings-availability-v2-time-slot-event-time-slots.public.js +20 -0
  76. package/build/internal/cjs/src/bookings-availability-v2-time-slot-event-time-slots.public.js.map +1 -0
  77. package/build/internal/cjs/src/bookings-availability-v2-time-slot-event-time-slots.types.d.ts +885 -0
  78. package/build/internal/cjs/src/bookings-availability-v2-time-slot-event-time-slots.types.js +14 -0
  79. package/build/internal/cjs/src/bookings-availability-v2-time-slot-event-time-slots.types.js.map +1 -0
  80. package/build/internal/cjs/src/bookings-availability-v2-time-slot-event-time-slots.universal.d.ts +1026 -0
  81. package/build/internal/cjs/src/bookings-availability-v2-time-slot-event-time-slots.universal.js +174 -0
  82. package/build/internal/cjs/src/bookings-availability-v2-time-slot-event-time-slots.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/bookings-availability-v2-time-slot-event-time-slots.context.d.ts +6 -0
  93. package/build/internal/es/src/bookings-availability-v2-time-slot-event-time-slots.context.js +6 -0
  94. package/build/internal/es/src/bookings-availability-v2-time-slot-event-time-slots.context.js.map +1 -0
  95. package/build/internal/es/src/bookings-availability-v2-time-slot-event-time-slots.http.d.ts +18 -0
  96. package/build/internal/es/src/bookings-availability-v2-time-slot-event-time-slots.http.js +204 -0
  97. package/build/internal/es/src/bookings-availability-v2-time-slot-event-time-slots.http.js.map +1 -0
  98. package/build/internal/es/src/bookings-availability-v2-time-slot-event-time-slots.meta.d.ts +16 -0
  99. package/build/internal/es/src/bookings-availability-v2-time-slot-event-time-slots.meta.js +38 -0
  100. package/build/internal/es/src/bookings-availability-v2-time-slot-event-time-slots.meta.js.map +1 -0
  101. package/build/internal/es/src/bookings-availability-v2-time-slot-event-time-slots.public.d.ts +32 -0
  102. package/build/internal/es/src/bookings-availability-v2-time-slot-event-time-slots.public.js +14 -0
  103. package/build/internal/es/src/bookings-availability-v2-time-slot-event-time-slots.public.js.map +1 -0
  104. package/build/internal/es/src/bookings-availability-v2-time-slot-event-time-slots.types.d.ts +885 -0
  105. package/build/internal/es/src/bookings-availability-v2-time-slot-event-time-slots.types.js +11 -0
  106. package/build/internal/es/src/bookings-availability-v2-time-slot-event-time-slots.types.js.map +1 -0
  107. package/build/internal/es/src/bookings-availability-v2-time-slot-event-time-slots.universal.d.ts +1026 -0
  108. package/build/internal/es/src/bookings-availability-v2-time-slot-event-time-slots.universal.js +146 -0
  109. package/build/internal/es/src/bookings-availability-v2-time-slot-event-time-slots.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,885 @@
1
+ /**
2
+ * The `TimeSlot` object represents the availability information
3
+ * for an `Appointment` service's specific slot, including:
4
+ *
5
+ * 1. Whether the slot is bookable for the given service?
6
+ *
7
+ * 2. In what location the service is available for this slot?
8
+ *
9
+ * 3. Which available resources can provide the service for this slot?
10
+ *
11
+ * 4. Does booking the slot for the service violates any of the service booking policies?
12
+ *
13
+ * 5. What is the total capacity and remaining capacity of the service at the time of the calculation of the `TimeSlot`?
14
+ *
15
+ * > __Note:__
16
+ * > When the `TimeSlot` has a non empty `NestedTimeSlots`, it represents the availability information
17
+ * > for a given list of `Appointment` services within a specific time slot.
18
+ */
19
+ export interface TimeSlot {
20
+ /**
21
+ * Service ID.
22
+ *
23
+ * > Not returned from `MultiServiceAvailabilityTimeSlots` API calls.
24
+ * > Instead, each nested time slot has its own serviceId.
25
+ * @format GUID
26
+ */
27
+ serviceId?: string | null;
28
+ /**
29
+ * Local start date of the time slot in ISO-8601 format.
30
+ * For example, "2024-01-30T13:30:00".
31
+ * @format LOCAL_DATE_TIME
32
+ */
33
+ localStartDate?: string | null;
34
+ /**
35
+ * Local end date of the time slot in ISO-8601 format.
36
+ * For example, "2024-01-30T14:30:00".
37
+ * @format LOCAL_DATE_TIME
38
+ */
39
+ localEndDate?: string | null;
40
+ /**
41
+ * Whether the slot is bookable according to the service's booking policies.
42
+ *
43
+ * If booking this time slot does not violates any of the service's booking policies,
44
+ * the returned value is `true`. Otherwise, returns `false`.
45
+ */
46
+ bookable?: boolean | null;
47
+ /** The geographic location of the slot. */
48
+ location?: Location;
49
+ /** The event information if the time slot is an event based slot. */
50
+ eventInfo?: EventInfo;
51
+ /**
52
+ * Total number of spots for the slot.
53
+ * @min 1
54
+ * @max 1000
55
+ */
56
+ totalCapacity?: number | null;
57
+ /**
58
+ * Remaining number of spots for the slot.
59
+ * For example, for an appointment service with total capacity of 1 spot and one booked spot, the remaining capacity will be 0.
60
+ * @max 1000
61
+ */
62
+ remainingCapacity?: number | null;
63
+ /**
64
+ * Number of spots in the slot that are available for booking.
65
+ * This is calculated as the remaining capacity minus the spots reserved for the waiting list.
66
+ */
67
+ bookableCapacity?: number | null;
68
+ /**
69
+ * Indicators for booking policy violations for the slot.
70
+ *
71
+ * Each nested field is checked on its own. i.e. if `tooEarlyToBook` is defined and `bookOnlineDisabled` is not defined
72
+ * we will return also slots for which `tooEarlyToBook` is same as on the request, regardless of `bookOnlineDisabled`.
73
+ */
74
+ bookingPolicyViolations?: BookingPolicyViolations;
75
+ /**
76
+ * List of `AvailableResources` for the time slot.
77
+ * Each `AvailableResources` contains information about available resources of the same type.
78
+ *
79
+ * > Not returned from `MultiServiceAvailabilityTimeSlots` API calls.
80
+ * > Instead, each nested time slot has its own available resources.
81
+ */
82
+ availableResources?: AvailableResources[];
83
+ /**
84
+ * > Nested time slots.
85
+ * > Returned only from `MultiServiceAvailabilityTimeSlots` API calls.
86
+ * @maxSize 8
87
+ */
88
+ nestedTimeSlots?: NestedTimeSlot[];
89
+ /** Reasons why the time slot is not available for booking. */
90
+ nonBookableReasons?: NonBookableReasons;
91
+ }
92
+ export interface Location {
93
+ /**
94
+ * Business Location ID. Present only if the location is a business location.
95
+ * @format GUID
96
+ */
97
+ id?: string | null;
98
+ /** The location name. */
99
+ name?: string | null;
100
+ /** A string representation for the full address of the location. */
101
+ formattedAddress?: string | null;
102
+ /**
103
+ * The type of location:
104
+ * - `CUSTOM`: The location is specific to this service, and is not derived from the business location.
105
+ * - `BUSINESS`: A business location, either the default business address, or locations defined for the business by the Business Info.
106
+ * - `CUSTOMER`: The location is determined by the customer and is not set up beforehand.
107
+ */
108
+ locationType?: LocationType;
109
+ }
110
+ export declare enum LocationType {
111
+ UNKNOWN_LOCATION_TYPE = "UNKNOWN_LOCATION_TYPE",
112
+ /** A business location, either the default business address, or locations defined for the business by the Business Info. */
113
+ BUSINESS = "BUSINESS",
114
+ /** The location is unique to this service and isn't defined as one of the business locations. */
115
+ CUSTOM = "CUSTOM",
116
+ /** The location can be determined by the customer and is not set up beforehand. */
117
+ CUSTOMER = "CUSTOMER"
118
+ }
119
+ /** relevant for event based slots, and not for availability based slots */
120
+ export interface EventInfo {
121
+ /**
122
+ * The event ID.
123
+ * @minLength 36
124
+ * @maxLength 250
125
+ */
126
+ eventId?: string | null;
127
+ /** Waiting list details for the event, if enabled in the service's booking policy. */
128
+ waitingList?: WaitingList;
129
+ }
130
+ export interface WaitingList {
131
+ /**
132
+ * Total number of spots in the waiting list.
133
+ * @min 1
134
+ */
135
+ totalCapacity?: number | null;
136
+ /**
137
+ * Number of remaining spots in the waiting list.
138
+ * For example, a yoga event with a capacity of `10` and `3` registrants will have a `remainingCapacity` of `7`.
139
+ */
140
+ remainingCapacity?: number | null;
141
+ }
142
+ export interface BookingPolicyViolations {
143
+ /** Bookings policy violation. Too early to book this slot. */
144
+ tooEarlyToBook?: boolean | null;
145
+ /** The earliest time at which booking for this slot is allowed, in UTC format (`YYYY-MM-DDThh:mm:ss.sssZ`). */
146
+ earliestBookingDate?: Date | null;
147
+ /** Bookings policy violation. Too late to book this slot. */
148
+ tooLateToBook?: boolean | null;
149
+ /** Bookings policy violation. Online booking is disabled for the `TimeSlot` service. */
150
+ bookOnlineDisabled?: boolean | null;
151
+ }
152
+ export interface AvailableResources {
153
+ /**
154
+ * Resource type ID.
155
+ * @format GUID
156
+ */
157
+ resourceTypeId?: string | null;
158
+ /**
159
+ * Available resources for the time slot.
160
+ *
161
+ * + When returned from `ListAvailabilityTimeSlots`, empty by default.
162
+ * + + If you provided `includeResourceTypeIds` or `resourceIds` in request,
163
+ * contains __up__ to 10 available resources out of those provided.
164
+ *
165
+ * + When returned from `GetAvailabilityTimeSlots`, contains all available resources by default.
166
+ * + + If you provided `includeResourceTypeIds` or `resourceIds` in request,
167
+ * contains all of the available resources out of those provided.
168
+ *
169
+ *
170
+ * > + When returned from `ListMultiServiceAvailabilityTimeSlots`, empty by default.
171
+ * > + + If you provided `includeResourceTypeIds` or `resourceIds` in request,
172
+ * > contains __up__ to 10 available resources out of those provided.
173
+ *
174
+ * > + When returned from `GetMultiServiceAvailabilityTimeSlots`, contains all available resources by default.
175
+ * > + + If you provided `includeResourceTypeIds` or `resourceIds` in request,
176
+ * > contains all of the available resources out of those provided.
177
+ */
178
+ resources?: Resource[];
179
+ /**
180
+ * Whether there are more available resources for the slot that are not listed in `resources` due to size limitations.
181
+ * @readonly
182
+ */
183
+ hasMoreAvailableResources?: boolean | null;
184
+ }
185
+ export interface Resource {
186
+ /**
187
+ * Resource ID.
188
+ * @format GUID
189
+ */
190
+ id?: string;
191
+ /**
192
+ * Resource name.
193
+ * @minLength 1
194
+ */
195
+ name?: string | null;
196
+ }
197
+ export interface NestedTimeSlot {
198
+ /**
199
+ * Service ID of the nested time slot.
200
+ * @format GUID
201
+ */
202
+ serviceId?: string;
203
+ /**
204
+ * Local start date of the nested time slot in ISO-8601 format.
205
+ * For example, "2024-01-30T13:30:00".
206
+ * @format LOCAL_DATE_TIME
207
+ */
208
+ localStartDate?: string;
209
+ /**
210
+ * Local end date of the nested time slot in ISO-8601 format.
211
+ * For example, "2024-01-30T14:30:00".
212
+ * @format LOCAL_DATE_TIME
213
+ */
214
+ localEndDate?: string;
215
+ /**
216
+ * List of `AvailableResources` for the nested time slot.
217
+ * Each `AvailableResources` contains information about available resources of the same type.
218
+ * @maxSize 10
219
+ */
220
+ availableResources?: AvailableResources[];
221
+ }
222
+ export interface NonBookableReasons {
223
+ /** The slot is fully booked with no remaining capacity. */
224
+ noRemainingCapacity?: boolean | null;
225
+ /** Booking this slot would violate the service's booking policy. */
226
+ violatesBookingPolicy?: boolean | null;
227
+ /** The slot is reserved for the waiting list and not available for direct booking. */
228
+ reservedForWaitingList?: boolean | null;
229
+ }
230
+ export interface ListMultiServiceAvailabilityTimeSlotsRequest {
231
+ /**
232
+ * Services for which the multiService time slots are being returned for.
233
+ * Each service contains its own resources filters within.
234
+ *
235
+ * MinSize: `2`.
236
+ * MaxSize: `8`.
237
+ *
238
+ * Required, unless `cursorPaging`.`cursor` is provided.
239
+ * @maxSize 8
240
+ */
241
+ services?: Service[];
242
+ /**
243
+ * Lower boundary for `localStartDate` to include in response, in ISO-8601 format.
244
+ * For example, "2024-01-30T13:30:00".
245
+ *
246
+ * Each returned `TimeSlot` in response has a `localStartDate`
247
+ * within the provided `fromLocalDate` and `toLocalDate` exclusive.
248
+ *
249
+ * Required, unless `cursorPaging`.`cursor` is provided.
250
+ * @format LOCAL_DATE_TIME
251
+ */
252
+ fromLocalDate?: string | null;
253
+ /**
254
+ * Upper boundary for `localStartDate` to include in response, in ISO-8601 format.
255
+ * For example, "2024-01-30T14:30:00".
256
+ *
257
+ * Each returned `TimeSlot` in response has a `localStartDate`
258
+ * within the provided `fromLocalDate` and `toLocalDate` exclusive.
259
+ *
260
+ * Required, unless `cursorPaging`.`cursor` is provided.
261
+ * @format LOCAL_DATE_TIME
262
+ */
263
+ toLocalDate?: string | null;
264
+ /**
265
+ * Time zone, in IANA time zone format.
266
+ *
267
+ * Required, unless `cursorPaging`.`cursor` is provided.
268
+ * @minLength 1
269
+ * @maxLength 150
270
+ */
271
+ timeZone?: string | null;
272
+ /**
273
+ * Location for which the multiService TimeSlots are being returned for.
274
+ *
275
+ * You can specify location or location type for which the TimeSlots will be returned for.
276
+ * If locationType is `BUSINESS`, you __must__ provide a locationId.
277
+ *
278
+ * <blockquote class="warning">
279
+ * <p><strong>warning:</strong><br/>
280
+ * Supports filtering by location type, or by location ID. </br>
281
+ * Other fields like <code class="grey-background">name</code> are ignored.</p>
282
+ * </blockquote>
283
+ *
284
+ * Required, unless `cursorPaging`.`cursor` is provided.
285
+ */
286
+ location?: Location;
287
+ /**
288
+ * Whether the `TimeSlot` is bookable according to all of the services booking policies.
289
+ *
290
+ * If booking any of the `TimeSlot`.`NestedTimeSlot`s violates any of its services bookings policies,
291
+ * returns as `false`. Otherwise, returns as `true`.
292
+ *
293
+ * > __Note:__
294
+ * > A `TimeSlot` with a `NestedTimeSlot` that doesn't meet its service's bookings policies will be returned with `bookable` = false,
295
+ * > while a `TimeSlot` with no available resources will not be returned at all.
296
+ */
297
+ bookable?: boolean | null;
298
+ /**
299
+ * Indicators for service's booking policy violations for booking the `TimeSlot`.
300
+ *
301
+ * A bookable time slot must not violate any policy,
302
+ * therefor, this filter is only relevant when `bookable` filter is false.
303
+ *
304
+ * Each nested field is checked on all `NestedTimeSlot`s. For example, if only one of the `NestedTimeSlot`'s
305
+ * has a service with `tooEarlyToBook` same as in the request, we return the `TimeSlot` regardless of whether
306
+ * the other `NestedTimeSlots` has the same `tooEarlyToBook` as in request.
307
+ *
308
+ * Each nested field is checked on its own. For example, if `tooEarlyToBook` is defined and `bookOnlineDisabled` is not defined
309
+ * we return slots for which `tooEarlyToBook` is same as on the request, regardless of `bookOnlineDisabled`.
310
+ */
311
+ bookingPolicyViolations?: BookingPolicyViolations;
312
+ /**
313
+ * Maximum number of slots to load for each day. For example, if `timeSlotsPerDay` is set to `3`,
314
+ * we return at most 3 available TimeSlots for each day within the date range specified in request.
315
+ *
316
+ * By default,
317
+ * if `bookable` filter was not specified,
318
+ * and a day has both `bookable` and `un-bookable` slots, `bookable` slots are returned first.
319
+ *
320
+ * If the number of `bookable` slots is less than the requested `timeSlotsPerDay`,
321
+ * `un-bookable` slots will be returned according to the specified filters.
322
+ */
323
+ timeSlotsPerDay?: number | null;
324
+ /**
325
+ * CursorPaging.
326
+ *
327
+ * Enables you to fetch TimeSlots in smaller, more manageable chunks
328
+ * by setting a limit on the number of results returned in response.
329
+ * This is useful in order to enhance efficiency of data retrieval and reduce load on both the client and server.
330
+ *
331
+ * If there are more results than the specified limit, the response will contain a `cursorPagingMetaData`
332
+ * with a cursor pointing to next page of results. In order to fetch the next page of results, you should pass the
333
+ * returned cursor to the next call as `cursorPaging`.`cursor`.
334
+ *
335
+ * For the first call, you should only specify the `limit` for the results page.
336
+ * For each following call, you should only pass the previous returned cursor as `cursorPaging`.`cursor`
337
+ * the `cursorPaging`.`limit`. You may pass a different `limit`.
338
+ * No need to specify any additional parameters.
339
+ *
340
+ * <blockquote class="important">
341
+ * <p><strong>Important:</strong><br/>
342
+ * If you only provide a <code class="grey-background">cursorPaging</code>. <code class="grey-background">cursor</code>,
343
+ * the response will contain the default size of results which is `1000`.
344
+ * </p>
345
+ * </blockquote>
346
+ */
347
+ cursorPaging?: CursorPaging;
348
+ }
349
+ export interface Service {
350
+ /**
351
+ * Service ID.
352
+ * @format GUID
353
+ */
354
+ serviceId?: string;
355
+ /**
356
+ * Resources to include in response.
357
+ * @format GUID
358
+ * @maxSize 135
359
+ */
360
+ resourceIds?: string[];
361
+ /**
362
+ * The resource type ID's to include in returned time slots.
363
+ * This is in addition to the specifically requested resources.
364
+ *
365
+ * <blockquote class="important">
366
+ * Currently supported only for Staff Member resource type.
367
+ * Staff Member type ID: 1cd44cf8-756f-41c3-bd90-3e2ffcaf1155
368
+ * </blockquote>
369
+ * @format GUID
370
+ * @maxSize 100
371
+ */
372
+ includeResourceTypeIds?: string[];
373
+ /**
374
+ * Selected customer choices.
375
+ * If specified, the selected choices will be used to calculate service configuration.
376
+ * If not specified, the service default configuration will be used.
377
+ * Enforcing this field is the responsibility of the SPI implementer, and not by the Availability API.
378
+ */
379
+ customerChoices?: V2CustomerChoices;
380
+ }
381
+ /**
382
+ * Selected customer choices.
383
+ * These choices are selected by the customer during the booking flow and can be utilized to calculate the corresponding service's configuration properties.
384
+ */
385
+ export interface V2CustomerChoices {
386
+ /**
387
+ * The selected customer duration in minutes.
388
+ * Min: `1 minute`
389
+ * Max: `44639 minutes` (30 days, 23 hours, and 59 minutes)
390
+ * @min 1
391
+ * @max 44639
392
+ */
393
+ durationInMinutes?: number | null;
394
+ /**
395
+ * The selected add-ons IDs.
396
+ * Max: Derived from max amount of Add-On groups * max amount of Add-Ons per group.
397
+ * @format GUID
398
+ * @maxSize 21
399
+ */
400
+ addOnIds?: string[] | null;
401
+ }
402
+ export interface CursorPaging {
403
+ /**
404
+ * Number of results to load.
405
+ *
406
+ * Default: `1000`.
407
+ * Max: `1000`.
408
+ * @max 1000
409
+ */
410
+ limit?: number | null;
411
+ /**
412
+ * Pointer to the next or previous page in the list of results.
413
+ *
414
+ * You can get the relevant cursor token
415
+ * from the `pagingMetadata` object in the previous call's response.
416
+ * Not relevant for the first request.
417
+ */
418
+ cursor?: string | null;
419
+ }
420
+ export interface ListMultiServiceAvailabilityTimeSlotsResponse {
421
+ /**
422
+ * Time slots.
423
+ * @maxSize 1000
424
+ */
425
+ timeSlots?: TimeSlot[];
426
+ /**
427
+ * Time zone, in IANA time zone format.
428
+ * Shared for all TimeSlots in response.
429
+ * @minLength 1
430
+ * @maxLength 150
431
+ */
432
+ timeZone?: string | null;
433
+ /**
434
+ * CursorPagingMetaData.
435
+ * Contains information about the next page of results.
436
+ *
437
+ * By default,
438
+ * if there are more than 1000 results,
439
+ * the response will contain a `cursorPagingMetaData` with a cursor to the next page of results.
440
+ *
441
+ * <blockquote class="important">
442
+ * <p><strong>Important:</strong><br/>
443
+ * <code class="grey-background">count</code> is not supported.</p>
444
+ * </blockquote>
445
+ */
446
+ cursorPagingMetadata?: CursorPagingMetadata;
447
+ }
448
+ export interface CursorPagingMetadata {
449
+ /** Offset that was requested. */
450
+ cursors?: Cursors;
451
+ /**
452
+ * Indicates if there are more results after the current page.
453
+ * If `true`, another page of results can be retrieved.
454
+ * If `false`, this is the last page.
455
+ */
456
+ hasNext?: boolean | null;
457
+ }
458
+ export interface Cursors {
459
+ /** Cursor pointing to next page in the list of results. */
460
+ next?: string | null;
461
+ /** Cursor pointing to previous page in the list of results. */
462
+ prev?: string | null;
463
+ }
464
+ export interface GetMultiServiceAvailabilityTimeSlotRequest {
465
+ /**
466
+ * Services for which the multiService TimeSlots are being returned for.
467
+ * Each service contains its own resources filters within.
468
+ *
469
+ * MinSize: 2.
470
+ * MaxSize: 8.
471
+ * @minSize 2
472
+ * @maxSize 8
473
+ */
474
+ services?: Service[];
475
+ /**
476
+ * Local start date of the time slot, in ISO-8601 format.
477
+ * For example, "2024-01-30T13:30:00".
478
+ * @format LOCAL_DATE_TIME
479
+ */
480
+ localStartDate?: string;
481
+ /**
482
+ * Local end date of the time slot, in ISO-8601 format.
483
+ * For example, "2024-01-30T14:30:00".
484
+ * @format LOCAL_DATE_TIME
485
+ */
486
+ localEndDate?: string;
487
+ /**
488
+ * Time zone, in IANA time zone format.
489
+ * @minLength 1
490
+ * @maxLength 150
491
+ */
492
+ timeZone?: string | null;
493
+ /**
494
+ * The location of the time slot.
495
+ *
496
+ * You must provide a specific `locationType`.
497
+ * If locationType is `BUSINESS`, you __must__ also provide a `locationId`.
498
+ *
499
+ * <blockquote class="warning">
500
+ * <p>Supports filtering by location type, or by location ID.
501
+ * Other fields like <code class="grey-background">name</code> are ignored.</p>
502
+ * </blockquote>
503
+ */
504
+ location?: Location;
505
+ }
506
+ export interface GetMultiServiceAvailabilityTimeSlotResponse {
507
+ /** Time slot. */
508
+ timeSlot?: TimeSlot;
509
+ /**
510
+ * The time zone, in IANA time zone format.
511
+ * @minLength 1
512
+ * @maxLength 150
513
+ */
514
+ timeZone?: string | null;
515
+ }
516
+ export interface ListAvailabilityTimeSlotsRequest {
517
+ /**
518
+ * Service ID for which the time slots are being returned for.
519
+ * Currently supported only for services of type `APPOINTMENT`.
520
+ *
521
+ * Required, unless `cursorPaging`.`cursor` is provided.
522
+ * @format GUID
523
+ */
524
+ serviceId?: string | null;
525
+ /**
526
+ * Lower boundary for `localStartDate` to include in response, in ISO-8601 format.
527
+ * For example, "2024-01-30T13:30:00".
528
+ *
529
+ * Each returned `TimeSlot` in response has a `localStartDate`
530
+ * within the provided `fromLocalDate` and `toLocalDate` exclusive.
531
+ *
532
+ * Required, unless `cursorPaging`.`cursor` is provided.
533
+ * @format LOCAL_DATE_TIME
534
+ */
535
+ fromLocalDate?: string | null;
536
+ /**
537
+ * Upper boundary for `localStartDate` to include in response, in ISO-8601 format.
538
+ * For example, "2024-01-30T14:30:00".
539
+ *
540
+ * Each returned `TimeSlot` in response has a `localStartDate`
541
+ * within the provided `fromLocalDate` and `toLocalDate` exclusive.
542
+ *
543
+ * Required, unless `cursorPaging`.`cursor` is provided.
544
+ * @format LOCAL_DATE_TIME
545
+ */
546
+ toLocalDate?: string | null;
547
+ /**
548
+ * Time zone, in IANA time zone format.
549
+ *
550
+ * Required, unless `cursorPaging`.`cursor` is provided.
551
+ * @minLength 1
552
+ * @maxLength 150
553
+ */
554
+ timeZone?: string | null;
555
+ /**
556
+ * Locations to include in response.
557
+ *
558
+ * By default,
559
+ * if no locations are provided,
560
+ * the response contains TimeSlots for all locations where the service is available.
561
+ *
562
+ * You can specify locations or location types for which the time slots will be returned for.
563
+ * If locationType is `BUSINESS`, you __must__ provide a locationId.
564
+ *
565
+ * <blockquote class="warning">
566
+ * <p><strong>warning:</strong><br/>
567
+ * Supports filtering by location type, or by location ID. </br>
568
+ * Other fields like <code class="grey-background">name</code> are ignored.</p>
569
+ * </blockquote>
570
+ * @maxSize 5
571
+ */
572
+ locations?: Location[];
573
+ /**
574
+ * Resources to include in response.
575
+ *
576
+ * If specified,
577
+ * the returned TimeSlots will contain __up__ to 10 available resources out of the provided list.
578
+ * Otherwise, the returned TimeSlots returns with an empty `AvailableResources`.
579
+ * @format GUID
580
+ * @maxSize 135
581
+ * @deprecated
582
+ */
583
+ resourceIds?: string[];
584
+ /**
585
+ * Resource type ID's to include in response, this is in addition to the requested `resourceIds`.
586
+ *
587
+ * If specified in request, the returned TimeSlots will contain __up__ to 10 `AvailableResources` with `ResourceTypeId`
588
+ * out of those specified, each contains __up__ to 10 available resources of this type.
589
+ * @format GUID
590
+ * @maxSize 100
591
+ */
592
+ includeResourceTypeIds?: string[];
593
+ /**
594
+ * Whether the `TimeSlot` is bookable according to the service's booking policies.
595
+ *
596
+ * If booking this `TimeSlot` does not violates any of the service's booking policies,
597
+ * returns as `true`. Otherwise, returns as `false`.
598
+ *
599
+ * > __Note:__
600
+ * > A time slot that doesn't meet the service's bookings policies will be returned with `bookable` = false,
601
+ * > while a time slot with no available resources will not be returned at all.
602
+ */
603
+ bookable?: boolean | null;
604
+ /**
605
+ * Indicators for service's booking policy violations for booking the `TimeSlot`.
606
+ *
607
+ * A bookable time slot must not violate any policy,
608
+ * therefor, this filter is only relevant when `bookable` filter is false.
609
+ *
610
+ * Each nested field is checked on its own. i.e. if `tooEarlyToBook` is defined and `bookOnlineDisabled` is not defined
611
+ * we return slots for which `tooEarlyToBook` is same as on the request, regardless of `bookOnlineDisabled`.
612
+ */
613
+ bookingPolicyViolations?: BookingPolicyViolations;
614
+ /**
615
+ * Maximum number of slots to load for each day. For example, if `timeSlotsPerDay` is set to `3`,
616
+ * we return at most 3 available TimeSlots for each day within the date range specified in request.
617
+ *
618
+ * By default,
619
+ * if `bookable` filter was not specified,
620
+ * and a day has both `bookable` and `un-bookable` slots, `bookable` slots are returned first.
621
+ *
622
+ * If the number of `bookable` slots is less than the requested `timeSlotsPerDay`,
623
+ * `un-bookable` slots will be returned according to the specified filters.
624
+ */
625
+ timeSlotsPerDay?: number | null;
626
+ /**
627
+ * CursorPaging.
628
+ *
629
+ * Enables you to fetch results in smaller, more manageable chunks
630
+ * by setting a limit on the number of results returned in response.
631
+ * This is useful in order to enhance efficiency of data retrieval and reduce load on both the client and server.
632
+ *
633
+ * If there are more results than the specified limit, the response will contain a `cursorPagingMetaData`
634
+ * with a cursor pointing to next page of results. In order to fetch the next page of results, you should pass the
635
+ * returned cursor to the next call as `cursorPaging`.`cursor`.
636
+ *
637
+ * For the first call, you should only specify the `limit` for the results page.
638
+ * For each following call, you should only pass `cursorPaging`.`cursor` with the returned cursor from previous call, and
639
+ * a `cursorPaging`.`limit`.
640
+ * No need to specify any additional parameters.
641
+ *
642
+ * <blockquote class="important">
643
+ * <p><strong>Important:</strong><br/>
644
+ * If you only provide a <code class="grey-background">cursorPaging</code>. <code class="grey-background">cursor</code>,
645
+ * the response will contain the default size of results which is `1000`.
646
+ * </p>
647
+ * </blockquote>
648
+ */
649
+ cursorPaging?: CursorPaging;
650
+ /**
651
+ * resources filter
652
+ * If specified, only time slots with these resources will be returned.
653
+ * @maxSize 3
654
+ */
655
+ resourceTypes?: ResourceType[];
656
+ }
657
+ /**
658
+ * Selected customer choices.
659
+ * These choices are selected by the customer during the booking flow and can be utilized to calculate the corresponding service's configuration properties.
660
+ */
661
+ export interface CustomerChoices {
662
+ /**
663
+ * The selected customer duration in minutes.
664
+ * Min: `1 minute`
665
+ * Max: `44639 minutes` (30 days, 23 hours, and 59 minutes)
666
+ * @min 1
667
+ * @max 44639
668
+ */
669
+ durationInMinutes?: number | null;
670
+ /**
671
+ * The selected add-ons IDs.
672
+ * Max: Derived from max amount of Add-On groups * max amount of Add-Ons per group.
673
+ * @format GUID
674
+ * @maxSize 21
675
+ */
676
+ addOnIds?: string[] | null;
677
+ }
678
+ export interface ResourceType {
679
+ /**
680
+ * Resource type ID.
681
+ * @format GUID
682
+ */
683
+ resourceTypeId?: string | null;
684
+ /**
685
+ * Resource IDs.
686
+ * The response will contain only slots that have at least one of the specified resources.
687
+ * @format GUID
688
+ * @minSize 1
689
+ * @maxSize 135
690
+ */
691
+ resourceIds?: string[] | null;
692
+ }
693
+ export interface ListAvailabilityTimeSlotsResponse {
694
+ /**
695
+ * Time slots.
696
+ * @maxSize 1000
697
+ */
698
+ timeSlots?: TimeSlot[];
699
+ /**
700
+ * Time zone, in IANA time zone format.
701
+ * Shared for all TimeSlots in response.
702
+ * @minLength 1
703
+ * @maxLength 150
704
+ */
705
+ timeZone?: string | null;
706
+ /**
707
+ * CursorPagingMetaData.
708
+ * Contains information about the next page of results.
709
+ *
710
+ * By default,
711
+ * if there are more than 1000 results,
712
+ * the response will contain a `cursorPagingMetaData` with a cursor to the next page of results.
713
+ *
714
+ * <blockquote class="important">
715
+ * <p><strong>Important:</strong><br/>
716
+ * <code class="grey-background">count</code> is not supported.</p>
717
+ * </blockquote>
718
+ */
719
+ cursorPagingMetadata?: CursorPagingMetadata;
720
+ }
721
+ export interface GetAvailabilityTimeSlotRequest {
722
+ /**
723
+ * Service ID of the time slot.
724
+ * Currently supported only for services of type `APPOINTMENT`.
725
+ * @format GUID
726
+ */
727
+ serviceId?: string;
728
+ /**
729
+ * Local start date of the time slot, in ISO-8601 format.
730
+ * For example, "2024-01-30T13:30:00".
731
+ * @format LOCAL_DATE_TIME
732
+ */
733
+ localStartDate?: string;
734
+ /**
735
+ * Local end date of the time slot, in ISO-8601 format.
736
+ * For example, "2024-01-30T14:30:00".
737
+ * @format LOCAL_DATE_TIME
738
+ */
739
+ localEndDate?: string;
740
+ /**
741
+ * Time zone, in IANA time zone format.
742
+ * @minLength 1
743
+ * @maxLength 150
744
+ */
745
+ timeZone?: string | null;
746
+ /**
747
+ * The location of the time slot.
748
+ *
749
+ * You must provide a specific `locationType`.
750
+ * If locationType is `BUSINESS`, you __must__ also provide a `locationId`.
751
+ *
752
+ * <blockquote class="warning">
753
+ * <p>Supports filtering by location type, or by location ID.
754
+ * Other fields like <code class="grey-background">name</code> are ignored.</p>
755
+ * </blockquote>
756
+ */
757
+ location?: Location;
758
+ /**
759
+ * Resources to include in response.
760
+ *
761
+ * If specified,
762
+ * the returned `TimeSlot` contains only the available resources out of provided list.
763
+ * Otherwise, the returned `TimeSlot` returned with all possible `AvailableResources`.
764
+ * @format GUID
765
+ * @maxSize 135
766
+ */
767
+ resourceIds?: string[];
768
+ /**
769
+ * Resource type IDs to include in response, this is in addition to the requested `resourceIds`.
770
+ *
771
+ * If specified in request, the returned `TimeSlot` contains only the `AvailableResources` with `ResourceTypeId`
772
+ * out of those specified, each contains all the available resources of this type.
773
+ * @format GUID
774
+ * @maxSize 100
775
+ */
776
+ includeResourceTypeIds?: string[];
777
+ }
778
+ export interface GetAvailabilityTimeSlotResponse {
779
+ /** Time slot. */
780
+ timeSlot?: TimeSlot;
781
+ /**
782
+ * Time zone, in IANA time zone format.
783
+ * @minLength 1
784
+ * @maxLength 150
785
+ */
786
+ timeZone?: string | null;
787
+ }
788
+ export interface ListEventTimeSlotsRequest {
789
+ /**
790
+ * Local start date for which event time slots are returned, in ISO-8601 format.
791
+ * E.g., "2024-01-30T13:30:00".
792
+ * Required, unless `cursorPaging` is provided.
793
+ * @format LOCAL_DATE_TIME
794
+ */
795
+ fromLocalDate: string | null;
796
+ /**
797
+ * Local end date for which event time slots are returned, in ISO-8601 format.
798
+ * E.g., "2024-01-30T13:30:00".
799
+ * Required, unless `cursorPaging` is provided.
800
+ * @format LOCAL_DATE_TIME
801
+ */
802
+ toLocalDate?: string | null;
803
+ /**
804
+ * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database).
805
+ * For example, `America/New_York`.
806
+ *
807
+ * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties).
808
+ * @maxLength 100
809
+ */
810
+ timeZone?: string | null;
811
+ /**
812
+ * Optional service IDs to filter by.
813
+ * If not provided, time slots for all services are returned.
814
+ * @format GUID
815
+ * @maxSize 100
816
+ */
817
+ serviceIds?: string[] | null;
818
+ /**
819
+ * Whether to filter bookable slots only.
820
+ * A bookable slot is a slot that has remaining capacity and also satisfies the booking policy.
821
+ * Default false: Only bookable slots are returned.
822
+ */
823
+ includeNonBookable?: boolean | null;
824
+ /**
825
+ * Filter event time slots by the minimum bookable capacity.
826
+ * @min 1
827
+ */
828
+ minBookableCapacity?: number | null;
829
+ /**
830
+ * Optional filter to apply to the events. E.g., resource, location, etc.
831
+ * See the Events API [Supported Filters and Sorting](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/supported-filters-and-sorting) for more information.
832
+ */
833
+ eventFilter?: Record<string, any> | null;
834
+ /**
835
+ * The maximum number of time slots to return for each day.
836
+ * For example, if `maxSlotsPerDay` is set to `1`, at most 1 available slot is returned for each day.
837
+ * When a day has both bookable and non-bookable slots, bookable slots are returned first.
838
+ * If `maxSlotsPerDay` is provided, `toLocalDate` must also be provided and must be at most 1 month after `fromLocalDate`.
839
+ * @min 1
840
+ * @max 1
841
+ */
842
+ maxSlotsPerDay?: number | null;
843
+ /** Cursor to retrieve the next page of results. */
844
+ cursorPaging?: CursorPaging;
845
+ }
846
+ export interface ListEventTimeSlotsResponse {
847
+ /** Retrieved time slots matching the specified filters. */
848
+ timeSlots?: TimeSlot[];
849
+ /**
850
+ * The time slots time zone.
851
+ * Either provided explicitly or default to the business time zone.
852
+ * @minLength 1
853
+ * @maxLength 150
854
+ */
855
+ timeZone?: string | null;
856
+ /** Paging metadata. */
857
+ pagingMetadata?: CursorPagingMetadata;
858
+ }
859
+ export interface GetEventTimeSlotRequest {
860
+ /**
861
+ * The event ID.
862
+ * @minLength 36
863
+ * @maxLength 250
864
+ */
865
+ eventId: string | null;
866
+ /**
867
+ * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database).
868
+ * For example, `America/New_York`.
869
+ *
870
+ * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties).
871
+ * @maxLength 100
872
+ */
873
+ timeZone?: string | null;
874
+ }
875
+ export interface GetEventTimeSlotResponse {
876
+ /** The time slot. */
877
+ timeSlot?: TimeSlot;
878
+ /**
879
+ * The time slot time zone.
880
+ * Either provided explicitly or default to the business time zone.
881
+ * @minLength 1
882
+ * @maxLength 150
883
+ */
884
+ timeZone?: string | null;
885
+ }