@wix/auto_sdk_bookings_availability-calendar 1.0.196 → 1.0.198

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.
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/bookings-availability-v1-slot-availability-availability-calendar.schemas.ts"],"sourcesContent":["import * as z from 'zod';\n\nexport const QueryAvailabilityRequest = /*#__PURE__*/ z.object({\n query: z\n .object({\n filter: z\n .record(z.string(), z.any())\n .describe(\n 'Filter object. For a list of\\nfields you can filter by, see [Availability Calendar supported filters](https://dev.wix.com/docs/rest/business-solutions/bookings/time-slots/availability-calendar/supported-fields-filters-and-sorting).\\nYou must include `serviceId`, `startDate` and `endDate` in the filter. This avoids large results that can impact performance.'\n ),\n sort: z\n .array(\n z.object({\n fieldName: z\n .string()\n .describe('Name of the field to sort by.')\n .max(512)\n .optional(),\n order: z.enum(['ASC', 'DESC']).optional(),\n origin: z\n .object({\n latitude: z\n .number()\n .describe('Address latitude.')\n .optional()\n .nullable(),\n longitude: z\n .number()\n .describe('Address longitude.')\n .optional()\n .nullable(),\n })\n .describe(\n 'Origin point for geo-distance sorting on a GEO field\\nresults are ordered by distance from this point (ASC = nearest first, DESC = farthest first).'\n )\n .optional(),\n })\n )\n .optional(),\n })\n .describe(\n 'Query options. Refer to the\\n[supported filters article](https://dev.wix.com/docs/api-reference/business-solutions/bookings/time-slots/availability-calendar/supported-fields-filters-and-sorting)\\nfor a complete list of supported filters.'\n ),\n options: z\n .object({\n timezone: z\n .string()\n .describe(\n 'Time zone override for the `endDate` and `startDate` filters, in\\n[IANA tz database format](https://en.wikipedia.org/wiki/Tz_database), such as\\n`America/New_York` or `UTC`.\\n\\nFor example, if you specify `(\"startDate\": \"2025-11-25T17:00:00+01:00\"}` (note\\nthe +01:00 offset) in combination with `{\"timezone\": \"Europe/Bucharest\"}`\\n(+02:00 offset), *Query Availability* adjusts the effective start time to\\nreflect the specified time zone. In this case, the start time in UTC would\\nbe `2025-11-25T15:00:00` (using the +02:00 offset).\\n\\nLearn more about [handling Daylight Savings Time](https://dev.wix.com/api/rest/wix-bookings/availability-calendar/query-availability#wix-bookings_availability-calendar_query-availability_daylight-savings-time-dst).\\n\\nDefault: No modification applied to the `endDate` and `startDate` filters.'\n )\n .optional()\n .nullable(),\n slotsPerDay: z\n .number()\n .int()\n .describe(\n 'Maximum number of appointment slots to return for each date. For example, if\\nyou specify `{\"slotsPerDay\": 3}`, a maximum of 3 appointment slots/class events is\\nreturned for each day that\\'s within the query filter\\'s date range.'\n )\n .optional()\n .nullable(),\n })\n .describe('Options to use for querying availability.')\n .optional(),\n});\nexport const QueryAvailabilityResponse = /*#__PURE__*/ z.object({\n availabilityEntries: z\n .array(\n z.object({\n slot: z\n .object({\n sessionId: z\n .string()\n .describe(\n \"ID for the slot's corresponding session, when the session is either a single session\\nor a specific session generated from a recurring session.\\n\\nDeprecated. Please use `eventId` instead.\"\n )\n .optional()\n .nullable(),\n serviceId: z.string().describe('Service ID.').optional(),\n scheduleId: z.string().describe('Schedule ID.').optional(),\n startDate: z\n .string()\n .describe(\n 'The start time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)\\nformat.\\n\\nIf `timezone` is specified,\\ndates are based on the local date/time. This means that the timezone offset\\nin the `start_date` is ignored.'\n )\n .optional()\n .nullable(),\n endDate: z\n .string()\n .describe(\n 'The end time of this slot in\\n[RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) format.\\n\\nIf `timezone` is specified,\\ndates are based on the local date/time. This means that the timezone offset\\nin the `end_date` is ignored.'\n )\n .optional()\n .nullable(),\n timezone: z\n .string()\n .describe(\n 'The timezone for which slot availability is to be calculated.\\n\\nLearn more about [handling Daylight Savings Time (DST) for local time zones](https://dev.wix.com/api/rest/wix-bookings/availability-calendar/query-availability#wix-bookings_availability-calendar_query-availability_handling-daylight-savings-time-dst-for-local-time-zones)\\nwhen calculating availability.'\n )\n .optional()\n .nullable(),\n resource: z\n .object({\n _id: z\n .string()\n .describe('Resource ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n name: z\n .string()\n .describe('Resource name. Read only.')\n .max(1200)\n .optional()\n .nullable(),\n })\n .describe(\n 'The resource required for this slot. Currently, the only supported resource\\nis the relevant staff member for the slot.'\n )\n .optional(),\n location: z\n .object({\n _id: z\n .string()\n .describe(\n 'Business location ID. Available only for locations that are business locations,\\nmeaning the `location_type` is `\"OWNER_BUSINESS\"`.'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n name: z\n .string()\n .describe('Location name.')\n .optional()\n .nullable(),\n formattedAddress: z\n .string()\n .describe('The full address of this location.')\n .optional()\n .nullable(),\n formattedAddressTranslated: z\n .string()\n .describe('The full translated address of this location.')\n .max(512)\n .optional()\n .nullable(),\n locationType: z\n .enum([\n 'UNDEFINED',\n 'OWNER_BUSINESS',\n 'OWNER_CUSTOM',\n 'CUSTOM',\n ])\n .describe('Location type.')\n .optional(),\n })\n .describe('Geographic location of the slot.')\n .optional(),\n eventId: z\n .string()\n .describe(\n \"ID for the slot's corresponding event, when the event is either a single event\\nor a specific event generated from a recurring event.\"\n )\n .min(36)\n .max(250)\n .optional()\n .nullable(),\n })\n .describe(\n 'The slot for the corresponding session, when the session is either a single session\\nor a specific session generated from a recurring session.'\n )\n .optional(),\n bookable: z\n .boolean()\n .describe(\n \"Whether the slot is bookable. Bookability is determined by checking a\\nsession's open slots and booking policies. Locks are not taken into\\naccount.\"\n )\n .optional(),\n totalSpots: z\n .number()\n .int()\n .describe(\n 'Total number of spots for this slot.\\nFor example, if a session has a total of 10 spots and 3 spots are booked,\\n`spotsTotal` is 10 and `openSpots` is 7.'\n )\n .optional()\n .nullable(),\n openSpots: z\n .number()\n .int()\n .describe('Number of open spots for this slot.')\n .optional()\n .nullable(),\n waitingList: z\n .object({\n totalSpots: z\n .number()\n .int()\n .describe(\n 'Total number of spots and open spots for this waitlist.\\nFor example, a Yoga class with 10 waitlist spots and 3 registered\\non the waitlist has 10 `total_spots` and 7 `open_spots`.'\n )\n .optional()\n .nullable(),\n openSpots: z\n .number()\n .int()\n .describe('Number of open spots for this waitlist.')\n .optional()\n .nullable(),\n })\n .describe(\n \"An object describing the slot's waitlist and its occupancy.\"\n )\n .optional(),\n bookingPolicyViolations: z\n .object({\n tooEarlyToBook: z\n .boolean()\n .describe(\n 'Bookings policy violation. Too early to book this slot.'\n )\n .optional()\n .nullable(),\n tooLateToBook: z\n .boolean()\n .describe(\n 'Bookings policy violation. Too late to book this slot.'\n )\n .optional()\n .nullable(),\n bookOnlineDisabled: z\n .boolean()\n .describe(\n 'Bookings policy violation. Online booking is disabled for this slot.'\n )\n .optional()\n .nullable(),\n validSubmissionRequired: z\n .boolean()\n .describe(\n 'Bookings policy violation. Intake Form submission is required for this slot.'\n )\n .optional()\n .nullable(),\n })\n .describe('Booking policy violations for the slot.')\n .optional(),\n locked: z\n .boolean()\n .describe(\n 'Indicates whether the slot is locked because a waitlist exists.\\nWhen a slot frees up, the slot is offered to the next customer on the waitlist. Read-only.'\n )\n .optional()\n .nullable(),\n isFromV2: z\n .boolean()\n .describe('Deprecated. not in use since 2025-06-15.')\n .optional(),\n })\n )\n .optional(),\n});\nexport const GetScheduleAvailabilityRequest = /*#__PURE__*/ z.object({\n scheduleId: z\n .string()\n .describe('The schedule ID for which availability is being checked.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n});\nexport const GetScheduleAvailabilityResponse = /*#__PURE__*/ z.object({\n availability: z\n .object({\n totalSpots: z\n .number()\n .int()\n .describe(\n 'The total number of spots defined for the schedule, including\\nboth open and non-available spots.'\n )\n .optional()\n .nullable(),\n openSpots: z\n .number()\n .int()\n .describe('The number of open spots defined for the schedule.')\n .optional()\n .nullable(),\n bookingPolicyViolations: z\n .object({\n tooEarlyToBook: z\n .boolean()\n .describe('Bookings policy violation. Too early to book this slot.')\n .optional()\n .nullable(),\n tooLateToBook: z\n .boolean()\n .describe('Bookings policy violation. Too late to book this slot.')\n .optional()\n .nullable(),\n bookOnlineDisabled: z\n .boolean()\n .describe(\n 'Bookings policy violation. Online booking is disabled for this slot.'\n )\n .optional()\n .nullable(),\n validSubmissionRequired: z\n .boolean()\n .describe(\n 'Bookings policy violation. Intake Form submission is required for this slot.'\n )\n .optional()\n .nullable(),\n })\n .describe('Booking policy violations for the schedule.')\n .optional(),\n })\n .optional(),\n bookingPolicySettings: z\n .object({\n maxParticipantsPerBooking: z\n .number()\n .int()\n .describe(\n 'The policy defining the maximum number of participants that can\\nbe booked for a slot or a schedule.'\n )\n .optional()\n .nullable(),\n })\n .optional(),\n});\nexport const CalculateMultiSlotAvailabilityRequest = /*#__PURE__*/ z.object({\n options: z\n .object({\n from: z.string().max(30).optional(),\n to: z.string().max(30).optional(),\n timeZone: z.string().max(30).optional(),\n bookable: z\n .boolean()\n .describe(\n 'TODO good definition of what bookable means https://github.com/wix-private/scheduler/pull/18267/files?file-filters%5B%5D=.proto&show-viewed-files=true#r1199809006'\n )\n .optional()\n .nullable(),\n bookingPolicyViolations: z\n .object({\n tooEarlyToBook: z\n .boolean()\n .describe('Bookings policy violation. Too early to book this slot.')\n .optional()\n .nullable(),\n tooLateToBook: z\n .boolean()\n .describe('Bookings policy violation. Too late to book this slot.')\n .optional()\n .nullable(),\n bookOnlineDisabled: z\n .boolean()\n .describe(\n 'Bookings policy violation. Online booking is disabled for this slot.'\n )\n .optional()\n .nullable(),\n validSubmissionRequired: z\n .boolean()\n .describe(\n 'Bookings policy violation. Intake Form submission is required for this slot.'\n )\n .optional()\n .nullable(),\n })\n .describe(\n 'each nested field is checked on its own. i.e. if `too_early_to_book` is defined and `too_late_to_book` is not defined\\nwe will return slots for which `too_early_to_book` is same as on the request, regardless of `too_late_to_book`.'\n )\n .optional(),\n location: z\n .object({\n _id: z\n .string()\n .describe(\n 'Business location ID. Available only for locations that are business locations,\\nmeaning the `location_type` is `\"OWNER_BUSINESS\"`.'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n name: z.string().describe('Location name.').optional().nullable(),\n formattedAddress: z\n .string()\n .describe('The full address of this location.')\n .optional()\n .nullable(),\n formattedAddressTranslated: z\n .string()\n .describe('The full translated address of this location.')\n .max(512)\n .optional()\n .nullable(),\n locationType: z\n .enum(['UNDEFINED', 'OWNER_BUSINESS', 'OWNER_CUSTOM', 'CUSTOM'])\n .optional(),\n })\n .describe(\n 'support filtering by location type, or by locationId. Other fields like `name` are ignored\\nmust be set, and must have locationType. If locationType is `OWNER_BUSINESS`, must have location_id'\n )\n .optional(),\n slots: z\n .array(\n z.object({\n serviceId: z\n .string()\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n resourcesFilter: z\n .object({ resourceIds: z.array(z.string()).optional() })\n .optional(),\n customerChoices: z\n .object({\n durationInMinutes: z\n .number()\n .int()\n .describe(\n 'Selected duration in minutes, based on a [service variant](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/service-options-and-variants/introduction) the customer chose.\\nWhen using [add-ons](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/introduction), we recommend passing only `addOnIds` instead of `durationInMinutes`. Wix Bookings then calculates the total duration automatically. If you specify both `addOnIds` and `durationInMinutes`, `durationInMinutes` must equal the service duration plus all selected add-on durations.\\n\\nMin: `1` minute\\nMax: `44639` minutes (30 days, 23 hours, and 59 minutes)\\nDefault: `15` minutes'\n )\n .min(1)\n .max(44639)\n .optional()\n .nullable(),\n addOnIds: z.array(z.string()).max(21).optional(),\n })\n .describe(\n 'will be passed to availability-2, and to the availability-constraints SPI'\n )\n .optional(),\n })\n )\n .min(1)\n .max(6)\n .optional(),\n slotsPerDay: z\n .number()\n .int()\n .describe(\n \"Maximum number of slots to load for each date. For example, if `slots_per_day` is set to `3`,\\nat most 3 available slots are returned for each day in the date range specified in the query's\\n`filter`.\\n\\nWhen a day has both bookable and non-bookable slots, bookable slots are returned first.\\nNon-bookable slots are returned according to the specified filters, after all\\nbookable slots are already included.\"\n )\n .optional()\n .nullable(),\n cursorPaging: z\n .object({\n limit: z\n .number()\n .int()\n .describe('Maximum number of items to return in the results.')\n .min(0)\n .max(100)\n .optional()\n .nullable(),\n cursor: z\n .string()\n .describe(\n \"Pointer to the next or previous page in the list of results.\\n\\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\\nNot relevant for the first request.\"\n )\n .max(16000)\n .optional()\n .nullable(),\n })\n .optional(),\n })\n .optional(),\n});\nexport const CalculateMultiSlotAvailabilityResponse = /*#__PURE__*/ z.object({\n slots: z\n .array(\n z.object({\n slot: z\n .object({\n sessionId: z\n .string()\n .describe(\n \"ID for the slot's corresponding session, when the session is either a single session\\nor a specific session generated from a recurring session.\\n\\nDeprecated. Please use `eventId` instead.\"\n )\n .optional()\n .nullable(),\n serviceId: z.string().describe('Service ID.').optional(),\n scheduleId: z.string().describe('Schedule ID.').optional(),\n startDate: z\n .string()\n .describe(\n 'The start time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)\\nformat.\\n\\nIf `timezone` is specified,\\ndates are based on the local date/time. This means that the timezone offset\\nin the `start_date` is ignored.'\n )\n .optional()\n .nullable(),\n endDate: z\n .string()\n .describe(\n 'The end time of this slot in\\n[RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) format.\\n\\nIf `timezone` is specified,\\ndates are based on the local date/time. This means that the timezone offset\\nin the `end_date` is ignored.'\n )\n .optional()\n .nullable(),\n timezone: z\n .string()\n .describe(\n 'The timezone for which slot availability is to be calculated.\\n\\nLearn more about [handling Daylight Savings Time (DST) for local time zones](https://dev.wix.com/api/rest/wix-bookings/availability-calendar/query-availability#wix-bookings_availability-calendar_query-availability_handling-daylight-savings-time-dst-for-local-time-zones)\\nwhen calculating availability.'\n )\n .optional()\n .nullable(),\n resource: z\n .object({\n _id: z\n .string()\n .describe('Resource ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n name: z\n .string()\n .describe('Resource name. Read only.')\n .max(1200)\n .optional()\n .nullable(),\n })\n .describe(\n 'The resource required for this slot. Currently, the only supported resource\\nis the relevant staff member for the slot.'\n )\n .optional(),\n location: z\n .object({\n _id: z\n .string()\n .describe(\n 'Business location ID. Available only for locations that are business locations,\\nmeaning the `location_type` is `\"OWNER_BUSINESS\"`.'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n name: z\n .string()\n .describe('Location name.')\n .optional()\n .nullable(),\n formattedAddress: z\n .string()\n .describe('The full address of this location.')\n .optional()\n .nullable(),\n formattedAddressTranslated: z\n .string()\n .describe('The full translated address of this location.')\n .max(512)\n .optional()\n .nullable(),\n locationType: z\n .enum([\n 'UNDEFINED',\n 'OWNER_BUSINESS',\n 'OWNER_CUSTOM',\n 'CUSTOM',\n ])\n .describe('Location type.')\n .optional(),\n })\n .describe('Geographic location of the slot.')\n .optional(),\n eventId: z\n .string()\n .describe(\n \"ID for the slot's corresponding event, when the event is either a single event\\nor a specific event generated from a recurring event.\"\n )\n .min(36)\n .max(250)\n .optional()\n .nullable(),\n })\n .describe(\n 'The slot for the corresponding session, when the session is either a single session\\nor a specific session generated from a recurring session.'\n )\n .optional(),\n bookable: z\n .boolean()\n .describe(\n \"Whether the slot is bookable. Bookability is determined by checking a\\nsession's open slots and booking policies. Locks are not taken into\\naccount.\"\n )\n .optional(),\n totalSpots: z\n .number()\n .int()\n .describe(\n 'Total number of spots for this slot.\\nFor example, if a session has a total of 10 spots and 3 spots are booked,\\n`spotsTotal` is 10 and `openSpots` is 7.'\n )\n .optional()\n .nullable(),\n openSpots: z\n .number()\n .int()\n .describe('Number of open spots for this slot.')\n .optional()\n .nullable(),\n waitingList: z\n .object({\n totalSpots: z\n .number()\n .int()\n .describe(\n 'Total number of spots and open spots for this waitlist.\\nFor example, a Yoga class with 10 waitlist spots and 3 registered\\non the waitlist has 10 `total_spots` and 7 `open_spots`.'\n )\n .optional()\n .nullable(),\n openSpots: z\n .number()\n .int()\n .describe('Number of open spots for this waitlist.')\n .optional()\n .nullable(),\n })\n .describe(\n \"An object describing the slot's waitlist and its occupancy.\"\n )\n .optional(),\n bookingPolicyViolations: z\n .object({\n tooEarlyToBook: z\n .boolean()\n .describe(\n 'Bookings policy violation. Too early to book this slot.'\n )\n .optional()\n .nullable(),\n tooLateToBook: z\n .boolean()\n .describe(\n 'Bookings policy violation. Too late to book this slot.'\n )\n .optional()\n .nullable(),\n bookOnlineDisabled: z\n .boolean()\n .describe(\n 'Bookings policy violation. Online booking is disabled for this slot.'\n )\n .optional()\n .nullable(),\n validSubmissionRequired: z\n .boolean()\n .describe(\n 'Bookings policy violation. Intake Form submission is required for this slot.'\n )\n .optional()\n .nullable(),\n })\n .describe('Booking policy violations for the slot.')\n .optional(),\n locked: z\n .boolean()\n .describe(\n 'Indicates whether the slot is locked because a waitlist exists.\\nWhen a slot frees up, the slot is offered to the next customer on the waitlist. Read-only.'\n )\n .optional()\n .nullable(),\n isFromV2: z\n .boolean()\n .describe('Deprecated. not in use since 2025-06-15.')\n .optional(),\n })\n )\n .optional(),\n cursorPagingMetadata: z\n .object({\n count: z\n .number()\n .int()\n .describe('Number of items returned in current page.')\n .optional()\n .nullable(),\n cursors: z\n .object({\n next: z\n .string()\n .describe(\n 'Cursor string pointing to the next page in the list of results.'\n )\n .max(16000)\n .optional()\n .nullable(),\n prev: z\n .string()\n .describe(\n 'Cursor pointing to the previous page in the list of results.'\n )\n .max(16000)\n .optional()\n .nullable(),\n })\n .describe(\n 'Cursor strings that point to the next page, previous page, or both.'\n )\n .optional(),\n hasNext: z\n .boolean()\n .describe(\n 'Whether there are more pages to retrieve following the current page.\\n\\n+ `true`: Another page of results can be retrieved.\\n+ `false`: This is the last page.'\n )\n .optional()\n .nullable(),\n })\n .optional(),\n});\n"],"mappings":";AAAA,YAAY,OAAO;AAEZ,IAAM,2BAAyC,gBAAE,SAAO;AAAA,EAC7D,OACG,SAAO;AAAA,IACN,QACG,SAAS,SAAO,GAAK,MAAI,CAAC,EAC1B;AAAA,MACC;AAAA,IACF;AAAA,IACF,MACG;AAAA,MACG,SAAO;AAAA,QACP,WACG,SAAO,EACP,SAAS,+BAA+B,EACxC,IAAI,GAAG,EACP,SAAS;AAAA,QACZ,OAAS,OAAK,CAAC,OAAO,MAAM,CAAC,EAAE,SAAS;AAAA,QACxC,QACG,SAAO;AAAA,UACN,UACG,SAAO,EACP,SAAS,mBAAmB,EAC5B,SAAS,EACT,SAAS;AAAA,UACZ,WACG,SAAO,EACP,SAAS,oBAAoB,EAC7B,SAAS,EACT,SAAS;AAAA,QACd,CAAC,EACA;AAAA,UACC;AAAA,QACF,EACC,SAAS;AAAA,MACd,CAAC;AAAA,IACH,EACC,SAAS;AAAA,EACd,CAAC,EACA;AAAA,IACC;AAAA,EACF;AAAA,EACF,SACG,SAAO;AAAA,IACN,UACG,SAAO,EACP;AAAA,MACC;AAAA,IACF,EACC,SAAS,EACT,SAAS;AAAA,IACZ,aACG,SA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,QACZ,eACG,UAAQ,EACR;AAAA,UACC;AAAA,QACF,EACC,SAAS,EACT,SAAS;AAAA,QACZ,oBACG,UAAQ,EACR;AAAA,UACC;AAAA,QACF,EACC,SAAS,EACT,SAAS;AAAA,QACZ,yBACG,UAAQ,EACR;AAAA,UACC;AAAA,QACF,EACC,SAAS,EACT,SAAS;AAAA,MACd,CAAC,EACA,SAAS,yCAAyC,EAClD,SAAS;AAAA,MACZ,QACG,UAAQ,EACR;AAAA,QACC;AAAA,MACF,EACC,SAAS,EACT,SAAS;AAAA,MACZ,UACG,UAAQ,EACR,SAAS,0CAA0C,EACnD,SAAS;AAAA,IACd,CAAC;AAAA,EACH,EACC,SAAS;AAAA,EACZ,sBACG,SAAO;AAAA,IACN,OACG,SAAO,EACP,IAAI,EACJ,SAAS,2CAA2C,EACpD,SAAS,EACT,SAAS;AAAA,IACZ,SACG,SAAO;AAAA,MACN,MACG,SAAO,EACP;AAAA,QACC;AAAA,MACF,EACC,IAAI,IAAK,EACT,SAAS,EACT,SAAS;AAAA,MACZ,MACG,SAAO,EACP;AAAA,QACC;AAAA,MACF,EACC,IAAI,IAAK,EACT,SAAS,EACT,SAAS;AAAA,IACd,CAAC,EACA;AAAA,MACC;AAAA,IACF,EACC,SAAS;AAAA,IACZ,SACG,UAAQ,EACR;AAAA,MACC;AAAA,IACF,EACC,SAAS,EACT,SAAS;AAAA,EACd,CAAC,EACA,SAAS;AACd,CAAC;","names":[]}
@@ -1,449 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // index.ts
21
- var index_exports = {};
22
- __export(index_exports, {
23
- LocationLocationType: () => LocationLocationType,
24
- LocationType: () => LocationType,
25
- RequestedGender: () => RequestedGender,
26
- RequestedGenderValueRequestedGender: () => RequestedGenderValueRequestedGender,
27
- SortOrder: () => SortOrder,
28
- calculateMultiSlotAvailability: () => calculateMultiSlotAvailability4,
29
- getScheduleAvailability: () => getScheduleAvailability4,
30
- queryAvailability: () => queryAvailability4
31
- });
32
- module.exports = __toCommonJS(index_exports);
33
-
34
- // src/bookings-availability-v1-slot-availability-availability-calendar.universal.ts
35
- var import_transform_error = require("@wix/sdk-runtime/transform-error");
36
- var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
37
-
38
- // src/bookings-availability-v1-slot-availability-availability-calendar.http.ts
39
- var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
40
- var import_float = require("@wix/sdk-runtime/transformations/float");
41
- var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
42
- var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
43
- function resolveComWixpressBookingsAvailabilityAvailabilityCalendarUrl(opts) {
44
- const domainToMappings = {
45
- _: [
46
- {
47
- srcPath: "/_api/availability-calendar/v1/availability/query",
48
- destPath: "/v1/availability/query"
49
- },
50
- {
51
- srcPath: "/_api/availability-calendar/v2/availability/schedule",
52
- destPath: "/v2/availability/schedule"
53
- },
54
- {
55
- srcPath: "/_api/availability-calendar/v1/availability/multislot",
56
- destPath: "/v1/availability/multislot"
57
- }
58
- ],
59
- "*.dev.wix-code.com": [
60
- {
61
- srcPath: "/_api/availability-calendar/v1/availability/query",
62
- destPath: "/v1/availability/query"
63
- },
64
- {
65
- srcPath: "/_api/availability-calendar/v1/availability/multislot",
66
- destPath: "/v1/availability/multislot"
67
- }
68
- ],
69
- "editor._base_domain_": [
70
- {
71
- srcPath: "/_api/availability-calendar/v1/availability/query",
72
- destPath: "/v1/availability/query"
73
- },
74
- {
75
- srcPath: "/_api/availability-calendar/v1/availability/multislot",
76
- destPath: "/v1/availability/multislot"
77
- },
78
- {
79
- srcPath: "/v1/availability/multislot",
80
- destPath: "/v1/availability/multislot"
81
- }
82
- ],
83
- "blocks._base_domain_": [
84
- {
85
- srcPath: "/_api/availability-calendar/v1/availability/query",
86
- destPath: "/v1/availability/query"
87
- },
88
- {
89
- srcPath: "/_api/availability-calendar/v1/availability/multislot",
90
- destPath: "/v1/availability/multislot"
91
- },
92
- {
93
- srcPath: "/v1/availability/multislot",
94
- destPath: "/v1/availability/multislot"
95
- }
96
- ],
97
- "create.editorx": [
98
- {
99
- srcPath: "/_api/availability-calendar/v1/availability/query",
100
- destPath: "/v1/availability/query"
101
- },
102
- {
103
- srcPath: "/_api/availability-calendar/v1/availability/multislot",
104
- destPath: "/v1/availability/multislot"
105
- },
106
- {
107
- srcPath: "/v1/availability/multislot",
108
- destPath: "/v1/availability/multislot"
109
- }
110
- ],
111
- "editor.wixapps.net": [
112
- {
113
- srcPath: "/_api/availability-calendar/v1/availability/query",
114
- destPath: "/v1/availability/query"
115
- }
116
- ],
117
- "editor-flow.wixapps.net": [
118
- {
119
- srcPath: "/_api/availability-calendar/v1/availability/query",
120
- destPath: "/v1/availability/query"
121
- }
122
- ],
123
- "www.wixapis.com": [
124
- {
125
- srcPath: "/availability-calendar/v1/availability/query",
126
- destPath: "/v1/availability/query"
127
- },
128
- {
129
- srcPath: "/bookings/availability-calendar/v1/availability/query",
130
- destPath: "/v1/availability/query"
131
- },
132
- {
133
- srcPath: "/bookings/v1/availability/query",
134
- destPath: "/v1/availability/query"
135
- }
136
- ],
137
- "manage._base_domain_": [
138
- {
139
- srcPath: "/_api/availability-calendar/v1/availability/query",
140
- destPath: "/v1/availability/query"
141
- },
142
- {
143
- srcPath: "/_api/availability-calendar",
144
- destPath: ""
145
- },
146
- {
147
- srcPath: "/_api/availability-calendar/v2/availability/schedule",
148
- destPath: "/v2/availability/schedule"
149
- }
150
- ],
151
- "www._base_domain_": [
152
- {
153
- srcPath: "/_api/availability-calendar/v1/availability/query",
154
- destPath: "/v1/availability/query"
155
- },
156
- {
157
- srcPath: "/_api/availability-calendar/v1/availability/multislot",
158
- destPath: "/v1/availability/multislot"
159
- }
160
- ],
161
- "bookings.wixapps.net": [
162
- {
163
- srcPath: "/_api/availability-calendar/v1/availability/query",
164
- destPath: "/v1/availability/query"
165
- }
166
- ],
167
- "bo._base_domain_": [
168
- {
169
- srcPath: "/_api/availability-calendar/v1/availability/query",
170
- destPath: "/v1/availability/query"
171
- }
172
- ],
173
- "wixbo.ai": [
174
- {
175
- srcPath: "/_api/availability-calendar/v1/availability/query",
176
- destPath: "/v1/availability/query"
177
- }
178
- ],
179
- "wix-bo.com": [
180
- {
181
- srcPath: "/_api/availability-calendar/v1/availability/query",
182
- destPath: "/v1/availability/query"
183
- }
184
- ],
185
- "*.wixforms.com": [
186
- {
187
- srcPath: "/_api/availability-calendar",
188
- destPath: ""
189
- }
190
- ],
191
- "api._api_base_domain_": [
192
- {
193
- srcPath: "/availability-calendar",
194
- destPath: ""
195
- }
196
- ]
197
- };
198
- return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
199
- }
200
- var PACKAGE_NAME = "@wix/auto_sdk_bookings_availability-calendar";
201
- function queryAvailability(payload) {
202
- function __queryAvailability({ host }) {
203
- const serializedData = (0, import_transform_paths.transformPaths)(payload, [
204
- {
205
- transformFn: import_float.transformSDKFloatToRESTFloat,
206
- paths: [
207
- { path: "query.sort.origin.latitude" },
208
- { path: "query.sort.origin.longitude" }
209
- ]
210
- }
211
- ]);
212
- const metadata = {
213
- entityFqdn: "wix.bookings.availability.v1.slot_availability",
214
- method: "POST",
215
- methodFqn: "com.wixpress.bookings.availability.AvailabilityCalendar.QueryAvailability",
216
- packageName: PACKAGE_NAME,
217
- migrationOptions: {
218
- optInTransformResponse: true
219
- },
220
- url: resolveComWixpressBookingsAvailabilityAvailabilityCalendarUrl({
221
- protoPath: "/v1/availability/query",
222
- data: serializedData,
223
- host
224
- }),
225
- data: serializedData
226
- };
227
- return metadata;
228
- }
229
- return __queryAvailability;
230
- }
231
- function getScheduleAvailability(payload) {
232
- function __getScheduleAvailability({ host }) {
233
- const metadata = {
234
- entityFqdn: "wix.bookings.availability.v1.slot_availability",
235
- method: "GET",
236
- methodFqn: "com.wixpress.bookings.availability.AvailabilityCalendar.GetScheduleAvailability",
237
- packageName: PACKAGE_NAME,
238
- migrationOptions: {
239
- optInTransformResponse: true
240
- },
241
- url: resolveComWixpressBookingsAvailabilityAvailabilityCalendarUrl({
242
- protoPath: "/v2/availability/schedule/{scheduleId}",
243
- data: payload,
244
- host
245
- }),
246
- params: (0, import_rest_modules.toURLSearchParams)(payload)
247
- };
248
- return metadata;
249
- }
250
- return __getScheduleAvailability;
251
- }
252
- function calculateMultiSlotAvailability(payload) {
253
- function __calculateMultiSlotAvailability({ host }) {
254
- const metadata = {
255
- entityFqdn: "wix.bookings.availability.v1.slot_availability",
256
- method: "POST",
257
- methodFqn: "com.wixpress.bookings.availability.AvailabilityCalendar.CalculateMultiSlotAvailability",
258
- packageName: PACKAGE_NAME,
259
- migrationOptions: {
260
- optInTransformResponse: true
261
- },
262
- url: resolveComWixpressBookingsAvailabilityAvailabilityCalendarUrl({
263
- protoPath: "/v1/availability/multislot",
264
- data: payload,
265
- host
266
- }),
267
- data: payload
268
- };
269
- return metadata;
270
- }
271
- return __calculateMultiSlotAvailability;
272
- }
273
-
274
- // src/bookings-availability-v1-slot-availability-availability-calendar.universal.ts
275
- var LocationType = /* @__PURE__ */ ((LocationType2) => {
276
- LocationType2["UNDEFINED"] = "UNDEFINED";
277
- LocationType2["OWNER_BUSINESS"] = "OWNER_BUSINESS";
278
- LocationType2["OWNER_CUSTOM"] = "OWNER_CUSTOM";
279
- LocationType2["CUSTOM"] = "CUSTOM";
280
- return LocationType2;
281
- })(LocationType || {});
282
- var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
283
- SortOrder2["ASC"] = "ASC";
284
- SortOrder2["DESC"] = "DESC";
285
- return SortOrder2;
286
- })(SortOrder || {});
287
- var RequestedGender = /* @__PURE__ */ ((RequestedGender2) => {
288
- RequestedGender2["ANY_MALE"] = "ANY_MALE";
289
- RequestedGender2["ANY_FEMALE"] = "ANY_FEMALE";
290
- return RequestedGender2;
291
- })(RequestedGender || {});
292
- var RequestedGenderValueRequestedGender = /* @__PURE__ */ ((RequestedGenderValueRequestedGender2) => {
293
- RequestedGenderValueRequestedGender2["ANY_MALE"] = "ANY_MALE";
294
- RequestedGenderValueRequestedGender2["ANY_FEMALE"] = "ANY_FEMALE";
295
- return RequestedGenderValueRequestedGender2;
296
- })(RequestedGenderValueRequestedGender || {});
297
- var LocationLocationType = /* @__PURE__ */ ((LocationLocationType2) => {
298
- LocationLocationType2["BUSINESS"] = "BUSINESS";
299
- LocationLocationType2["CUSTOM"] = "CUSTOM";
300
- LocationLocationType2["CUSTOMER"] = "CUSTOMER";
301
- return LocationLocationType2;
302
- })(LocationLocationType || {});
303
- async function queryAvailability2(query, options) {
304
- const { httpClient, sideEffects } = arguments[2];
305
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
306
- query,
307
- timezone: options?.timezone,
308
- slotsPerDay: options?.slotsPerDay
309
- });
310
- const reqOpts = queryAvailability(
311
- payload
312
- );
313
- sideEffects?.onSiteCall?.();
314
- try {
315
- const result = await httpClient.request(reqOpts);
316
- sideEffects?.onSuccess?.(result);
317
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
318
- } catch (err) {
319
- const transformedError = (0, import_transform_error.transformError)(
320
- err,
321
- {
322
- spreadPathsToArguments: {},
323
- explicitPathsToArguments: {
324
- query: "$[0]",
325
- timezone: "$[1].timezone",
326
- slotsPerDay: "$[1].slotsPerDay"
327
- },
328
- singleArgumentUnchanged: false
329
- },
330
- ["query", "options"]
331
- );
332
- sideEffects?.onError?.(err);
333
- throw transformedError;
334
- }
335
- }
336
- async function getScheduleAvailability2(scheduleId) {
337
- const { httpClient, sideEffects } = arguments[1];
338
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
339
- scheduleId
340
- });
341
- const reqOpts = getScheduleAvailability(
342
- payload
343
- );
344
- sideEffects?.onSiteCall?.();
345
- try {
346
- const result = await httpClient.request(reqOpts);
347
- sideEffects?.onSuccess?.(result);
348
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
349
- } catch (err) {
350
- const transformedError = (0, import_transform_error.transformError)(
351
- err,
352
- {
353
- spreadPathsToArguments: {},
354
- explicitPathsToArguments: { scheduleId: "$[0]" },
355
- singleArgumentUnchanged: false
356
- },
357
- ["scheduleId"]
358
- );
359
- sideEffects?.onError?.(err);
360
- throw transformedError;
361
- }
362
- }
363
- async function calculateMultiSlotAvailability2(options) {
364
- const { httpClient, sideEffects } = arguments[1];
365
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
366
- from: options?.from,
367
- to: options?.to,
368
- timeZone: options?.timeZone,
369
- bookable: options?.bookable,
370
- bookingPolicyViolations: options?.bookingPolicyViolations,
371
- location: options?.location,
372
- slots: options?.slots,
373
- slotsPerDay: options?.slotsPerDay,
374
- cursorPaging: options?.cursorPaging
375
- });
376
- const reqOpts = calculateMultiSlotAvailability(
377
- payload
378
- );
379
- sideEffects?.onSiteCall?.();
380
- try {
381
- const result = await httpClient.request(reqOpts);
382
- sideEffects?.onSuccess?.(result);
383
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
384
- } catch (err) {
385
- const transformedError = (0, import_transform_error.transformError)(
386
- err,
387
- {
388
- spreadPathsToArguments: {},
389
- explicitPathsToArguments: {
390
- from: "$[0].from",
391
- to: "$[0].to",
392
- timeZone: "$[0].timeZone",
393
- bookable: "$[0].bookable",
394
- bookingPolicyViolations: "$[0].bookingPolicyViolations",
395
- location: "$[0].location",
396
- slots: "$[0].slots",
397
- slotsPerDay: "$[0].slotsPerDay",
398
- cursorPaging: "$[0].cursorPaging"
399
- },
400
- singleArgumentUnchanged: false
401
- },
402
- ["options"]
403
- );
404
- sideEffects?.onError?.(err);
405
- throw transformedError;
406
- }
407
- }
408
-
409
- // src/bookings-availability-v1-slot-availability-availability-calendar.public.ts
410
- function queryAvailability3(httpClient) {
411
- return (query, options) => queryAvailability2(
412
- query,
413
- options,
414
- // @ts-ignore
415
- { httpClient }
416
- );
417
- }
418
- function getScheduleAvailability3(httpClient) {
419
- return (scheduleId) => getScheduleAvailability2(
420
- scheduleId,
421
- // @ts-ignore
422
- { httpClient }
423
- );
424
- }
425
- function calculateMultiSlotAvailability3(httpClient) {
426
- return (options) => calculateMultiSlotAvailability2(
427
- options,
428
- // @ts-ignore
429
- { httpClient }
430
- );
431
- }
432
-
433
- // src/bookings-availability-v1-slot-availability-availability-calendar.context.ts
434
- var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
435
- var queryAvailability4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(queryAvailability3);
436
- var getScheduleAvailability4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getScheduleAvailability3);
437
- var calculateMultiSlotAvailability4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(calculateMultiSlotAvailability3);
438
- // Annotate the CommonJS export names for ESM import in node:
439
- 0 && (module.exports = {
440
- LocationLocationType,
441
- LocationType,
442
- RequestedGender,
443
- RequestedGenderValueRequestedGender,
444
- SortOrder,
445
- calculateMultiSlotAvailability,
446
- getScheduleAvailability,
447
- queryAvailability
448
- });
449
- //# sourceMappingURL=index.js.map