@wix/auto_sdk_bookings_event-time-slots 1.0.26 → 1.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +3 -8
- package/build/cjs/index.js.map +1 -1
- package/build/es/index.d.mts +3 -8
- package/build/es/index.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +3 -8
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/es/index.d.mts +3 -8
- package/build/internal/es/index.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { HttpClient,
|
|
1
|
+
import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
2
|
import { ListEventTimeSlotsOptions, ListEventTimeSlotsResponse, GetEventTimeSlotOptions, GetEventTimeSlotResponse } from './index.typings.js';
|
|
3
3
|
export { AvailableResources, BookingPolicyViolations, CursorPaging, CursorPagingMetadata, Cursors, CustomerChoices, EventInfo, GetAvailabilityTimeSlotRequest, GetAvailabilityTimeSlotRequestCustomerChoices, GetAvailabilityTimeSlotResponse, GetEventTimeSlotRequest, GetMultiServiceAvailabilityTimeSlotRequest, GetMultiServiceAvailabilityTimeSlotResponse, ListAvailabilityTimeSlotsRequest, ListAvailabilityTimeSlotsResponse, ListEventTimeSlotsRequest, ListMultiServiceAvailabilityTimeSlotsRequest, ListMultiServiceAvailabilityTimeSlotsResponse, Location, LocationType, NestedTimeSlot, NonBookableReasons, Resource, ResourceType, Service, TimeSlot, V2CustomerChoices, WaitingList } from './index.typings.js';
|
|
4
4
|
|
|
5
|
-
type TimeSlotNonNullablePaths = `location.locationType` | `availableResources` | `nestedTimeSlots` | `nestedTimeSlots.${number}.serviceId` | `nestedTimeSlots.${number}.localStartDate` | `nestedTimeSlots.${number}.localEndDate`;
|
|
6
5
|
declare function listEventTimeSlots$1(httpClient: HttpClient): ListEventTimeSlotsSignature;
|
|
7
6
|
interface ListEventTimeSlotsSignature {
|
|
8
7
|
/**
|
|
@@ -19,9 +18,7 @@ interface ListEventTimeSlotsSignature {
|
|
|
19
18
|
*
|
|
20
19
|
* Time slots are always sorted by their start time in ascending order.
|
|
21
20
|
*/
|
|
22
|
-
(options?: ListEventTimeSlotsOptions): Promise<
|
|
23
|
-
[P in TimeSlotNonNullablePaths]: `timeSlots.${number}.${P}`;
|
|
24
|
-
}[TimeSlotNonNullablePaths]>>;
|
|
21
|
+
(options?: ListEventTimeSlotsOptions | undefined): Promise<ListEventTimeSlotsResponse>;
|
|
25
22
|
}
|
|
26
23
|
declare function getEventTimeSlot$1(httpClient: HttpClient): GetEventTimeSlotSignature;
|
|
27
24
|
interface GetEventTimeSlotSignature {
|
|
@@ -29,9 +26,7 @@ interface GetEventTimeSlotSignature {
|
|
|
29
26
|
* Retrieves the details of a specific event time slot based on the provided event ID.
|
|
30
27
|
* @param - The event ID.
|
|
31
28
|
*/
|
|
32
|
-
(eventId: string, options?: GetEventTimeSlotOptions): Promise<
|
|
33
|
-
[P in TimeSlotNonNullablePaths]: `timeSlot.${P}`;
|
|
34
|
-
}[TimeSlotNonNullablePaths]>>;
|
|
29
|
+
(eventId: string, options?: GetEventTimeSlotOptions | undefined): Promise<GetEventTimeSlotResponse>;
|
|
35
30
|
}
|
|
36
31
|
|
|
37
32
|
declare const listEventTimeSlots: MaybeContext<BuildRESTFunction<typeof listEventTimeSlots$1> & typeof listEventTimeSlots$1>;
|
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts","../../src/bookings-availability-v2-time-slot-event-time-slots.universal.ts","../../src/bookings-availability-v2-time-slot-event-time-slots.http.ts","../../src/bookings-availability-v2-time-slot-event-time-slots.public.ts","../../src/bookings-availability-v2-time-slot-event-time-slots.context.ts"],"sourcesContent":["export * from './src/bookings-availability-v2-time-slot-event-time-slots.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixBookingsAvailabilityV2TimeSlot from './bookings-availability-v2-time-slot-event-time-slots.http.js';\n\n/**\n * The `TimeSlot` object represents the availability information\n * for an `Appointment` service's specific slot, including:\n *\n * 1. Whether the slot is bookable for the given service?\n *\n * 2. In what location the service is available for this slot?\n *\n * 3. Which available resources can provide the service for this slot?\n *\n * 4. Does booking the slot for the service violates any of the service booking policies?\n *\n * 5. What is the total capacity and remaining capacity of the service at the time of the calculation of the `TimeSlot`?\n *\n * > __Note:__\n * > When the `TimeSlot` has a non empty `NestedTimeSlots`, it represents the availability information\n * > for a given list of `Appointment` services within a specific time slot.\n */\nexport interface TimeSlot {\n /**\n * Service ID.\n *\n * > Not returned from `MultiServiceAvailabilityTimeSlots` API calls.\n * > Instead, each nested time slot has its own serviceId.\n * @format GUID\n */\n serviceId?: string | null;\n /**\n * Local start date of the time slot in ISO-8601 format.\n * For example, \"2024-01-30T13:30:00\".\n * @format LOCAL_DATE_TIME\n */\n localStartDate?: string | null;\n /**\n * Local end date of the time slot in ISO-8601 format.\n * For example, \"2024-01-30T14:30:00\".\n * @format LOCAL_DATE_TIME\n */\n localEndDate?: string | null;\n /**\n * Whether the slot is bookable according to the service's booking policies.\n *\n * If booking this time slot does not violates any of the service's booking policies,\n * the returned value is `true`. Otherwise, returns `false`.\n */\n bookable?: boolean | null;\n /** The geographic location of the slot. */\n location?: Location;\n /** The event information if the time slot is an event based slot. */\n eventInfo?: EventInfo;\n /**\n * Total number of spots for the slot.\n * @min 1\n * @max 1000\n */\n totalCapacity?: number | null;\n /**\n * Remaining number of spots for the slot.\n * For example, for an appointment service with total capacity of 1 spot and one booked spot, the remaining capacity will be 0.\n * @max 1000\n */\n remainingCapacity?: number | null;\n /**\n * Number of spots in the slot that are available for booking.\n * This is calculated as the remaining capacity minus the spots reserved for the waiting list.\n */\n bookableCapacity?: number | null;\n /**\n * Indicators for booking policy violations for the slot.\n *\n * Each nested field is checked on its own. i.e. if `tooEarlyToBook` is defined and `bookOnlineDisabled` is not defined\n * we will return also slots for which `tooEarlyToBook` is same as on the request, regardless of `bookOnlineDisabled`.\n */\n bookingPolicyViolations?: BookingPolicyViolations;\n /**\n * List of `AvailableResources` for the time slot.\n * Each `AvailableResources` contains information about available resources of the same type.\n *\n * > Not returned from `MultiServiceAvailabilityTimeSlots` API calls.\n * > Instead, each nested time slot has its own available resources.\n */\n availableResources?: AvailableResources[];\n /**\n * > Nested time slots.\n * > Returned only from `MultiServiceAvailabilityTimeSlots` API calls.\n * @maxSize 8\n */\n nestedTimeSlots?: NestedTimeSlot[];\n /** Reasons why the time slot is not available for booking. */\n nonBookableReasons?: NonBookableReasons;\n /**\n * The schedule ID associated with this time slot.\n * Same as the service’s schedule ID.\n * @format GUID\n */\n scheduleId?: string | null;\n}\n\nexport interface Location {\n /**\n * Business Location ID. Present only if the location is a business location.\n * @format GUID\n */\n _id?: string | null;\n /** The location name. */\n name?: string | null;\n /** A string representation for the full address of the location. */\n formattedAddress?: string | null;\n /**\n * The type of location:\n * - `CUSTOM`: The location is specific to this service, and is not derived from the business location.\n * - `BUSINESS`: A business location, either the default business address, or locations defined for the business by the Business Info.\n * - `CUSTOMER`: The location is determined by the customer and is not set up beforehand.\n */\n locationType?: LocationTypeWithLiterals;\n}\n\nexport enum LocationType {\n UNKNOWN_LOCATION_TYPE = 'UNKNOWN_LOCATION_TYPE',\n /** A business location, either the default business address, or locations defined for the business by the Business Info. */\n BUSINESS = 'BUSINESS',\n /** The location is unique to this service and isn't defined as one of the business locations. */\n CUSTOM = 'CUSTOM',\n /** The location can be determined by the customer and is not set up beforehand. */\n CUSTOMER = 'CUSTOMER',\n}\n\n/** @enumType */\nexport type LocationTypeWithLiterals =\n | LocationType\n | 'UNKNOWN_LOCATION_TYPE'\n | 'BUSINESS'\n | 'CUSTOM'\n | 'CUSTOMER';\n\n/** relevant for event based slots, and not for availability based slots */\nexport interface EventInfo {\n /**\n * The event ID.\n * @minLength 36\n * @maxLength 250\n */\n eventId?: string | null;\n /** Waiting list details for the event, if enabled in the service's booking policy. */\n waitingList?: WaitingList;\n}\n\nexport interface WaitingList {\n /**\n * Total number of spots in the waiting list.\n * @min 1\n */\n totalCapacity?: number | null;\n /**\n * Number of remaining spots in the waiting list.\n * For example, a yoga event with a capacity of `10` and `3` registrants will have a `remainingCapacity` of `7`.\n */\n remainingCapacity?: number | null;\n}\n\nexport interface BookingPolicyViolations {\n /** Bookings policy violation. Too early to book this slot. */\n tooEarlyToBook?: boolean | null;\n /** The earliest time at which booking for this slot is allowed, in UTC format (`YYYY-MM-DDThh:mm:ss.sssZ`). */\n earliestBookingDate?: Date | null;\n /** Bookings policy violation. Too late to book this slot. */\n tooLateToBook?: boolean | null;\n /** Bookings policy violation. Online booking is disabled for the `TimeSlot` service. */\n bookOnlineDisabled?: boolean | null;\n}\n\nexport interface AvailableResources {\n /**\n * Resource type ID.\n * @format GUID\n */\n resourceTypeId?: string | null;\n /**\n * Available resources for the time slot.\n *\n * + When returned from `ListAvailabilityTimeSlots`, empty by default.\n * + + If you provided `includeResourceTypeIds` or `resourceIds` in request,\n * contains __up__ to 10 available resources out of those provided.\n *\n * + When returned from `GetAvailabilityTimeSlots`, contains all available resources by default.\n * + + If you provided `includeResourceTypeIds` or `resourceIds` in request,\n * contains all of the available resources out of those provided.\n *\n *\n * > + When returned from `ListMultiServiceAvailabilityTimeSlots`, empty by default.\n * > + + If you provided `includeResourceTypeIds` or `resourceIds` in request,\n * > contains __up__ to 10 available resources out of those provided.\n *\n * > + When returned from `GetMultiServiceAvailabilityTimeSlots`, contains all available resources by default.\n * > + + If you provided `includeResourceTypeIds` or `resourceIds` in request,\n * > contains all of the available resources out of those provided.\n */\n resources?: Resource[];\n /**\n * Whether there are more available resources for the slot that are not listed in `resources` due to size limitations.\n * @readonly\n */\n hasMoreAvailableResources?: boolean | null;\n}\n\nexport interface Resource {\n /**\n * Resource ID.\n * @format GUID\n */\n _id?: string;\n /**\n * Resource name.\n * @minLength 1\n */\n name?: string | null;\n}\n\nexport interface NestedTimeSlot {\n /**\n * Service ID of the nested time slot.\n * @format GUID\n */\n serviceId?: string;\n /**\n * Local start date of the nested time slot in ISO-8601 format.\n * For example, \"2024-01-30T13:30:00\".\n * @format LOCAL_DATE_TIME\n */\n localStartDate?: string;\n /**\n * Local end date of the nested time slot in ISO-8601 format.\n * For example, \"2024-01-30T14:30:00\".\n * @format LOCAL_DATE_TIME\n */\n localEndDate?: string;\n /**\n * List of `AvailableResources` for the nested time slot.\n * Each `AvailableResources` contains information about available resources of the same type.\n * @maxSize 10\n */\n availableResources?: AvailableResources[];\n}\n\nexport interface NonBookableReasons {\n /** The slot is fully booked with no remaining capacity. */\n noRemainingCapacity?: boolean | null;\n /** Booking this slot would violate the service's booking policy. */\n violatesBookingPolicy?: boolean | null;\n /** The slot is reserved for the waiting list and not available for direct booking. */\n reservedForWaitingList?: boolean | null;\n}\n\nexport interface ListMultiServiceAvailabilityTimeSlotsRequest {\n /**\n * Services for which the multiService time slots are being returned for.\n * Each service contains its own resources filters within.\n *\n * MinSize: `2`.\n * MaxSize: `8`.\n *\n * Required, unless `cursorPaging`.`cursor` is provided.\n * @maxSize 8\n */\n services?: Service[];\n /**\n * Lower boundary for `localStartDate` to include in response, in ISO-8601 format.\n * For example, \"2024-01-30T13:30:00\".\n *\n * Each returned `TimeSlot` in response has a `localStartDate`\n * within the provided `fromLocalDate` and `toLocalDate` exclusive.\n *\n * Required, unless `cursorPaging`.`cursor` is provided.\n * @format LOCAL_DATE_TIME\n */\n fromLocalDate?: string | null;\n /**\n * Upper boundary for `localStartDate` to include in response, in ISO-8601 format.\n * For example, \"2024-01-30T14:30:00\".\n *\n * Each returned `TimeSlot` in response has a `localStartDate`\n * within the provided `fromLocalDate` and `toLocalDate` exclusive.\n *\n * Required, unless `cursorPaging`.`cursor` is provided.\n * @format LOCAL_DATE_TIME\n */\n toLocalDate?: string | null;\n /**\n * Time zone, in IANA time zone format.\n *\n * Required, unless `cursorPaging`.`cursor` is provided.\n * @minLength 1\n * @maxLength 150\n */\n timeZone?: string | null;\n /**\n * Location for which the multiService TimeSlots are being returned for.\n *\n * You can specify location or location type for which the TimeSlots will be returned for.\n * If locationType is `BUSINESS`, you __must__ provide a locationId.\n *\n * <blockquote class=\"warning\">\n * <p><strong>warning:</strong><br/>\n * Supports filtering by location type, or by location ID. </br>\n * Other fields like <code class=\"grey-background\">name</code> are ignored.</p>\n * </blockquote>\n *\n * Required, unless `cursorPaging`.`cursor` is provided.\n */\n location?: Location;\n /**\n * Whether the `TimeSlot` is bookable according to all of the services booking policies.\n *\n * If booking any of the `TimeSlot`.`NestedTimeSlot`s violates any of its services bookings policies,\n * returns as `false`. Otherwise, returns as `true`.\n *\n * > __Note:__\n * > A `TimeSlot` with a `NestedTimeSlot` that doesn't meet its service's bookings policies will be returned with `bookable` = false,\n * > while a `TimeSlot` with no available resources will not be returned at all.\n */\n bookable?: boolean | null;\n /**\n * Indicators for service's booking policy violations for booking the `TimeSlot`.\n *\n * A bookable time slot must not violate any policy,\n * therefor, this filter is only relevant when `bookable` filter is false.\n *\n * Each nested field is checked on all `NestedTimeSlot`s. For example, if only one of the `NestedTimeSlot`'s\n * has a service with `tooEarlyToBook` same as in the request, we return the `TimeSlot` regardless of whether\n * the other `NestedTimeSlots` has the same `tooEarlyToBook` as in request.\n *\n * Each nested field is checked on its own. For example, if `tooEarlyToBook` is defined and `bookOnlineDisabled` is not defined\n * we return slots for which `tooEarlyToBook` is same as on the request, regardless of `bookOnlineDisabled`.\n */\n bookingPolicyViolations?: BookingPolicyViolations;\n /**\n * Maximum number of slots to load for each day. For example, if `timeSlotsPerDay` is set to `3`,\n * we return at most 3 available TimeSlots for each day within the date range specified in request.\n *\n * By default,\n * if `bookable` filter was not specified,\n * and a day has both `bookable` and `un-bookable` slots, `bookable` slots are returned first.\n *\n * If the number of `bookable` slots is less than the requested `timeSlotsPerDay`,\n * `un-bookable` slots will be returned according to the specified filters.\n */\n timeSlotsPerDay?: number | null;\n /**\n * CursorPaging.\n *\n * Enables you to fetch TimeSlots in smaller, more manageable chunks\n * by setting a limit on the number of results returned in response.\n * This is useful in order to enhance efficiency of data retrieval and reduce load on both the client and server.\n *\n * If there are more results than the specified limit, the response will contain a `cursorPagingMetaData`\n * with a cursor pointing to next page of results. In order to fetch the next page of results, you should pass the\n * returned cursor to the next call as `cursorPaging`.`cursor`.\n *\n * For the first call, you should only specify the `limit` for the results page.\n * For each following call, you should only pass the previous returned cursor as `cursorPaging`.`cursor`\n * the `cursorPaging`.`limit`. You may pass a different `limit`.\n * No need to specify any additional parameters.\n *\n * <blockquote class=\"important\">\n * <p><strong>Important:</strong><br/>\n * If you only provide a <code class=\"grey-background\">cursorPaging</code>. <code class=\"grey-background\">cursor</code>,\n * the response will contain the default size of results which is `1000`.\n * </p>\n * </blockquote>\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Service {\n /**\n * Service ID.\n * @format GUID\n */\n serviceId?: string;\n /**\n * Resources to include in response.\n * @format GUID\n * @maxSize 135\n */\n resourceIds?: string[];\n /**\n * The resource type ID's to include in returned time slots.\n * This is in addition to the specifically requested resources.\n *\n * <blockquote class=\"important\">\n * Currently supported only for Staff Member resource type.\n * Staff Member type ID: 1cd44cf8-756f-41c3-bd90-3e2ffcaf1155\n * </blockquote>\n * @format GUID\n * @maxSize 100\n */\n includeResourceTypeIds?: string[];\n /**\n * Selected customer choices.\n * If specified, the selected choices will be used to calculate service configuration.\n * If not specified, the service default configuration will be used.\n * Enforcing this field is the responsibility of the SPI implementer, and not by the Availability API.\n */\n customerChoices?: V2CustomerChoices;\n}\n\n/**\n * Selected customer choices.\n * These choices are selected by the customer during the booking flow and can be utilized to calculate the corresponding service's configuration properties.\n */\nexport interface V2CustomerChoices {\n /**\n * The selected customer duration in minutes.\n * Min: `1 minute`\n * Max: `44639 minutes` (30 days, 23 hours, and 59 minutes)\n * @min 1\n * @max 44639\n */\n durationInMinutes?: number | null;\n /**\n * The selected add-ons IDs.\n * Max: Derived from max amount of Add-On groups * max amount of Add-Ons per group.\n * @format GUID\n * @maxSize 21\n */\n addOnIds?: string[] | null;\n /**\n * The selected duration choice ID.\n * @format GUID\n */\n durationChoiceId?: string | null;\n}\n\nexport interface CursorPaging {\n /**\n * Number of results to load.\n *\n * Default: `1000`.\n * Max: `1000`.\n * @max 1000\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n */\n cursor?: string | null;\n}\n\nexport interface ListMultiServiceAvailabilityTimeSlotsResponse {\n /**\n * Time slots.\n * @maxSize 1000\n */\n timeSlots?: TimeSlot[];\n /**\n * Time zone, in IANA time zone format.\n * Shared for all TimeSlots in response.\n * @minLength 1\n * @maxLength 150\n */\n timeZone?: string | null;\n /**\n * CursorPagingMetaData.\n * Contains information about the next page of results.\n *\n * By default,\n * if there are more than 1000 results,\n * the response will contain a `cursorPagingMetaData` with a cursor to the next page of results.\n *\n * <blockquote class=\"important\">\n * <p><strong>Important:</strong><br/>\n * <code class=\"grey-background\">count</code> is not supported.</p>\n * </blockquote>\n */\n cursorPagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Offset that was requested. */\n cursors?: Cursors;\n /**\n * Indicates if there are more results after the current page.\n * If `true`, another page of results can be retrieved.\n * If `false`, this is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /** Cursor pointing to next page in the list of results. */\n next?: string | null;\n /** Cursor pointing to previous page in the list of results. */\n prev?: string | null;\n}\n\nexport interface GetMultiServiceAvailabilityTimeSlotRequest {\n /**\n * Services for which the multiService TimeSlots are being returned for.\n * Each service contains its own resources filters within.\n *\n * MinSize: 2.\n * MaxSize: 8.\n * @minSize 2\n * @maxSize 8\n */\n services?: Service[];\n /**\n * Local start date of the time slot, in ISO-8601 format.\n * For example, \"2024-01-30T13:30:00\".\n * @format LOCAL_DATE_TIME\n */\n localStartDate?: string;\n /**\n * Local end date of the time slot, in ISO-8601 format.\n * For example, \"2024-01-30T14:30:00\".\n * @format LOCAL_DATE_TIME\n */\n localEndDate?: string;\n /**\n * Time zone, in IANA time zone format.\n * @minLength 1\n * @maxLength 150\n */\n timeZone?: string | null;\n /**\n * The location of the time slot.\n *\n * You must provide a specific `locationType`.\n * If locationType is `BUSINESS`, you __must__ also provide a `locationId`.\n *\n * <blockquote class=\"warning\">\n * <p>Supports filtering by location type, or by location ID.\n * Other fields like <code class=\"grey-background\">name</code> are ignored.</p>\n * </blockquote>\n */\n location?: Location;\n}\n\nexport interface GetMultiServiceAvailabilityTimeSlotResponse {\n /** Time slot. */\n timeSlot?: TimeSlot;\n /**\n * The time zone, in IANA time zone format.\n * @minLength 1\n * @maxLength 150\n */\n timeZone?: string | null;\n}\n\nexport interface ListAvailabilityTimeSlotsRequest {\n /**\n * Service ID for which the time slots are being returned for.\n * Currently supported only for services of type `APPOINTMENT`.\n *\n * Required, unless `cursorPaging`.`cursor` is provided.\n * @format GUID\n */\n serviceId?: string | null;\n /**\n * Lower boundary for `localStartDate` to include in response, in ISO-8601 format.\n * For example, \"2024-01-30T13:30:00\".\n *\n * Each returned `TimeSlot` in response has a `localStartDate`\n * within the provided `fromLocalDate` and `toLocalDate` exclusive.\n *\n * Required, unless `cursorPaging`.`cursor` is provided.\n * @format LOCAL_DATE_TIME\n */\n fromLocalDate?: string | null;\n /**\n * Upper boundary for `localStartDate` to include in response, in ISO-8601 format.\n * For example, \"2024-01-30T14:30:00\".\n *\n * Each returned `TimeSlot` in response has a `localStartDate`\n * within the provided `fromLocalDate` and `toLocalDate` exclusive.\n *\n * Required, unless `cursorPaging`.`cursor` is provided.\n * @format LOCAL_DATE_TIME\n */\n toLocalDate?: string | null;\n /**\n * Time zone, in IANA time zone format.\n *\n * Required, unless `cursorPaging`.`cursor` is provided.\n * @minLength 1\n * @maxLength 150\n */\n timeZone?: string | null;\n /**\n * Locations to include in response.\n *\n * By default,\n * if no locations are provided,\n * the response contains TimeSlots for all locations where the service is available.\n *\n * You can specify locations or location types for which the time slots will be returned for.\n * If locationType is `BUSINESS`, you __must__ provide a locationId.\n *\n * <blockquote class=\"warning\">\n * <p><strong>warning:</strong><br/>\n * Supports filtering by location type, or by location ID. </br>\n * Other fields like <code class=\"grey-background\">name</code> are ignored.</p>\n * </blockquote>\n * @maxSize 5\n */\n locations?: Location[];\n /**\n * Resources to include in response.\n *\n * If specified,\n * the returned TimeSlots will contain __up__ to 10 available resources out of the provided list.\n * Otherwise, the returned TimeSlots returns with an empty `AvailableResources`.\n * @format GUID\n * @maxSize 135\n * @deprecated\n */\n resourceIds?: string[];\n /**\n * Resource type ID's to include in response, this is in addition to the requested `resourceIds`.\n *\n * If specified in request, the returned TimeSlots will contain __up__ to 10 `AvailableResources` with `ResourceTypeId`\n * out of those specified, each contains __up__ to 10 available resources of this type.\n * @format GUID\n * @maxSize 100\n */\n includeResourceTypeIds?: string[];\n /**\n * Whether the `TimeSlot` is bookable according to the service's booking policies.\n *\n * If booking this `TimeSlot` does not violates any of the service's booking policies,\n * returns as `true`. Otherwise, returns as `false`.\n *\n * > __Note:__\n * > A time slot that doesn't meet the service's bookings policies will be returned with `bookable` = false,\n * > while a time slot with no available resources will not be returned at all.\n */\n bookable?: boolean | null;\n /**\n * Indicators for service's booking policy violations for booking the `TimeSlot`.\n *\n * A bookable time slot must not violate any policy,\n * therefor, this filter is only relevant when `bookable` filter is false.\n *\n * Each nested field is checked on its own. i.e. if `tooEarlyToBook` is defined and `bookOnlineDisabled` is not defined\n * we return slots for which `tooEarlyToBook` is same as on the request, regardless of `bookOnlineDisabled`.\n */\n bookingPolicyViolations?: BookingPolicyViolations;\n /**\n * Maximum number of slots to load for each day. For example, if `timeSlotsPerDay` is set to `3`,\n * we return at most 3 available TimeSlots for each day within the date range specified in request.\n *\n * By default,\n * if `bookable` filter was not specified,\n * and a day has both `bookable` and `un-bookable` slots, `bookable` slots are returned first.\n *\n * If the number of `bookable` slots is less than the requested `timeSlotsPerDay`,\n * `un-bookable` slots will be returned according to the specified filters.\n */\n timeSlotsPerDay?: number | null;\n /**\n * CursorPaging.\n *\n * Enables you to fetch results in smaller, more manageable chunks\n * by setting a limit on the number of results returned in response.\n * This is useful in order to enhance efficiency of data retrieval and reduce load on both the client and server.\n *\n * If there are more results than the specified limit, the response will contain a `cursorPagingMetaData`\n * with a cursor pointing to next page of results. In order to fetch the next page of results, you should pass the\n * returned cursor to the next call as `cursorPaging`.`cursor`.\n *\n * For the first call, you should only specify the `limit` for the results page.\n * For each following call, you should only pass `cursorPaging`.`cursor` with the returned cursor from previous call, and\n * a `cursorPaging`.`limit`.\n * No need to specify any additional parameters.\n *\n * <blockquote class=\"important\">\n * <p><strong>Important:</strong><br/>\n * If you only provide a <code class=\"grey-background\">cursorPaging</code>. <code class=\"grey-background\">cursor</code>,\n * the response will contain the default size of results which is `1000`.\n * </p>\n * </blockquote>\n */\n cursorPaging?: CursorPaging;\n /**\n * resources filter\n * If specified, only time slots with these resources will be returned.\n * @maxSize 3\n */\n resourceTypes?: ResourceType[];\n}\n\n/**\n * Selected customer choices.\n * These choices are selected by the customer during the booking flow and can be utilized to calculate the corresponding service's configuration properties.\n */\nexport interface CustomerChoices {\n /**\n * The selected customer duration in minutes.\n * Min: `1 minute`\n * Max: `44639 minutes` (30 days, 23 hours, and 59 minutes)\n * @min 1\n * @max 44639\n */\n durationInMinutes?: number | null;\n /**\n * The selected add-ons IDs.\n * Max: Derived from max amount of Add-On groups * max amount of Add-Ons per group.\n * @format GUID\n * @maxSize 21\n */\n addOnIds?: string[] | null;\n /**\n * The selected duration choice ID.\n * @format GUID\n */\n durationChoiceId?: string | null;\n}\n\nexport interface ResourceType {\n /**\n * Resource type ID.\n * @format GUID\n */\n resourceTypeId?: string | null;\n /**\n * Resource IDs.\n * The response will contain only slots that have at least one of the specified resources.\n * @format GUID\n * @minSize 1\n * @maxSize 135\n */\n resourceIds?: string[] | null;\n}\n\nexport interface ListAvailabilityTimeSlotsResponse {\n /**\n * Time slots.\n * @maxSize 1000\n */\n timeSlots?: TimeSlot[];\n /**\n * Time zone, in IANA time zone format.\n * Shared for all TimeSlots in response.\n * @minLength 1\n * @maxLength 150\n */\n timeZone?: string | null;\n /**\n * CursorPagingMetaData.\n * Contains information about the next page of results.\n *\n * By default,\n * if there are more than 1000 results,\n * the response will contain a `cursorPagingMetaData` with a cursor to the next page of results.\n *\n * <blockquote class=\"important\">\n * <p><strong>Important:</strong><br/>\n * <code class=\"grey-background\">count</code> is not supported.</p>\n * </blockquote>\n */\n cursorPagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface GetAvailabilityTimeSlotRequest {\n /**\n * Service ID of the time slot.\n * Currently supported only for services of type `APPOINTMENT`.\n * @format GUID\n */\n serviceId?: string;\n /**\n * Local start date of the time slot, in ISO-8601 format.\n * For example, \"2024-01-30T13:30:00\".\n * @format LOCAL_DATE_TIME\n */\n localStartDate?: string;\n /**\n * Local end date of the time slot, in ISO-8601 format.\n * For example, \"2024-01-30T14:30:00\".\n * @format LOCAL_DATE_TIME\n */\n localEndDate?: string;\n /**\n * Time zone, in IANA time zone format.\n * @minLength 1\n * @maxLength 150\n */\n timeZone?: string | null;\n /**\n * The location of the time slot.\n *\n * You must provide a specific `locationType`.\n * If locationType is `BUSINESS`, you __must__ also provide a `locationId`.\n *\n * <blockquote class=\"warning\">\n * <p>Supports filtering by location type, or by location ID.\n * Other fields like <code class=\"grey-background\">name</code> are ignored.</p>\n * </blockquote>\n */\n location?: Location;\n /**\n * Resources to include in response.\n *\n * If specified,\n * the returned `TimeSlot` contains only the available resources out of provided list.\n * Otherwise, the returned `TimeSlot` returned with all possible `AvailableResources`.\n * @format GUID\n * @maxSize 135\n */\n resourceIds?: string[];\n /**\n * Resource type IDs to include in response, this is in addition to the requested `resourceIds`.\n *\n * If specified in request, the returned `TimeSlot` contains only the `AvailableResources` with `ResourceTypeId`\n * out of those specified, each contains all the available resources of this type.\n * @format GUID\n * @maxSize 100\n */\n includeResourceTypeIds?: string[];\n}\n\nexport interface GetAvailabilityTimeSlotRequestCustomerChoices {\n /**\n * The selected add-ons IDs.\n * Max: Derived from max amount of Add-On groups * max amount of Add-Ons per group.\n * @format GUID\n * @maxSize 21\n */\n addOnIds?: string[] | null;\n /**\n * The selected duration choice ID.\n * @format GUID\n */\n durationChoiceId?: string | null;\n}\n\nexport interface GetAvailabilityTimeSlotResponse {\n /** Time slot. */\n timeSlot?: TimeSlot;\n /**\n * Time zone, in IANA time zone format.\n * @minLength 1\n * @maxLength 150\n */\n timeZone?: string | null;\n}\n\nexport interface ListEventTimeSlotsRequest {\n /**\n * Local start date for which event time slots are returned, in ISO-8601 format.\n * E.g., \"2024-01-30T13:30:00\".\n * Required, unless `cursorPaging` is provided.\n * @format LOCAL_DATE_TIME\n */\n fromLocalDate?: string | null;\n /**\n * Local end date for which event time slots are returned, in ISO-8601 format.\n * E.g., \"2024-01-30T13:30:00\".\n * Required, unless `cursorPaging` is provided.\n * @format LOCAL_DATE_TIME\n */\n toLocalDate?: string | null;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database).\n * For example, `America/New_York`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties).\n * @maxLength 100\n */\n timeZone?: string | null;\n /**\n * Optional service IDs to filter by.\n * If not provided, time slots for all services are returned.\n * @format GUID\n * @maxSize 100\n */\n serviceIds?: string[] | null;\n /**\n * Whether to filter bookable slots only.\n * A bookable slot is a slot that has remaining capacity and also satisfies the booking policy.\n * Default true: bookable and non-bookable slots are returned.\n */\n includeNonBookable?: boolean | null;\n /**\n * Filter event time slots by the minimum bookable capacity.\n * @min 1\n */\n minBookableCapacity?: number | null;\n /**\n * Optional filter to apply to the events. E.g., resource, location, etc.\n * 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.\n */\n eventFilter?: Record<string, any> | null;\n /**\n * The maximum number of time slots to return for each day.\n * For example, if `maxSlotsPerDay` is set to `1`, at most 1 available slot is returned for each day.\n * When a day has both bookable and non-bookable slots, bookable slots are returned first.\n * If `maxSlotsPerDay` is provided, `toLocalDate` must also be provided and must be at most 1 month after `fromLocalDate`.\n * @min 1\n * @max 1\n */\n maxSlotsPerDay?: number | null;\n /** Cursor to retrieve the next page of results. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface ListEventTimeSlotsResponse {\n /** Retrieved time slots matching the specified filters. */\n timeSlots?: TimeSlot[];\n /**\n * The time slots time zone.\n * Either provided explicitly or default to the business time zone.\n * @minLength 1\n * @maxLength 150\n */\n timeZone?: string | null;\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface GetEventTimeSlotRequest {\n /**\n * The event ID.\n * @minLength 36\n * @maxLength 250\n */\n eventId: string | null;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database).\n * For example, `America/New_York`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties).\n * @maxLength 100\n */\n timeZone?: string | null;\n}\n\nexport interface GetEventTimeSlotResponse {\n /** The time slot. */\n timeSlot?: TimeSlot;\n /**\n * The time slot time zone.\n * Either provided explicitly or default to the business time zone.\n * @minLength 1\n * @maxLength 150\n */\n timeZone?: string | null;\n}\n\ntype TimeSlotNonNullablePaths =\n | `location.locationType`\n | `availableResources`\n | `nestedTimeSlots`\n | `nestedTimeSlots.${number}.serviceId`\n | `nestedTimeSlots.${number}.localStartDate`\n | `nestedTimeSlots.${number}.localEndDate`;\n\n/**\n * Retrieves event time slots based on specified filters.\n *\n * Event time slots are predefined events that customers can book, subject to capacity and booking policies.\n * By default, the Bookings app provides the events (classes) and the bookings policy.\n *\n * `ListEventTimeSlots` runs with these defaults, which you can override:\n * - `providerId` is the Bookings app ID.\n * - `timeZone` is the business time zone.\n * - `cursorPaging.limit` is `50`.\n * - Both bookable and non-bookable time slots are returned.\n *\n * Time slots are always sorted by their start time in ascending order.\n * @public\n * @documentationMaturity preview\n * @permissionId BOOKINGS.AVAILABILITY_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wixpress.bookings.availability.v2.EventTimeSlots.ListEventTimeSlots\n */\nexport async function listEventTimeSlots(\n options?: ListEventTimeSlotsOptions\n): Promise<\n NonNullablePaths<\n ListEventTimeSlotsResponse,\n {\n [P in TimeSlotNonNullablePaths]: `timeSlots.${number}.${P}`;\n }[TimeSlotNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n fromLocalDate: options?.fromLocalDate,\n toLocalDate: options?.toLocalDate,\n timeZone: options?.timeZone,\n serviceIds: options?.serviceIds,\n includeNonBookable: options?.includeNonBookable,\n minBookableCapacity: options?.minBookableCapacity,\n eventFilter: options?.eventFilter,\n maxSlotsPerDay: options?.maxSlotsPerDay,\n cursorPaging: options?.cursorPaging,\n });\n\n const reqOpts =\n ambassadorWixBookingsAvailabilityV2TimeSlot.listEventTimeSlots(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n fromLocalDate: '$[0].fromLocalDate',\n toLocalDate: '$[0].toLocalDate',\n timeZone: '$[0].timeZone',\n serviceIds: '$[0].serviceIds',\n includeNonBookable: '$[0].includeNonBookable',\n minBookableCapacity: '$[0].minBookableCapacity',\n eventFilter: '$[0].eventFilter',\n maxSlotsPerDay: '$[0].maxSlotsPerDay',\n cursorPaging: '$[0].cursorPaging',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListEventTimeSlotsOptions {\n /**\n * Local start date for which event time slots are returned, in ISO-8601 format.\n * E.g., \"2024-01-30T13:30:00\".\n * Required, unless `cursorPaging` is provided.\n * @format LOCAL_DATE_TIME\n */\n fromLocalDate?: string | null;\n /**\n * Local end date for which event time slots are returned, in ISO-8601 format.\n * E.g., \"2024-01-30T13:30:00\".\n * Required, unless `cursorPaging` is provided.\n * @format LOCAL_DATE_TIME\n */\n toLocalDate?: string | null;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database).\n * For example, `America/New_York`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties).\n * @maxLength 100\n */\n timeZone?: string | null;\n /**\n * Optional service IDs to filter by.\n * If not provided, time slots for all services are returned.\n * @format GUID\n * @maxSize 100\n */\n serviceIds?: string[] | null;\n /**\n * Whether to filter bookable slots only.\n * A bookable slot is a slot that has remaining capacity and also satisfies the booking policy.\n * Default true: bookable and non-bookable slots are returned.\n */\n includeNonBookable?: boolean | null;\n /**\n * Filter event time slots by the minimum bookable capacity.\n * @min 1\n */\n minBookableCapacity?: number | null;\n /**\n * Optional filter to apply to the events. E.g., resource, location, etc.\n * 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.\n */\n eventFilter?: Record<string, any> | null;\n /**\n * The maximum number of time slots to return for each day.\n * For example, if `maxSlotsPerDay` is set to `1`, at most 1 available slot is returned for each day.\n * When a day has both bookable and non-bookable slots, bookable slots are returned first.\n * If `maxSlotsPerDay` is provided, `toLocalDate` must also be provided and must be at most 1 month after `fromLocalDate`.\n * @min 1\n * @max 1\n */\n maxSlotsPerDay?: number | null;\n /** Cursor to retrieve the next page of results. */\n cursorPaging?: CursorPaging;\n}\n\n/**\n * Retrieves the details of a specific event time slot based on the provided event ID.\n * @param eventId - The event ID.\n * @public\n * @documentationMaturity preview\n * @requiredField eventId\n * @permissionId BOOKINGS.AVAILABILITY_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wixpress.bookings.availability.v2.EventTimeSlots.GetEventTimeSlot\n */\nexport async function getEventTimeSlot(\n eventId: string,\n options?: GetEventTimeSlotOptions\n): Promise<\n NonNullablePaths<\n GetEventTimeSlotResponse,\n {\n [P in TimeSlotNonNullablePaths]: `timeSlot.${P}`;\n }[TimeSlotNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n eventId: eventId,\n timeZone: options?.timeZone,\n });\n\n const reqOpts =\n ambassadorWixBookingsAvailabilityV2TimeSlot.getEventTimeSlot(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n eventId: '$[0]',\n timeZone: '$[1].timeZone',\n },\n singleArgumentUnchanged: false,\n },\n ['eventId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetEventTimeSlotOptions {\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database).\n * For example, `America/New_York`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties).\n * @maxLength 100\n */\n timeZone?: string | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressBookingsAvailabilityV2EventTimeSlotsUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/_api/service-availability/v2/time-slots',\n destPath: '/v2/time-slots',\n },\n {\n srcPath: '/_api/service-availability/v2/multi-service-time-slots',\n destPath: '/v2/multi-service-time-slots',\n },\n {\n srcPath: '/service-availability/v2/time-slots',\n destPath: '/v2/time-slots',\n },\n {\n srcPath: '/service-availability/v2/multi-service-time-slots',\n destPath: '/v2/multi-service-time-slots',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/service-availability/v2/time-slots',\n destPath: '/v2/time-slots',\n },\n {\n srcPath: '/_api/service-availability/v2/multi-service-time-slots',\n destPath: '/v2/multi-service-time-slots',\n },\n {\n srcPath: '/service-availability/v2/time-slots',\n destPath: '/v2/time-slots',\n },\n {\n srcPath: '/service-availability/v2/multi-service-time-slots',\n destPath: '/v2/multi-service-time-slots',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/service-availability/v2/time-slots',\n destPath: '/v2/time-slots',\n },\n {\n srcPath: '/_api/service-availability/v2/multi-service-time-slots',\n destPath: '/v2/multi-service-time-slots',\n },\n {\n srcPath: '/service-availability/v2/multi-service-time-slots',\n destPath: '/v2/multi-service-time-slots',\n },\n {\n srcPath: '/service-availability/v2/time-slots',\n destPath: '/v2/time-slots',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/service-availability/v2/time-slots',\n destPath: '/v2/time-slots',\n },\n {\n srcPath: '/_api/service-availability/v2/multi-service-time-slots',\n destPath: '/v2/multi-service-time-slots',\n },\n ],\n _: [\n {\n srcPath: '/_api/service-availability/v2/time-slots',\n destPath: '/v2/time-slots',\n },\n {\n srcPath: '/_api/service-availability/v2/multi-service-time-slots',\n destPath: '/v2/multi-service-time-slots',\n },\n {\n srcPath: '/_api/service-availability/v2/time-slots/event',\n destPath: '/v2/time-slots/event',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/service-availability/v2/multi-service-time-slots',\n destPath: '/v2/multi-service-time-slots',\n },\n {\n srcPath: '/_api/service-availability/v2/time-slots',\n destPath: '/v2/time-slots',\n },\n {\n srcPath: '/_api/service-availability/v2/time-slots/event',\n destPath: '/v2/time-slots/event',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/service-availability/v2/multi-service-time-slots',\n destPath: '/v2/multi-service-time-slots',\n },\n {\n srcPath: '/_api/service-availability/v2/time-slots',\n destPath: '/v2/time-slots',\n },\n {\n srcPath: '/_api/service-availability/v2/time-slots/event',\n destPath: '/v2/time-slots/event',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/service-availability/v2/multi-service-time-slots',\n destPath: '/v2/multi-service-time-slots',\n },\n {\n srcPath: '/_api/service-availability/v2/time-slots',\n destPath: '/v2/time-slots',\n },\n {\n srcPath: '/_api/service-availability/v2/time-slots/event',\n destPath: '/v2/time-slots/event',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/service-availability/v2/time-slots/event',\n destPath: '/v2/time-slots/event',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_bookings_event-time-slots';\n\n/**\n * Retrieves event time slots based on specified filters.\n *\n * Event time slots are predefined events that customers can book, subject to capacity and booking policies.\n * By default, the Bookings app provides the events (classes) and the bookings policy.\n *\n * `ListEventTimeSlots` runs with these defaults, which you can override:\n * - `providerId` is the Bookings app ID.\n * - `timeZone` is the business time zone.\n * - `cursorPaging.limit` is `50`.\n * - Both bookable and non-bookable time slots are returned.\n *\n * Time slots are always sorted by their start time in ascending order.\n */\nexport function listEventTimeSlots(\n payload: object\n): RequestOptionsFactory<any> {\n function __listEventTimeSlots({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.availability.v2.time_slot',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.bookings.availability.v2.EventTimeSlots.ListEventTimeSlots',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsAvailabilityV2EventTimeSlotsUrl({\n protoPath: '/v2/time-slots/event',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'timeSlots.bookingPolicyViolations.earliestBookingDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listEventTimeSlots;\n}\n\n/** Retrieves the details of a specific event time slot based on the provided event ID. */\nexport function getEventTimeSlot(payload: object): RequestOptionsFactory<any> {\n function __getEventTimeSlot({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.availability.v2.time_slot',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.bookings.availability.v2.EventTimeSlots.GetEventTimeSlot',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsAvailabilityV2EventTimeSlotsUrl({\n protoPath: '/v2/time-slots/event/{eventId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'timeSlot.bookingPolicyViolations.earliestBookingDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getEventTimeSlot;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n GetEventTimeSlotOptions,\n GetEventTimeSlotResponse,\n ListEventTimeSlotsOptions,\n ListEventTimeSlotsResponse,\n getEventTimeSlot as universalGetEventTimeSlot,\n listEventTimeSlots as universalListEventTimeSlots,\n} from './bookings-availability-v2-time-slot-event-time-slots.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/bookings' };\n\ntype TimeSlotNonNullablePaths =\n | `location.locationType`\n | `availableResources`\n | `nestedTimeSlots`\n | `nestedTimeSlots.${number}.serviceId`\n | `nestedTimeSlots.${number}.localStartDate`\n | `nestedTimeSlots.${number}.localEndDate`;\n\nexport function listEventTimeSlots(\n httpClient: HttpClient\n): ListEventTimeSlotsSignature {\n return (options?: ListEventTimeSlotsOptions) =>\n universalListEventTimeSlots(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListEventTimeSlotsSignature {\n /**\n * Retrieves event time slots based on specified filters.\n *\n * Event time slots are predefined events that customers can book, subject to capacity and booking policies.\n * By default, the Bookings app provides the events (classes) and the bookings policy.\n *\n * `ListEventTimeSlots` runs with these defaults, which you can override:\n * - `providerId` is the Bookings app ID.\n * - `timeZone` is the business time zone.\n * - `cursorPaging.limit` is `50`.\n * - Both bookable and non-bookable time slots are returned.\n *\n * Time slots are always sorted by their start time in ascending order.\n */\n (options?: ListEventTimeSlotsOptions): Promise<\n NonNullablePaths<\n ListEventTimeSlotsResponse,\n {\n [P in TimeSlotNonNullablePaths]: `timeSlots.${number}.${P}`;\n }[TimeSlotNonNullablePaths]\n >\n >;\n}\n\nexport function getEventTimeSlot(\n httpClient: HttpClient\n): GetEventTimeSlotSignature {\n return (eventId: string, options?: GetEventTimeSlotOptions) =>\n universalGetEventTimeSlot(\n eventId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetEventTimeSlotSignature {\n /**\n * Retrieves the details of a specific event time slot based on the provided event ID.\n * @param - The event ID.\n */\n (eventId: string, options?: GetEventTimeSlotOptions): Promise<\n NonNullablePaths<\n GetEventTimeSlotResponse,\n {\n [P in TimeSlotNonNullablePaths]: `timeSlot.${P}`;\n }[TimeSlotNonNullablePaths]\n >\n >;\n}\n\nexport {\n AvailableResources,\n BookingPolicyViolations,\n CursorPaging,\n CursorPagingMetadata,\n Cursors,\n CustomerChoices,\n EventInfo,\n GetAvailabilityTimeSlotRequest,\n GetAvailabilityTimeSlotRequestCustomerChoices,\n GetAvailabilityTimeSlotResponse,\n GetEventTimeSlotOptions,\n GetEventTimeSlotRequest,\n GetEventTimeSlotResponse,\n GetMultiServiceAvailabilityTimeSlotRequest,\n GetMultiServiceAvailabilityTimeSlotResponse,\n ListAvailabilityTimeSlotsRequest,\n ListAvailabilityTimeSlotsResponse,\n ListEventTimeSlotsOptions,\n ListEventTimeSlotsRequest,\n ListEventTimeSlotsResponse,\n ListMultiServiceAvailabilityTimeSlotsRequest,\n ListMultiServiceAvailabilityTimeSlotsResponse,\n Location,\n LocationType,\n NestedTimeSlot,\n NonBookableReasons,\n Resource,\n ResourceType,\n Service,\n TimeSlot,\n V2CustomerChoices,\n WaitingList,\n} from './bookings-availability-v2-time-slot-event-time-slots.universal.js';\n","import {\n listEventTimeSlots as publicListEventTimeSlots,\n getEventTimeSlot as publicGetEventTimeSlot,\n} from './bookings-availability-v2-time-slot-event-time-slots.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const listEventTimeSlots: MaybeContext<\n BuildRESTFunction<typeof publicListEventTimeSlots> &\n typeof publicListEventTimeSlots\n> = /*#__PURE__*/ createRESTModule(publicListEventTimeSlots);\nexport const getEventTimeSlot: MaybeContext<\n BuildRESTFunction<typeof publicGetEventTimeSlot> &\n typeof publicGetEventTimeSlot\n> = /*#__PURE__*/ createRESTModule(publicGetEventTimeSlot);\n\nexport { LocationType } from './bookings-availability-v2-time-slot-event-time-slots.universal.js';\nexport {\n TimeSlot,\n Location,\n EventInfo,\n WaitingList,\n BookingPolicyViolations,\n AvailableResources,\n Resource,\n NestedTimeSlot,\n NonBookableReasons,\n ListMultiServiceAvailabilityTimeSlotsRequest,\n Service,\n V2CustomerChoices,\n CursorPaging,\n ListMultiServiceAvailabilityTimeSlotsResponse,\n CursorPagingMetadata,\n Cursors,\n GetMultiServiceAvailabilityTimeSlotRequest,\n GetMultiServiceAvailabilityTimeSlotResponse,\n ListAvailabilityTimeSlotsRequest,\n CustomerChoices,\n ResourceType,\n ListAvailabilityTimeSlotsResponse,\n GetAvailabilityTimeSlotRequest,\n GetAvailabilityTimeSlotRequestCustomerChoices,\n GetAvailabilityTimeSlotResponse,\n ListEventTimeSlotsRequest,\n ListEventTimeSlotsResponse,\n GetEventTimeSlotRequest,\n GetEventTimeSlotResponse,\n ListEventTimeSlotsOptions,\n GetEventTimeSlotOptions,\n} from './bookings-availability-v2-time-slot-event-time-slots.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,0BAAAA;AAAA,EAAA,0BAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,0DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;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AAM,uBAAmB,uBAAAD;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,SAAS;AAAA,UACT,UAAU;AAAA,QACZ;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,WAAW,SAAS;AAAA,IACvB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AE9nCO,SAASE,oBACd,YAC6B;AAC7B,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AA2BO,SAASC,kBACd,YAC2B;AAC3B,SAAO,CAAC,SAAiB,YACvBA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AC9DA,IAAAC,uBAAiC;AAG1B,IAAMC,sBAGK,2DAAiBA,mBAAwB;AACpD,IAAMC,oBAGK,2DAAiBA,iBAAsB;","names":["getEventTimeSlot","listEventTimeSlots","import_rest_modules","payload","LocationType","listEventTimeSlots","sdkTransformError","getEventTimeSlot","listEventTimeSlots","getEventTimeSlot","import_rest_modules","listEventTimeSlots","getEventTimeSlot"]}
|
|
1
|
+
{"version":3,"sources":["../../index.ts","../../src/bookings-availability-v2-time-slot-event-time-slots.universal.ts","../../src/bookings-availability-v2-time-slot-event-time-slots.http.ts","../../src/bookings-availability-v2-time-slot-event-time-slots.public.ts","../../src/bookings-availability-v2-time-slot-event-time-slots.context.ts"],"sourcesContent":["export * from './src/bookings-availability-v2-time-slot-event-time-slots.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixBookingsAvailabilityV2TimeSlot from './bookings-availability-v2-time-slot-event-time-slots.http.js';\n\n/**\n * The `TimeSlot` object represents the availability information\n * for an `Appointment` service's specific slot, including:\n *\n * 1. Whether the slot is bookable for the given service?\n *\n * 2. In what location the service is available for this slot?\n *\n * 3. Which available resources can provide the service for this slot?\n *\n * 4. Does booking the slot for the service violates any of the service booking policies?\n *\n * 5. What is the total capacity and remaining capacity of the service at the time of the calculation of the `TimeSlot`?\n *\n * > __Note:__\n * > When the `TimeSlot` has a non empty `NestedTimeSlots`, it represents the availability information\n * > for a given list of `Appointment` services within a specific time slot.\n */\nexport interface TimeSlot {\n /**\n * Service ID.\n *\n * > Not returned from `MultiServiceAvailabilityTimeSlots` API calls.\n * > Instead, each nested time slot has its own serviceId.\n * @format GUID\n */\n serviceId?: string | null;\n /**\n * Local start date of the time slot in ISO-8601 format.\n * For example, \"2024-01-30T13:30:00\".\n * @format LOCAL_DATE_TIME\n */\n localStartDate?: string | null;\n /**\n * Local end date of the time slot in ISO-8601 format.\n * For example, \"2024-01-30T14:30:00\".\n * @format LOCAL_DATE_TIME\n */\n localEndDate?: string | null;\n /**\n * Whether the slot is bookable according to the service's booking policies.\n *\n * If booking this time slot does not violates any of the service's booking policies,\n * the returned value is `true`. Otherwise, returns `false`.\n */\n bookable?: boolean | null;\n /** The geographic location of the slot. */\n location?: Location;\n /** The event information if the time slot is an event based slot. */\n eventInfo?: EventInfo;\n /**\n * Total number of spots for the slot.\n * @min 1\n * @max 1000\n */\n totalCapacity?: number | null;\n /**\n * Remaining number of spots for the slot.\n * For example, for an appointment service with total capacity of 1 spot and one booked spot, the remaining capacity will be 0.\n * @max 1000\n */\n remainingCapacity?: number | null;\n /**\n * Number of spots in the slot that are available for booking.\n * This is calculated as the remaining capacity minus the spots reserved for the waiting list.\n */\n bookableCapacity?: number | null;\n /**\n * Indicators for booking policy violations for the slot.\n *\n * Each nested field is checked on its own. i.e. if `tooEarlyToBook` is defined and `bookOnlineDisabled` is not defined\n * we will return also slots for which `tooEarlyToBook` is same as on the request, regardless of `bookOnlineDisabled`.\n */\n bookingPolicyViolations?: BookingPolicyViolations;\n /**\n * List of `AvailableResources` for the time slot.\n * Each `AvailableResources` contains information about available resources of the same type.\n *\n * > Not returned from `MultiServiceAvailabilityTimeSlots` API calls.\n * > Instead, each nested time slot has its own available resources.\n */\n availableResources?: AvailableResources[];\n /**\n * > Nested time slots.\n * > Returned only from `MultiServiceAvailabilityTimeSlots` API calls.\n * @maxSize 8\n */\n nestedTimeSlots?: NestedTimeSlot[];\n /** Reasons why the time slot is not available for booking. */\n nonBookableReasons?: NonBookableReasons;\n /**\n * The schedule ID associated with this time slot.\n * Same as the service’s schedule ID.\n * @format GUID\n */\n scheduleId?: string | null;\n}\n\nexport interface Location {\n /**\n * Business Location ID. Present only if the location is a business location.\n * @format GUID\n */\n _id?: string | null;\n /** The location name. */\n name?: string | null;\n /** A string representation for the full address of the location. */\n formattedAddress?: string | null;\n /**\n * The type of location:\n * - `CUSTOM`: The location is specific to this service, and is not derived from the business location.\n * - `BUSINESS`: A business location, either the default business address, or locations defined for the business by the Business Info.\n * - `CUSTOMER`: The location is determined by the customer and is not set up beforehand.\n */\n locationType?: LocationTypeWithLiterals;\n}\n\nexport enum LocationType {\n UNKNOWN_LOCATION_TYPE = 'UNKNOWN_LOCATION_TYPE',\n /** A business location, either the default business address, or locations defined for the business by the Business Info. */\n BUSINESS = 'BUSINESS',\n /** The location is unique to this service and isn't defined as one of the business locations. */\n CUSTOM = 'CUSTOM',\n /** The location can be determined by the customer and is not set up beforehand. */\n CUSTOMER = 'CUSTOMER',\n}\n\n/** @enumType */\nexport type LocationTypeWithLiterals =\n | LocationType\n | 'UNKNOWN_LOCATION_TYPE'\n | 'BUSINESS'\n | 'CUSTOM'\n | 'CUSTOMER';\n\n/** relevant for event based slots, and not for availability based slots */\nexport interface EventInfo {\n /**\n * The event ID.\n * @minLength 36\n * @maxLength 250\n */\n eventId?: string | null;\n /** Waiting list details for the event, if enabled in the service's booking policy. */\n waitingList?: WaitingList;\n}\n\nexport interface WaitingList {\n /**\n * Total number of spots in the waiting list.\n * @min 1\n */\n totalCapacity?: number | null;\n /**\n * Number of remaining spots in the waiting list.\n * For example, a yoga event with a capacity of `10` and `3` registrants will have a `remainingCapacity` of `7`.\n */\n remainingCapacity?: number | null;\n}\n\nexport interface BookingPolicyViolations {\n /** Bookings policy violation. Too early to book this slot. */\n tooEarlyToBook?: boolean | null;\n /** The earliest time at which booking for this slot is allowed, in UTC format (`YYYY-MM-DDThh:mm:ss.sssZ`). */\n earliestBookingDate?: Date | null;\n /** Bookings policy violation. Too late to book this slot. */\n tooLateToBook?: boolean | null;\n /** Bookings policy violation. Online booking is disabled for the `TimeSlot` service. */\n bookOnlineDisabled?: boolean | null;\n}\n\nexport interface AvailableResources {\n /**\n * Resource type ID.\n * @format GUID\n */\n resourceTypeId?: string | null;\n /**\n * Available resources for the time slot.\n *\n * + When returned from `ListAvailabilityTimeSlots`, empty by default.\n * + + If you provided `includeResourceTypeIds` or `resourceIds` in request,\n * contains __up__ to 10 available resources out of those provided.\n *\n * + When returned from `GetAvailabilityTimeSlots`, contains all available resources by default.\n * + + If you provided `includeResourceTypeIds` or `resourceIds` in request,\n * contains all of the available resources out of those provided.\n *\n *\n * > + When returned from `ListMultiServiceAvailabilityTimeSlots`, empty by default.\n * > + + If you provided `includeResourceTypeIds` or `resourceIds` in request,\n * > contains __up__ to 10 available resources out of those provided.\n *\n * > + When returned from `GetMultiServiceAvailabilityTimeSlots`, contains all available resources by default.\n * > + + If you provided `includeResourceTypeIds` or `resourceIds` in request,\n * > contains all of the available resources out of those provided.\n */\n resources?: Resource[];\n /**\n * Whether there are more available resources for the slot that are not listed in `resources` due to size limitations.\n * @readonly\n */\n hasMoreAvailableResources?: boolean | null;\n}\n\nexport interface Resource {\n /**\n * Resource ID.\n * @format GUID\n */\n _id?: string;\n /**\n * Resource name.\n * @minLength 1\n */\n name?: string | null;\n}\n\nexport interface NestedTimeSlot {\n /**\n * Service ID of the nested time slot.\n * @format GUID\n */\n serviceId?: string;\n /**\n * Local start date of the nested time slot in ISO-8601 format.\n * For example, \"2024-01-30T13:30:00\".\n * @format LOCAL_DATE_TIME\n */\n localStartDate?: string;\n /**\n * Local end date of the nested time slot in ISO-8601 format.\n * For example, \"2024-01-30T14:30:00\".\n * @format LOCAL_DATE_TIME\n */\n localEndDate?: string;\n /**\n * List of `AvailableResources` for the nested time slot.\n * Each `AvailableResources` contains information about available resources of the same type.\n * @maxSize 10\n */\n availableResources?: AvailableResources[];\n}\n\nexport interface NonBookableReasons {\n /** The slot is fully booked with no remaining capacity. */\n noRemainingCapacity?: boolean | null;\n /** Booking this slot would violate the service's booking policy. */\n violatesBookingPolicy?: boolean | null;\n /** The slot is reserved for the waiting list and not available for direct booking. */\n reservedForWaitingList?: boolean | null;\n}\n\nexport interface ListMultiServiceAvailabilityTimeSlotsRequest {\n /**\n * Services for which the multiService time slots are being returned for.\n * Each service contains its own resources filters within.\n *\n * MinSize: `2`.\n * MaxSize: `8`.\n *\n * Required, unless `cursorPaging`.`cursor` is provided.\n * @maxSize 8\n */\n services?: Service[];\n /**\n * Lower boundary for `localStartDate` to include in response, in ISO-8601 format.\n * For example, \"2024-01-30T13:30:00\".\n *\n * Each returned `TimeSlot` in response has a `localStartDate`\n * within the provided `fromLocalDate` and `toLocalDate` exclusive.\n *\n * Required, unless `cursorPaging`.`cursor` is provided.\n * @format LOCAL_DATE_TIME\n */\n fromLocalDate?: string | null;\n /**\n * Upper boundary for `localStartDate` to include in response, in ISO-8601 format.\n * For example, \"2024-01-30T14:30:00\".\n *\n * Each returned `TimeSlot` in response has a `localStartDate`\n * within the provided `fromLocalDate` and `toLocalDate` exclusive.\n *\n * Required, unless `cursorPaging`.`cursor` is provided.\n * @format LOCAL_DATE_TIME\n */\n toLocalDate?: string | null;\n /**\n * Time zone, in IANA time zone format.\n *\n * Required, unless `cursorPaging`.`cursor` is provided.\n * @minLength 1\n * @maxLength 150\n */\n timeZone?: string | null;\n /**\n * Location for which the multiService TimeSlots are being returned for.\n *\n * You can specify location or location type for which the TimeSlots will be returned for.\n * If locationType is `BUSINESS`, you __must__ provide a locationId.\n *\n * <blockquote class=\"warning\">\n * <p><strong>warning:</strong><br/>\n * Supports filtering by location type, or by location ID. </br>\n * Other fields like <code class=\"grey-background\">name</code> are ignored.</p>\n * </blockquote>\n *\n * Required, unless `cursorPaging`.`cursor` is provided.\n */\n location?: Location;\n /**\n * Whether the `TimeSlot` is bookable according to all of the services booking policies.\n *\n * If booking any of the `TimeSlot`.`NestedTimeSlot`s violates any of its services bookings policies,\n * returns as `false`. Otherwise, returns as `true`.\n *\n * > __Note:__\n * > A `TimeSlot` with a `NestedTimeSlot` that doesn't meet its service's bookings policies will be returned with `bookable` = false,\n * > while a `TimeSlot` with no available resources will not be returned at all.\n */\n bookable?: boolean | null;\n /**\n * Indicators for service's booking policy violations for booking the `TimeSlot`.\n *\n * A bookable time slot must not violate any policy,\n * therefor, this filter is only relevant when `bookable` filter is false.\n *\n * Each nested field is checked on all `NestedTimeSlot`s. For example, if only one of the `NestedTimeSlot`'s\n * has a service with `tooEarlyToBook` same as in the request, we return the `TimeSlot` regardless of whether\n * the other `NestedTimeSlots` has the same `tooEarlyToBook` as in request.\n *\n * Each nested field is checked on its own. For example, if `tooEarlyToBook` is defined and `bookOnlineDisabled` is not defined\n * we return slots for which `tooEarlyToBook` is same as on the request, regardless of `bookOnlineDisabled`.\n */\n bookingPolicyViolations?: BookingPolicyViolations;\n /**\n * Maximum number of slots to load for each day. For example, if `timeSlotsPerDay` is set to `3`,\n * we return at most 3 available TimeSlots for each day within the date range specified in request.\n *\n * By default,\n * if `bookable` filter was not specified,\n * and a day has both `bookable` and `un-bookable` slots, `bookable` slots are returned first.\n *\n * If the number of `bookable` slots is less than the requested `timeSlotsPerDay`,\n * `un-bookable` slots will be returned according to the specified filters.\n */\n timeSlotsPerDay?: number | null;\n /**\n * CursorPaging.\n *\n * Enables you to fetch TimeSlots in smaller, more manageable chunks\n * by setting a limit on the number of results returned in response.\n * This is useful in order to enhance efficiency of data retrieval and reduce load on both the client and server.\n *\n * If there are more results than the specified limit, the response will contain a `cursorPagingMetaData`\n * with a cursor pointing to next page of results. In order to fetch the next page of results, you should pass the\n * returned cursor to the next call as `cursorPaging`.`cursor`.\n *\n * For the first call, you should only specify the `limit` for the results page.\n * For each following call, you should only pass the previous returned cursor as `cursorPaging`.`cursor`\n * the `cursorPaging`.`limit`. You may pass a different `limit`.\n * No need to specify any additional parameters.\n *\n * <blockquote class=\"important\">\n * <p><strong>Important:</strong><br/>\n * If you only provide a <code class=\"grey-background\">cursorPaging</code>. <code class=\"grey-background\">cursor</code>,\n * the response will contain the default size of results which is `1000`.\n * </p>\n * </blockquote>\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Service {\n /**\n * Service ID.\n * @format GUID\n */\n serviceId?: string;\n /**\n * Resources to include in response.\n * @format GUID\n * @maxSize 135\n */\n resourceIds?: string[];\n /**\n * The resource type ID's to include in returned time slots.\n * This is in addition to the specifically requested resources.\n *\n * <blockquote class=\"important\">\n * Currently supported only for Staff Member resource type.\n * Staff Member type ID: 1cd44cf8-756f-41c3-bd90-3e2ffcaf1155\n * </blockquote>\n * @format GUID\n * @maxSize 100\n */\n includeResourceTypeIds?: string[];\n /**\n * Selected customer choices.\n * If specified, the selected choices will be used to calculate service configuration.\n * If not specified, the service default configuration will be used.\n * Enforcing this field is the responsibility of the SPI implementer, and not by the Availability API.\n */\n customerChoices?: V2CustomerChoices;\n}\n\n/**\n * Selected customer choices.\n * These choices are selected by the customer during the booking flow and can be utilized to calculate the corresponding service's configuration properties.\n */\nexport interface V2CustomerChoices {\n /**\n * The selected customer duration in minutes.\n * Min: `1 minute`\n * Max: `44639 minutes` (30 days, 23 hours, and 59 minutes)\n * @min 1\n * @max 44639\n */\n durationInMinutes?: number | null;\n /**\n * The selected add-ons IDs.\n * Max: Derived from max amount of Add-On groups * max amount of Add-Ons per group.\n * @format GUID\n * @maxSize 21\n */\n addOnIds?: string[] | null;\n /**\n * The selected duration choice ID.\n * @format GUID\n */\n durationChoiceId?: string | null;\n}\n\nexport interface CursorPaging {\n /**\n * Number of results to load.\n *\n * Default: `1000`.\n * Max: `1000`.\n * @max 1000\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n */\n cursor?: string | null;\n}\n\nexport interface ListMultiServiceAvailabilityTimeSlotsResponse {\n /**\n * Time slots.\n * @maxSize 1000\n */\n timeSlots?: TimeSlot[];\n /**\n * Time zone, in IANA time zone format.\n * Shared for all TimeSlots in response.\n * @minLength 1\n * @maxLength 150\n */\n timeZone?: string | null;\n /**\n * CursorPagingMetaData.\n * Contains information about the next page of results.\n *\n * By default,\n * if there are more than 1000 results,\n * the response will contain a `cursorPagingMetaData` with a cursor to the next page of results.\n *\n * <blockquote class=\"important\">\n * <p><strong>Important:</strong><br/>\n * <code class=\"grey-background\">count</code> is not supported.</p>\n * </blockquote>\n */\n cursorPagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Offset that was requested. */\n cursors?: Cursors;\n /**\n * Indicates if there are more results after the current page.\n * If `true`, another page of results can be retrieved.\n * If `false`, this is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /** Cursor pointing to next page in the list of results. */\n next?: string | null;\n /** Cursor pointing to previous page in the list of results. */\n prev?: string | null;\n}\n\nexport interface GetMultiServiceAvailabilityTimeSlotRequest {\n /**\n * Services for which the multiService TimeSlots are being returned for.\n * Each service contains its own resources filters within.\n *\n * MinSize: 2.\n * MaxSize: 8.\n * @minSize 2\n * @maxSize 8\n */\n services?: Service[];\n /**\n * Local start date of the time slot, in ISO-8601 format.\n * For example, \"2024-01-30T13:30:00\".\n * @format LOCAL_DATE_TIME\n */\n localStartDate?: string;\n /**\n * Local end date of the time slot, in ISO-8601 format.\n * For example, \"2024-01-30T14:30:00\".\n * @format LOCAL_DATE_TIME\n */\n localEndDate?: string;\n /**\n * Time zone, in IANA time zone format.\n * @minLength 1\n * @maxLength 150\n */\n timeZone?: string | null;\n /**\n * The location of the time slot.\n *\n * You must provide a specific `locationType`.\n * If locationType is `BUSINESS`, you __must__ also provide a `locationId`.\n *\n * <blockquote class=\"warning\">\n * <p>Supports filtering by location type, or by location ID.\n * Other fields like <code class=\"grey-background\">name</code> are ignored.</p>\n * </blockquote>\n */\n location?: Location;\n}\n\nexport interface GetMultiServiceAvailabilityTimeSlotResponse {\n /** Time slot. */\n timeSlot?: TimeSlot;\n /**\n * The time zone, in IANA time zone format.\n * @minLength 1\n * @maxLength 150\n */\n timeZone?: string | null;\n}\n\nexport interface ListAvailabilityTimeSlotsRequest {\n /**\n * Service ID for which the time slots are being returned for.\n * Currently supported only for services of type `APPOINTMENT`.\n *\n * Required, unless `cursorPaging`.`cursor` is provided.\n * @format GUID\n */\n serviceId?: string | null;\n /**\n * Lower boundary for `localStartDate` to include in response, in ISO-8601 format.\n * For example, \"2024-01-30T13:30:00\".\n *\n * Each returned `TimeSlot` in response has a `localStartDate`\n * within the provided `fromLocalDate` and `toLocalDate` exclusive.\n *\n * Required, unless `cursorPaging`.`cursor` is provided.\n * @format LOCAL_DATE_TIME\n */\n fromLocalDate?: string | null;\n /**\n * Upper boundary for `localStartDate` to include in response, in ISO-8601 format.\n * For example, \"2024-01-30T14:30:00\".\n *\n * Each returned `TimeSlot` in response has a `localStartDate`\n * within the provided `fromLocalDate` and `toLocalDate` exclusive.\n *\n * Required, unless `cursorPaging`.`cursor` is provided.\n * @format LOCAL_DATE_TIME\n */\n toLocalDate?: string | null;\n /**\n * Time zone, in IANA time zone format.\n *\n * Required, unless `cursorPaging`.`cursor` is provided.\n * @minLength 1\n * @maxLength 150\n */\n timeZone?: string | null;\n /**\n * Locations to include in response.\n *\n * By default,\n * if no locations are provided,\n * the response contains TimeSlots for all locations where the service is available.\n *\n * You can specify locations or location types for which the time slots will be returned for.\n * If locationType is `BUSINESS`, you __must__ provide a locationId.\n *\n * <blockquote class=\"warning\">\n * <p><strong>warning:</strong><br/>\n * Supports filtering by location type, or by location ID. </br>\n * Other fields like <code class=\"grey-background\">name</code> are ignored.</p>\n * </blockquote>\n * @maxSize 5\n */\n locations?: Location[];\n /**\n * Resources to include in response.\n *\n * If specified,\n * the returned TimeSlots will contain __up__ to 10 available resources out of the provided list.\n * Otherwise, the returned TimeSlots returns with an empty `AvailableResources`.\n * @format GUID\n * @maxSize 135\n * @deprecated\n */\n resourceIds?: string[];\n /**\n * Resource type ID's to include in response, this is in addition to the requested `resourceIds`.\n *\n * If specified in request, the returned TimeSlots will contain __up__ to 10 `AvailableResources` with `ResourceTypeId`\n * out of those specified, each contains __up__ to 10 available resources of this type.\n * @format GUID\n * @maxSize 100\n */\n includeResourceTypeIds?: string[];\n /**\n * Whether the `TimeSlot` is bookable according to the service's booking policies.\n *\n * If booking this `TimeSlot` does not violates any of the service's booking policies,\n * returns as `true`. Otherwise, returns as `false`.\n *\n * > __Note:__\n * > A time slot that doesn't meet the service's bookings policies will be returned with `bookable` = false,\n * > while a time slot with no available resources will not be returned at all.\n */\n bookable?: boolean | null;\n /**\n * Indicators for service's booking policy violations for booking the `TimeSlot`.\n *\n * A bookable time slot must not violate any policy,\n * therefor, this filter is only relevant when `bookable` filter is false.\n *\n * Each nested field is checked on its own. i.e. if `tooEarlyToBook` is defined and `bookOnlineDisabled` is not defined\n * we return slots for which `tooEarlyToBook` is same as on the request, regardless of `bookOnlineDisabled`.\n */\n bookingPolicyViolations?: BookingPolicyViolations;\n /**\n * Maximum number of slots to load for each day. For example, if `timeSlotsPerDay` is set to `3`,\n * we return at most 3 available TimeSlots for each day within the date range specified in request.\n *\n * By default,\n * if `bookable` filter was not specified,\n * and a day has both `bookable` and `un-bookable` slots, `bookable` slots are returned first.\n *\n * If the number of `bookable` slots is less than the requested `timeSlotsPerDay`,\n * `un-bookable` slots will be returned according to the specified filters.\n */\n timeSlotsPerDay?: number | null;\n /**\n * CursorPaging.\n *\n * Enables you to fetch results in smaller, more manageable chunks\n * by setting a limit on the number of results returned in response.\n * This is useful in order to enhance efficiency of data retrieval and reduce load on both the client and server.\n *\n * If there are more results than the specified limit, the response will contain a `cursorPagingMetaData`\n * with a cursor pointing to next page of results. In order to fetch the next page of results, you should pass the\n * returned cursor to the next call as `cursorPaging`.`cursor`.\n *\n * For the first call, you should only specify the `limit` for the results page.\n * For each following call, you should only pass `cursorPaging`.`cursor` with the returned cursor from previous call, and\n * a `cursorPaging`.`limit`.\n * No need to specify any additional parameters.\n *\n * <blockquote class=\"important\">\n * <p><strong>Important:</strong><br/>\n * If you only provide a <code class=\"grey-background\">cursorPaging</code>. <code class=\"grey-background\">cursor</code>,\n * the response will contain the default size of results which is `1000`.\n * </p>\n * </blockquote>\n */\n cursorPaging?: CursorPaging;\n /**\n * resources filter\n * If specified, only time slots with these resources will be returned.\n * @maxSize 3\n */\n resourceTypes?: ResourceType[];\n}\n\n/**\n * Selected customer choices.\n * These choices are selected by the customer during the booking flow and can be utilized to calculate the corresponding service's configuration properties.\n */\nexport interface CustomerChoices {\n /**\n * The selected customer duration in minutes.\n * Min: `1 minute`\n * Max: `44639 minutes` (30 days, 23 hours, and 59 minutes)\n * @min 1\n * @max 44639\n */\n durationInMinutes?: number | null;\n /**\n * The selected add-ons IDs.\n * Max: Derived from max amount of Add-On groups * max amount of Add-Ons per group.\n * @format GUID\n * @maxSize 21\n */\n addOnIds?: string[] | null;\n /**\n * The selected duration choice ID.\n * @format GUID\n */\n durationChoiceId?: string | null;\n}\n\nexport interface ResourceType {\n /**\n * Resource type ID.\n * @format GUID\n */\n resourceTypeId?: string | null;\n /**\n * Resource IDs.\n * The response will contain only slots that have at least one of the specified resources.\n * @format GUID\n * @minSize 1\n * @maxSize 135\n */\n resourceIds?: string[] | null;\n}\n\nexport interface ListAvailabilityTimeSlotsResponse {\n /**\n * Time slots.\n * @maxSize 1000\n */\n timeSlots?: TimeSlot[];\n /**\n * Time zone, in IANA time zone format.\n * Shared for all TimeSlots in response.\n * @minLength 1\n * @maxLength 150\n */\n timeZone?: string | null;\n /**\n * CursorPagingMetaData.\n * Contains information about the next page of results.\n *\n * By default,\n * if there are more than 1000 results,\n * the response will contain a `cursorPagingMetaData` with a cursor to the next page of results.\n *\n * <blockquote class=\"important\">\n * <p><strong>Important:</strong><br/>\n * <code class=\"grey-background\">count</code> is not supported.</p>\n * </blockquote>\n */\n cursorPagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface GetAvailabilityTimeSlotRequest {\n /**\n * Service ID of the time slot.\n * Currently supported only for services of type `APPOINTMENT`.\n * @format GUID\n */\n serviceId?: string;\n /**\n * Local start date of the time slot, in ISO-8601 format.\n * For example, \"2024-01-30T13:30:00\".\n * @format LOCAL_DATE_TIME\n */\n localStartDate?: string;\n /**\n * Local end date of the time slot, in ISO-8601 format.\n * For example, \"2024-01-30T14:30:00\".\n * @format LOCAL_DATE_TIME\n */\n localEndDate?: string;\n /**\n * Time zone, in IANA time zone format.\n * @minLength 1\n * @maxLength 150\n */\n timeZone?: string | null;\n /**\n * The location of the time slot.\n *\n * You must provide a specific `locationType`.\n * If locationType is `BUSINESS`, you __must__ also provide a `locationId`.\n *\n * <blockquote class=\"warning\">\n * <p>Supports filtering by location type, or by location ID.\n * Other fields like <code class=\"grey-background\">name</code> are ignored.</p>\n * </blockquote>\n */\n location?: Location;\n /**\n * Resources to include in response.\n *\n * If specified,\n * the returned `TimeSlot` contains only the available resources out of provided list.\n * Otherwise, the returned `TimeSlot` returned with all possible `AvailableResources`.\n * @format GUID\n * @maxSize 135\n */\n resourceIds?: string[];\n /**\n * Resource type IDs to include in response, this is in addition to the requested `resourceIds`.\n *\n * If specified in request, the returned `TimeSlot` contains only the `AvailableResources` with `ResourceTypeId`\n * out of those specified, each contains all the available resources of this type.\n * @format GUID\n * @maxSize 100\n */\n includeResourceTypeIds?: string[];\n}\n\nexport interface GetAvailabilityTimeSlotRequestCustomerChoices {\n /**\n * The selected add-ons IDs.\n * Max: Derived from max amount of Add-On groups * max amount of Add-Ons per group.\n * @format GUID\n * @maxSize 21\n */\n addOnIds?: string[] | null;\n /**\n * The selected duration choice ID.\n * @format GUID\n */\n durationChoiceId?: string | null;\n}\n\nexport interface GetAvailabilityTimeSlotResponse {\n /** Time slot. */\n timeSlot?: TimeSlot;\n /**\n * Time zone, in IANA time zone format.\n * @minLength 1\n * @maxLength 150\n */\n timeZone?: string | null;\n}\n\nexport interface ListEventTimeSlotsRequest {\n /**\n * Local start date for which event time slots are returned, in ISO-8601 format.\n * E.g., \"2024-01-30T13:30:00\".\n * Required, unless `cursorPaging` is provided.\n * @format LOCAL_DATE_TIME\n */\n fromLocalDate?: string | null;\n /**\n * Local end date for which event time slots are returned, in ISO-8601 format.\n * E.g., \"2024-01-30T13:30:00\".\n * Required, unless `cursorPaging` is provided.\n * @format LOCAL_DATE_TIME\n */\n toLocalDate?: string | null;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database).\n * For example, `America/New_York`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties).\n * @maxLength 100\n */\n timeZone?: string | null;\n /**\n * Optional service IDs to filter by.\n * If not provided, time slots for all services are returned.\n * @format GUID\n * @maxSize 100\n */\n serviceIds?: string[] | null;\n /**\n * Whether to filter bookable slots only.\n * A bookable slot is a slot that has remaining capacity and also satisfies the booking policy.\n * Default true: bookable and non-bookable slots are returned.\n */\n includeNonBookable?: boolean | null;\n /**\n * Filter event time slots by the minimum bookable capacity.\n * @min 1\n */\n minBookableCapacity?: number | null;\n /**\n * Optional filter to apply to the events. E.g., resource, location, etc.\n * 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.\n */\n eventFilter?: Record<string, any> | null;\n /**\n * The maximum number of time slots to return for each day.\n * For example, if `maxSlotsPerDay` is set to `1`, at most 1 available slot is returned for each day.\n * When a day has both bookable and non-bookable slots, bookable slots are returned first.\n * If `maxSlotsPerDay` is provided, `toLocalDate` must also be provided and must be at most 1 month after `fromLocalDate`.\n * @min 1\n * @max 1\n */\n maxSlotsPerDay?: number | null;\n /** Cursor to retrieve the next page of results. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface ListEventTimeSlotsResponse {\n /** Retrieved time slots matching the specified filters. */\n timeSlots?: TimeSlot[];\n /**\n * The time slots time zone.\n * Either provided explicitly or default to the business time zone.\n * @minLength 1\n * @maxLength 150\n */\n timeZone?: string | null;\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface GetEventTimeSlotRequest {\n /**\n * The event ID.\n * @minLength 36\n * @maxLength 250\n */\n eventId: string | null;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database).\n * For example, `America/New_York`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties).\n * @maxLength 100\n */\n timeZone?: string | null;\n}\n\nexport interface GetEventTimeSlotResponse {\n /** The time slot. */\n timeSlot?: TimeSlot;\n /**\n * The time slot time zone.\n * Either provided explicitly or default to the business time zone.\n * @minLength 1\n * @maxLength 150\n */\n timeZone?: string | null;\n}\n\ntype TimeSlotNonNullablePaths =\n | `location.locationType`\n | `availableResources`\n | `nestedTimeSlots`\n | `nestedTimeSlots.${number}.serviceId`\n | `nestedTimeSlots.${number}.localStartDate`\n | `nestedTimeSlots.${number}.localEndDate`;\n\n/**\n * Retrieves event time slots based on specified filters.\n *\n * Event time slots are predefined events that customers can book, subject to capacity and booking policies.\n * By default, the Bookings app provides the events (classes) and the bookings policy.\n *\n * `ListEventTimeSlots` runs with these defaults, which you can override:\n * - `providerId` is the Bookings app ID.\n * - `timeZone` is the business time zone.\n * - `cursorPaging.limit` is `50`.\n * - Both bookable and non-bookable time slots are returned.\n *\n * Time slots are always sorted by their start time in ascending order.\n * @public\n * @documentationMaturity preview\n * @permissionId BOOKINGS.AVAILABILITY_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wixpress.bookings.availability.v2.EventTimeSlots.ListEventTimeSlots\n */\nexport async function listEventTimeSlots(\n options?: ListEventTimeSlotsOptions\n): Promise<\n NonNullablePaths<\n ListEventTimeSlotsResponse,\n {\n [P in TimeSlotNonNullablePaths]: `timeSlots.${number}.${P}`;\n }[TimeSlotNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n fromLocalDate: options?.fromLocalDate,\n toLocalDate: options?.toLocalDate,\n timeZone: options?.timeZone,\n serviceIds: options?.serviceIds,\n includeNonBookable: options?.includeNonBookable,\n minBookableCapacity: options?.minBookableCapacity,\n eventFilter: options?.eventFilter,\n maxSlotsPerDay: options?.maxSlotsPerDay,\n cursorPaging: options?.cursorPaging,\n });\n\n const reqOpts =\n ambassadorWixBookingsAvailabilityV2TimeSlot.listEventTimeSlots(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n fromLocalDate: '$[0].fromLocalDate',\n toLocalDate: '$[0].toLocalDate',\n timeZone: '$[0].timeZone',\n serviceIds: '$[0].serviceIds',\n includeNonBookable: '$[0].includeNonBookable',\n minBookableCapacity: '$[0].minBookableCapacity',\n eventFilter: '$[0].eventFilter',\n maxSlotsPerDay: '$[0].maxSlotsPerDay',\n cursorPaging: '$[0].cursorPaging',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListEventTimeSlotsOptions {\n /**\n * Local start date for which event time slots are returned, in ISO-8601 format.\n * E.g., \"2024-01-30T13:30:00\".\n * Required, unless `cursorPaging` is provided.\n * @format LOCAL_DATE_TIME\n */\n fromLocalDate?: string | null;\n /**\n * Local end date for which event time slots are returned, in ISO-8601 format.\n * E.g., \"2024-01-30T13:30:00\".\n * Required, unless `cursorPaging` is provided.\n * @format LOCAL_DATE_TIME\n */\n toLocalDate?: string | null;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database).\n * For example, `America/New_York`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties).\n * @maxLength 100\n */\n timeZone?: string | null;\n /**\n * Optional service IDs to filter by.\n * If not provided, time slots for all services are returned.\n * @format GUID\n * @maxSize 100\n */\n serviceIds?: string[] | null;\n /**\n * Whether to filter bookable slots only.\n * A bookable slot is a slot that has remaining capacity and also satisfies the booking policy.\n * Default true: bookable and non-bookable slots are returned.\n */\n includeNonBookable?: boolean | null;\n /**\n * Filter event time slots by the minimum bookable capacity.\n * @min 1\n */\n minBookableCapacity?: number | null;\n /**\n * Optional filter to apply to the events. E.g., resource, location, etc.\n * 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.\n */\n eventFilter?: Record<string, any> | null;\n /**\n * The maximum number of time slots to return for each day.\n * For example, if `maxSlotsPerDay` is set to `1`, at most 1 available slot is returned for each day.\n * When a day has both bookable and non-bookable slots, bookable slots are returned first.\n * If `maxSlotsPerDay` is provided, `toLocalDate` must also be provided and must be at most 1 month after `fromLocalDate`.\n * @min 1\n * @max 1\n */\n maxSlotsPerDay?: number | null;\n /** Cursor to retrieve the next page of results. */\n cursorPaging?: CursorPaging;\n}\n\n/**\n * Retrieves the details of a specific event time slot based on the provided event ID.\n * @param eventId - The event ID.\n * @public\n * @documentationMaturity preview\n * @requiredField eventId\n * @permissionId BOOKINGS.AVAILABILITY_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wixpress.bookings.availability.v2.EventTimeSlots.GetEventTimeSlot\n */\nexport async function getEventTimeSlot(\n eventId: string,\n options?: GetEventTimeSlotOptions\n): Promise<\n NonNullablePaths<\n GetEventTimeSlotResponse,\n {\n [P in TimeSlotNonNullablePaths]: `timeSlot.${P}`;\n }[TimeSlotNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n eventId: eventId,\n timeZone: options?.timeZone,\n });\n\n const reqOpts =\n ambassadorWixBookingsAvailabilityV2TimeSlot.getEventTimeSlot(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n eventId: '$[0]',\n timeZone: '$[1].timeZone',\n },\n singleArgumentUnchanged: false,\n },\n ['eventId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetEventTimeSlotOptions {\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database).\n * For example, `America/New_York`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties).\n * @maxLength 100\n */\n timeZone?: string | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressBookingsAvailabilityV2EventTimeSlotsUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/_api/service-availability/v2/time-slots',\n destPath: '/v2/time-slots',\n },\n {\n srcPath: '/_api/service-availability/v2/multi-service-time-slots',\n destPath: '/v2/multi-service-time-slots',\n },\n {\n srcPath: '/service-availability/v2/time-slots',\n destPath: '/v2/time-slots',\n },\n {\n srcPath: '/service-availability/v2/multi-service-time-slots',\n destPath: '/v2/multi-service-time-slots',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/service-availability/v2/time-slots',\n destPath: '/v2/time-slots',\n },\n {\n srcPath: '/_api/service-availability/v2/multi-service-time-slots',\n destPath: '/v2/multi-service-time-slots',\n },\n {\n srcPath: '/service-availability/v2/time-slots',\n destPath: '/v2/time-slots',\n },\n {\n srcPath: '/service-availability/v2/multi-service-time-slots',\n destPath: '/v2/multi-service-time-slots',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/service-availability/v2/time-slots',\n destPath: '/v2/time-slots',\n },\n {\n srcPath: '/_api/service-availability/v2/multi-service-time-slots',\n destPath: '/v2/multi-service-time-slots',\n },\n {\n srcPath: '/service-availability/v2/multi-service-time-slots',\n destPath: '/v2/multi-service-time-slots',\n },\n {\n srcPath: '/service-availability/v2/time-slots',\n destPath: '/v2/time-slots',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/service-availability/v2/time-slots',\n destPath: '/v2/time-slots',\n },\n {\n srcPath: '/_api/service-availability/v2/multi-service-time-slots',\n destPath: '/v2/multi-service-time-slots',\n },\n ],\n _: [\n {\n srcPath: '/_api/service-availability/v2/time-slots',\n destPath: '/v2/time-slots',\n },\n {\n srcPath: '/_api/service-availability/v2/multi-service-time-slots',\n destPath: '/v2/multi-service-time-slots',\n },\n {\n srcPath: '/_api/service-availability/v2/time-slots/event',\n destPath: '/v2/time-slots/event',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/service-availability/v2/multi-service-time-slots',\n destPath: '/v2/multi-service-time-slots',\n },\n {\n srcPath: '/_api/service-availability/v2/time-slots',\n destPath: '/v2/time-slots',\n },\n {\n srcPath: '/_api/service-availability/v2/time-slots/event',\n destPath: '/v2/time-slots/event',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/service-availability/v2/multi-service-time-slots',\n destPath: '/v2/multi-service-time-slots',\n },\n {\n srcPath: '/_api/service-availability/v2/time-slots',\n destPath: '/v2/time-slots',\n },\n {\n srcPath: '/_api/service-availability/v2/time-slots/event',\n destPath: '/v2/time-slots/event',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/service-availability/v2/multi-service-time-slots',\n destPath: '/v2/multi-service-time-slots',\n },\n {\n srcPath: '/_api/service-availability/v2/time-slots',\n destPath: '/v2/time-slots',\n },\n {\n srcPath: '/_api/service-availability/v2/time-slots/event',\n destPath: '/v2/time-slots/event',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/service-availability/v2/time-slots/event',\n destPath: '/v2/time-slots/event',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_bookings_event-time-slots';\n\n/**\n * Retrieves event time slots based on specified filters.\n *\n * Event time slots are predefined events that customers can book, subject to capacity and booking policies.\n * By default, the Bookings app provides the events (classes) and the bookings policy.\n *\n * `ListEventTimeSlots` runs with these defaults, which you can override:\n * - `providerId` is the Bookings app ID.\n * - `timeZone` is the business time zone.\n * - `cursorPaging.limit` is `50`.\n * - Both bookable and non-bookable time slots are returned.\n *\n * Time slots are always sorted by their start time in ascending order.\n */\nexport function listEventTimeSlots(\n payload: object\n): RequestOptionsFactory<any> {\n function __listEventTimeSlots({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.availability.v2.time_slot',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.bookings.availability.v2.EventTimeSlots.ListEventTimeSlots',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsAvailabilityV2EventTimeSlotsUrl({\n protoPath: '/v2/time-slots/event',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'timeSlots.bookingPolicyViolations.earliestBookingDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listEventTimeSlots;\n}\n\n/** Retrieves the details of a specific event time slot based on the provided event ID. */\nexport function getEventTimeSlot(payload: object): RequestOptionsFactory<any> {\n function __getEventTimeSlot({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.availability.v2.time_slot',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.bookings.availability.v2.EventTimeSlots.GetEventTimeSlot',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressBookingsAvailabilityV2EventTimeSlotsUrl({\n protoPath: '/v2/time-slots/event/{eventId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'timeSlot.bookingPolicyViolations.earliestBookingDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getEventTimeSlot;\n}\n","import { HttpClient } from '@wix/sdk-types';\nimport {\n GetEventTimeSlotOptions,\n GetEventTimeSlotResponse,\n ListEventTimeSlotsOptions,\n ListEventTimeSlotsResponse,\n getEventTimeSlot as universalGetEventTimeSlot,\n listEventTimeSlots as universalListEventTimeSlots,\n} from './bookings-availability-v2-time-slot-event-time-slots.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/bookings' };\n\nexport function listEventTimeSlots(\n httpClient: HttpClient\n): ListEventTimeSlotsSignature {\n return (options?: ListEventTimeSlotsOptions) =>\n universalListEventTimeSlots(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListEventTimeSlotsSignature {\n /**\n * Retrieves event time slots based on specified filters.\n *\n * Event time slots are predefined events that customers can book, subject to capacity and booking policies.\n * By default, the Bookings app provides the events (classes) and the bookings policy.\n *\n * `ListEventTimeSlots` runs with these defaults, which you can override:\n * - `providerId` is the Bookings app ID.\n * - `timeZone` is the business time zone.\n * - `cursorPaging.limit` is `50`.\n * - Both bookable and non-bookable time slots are returned.\n *\n * Time slots are always sorted by their start time in ascending order.\n */\n (\n options?: ListEventTimeSlotsOptions | undefined\n ): Promise<ListEventTimeSlotsResponse>;\n}\n\nexport function getEventTimeSlot(\n httpClient: HttpClient\n): GetEventTimeSlotSignature {\n return (eventId: string, options?: GetEventTimeSlotOptions) =>\n universalGetEventTimeSlot(\n eventId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetEventTimeSlotSignature {\n /**\n * Retrieves the details of a specific event time slot based on the provided event ID.\n * @param - The event ID.\n */\n (\n eventId: string,\n options?: GetEventTimeSlotOptions | undefined\n ): Promise<GetEventTimeSlotResponse>;\n}\n\nexport {\n AvailableResources,\n BookingPolicyViolations,\n CursorPaging,\n CursorPagingMetadata,\n Cursors,\n CustomerChoices,\n EventInfo,\n GetAvailabilityTimeSlotRequest,\n GetAvailabilityTimeSlotRequestCustomerChoices,\n GetAvailabilityTimeSlotResponse,\n GetEventTimeSlotOptions,\n GetEventTimeSlotRequest,\n GetEventTimeSlotResponse,\n GetMultiServiceAvailabilityTimeSlotRequest,\n GetMultiServiceAvailabilityTimeSlotResponse,\n ListAvailabilityTimeSlotsRequest,\n ListAvailabilityTimeSlotsResponse,\n ListEventTimeSlotsOptions,\n ListEventTimeSlotsRequest,\n ListEventTimeSlotsResponse,\n ListMultiServiceAvailabilityTimeSlotsRequest,\n ListMultiServiceAvailabilityTimeSlotsResponse,\n Location,\n LocationType,\n NestedTimeSlot,\n NonBookableReasons,\n Resource,\n ResourceType,\n Service,\n TimeSlot,\n V2CustomerChoices,\n WaitingList,\n} from './bookings-availability-v2-time-slot-event-time-slots.universal.js';\n","import {\n listEventTimeSlots as publicListEventTimeSlots,\n getEventTimeSlot as publicGetEventTimeSlot,\n} from './bookings-availability-v2-time-slot-event-time-slots.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const listEventTimeSlots: MaybeContext<\n BuildRESTFunction<typeof publicListEventTimeSlots> &\n typeof publicListEventTimeSlots\n> = /*#__PURE__*/ createRESTModule(publicListEventTimeSlots);\nexport const getEventTimeSlot: MaybeContext<\n BuildRESTFunction<typeof publicGetEventTimeSlot> &\n typeof publicGetEventTimeSlot\n> = /*#__PURE__*/ createRESTModule(publicGetEventTimeSlot);\n\nexport { LocationType } from './bookings-availability-v2-time-slot-event-time-slots.universal.js';\nexport {\n TimeSlot,\n Location,\n EventInfo,\n WaitingList,\n BookingPolicyViolations,\n AvailableResources,\n Resource,\n NestedTimeSlot,\n NonBookableReasons,\n ListMultiServiceAvailabilityTimeSlotsRequest,\n Service,\n V2CustomerChoices,\n CursorPaging,\n ListMultiServiceAvailabilityTimeSlotsResponse,\n CursorPagingMetadata,\n Cursors,\n GetMultiServiceAvailabilityTimeSlotRequest,\n GetMultiServiceAvailabilityTimeSlotResponse,\n ListAvailabilityTimeSlotsRequest,\n CustomerChoices,\n ResourceType,\n ListAvailabilityTimeSlotsResponse,\n GetAvailabilityTimeSlotRequest,\n GetAvailabilityTimeSlotRequestCustomerChoices,\n GetAvailabilityTimeSlotResponse,\n ListEventTimeSlotsRequest,\n ListEventTimeSlotsResponse,\n GetEventTimeSlotRequest,\n GetEventTimeSlotResponse,\n ListEventTimeSlotsOptions,\n GetEventTimeSlotOptions,\n} from './bookings-availability-v2-time-slot-event-time-slots.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,0BAAAA;AAAA,EAAA,0BAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,6BAA+B;AAC/B,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B,IAAMC,sBAGK,2DAAiBA,mBAAwB;AACpD,IAAMC,oBAGK,2DAAiBA,iBAAsB;","names":["getEventTimeSlot","listEventTimeSlots","import_rest_modules","payload","LocationType","listEventTimeSlots","sdkTransformError","getEventTimeSlot","listEventTimeSlots","getEventTimeSlot","import_rest_modules","listEventTimeSlots","getEventTimeSlot"]}
|
package/build/es/index.d.mts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { HttpClient,
|
|
1
|
+
import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
2
|
import { ListEventTimeSlotsOptions, ListEventTimeSlotsResponse, GetEventTimeSlotOptions, GetEventTimeSlotResponse } from './index.typings.mjs';
|
|
3
3
|
export { AvailableResources, BookingPolicyViolations, CursorPaging, CursorPagingMetadata, Cursors, CustomerChoices, EventInfo, GetAvailabilityTimeSlotRequest, GetAvailabilityTimeSlotRequestCustomerChoices, GetAvailabilityTimeSlotResponse, GetEventTimeSlotRequest, GetMultiServiceAvailabilityTimeSlotRequest, GetMultiServiceAvailabilityTimeSlotResponse, ListAvailabilityTimeSlotsRequest, ListAvailabilityTimeSlotsResponse, ListEventTimeSlotsRequest, ListMultiServiceAvailabilityTimeSlotsRequest, ListMultiServiceAvailabilityTimeSlotsResponse, Location, LocationType, NestedTimeSlot, NonBookableReasons, Resource, ResourceType, Service, TimeSlot, V2CustomerChoices, WaitingList } from './index.typings.mjs';
|
|
4
4
|
|
|
5
|
-
type TimeSlotNonNullablePaths = `location.locationType` | `availableResources` | `nestedTimeSlots` | `nestedTimeSlots.${number}.serviceId` | `nestedTimeSlots.${number}.localStartDate` | `nestedTimeSlots.${number}.localEndDate`;
|
|
6
5
|
declare function listEventTimeSlots$1(httpClient: HttpClient): ListEventTimeSlotsSignature;
|
|
7
6
|
interface ListEventTimeSlotsSignature {
|
|
8
7
|
/**
|
|
@@ -19,9 +18,7 @@ interface ListEventTimeSlotsSignature {
|
|
|
19
18
|
*
|
|
20
19
|
* Time slots are always sorted by their start time in ascending order.
|
|
21
20
|
*/
|
|
22
|
-
(options?: ListEventTimeSlotsOptions): Promise<
|
|
23
|
-
[P in TimeSlotNonNullablePaths]: `timeSlots.${number}.${P}`;
|
|
24
|
-
}[TimeSlotNonNullablePaths]>>;
|
|
21
|
+
(options?: ListEventTimeSlotsOptions | undefined): Promise<ListEventTimeSlotsResponse>;
|
|
25
22
|
}
|
|
26
23
|
declare function getEventTimeSlot$1(httpClient: HttpClient): GetEventTimeSlotSignature;
|
|
27
24
|
interface GetEventTimeSlotSignature {
|
|
@@ -29,9 +26,7 @@ interface GetEventTimeSlotSignature {
|
|
|
29
26
|
* Retrieves the details of a specific event time slot based on the provided event ID.
|
|
30
27
|
* @param - The event ID.
|
|
31
28
|
*/
|
|
32
|
-
(eventId: string, options?: GetEventTimeSlotOptions): Promise<
|
|
33
|
-
[P in TimeSlotNonNullablePaths]: `timeSlot.${P}`;
|
|
34
|
-
}[TimeSlotNonNullablePaths]>>;
|
|
29
|
+
(eventId: string, options?: GetEventTimeSlotOptions | undefined): Promise<GetEventTimeSlotResponse>;
|
|
35
30
|
}
|
|
36
31
|
|
|
37
32
|
declare const listEventTimeSlots: MaybeContext<BuildRESTFunction<typeof listEventTimeSlots$1> & typeof listEventTimeSlots$1>;
|