@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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/auto_sdk_bookings_availability-calendar",
3
- "version": "1.0.196",
3
+ "version": "1.0.198",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",
@@ -21,23 +21,16 @@
21
21
  "import": "./build/es/meta.mjs",
22
22
  "require": "./build/cjs/meta.js",
23
23
  "types": "./build/es/meta.d.mts"
24
- },
25
- "./schemas": {
26
- "import": "./build/es/schemas.mjs",
27
- "require": "./build/cjs/schemas.js",
28
- "types": "./build/es/schemas.d.mts"
29
24
  }
30
25
  },
31
26
  "files": [
32
27
  "build",
33
28
  "meta",
34
- "service-plugins",
35
- "schemas"
29
+ "service-plugins"
36
30
  ],
37
31
  "dependencies": {
38
32
  "@wix/sdk-runtime": "^1.0.24",
39
- "@wix/sdk-types": "^1.17.11",
40
- "zod": "^4.3.6"
33
+ "@wix/sdk-types": "^1.17.11"
41
34
  },
42
35
  "devDependencies": {
43
36
  "tsup": "^8.4.0",
@@ -57,5 +50,5 @@
57
50
  "fqdn": "wix.bookings.availability.v1.slot_availability"
58
51
  }
59
52
  },
60
- "falconPackageHash": "b9c15a00f5b72a715e2e2bea8d2140847f142f7ce15ae523e71b3f9b"
53
+ "falconPackageHash": "4c4e1dab82ea2385ad0d2157efc4f2d41517671533a34b49b097847d"
61
54
  }
