@wix/auto_sdk_bookings_availability-calendar 1.0.78 → 1.0.79

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/{cjs/src/bookings-availability-v1-slot-availability-availability-calendar.types.d.ts → bookings-availability-v1-slot-availability-availability-calendar.universal-Drm9S8li.d.mts} +108 -45
  2. package/build/{internal/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.types.d.ts → bookings-availability-v1-slot-availability-availability-calendar.universal-Drm9S8li.d.ts} +108 -45
  3. package/build/{cjs/src/bookings-availability-v1-slot-availability-availability-calendar.public.d.ts → index.d.mts} +13 -9
  4. package/build/{es/src/bookings-availability-v1-slot-availability-availability-calendar.public.d.ts → index.d.ts} +13 -9
  5. package/build/index.js +410 -0
  6. package/build/index.js.map +1 -0
  7. package/build/index.mjs +381 -0
  8. package/build/index.mjs.map +1 -0
  9. package/build/{es/src/bookings-availability-v1-slot-availability-availability-calendar.types.d.ts → internal/bookings-availability-v1-slot-availability-availability-calendar.universal-Drm9S8li.d.mts} +108 -45
  10. package/build/internal/{es/src/bookings-availability-v1-slot-availability-availability-calendar.types.d.ts → bookings-availability-v1-slot-availability-availability-calendar.universal-Drm9S8li.d.ts} +108 -45
  11. package/build/internal/{es/src/bookings-availability-v1-slot-availability-availability-calendar.public.d.ts → index.d.mts} +13 -9
  12. package/build/internal/{cjs/src/bookings-availability-v1-slot-availability-availability-calendar.public.d.ts → index.d.ts} +13 -9
  13. package/build/internal/index.js +410 -0
  14. package/build/internal/index.js.map +1 -0
  15. package/build/internal/index.mjs +381 -0
  16. package/build/internal/index.mjs.map +1 -0
  17. package/build/internal/meta.d.mts +377 -0
  18. package/build/internal/meta.d.ts +377 -0
  19. package/build/internal/meta.js +306 -0
  20. package/build/internal/meta.js.map +1 -0
  21. package/build/internal/meta.mjs +277 -0
  22. package/build/internal/meta.mjs.map +1 -0
  23. package/build/meta.d.mts +377 -0
  24. package/build/meta.d.ts +377 -0
  25. package/build/meta.js +306 -0
  26. package/build/meta.js.map +1 -0
  27. package/build/meta.mjs +277 -0
  28. package/build/meta.mjs.map +1 -0
  29. package/package.json +13 -12
  30. package/build/cjs/index.d.ts +0 -1
  31. package/build/cjs/index.js +0 -18
  32. package/build/cjs/index.js.map +0 -1
  33. package/build/cjs/index.typings.d.ts +0 -1
  34. package/build/cjs/index.typings.js +0 -18
  35. package/build/cjs/index.typings.js.map +0 -1
  36. package/build/cjs/meta.d.ts +0 -1
  37. package/build/cjs/meta.js +0 -18
  38. package/build/cjs/meta.js.map +0 -1
  39. package/build/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.context.d.ts +0 -7
  40. package/build/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.context.js +0 -13
  41. package/build/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.context.js.map +0 -1
  42. package/build/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.http.d.ts +0 -93
  43. package/build/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.http.js +0 -304
  44. package/build/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.http.js.map +0 -1
  45. package/build/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.meta.d.ts +0 -17
  46. package/build/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.meta.js +0 -85
  47. package/build/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.meta.js.map +0 -1
  48. package/build/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.public.js +0 -28
  49. package/build/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.public.js.map +0 -1
  50. package/build/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.types.js +0 -26
  51. package/build/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.types.js.map +0 -1
  52. package/build/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.universal.d.ts +0 -909
  53. package/build/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.universal.js +0 -290
  54. package/build/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.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-availability-v1-slot-availability-availability-calendar.context.d.ts +0 -7
  66. package/build/es/src/bookings-availability-v1-slot-availability-availability-calendar.context.js +0 -7
  67. package/build/es/src/bookings-availability-v1-slot-availability-availability-calendar.context.js.map +0 -1
  68. package/build/es/src/bookings-availability-v1-slot-availability-availability-calendar.http.d.ts +0 -93
  69. package/build/es/src/bookings-availability-v1-slot-availability-availability-calendar.http.js +0 -298
  70. package/build/es/src/bookings-availability-v1-slot-availability-availability-calendar.http.js.map +0 -1
  71. package/build/es/src/bookings-availability-v1-slot-availability-availability-calendar.meta.d.ts +0 -17
  72. package/build/es/src/bookings-availability-v1-slot-availability-availability-calendar.meta.js +0 -56
  73. package/build/es/src/bookings-availability-v1-slot-availability-availability-calendar.meta.js.map +0 -1
  74. package/build/es/src/bookings-availability-v1-slot-availability-availability-calendar.public.js +0 -19
  75. package/build/es/src/bookings-availability-v1-slot-availability-availability-calendar.public.js.map +0 -1
  76. package/build/es/src/bookings-availability-v1-slot-availability-availability-calendar.types.js +0 -23
  77. package/build/es/src/bookings-availability-v1-slot-availability-availability-calendar.types.js.map +0 -1
  78. package/build/es/src/bookings-availability-v1-slot-availability-availability-calendar.universal.d.ts +0 -909
  79. package/build/es/src/bookings-availability-v1-slot-availability-availability-calendar.universal.js +0 -261
  80. package/build/es/src/bookings-availability-v1-slot-availability-availability-calendar.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-availability-v1-slot-availability-availability-calendar.context.d.ts +0 -7
  91. package/build/internal/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.context.js +0 -13
  92. package/build/internal/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.context.js.map +0 -1
  93. package/build/internal/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.http.d.ts +0 -93
  94. package/build/internal/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.http.js +0 -304
  95. package/build/internal/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.http.js.map +0 -1
  96. package/build/internal/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.meta.d.ts +0 -17
  97. package/build/internal/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.meta.js +0 -85
  98. package/build/internal/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.meta.js.map +0 -1
  99. package/build/internal/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.public.js +0 -28
  100. package/build/internal/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.public.js.map +0 -1
  101. package/build/internal/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.types.js +0 -26
  102. package/build/internal/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.types.js.map +0 -1
  103. package/build/internal/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.universal.d.ts +0 -909
  104. package/build/internal/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.universal.js +0 -290
  105. package/build/internal/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.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-availability-v1-slot-availability-availability-calendar.context.d.ts +0 -7
  116. package/build/internal/es/src/bookings-availability-v1-slot-availability-availability-calendar.context.js +0 -7
  117. package/build/internal/es/src/bookings-availability-v1-slot-availability-availability-calendar.context.js.map +0 -1
  118. package/build/internal/es/src/bookings-availability-v1-slot-availability-availability-calendar.http.d.ts +0 -93
  119. package/build/internal/es/src/bookings-availability-v1-slot-availability-availability-calendar.http.js +0 -298
  120. package/build/internal/es/src/bookings-availability-v1-slot-availability-availability-calendar.http.js.map +0 -1
  121. package/build/internal/es/src/bookings-availability-v1-slot-availability-availability-calendar.meta.d.ts +0 -17
  122. package/build/internal/es/src/bookings-availability-v1-slot-availability-availability-calendar.meta.js +0 -56
  123. package/build/internal/es/src/bookings-availability-v1-slot-availability-availability-calendar.meta.js.map +0 -1
  124. package/build/internal/es/src/bookings-availability-v1-slot-availability-availability-calendar.public.js +0 -19
  125. package/build/internal/es/src/bookings-availability-v1-slot-availability-availability-calendar.public.js.map +0 -1
  126. package/build/internal/es/src/bookings-availability-v1-slot-availability-availability-calendar.types.js +0 -23
  127. package/build/internal/es/src/bookings-availability-v1-slot-availability-availability-calendar.types.js.map +0 -1
  128. package/build/internal/es/src/bookings-availability-v1-slot-availability-availability-calendar.universal.d.ts +0 -909
  129. package/build/internal/es/src/bookings-availability-v1-slot-availability-availability-calendar.universal.js +0 -261
  130. package/build/internal/es/src/bookings-availability-v1-slot-availability-availability-calendar.universal.js.map +0 -1
