@wix/auto_sdk_bookings_availability-calendar 1.0.196 → 1.0.197
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.js.map +1 -1
- package/build/cjs/index.typings.d.ts +3 -3
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +3 -3
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.js +124 -122
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +3 -3
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +3 -3
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.mjs +124 -122
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +3 -3
- package/build/internal/cjs/meta.d.ts +3 -3
- package/build/internal/es/index.typings.d.mts +3 -3
- package/build/internal/es/meta.d.mts +3 -3
- package/package.json +2 -2
- package/build/internal/cjs/index.js +0 -449
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.js +0 -419
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.js +0 -372
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/schemas.js +0 -361
- package/build/internal/cjs/schemas.js.map +0 -1
- package/build/internal/es/index.mjs +0 -418
- package/build/internal/es/index.mjs.map +0 -1
- package/build/internal/es/index.typings.mjs +0 -388
- package/build/internal/es/index.typings.mjs.map +0 -1
- package/build/internal/es/meta.mjs +0 -338
- package/build/internal/es/meta.mjs.map +0 -1
- package/build/internal/es/schemas.mjs +0 -319
- package/build/internal/es/schemas.mjs.map +0 -1
package/build/es/schemas.mjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
// src/bookings-availability-v1-slot-availability-availability-calendar.schemas.ts
|
|
2
2
|
import * as z from "zod";
|
|
3
3
|
var QueryAvailabilityRequest = /* @__PURE__ */ z.object({
|
|
4
|
-
query: z.object({
|
|
5
|
-
filter: z.record(z.string(), z.any()).describe(
|
|
4
|
+
query: /* @__PURE__ */ z.object({
|
|
5
|
+
filter: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe(
|
|
6
6
|
"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."
|
|
7
7
|
),
|
|
8
|
-
sort: z.array(
|
|
9
|
-
z.object({
|
|
10
|
-
fieldName: z.string().describe("Name of the field to sort by.").max(512).optional(),
|
|
11
|
-
order: z.enum(["ASC", "DESC"]).optional(),
|
|
12
|
-
origin: z.object({
|
|
13
|
-
latitude: z.number().describe("Address latitude.").optional().nullable(),
|
|
14
|
-
longitude: z.number().describe("Address longitude.").optional().nullable()
|
|
8
|
+
sort: /* @__PURE__ */ z.array(
|
|
9
|
+
/* @__PURE__ */ z.object({
|
|
10
|
+
fieldName: /* @__PURE__ */ z.string().describe("Name of the field to sort by.").max(512).optional(),
|
|
11
|
+
order: /* @__PURE__ */ z.enum(["ASC", "DESC"]).optional(),
|
|
12
|
+
origin: /* @__PURE__ */ z.object({
|
|
13
|
+
latitude: /* @__PURE__ */ z.number().describe("Address latitude.").optional().nullable(),
|
|
14
|
+
longitude: /* @__PURE__ */ z.number().describe("Address longitude.").optional().nullable()
|
|
15
15
|
}).describe(
|
|
16
16
|
"Origin point for geo-distance sorting on a GEO field\nresults are ordered by distance from this point (ASC = nearest first, DESC = farthest first)."
|
|
17
17
|
).optional()
|
|
@@ -20,290 +20,292 @@ var QueryAvailabilityRequest = /* @__PURE__ */ z.object({
|
|
|
20
20
|
}).describe(
|
|
21
21
|
"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."
|
|
22
22
|
),
|
|
23
|
-
options: z.object({
|
|
24
|
-
timezone: z.string().describe(
|
|
23
|
+
options: /* @__PURE__ */ z.object({
|
|
24
|
+
timezone: /* @__PURE__ */ z.string().describe(
|
|
25
25
|
'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.'
|
|
26
26
|
).optional().nullable(),
|
|
27
|
-
slotsPerDay: z.number().int().describe(
|
|
27
|
+
slotsPerDay: /* @__PURE__ */ z.number().int().describe(
|
|
28
28
|
"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."
|
|
29
29
|
).optional().nullable()
|
|
30
30
|
}).describe("Options to use for querying availability.").optional()
|
|
31
31
|
});
|
|
32
32
|
var QueryAvailabilityResponse = /* @__PURE__ */ z.object({
|
|
33
|
-
availabilityEntries: z.array(
|
|
34
|
-
z.object({
|
|
35
|
-
slot: z.object({
|
|
36
|
-
sessionId: z.string().describe(
|
|
33
|
+
availabilityEntries: /* @__PURE__ */ z.array(
|
|
34
|
+
/* @__PURE__ */ z.object({
|
|
35
|
+
slot: /* @__PURE__ */ z.object({
|
|
36
|
+
sessionId: /* @__PURE__ */ z.string().describe(
|
|
37
37
|
"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."
|
|
38
38
|
).optional().nullable(),
|
|
39
|
-
serviceId: z.string().describe("Service ID.").optional(),
|
|
40
|
-
scheduleId: z.string().describe("Schedule ID.").optional(),
|
|
41
|
-
startDate: z.string().describe(
|
|
39
|
+
serviceId: /* @__PURE__ */ z.string().describe("Service ID.").optional(),
|
|
40
|
+
scheduleId: /* @__PURE__ */ z.string().describe("Schedule ID.").optional(),
|
|
41
|
+
startDate: /* @__PURE__ */ z.string().describe(
|
|
42
42
|
"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."
|
|
43
43
|
).optional().nullable(),
|
|
44
|
-
endDate: z.string().describe(
|
|
44
|
+
endDate: /* @__PURE__ */ z.string().describe(
|
|
45
45
|
"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."
|
|
46
46
|
).optional().nullable(),
|
|
47
|
-
timezone: z.string().describe(
|
|
47
|
+
timezone: /* @__PURE__ */ z.string().describe(
|
|
48
48
|
"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."
|
|
49
49
|
).optional().nullable(),
|
|
50
|
-
resource: z.object({
|
|
51
|
-
_id: z.string().describe("Resource ID.").regex(
|
|
50
|
+
resource: /* @__PURE__ */ z.object({
|
|
51
|
+
_id: /* @__PURE__ */ z.string().describe("Resource ID.").regex(
|
|
52
52
|
/^[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}$/,
|
|
53
53
|
"Must be a valid GUID"
|
|
54
54
|
).optional().nullable(),
|
|
55
|
-
name: z.string().describe("Resource name. Read only.").max(1200).optional().nullable()
|
|
55
|
+
name: /* @__PURE__ */ z.string().describe("Resource name. Read only.").max(1200).optional().nullable()
|
|
56
56
|
}).describe(
|
|
57
57
|
"The resource required for this slot. Currently, the only supported resource\nis the relevant staff member for the slot."
|
|
58
58
|
).optional(),
|
|
59
|
-
location: z.object({
|
|
60
|
-
_id: z.string().describe(
|
|
59
|
+
location: /* @__PURE__ */ z.object({
|
|
60
|
+
_id: /* @__PURE__ */ z.string().describe(
|
|
61
61
|
'Business location ID. Available only for locations that are business locations,\nmeaning the `location_type` is `"OWNER_BUSINESS"`.'
|
|
62
62
|
).regex(
|
|
63
63
|
/^[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}$/,
|
|
64
64
|
"Must be a valid GUID"
|
|
65
65
|
).optional().nullable(),
|
|
66
|
-
name: z.string().describe("Location name.").optional().nullable(),
|
|
67
|
-
formattedAddress: z.string().describe("The full address of this location.").optional().nullable(),
|
|
68
|
-
formattedAddressTranslated: z.string().describe("The full translated address of this location.").max(512).optional().nullable(),
|
|
69
|
-
locationType: z.enum([
|
|
66
|
+
name: /* @__PURE__ */ z.string().describe("Location name.").optional().nullable(),
|
|
67
|
+
formattedAddress: /* @__PURE__ */ z.string().describe("The full address of this location.").optional().nullable(),
|
|
68
|
+
formattedAddressTranslated: /* @__PURE__ */ z.string().describe("The full translated address of this location.").max(512).optional().nullable(),
|
|
69
|
+
locationType: /* @__PURE__ */ z.enum([
|
|
70
70
|
"UNDEFINED",
|
|
71
71
|
"OWNER_BUSINESS",
|
|
72
72
|
"OWNER_CUSTOM",
|
|
73
73
|
"CUSTOM"
|
|
74
74
|
]).describe("Location type.").optional()
|
|
75
75
|
}).describe("Geographic location of the slot.").optional(),
|
|
76
|
-
eventId: z.string().describe(
|
|
76
|
+
eventId: /* @__PURE__ */ z.string().describe(
|
|
77
77
|
"ID for the slot's corresponding event, when the event is either a single event\nor a specific event generated from a recurring event."
|
|
78
78
|
).min(36).max(250).optional().nullable()
|
|
79
79
|
}).describe(
|
|
80
80
|
"The slot for the corresponding session, when the session is either a single session\nor a specific session generated from a recurring session."
|
|
81
81
|
).optional(),
|
|
82
|
-
bookable: z.boolean().describe(
|
|
82
|
+
bookable: /* @__PURE__ */ z.boolean().describe(
|
|
83
83
|
"Whether the slot is bookable. Bookability is determined by checking a\nsession's open slots and booking policies. Locks are not taken into\naccount."
|
|
84
84
|
).optional(),
|
|
85
|
-
totalSpots: z.number().int().describe(
|
|
85
|
+
totalSpots: /* @__PURE__ */ z.number().int().describe(
|
|
86
86
|
"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."
|
|
87
87
|
).optional().nullable(),
|
|
88
|
-
openSpots: z.number().int().describe("Number of open spots for this slot.").optional().nullable(),
|
|
89
|
-
waitingList: z.object({
|
|
90
|
-
totalSpots: z.number().int().describe(
|
|
88
|
+
openSpots: /* @__PURE__ */ z.number().int().describe("Number of open spots for this slot.").optional().nullable(),
|
|
89
|
+
waitingList: /* @__PURE__ */ z.object({
|
|
90
|
+
totalSpots: /* @__PURE__ */ z.number().int().describe(
|
|
91
91
|
"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`."
|
|
92
92
|
).optional().nullable(),
|
|
93
|
-
openSpots: z.number().int().describe("Number of open spots for this waitlist.").optional().nullable()
|
|
93
|
+
openSpots: /* @__PURE__ */ z.number().int().describe("Number of open spots for this waitlist.").optional().nullable()
|
|
94
94
|
}).describe(
|
|
95
95
|
"An object describing the slot's waitlist and its occupancy."
|
|
96
96
|
).optional(),
|
|
97
|
-
bookingPolicyViolations: z.object({
|
|
98
|
-
tooEarlyToBook: z.boolean().describe(
|
|
97
|
+
bookingPolicyViolations: /* @__PURE__ */ z.object({
|
|
98
|
+
tooEarlyToBook: /* @__PURE__ */ z.boolean().describe(
|
|
99
99
|
"Bookings policy violation. Too early to book this slot."
|
|
100
100
|
).optional().nullable(),
|
|
101
|
-
tooLateToBook: z.boolean().describe(
|
|
101
|
+
tooLateToBook: /* @__PURE__ */ z.boolean().describe(
|
|
102
102
|
"Bookings policy violation. Too late to book this slot."
|
|
103
103
|
).optional().nullable(),
|
|
104
|
-
bookOnlineDisabled: z.boolean().describe(
|
|
104
|
+
bookOnlineDisabled: /* @__PURE__ */ z.boolean().describe(
|
|
105
105
|
"Bookings policy violation. Online booking is disabled for this slot."
|
|
106
106
|
).optional().nullable(),
|
|
107
|
-
validSubmissionRequired: z.boolean().describe(
|
|
107
|
+
validSubmissionRequired: /* @__PURE__ */ z.boolean().describe(
|
|
108
108
|
"Bookings policy violation. Intake Form submission is required for this slot."
|
|
109
109
|
).optional().nullable()
|
|
110
110
|
}).describe("Booking policy violations for the slot.").optional(),
|
|
111
|
-
locked: z.boolean().describe(
|
|
111
|
+
locked: /* @__PURE__ */ z.boolean().describe(
|
|
112
112
|
"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."
|
|
113
113
|
).optional().nullable(),
|
|
114
|
-
isFromV2: z.boolean().describe("Deprecated. not in use since 2025-06-15.").optional()
|
|
114
|
+
isFromV2: /* @__PURE__ */ z.boolean().describe("Deprecated. not in use since 2025-06-15.").optional()
|
|
115
115
|
})
|
|
116
116
|
).optional()
|
|
117
117
|
});
|
|
118
118
|
var GetScheduleAvailabilityRequest = /* @__PURE__ */ z.object({
|
|
119
|
-
scheduleId: z.string().describe("The schedule ID for which availability is being checked.").regex(
|
|
119
|
+
scheduleId: /* @__PURE__ */ z.string().describe("The schedule ID for which availability is being checked.").regex(
|
|
120
120
|
/^[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}$/,
|
|
121
121
|
"Must be a valid GUID"
|
|
122
122
|
)
|
|
123
123
|
});
|
|
124
124
|
var GetScheduleAvailabilityResponse = /* @__PURE__ */ z.object({
|
|
125
|
-
availability: z.object({
|
|
126
|
-
totalSpots: z.number().int().describe(
|
|
125
|
+
availability: /* @__PURE__ */ z.object({
|
|
126
|
+
totalSpots: /* @__PURE__ */ z.number().int().describe(
|
|
127
127
|
"The total number of spots defined for the schedule, including\nboth open and non-available spots."
|
|
128
128
|
).optional().nullable(),
|
|
129
|
-
openSpots: z.number().int().describe("The number of open spots defined for the schedule.").optional().nullable(),
|
|
130
|
-
bookingPolicyViolations: z.object({
|
|
131
|
-
tooEarlyToBook: z.boolean().describe("Bookings policy violation. Too early to book this slot.").optional().nullable(),
|
|
132
|
-
tooLateToBook: z.boolean().describe("Bookings policy violation. Too late to book this slot.").optional().nullable(),
|
|
133
|
-
bookOnlineDisabled: z.boolean().describe(
|
|
129
|
+
openSpots: /* @__PURE__ */ z.number().int().describe("The number of open spots defined for the schedule.").optional().nullable(),
|
|
130
|
+
bookingPolicyViolations: /* @__PURE__ */ z.object({
|
|
131
|
+
tooEarlyToBook: /* @__PURE__ */ z.boolean().describe("Bookings policy violation. Too early to book this slot.").optional().nullable(),
|
|
132
|
+
tooLateToBook: /* @__PURE__ */ z.boolean().describe("Bookings policy violation. Too late to book this slot.").optional().nullable(),
|
|
133
|
+
bookOnlineDisabled: /* @__PURE__ */ z.boolean().describe(
|
|
134
134
|
"Bookings policy violation. Online booking is disabled for this slot."
|
|
135
135
|
).optional().nullable(),
|
|
136
|
-
validSubmissionRequired: z.boolean().describe(
|
|
136
|
+
validSubmissionRequired: /* @__PURE__ */ z.boolean().describe(
|
|
137
137
|
"Bookings policy violation. Intake Form submission is required for this slot."
|
|
138
138
|
).optional().nullable()
|
|
139
139
|
}).describe("Booking policy violations for the schedule.").optional()
|
|
140
140
|
}).optional(),
|
|
141
|
-
bookingPolicySettings: z.object({
|
|
142
|
-
maxParticipantsPerBooking: z.number().int().describe(
|
|
141
|
+
bookingPolicySettings: /* @__PURE__ */ z.object({
|
|
142
|
+
maxParticipantsPerBooking: /* @__PURE__ */ z.number().int().describe(
|
|
143
143
|
"The policy defining the maximum number of participants that can\nbe booked for a slot or a schedule."
|
|
144
144
|
).optional().nullable()
|
|
145
145
|
}).optional()
|
|
146
146
|
});
|
|
147
147
|
var CalculateMultiSlotAvailabilityRequest = /* @__PURE__ */ z.object({
|
|
148
|
-
options: z.object({
|
|
149
|
-
from: z.string().max(30).optional(),
|
|
150
|
-
to: z.string().max(30).optional(),
|
|
151
|
-
timeZone: z.string().max(30).optional(),
|
|
152
|
-
bookable: z.boolean().describe(
|
|
148
|
+
options: /* @__PURE__ */ z.object({
|
|
149
|
+
from: /* @__PURE__ */ z.string().max(30).optional(),
|
|
150
|
+
to: /* @__PURE__ */ z.string().max(30).optional(),
|
|
151
|
+
timeZone: /* @__PURE__ */ z.string().max(30).optional(),
|
|
152
|
+
bookable: /* @__PURE__ */ z.boolean().describe(
|
|
153
153
|
"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"
|
|
154
154
|
).optional().nullable(),
|
|
155
|
-
bookingPolicyViolations: z.object({
|
|
156
|
-
tooEarlyToBook: z.boolean().describe("Bookings policy violation. Too early to book this slot.").optional().nullable(),
|
|
157
|
-
tooLateToBook: z.boolean().describe("Bookings policy violation. Too late to book this slot.").optional().nullable(),
|
|
158
|
-
bookOnlineDisabled: z.boolean().describe(
|
|
155
|
+
bookingPolicyViolations: /* @__PURE__ */ z.object({
|
|
156
|
+
tooEarlyToBook: /* @__PURE__ */ z.boolean().describe("Bookings policy violation. Too early to book this slot.").optional().nullable(),
|
|
157
|
+
tooLateToBook: /* @__PURE__ */ z.boolean().describe("Bookings policy violation. Too late to book this slot.").optional().nullable(),
|
|
158
|
+
bookOnlineDisabled: /* @__PURE__ */ z.boolean().describe(
|
|
159
159
|
"Bookings policy violation. Online booking is disabled for this slot."
|
|
160
160
|
).optional().nullable(),
|
|
161
|
-
validSubmissionRequired: z.boolean().describe(
|
|
161
|
+
validSubmissionRequired: /* @__PURE__ */ z.boolean().describe(
|
|
162
162
|
"Bookings policy violation. Intake Form submission is required for this slot."
|
|
163
163
|
).optional().nullable()
|
|
164
164
|
}).describe(
|
|
165
165
|
"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`."
|
|
166
166
|
).optional(),
|
|
167
|
-
location: z.object({
|
|
168
|
-
_id: z.string().describe(
|
|
167
|
+
location: /* @__PURE__ */ z.object({
|
|
168
|
+
_id: /* @__PURE__ */ z.string().describe(
|
|
169
169
|
'Business location ID. Available only for locations that are business locations,\nmeaning the `location_type` is `"OWNER_BUSINESS"`.'
|
|
170
170
|
).regex(
|
|
171
171
|
/^[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}$/,
|
|
172
172
|
"Must be a valid GUID"
|
|
173
173
|
).optional().nullable(),
|
|
174
|
-
name: z.string().describe("Location name.").optional().nullable(),
|
|
175
|
-
formattedAddress: z.string().describe("The full address of this location.").optional().nullable(),
|
|
176
|
-
formattedAddressTranslated: z.string().describe("The full translated address of this location.").max(512).optional().nullable(),
|
|
177
|
-
locationType: z.enum(["UNDEFINED", "OWNER_BUSINESS", "OWNER_CUSTOM", "CUSTOM"]).optional()
|
|
174
|
+
name: /* @__PURE__ */ z.string().describe("Location name.").optional().nullable(),
|
|
175
|
+
formattedAddress: /* @__PURE__ */ z.string().describe("The full address of this location.").optional().nullable(),
|
|
176
|
+
formattedAddressTranslated: /* @__PURE__ */ z.string().describe("The full translated address of this location.").max(512).optional().nullable(),
|
|
177
|
+
locationType: /* @__PURE__ */ z.enum(["UNDEFINED", "OWNER_BUSINESS", "OWNER_CUSTOM", "CUSTOM"]).optional()
|
|
178
178
|
}).describe(
|
|
179
179
|
"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"
|
|
180
180
|
).optional(),
|
|
181
|
-
slots: z.array(
|
|
182
|
-
z.object({
|
|
183
|
-
serviceId: z.string().regex(
|
|
181
|
+
slots: /* @__PURE__ */ z.array(
|
|
182
|
+
/* @__PURE__ */ z.object({
|
|
183
|
+
serviceId: /* @__PURE__ */ z.string().regex(
|
|
184
184
|
/^[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}$/,
|
|
185
185
|
"Must be a valid GUID"
|
|
186
186
|
).optional(),
|
|
187
|
-
resourcesFilter: z.object({
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
187
|
+
resourcesFilter: /* @__PURE__ */ z.object({
|
|
188
|
+
resourceIds: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).optional()
|
|
189
|
+
}).optional(),
|
|
190
|
+
customerChoices: /* @__PURE__ */ z.object({
|
|
191
|
+
durationInMinutes: /* @__PURE__ */ z.number().int().describe(
|
|
192
|
+
"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: `86400` minutes (60 days)\nDefault: `15` minutes"
|
|
193
|
+
).min(1).max(86400).optional().nullable(),
|
|
194
|
+
addOnIds: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).max(21).optional()
|
|
193
195
|
}).describe(
|
|
194
196
|
"will be passed to availability-2, and to the availability-constraints SPI"
|
|
195
197
|
).optional()
|
|
196
198
|
})
|
|
197
199
|
).min(1).max(6).optional(),
|
|
198
|
-
slotsPerDay: z.number().int().describe(
|
|
200
|
+
slotsPerDay: /* @__PURE__ */ z.number().int().describe(
|
|
199
201
|
"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."
|
|
200
202
|
).optional().nullable(),
|
|
201
|
-
cursorPaging: z.object({
|
|
202
|
-
limit: z.number().int().describe("Maximum number of items to return in the results.").min(0).max(100).optional().nullable(),
|
|
203
|
-
cursor: z.string().describe(
|
|
203
|
+
cursorPaging: /* @__PURE__ */ z.object({
|
|
204
|
+
limit: /* @__PURE__ */ z.number().int().describe("Maximum number of items to return in the results.").min(0).max(100).optional().nullable(),
|
|
205
|
+
cursor: /* @__PURE__ */ z.string().describe(
|
|
204
206
|
"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."
|
|
205
207
|
).max(16e3).optional().nullable()
|
|
206
208
|
}).optional()
|
|
207
209
|
}).optional()
|
|
208
210
|
});
|
|
209
211
|
var CalculateMultiSlotAvailabilityResponse = /* @__PURE__ */ z.object({
|
|
210
|
-
slots: z.array(
|
|
211
|
-
z.object({
|
|
212
|
-
slot: z.object({
|
|
213
|
-
sessionId: z.string().describe(
|
|
212
|
+
slots: /* @__PURE__ */ z.array(
|
|
213
|
+
/* @__PURE__ */ z.object({
|
|
214
|
+
slot: /* @__PURE__ */ z.object({
|
|
215
|
+
sessionId: /* @__PURE__ */ z.string().describe(
|
|
214
216
|
"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."
|
|
215
217
|
).optional().nullable(),
|
|
216
|
-
serviceId: z.string().describe("Service ID.").optional(),
|
|
217
|
-
scheduleId: z.string().describe("Schedule ID.").optional(),
|
|
218
|
-
startDate: z.string().describe(
|
|
218
|
+
serviceId: /* @__PURE__ */ z.string().describe("Service ID.").optional(),
|
|
219
|
+
scheduleId: /* @__PURE__ */ z.string().describe("Schedule ID.").optional(),
|
|
220
|
+
startDate: /* @__PURE__ */ z.string().describe(
|
|
219
221
|
"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."
|
|
220
222
|
).optional().nullable(),
|
|
221
|
-
endDate: z.string().describe(
|
|
223
|
+
endDate: /* @__PURE__ */ z.string().describe(
|
|
222
224
|
"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."
|
|
223
225
|
).optional().nullable(),
|
|
224
|
-
timezone: z.string().describe(
|
|
226
|
+
timezone: /* @__PURE__ */ z.string().describe(
|
|
225
227
|
"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."
|
|
226
228
|
).optional().nullable(),
|
|
227
|
-
resource: z.object({
|
|
228
|
-
_id: z.string().describe("Resource ID.").regex(
|
|
229
|
+
resource: /* @__PURE__ */ z.object({
|
|
230
|
+
_id: /* @__PURE__ */ z.string().describe("Resource ID.").regex(
|
|
229
231
|
/^[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}$/,
|
|
230
232
|
"Must be a valid GUID"
|
|
231
233
|
).optional().nullable(),
|
|
232
|
-
name: z.string().describe("Resource name. Read only.").max(1200).optional().nullable()
|
|
234
|
+
name: /* @__PURE__ */ z.string().describe("Resource name. Read only.").max(1200).optional().nullable()
|
|
233
235
|
}).describe(
|
|
234
236
|
"The resource required for this slot. Currently, the only supported resource\nis the relevant staff member for the slot."
|
|
235
237
|
).optional(),
|
|
236
|
-
location: z.object({
|
|
237
|
-
_id: z.string().describe(
|
|
238
|
+
location: /* @__PURE__ */ z.object({
|
|
239
|
+
_id: /* @__PURE__ */ z.string().describe(
|
|
238
240
|
'Business location ID. Available only for locations that are business locations,\nmeaning the `location_type` is `"OWNER_BUSINESS"`.'
|
|
239
241
|
).regex(
|
|
240
242
|
/^[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}$/,
|
|
241
243
|
"Must be a valid GUID"
|
|
242
244
|
).optional().nullable(),
|
|
243
|
-
name: z.string().describe("Location name.").optional().nullable(),
|
|
244
|
-
formattedAddress: z.string().describe("The full address of this location.").optional().nullable(),
|
|
245
|
-
formattedAddressTranslated: z.string().describe("The full translated address of this location.").max(512).optional().nullable(),
|
|
246
|
-
locationType: z.enum([
|
|
245
|
+
name: /* @__PURE__ */ z.string().describe("Location name.").optional().nullable(),
|
|
246
|
+
formattedAddress: /* @__PURE__ */ z.string().describe("The full address of this location.").optional().nullable(),
|
|
247
|
+
formattedAddressTranslated: /* @__PURE__ */ z.string().describe("The full translated address of this location.").max(512).optional().nullable(),
|
|
248
|
+
locationType: /* @__PURE__ */ z.enum([
|
|
247
249
|
"UNDEFINED",
|
|
248
250
|
"OWNER_BUSINESS",
|
|
249
251
|
"OWNER_CUSTOM",
|
|
250
252
|
"CUSTOM"
|
|
251
253
|
]).describe("Location type.").optional()
|
|
252
254
|
}).describe("Geographic location of the slot.").optional(),
|
|
253
|
-
eventId: z.string().describe(
|
|
255
|
+
eventId: /* @__PURE__ */ z.string().describe(
|
|
254
256
|
"ID for the slot's corresponding event, when the event is either a single event\nor a specific event generated from a recurring event."
|
|
255
257
|
).min(36).max(250).optional().nullable()
|
|
256
258
|
}).describe(
|
|
257
259
|
"The slot for the corresponding session, when the session is either a single session\nor a specific session generated from a recurring session."
|
|
258
260
|
).optional(),
|
|
259
|
-
bookable: z.boolean().describe(
|
|
261
|
+
bookable: /* @__PURE__ */ z.boolean().describe(
|
|
260
262
|
"Whether the slot is bookable. Bookability is determined by checking a\nsession's open slots and booking policies. Locks are not taken into\naccount."
|
|
261
263
|
).optional(),
|
|
262
|
-
totalSpots: z.number().int().describe(
|
|
264
|
+
totalSpots: /* @__PURE__ */ z.number().int().describe(
|
|
263
265
|
"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."
|
|
264
266
|
).optional().nullable(),
|
|
265
|
-
openSpots: z.number().int().describe("Number of open spots for this slot.").optional().nullable(),
|
|
266
|
-
waitingList: z.object({
|
|
267
|
-
totalSpots: z.number().int().describe(
|
|
267
|
+
openSpots: /* @__PURE__ */ z.number().int().describe("Number of open spots for this slot.").optional().nullable(),
|
|
268
|
+
waitingList: /* @__PURE__ */ z.object({
|
|
269
|
+
totalSpots: /* @__PURE__ */ z.number().int().describe(
|
|
268
270
|
"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`."
|
|
269
271
|
).optional().nullable(),
|
|
270
|
-
openSpots: z.number().int().describe("Number of open spots for this waitlist.").optional().nullable()
|
|
272
|
+
openSpots: /* @__PURE__ */ z.number().int().describe("Number of open spots for this waitlist.").optional().nullable()
|
|
271
273
|
}).describe(
|
|
272
274
|
"An object describing the slot's waitlist and its occupancy."
|
|
273
275
|
).optional(),
|
|
274
|
-
bookingPolicyViolations: z.object({
|
|
275
|
-
tooEarlyToBook: z.boolean().describe(
|
|
276
|
+
bookingPolicyViolations: /* @__PURE__ */ z.object({
|
|
277
|
+
tooEarlyToBook: /* @__PURE__ */ z.boolean().describe(
|
|
276
278
|
"Bookings policy violation. Too early to book this slot."
|
|
277
279
|
).optional().nullable(),
|
|
278
|
-
tooLateToBook: z.boolean().describe(
|
|
280
|
+
tooLateToBook: /* @__PURE__ */ z.boolean().describe(
|
|
279
281
|
"Bookings policy violation. Too late to book this slot."
|
|
280
282
|
).optional().nullable(),
|
|
281
|
-
bookOnlineDisabled: z.boolean().describe(
|
|
283
|
+
bookOnlineDisabled: /* @__PURE__ */ z.boolean().describe(
|
|
282
284
|
"Bookings policy violation. Online booking is disabled for this slot."
|
|
283
285
|
).optional().nullable(),
|
|
284
|
-
validSubmissionRequired: z.boolean().describe(
|
|
286
|
+
validSubmissionRequired: /* @__PURE__ */ z.boolean().describe(
|
|
285
287
|
"Bookings policy violation. Intake Form submission is required for this slot."
|
|
286
288
|
).optional().nullable()
|
|
287
289
|
}).describe("Booking policy violations for the slot.").optional(),
|
|
288
|
-
locked: z.boolean().describe(
|
|
290
|
+
locked: /* @__PURE__ */ z.boolean().describe(
|
|
289
291
|
"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."
|
|
290
292
|
).optional().nullable(),
|
|
291
|
-
isFromV2: z.boolean().describe("Deprecated. not in use since 2025-06-15.").optional()
|
|
293
|
+
isFromV2: /* @__PURE__ */ z.boolean().describe("Deprecated. not in use since 2025-06-15.").optional()
|
|
292
294
|
})
|
|
293
295
|
).optional(),
|
|
294
|
-
cursorPagingMetadata: z.object({
|
|
295
|
-
count: z.number().int().describe("Number of items returned in current page.").optional().nullable(),
|
|
296
|
-
cursors: z.object({
|
|
297
|
-
next: z.string().describe(
|
|
296
|
+
cursorPagingMetadata: /* @__PURE__ */ z.object({
|
|
297
|
+
count: /* @__PURE__ */ z.number().int().describe("Number of items returned in current page.").optional().nullable(),
|
|
298
|
+
cursors: /* @__PURE__ */ z.object({
|
|
299
|
+
next: /* @__PURE__ */ z.string().describe(
|
|
298
300
|
"Cursor string pointing to the next page in the list of results."
|
|
299
301
|
).max(16e3).optional().nullable(),
|
|
300
|
-
prev: z.string().describe(
|
|
302
|
+
prev: /* @__PURE__ */ z.string().describe(
|
|
301
303
|
"Cursor pointing to the previous page in the list of results."
|
|
302
304
|
).max(16e3).optional().nullable()
|
|
303
305
|
}).describe(
|
|
304
306
|
"Cursor strings that point to the next page, previous page, or both."
|
|
305
307
|
).optional(),
|
|
306
|
-
hasNext: z.boolean().describe(
|
|
308
|
+
hasNext: /* @__PURE__ */ z.boolean().describe(
|
|
307
309
|
"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."
|
|
308
310
|
).optional().nullable()
|
|
309
311
|
}).optional()
|