@@ -1,179 +0,0 @@
1
- import * as z from 'zod';
2
-
3
- declare const QueryAvailabilityRequest: z.ZodObject<{
4
- query: z.ZodObject<{
5
- filter: z.ZodRecord<z.ZodString, z.ZodAny>;
6
- sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
7
- fieldName: z.ZodOptional<z.ZodString>;
8
- order: z.ZodOptional<z.ZodEnum<{
9
- ASC: "ASC";
10
- DESC: "DESC";
11
- }>>;
12
- origin: z.ZodOptional<z.ZodObject<{
13
- latitude: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
14
- longitude: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
15
- }, z.core.$strip>>;
16
- }, z.core.$strip>>>;
17
- }, z.core.$strip>;
18
- options: z.ZodOptional<z.ZodObject<{
19
- timezone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
20
- slotsPerDay: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
21
- }, z.core.$strip>>;
22
- }, z.core.$strip>;
23
- declare const QueryAvailabilityResponse: z.ZodObject<{
24
- availabilityEntries: z.ZodOptional<z.ZodArray<z.ZodObject<{
25
- slot: z.ZodOptional<z.ZodObject<{
26
- sessionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
27
- serviceId: z.ZodOptional<z.ZodString>;
28
- scheduleId: z.ZodOptional<z.ZodString>;
29
- startDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
30
- endDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
31
- timezone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
32
- resource: z.ZodOptional<z.ZodObject<{
33
- _id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
34
- name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
35
- }, z.core.$strip>>;
36
- location: z.ZodOptional<z.ZodObject<{
37
- _id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
38
- name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
39
- formattedAddress: z.ZodNullable<z.ZodOptional<z.ZodString>>;
40
- formattedAddressTranslated: z.ZodNullable<z.ZodOptional<z.ZodString>>;
41
- locationType: z.ZodOptional<z.ZodEnum<{
42
- UNDEFINED: "UNDEFINED";
43
- OWNER_BUSINESS: "OWNER_BUSINESS";
44
- OWNER_CUSTOM: "OWNER_CUSTOM";
45
- CUSTOM: "CUSTOM";
46
- }>>;
47
- }, z.core.$strip>>;
48
- eventId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
49
- }, z.core.$strip>>;
50
- bookable: z.ZodOptional<z.ZodBoolean>;
51
- totalSpots: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
52
- openSpots: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
53
- waitingList: z.ZodOptional<z.ZodObject<{
54
- totalSpots: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
55
- openSpots: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
56
- }, z.core.$strip>>;
57
- bookingPolicyViolations: z.ZodOptional<z.ZodObject<{
58
- tooEarlyToBook: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
59
- tooLateToBook: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
60
- bookOnlineDisabled: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
61
- validSubmissionRequired: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
62
- }, z.core.$strip>>;
63
- locked: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
64
- isFromV2: z.ZodOptional<z.ZodBoolean>;
65
- }, z.core.$strip>>>;
66
- }, z.core.$strip>;
67
- declare const GetScheduleAvailabilityRequest: z.ZodObject<{
68
- scheduleId: z.ZodString;
69
- }, z.core.$strip>;
70
- declare const GetScheduleAvailabilityResponse: z.ZodObject<{
71
- availability: z.ZodOptional<z.ZodObject<{
72
- totalSpots: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
73
- openSpots: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
74
- bookingPolicyViolations: z.ZodOptional<z.ZodObject<{
75
- tooEarlyToBook: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
76
- tooLateToBook: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
77
- bookOnlineDisabled: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
78
- validSubmissionRequired: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
79
- }, z.core.$strip>>;
80
- }, z.core.$strip>>;
81
- bookingPolicySettings: z.ZodOptional<z.ZodObject<{
82
- maxParticipantsPerBooking: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
83
- }, z.core.$strip>>;
84
- }, z.core.$strip>;
85
- declare const CalculateMultiSlotAvailabilityRequest: z.ZodObject<{
86
- options: z.ZodOptional<z.ZodObject<{
87
- from: z.ZodOptional<z.ZodString>;
88
- to: z.ZodOptional<z.ZodString>;
89
- timeZone: z.ZodOptional<z.ZodString>;
90
- bookable: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
91
- bookingPolicyViolations: z.ZodOptional<z.ZodObject<{
92
- tooEarlyToBook: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
93
- tooLateToBook: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
94
- bookOnlineDisabled: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
95
- validSubmissionRequired: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
96
- }, z.core.$strip>>;
97
- location: z.ZodOptional<z.ZodObject<{
98
- _id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
99
- name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
100
- formattedAddress: z.ZodNullable<z.ZodOptional<z.ZodString>>;
101
- formattedAddressTranslated: z.ZodNullable<z.ZodOptional<z.ZodString>>;
102
- locationType: z.ZodOptional<z.ZodEnum<{
103
- UNDEFINED: "UNDEFINED";
104
- OWNER_BUSINESS: "OWNER_BUSINESS";
105
- OWNER_CUSTOM: "OWNER_CUSTOM";
106
- CUSTOM: "CUSTOM";
107
- }>>;
108
- }, z.core.$strip>>;
109
- slots: z.ZodOptional<z.ZodArray<z.ZodObject<{
110
- serviceId: z.ZodOptional<z.ZodString>;
111
- resourcesFilter: z.ZodOptional<z.ZodObject<{
112
- resourceIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
113
- }, z.core.$strip>>;
114
- customerChoices: z.ZodOptional<z.ZodObject<{
115
- durationInMinutes: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
116
- addOnIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
117
- }, z.core.$strip>>;
118
- }, z.core.$strip>>>;
119
- slotsPerDay: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
120
- cursorPaging: z.ZodOptional<z.ZodObject<{
121
- limit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
122
- cursor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
123
- }, z.core.$strip>>;
124
- }, z.core.$strip>>;
125
- }, z.core.$strip>;
126
- declare const CalculateMultiSlotAvailabilityResponse: z.ZodObject<{
127
- slots: z.ZodOptional<z.ZodArray<z.ZodObject<{
128
- slot: z.ZodOptional<z.ZodObject<{
129
- sessionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
130
- serviceId: z.ZodOptional<z.ZodString>;
131
- scheduleId: z.ZodOptional<z.ZodString>;
132
- startDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
133
- endDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
134
- timezone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
135
- resource: z.ZodOptional<z.ZodObject<{
136
- _id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
137
- name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
138
- }, z.core.$strip>>;
139
- location: z.ZodOptional<z.ZodObject<{
140
- _id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
141
- name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
142
- formattedAddress: z.ZodNullable<z.ZodOptional<z.ZodString>>;
143
- formattedAddressTranslated: z.ZodNullable<z.ZodOptional<z.ZodString>>;
144
- locationType: z.ZodOptional<z.ZodEnum<{
145
- UNDEFINED: "UNDEFINED";
146
- OWNER_BUSINESS: "OWNER_BUSINESS";
147
- OWNER_CUSTOM: "OWNER_CUSTOM";
148
- CUSTOM: "CUSTOM";
149
- }>>;
150
- }, z.core.$strip>>;
151
- eventId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
152
- }, z.core.$strip>>;
153
- bookable: z.ZodOptional<z.ZodBoolean>;
154
- totalSpots: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
155
- openSpots: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
156
- waitingList: z.ZodOptional<z.ZodObject<{
157
- totalSpots: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
158
- openSpots: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
159
- }, z.core.$strip>>;
160
- bookingPolicyViolations: z.ZodOptional<z.ZodObject<{
161
- tooEarlyToBook: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
162
- tooLateToBook: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
163
- bookOnlineDisabled: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
164
- validSubmissionRequired: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
165
- }, z.core.$strip>>;
166
- locked: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
167
- isFromV2: z.ZodOptional<z.ZodBoolean>;
168
- }, z.core.$strip>>>;
169
- cursorPagingMetadata: z.ZodOptional<z.ZodObject<{
170
- count: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
171
- cursors: z.ZodOptional<z.ZodObject<{
172
- next: z.ZodNullable<z.ZodOptional<z.ZodString>>;
173
- prev: z.ZodNullable<z.ZodOptional<z.ZodString>>;
174
- }, z.core.$strip>>;
175
- hasNext: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
176
- }, z.core.$strip>>;
177
- }, z.core.$strip>;
178
-
179
- export { CalculateMultiSlotAvailabilityRequest, CalculateMultiSlotAvailabilityResponse, GetScheduleAvailabilityRequest, GetScheduleAvailabilityResponse, QueryAvailabilityRequest, QueryAvailabilityResponse };
@@ -1,361 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
-
30
- // schemas.ts
31
- var schemas_exports = {};
32
- __export(schemas_exports, {
33
- CalculateMultiSlotAvailabilityRequest: () => CalculateMultiSlotAvailabilityRequest,
34
- CalculateMultiSlotAvailabilityResponse: () => CalculateMultiSlotAvailabilityResponse,
35
- GetScheduleAvailabilityRequest: () => GetScheduleAvailabilityRequest,
36
- GetScheduleAvailabilityResponse: () => GetScheduleAvailabilityResponse,
37
- QueryAvailabilityRequest: () => QueryAvailabilityRequest,
38
- QueryAvailabilityResponse: () => QueryAvailabilityResponse
39
- });
40
- module.exports = __toCommonJS(schemas_exports);
41
-
42
- // src/bookings-availability-v1-slot-availability-availability-calendar.schemas.ts
43
- var z = __toESM(require("zod"));
44
- var QueryAvailabilityRequest = /* @__PURE__ */ z.object({
45
- query: z.object({
46
- filter: z.record(z.string(), z.any()).describe(
47
- "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."
48
- ),
49
- sort: z.array(
50
- z.object({
51
- fieldName: z.string().describe("Name of the field to sort by.").max(512).optional(),
52
- order: z.enum(["ASC", "DESC"]).optional(),
53
- origin: z.object({
54
- latitude: z.number().describe("Address latitude.").optional().nullable(),
55
- longitude: z.number().describe("Address longitude.").optional().nullable()
56
- }).describe(
57
- "Origin point for geo-distance sorting on a GEO field\nresults are ordered by distance from this point (ASC = nearest first, DESC = farthest first)."
58
- ).optional()
59
- })
60
- ).optional()
61
- }).describe(
62
- "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."
63
- ),
64
- options: z.object({
65
- timezone: z.string().describe(
66
- '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.'
67
- ).optional().nullable(),
68
- slotsPerDay: z.number().int().describe(
69
- "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."
70
- ).optional().nullable()
71
- }).describe("Options to use for querying availability.").optional()
72
- });
73
- var QueryAvailabilityResponse = /* @__PURE__ */ z.object({
74
- availabilityEntries: z.array(
75
- z.object({
76
- slot: z.object({
77
- sessionId: z.string().describe(
78
- "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."
79
- ).optional().nullable(),
80
- serviceId: z.string().describe("Service ID.").optional(),
81
- scheduleId: z.string().describe("Schedule ID.").optional(),
82
- startDate: z.string().describe(
83
- "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."
84
- ).optional().nullable(),
85
- endDate: z.string().describe(
86
- "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."
87
- ).optional().nullable(),
88
- timezone: z.string().describe(
89
- "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."
90
- ).optional().nullable(),
91
- resource: z.object({
92
- _id: z.string().describe("Resource ID.").regex(
93
- /^[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}$/,
94
- "Must be a valid GUID"
95
- ).optional().nullable(),
96
- name: z.string().describe("Resource name. Read only.").max(1200).optional().nullable()
97
- }).describe(
98
- "The resource required for this slot. Currently, the only supported resource\nis the relevant staff member for the slot."
99
- ).optional(),
100
- location: z.object({
101
- _id: z.string().describe(
102
- 'Business location ID. Available only for locations that are business locations,\nmeaning the `location_type` is `"OWNER_BUSINESS"`.'
103
- ).regex(
104
- /^[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}$/,
105
- "Must be a valid GUID"
106
- ).optional().nullable(),
107
- name: z.string().describe("Location name.").optional().nullable(),
108
- formattedAddress: z.string().describe("The full address of this location.").optional().nullable(),
109
- formattedAddressTranslated: z.string().describe("The full translated address of this location.").max(512).optional().nullable(),
110
- locationType: z.enum([
111
- "UNDEFINED",
112
- "OWNER_BUSINESS",
113
- "OWNER_CUSTOM",
114
- "CUSTOM"
115
- ]).describe("Location type.").optional()
116
- }).describe("Geographic location of the slot.").optional(),
117
- eventId: z.string().describe(
118
- "ID for the slot's corresponding event, when the event is either a single event\nor a specific event generated from a recurring event."
119
- ).min(36).max(250).optional().nullable()
120
- }).describe(
121
- "The slot for the corresponding session, when the session is either a single session\nor a specific session generated from a recurring session."
122
- ).optional(),
123
- bookable: z.boolean().describe(
124
- "Whether the slot is bookable. Bookability is determined by checking a\nsession's open slots and booking policies. Locks are not taken into\naccount."
125
- ).optional(),
126
- totalSpots: z.number().int().describe(
127
- "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."
128
- ).optional().nullable(),
129
- openSpots: z.number().int().describe("Number of open spots for this slot.").optional().nullable(),
130
- waitingList: z.object({
131
- totalSpots: z.number().int().describe(
132
- "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`."
133
- ).optional().nullable(),
134
- openSpots: z.number().int().describe("Number of open spots for this waitlist.").optional().nullable()
135
- }).describe(
136
- "An object describing the slot's waitlist and its occupancy."
137
- ).optional(),
138
- bookingPolicyViolations: z.object({
139
- tooEarlyToBook: z.boolean().describe(
140
- "Bookings policy violation. Too early to book this slot."
141
- ).optional().nullable(),
142
- tooLateToBook: z.boolean().describe(
143
- "Bookings policy violation. Too late to book this slot."
144
- ).optional().nullable(),
145
- bookOnlineDisabled: z.boolean().describe(
146
- "Bookings policy violation. Online booking is disabled for this slot."
147
- ).optional().nullable(),
148
- validSubmissionRequired: z.boolean().describe(
149
- "Bookings policy violation. Intake Form submission is required for this slot."
150
- ).optional().nullable()
151
- }).describe("Booking policy violations for the slot.").optional(),
152
- locked: z.boolean().describe(
153
- "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."
154
- ).optional().nullable(),
155
- isFromV2: z.boolean().describe("Deprecated. not in use since 2025-06-15.").optional()
156
- })
157
- ).optional()
158
- });
159
- var GetScheduleAvailabilityRequest = /* @__PURE__ */ z.object({
160
- scheduleId: z.string().describe("The schedule ID for which availability is being checked.").regex(
161
- /^[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}$/,
162
- "Must be a valid GUID"
163
- )
164
- });
165
- var GetScheduleAvailabilityResponse = /* @__PURE__ */ z.object({
166
- availability: z.object({
167
- totalSpots: z.number().int().describe(
168
- "The total number of spots defined for the schedule, including\nboth open and non-available spots."
169
- ).optional().nullable(),
170
- openSpots: z.number().int().describe("The number of open spots defined for the schedule.").optional().nullable(),
171
- bookingPolicyViolations: z.object({
172
- tooEarlyToBook: z.boolean().describe("Bookings policy violation. Too early to book this slot.").optional().nullable(),
173
- tooLateToBook: z.boolean().describe("Bookings policy violation. Too late to book this slot.").optional().nullable(),
174
- bookOnlineDisabled: z.boolean().describe(
175
- "Bookings policy violation. Online booking is disabled for this slot."
176
- ).optional().nullable(),
177
- validSubmissionRequired: z.boolean().describe(
178
- "Bookings policy violation. Intake Form submission is required for this slot."
179
- ).optional().nullable()
180
- }).describe("Booking policy violations for the schedule.").optional()
181
- }).optional(),
182
- bookingPolicySettings: z.object({
183
- maxParticipantsPerBooking: z.number().int().describe(
184
- "The policy defining the maximum number of participants that can\nbe booked for a slot or a schedule."
185
- ).optional().nullable()
186
- }).optional()
187
- });
188
- var CalculateMultiSlotAvailabilityRequest = /* @__PURE__ */ z.object({
189
- options: z.object({
190
- from: z.string().max(30).optional(),
191
- to: z.string().max(30).optional(),
192
- timeZone: z.string().max(30).optional(),
193
- bookable: z.boolean().describe(
194
- "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"
195
- ).optional().nullable(),
196
- bookingPolicyViolations: z.object({
197
- tooEarlyToBook: z.boolean().describe("Bookings policy violation. Too early to book this slot.").optional().nullable(),
198
- tooLateToBook: z.boolean().describe("Bookings policy violation. Too late to book this slot.").optional().nullable(),
199
- bookOnlineDisabled: z.boolean().describe(
200
- "Bookings policy violation. Online booking is disabled for this slot."
201
- ).optional().nullable(),
202
- validSubmissionRequired: z.boolean().describe(
203
- "Bookings policy violation. Intake Form submission is required for this slot."
204
- ).optional().nullable()
205
- }).describe(
206
- "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`."
207
- ).optional(),
208
- location: z.object({
209
- _id: z.string().describe(
210
- 'Business location ID. Available only for locations that are business locations,\nmeaning the `location_type` is `"OWNER_BUSINESS"`.'
211
- ).regex(
212
- /^[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}$/,
213
- "Must be a valid GUID"
214
- ).optional().nullable(),
215
- name: z.string().describe("Location name.").optional().nullable(),
216
- formattedAddress: z.string().describe("The full address of this location.").optional().nullable(),
217
- formattedAddressTranslated: z.string().describe("The full translated address of this location.").max(512).optional().nullable(),
218
- locationType: z.enum(["UNDEFINED", "OWNER_BUSINESS", "OWNER_CUSTOM", "CUSTOM"]).optional()
219
- }).describe(
220
- "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"
221
- ).optional(),
222
- slots: z.array(
223
- z.object({
224
- serviceId: z.string().regex(
225
- /^[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}$/,
226
- "Must be a valid GUID"
227
- ).optional(),
228
- resourcesFilter: z.object({ resourceIds: z.array(z.string()).optional() }).optional(),
229
- customerChoices: z.object({
230
- durationInMinutes: z.number().int().describe(
231
- "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"
232
- ).min(1).max(44639).optional().nullable(),
233
- addOnIds: z.array(z.string()).max(21).optional()
234
- }).describe(
235
- "will be passed to availability-2, and to the availability-constraints SPI"
236
- ).optional()
237
- })
238
- ).min(1).max(6).optional(),
239
- slotsPerDay: z.number().int().describe(
240
- "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."
241
- ).optional().nullable(),
242
- cursorPaging: z.object({
243
- limit: z.number().int().describe("Maximum number of items to return in the results.").min(0).max(100).optional().nullable(),
244
- cursor: z.string().describe(
245
- "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."
246
- ).max(16e3).optional().nullable()
247
- }).optional()
248
- }).optional()
249
- });
250
- var CalculateMultiSlotAvailabilityResponse = /* @__PURE__ */ z.object({
251
- slots: z.array(
252
- z.object({
253
- slot: z.object({
254
- sessionId: z.string().describe(
255
- "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."
256
- ).optional().nullable(),
257
- serviceId: z.string().describe("Service ID.").optional(),
258
- scheduleId: z.string().describe("Schedule ID.").optional(),
259
- startDate: z.string().describe(
260
- "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."
261
- ).optional().nullable(),
262
- endDate: z.string().describe(
263
- "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."
264
- ).optional().nullable(),
265
- timezone: z.string().describe(
266
- "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."
267
- ).optional().nullable(),
268
- resource: z.object({
269
- _id: z.string().describe("Resource ID.").regex(
270
- /^[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}$/,
271
- "Must be a valid GUID"
272
- ).optional().nullable(),
273
- name: z.string().describe("Resource name. Read only.").max(1200).optional().nullable()
274
- }).describe(
275
- "The resource required for this slot. Currently, the only supported resource\nis the relevant staff member for the slot."
276
- ).optional(),
277
- location: z.object({
278
- _id: z.string().describe(
279
- 'Business location ID. Available only for locations that are business locations,\nmeaning the `location_type` is `"OWNER_BUSINESS"`.'
280
- ).regex(
281
- /^[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}$/,
282
- "Must be a valid GUID"
283
- ).optional().nullable(),
284
- name: z.string().describe("Location name.").optional().nullable(),
285
- formattedAddress: z.string().describe("The full address of this location.").optional().nullable(),
286
- formattedAddressTranslated: z.string().describe("The full translated address of this location.").max(512).optional().nullable(),
287
- locationType: z.enum([
288
- "UNDEFINED",
289
- "OWNER_BUSINESS",
290
- "OWNER_CUSTOM",
291
- "CUSTOM"
292
- ]).describe("Location type.").optional()
293
- }).describe("Geographic location of the slot.").optional(),
294
- eventId: z.string().describe(
295
- "ID for the slot's corresponding event, when the event is either a single event\nor a specific event generated from a recurring event."
296
- ).min(36).max(250).optional().nullable()
297
- }).describe(
298
- "The slot for the corresponding session, when the session is either a single session\nor a specific session generated from a recurring session."
299
- ).optional(),
300
- bookable: z.boolean().describe(
301
- "Whether the slot is bookable. Bookability is determined by checking a\nsession's open slots and booking policies. Locks are not taken into\naccount."
302
- ).optional(),
303
- totalSpots: z.number().int().describe(
304
- "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."
305
- ).optional().nullable(),
306
- openSpots: z.number().int().describe("Number of open spots for this slot.").optional().nullable(),
307
- waitingList: z.object({
308
- totalSpots: z.number().int().describe(
309
- "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`."
310
- ).optional().nullable(),
311
- openSpots: z.number().int().describe("Number of open spots for this waitlist.").optional().nullable()
312
- }).describe(
313
- "An object describing the slot's waitlist and its occupancy."
314
- ).optional(),
315
- bookingPolicyViolations: z.object({
316
- tooEarlyToBook: z.boolean().describe(
317
- "Bookings policy violation. Too early to book this slot."
318
- ).optional().nullable(),
319
- tooLateToBook: z.boolean().describe(
320
- "Bookings policy violation. Too late to book this slot."
321
- ).optional().nullable(),
322
- bookOnlineDisabled: z.boolean().describe(
323
- "Bookings policy violation. Online booking is disabled for this slot."
324
- ).optional().nullable(),
325
- validSubmissionRequired: z.boolean().describe(
326
- "Bookings policy violation. Intake Form submission is required for this slot."
327
- ).optional().nullable()
328
- }).describe("Booking policy violations for the slot.").optional(),
329
- locked: z.boolean().describe(
330
- "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."
331
- ).optional().nullable(),
332
- isFromV2: z.boolean().describe("Deprecated. not in use since 2025-06-15.").optional()
333
- })
334
- ).optional(),
335
- cursorPagingMetadata: z.object({
336
- count: z.number().int().describe("Number of items returned in current page.").optional().nullable(),
337
- cursors: z.object({
338
- next: z.string().describe(
339
- "Cursor string pointing to the next page in the list of results."
340
- ).max(16e3).optional().nullable(),
341
- prev: z.string().describe(
342
- "Cursor pointing to the previous page in the list of results."
343
- ).max(16e3).optional().nullable()
344
- }).describe(
345
- "Cursor strings that point to the next page, previous page, or both."
346
- ).optional(),
347
- hasNext: z.boolean().describe(
348
- "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."
349
- ).optional().nullable()
350
- }).optional()
351
- });
352
- // Annotate the CommonJS export names for ESM import in node:
353
- 0 && (module.exports = {
354
- CalculateMultiSlotAvailabilityRequest,
355
- CalculateMultiSlotAvailabilityResponse,
356
- GetScheduleAvailabilityRequest,
357
- GetScheduleAvailabilityResponse,
358
- QueryAvailabilityRequest,
359
- QueryAvailabilityResponse
360
- });
361
- //# sourceMappingURL=schemas.js.map