@wix/auto_sdk_bookings_multi-service-availability-time-slots 1.0.0 → 1.0.1
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.
- package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.context.d.ts +1 -1
- package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.d.ts +281 -135
- package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.js.map +1 -1
- package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal.d.ts +286 -135
- package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal.js.map +1 -1
- package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.context.d.ts +1 -1
- package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.d.ts +281 -135
- package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.js.map +1 -1
- package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal.d.ts +286 -135
- package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal.js.map +1 -1
- package/build/internal/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.context.d.ts +1 -1
- package/build/internal/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.d.ts +281 -135
- package/build/internal/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.js.map +1 -1
- package/build/internal/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal.d.ts +286 -135
- package/build/internal/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal.js.map +1 -1
- package/build/internal/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.context.d.ts +1 -1
- package/build/internal/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.d.ts +281 -135
- package/build/internal/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.js.map +1 -1
- package/build/internal/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal.d.ts +286 -135
- package/build/internal/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal.js.map +1 -1
- package/package.json +2 -2
@@ -22,16 +22,19 @@ export interface TimeSlot {
|
|
22
22
|
*
|
23
23
|
* > Not returned from `MultiServiceAvailabilityTimeSlots` API calls.
|
24
24
|
* > Instead, each nested time slot has its own serviceId.
|
25
|
+
* @format GUID
|
25
26
|
*/
|
26
27
|
serviceId?: string | null;
|
27
28
|
/**
|
28
29
|
* Local start date of the time slot in ISO-8601 format.
|
29
30
|
* For example, "2024-01-30T13:30:00".
|
31
|
+
* @format LOCAL_DATE_TIME
|
30
32
|
*/
|
31
33
|
localStartDate?: string | null;
|
32
34
|
/**
|
33
35
|
* Local end date of the time slot in ISO-8601 format.
|
34
36
|
* For example, "2024-01-30T14:30:00".
|
37
|
+
* @format LOCAL_DATE_TIME
|
35
38
|
*/
|
36
39
|
localEndDate?: string | null;
|
37
40
|
/**
|
@@ -43,11 +46,16 @@ export interface TimeSlot {
|
|
43
46
|
bookable?: boolean | null;
|
44
47
|
/** The geographic location of the slot. */
|
45
48
|
location?: Location;
|
46
|
-
/**
|
49
|
+
/**
|
50
|
+
* Total number of spots for the slot.
|
51
|
+
* @min 1
|
52
|
+
* @max 1000
|
53
|
+
*/
|
47
54
|
totalCapacity?: number | null;
|
48
55
|
/**
|
49
56
|
* Remaining number of spots for the slot.
|
50
57
|
* For example, for an appointment service with total capacity of 1 spot and one booked spot, the remaining capacity will be 0.
|
58
|
+
* @max 1000
|
51
59
|
*/
|
52
60
|
remainingCapacity?: number | null;
|
53
61
|
/**
|
@@ -68,11 +76,15 @@ export interface TimeSlot {
|
|
68
76
|
/**
|
69
77
|
* > Nested time slots.
|
70
78
|
* > Returned only from `MultiServiceAvailabilityTimeSlots` API calls.
|
79
|
+
* @maxSize 8
|
71
80
|
*/
|
72
81
|
nestedTimeSlots?: NestedTimeSlot[];
|
73
82
|
}
|
74
83
|
export interface Location {
|
75
|
-
/**
|
84
|
+
/**
|
85
|
+
* Business Location ID. Present only if the location is a business location.
|
86
|
+
* @format GUID
|
87
|
+
*/
|
76
88
|
id?: string | null;
|
77
89
|
/** The location name. */
|
78
90
|
name?: string | null;
|
@@ -99,7 +111,10 @@ export declare enum LocationType {
|
|
99
111
|
export interface EventInfo {
|
100
112
|
}
|
101
113
|
export interface WaitingList {
|
102
|
-
/**
|
114
|
+
/**
|
115
|
+
* Total number of spots in this wait list.
|
116
|
+
* @min 1
|
117
|
+
*/
|
103
118
|
totalCapacity?: number | null;
|
104
119
|
/**
|
105
120
|
* Number of remaining spots for this wait list.
|
@@ -117,7 +132,10 @@ export interface BookingPolicyViolations {
|
|
117
132
|
bookOnlineDisabled?: boolean | null;
|
118
133
|
}
|
119
134
|
export interface AvailableResources {
|
120
|
-
/**
|
135
|
+
/**
|
136
|
+
* Resource type ID.
|
137
|
+
* @format GUID
|
138
|
+
*/
|
121
139
|
resourceTypeId?: string | null;
|
122
140
|
/**
|
123
141
|
* Available resources for the time slot.
|
@@ -147,149 +165,42 @@ export interface AvailableResources {
|
|
147
165
|
hasMoreAvailableResources?: boolean | null;
|
148
166
|
}
|
149
167
|
export interface Resource {
|
150
|
-
/**
|
168
|
+
/**
|
169
|
+
* Resource ID.
|
170
|
+
* @format GUID
|
171
|
+
*/
|
151
172
|
id?: string;
|
152
|
-
/**
|
173
|
+
/**
|
174
|
+
* Resource name.
|
175
|
+
* @minLength 1
|
176
|
+
*/
|
153
177
|
name?: string | null;
|
154
178
|
}
|
155
179
|
export interface NestedTimeSlot {
|
156
|
-
/**
|
180
|
+
/**
|
181
|
+
* Service ID of the nested time slot.
|
182
|
+
* @format GUID
|
183
|
+
*/
|
157
184
|
serviceId?: string;
|
158
185
|
/**
|
159
186
|
* Local start date of the nested time slot in ISO-8601 format.
|
160
187
|
* For example, "2024-01-30T13:30:00".
|
188
|
+
* @format LOCAL_DATE_TIME
|
161
189
|
*/
|
162
190
|
localStartDate?: string;
|
163
191
|
/**
|
164
192
|
* Local end date of the nested time slot in ISO-8601 format.
|
165
193
|
* For example, "2024-01-30T14:30:00".
|
194
|
+
* @format LOCAL_DATE_TIME
|
166
195
|
*/
|
167
196
|
localEndDate?: string;
|
168
197
|
/**
|
169
198
|
* List of `AvailableResources` for the nested time slot.
|
170
199
|
* Each `AvailableResources` contains information about available resources of the same type.
|
200
|
+
* @maxSize 10
|
171
201
|
*/
|
172
202
|
availableResources?: AvailableResources[];
|
173
203
|
}
|
174
|
-
export interface CalculateEventBasedAvailabilityRequest {
|
175
|
-
serviceIds?: string[];
|
176
|
-
from?: string;
|
177
|
-
to?: string;
|
178
|
-
timeZone?: string;
|
179
|
-
/**
|
180
|
-
* TODO good definition of what bookable means https://github.com/wix-private/scheduler/pull/18267/files?file-filters%5B%5D=.proto&show-viewed-files=true#r1199809006
|
181
|
-
* TODO: Locks are not taken into account. // Class is not supported yet. (relevant only for classes with waiting list)
|
182
|
-
* Aliza's suggestion to consider locks in bookable
|
183
|
-
*/
|
184
|
-
bookable?: boolean | null;
|
185
|
-
/** support filtering by location type, or by locationId. Other fields like `name` are ignored */
|
186
|
-
location?: Location[];
|
187
|
-
resourceIds?: string[];
|
188
|
-
/** if not empty, return slots with openSpots >= X */
|
189
|
-
openSpots?: number | null;
|
190
|
-
/**
|
191
|
-
* each nested field is checked on its own. i.e. if `too_early_to_book` is defined and `too_late_to_book` is not defined
|
192
|
-
* we will return slots for which `too_early_to_book` is same as on the request, regardless of `too_late_to_book`.
|
193
|
-
*/
|
194
|
-
bookingPolicyViolations?: BookingPolicyViolations;
|
195
|
-
/**
|
196
|
-
* Maximum number of slots to load for each date. For example, if `slots_per_day` is set to `3`,
|
197
|
-
* at most 3 available slots are returned for each day in the date range specified in the query's
|
198
|
-
* `filter`.
|
199
|
-
*
|
200
|
-
* When a day has both bookable and non-bookable slots, bookable slots are returned first.
|
201
|
-
* Non-bookable slots are returned according to the specified filters, after all
|
202
|
-
* bookable slots are already included.
|
203
|
-
*/
|
204
|
-
slotsPerDay?: number | null;
|
205
|
-
cursorPaging?: CommonCursorPaging;
|
206
|
-
}
|
207
|
-
export interface CommonCursorPaging {
|
208
|
-
/** Maximum number of items to return in the results. */
|
209
|
-
limit?: number | null;
|
210
|
-
/**
|
211
|
-
* Pointer to the next or previous page in the list of results.
|
212
|
-
*
|
213
|
-
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
214
|
-
* Not relevant for the first request.
|
215
|
-
*/
|
216
|
-
cursor?: string | null;
|
217
|
-
}
|
218
|
-
export interface CalculateEventBasedAvailabilityResponse {
|
219
|
-
slots?: TimeSlot[];
|
220
|
-
cursorPagingMetadata?: CommonCursorPagingMetadata;
|
221
|
-
}
|
222
|
-
export interface CommonCursorPagingMetadata {
|
223
|
-
/** Number of items returned in the response. */
|
224
|
-
count?: number | null;
|
225
|
-
/** Cursor strings that point to the next page, previous page, or both. */
|
226
|
-
cursors?: CommonCursors;
|
227
|
-
/**
|
228
|
-
* Whether there are more pages to retrieve following the current page.
|
229
|
-
*
|
230
|
-
* + `true`: Another page of results can be retrieved.
|
231
|
-
* + `false`: This is the last page.
|
232
|
-
*/
|
233
|
-
hasNext?: boolean | null;
|
234
|
-
}
|
235
|
-
export interface CommonCursors {
|
236
|
-
/** Cursor string pointing to the next page in the list of results. */
|
237
|
-
next?: string | null;
|
238
|
-
/** Cursor pointing to the previous page in the list of results. */
|
239
|
-
prev?: string | null;
|
240
|
-
}
|
241
|
-
export interface ListEventTimeSlotsRequest {
|
242
|
-
/** The services for which the time slots are being returned. */
|
243
|
-
serviceIds?: string[] | null;
|
244
|
-
/**
|
245
|
-
* Local start date for which event time slots are returned, in ISO-8601 format.
|
246
|
-
* E.g, "2024-01-30T13:30:00".
|
247
|
-
* Required, unless `cursorPaging` is provided.
|
248
|
-
*/
|
249
|
-
fromLocalDate?: string | null;
|
250
|
-
/**
|
251
|
-
* Local end date for which event time slots are returned, in ISO-8601 format.
|
252
|
-
* E.g, "2024-01-30T13:30:00".
|
253
|
-
* Required, unless `cursorPaging` is provided.
|
254
|
-
*/
|
255
|
-
toLocalDate?: string | null;
|
256
|
-
/**
|
257
|
-
* The time zone, in IANA time zone format.
|
258
|
-
* Default is the Wix Business time zone.
|
259
|
-
*/
|
260
|
-
timeZone?: string | null;
|
261
|
-
/** TODO good definition of what bookable means https://github.com/wix-private/scheduler/pull/18267/files?file-filters%5B%5D=.proto&show-viewed-files=true#r1199809006 */
|
262
|
-
bookable?: boolean | null;
|
263
|
-
/** support filtering by location type, or by locationId. Other fields like `name` are ignored */
|
264
|
-
location?: Location[];
|
265
|
-
/** TODO: maxsize && do we need include_resource_type_id here? also is the behavior is the same as availabilityTimeSlots, we won't return resources by default? */
|
266
|
-
resourceIds?: string[] | null;
|
267
|
-
/** if not empty, return slots with remainingCapacity >= X */
|
268
|
-
remainingCapacity?: number | null;
|
269
|
-
/**
|
270
|
-
* each nested field is checked on its own. i.e. if `too_early_to_book` is defined and `too_late_to_book` is not defined
|
271
|
-
* we will return slots for which `too_early_to_book` is same as on the request, regardless of `too_late_to_book`.
|
272
|
-
*/
|
273
|
-
bookingPolicyViolations?: BookingPolicyViolations;
|
274
|
-
/**
|
275
|
-
* Maximum number of slots to load for each date. For example, if `slots_per_day` is set to `3`,
|
276
|
-
* at most 3 available slots are returned for each day in the date range specified in the query's
|
277
|
-
* `filter`.
|
278
|
-
*
|
279
|
-
* When a day has both bookable and non-bookable slots, bookable slots are returned first.
|
280
|
-
* Non-bookable slots are returned according to the specified filters, after all
|
281
|
-
* bookable slots are already included.
|
282
|
-
*/
|
283
|
-
timeSlotsPerDay?: number | null;
|
284
|
-
cursorPaging?: CommonCursorPaging;
|
285
|
-
}
|
286
|
-
export interface ListEventTimeSlotsResponse {
|
287
|
-
/** TODO: maxsize */
|
288
|
-
timeSlots?: TimeSlot[];
|
289
|
-
/** The time zone, in IANA time zone format. */
|
290
|
-
timeZone?: string | null;
|
291
|
-
cursorPagingMetadata?: CommonCursorPagingMetadata;
|
292
|
-
}
|
293
204
|
export interface ListMultiServiceAvailabilityTimeSlotsRequest {
|
294
205
|
/**
|
295
206
|
* Services for which the multiService time slots are being returned for.
|
@@ -299,6 +210,7 @@ export interface ListMultiServiceAvailabilityTimeSlotsRequest {
|
|
299
210
|
* MaxSize: `8`.
|
300
211
|
*
|
301
212
|
* Required, unless `cursorPaging`.`cursor` is provided.
|
213
|
+
* @maxSize 8
|
302
214
|
*/
|
303
215
|
services?: Service[];
|
304
216
|
/**
|
@@ -309,6 +221,7 @@ export interface ListMultiServiceAvailabilityTimeSlotsRequest {
|
|
309
221
|
* within the provided `fromLocalDate` and `toLocalDate` exclusive.
|
310
222
|
*
|
311
223
|
* Required, unless `cursorPaging`.`cursor` is provided.
|
224
|
+
* @format LOCAL_DATE_TIME
|
312
225
|
*/
|
313
226
|
fromLocalDate?: string | null;
|
314
227
|
/**
|
@@ -319,12 +232,15 @@ export interface ListMultiServiceAvailabilityTimeSlotsRequest {
|
|
319
232
|
* within the provided `fromLocalDate` and `toLocalDate` exclusive.
|
320
233
|
*
|
321
234
|
* Required, unless `cursorPaging`.`cursor` is provided.
|
235
|
+
* @format LOCAL_DATE_TIME
|
322
236
|
*/
|
323
237
|
toLocalDate?: string | null;
|
324
238
|
/**
|
325
239
|
* Time zone, in IANA time zone format.
|
326
240
|
*
|
327
241
|
* Required, unless `cursorPaging`.`cursor` is provided.
|
242
|
+
* @minLength 1
|
243
|
+
* @maxLength 150
|
328
244
|
*/
|
329
245
|
timeZone?: string | null;
|
330
246
|
/**
|
@@ -405,9 +321,16 @@ export interface ListMultiServiceAvailabilityTimeSlotsRequest {
|
|
405
321
|
cursorPaging?: CursorPaging;
|
406
322
|
}
|
407
323
|
export interface Service {
|
408
|
-
/**
|
324
|
+
/**
|
325
|
+
* Service ID.
|
326
|
+
* @format GUID
|
327
|
+
*/
|
409
328
|
serviceId?: string;
|
410
|
-
/**
|
329
|
+
/**
|
330
|
+
* Resources to include in response.
|
331
|
+
* @format GUID
|
332
|
+
* @maxSize 135
|
333
|
+
*/
|
411
334
|
resourceIds?: string[];
|
412
335
|
/**
|
413
336
|
* The resource type ID's to include in returned time slots.
|
@@ -417,6 +340,8 @@ export interface Service {
|
|
417
340
|
* Currently supported only for Staff Member resource type.
|
418
341
|
* Staff Member type ID: 1cd44cf8-756f-41c3-bd90-3e2ffcaf1155
|
419
342
|
* </blockquote>
|
343
|
+
* @format GUID
|
344
|
+
* @maxSize 100
|
420
345
|
*/
|
421
346
|
includeResourceTypeIds?: string[];
|
422
347
|
/**
|
@@ -436,6 +361,8 @@ export interface V2CustomerChoices {
|
|
436
361
|
* The selected customer duration in minutes.
|
437
362
|
* Min: `1 minute`
|
438
363
|
* Max: `44639 minutes` (30 days, 23 hours, and 59 minutes)
|
364
|
+
* @min 1
|
365
|
+
* @max 44639
|
439
366
|
*/
|
440
367
|
durationInMinutes?: number | null;
|
441
368
|
}
|
@@ -445,6 +372,7 @@ export interface CursorPaging {
|
|
445
372
|
*
|
446
373
|
* Default: `1000`.
|
447
374
|
* Max: `1000`.
|
375
|
+
* @max 1000
|
448
376
|
*/
|
449
377
|
limit?: number | null;
|
450
378
|
/**
|
@@ -457,11 +385,16 @@ export interface CursorPaging {
|
|
457
385
|
cursor?: string | null;
|
458
386
|
}
|
459
387
|
export interface ListMultiServiceAvailabilityTimeSlotsResponse {
|
460
|
-
/**
|
388
|
+
/**
|
389
|
+
* Time slots.
|
390
|
+
* @maxSize 1000
|
391
|
+
*/
|
461
392
|
timeSlots?: TimeSlot[];
|
462
393
|
/**
|
463
394
|
* Time zone, in IANA time zone format.
|
464
395
|
* Shared for all TimeSlots in response.
|
396
|
+
* @minLength 1
|
397
|
+
* @maxLength 150
|
465
398
|
*/
|
466
399
|
timeZone?: string | null;
|
467
400
|
/**
|
@@ -502,19 +435,27 @@ export interface GetMultiServiceAvailabilityTimeSlotRequest {
|
|
502
435
|
*
|
503
436
|
* MinSize: 2.
|
504
437
|
* MaxSize: 8.
|
438
|
+
* @minSize 2
|
439
|
+
* @maxSize 8
|
505
440
|
*/
|
506
441
|
services: Service[];
|
507
442
|
/**
|
508
443
|
* Local start date of the time slot, in ISO-8601 format.
|
509
444
|
* For example, "2024-01-30T13:30:00".
|
445
|
+
* @format LOCAL_DATE_TIME
|
510
446
|
*/
|
511
447
|
localStartDate: string;
|
512
448
|
/**
|
513
449
|
* Local end date of the time slot, in ISO-8601 format.
|
514
450
|
* For example, "2024-01-30T14:30:00".
|
451
|
+
* @format LOCAL_DATE_TIME
|
515
452
|
*/
|
516
453
|
localEndDate: string;
|
517
|
-
/**
|
454
|
+
/**
|
455
|
+
* Time zone, in IANA time zone format.
|
456
|
+
* @minLength 1
|
457
|
+
* @maxLength 150
|
458
|
+
*/
|
518
459
|
timeZone: string | null;
|
519
460
|
/**
|
520
461
|
* The location of the time slot.
|
@@ -532,7 +473,11 @@ export interface GetMultiServiceAvailabilityTimeSlotRequest {
|
|
532
473
|
export interface GetMultiServiceAvailabilityTimeSlotResponse {
|
533
474
|
/** Time slot. */
|
534
475
|
timeSlot?: TimeSlot;
|
535
|
-
/**
|
476
|
+
/**
|
477
|
+
* The time zone, in IANA time zone format.
|
478
|
+
* @minLength 1
|
479
|
+
* @maxLength 150
|
480
|
+
*/
|
536
481
|
timeZone?: string | null;
|
537
482
|
}
|
538
483
|
export interface ListAvailabilityTimeSlotsRequest {
|
@@ -541,6 +486,7 @@ export interface ListAvailabilityTimeSlotsRequest {
|
|
541
486
|
* Currently supported only for services of type `APPOINTMENT`.
|
542
487
|
*
|
543
488
|
* Required, unless `cursorPaging`.`cursor` is provided.
|
489
|
+
* @format GUID
|
544
490
|
*/
|
545
491
|
serviceId?: string | null;
|
546
492
|
/**
|
@@ -551,6 +497,7 @@ export interface ListAvailabilityTimeSlotsRequest {
|
|
551
497
|
* within the provided `fromLocalDate` and `toLocalDate` exclusive.
|
552
498
|
*
|
553
499
|
* Required, unless `cursorPaging`.`cursor` is provided.
|
500
|
+
* @format LOCAL_DATE_TIME
|
554
501
|
*/
|
555
502
|
fromLocalDate?: string | null;
|
556
503
|
/**
|
@@ -561,12 +508,15 @@ export interface ListAvailabilityTimeSlotsRequest {
|
|
561
508
|
* within the provided `fromLocalDate` and `toLocalDate` exclusive.
|
562
509
|
*
|
563
510
|
* Required, unless `cursorPaging`.`cursor` is provided.
|
511
|
+
* @format LOCAL_DATE_TIME
|
564
512
|
*/
|
565
513
|
toLocalDate?: string | null;
|
566
514
|
/**
|
567
515
|
* Time zone, in IANA time zone format.
|
568
516
|
*
|
569
517
|
* Required, unless `cursorPaging`.`cursor` is provided.
|
518
|
+
* @minLength 1
|
519
|
+
* @maxLength 150
|
570
520
|
*/
|
571
521
|
timeZone?: string | null;
|
572
522
|
/**
|
@@ -584,6 +534,7 @@ export interface ListAvailabilityTimeSlotsRequest {
|
|
584
534
|
* Supports filtering by location type, or by location ID. </br>
|
585
535
|
* Other fields like <code class="grey-background">name</code> are ignored.</p>
|
586
536
|
* </blockquote>
|
537
|
+
* @maxSize 5
|
587
538
|
*/
|
588
539
|
locations?: Location[];
|
589
540
|
/**
|
@@ -592,6 +543,8 @@ export interface ListAvailabilityTimeSlotsRequest {
|
|
592
543
|
* If specified,
|
593
544
|
* the returned TimeSlots will contain __up__ to 10 available resources out of the provided list.
|
594
545
|
* Otherwise, the returned TimeSlots returns with an empty `AvailableResources`.
|
546
|
+
* @format GUID
|
547
|
+
* @maxSize 135
|
595
548
|
* @deprecated
|
596
549
|
*/
|
597
550
|
resourceIds?: string[];
|
@@ -600,6 +553,8 @@ export interface ListAvailabilityTimeSlotsRequest {
|
|
600
553
|
*
|
601
554
|
* If specified in request, the returned TimeSlots will contain __up__ to 10 `AvailableResources` with `ResourceTypeId`
|
602
555
|
* out of those specified, each contains __up__ to 10 available resources of this type.
|
556
|
+
* @format GUID
|
557
|
+
* @maxSize 100
|
603
558
|
*/
|
604
559
|
includeResourceTypeIds?: string[];
|
605
560
|
/**
|
@@ -662,6 +617,7 @@ export interface ListAvailabilityTimeSlotsRequest {
|
|
662
617
|
/**
|
663
618
|
* resources filter
|
664
619
|
* If specified, only time slots with these resources will be returned.
|
620
|
+
* @maxSize 3
|
665
621
|
*/
|
666
622
|
resourceTypes?: ResourceType[];
|
667
623
|
}
|
@@ -674,24 +630,37 @@ export interface CustomerChoices {
|
|
674
630
|
* The selected customer duration in minutes.
|
675
631
|
* Min: `1 minute`
|
676
632
|
* Max: `44639 minutes` (30 days, 23 hours, and 59 minutes)
|
633
|
+
* @min 1
|
634
|
+
* @max 44639
|
677
635
|
*/
|
678
636
|
durationInMinutes?: number | null;
|
679
637
|
}
|
680
638
|
export interface ResourceType {
|
681
|
-
/**
|
639
|
+
/**
|
640
|
+
* Resource type ID.
|
641
|
+
* @format GUID
|
642
|
+
*/
|
682
643
|
resourceTypeId?: string | null;
|
683
644
|
/**
|
684
645
|
* Resource IDs.
|
685
646
|
* The response will contain only slots that have at least one of the specified resources.
|
647
|
+
* @format GUID
|
648
|
+
* @minSize 1
|
649
|
+
* @maxSize 135
|
686
650
|
*/
|
687
651
|
resourceIds?: string[] | null;
|
688
652
|
}
|
689
653
|
export interface ListAvailabilityTimeSlotsResponse {
|
690
|
-
/**
|
654
|
+
/**
|
655
|
+
* Time slots.
|
656
|
+
* @maxSize 1000
|
657
|
+
*/
|
691
658
|
timeSlots?: TimeSlot[];
|
692
659
|
/**
|
693
660
|
* Time zone, in IANA time zone format.
|
694
661
|
* Shared for all TimeSlots in response.
|
662
|
+
* @minLength 1
|
663
|
+
* @maxLength 150
|
695
664
|
*/
|
696
665
|
timeZone?: string | null;
|
697
666
|
/**
|
@@ -713,19 +682,26 @@ export interface GetAvailabilityTimeSlotRequest {
|
|
713
682
|
/**
|
714
683
|
* Service ID of the time slot.
|
715
684
|
* Currently supported only for services of type `APPOINTMENT`.
|
685
|
+
* @format GUID
|
716
686
|
*/
|
717
687
|
serviceId?: string;
|
718
688
|
/**
|
719
689
|
* Local start date of the time slot, in ISO-8601 format.
|
720
690
|
* For example, "2024-01-30T13:30:00".
|
691
|
+
* @format LOCAL_DATE_TIME
|
721
692
|
*/
|
722
693
|
localStartDate?: string;
|
723
694
|
/**
|
724
695
|
* Local end date of the time slot, in ISO-8601 format.
|
725
696
|
* For example, "2024-01-30T14:30:00".
|
697
|
+
* @format LOCAL_DATE_TIME
|
726
698
|
*/
|
727
699
|
localEndDate?: string;
|
728
|
-
/**
|
700
|
+
/**
|
701
|
+
* Time zone, in IANA time zone format.
|
702
|
+
* @minLength 1
|
703
|
+
* @maxLength 150
|
704
|
+
*/
|
729
705
|
timeZone?: string | null;
|
730
706
|
/**
|
731
707
|
* The location of the time slot.
|
@@ -745,6 +721,8 @@ export interface GetAvailabilityTimeSlotRequest {
|
|
745
721
|
* If specified,
|
746
722
|
* the returned `TimeSlot` contains only the available resources out of provided list.
|
747
723
|
* Otherwise, the returned `TimeSlot` returned with all possible `AvailableResources`.
|
724
|
+
* @format GUID
|
725
|
+
* @maxSize 135
|
748
726
|
*/
|
749
727
|
resourceIds?: string[];
|
750
728
|
/**
|
@@ -752,15 +730,183 @@ export interface GetAvailabilityTimeSlotRequest {
|
|
752
730
|
*
|
753
731
|
* If specified in request, the returned `TimeSlot` contains only the `AvailableResources` with `ResourceTypeId`
|
754
732
|
* out of those specified, each contains all the available resources of this type.
|
733
|
+
* @format GUID
|
734
|
+
* @maxSize 100
|
755
735
|
*/
|
756
736
|
includeResourceTypeIds?: string[];
|
757
737
|
}
|
758
738
|
export interface GetAvailabilityTimeSlotResponse {
|
759
739
|
/** Time slot. */
|
760
740
|
timeSlot?: TimeSlot;
|
761
|
-
/**
|
741
|
+
/**
|
742
|
+
* Time zone, in IANA time zone format.
|
743
|
+
* @minLength 1
|
744
|
+
* @maxLength 150
|
745
|
+
*/
|
762
746
|
timeZone?: string | null;
|
763
747
|
}
|
748
|
+
export interface CalculateEventBasedAvailabilityRequest {
|
749
|
+
/**
|
750
|
+
* @format GUID
|
751
|
+
* @minSize 1
|
752
|
+
* @maxSize 5
|
753
|
+
*/
|
754
|
+
serviceIds?: string[];
|
755
|
+
/** @maxLength 100 */
|
756
|
+
from?: string;
|
757
|
+
/** @maxLength 100 */
|
758
|
+
to?: string;
|
759
|
+
/** @maxLength 30 */
|
760
|
+
timeZone?: string;
|
761
|
+
/**
|
762
|
+
* TODO good definition of what bookable means https://github.com/wix-private/scheduler/pull/18267/files?file-filters%5B%5D=.proto&show-viewed-files=true#r1199809006
|
763
|
+
* TODO: Locks are not taken into account. // Class is not supported yet. (relevant only for classes with waiting list)
|
764
|
+
* Aliza's suggestion to consider locks in bookable
|
765
|
+
*/
|
766
|
+
bookable?: boolean | null;
|
767
|
+
/**
|
768
|
+
* support filtering by location type, or by locationId. Other fields like `name` are ignored
|
769
|
+
* @maxSize 5
|
770
|
+
*/
|
771
|
+
location?: Location[];
|
772
|
+
/**
|
773
|
+
* @format GUID
|
774
|
+
* @maxSize 5
|
775
|
+
*/
|
776
|
+
resourceIds?: string[];
|
777
|
+
/** if not empty, return slots with openSpots >= X */
|
778
|
+
openSpots?: number | null;
|
779
|
+
/**
|
780
|
+
* each nested field is checked on its own. i.e. if `too_early_to_book` is defined and `too_late_to_book` is not defined
|
781
|
+
* we will return slots for which `too_early_to_book` is same as on the request, regardless of `too_late_to_book`.
|
782
|
+
*/
|
783
|
+
bookingPolicyViolations?: BookingPolicyViolations;
|
784
|
+
/**
|
785
|
+
* Maximum number of slots to load for each date. For example, if `slots_per_day` is set to `3`,
|
786
|
+
* at most 3 available slots are returned for each day in the date range specified in the query's
|
787
|
+
* `filter`.
|
788
|
+
*
|
789
|
+
* When a day has both bookable and non-bookable slots, bookable slots are returned first.
|
790
|
+
* Non-bookable slots are returned according to the specified filters, after all
|
791
|
+
* bookable slots are already included.
|
792
|
+
*/
|
793
|
+
slotsPerDay?: number | null;
|
794
|
+
cursorPaging?: CommonCursorPaging;
|
795
|
+
}
|
796
|
+
export interface CommonCursorPaging {
|
797
|
+
/**
|
798
|
+
* Maximum number of items to return in the results.
|
799
|
+
* @max 100
|
800
|
+
*/
|
801
|
+
limit?: number | null;
|
802
|
+
/**
|
803
|
+
* Pointer to the next or previous page in the list of results.
|
804
|
+
*
|
805
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
806
|
+
* Not relevant for the first request.
|
807
|
+
* @maxLength 16000
|
808
|
+
*/
|
809
|
+
cursor?: string | null;
|
810
|
+
}
|
811
|
+
export interface CalculateEventBasedAvailabilityResponse {
|
812
|
+
slots?: TimeSlot[];
|
813
|
+
cursorPagingMetadata?: CommonCursorPagingMetadata;
|
814
|
+
}
|
815
|
+
export interface CommonCursorPagingMetadata {
|
816
|
+
/** Number of items returned in current page. */
|
817
|
+
count?: number | null;
|
818
|
+
/** Cursor strings that point to the next page, previous page, or both. */
|
819
|
+
cursors?: CommonCursors;
|
820
|
+
/**
|
821
|
+
* Whether there are more pages to retrieve following the current page.
|
822
|
+
*
|
823
|
+
* + `true`: Another page of results can be retrieved.
|
824
|
+
* + `false`: This is the last page.
|
825
|
+
*/
|
826
|
+
hasNext?: boolean | null;
|
827
|
+
}
|
828
|
+
export interface CommonCursors {
|
829
|
+
/**
|
830
|
+
* Cursor string pointing to the next page in the list of results.
|
831
|
+
* @maxLength 16000
|
832
|
+
*/
|
833
|
+
next?: string | null;
|
834
|
+
/**
|
835
|
+
* Cursor pointing to the previous page in the list of results.
|
836
|
+
* @maxLength 16000
|
837
|
+
*/
|
838
|
+
prev?: string | null;
|
839
|
+
}
|
840
|
+
export interface ListEventTimeSlotsRequest {
|
841
|
+
/**
|
842
|
+
* The services for which the time slots are being returned.
|
843
|
+
* @format GUID
|
844
|
+
* @minSize 1
|
845
|
+
* @maxSize 5
|
846
|
+
*/
|
847
|
+
serviceIds?: string[] | null;
|
848
|
+
/**
|
849
|
+
* Local start date for which event time slots are returned, in ISO-8601 format.
|
850
|
+
* E.g, "2024-01-30T13:30:00".
|
851
|
+
* Required, unless `cursorPaging` is provided.
|
852
|
+
* @format LOCAL_DATE_TIME
|
853
|
+
*/
|
854
|
+
fromLocalDate?: string | null;
|
855
|
+
/**
|
856
|
+
* Local end date for which event time slots are returned, in ISO-8601 format.
|
857
|
+
* E.g, "2024-01-30T13:30:00".
|
858
|
+
* Required, unless `cursorPaging` is provided.
|
859
|
+
* @format LOCAL_DATE_TIME
|
860
|
+
*/
|
861
|
+
toLocalDate?: string | null;
|
862
|
+
/**
|
863
|
+
* The time zone, in IANA time zone format.
|
864
|
+
* Default is the Wix Business time zone.
|
865
|
+
* @maxLength 30
|
866
|
+
*/
|
867
|
+
timeZone?: string | null;
|
868
|
+
/** TODO good definition of what bookable means https://github.com/wix-private/scheduler/pull/18267/files?file-filters%5B%5D=.proto&show-viewed-files=true#r1199809006 */
|
869
|
+
bookable?: boolean | null;
|
870
|
+
/**
|
871
|
+
* support filtering by location type, or by locationId. Other fields like `name` are ignored
|
872
|
+
* @maxSize 5
|
873
|
+
*/
|
874
|
+
location?: Location[];
|
875
|
+
/**
|
876
|
+
* TODO: maxsize && do we need include_resource_type_id here? also is the behavior is the same as availabilityTimeSlots, we won't return resources by default?
|
877
|
+
* @format GUID
|
878
|
+
* @maxSize 5
|
879
|
+
*/
|
880
|
+
resourceIds?: string[] | null;
|
881
|
+
/** if not empty, return slots with remainingCapacity >= X */
|
882
|
+
remainingCapacity?: number | null;
|
883
|
+
/**
|
884
|
+
* each nested field is checked on its own. i.e. if `too_early_to_book` is defined and `too_late_to_book` is not defined
|
885
|
+
* we will return slots for which `too_early_to_book` is same as on the request, regardless of `too_late_to_book`.
|
886
|
+
*/
|
887
|
+
bookingPolicyViolations?: BookingPolicyViolations;
|
888
|
+
/**
|
889
|
+
* Maximum number of slots to load for each date. For example, if `slots_per_day` is set to `3`,
|
890
|
+
* at most 3 available slots are returned for each day in the date range specified in the query's
|
891
|
+
* `filter`.
|
892
|
+
*
|
893
|
+
* When a day has both bookable and non-bookable slots, bookable slots are returned first.
|
894
|
+
* Non-bookable slots are returned according to the specified filters, after all
|
895
|
+
* bookable slots are already included.
|
896
|
+
*/
|
897
|
+
timeSlotsPerDay?: number | null;
|
898
|
+
cursorPaging?: CommonCursorPaging;
|
899
|
+
}
|
900
|
+
export interface ListEventTimeSlotsResponse {
|
901
|
+
/** TODO: maxsize */
|
902
|
+
timeSlots?: TimeSlot[];
|
903
|
+
/**
|
904
|
+
* The time zone, in IANA time zone format.
|
905
|
+
* @maxLength 30
|
906
|
+
*/
|
907
|
+
timeZone?: string | null;
|
908
|
+
cursorPagingMetadata?: CommonCursorPagingMetadata;
|
909
|
+
}
|
764
910
|
interface LocationNonNullableFields {
|
765
911
|
locationType: LocationType;
|
766
912
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.js","sourceRoot":"","sources":["../../../../src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.ts"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,"file":"bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.js","sourceRoot":"","sources":["../../../../src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.ts"],"names":[],"mappings":";;;AAsGA,IAAY,YAQX;AARD,WAAY,YAAY;IACtB,+DAA+C,CAAA;IAC/C,4HAA4H;IAC5H,qCAAqB,CAAA;IACrB,iGAAiG;IACjG,iCAAiB,CAAA;IACjB,mFAAmF;IACnF,qCAAqB,CAAA;AACvB,CAAC,EARW,YAAY,4BAAZ,YAAY,QAQvB"}
|