@@ -0,0 +1,377 @@
1
+ import { i as QueryAvailabilityRequest$1, b as QueryAvailabilityResponse$1, r as GetScheduleAvailabilityRequest$1, G as GetScheduleAvailabilityResponse$1, t as CalculateMultiSlotAvailabilityRequest$1, c as CalculateMultiSlotAvailabilityResponse$1 } from './bookings-availability-v1-slot-availability-availability-calendar.universal-Drm9S8li.js';
2
+
3
+ interface SlotAvailability {
4
+ /**
5
+ * The slot for the corresponding session, when the session is either a single session
6
+ * or a specific session generated from a recurring session.
7
+ */
8
+ slot?: Slot;
9
+ /**
10
+ * Whether the slot is bookable. Bookability is determined by checking a
11
+ * session's open slots and booking policies. Locks are not taken into
12
+ * account.
13
+ */
14
+ bookable?: boolean;
15
+ /**
16
+ * Total number of spots for this slot.
17
+ * For example, if a session has a total of 10 spots and 3 spots are booked,
18
+ * `spotsTotal` is 10 and `openSpots` is 7.
19
+ */
20
+ totalSpots?: number | null;
21
+ /** Number of open spots for this slot. */
22
+ openSpots?: number | null;
23
+ /** An object describing the slot's waitlist and its occupancy. */
24
+ waitingList?: AvailabilityWaitingList;
25
+ /** Booking policy violations for the slot. */
26
+ bookingPolicyViolations?: BookingPolicyViolations;
27
+ /**
28
+ * Indicates whether the slot is locked because a waitlist exists.
29
+ * When a slot frees up, the slot is offered to the next customer on the waitlist. Read-only.
30
+ */
31
+ locked?: boolean | null;
32
+ isFromV2?: boolean;
33
+ }
34
+ interface Slot {
35
+ /**
36
+ * ID for the slot's corresponding session, when the session is either a single session
37
+ * or a specific session generated from a recurring session.
38
+ *
39
+ * Deprecated. Please use `eventId` instead.
40
+ * @deprecated ID for the slot's corresponding session, when the session is either a single session
41
+ * or a specific session generated from a recurring session.
42
+ *
43
+ * Deprecated. Please use `eventId` instead.
44
+ * @replacedBy event_id
45
+ * @targetRemovalDate 2025-09-30
46
+ */
47
+ sessionId?: string | null;
48
+ /** Service ID. */
49
+ serviceId?: string;
50
+ /** Schedule ID. */
51
+ scheduleId?: string;
52
+ /**
53
+ * The start time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
54
+ * format.
55
+ *
56
+ * If `timezone` is specified,
57
+ * dates are based on the local date/time. This means that the timezone offset
58
+ * in the `start_date` is ignored.
59
+ */
60
+ startDate?: string | null;
61
+ /**
62
+ * The end time of this slot in
63
+ * [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) format.
64
+ *
65
+ * If `timezone` is specified,
66
+ * dates are based on the local date/time. This means that the timezone offset
67
+ * in the `end_date` is ignored.
68
+ */
69
+ endDate?: string | null;
70
+ /**
71
+ * The timezone for which slot availability is to be calculated.
72
+ *
73
+ * 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)
74
+ * when calculating availability.
75
+ */
76
+ timezone?: string | null;
77
+ /**
78
+ * The resource required for this slot. Currently, the only supported resource
79
+ * is the relevant staff member for the slot.
80
+ */
81
+ resource?: SlotResource;
82
+ /** Geographic location of the slot. */
83
+ location?: Location;
84
+ /**
85
+ * ID for the slot's corresponding event, when the event is either a single event
86
+ * or a specific event generated from a recurring event.
87
+ * @minLength 36
88
+ * @maxLength 250
89
+ */
90
+ eventId?: string | null;
91
+ }
92
+ interface SlotResource {
93
+ /**
94
+ * Resource ID.
95
+ * @format GUID
96
+ * @readonly
97
+ */
98
+ id?: string | null;
99
+ /**
100
+ * Resource name. Read only.
101
+ * @maxLength 1200
102
+ */
103
+ name?: string | null;
104
+ }
105
+ interface Location {
106
+ /**
107
+ * Business location ID. Available only for locations that are business locations,
108
+ * meaning the `location_type` is `"OWNER_BUSINESS"`.
109
+ * @format GUID
110
+ */
111
+ id?: string | null;
112
+ /** Location name. */
113
+ name?: string | null;
114
+ /** The full address of this location. */
115
+ formattedAddress?: string | null;
116
+ /**
117
+ * The full translated address of this location.
118
+ * @maxLength 512
119
+ */
120
+ formattedAddressTranslated?: string | null;
121
+ /**
122
+ * Location type.
123
+ *
124
+ * - `"OWNER_BUSINESS"`: The business address, as set in the site’s general settings.
125
+ * - `"OWNER_CUSTOM"`: The address as set when creating the service.
126
+ * - `"CUSTOM"`: The address as set for the individual session.
127
+ */
128
+ locationType?: LocationType;
129
+ }
130
+ declare enum LocationType {
131
+ UNDEFINED = "UNDEFINED",
132
+ OWNER_BUSINESS = "OWNER_BUSINESS",
133
+ OWNER_CUSTOM = "OWNER_CUSTOM",
134
+ CUSTOM = "CUSTOM"
135
+ }
136
+ interface AvailabilityWaitingList {
137
+ /**
138
+ * Total number of spots and open spots for this waitlist.
139
+ * For example, a Yoga class with 10 waitlist spots and 3 registered
140
+ * on the waitlist has 10 `total_spots` and 7 `open_spots`.
141
+ */
142
+ totalSpots?: number | null;
143
+ /** Number of open spots for this waitlist. */
144
+ openSpots?: number | null;
145
+ }
146
+ interface BookingPolicyViolations {
147
+ /** Bookings policy violation. Too early to book this slot. */
148
+ tooEarlyToBook?: boolean | null;
149
+ /** Bookings policy violation. Too late to book this slot. */
150
+ tooLateToBook?: boolean | null;
151
+ /** Bookings policy violation. Online booking is disabled for this slot. */
152
+ bookOnlineDisabled?: boolean | null;
153
+ }
154
+ interface QueryAvailabilityRequest {
155
+ /**
156
+ * Query options. Refer to the
157
+ * _supported filters article_
158
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/availability-calendar/supported-filters-and-sorting) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/time-slots/availability-calendar/supported-fields-filters-and-sorting))
159
+ * for a complete list of supported filters.
160
+ */
161
+ query: QueryV2;
162
+ /**
163
+ * Time zone override for the `endDate` and `startDate` filters, in
164
+ * [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database), such as
165
+ * `America/New_York` or `UTC`.
166
+ *
167
+ * For example, if you specify `("startDate": "2025-11-25T17:00:00+01:00"}` (note
168
+ * the +01:00 offset) in combination with `{"timezone": "Europe/Bucharest"}`
169
+ * (+02:00 offset), *Query Availability* adjusts the effective start time to
170
+ * reflect the specified time zone. In this case, the start time in UTC would
171
+ * be `2025-11-25T15:00:00` (using the +02:00 offset).
172
+ *
173
+ * Learn more about *handling Daylight Savings Time*
174
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/availability-calendar/query-availability#wix-bookings_availability-calendar_query-availability_daylight-savings-time-dst) | [REST](https://dev.wix.com/api/rest/wix-bookings/availability-calendar/query-availability#wix-bookings_availability-calendar_query-availability_daylight-savings-time-dst)).
175
+ *
176
+ * Default: No modification applied to the `endDate` and `startDate` filters.
177
+ */
178
+ timezone?: string | null;
179
+ /**
180
+ * Maximum number of appointment slots to return for each date. For example, if
181
+ * you specify `{"slotsPerDay": 3}`, a maximum of 3 appointment slots/class events is
182
+ * returned for each day that's within the query filter's date range.
183
+ */
184
+ slotsPerDay?: number | null;
185
+ }
186
+ interface QueryV2 extends QueryV2PagingMethodOneOf {
187
+ /**
188
+ * Filter object. For a list of
189
+ * fields you can filter by, see [Calendar Availability: Supported Fields, Filters, and Sorting](https://dev.wix.com/api/rest/wix-bookings/availability-calendar/supported-fields,-filters,-and-sorting).
190
+ * You must include `serviceId`, `startDate` and `endDate` in the filter. This avoids large results that can impact performance.
191
+ */
192
+ filter?: Record<string, any> | null;
193
+ /**
194
+ * Sort options.
195
+ * Currently, only sorting by `startDate` is supported. For details
196
+ * on sorting, see [Calendar Availability: Supported Fields, Filters and Sorting](https://dev.wix.com/api/rest/wix-bookings/availability-calendar/supported-fields,-filters,-and-sorting).
197
+ */
198
+ sort?: Sorting[];
199
+ }
200
+ /** @oneof */
201
+ interface QueryV2PagingMethodOneOf {
202
+ }
203
+ interface Sorting {
204
+ /**
205
+ * Name of the field to sort by.
206
+ * @maxLength 512
207
+ */
208
+ fieldName?: string;
209
+ /** Sort order. */
210
+ order?: SortOrder;
211
+ }
212
+ declare enum SortOrder {
213
+ ASC = "ASC",
214
+ DESC = "DESC"
215
+ }
216
+ interface CursorPaging {
217
+ /**
218
+ * Maximum number of items to return in the results.
219
+ * @max 100
220
+ */
221
+ limit?: number | null;
222
+ /**
223
+ * Pointer to the next or previous page in the list of results.
224
+ *
225
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
226
+ * Not relevant for the first request.
227
+ * @maxLength 16000
228
+ */
229
+ cursor?: string | null;
230
+ }
231
+ interface QueryAvailabilityResponse {
232
+ /** List of appointment slots or class events matching the filter. */
233
+ availabilityEntries?: SlotAvailability[];
234
+ }
235
+ interface Cursors {
236
+ /**
237
+ * Cursor string pointing to the next page in the list of results.
238
+ * @maxLength 16000
239
+ */
240
+ next?: string | null;
241
+ /**
242
+ * Cursor pointing to the previous page in the list of results.
243
+ * @maxLength 16000
244
+ */
245
+ prev?: string | null;
246
+ }
247
+ interface BookingPolicySettings {
248
+ /**
249
+ * The policy defining the maximum number of participants that can
250
+ * be booked for a slot or a schedule.
251
+ */
252
+ maxParticipantsPerBooking?: number | null;
253
+ }
254
+ interface GetScheduleAvailabilityRequest {
255
+ /**
256
+ * The schedule ID for which availability is being checked.
257
+ * @format GUID
258
+ */
259
+ scheduleId: string;
260
+ }
261
+ interface GetScheduleAvailabilityResponse {
262
+ availability?: ScheduleAvailability;
263
+ bookingPolicySettings?: BookingPolicySettings;
264
+ }
265
+ interface ScheduleAvailability {
266
+ /**
267
+ * The total number of spots defined for the schedule, including
268
+ * both open and non-available spots.
269
+ */
270
+ totalSpots?: number | null;
271
+ /** The number of open spots defined for the schedule. */
272
+ openSpots?: number | null;
273
+ /** Booking policy violations for the schedule. */
274
+ bookingPolicyViolations?: BookingPolicyViolations;
275
+ }
276
+ interface CalculateMultiSlotAvailabilityRequest {
277
+ /** @maxLength 30 */
278
+ from?: string;
279
+ /** @maxLength 30 */
280
+ to?: string;
281
+ /** @maxLength 30 */
282
+ timeZone?: string;
283
+ /** 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 */
284
+ bookable?: boolean | null;
285
+ /**
286
+ * 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
287
+ * we will return slots for which `too_early_to_book` is same as on the request, regardless of `too_late_to_book`.
288
+ */
289
+ bookingPolicyViolations?: BookingPolicyViolations;
290
+ /**
291
+ * support filtering by location type, or by locationId. Other fields like `name` are ignored
292
+ * must be set, and must have locationType. If locationType is `OWNER_BUSINESS`, must have location_id
293
+ */
294
+ location?: Location;
295
+ /**
296
+ * @minSize 1
297
+ * @maxSize 6
298
+ */
299
+ slots?: RuleBasedConstraints[];
300
+ /**
301
+ * Maximum number of slots to load for each date. For example, if `slots_per_day` is set to `3`,
302
+ * at most 3 available slots are returned for each day in the date range specified in the query's
303
+ * `filter`.
304
+ *
305
+ * When a day has both bookable and non-bookable slots, bookable slots are returned first.
306
+ * Non-bookable slots are returned according to the specified filters, after all
307
+ * bookable slots are already included.
308
+ */
309
+ slotsPerDay?: number | null;
310
+ cursorPaging?: CursorPaging;
311
+ }
312
+ interface RuleBasedConstraints {
313
+ /** @format GUID */
314
+ serviceId?: string;
315
+ resourcesFilter?: ResourcesFilter;
316
+ /** will be passed to availability-2, and to the availability-constraints SPI */
317
+ customerChoices?: V2CustomerChoices;
318
+ }
319
+ interface ResourcesFilter {
320
+ resourceIds?: string[];
321
+ }
322
+ /**
323
+ * Selected customer choices.
324
+ * These choices are selected by the customer during the booking flow and can be utilized to calculate the corresponding service's configuration properties.
325
+ */
326
+ interface V2CustomerChoices {
327
+ /**
328
+ * The selected customer duration in minutes.
329
+ * Min: `1 minute`
330
+ * Max: `44639 minutes` (30 days, 23 hours, and 59 minutes)
331
+ * @min 1
332
+ * @max 44639
333
+ */
334
+ durationInMinutes?: number | null;
335
+ /**
336
+ * The selected add-ons IDs.
337
+ * Max: Derived from max amount of Add-On groups * max amount of Add-Ons per group.
338
+ * @format GUID
339
+ * @maxSize 21
340
+ */
341
+ addOnIds?: string[] | null;
342
+ }
343
+ interface CalculateMultiSlotAvailabilityResponse {
344
+ slots?: SlotAvailability[];
345
+ cursorPagingMetadata?: CursorPagingMetadata;
346
+ }
347
+ interface CursorPagingMetadata {
348
+ /** Number of items returned in current page. */
349
+ count?: number | null;
350
+ /** Cursor strings that point to the next page, previous page, or both. */
351
+ cursors?: Cursors;
352
+ /**
353
+ * Whether there are more pages to retrieve following the current page.
354
+ *
355
+ * + `true`: Another page of results can be retrieved.
356
+ * + `false`: This is the last page.
357
+ */
358
+ hasNext?: boolean | null;
359
+ }
360
+
361
+ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
362
+ getUrl: (context: any) => string;
363
+ httpMethod: K;
364
+ path: string;
365
+ pathParams: M;
366
+ __requestType: T;
367
+ __originalRequestType: S;
368
+ __responseType: Q;
369
+ __originalResponseType: R;
370
+ };
371
+ declare function queryAvailability(): __PublicMethodMetaInfo<'POST', {}, QueryAvailabilityRequest$1, QueryAvailabilityRequest, QueryAvailabilityResponse$1, QueryAvailabilityResponse>;
372
+ declare function getScheduleAvailability(): __PublicMethodMetaInfo<'GET', {
373
+ scheduleId: string;
374
+ }, GetScheduleAvailabilityRequest$1, GetScheduleAvailabilityRequest, GetScheduleAvailabilityResponse$1, GetScheduleAvailabilityResponse>;
375
+ declare function calculateMultiSlotAvailability(): __PublicMethodMetaInfo<'POST', {}, CalculateMultiSlotAvailabilityRequest$1, CalculateMultiSlotAvailabilityRequest, CalculateMultiSlotAvailabilityResponse$1, CalculateMultiSlotAvailabilityResponse>;
376
+
377
+ export { type __PublicMethodMetaInfo, calculateMultiSlotAvailability, getScheduleAvailability, queryAvailability };
package/build/meta.js ADDED
@@ -0,0 +1,306 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // meta.ts
21
+ var meta_exports = {};
22
+ __export(meta_exports, {
23
+ calculateMultiSlotAvailability: () => calculateMultiSlotAvailability2,
24
+ getScheduleAvailability: () => getScheduleAvailability2,
25
+ queryAvailability: () => queryAvailability2
26
+ });
27
+ module.exports = __toCommonJS(meta_exports);
28
+
29
+ // src/bookings-availability-v1-slot-availability-availability-calendar.http.ts
30
+ var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
31
+ var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
32
+ function resolveComWixpressBookingsAvailabilityAvailabilityCalendarUrl(opts) {
33
+ const domainToMappings = {
34
+ "api._api_base_domain_": [
35
+ {
36
+ srcPath: "/availability-calendar",
37
+ destPath: ""
38
+ }
39
+ ],
40
+ _: [
41
+ {
42
+ srcPath: "/_api/availability-calendar/v1/availability/query",
43
+ destPath: "/v1/availability/query"
44
+ },
45
+ {
46
+ srcPath: "/_api/availability-calendar/v2/availability/schedule",
47
+ destPath: "/v2/availability/schedule"
48
+ },
49
+ {
50
+ srcPath: "/_api/availability-calendar/v1/availability/multislot",
51
+ destPath: "/v1/availability/multislot"
52
+ }
53
+ ],
54
+ "*.dev.wix-code.com": [
55
+ {
56
+ srcPath: "/_api/availability-calendar/v1/availability/query",
57
+ destPath: "/v1/availability/query"
58
+ },
59
+ {
60
+ srcPath: "/_api/availability-calendar/v1/availability/multislot",
61
+ destPath: "/v1/availability/multislot"
62
+ }
63
+ ],
64
+ "editor._base_domain_": [
65
+ {
66
+ srcPath: "/_api/availability-calendar/v1/availability/query",
67
+ destPath: "/v1/availability/query"
68
+ },
69
+ {
70
+ srcPath: "/_api/availability-calendar/v1/availability/multislot",
71
+ destPath: "/v1/availability/multislot"
72
+ },
73
+ {
74
+ srcPath: "/v1/availability/multislot",
75
+ destPath: "/v1/availability/multislot"
76
+ }
77
+ ],
78
+ "blocks._base_domain_": [
79
+ {
80
+ srcPath: "/_api/availability-calendar/v1/availability/query",
81
+ destPath: "/v1/availability/query"
82
+ },
83
+ {
84
+ srcPath: "/_api/availability-calendar/v1/availability/multislot",
85
+ destPath: "/v1/availability/multislot"
86
+ },
87
+ {
88
+ srcPath: "/v1/availability/multislot",
89
+ destPath: "/v1/availability/multislot"
90
+ }
91
+ ],
92
+ "create.editorx": [
93
+ {
94
+ srcPath: "/_api/availability-calendar/v1/availability/query",
95
+ destPath: "/v1/availability/query"
96
+ },
97
+ {
98
+ srcPath: "/_api/availability-calendar/v1/availability/multislot",
99
+ destPath: "/v1/availability/multislot"
100
+ },
101
+ {
102
+ srcPath: "/v1/availability/multislot",
103
+ destPath: "/v1/availability/multislot"
104
+ }
105
+ ],
106
+ "editor.wixapps.net": [
107
+ {
108
+ srcPath: "/_api/availability-calendar/v1/availability/query",
109
+ destPath: "/v1/availability/query"
110
+ }
111
+ ],
112
+ "editor-flow.wixapps.net": [
113
+ {
114
+ srcPath: "/_api/availability-calendar/v1/availability/query",
115
+ destPath: "/v1/availability/query"
116
+ }
117
+ ],
118
+ "www.wixapis.com": [
119
+ {
120
+ srcPath: "/availability-calendar/v1/availability/query",
121
+ destPath: "/v1/availability/query"
122
+ },
123
+ {
124
+ srcPath: "/bookings/availability-calendar/v1/availability/query",
125
+ destPath: "/v1/availability/query"
126
+ },
127
+ {
128
+ srcPath: "/bookings/v1/availability/query",
129
+ destPath: "/v1/availability/query"
130
+ }
131
+ ],
132
+ "manage._base_domain_": [
133
+ {
134
+ srcPath: "/_api/availability-calendar/v1/availability/query",
135
+ destPath: "/v1/availability/query"
136
+ },
137
+ {
138
+ srcPath: "/_api/availability-calendar",
139
+ destPath: ""
140
+ },
141
+ {
142
+ srcPath: "/_api/availability-calendar/v2/availability/schedule",
143
+ destPath: "/v2/availability/schedule"
144
+ }
145
+ ],
146
+ "www._base_domain_": [
147
+ {
148
+ srcPath: "/_api/availability-calendar/v1/availability/query",
149
+ destPath: "/v1/availability/query"
150
+ },
151
+ {
152
+ srcPath: "/_api/availability-calendar/v1/availability/multislot",
153
+ destPath: "/v1/availability/multislot"
154
+ }
155
+ ],
156
+ "bookings.wixapps.net": [
157
+ {
158
+ srcPath: "/_api/availability-calendar/v1/availability/query",
159
+ destPath: "/v1/availability/query"
160
+ }
161
+ ],
162
+ "bo._base_domain_": [
163
+ {
164
+ srcPath: "/_api/availability-calendar/v1/availability/query",
165
+ destPath: "/v1/availability/query"
166
+ }
167
+ ],
168
+ "wixbo.ai": [
169
+ {
170
+ srcPath: "/_api/availability-calendar/v1/availability/query",
171
+ destPath: "/v1/availability/query"
172
+ }
173
+ ],
174
+ "wix-bo.com": [
175
+ {
176
+ srcPath: "/_api/availability-calendar/v1/availability/query",
177
+ destPath: "/v1/availability/query"
178
+ }
179
+ ]
180
+ };
181
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
182
+ }
183
+ var PACKAGE_NAME = "@wix/auto_sdk_bookings_availability-calendar";
184
+ function queryAvailability(payload) {
185
+ function __queryAvailability({ host }) {
186
+ const metadata = {
187
+ entityFqdn: "wix.bookings.availability.v1.slot_availability",
188
+ method: "POST",
189
+ methodFqn: "com.wixpress.bookings.availability.AvailabilityCalendar.QueryAvailability",
190
+ packageName: PACKAGE_NAME,
191
+ url: resolveComWixpressBookingsAvailabilityAvailabilityCalendarUrl({
192
+ protoPath: "/v1/availability/query",
193
+ data: payload,
194
+ host
195
+ }),
196
+ data: payload
197
+ };
198
+ return metadata;
199
+ }
200
+ return __queryAvailability;
201
+ }
202
+ function getScheduleAvailability(payload) {
203
+ function __getScheduleAvailability({ host }) {
204
+ const metadata = {
205
+ entityFqdn: "wix.bookings.availability.v1.slot_availability",
206
+ method: "GET",
207
+ methodFqn: "com.wixpress.bookings.availability.AvailabilityCalendar.GetScheduleAvailability",
208
+ packageName: PACKAGE_NAME,
209
+ url: resolveComWixpressBookingsAvailabilityAvailabilityCalendarUrl({
210
+ protoPath: "/v2/availability/schedule/{scheduleId}",
211
+ data: payload,
212
+ host
213
+ }),
214
+ params: (0, import_rest_modules.toURLSearchParams)(payload)
215
+ };
216
+ return metadata;
217
+ }
218
+ return __getScheduleAvailability;
219
+ }
220
+ function calculateMultiSlotAvailability(payload) {
221
+ function __calculateMultiSlotAvailability({ host }) {
222
+ const metadata = {
223
+ entityFqdn: "wix.bookings.availability.v1.slot_availability",
224
+ method: "POST",
225
+ methodFqn: "com.wixpress.bookings.availability.AvailabilityCalendar.CalculateMultiSlotAvailability",
226
+ packageName: PACKAGE_NAME,
227
+ url: resolveComWixpressBookingsAvailabilityAvailabilityCalendarUrl({
228
+ protoPath: "/v1/availability/multislot",
229
+ data: payload,
230
+ host
231
+ }),
232
+ data: payload
233
+ };
234
+ return metadata;
235
+ }
236
+ return __calculateMultiSlotAvailability;
237
+ }
238
+
239
+ // src/bookings-availability-v1-slot-availability-availability-calendar.meta.ts
240
+ function queryAvailability2() {
241
+ const payload = {};
242
+ const getRequestOptions = queryAvailability(
243
+ payload
244
+ );
245
+ const getUrl = (context) => {
246
+ const { url } = getRequestOptions(context);
247
+ return url;
248
+ };
249
+ return {
250
+ getUrl,
251
+ httpMethod: "POST",
252
+ path: "/v1/availability/query",
253
+ pathParams: {},
254
+ __requestType: null,
255
+ __originalRequestType: null,
256
+ __responseType: null,
257
+ __originalResponseType: null
258
+ };
259
+ }
260
+ function getScheduleAvailability2() {
261
+ const payload = { scheduleId: ":scheduleId" };
262
+ const getRequestOptions = getScheduleAvailability(
263
+ payload
264
+ );
265
+ const getUrl = (context) => {
266
+ const { url } = getRequestOptions(context);
267
+ return url;
268
+ };
269
+ return {
270
+ getUrl,
271
+ httpMethod: "GET",
272
+ path: "/v2/availability/schedule/{scheduleId}",
273
+ pathParams: { scheduleId: "scheduleId" },
274
+ __requestType: null,
275
+ __originalRequestType: null,
276
+ __responseType: null,
277
+ __originalResponseType: null
278
+ };
279
+ }
280
+ function calculateMultiSlotAvailability2() {
281
+ const payload = {};
282
+ const getRequestOptions = calculateMultiSlotAvailability(
283
+ payload
284
+ );
285
+ const getUrl = (context) => {
286
+ const { url } = getRequestOptions(context);
287
+ return url;
288
+ };
289
+ return {
290
+ getUrl,
291
+ httpMethod: "POST",
292
+ path: "/v1/availability/multislot",
293
+ pathParams: {},
294
+ __requestType: null,
295
+ __originalRequestType: null,
296
+ __responseType: null,
297
+ __originalResponseType: null
298
+ };
299
+ }
300
+ // Annotate the CommonJS export names for ESM import in node:
301
+ 0 && (module.exports = {
302
+ calculateMultiSlotAvailability,
303
+ getScheduleAvailability,
304
+ queryAvailability
305
+ });
306
+ //# sourceMappingURL=meta.js.map