@wix/auto_sdk_bookings_availability-time-slots 1.0.274 → 1.0.276

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.
@@ -414,6 +414,37 @@ interface Cursors {
414
414
  /** Cursor pointing to previous page in the list of results. */
415
415
  prev?: string | null;
416
416
  }
417
+ /**
418
+ * Enrollment status and date range of a schedule.
419
+ *
420
+ * Only courses have one today. A course is a single schedule with many sessions. A customer enrolls in
421
+ * the whole course, not in one session, so this information belongs to the schedule and not to any
422
+ * single time slot.
423
+ */
424
+ interface ScheduleInfo {
425
+ /**
426
+ * ID of the service the schedule belongs to. Matches `timeSlot.serviceId`.
427
+ * @format GUID
428
+ */
429
+ serviceId?: string | null;
430
+ /**
431
+ * ID of the schedule the information belongs to.
432
+ * @format GUID
433
+ */
434
+ scheduleId?: string | null;
435
+ /**
436
+ * Whether the course still accepts enrollment, evaluated against the **first session of the course**.
437
+ *
438
+ * Unlike `timeSlot.bookingPolicyViolations`, this never takes into account whether a single session has
439
+ * already started. A course whose booking policy allows booking after the start keeps `tooLateToBook` as
440
+ * `false` here even once some of its sessions have passed.
441
+ */
442
+ enrollmentViolations?: BookingPolicyViolations;
443
+ /** Start of the first session of the course. */
444
+ firstSessionStart?: Date | null;
445
+ /** End of the last session of the course. Not returned for a course whose sessions repeat with no end date. */
446
+ lastSessionEnd?: Date | null;
447
+ }
417
448
  interface GetEventTimeSlotRequest {
418
449
  /**
419
450
  * Event ID.
@@ -1466,7 +1497,7 @@ type GetAvailabilityTimeSlotApplicationErrors = {
1466
1497
  * @applicableIdentity APP
1467
1498
  * @fqn com.wixpress.bookings.availability.v2.AvailabilityTimeSlots.ListAvailabilityTimeSlots
1468
1499
  */
1469
- declare function listAvailabilityTimeSlots(options?: ListAvailabilityTimeSlotsOptions): Promise<NonNullablePaths<ListAvailabilityTimeSlotsResponse, `timeSlots` | `timeSlots.${number}.location.locationType`, 5> & {
1500
+ declare function listAvailabilityTimeSlots(options?: ListAvailabilityTimeSlotsOptions): Promise<NonNullablePaths<ListAvailabilityTimeSlotsResponse, `timeSlots` | `timeSlots.${number}.location.locationType`, 3> & {
1470
1501
  __applicationErrorsType?: ListAvailabilityTimeSlotsApplicationErrors;
1471
1502
  }>;
1472
1503
  interface ListAvailabilityTimeSlotsOptions {
@@ -1590,7 +1621,7 @@ interface ListAvailabilityTimeSlotsOptions {
1590
1621
  * @applicableIdentity APP
1591
1622
  * @fqn com.wixpress.bookings.availability.v2.AvailabilityTimeSlots.ListAvailabilityTimeSlotEndOptions
1592
1623
  */
1593
- declare function listAvailabilityTimeSlotEndOptions(serviceId: string, options?: NonNullablePaths<ListAvailabilityTimeSlotEndOptions, `localStartDate` | `location`, 2>): Promise<NonNullablePaths<ListAvailabilityTimeSlotEndOptionsResponse, `endOptions` | `endOptions.${number}.location.locationType`, 5> & {
1624
+ declare function listAvailabilityTimeSlotEndOptions(serviceId: string, options?: NonNullablePaths<ListAvailabilityTimeSlotEndOptions, `localStartDate` | `location`, 0>): Promise<NonNullablePaths<ListAvailabilityTimeSlotEndOptionsResponse, `endOptions` | `endOptions.${number}.location.locationType`, 3> & {
1594
1625
  __applicationErrorsType?: ListAvailabilityTimeSlotEndOptionsApplicationErrors;
1595
1626
  }>;
1596
1627
  interface ListAvailabilityTimeSlotEndOptions {
@@ -1686,7 +1717,7 @@ interface ListAvailabilityTimeSlotEndOptions {
1686
1717
  * @applicableIdentity APP
1687
1718
  * @fqn com.wixpress.bookings.availability.v2.AvailabilityTimeSlots.GetAvailabilityTimeSlot
1688
1719
  */
1689
- declare function getAvailabilityTimeSlot(serviceId: string, localStartDate: string, localEndDate: string, timeZone: string, location: Location, options?: GetAvailabilityTimeSlotOptions): Promise<NonNullablePaths<GetAvailabilityTimeSlotResponse, `timeSlot.location.locationType` | `timeSlot.availableResources` | `timeSlot.nestedTimeSlots` | `timeSlot.nestedTimeSlots.${number}.serviceId` | `timeSlot.nestedTimeSlots.${number}.localStartDate` | `timeSlot.nestedTimeSlots.${number}.localEndDate`, 5> & {
1720
+ declare function getAvailabilityTimeSlot(serviceId: string, localStartDate: string, localEndDate: string, timeZone: string, location: Location, options?: GetAvailabilityTimeSlotOptions): Promise<NonNullablePaths<GetAvailabilityTimeSlotResponse, `timeSlot.location.locationType` | `timeSlot.availableResources` | `timeSlot.nestedTimeSlots` | `timeSlot.nestedTimeSlots.${number}.serviceId` | `timeSlot.nestedTimeSlots.${number}.localStartDate` | `timeSlot.nestedTimeSlots.${number}.localEndDate`, 3> & {
1690
1721
  __applicationErrorsType?: GetAvailabilityTimeSlotApplicationErrors;
1691
1722
  }>;
1692
1723
  interface GetAvailabilityTimeSlotOptions {
@@ -1705,4 +1736,4 @@ interface GetAvailabilityTimeSlotOptions {
1705
1736
  resourceTypes?: ResourceType[];
1706
1737
  }
1707
1738
 
1708
- export { type ApplicationError, type AvailableResources, type BookingPolicyViolations, type BulkActionMetadata, type BulkListAvailabilityTimeSlotsRequest, type BulkListAvailabilityTimeSlotsResponse, type BulkServiceTimeSlotsResult, type CursorPaging, type CursorPagingMetadata, type Cursors, type CustomerChoices, type DiagnoseAvailabilityRequest, type DiagnoseAvailabilityResponse, type DiagnosisReason, type EventInfo, type GetAvailabilityTimeSlotApplicationErrors, type GetAvailabilityTimeSlotOptions, type GetAvailabilityTimeSlotRequest, type GetAvailabilityTimeSlotRequestCustomerChoices, type GetAvailabilityTimeSlotResponse, type GetEventTimeSlotRequest, type GetEventTimeSlotResponse, type GetMultiServiceAvailabilityTimeSlotRequest, type GetMultiServiceAvailabilityTimeSlotResponse, type ItemMetadata, type ListAvailabilityTimeSlotEndOptions, type ListAvailabilityTimeSlotEndOptionsApplicationErrors, type ListAvailabilityTimeSlotEndOptionsRequest, type ListAvailabilityTimeSlotEndOptionsResponse, type ListAvailabilityTimeSlotsApplicationErrors, type ListAvailabilityTimeSlotsOptions, type ListAvailabilityTimeSlotsRequest, type ListAvailabilityTimeSlotsResponse, type ListEventTimeSlotsRequest, type ListEventTimeSlotsResponse, type ListMultiServiceAvailabilityTimeSlotsRequest, type ListMultiServiceAvailabilityTimeSlotsResponse, type Location, LocationType, type LocationTypeWithLiterals, type NestedTimeSlot, type NonBookableReasons, ReasonCode, type ReasonCodeWithLiterals, RequestedGender, type RequestedGenderValue, RequestedGenderValueRequestedGender, type RequestedGenderValueRequestedGenderWithLiterals, type RequestedGenderWithLiterals, type ResolvedContext, type Resource, type ResourceType, type Service, type ServiceTimeSlots, SuggestedAction, type SuggestedActionWithLiterals, type TimeSlot, type V2CustomerChoices, type V2RequestedGenderValue, type WaitingList, getAvailabilityTimeSlot, listAvailabilityTimeSlotEndOptions, listAvailabilityTimeSlots };
1739
+ export { type ApplicationError, type AvailableResources, type BookingPolicyViolations, type BulkActionMetadata, type BulkListAvailabilityTimeSlotsRequest, type BulkListAvailabilityTimeSlotsResponse, type BulkServiceTimeSlotsResult, type CursorPaging, type CursorPagingMetadata, type Cursors, type CustomerChoices, type DiagnoseAvailabilityRequest, type DiagnoseAvailabilityResponse, type DiagnosisReason, type EventInfo, type GetAvailabilityTimeSlotApplicationErrors, type GetAvailabilityTimeSlotOptions, type GetAvailabilityTimeSlotRequest, type GetAvailabilityTimeSlotRequestCustomerChoices, type GetAvailabilityTimeSlotResponse, type GetEventTimeSlotRequest, type GetEventTimeSlotResponse, type GetMultiServiceAvailabilityTimeSlotRequest, type GetMultiServiceAvailabilityTimeSlotResponse, type ItemMetadata, type ListAvailabilityTimeSlotEndOptions, type ListAvailabilityTimeSlotEndOptionsApplicationErrors, type ListAvailabilityTimeSlotEndOptionsRequest, type ListAvailabilityTimeSlotEndOptionsResponse, type ListAvailabilityTimeSlotsApplicationErrors, type ListAvailabilityTimeSlotsOptions, type ListAvailabilityTimeSlotsRequest, type ListAvailabilityTimeSlotsResponse, type ListEventTimeSlotsRequest, type ListEventTimeSlotsResponse, type ListMultiServiceAvailabilityTimeSlotsRequest, type ListMultiServiceAvailabilityTimeSlotsResponse, type Location, LocationType, type LocationTypeWithLiterals, type NestedTimeSlot, type NonBookableReasons, ReasonCode, type ReasonCodeWithLiterals, RequestedGender, type RequestedGenderValue, RequestedGenderValueRequestedGender, type RequestedGenderValueRequestedGenderWithLiterals, type RequestedGenderWithLiterals, type ResolvedContext, type Resource, type ResourceType, type ScheduleInfo, type Service, type ServiceTimeSlots, SuggestedAction, type SuggestedActionWithLiterals, type TimeSlot, type V2CustomerChoices, type V2RequestedGenderValue, type WaitingList, getAvailabilityTimeSlot, listAvailabilityTimeSlotEndOptions, listAvailabilityTimeSlots };
@@ -10,6 +10,18 @@ import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transform
10
10
  import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
11
11
  import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
12
12
  import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
13
+ var TRANSFORM_PATHS_0 = [
14
+ { path: "bookingPolicyViolations.earliestBookingDate" }
15
+ ];
16
+ var TRANSFORM_PATHS_1 = [
17
+ { path: "timeSlots.bookingPolicyViolations.earliestBookingDate" }
18
+ ];
19
+ var TRANSFORM_PATHS_2 = [
20
+ { path: "endOptions.bookingPolicyViolations.earliestBookingDate" }
21
+ ];
22
+ var TRANSFORM_PATHS_3 = [
23
+ { path: "timeSlot.bookingPolicyViolations.earliestBookingDate" }
24
+ ];
13
25
  function resolveComWixpressBookingsAvailabilityV2AvailabilityTimeSlotsUrl(opts) {
14
26
  const domainToMappings = {
15
27
  "www.wixapis.com": [
@@ -147,7 +159,7 @@ function listAvailabilityTimeSlots(payload) {
147
159
  const serializedData = transformPaths(payload, [
148
160
  {
149
161
  transformFn: transformSDKTimestampToRESTTimestamp,
150
- paths: [{ path: "bookingPolicyViolations.earliestBookingDate" }]
162
+ paths: TRANSFORM_PATHS_0
151
163
  }
152
164
  ]);
153
165
  const metadata = {
@@ -167,9 +179,7 @@ function listAvailabilityTimeSlots(payload) {
167
179
  transformResponse: (payload2) => transformPaths(payload2, [
168
180
  {
169
181
  transformFn: transformRESTTimestampToSDKTimestamp,
170
- paths: [
171
- { path: "timeSlots.bookingPolicyViolations.earliestBookingDate" }
172
- ]
182
+ paths: TRANSFORM_PATHS_1
173
183
  }
174
184
  ])
175
185
  };
@@ -196,11 +206,7 @@ function listAvailabilityTimeSlotEndOptions(payload) {
196
206
  transformResponse: (payload2) => transformPaths(payload2, [
197
207
  {
198
208
  transformFn: transformRESTTimestampToSDKTimestamp,
199
- paths: [
200
- {
201
- path: "endOptions.bookingPolicyViolations.earliestBookingDate"
202
- }
203
- ]
209
+ paths: TRANSFORM_PATHS_2
204
210
  }
205
211
  ])
206
212
  };
@@ -227,9 +233,7 @@ function getAvailabilityTimeSlot(payload) {
227
233
  transformResponse: (payload2) => transformPaths(payload2, [
228
234
  {
229
235
  transformFn: transformRESTTimestampToSDKTimestamp,
230
- paths: [
231
- { path: "timeSlot.bookingPolicyViolations.earliestBookingDate" }
232
- ]
236
+ paths: TRANSFORM_PATHS_3
233
237
  }
234
238
  ])
235
239
  };