@wix/auto_sdk_bookings_resources 1.0.80 → 1.0.82

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.
@@ -0,0 +1,1904 @@
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
+ BulkCreateResourcesRequest: () => BulkCreateResourcesRequest,
34
+ BulkCreateResourcesResponse: () => BulkCreateResourcesResponse,
35
+ BulkDeleteResourcesRequest: () => BulkDeleteResourcesRequest,
36
+ BulkDeleteResourcesResponse: () => BulkDeleteResourcesResponse,
37
+ BulkUpdateResourcesRequest: () => BulkUpdateResourcesRequest,
38
+ BulkUpdateResourcesResponse: () => BulkUpdateResourcesResponse,
39
+ CountResourcesRequest: () => CountResourcesRequest,
40
+ CountResourcesResponse: () => CountResourcesResponse,
41
+ CreateResourceRequest: () => CreateResourceRequest,
42
+ CreateResourceResponse: () => CreateResourceResponse,
43
+ DeleteResourceRequest: () => DeleteResourceRequest,
44
+ DeleteResourceResponse: () => DeleteResourceResponse,
45
+ GetResourceRequest: () => GetResourceRequest,
46
+ GetResourceResponse: () => GetResourceResponse,
47
+ QueryResourcesRequest: () => QueryResourcesRequest,
48
+ QueryResourcesResponse: () => QueryResourcesResponse,
49
+ SearchResourcesRequest: () => SearchResourcesRequest,
50
+ SearchResourcesResponse: () => SearchResourcesResponse,
51
+ UpdateResourceRequest: () => UpdateResourceRequest,
52
+ UpdateResourceResponse: () => UpdateResourceResponse
53
+ });
54
+ module.exports = __toCommonJS(schemas_exports);
55
+
56
+ // src/bookings-resources-v2-resource-resources.schemas.ts
57
+ var z = __toESM(require("zod"));
58
+ var CreateResourceRequest = z.object({
59
+ resource: z.object({
60
+ _id: z.string().describe("Resource ID.").regex(
61
+ /^[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}$/,
62
+ "Must be a valid GUID"
63
+ ).optional().nullable(),
64
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
65
+ "Revision number, which increments by 1 each time the resource is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the resource."
66
+ ).optional().nullable(),
67
+ _createdDate: z.date().describe(
68
+ "Time in `YYYY-MM-DDThh:mm:ss.sssZ` format the resource was created."
69
+ ).optional().nullable(),
70
+ _updatedDate: z.date().describe(
71
+ "Time in `YYYY-MM-DDThh:mm:ss.sssZ` format the resource was last updated."
72
+ ).optional().nullable(),
73
+ name: z.string().describe("Name of the resource.").max(40).min(1),
74
+ typeId: z.string().describe(
75
+ "ID of the [resource type](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resource-types-v2/introduction).\n\nOnce a type has been set it can't be modified. You can create a resource\nwithout specifying a type. However, customers can't book such resources."
76
+ ).regex(
77
+ /^[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}$/,
78
+ "Must be a valid GUID"
79
+ ).optional().nullable(),
80
+ workingHoursSchedules: z.object({
81
+ values: z.array(
82
+ z.object({
83
+ scheduleId: z.string().describe(
84
+ "ID of the working hour [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)."
85
+ ).regex(
86
+ /^[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}$/,
87
+ "Must be a valid GUID"
88
+ ).optional().nullable(),
89
+ shared: z.boolean().describe(
90
+ "Whether the schedule is shared by multiple resources or unique for this resource.\n\nDefault: `false`"
91
+ ).optional().nullable()
92
+ })
93
+ ).max(1).optional()
94
+ }).describe(
95
+ "Information about the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)\nspecifying the working hours and locations of the resource.\n\nResources without a working hour schedule are available 24/7 at the locations\nspecified in the field `locationOptions`.\nWhen both `workingHoursSchedules` and `locationOptions` are set,\n`workingHoursSchedules` takes precedence."
96
+ ).optional(),
97
+ locationOptions: z.object({
98
+ availableInAllLocations: z.boolean().describe(
99
+ "Whether the resource is available in all [business locations](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations#location-types).\n\n- `true`: The resource is available in all business locations.\n- `false`: The resource is available only in specific locations.\n\nDefault: `false`"
100
+ ).optional().nullable(),
101
+ specificLocationOptions: z.object({
102
+ availableInBusinessLocations: z.boolean().describe(
103
+ "Whether the resource is available in [business locations](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations#location-types).\n\n- `true`: The resource is available in business locations.\n- `false`: The resource isn't available in business locations.\n\nDefault: `false`"
104
+ ).optional().nullable(),
105
+ businessLocations: z.array(
106
+ z.object({
107
+ locationId: z.string().describe(
108
+ "ID of the business [location](https://dev.wix.com/docs/rest/business-management/locations/introduction)."
109
+ ).regex(
110
+ /^[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}$/,
111
+ "Must be a valid GUID"
112
+ ).optional().nullable()
113
+ })
114
+ ).max(100).optional()
115
+ }).describe("Details of resource availability in specific locations.").optional()
116
+ }).describe(
117
+ "Information about the location where the resource is available."
118
+ ).optional(),
119
+ eventsSchedule: z.object({
120
+ scheduleId: z.string().describe(
121
+ "ID of the event [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)."
122
+ ).regex(
123
+ /^[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}$/,
124
+ "Must be a valid GUID"
125
+ ).optional().nullable()
126
+ }).describe(
127
+ "Schedule containing the [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction)\nfor which the resource has been booked."
128
+ ).optional(),
129
+ appId: z.string().describe(
130
+ 'ID of the app associated with the resource. You can\'t update `appId`.\nResources are displayed in Wix Bookings only if they are associated with the Wix Bookings app ID or have no associated app ID.\nDefault: `13d21c63-b5ec-5912-8397-c3a5ddb27a97` (Wix Bookings app ID)\nFor resources from Wix apps, the following values apply:\n- Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`\n- Wix Services: `"cc552162-24a4-45e0-9695-230c4931ef40"`\n- Wix Meetings: `"6646a75c-2027-4f49-976c-58f3d713ed0f"`\n[Full list of apps created by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).\n<!-- TODO: Uncomment when Platform docs are published - Learn more about [app identity in the Bookings Platform](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings-platform/app-identity-in-the-bookings-platform). -->'
131
+ ).regex(
132
+ /^[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}$/,
133
+ "Must be a valid GUID"
134
+ ).optional().nullable(),
135
+ extendedFields: z.object({
136
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
137
+ "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
138
+ ).optional()
139
+ }).describe(
140
+ "Extensions enabling users to save custom data related to the resource."
141
+ ).optional()
142
+ }).describe("Resource to create.")
143
+ });
144
+ var CreateResourceResponse = z.object({
145
+ _id: z.string().describe("Resource ID.").regex(
146
+ /^[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}$/,
147
+ "Must be a valid GUID"
148
+ ).optional().nullable(),
149
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
150
+ "Revision number, which increments by 1 each time the resource is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the resource."
151
+ ).optional().nullable(),
152
+ _createdDate: z.date().describe(
153
+ "Time in `YYYY-MM-DDThh:mm:ss.sssZ` format the resource was created."
154
+ ).optional().nullable(),
155
+ _updatedDate: z.date().describe(
156
+ "Time in `YYYY-MM-DDThh:mm:ss.sssZ` format the resource was last updated."
157
+ ).optional().nullable(),
158
+ name: z.string().describe("Name of the resource.").max(40).min(1).optional().nullable(),
159
+ typeId: z.string().describe(
160
+ "ID of the [resource type](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resource-types-v2/introduction).\n\nOnce a type has been set it can't be modified. You can create a resource\nwithout specifying a type. However, customers can't book such resources."
161
+ ).regex(
162
+ /^[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}$/,
163
+ "Must be a valid GUID"
164
+ ).optional().nullable(),
165
+ workingHoursSchedules: z.object({
166
+ values: z.array(
167
+ z.object({
168
+ scheduleId: z.string().describe(
169
+ "ID of the working hour [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)."
170
+ ).regex(
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
+ "Must be a valid GUID"
173
+ ).optional().nullable(),
174
+ shared: z.boolean().describe(
175
+ "Whether the schedule is shared by multiple resources or unique for this resource.\n\nDefault: `false`"
176
+ ).optional().nullable()
177
+ })
178
+ ).max(1).optional()
179
+ }).describe(
180
+ "Information about the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)\nspecifying the working hours and locations of the resource.\n\nResources without a working hour schedule are available 24/7 at the locations\nspecified in the field `locationOptions`.\nWhen both `workingHoursSchedules` and `locationOptions` are set,\n`workingHoursSchedules` takes precedence."
181
+ ).optional(),
182
+ locationOptions: z.object({
183
+ availableInAllLocations: z.boolean().describe(
184
+ "Whether the resource is available in all [business locations](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations#location-types).\n\n- `true`: The resource is available in all business locations.\n- `false`: The resource is available only in specific locations.\n\nDefault: `false`"
185
+ ).optional().nullable(),
186
+ specificLocationOptions: z.object({
187
+ availableInBusinessLocations: z.boolean().describe(
188
+ "Whether the resource is available in [business locations](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations#location-types).\n\n- `true`: The resource is available in business locations.\n- `false`: The resource isn't available in business locations.\n\nDefault: `false`"
189
+ ).optional().nullable(),
190
+ businessLocations: z.array(
191
+ z.object({
192
+ locationId: z.string().describe(
193
+ "ID of the business [location](https://dev.wix.com/docs/rest/business-management/locations/introduction)."
194
+ ).regex(
195
+ /^[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}$/,
196
+ "Must be a valid GUID"
197
+ ).optional().nullable()
198
+ })
199
+ ).max(100).optional()
200
+ }).describe("Details of resource availability in specific locations.").optional()
201
+ }).describe("Information about the location where the resource is available.").optional(),
202
+ eventsSchedule: z.object({
203
+ scheduleId: z.string().describe(
204
+ "ID of the event [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)."
205
+ ).regex(
206
+ /^[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}$/,
207
+ "Must be a valid GUID"
208
+ ).optional().nullable()
209
+ }).describe(
210
+ "Schedule containing the [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction)\nfor which the resource has been booked."
211
+ ).optional(),
212
+ appId: z.string().describe(
213
+ 'ID of the app associated with the resource. You can\'t update `appId`.\nResources are displayed in Wix Bookings only if they are associated with the Wix Bookings app ID or have no associated app ID.\nDefault: `13d21c63-b5ec-5912-8397-c3a5ddb27a97` (Wix Bookings app ID)\nFor resources from Wix apps, the following values apply:\n- Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`\n- Wix Services: `"cc552162-24a4-45e0-9695-230c4931ef40"`\n- Wix Meetings: `"6646a75c-2027-4f49-976c-58f3d713ed0f"`\n[Full list of apps created by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).\n<!-- TODO: Uncomment when Platform docs are published - Learn more about [app identity in the Bookings Platform](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings-platform/app-identity-in-the-bookings-platform). -->'
214
+ ).regex(
215
+ /^[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}$/,
216
+ "Must be a valid GUID"
217
+ ).optional().nullable(),
218
+ extendedFields: z.object({
219
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
220
+ "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
221
+ ).optional()
222
+ }).describe(
223
+ "Extensions enabling users to save custom data related to the resource."
224
+ ).optional()
225
+ });
226
+ var BulkCreateResourcesRequest = z.object({
227
+ resources: z.array(
228
+ z.object({
229
+ _id: z.string().describe("Resource ID.").regex(
230
+ /^[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}$/,
231
+ "Must be a valid GUID"
232
+ ).optional().nullable(),
233
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
234
+ "Revision number, which increments by 1 each time the resource is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the resource."
235
+ ).optional().nullable(),
236
+ _createdDate: z.date().describe(
237
+ "Time in `YYYY-MM-DDThh:mm:ss.sssZ` format the resource was created."
238
+ ).optional().nullable(),
239
+ _updatedDate: z.date().describe(
240
+ "Time in `YYYY-MM-DDThh:mm:ss.sssZ` format the resource was last updated."
241
+ ).optional().nullable(),
242
+ name: z.string().describe("Name of the resource.").max(40).min(1),
243
+ typeId: z.string().describe(
244
+ "ID of the [resource type](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resource-types-v2/introduction).\n\nOnce a type has been set it can't be modified. You can create a resource\nwithout specifying a type. However, customers can't book such resources."
245
+ ).regex(
246
+ /^[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}$/,
247
+ "Must be a valid GUID"
248
+ ).optional().nullable(),
249
+ workingHoursSchedules: z.object({
250
+ values: z.array(
251
+ z.object({
252
+ scheduleId: z.string().describe(
253
+ "ID of the working hour [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)."
254
+ ).regex(
255
+ /^[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}$/,
256
+ "Must be a valid GUID"
257
+ ).optional().nullable(),
258
+ shared: z.boolean().describe(
259
+ "Whether the schedule is shared by multiple resources or unique for this resource.\n\nDefault: `false`"
260
+ ).optional().nullable()
261
+ })
262
+ ).max(1).optional()
263
+ }).describe(
264
+ "Information about the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)\nspecifying the working hours and locations of the resource.\n\nResources without a working hour schedule are available 24/7 at the locations\nspecified in the field `locationOptions`.\nWhen both `workingHoursSchedules` and `locationOptions` are set,\n`workingHoursSchedules` takes precedence."
265
+ ).optional(),
266
+ locationOptions: z.object({
267
+ availableInAllLocations: z.boolean().describe(
268
+ "Whether the resource is available in all [business locations](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations#location-types).\n\n- `true`: The resource is available in all business locations.\n- `false`: The resource is available only in specific locations.\n\nDefault: `false`"
269
+ ).optional().nullable(),
270
+ specificLocationOptions: z.object({
271
+ availableInBusinessLocations: z.boolean().describe(
272
+ "Whether the resource is available in [business locations](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations#location-types).\n\n- `true`: The resource is available in business locations.\n- `false`: The resource isn't available in business locations.\n\nDefault: `false`"
273
+ ).optional().nullable(),
274
+ businessLocations: z.array(
275
+ z.object({
276
+ locationId: z.string().describe(
277
+ "ID of the business [location](https://dev.wix.com/docs/rest/business-management/locations/introduction)."
278
+ ).regex(
279
+ /^[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}$/,
280
+ "Must be a valid GUID"
281
+ ).optional().nullable()
282
+ })
283
+ ).max(100).optional()
284
+ }).describe(
285
+ "Details of resource availability in specific locations."
286
+ ).optional()
287
+ }).describe(
288
+ "Information about the location where the resource is available."
289
+ ).optional(),
290
+ eventsSchedule: z.object({
291
+ scheduleId: z.string().describe(
292
+ "ID of the event [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)."
293
+ ).regex(
294
+ /^[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}$/,
295
+ "Must be a valid GUID"
296
+ ).optional().nullable()
297
+ }).describe(
298
+ "Schedule containing the [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction)\nfor which the resource has been booked."
299
+ ).optional(),
300
+ appId: z.string().describe(
301
+ 'ID of the app associated with the resource. You can\'t update `appId`.\nResources are displayed in Wix Bookings only if they are associated with the Wix Bookings app ID or have no associated app ID.\nDefault: `13d21c63-b5ec-5912-8397-c3a5ddb27a97` (Wix Bookings app ID)\nFor resources from Wix apps, the following values apply:\n- Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`\n- Wix Services: `"cc552162-24a4-45e0-9695-230c4931ef40"`\n- Wix Meetings: `"6646a75c-2027-4f49-976c-58f3d713ed0f"`\n[Full list of apps created by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).\n<!-- TODO: Uncomment when Platform docs are published - Learn more about [app identity in the Bookings Platform](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings-platform/app-identity-in-the-bookings-platform). -->'
302
+ ).regex(
303
+ /^[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}$/,
304
+ "Must be a valid GUID"
305
+ ).optional().nullable(),
306
+ extendedFields: z.object({
307
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
308
+ "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
309
+ ).optional()
310
+ }).describe(
311
+ "Extensions enabling users to save custom data related to the resource."
312
+ ).optional()
313
+ })
314
+ ).max(50),
315
+ options: z.object({
316
+ returnEntity: z.boolean().describe(
317
+ "Whether to include the created resources in the response.\n\nDefault: `false`"
318
+ ).optional()
319
+ }).optional()
320
+ });
321
+ var BulkCreateResourcesResponse = z.object({
322
+ results: z.array(
323
+ z.object({
324
+ itemMetadata: z.object({
325
+ _id: z.string().describe(
326
+ "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
327
+ ).regex(
328
+ /^[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}$/,
329
+ "Must be a valid GUID"
330
+ ).optional().nullable(),
331
+ originalIndex: z.number().int().describe(
332
+ "Index of the item within the request array. Allows for correlation between request and response items."
333
+ ).optional(),
334
+ success: z.boolean().describe(
335
+ "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
336
+ ).optional(),
337
+ error: z.object({
338
+ code: z.string().describe("Error code.").optional(),
339
+ description: z.string().describe("Description of the error.").optional(),
340
+ data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
341
+ }).describe("Details about the error in case of failure.").optional()
342
+ }).describe("Item metadata.").optional(),
343
+ item: z.object({
344
+ _id: z.string().describe("Resource ID.").regex(
345
+ /^[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}$/,
346
+ "Must be a valid GUID"
347
+ ).optional().nullable(),
348
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
349
+ "Revision number, which increments by 1 each time the resource is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the resource."
350
+ ).optional().nullable(),
351
+ _createdDate: z.date().describe(
352
+ "Time in `YYYY-MM-DDThh:mm:ss.sssZ` format the resource was created."
353
+ ).optional().nullable(),
354
+ _updatedDate: z.date().describe(
355
+ "Time in `YYYY-MM-DDThh:mm:ss.sssZ` format the resource was last updated."
356
+ ).optional().nullable(),
357
+ name: z.string().describe("Name of the resource.").max(40).min(1).optional().nullable(),
358
+ typeId: z.string().describe(
359
+ "ID of the [resource type](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resource-types-v2/introduction).\n\nOnce a type has been set it can't be modified. You can create a resource\nwithout specifying a type. However, customers can't book such resources."
360
+ ).regex(
361
+ /^[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}$/,
362
+ "Must be a valid GUID"
363
+ ).optional().nullable(),
364
+ workingHoursSchedules: z.object({
365
+ values: z.array(
366
+ z.object({
367
+ scheduleId: z.string().describe(
368
+ "ID of the working hour [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)."
369
+ ).regex(
370
+ /^[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}$/,
371
+ "Must be a valid GUID"
372
+ ).optional().nullable(),
373
+ shared: z.boolean().describe(
374
+ "Whether the schedule is shared by multiple resources or unique for this resource.\n\nDefault: `false`"
375
+ ).optional().nullable()
376
+ })
377
+ ).max(1).optional()
378
+ }).describe(
379
+ "Information about the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)\nspecifying the working hours and locations of the resource.\n\nResources without a working hour schedule are available 24/7 at the locations\nspecified in the field `locationOptions`.\nWhen both `workingHoursSchedules` and `locationOptions` are set,\n`workingHoursSchedules` takes precedence."
380
+ ).optional(),
381
+ locationOptions: z.object({
382
+ availableInAllLocations: z.boolean().describe(
383
+ "Whether the resource is available in all [business locations](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations#location-types).\n\n- `true`: The resource is available in all business locations.\n- `false`: The resource is available only in specific locations.\n\nDefault: `false`"
384
+ ).optional().nullable(),
385
+ specificLocationOptions: z.object({
386
+ availableInBusinessLocations: z.boolean().describe(
387
+ "Whether the resource is available in [business locations](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations#location-types).\n\n- `true`: The resource is available in business locations.\n- `false`: The resource isn't available in business locations.\n\nDefault: `false`"
388
+ ).optional().nullable(),
389
+ businessLocations: z.array(
390
+ z.object({
391
+ locationId: z.string().describe(
392
+ "ID of the business [location](https://dev.wix.com/docs/rest/business-management/locations/introduction)."
393
+ ).regex(
394
+ /^[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}$/,
395
+ "Must be a valid GUID"
396
+ ).optional().nullable()
397
+ })
398
+ ).max(100).optional()
399
+ }).describe(
400
+ "Details of resource availability in specific locations."
401
+ ).optional()
402
+ }).describe(
403
+ "Information about the location where the resource is available."
404
+ ).optional(),
405
+ eventsSchedule: z.object({
406
+ scheduleId: z.string().describe(
407
+ "ID of the event [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)."
408
+ ).regex(
409
+ /^[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}$/,
410
+ "Must be a valid GUID"
411
+ ).optional().nullable()
412
+ }).describe(
413
+ "Schedule containing the [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction)\nfor which the resource has been booked."
414
+ ).optional(),
415
+ appId: z.string().describe(
416
+ 'ID of the app associated with the resource. You can\'t update `appId`.\nResources are displayed in Wix Bookings only if they are associated with the Wix Bookings app ID or have no associated app ID.\nDefault: `13d21c63-b5ec-5912-8397-c3a5ddb27a97` (Wix Bookings app ID)\nFor resources from Wix apps, the following values apply:\n- Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`\n- Wix Services: `"cc552162-24a4-45e0-9695-230c4931ef40"`\n- Wix Meetings: `"6646a75c-2027-4f49-976c-58f3d713ed0f"`\n[Full list of apps created by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).\n<!-- TODO: Uncomment when Platform docs are published - Learn more about [app identity in the Bookings Platform](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings-platform/app-identity-in-the-bookings-platform). -->'
417
+ ).regex(
418
+ /^[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}$/,
419
+ "Must be a valid GUID"
420
+ ).optional().nullable(),
421
+ extendedFields: z.object({
422
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
423
+ "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
424
+ ).optional()
425
+ }).describe(
426
+ "Extensions enabling users to save custom data related to the resource."
427
+ ).optional()
428
+ }).describe("The resulting resource after the bulk operation.").optional()
429
+ })
430
+ ).optional(),
431
+ bulkActionMetadata: z.object({
432
+ totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
433
+ totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
434
+ undetailedFailures: z.number().int().describe(
435
+ "Number of failures without details because detailed failure threshold was exceeded."
436
+ ).optional()
437
+ }).describe("Create statistics.").optional()
438
+ });
439
+ var GetResourceRequest = z.object({
440
+ resourceId: z.string().describe("ID of the resource to retrieve.").regex(
441
+ /^[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}$/,
442
+ "Must be a valid GUID"
443
+ )
444
+ });
445
+ var GetResourceResponse = z.object({
446
+ _id: z.string().describe("Resource ID.").regex(
447
+ /^[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}$/,
448
+ "Must be a valid GUID"
449
+ ).optional().nullable(),
450
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
451
+ "Revision number, which increments by 1 each time the resource is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the resource."
452
+ ).optional().nullable(),
453
+ _createdDate: z.date().describe(
454
+ "Time in `YYYY-MM-DDThh:mm:ss.sssZ` format the resource was created."
455
+ ).optional().nullable(),
456
+ _updatedDate: z.date().describe(
457
+ "Time in `YYYY-MM-DDThh:mm:ss.sssZ` format the resource was last updated."
458
+ ).optional().nullable(),
459
+ name: z.string().describe("Name of the resource.").max(40).min(1).optional().nullable(),
460
+ typeId: z.string().describe(
461
+ "ID of the [resource type](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resource-types-v2/introduction).\n\nOnce a type has been set it can't be modified. You can create a resource\nwithout specifying a type. However, customers can't book such resources."
462
+ ).regex(
463
+ /^[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}$/,
464
+ "Must be a valid GUID"
465
+ ).optional().nullable(),
466
+ workingHoursSchedules: z.object({
467
+ values: z.array(
468
+ z.object({
469
+ scheduleId: z.string().describe(
470
+ "ID of the working hour [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)."
471
+ ).regex(
472
+ /^[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}$/,
473
+ "Must be a valid GUID"
474
+ ).optional().nullable(),
475
+ shared: z.boolean().describe(
476
+ "Whether the schedule is shared by multiple resources or unique for this resource.\n\nDefault: `false`"
477
+ ).optional().nullable()
478
+ })
479
+ ).max(1).optional()
480
+ }).describe(
481
+ "Information about the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)\nspecifying the working hours and locations of the resource.\n\nResources without a working hour schedule are available 24/7 at the locations\nspecified in the field `locationOptions`.\nWhen both `workingHoursSchedules` and `locationOptions` are set,\n`workingHoursSchedules` takes precedence."
482
+ ).optional(),
483
+ locationOptions: z.object({
484
+ availableInAllLocations: z.boolean().describe(
485
+ "Whether the resource is available in all [business locations](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations#location-types).\n\n- `true`: The resource is available in all business locations.\n- `false`: The resource is available only in specific locations.\n\nDefault: `false`"
486
+ ).optional().nullable(),
487
+ specificLocationOptions: z.object({
488
+ availableInBusinessLocations: z.boolean().describe(
489
+ "Whether the resource is available in [business locations](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations#location-types).\n\n- `true`: The resource is available in business locations.\n- `false`: The resource isn't available in business locations.\n\nDefault: `false`"
490
+ ).optional().nullable(),
491
+ businessLocations: z.array(
492
+ z.object({
493
+ locationId: z.string().describe(
494
+ "ID of the business [location](https://dev.wix.com/docs/rest/business-management/locations/introduction)."
495
+ ).regex(
496
+ /^[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}$/,
497
+ "Must be a valid GUID"
498
+ ).optional().nullable()
499
+ })
500
+ ).max(100).optional()
501
+ }).describe("Details of resource availability in specific locations.").optional()
502
+ }).describe("Information about the location where the resource is available.").optional(),
503
+ eventsSchedule: z.object({
504
+ scheduleId: z.string().describe(
505
+ "ID of the event [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)."
506
+ ).regex(
507
+ /^[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}$/,
508
+ "Must be a valid GUID"
509
+ ).optional().nullable()
510
+ }).describe(
511
+ "Schedule containing the [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction)\nfor which the resource has been booked."
512
+ ).optional(),
513
+ appId: z.string().describe(
514
+ 'ID of the app associated with the resource. You can\'t update `appId`.\nResources are displayed in Wix Bookings only if they are associated with the Wix Bookings app ID or have no associated app ID.\nDefault: `13d21c63-b5ec-5912-8397-c3a5ddb27a97` (Wix Bookings app ID)\nFor resources from Wix apps, the following values apply:\n- Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`\n- Wix Services: `"cc552162-24a4-45e0-9695-230c4931ef40"`\n- Wix Meetings: `"6646a75c-2027-4f49-976c-58f3d713ed0f"`\n[Full list of apps created by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).\n<!-- TODO: Uncomment when Platform docs are published - Learn more about [app identity in the Bookings Platform](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings-platform/app-identity-in-the-bookings-platform). -->'
515
+ ).regex(
516
+ /^[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}$/,
517
+ "Must be a valid GUID"
518
+ ).optional().nullable(),
519
+ extendedFields: z.object({
520
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
521
+ "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
522
+ ).optional()
523
+ }).describe(
524
+ "Extensions enabling users to save custom data related to the resource."
525
+ ).optional()
526
+ });
527
+ var UpdateResourceRequest = z.object({
528
+ _id: z.string().describe("Resource ID.").regex(
529
+ /^[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}$/,
530
+ "Must be a valid GUID"
531
+ ),
532
+ resource: z.object({
533
+ _id: z.string().describe("Resource ID.").regex(
534
+ /^[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}$/,
535
+ "Must be a valid GUID"
536
+ ).optional().nullable(),
537
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
538
+ "Revision number, which increments by 1 each time the resource is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the resource."
539
+ ),
540
+ _createdDate: z.date().describe(
541
+ "Time in `YYYY-MM-DDThh:mm:ss.sssZ` format the resource was created."
542
+ ).optional().nullable(),
543
+ _updatedDate: z.date().describe(
544
+ "Time in `YYYY-MM-DDThh:mm:ss.sssZ` format the resource was last updated."
545
+ ).optional().nullable(),
546
+ name: z.string().describe("Name of the resource.").max(40).min(1).optional().nullable(),
547
+ typeId: z.string().describe(
548
+ "ID of the [resource type](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resource-types-v2/introduction).\n\nOnce a type has been set it can't be modified. You can create a resource\nwithout specifying a type. However, customers can't book such resources."
549
+ ).regex(
550
+ /^[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}$/,
551
+ "Must be a valid GUID"
552
+ ).optional().nullable(),
553
+ workingHoursSchedules: z.object({
554
+ values: z.array(
555
+ z.object({
556
+ scheduleId: z.string().describe(
557
+ "ID of the working hour [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)."
558
+ ).regex(
559
+ /^[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}$/,
560
+ "Must be a valid GUID"
561
+ ).optional().nullable(),
562
+ shared: z.boolean().describe(
563
+ "Whether the schedule is shared by multiple resources or unique for this resource.\n\nDefault: `false`"
564
+ ).optional().nullable()
565
+ })
566
+ ).max(1).optional()
567
+ }).describe(
568
+ "Information about the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)\nspecifying the working hours and locations of the resource.\n\nResources without a working hour schedule are available 24/7 at the locations\nspecified in the field `locationOptions`.\nWhen both `workingHoursSchedules` and `locationOptions` are set,\n`workingHoursSchedules` takes precedence."
569
+ ).optional(),
570
+ locationOptions: z.object({
571
+ availableInAllLocations: z.boolean().describe(
572
+ "Whether the resource is available in all [business locations](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations#location-types).\n\n- `true`: The resource is available in all business locations.\n- `false`: The resource is available only in specific locations.\n\nDefault: `false`"
573
+ ).optional().nullable(),
574
+ specificLocationOptions: z.object({
575
+ availableInBusinessLocations: z.boolean().describe(
576
+ "Whether the resource is available in [business locations](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations#location-types).\n\n- `true`: The resource is available in business locations.\n- `false`: The resource isn't available in business locations.\n\nDefault: `false`"
577
+ ).optional().nullable(),
578
+ businessLocations: z.array(
579
+ z.object({
580
+ locationId: z.string().describe(
581
+ "ID of the business [location](https://dev.wix.com/docs/rest/business-management/locations/introduction)."
582
+ ).regex(
583
+ /^[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}$/,
584
+ "Must be a valid GUID"
585
+ ).optional().nullable()
586
+ })
587
+ ).max(100).optional()
588
+ }).describe("Details of resource availability in specific locations.").optional()
589
+ }).describe(
590
+ "Information about the location where the resource is available."
591
+ ).optional(),
592
+ eventsSchedule: z.object({
593
+ scheduleId: z.string().describe(
594
+ "ID of the event [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)."
595
+ ).regex(
596
+ /^[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}$/,
597
+ "Must be a valid GUID"
598
+ ).optional().nullable()
599
+ }).describe(
600
+ "Schedule containing the [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction)\nfor which the resource has been booked."
601
+ ).optional(),
602
+ appId: z.string().describe(
603
+ 'ID of the app associated with the resource. You can\'t update `appId`.\nResources are displayed in Wix Bookings only if they are associated with the Wix Bookings app ID or have no associated app ID.\nDefault: `13d21c63-b5ec-5912-8397-c3a5ddb27a97` (Wix Bookings app ID)\nFor resources from Wix apps, the following values apply:\n- Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`\n- Wix Services: `"cc552162-24a4-45e0-9695-230c4931ef40"`\n- Wix Meetings: `"6646a75c-2027-4f49-976c-58f3d713ed0f"`\n[Full list of apps created by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).\n<!-- TODO: Uncomment when Platform docs are published - Learn more about [app identity in the Bookings Platform](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings-platform/app-identity-in-the-bookings-platform). -->'
604
+ ).regex(
605
+ /^[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}$/,
606
+ "Must be a valid GUID"
607
+ ).optional().nullable(),
608
+ extendedFields: z.object({
609
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
610
+ "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
611
+ ).optional()
612
+ }).describe(
613
+ "Extensions enabling users to save custom data related to the resource."
614
+ ).optional()
615
+ }).describe("Resource to update.")
616
+ });
617
+ var UpdateResourceResponse = z.object({
618
+ _id: z.string().describe("Resource ID.").regex(
619
+ /^[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}$/,
620
+ "Must be a valid GUID"
621
+ ).optional().nullable(),
622
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
623
+ "Revision number, which increments by 1 each time the resource is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the resource."
624
+ ).optional().nullable(),
625
+ _createdDate: z.date().describe(
626
+ "Time in `YYYY-MM-DDThh:mm:ss.sssZ` format the resource was created."
627
+ ).optional().nullable(),
628
+ _updatedDate: z.date().describe(
629
+ "Time in `YYYY-MM-DDThh:mm:ss.sssZ` format the resource was last updated."
630
+ ).optional().nullable(),
631
+ name: z.string().describe("Name of the resource.").max(40).min(1).optional().nullable(),
632
+ typeId: z.string().describe(
633
+ "ID of the [resource type](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resource-types-v2/introduction).\n\nOnce a type has been set it can't be modified. You can create a resource\nwithout specifying a type. However, customers can't book such resources."
634
+ ).regex(
635
+ /^[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}$/,
636
+ "Must be a valid GUID"
637
+ ).optional().nullable(),
638
+ workingHoursSchedules: z.object({
639
+ values: z.array(
640
+ z.object({
641
+ scheduleId: z.string().describe(
642
+ "ID of the working hour [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)."
643
+ ).regex(
644
+ /^[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}$/,
645
+ "Must be a valid GUID"
646
+ ).optional().nullable(),
647
+ shared: z.boolean().describe(
648
+ "Whether the schedule is shared by multiple resources or unique for this resource.\n\nDefault: `false`"
649
+ ).optional().nullable()
650
+ })
651
+ ).max(1).optional()
652
+ }).describe(
653
+ "Information about the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)\nspecifying the working hours and locations of the resource.\n\nResources without a working hour schedule are available 24/7 at the locations\nspecified in the field `locationOptions`.\nWhen both `workingHoursSchedules` and `locationOptions` are set,\n`workingHoursSchedules` takes precedence."
654
+ ).optional(),
655
+ locationOptions: z.object({
656
+ availableInAllLocations: z.boolean().describe(
657
+ "Whether the resource is available in all [business locations](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations#location-types).\n\n- `true`: The resource is available in all business locations.\n- `false`: The resource is available only in specific locations.\n\nDefault: `false`"
658
+ ).optional().nullable(),
659
+ specificLocationOptions: z.object({
660
+ availableInBusinessLocations: z.boolean().describe(
661
+ "Whether the resource is available in [business locations](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations#location-types).\n\n- `true`: The resource is available in business locations.\n- `false`: The resource isn't available in business locations.\n\nDefault: `false`"
662
+ ).optional().nullable(),
663
+ businessLocations: z.array(
664
+ z.object({
665
+ locationId: z.string().describe(
666
+ "ID of the business [location](https://dev.wix.com/docs/rest/business-management/locations/introduction)."
667
+ ).regex(
668
+ /^[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}$/,
669
+ "Must be a valid GUID"
670
+ ).optional().nullable()
671
+ })
672
+ ).max(100).optional()
673
+ }).describe("Details of resource availability in specific locations.").optional()
674
+ }).describe("Information about the location where the resource is available.").optional(),
675
+ eventsSchedule: z.object({
676
+ scheduleId: z.string().describe(
677
+ "ID of the event [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)."
678
+ ).regex(
679
+ /^[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}$/,
680
+ "Must be a valid GUID"
681
+ ).optional().nullable()
682
+ }).describe(
683
+ "Schedule containing the [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction)\nfor which the resource has been booked."
684
+ ).optional(),
685
+ appId: z.string().describe(
686
+ 'ID of the app associated with the resource. You can\'t update `appId`.\nResources are displayed in Wix Bookings only if they are associated with the Wix Bookings app ID or have no associated app ID.\nDefault: `13d21c63-b5ec-5912-8397-c3a5ddb27a97` (Wix Bookings app ID)\nFor resources from Wix apps, the following values apply:\n- Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`\n- Wix Services: `"cc552162-24a4-45e0-9695-230c4931ef40"`\n- Wix Meetings: `"6646a75c-2027-4f49-976c-58f3d713ed0f"`\n[Full list of apps created by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).\n<!-- TODO: Uncomment when Platform docs are published - Learn more about [app identity in the Bookings Platform](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings-platform/app-identity-in-the-bookings-platform). -->'
687
+ ).regex(
688
+ /^[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}$/,
689
+ "Must be a valid GUID"
690
+ ).optional().nullable(),
691
+ extendedFields: z.object({
692
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
693
+ "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
694
+ ).optional()
695
+ }).describe(
696
+ "Extensions enabling users to save custom data related to the resource."
697
+ ).optional()
698
+ });
699
+ var BulkUpdateResourcesRequest = z.object({
700
+ resources: z.array(
701
+ z.object({
702
+ resource: z.object({
703
+ _id: z.string().describe("Resource ID.").regex(
704
+ /^[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}$/,
705
+ "Must be a valid GUID"
706
+ ),
707
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
708
+ "Revision number, which increments by 1 each time the resource is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the resource."
709
+ ),
710
+ _createdDate: z.date().describe(
711
+ "Time in `YYYY-MM-DDThh:mm:ss.sssZ` format the resource was created."
712
+ ).optional().nullable(),
713
+ _updatedDate: z.date().describe(
714
+ "Time in `YYYY-MM-DDThh:mm:ss.sssZ` format the resource was last updated."
715
+ ).optional().nullable(),
716
+ name: z.string().describe("Name of the resource.").max(40).min(1).optional().nullable(),
717
+ typeId: z.string().describe(
718
+ "ID of the [resource type](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resource-types-v2/introduction).\n\nOnce a type has been set it can't be modified. You can create a resource\nwithout specifying a type. However, customers can't book such resources."
719
+ ).regex(
720
+ /^[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}$/,
721
+ "Must be a valid GUID"
722
+ ).optional().nullable(),
723
+ workingHoursSchedules: z.object({
724
+ values: z.array(
725
+ z.object({
726
+ scheduleId: z.string().describe(
727
+ "ID of the working hour [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)."
728
+ ).regex(
729
+ /^[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}$/,
730
+ "Must be a valid GUID"
731
+ ).optional().nullable(),
732
+ shared: z.boolean().describe(
733
+ "Whether the schedule is shared by multiple resources or unique for this resource.\n\nDefault: `false`"
734
+ ).optional().nullable()
735
+ })
736
+ ).max(1).optional()
737
+ }).describe(
738
+ "Information about the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)\nspecifying the working hours and locations of the resource.\n\nResources without a working hour schedule are available 24/7 at the locations\nspecified in the field `locationOptions`.\nWhen both `workingHoursSchedules` and `locationOptions` are set,\n`workingHoursSchedules` takes precedence."
739
+ ).optional(),
740
+ locationOptions: z.object({
741
+ availableInAllLocations: z.boolean().describe(
742
+ "Whether the resource is available in all [business locations](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations#location-types).\n\n- `true`: The resource is available in all business locations.\n- `false`: The resource is available only in specific locations.\n\nDefault: `false`"
743
+ ).optional().nullable(),
744
+ specificLocationOptions: z.object({
745
+ availableInBusinessLocations: z.boolean().describe(
746
+ "Whether the resource is available in [business locations](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations#location-types).\n\n- `true`: The resource is available in business locations.\n- `false`: The resource isn't available in business locations.\n\nDefault: `false`"
747
+ ).optional().nullable(),
748
+ businessLocations: z.array(
749
+ z.object({
750
+ locationId: z.string().describe(
751
+ "ID of the business [location](https://dev.wix.com/docs/rest/business-management/locations/introduction)."
752
+ ).regex(
753
+ /^[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}$/,
754
+ "Must be a valid GUID"
755
+ ).optional().nullable()
756
+ })
757
+ ).max(100).optional()
758
+ }).describe(
759
+ "Details of resource availability in specific locations."
760
+ ).optional()
761
+ }).describe(
762
+ "Information about the location where the resource is available."
763
+ ).optional(),
764
+ eventsSchedule: z.object({
765
+ scheduleId: z.string().describe(
766
+ "ID of the event [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)."
767
+ ).regex(
768
+ /^[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}$/,
769
+ "Must be a valid GUID"
770
+ ).optional().nullable()
771
+ }).describe(
772
+ "Schedule containing the [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction)\nfor which the resource has been booked."
773
+ ).optional(),
774
+ appId: z.string().describe(
775
+ 'ID of the app associated with the resource. You can\'t update `appId`.\nResources are displayed in Wix Bookings only if they are associated with the Wix Bookings app ID or have no associated app ID.\nDefault: `13d21c63-b5ec-5912-8397-c3a5ddb27a97` (Wix Bookings app ID)\nFor resources from Wix apps, the following values apply:\n- Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`\n- Wix Services: `"cc552162-24a4-45e0-9695-230c4931ef40"`\n- Wix Meetings: `"6646a75c-2027-4f49-976c-58f3d713ed0f"`\n[Full list of apps created by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).\n<!-- TODO: Uncomment when Platform docs are published - Learn more about [app identity in the Bookings Platform](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings-platform/app-identity-in-the-bookings-platform). -->'
776
+ ).regex(
777
+ /^[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}$/,
778
+ "Must be a valid GUID"
779
+ ).optional().nullable(),
780
+ extendedFields: z.object({
781
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
782
+ "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
783
+ ).optional()
784
+ }).describe(
785
+ "Extensions enabling users to save custom data related to the resource."
786
+ ).optional()
787
+ }).describe("Resource to update.").optional(),
788
+ fieldMask: z.array(z.string()).optional()
789
+ })
790
+ ).min(1).max(100),
791
+ options: z.object({
792
+ returnEntity: z.boolean().describe(
793
+ "Whether to include the updated resources in the response.\n\nDefault: `false`"
794
+ ).optional()
795
+ }).optional()
796
+ });
797
+ var BulkUpdateResourcesResponse = z.object({
798
+ results: z.array(
799
+ z.object({
800
+ itemMetadata: z.object({
801
+ _id: z.string().describe(
802
+ "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
803
+ ).regex(
804
+ /^[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}$/,
805
+ "Must be a valid GUID"
806
+ ).optional().nullable(),
807
+ originalIndex: z.number().int().describe(
808
+ "Index of the item within the request array. Allows for correlation between request and response items."
809
+ ).optional(),
810
+ success: z.boolean().describe(
811
+ "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
812
+ ).optional(),
813
+ error: z.object({
814
+ code: z.string().describe("Error code.").optional(),
815
+ description: z.string().describe("Description of the error.").optional(),
816
+ data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
817
+ }).describe("Details about the error in case of failure.").optional()
818
+ }).describe("Item metadata.").optional(),
819
+ item: z.object({
820
+ _id: z.string().describe("Resource ID.").regex(
821
+ /^[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}$/,
822
+ "Must be a valid GUID"
823
+ ).optional().nullable(),
824
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
825
+ "Revision number, which increments by 1 each time the resource is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the resource."
826
+ ).optional().nullable(),
827
+ _createdDate: z.date().describe(
828
+ "Time in `YYYY-MM-DDThh:mm:ss.sssZ` format the resource was created."
829
+ ).optional().nullable(),
830
+ _updatedDate: z.date().describe(
831
+ "Time in `YYYY-MM-DDThh:mm:ss.sssZ` format the resource was last updated."
832
+ ).optional().nullable(),
833
+ name: z.string().describe("Name of the resource.").max(40).min(1).optional().nullable(),
834
+ typeId: z.string().describe(
835
+ "ID of the [resource type](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resource-types-v2/introduction).\n\nOnce a type has been set it can't be modified. You can create a resource\nwithout specifying a type. However, customers can't book such resources."
836
+ ).regex(
837
+ /^[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}$/,
838
+ "Must be a valid GUID"
839
+ ).optional().nullable(),
840
+ workingHoursSchedules: z.object({
841
+ values: z.array(
842
+ z.object({
843
+ scheduleId: z.string().describe(
844
+ "ID of the working hour [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)."
845
+ ).regex(
846
+ /^[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}$/,
847
+ "Must be a valid GUID"
848
+ ).optional().nullable(),
849
+ shared: z.boolean().describe(
850
+ "Whether the schedule is shared by multiple resources or unique for this resource.\n\nDefault: `false`"
851
+ ).optional().nullable()
852
+ })
853
+ ).max(1).optional()
854
+ }).describe(
855
+ "Information about the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)\nspecifying the working hours and locations of the resource.\n\nResources without a working hour schedule are available 24/7 at the locations\nspecified in the field `locationOptions`.\nWhen both `workingHoursSchedules` and `locationOptions` are set,\n`workingHoursSchedules` takes precedence."
856
+ ).optional(),
857
+ locationOptions: z.object({
858
+ availableInAllLocations: z.boolean().describe(
859
+ "Whether the resource is available in all [business locations](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations#location-types).\n\n- `true`: The resource is available in all business locations.\n- `false`: The resource is available only in specific locations.\n\nDefault: `false`"
860
+ ).optional().nullable(),
861
+ specificLocationOptions: z.object({
862
+ availableInBusinessLocations: z.boolean().describe(
863
+ "Whether the resource is available in [business locations](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations#location-types).\n\n- `true`: The resource is available in business locations.\n- `false`: The resource isn't available in business locations.\n\nDefault: `false`"
864
+ ).optional().nullable(),
865
+ businessLocations: z.array(
866
+ z.object({
867
+ locationId: z.string().describe(
868
+ "ID of the business [location](https://dev.wix.com/docs/rest/business-management/locations/introduction)."
869
+ ).regex(
870
+ /^[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}$/,
871
+ "Must be a valid GUID"
872
+ ).optional().nullable()
873
+ })
874
+ ).max(100).optional()
875
+ }).describe(
876
+ "Details of resource availability in specific locations."
877
+ ).optional()
878
+ }).describe(
879
+ "Information about the location where the resource is available."
880
+ ).optional(),
881
+ eventsSchedule: z.object({
882
+ scheduleId: z.string().describe(
883
+ "ID of the event [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)."
884
+ ).regex(
885
+ /^[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}$/,
886
+ "Must be a valid GUID"
887
+ ).optional().nullable()
888
+ }).describe(
889
+ "Schedule containing the [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction)\nfor which the resource has been booked."
890
+ ).optional(),
891
+ appId: z.string().describe(
892
+ 'ID of the app associated with the resource. You can\'t update `appId`.\nResources are displayed in Wix Bookings only if they are associated with the Wix Bookings app ID or have no associated app ID.\nDefault: `13d21c63-b5ec-5912-8397-c3a5ddb27a97` (Wix Bookings app ID)\nFor resources from Wix apps, the following values apply:\n- Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`\n- Wix Services: `"cc552162-24a4-45e0-9695-230c4931ef40"`\n- Wix Meetings: `"6646a75c-2027-4f49-976c-58f3d713ed0f"`\n[Full list of apps created by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).\n<!-- TODO: Uncomment when Platform docs are published - Learn more about [app identity in the Bookings Platform](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings-platform/app-identity-in-the-bookings-platform). -->'
893
+ ).regex(
894
+ /^[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}$/,
895
+ "Must be a valid GUID"
896
+ ).optional().nullable(),
897
+ extendedFields: z.object({
898
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
899
+ "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
900
+ ).optional()
901
+ }).describe(
902
+ "Extensions enabling users to save custom data related to the resource."
903
+ ).optional()
904
+ }).describe("The resulting resource after the bulk operation.").optional()
905
+ })
906
+ ).optional(),
907
+ bulkActionMetadata: z.object({
908
+ totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
909
+ totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
910
+ undetailedFailures: z.number().int().describe(
911
+ "Number of failures without details because detailed failure threshold was exceeded."
912
+ ).optional()
913
+ }).describe("Update statistics.").optional()
914
+ });
915
+ var DeleteResourceRequest = z.object({
916
+ resourceId: z.string().describe("ID of the resource to delete.").regex(
917
+ /^[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}$/,
918
+ "Must be a valid GUID"
919
+ )
920
+ });
921
+ var DeleteResourceResponse = z.object({});
922
+ var BulkDeleteResourcesRequest = z.object({
923
+ ids: z.array(z.string()).max(50)
924
+ });
925
+ var BulkDeleteResourcesResponse = z.object({
926
+ results: z.array(
927
+ z.object({
928
+ itemMetadata: z.object({
929
+ _id: z.string().describe(
930
+ "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
931
+ ).regex(
932
+ /^[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}$/,
933
+ "Must be a valid GUID"
934
+ ).optional().nullable(),
935
+ originalIndex: z.number().int().describe(
936
+ "Index of the item within the request array. Allows for correlation between request and response items."
937
+ ).optional(),
938
+ success: z.boolean().describe(
939
+ "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
940
+ ).optional(),
941
+ error: z.object({
942
+ code: z.string().describe("Error code.").optional(),
943
+ description: z.string().describe("Description of the error.").optional(),
944
+ data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
945
+ }).describe("Details about the error in case of failure.").optional()
946
+ }).describe("Item metadata.").optional(),
947
+ item: z.object({
948
+ _id: z.string().describe("Resource ID.").regex(
949
+ /^[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}$/,
950
+ "Must be a valid GUID"
951
+ ).optional().nullable(),
952
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
953
+ "Revision number, which increments by 1 each time the resource is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the resource."
954
+ ).optional().nullable(),
955
+ _createdDate: z.date().describe(
956
+ "Time in `YYYY-MM-DDThh:mm:ss.sssZ` format the resource was created."
957
+ ).optional().nullable(),
958
+ _updatedDate: z.date().describe(
959
+ "Time in `YYYY-MM-DDThh:mm:ss.sssZ` format the resource was last updated."
960
+ ).optional().nullable(),
961
+ name: z.string().describe("Name of the resource.").max(40).min(1).optional().nullable(),
962
+ typeId: z.string().describe(
963
+ "ID of the [resource type](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resource-types-v2/introduction).\n\nOnce a type has been set it can't be modified. You can create a resource\nwithout specifying a type. However, customers can't book such resources."
964
+ ).regex(
965
+ /^[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}$/,
966
+ "Must be a valid GUID"
967
+ ).optional().nullable(),
968
+ workingHoursSchedules: z.object({
969
+ values: z.array(
970
+ z.object({
971
+ scheduleId: z.string().describe(
972
+ "ID of the working hour [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)."
973
+ ).regex(
974
+ /^[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}$/,
975
+ "Must be a valid GUID"
976
+ ).optional().nullable(),
977
+ shared: z.boolean().describe(
978
+ "Whether the schedule is shared by multiple resources or unique for this resource.\n\nDefault: `false`"
979
+ ).optional().nullable()
980
+ })
981
+ ).max(1).optional()
982
+ }).describe(
983
+ "Information about the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)\nspecifying the working hours and locations of the resource.\n\nResources without a working hour schedule are available 24/7 at the locations\nspecified in the field `locationOptions`.\nWhen both `workingHoursSchedules` and `locationOptions` are set,\n`workingHoursSchedules` takes precedence."
984
+ ).optional(),
985
+ locationOptions: z.object({
986
+ availableInAllLocations: z.boolean().describe(
987
+ "Whether the resource is available in all [business locations](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations#location-types).\n\n- `true`: The resource is available in all business locations.\n- `false`: The resource is available only in specific locations.\n\nDefault: `false`"
988
+ ).optional().nullable(),
989
+ specificLocationOptions: z.object({
990
+ availableInBusinessLocations: z.boolean().describe(
991
+ "Whether the resource is available in [business locations](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations#location-types).\n\n- `true`: The resource is available in business locations.\n- `false`: The resource isn't available in business locations.\n\nDefault: `false`"
992
+ ).optional().nullable(),
993
+ businessLocations: z.array(
994
+ z.object({
995
+ locationId: z.string().describe(
996
+ "ID of the business [location](https://dev.wix.com/docs/rest/business-management/locations/introduction)."
997
+ ).regex(
998
+ /^[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}$/,
999
+ "Must be a valid GUID"
1000
+ ).optional().nullable()
1001
+ })
1002
+ ).max(100).optional()
1003
+ }).describe(
1004
+ "Details of resource availability in specific locations."
1005
+ ).optional()
1006
+ }).describe(
1007
+ "Information about the location where the resource is available."
1008
+ ).optional(),
1009
+ eventsSchedule: z.object({
1010
+ scheduleId: z.string().describe(
1011
+ "ID of the event [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)."
1012
+ ).regex(
1013
+ /^[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}$/,
1014
+ "Must be a valid GUID"
1015
+ ).optional().nullable()
1016
+ }).describe(
1017
+ "Schedule containing the [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction)\nfor which the resource has been booked."
1018
+ ).optional(),
1019
+ appId: z.string().describe(
1020
+ 'ID of the app associated with the resource. You can\'t update `appId`.\nResources are displayed in Wix Bookings only if they are associated with the Wix Bookings app ID or have no associated app ID.\nDefault: `13d21c63-b5ec-5912-8397-c3a5ddb27a97` (Wix Bookings app ID)\nFor resources from Wix apps, the following values apply:\n- Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`\n- Wix Services: `"cc552162-24a4-45e0-9695-230c4931ef40"`\n- Wix Meetings: `"6646a75c-2027-4f49-976c-58f3d713ed0f"`\n[Full list of apps created by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).\n<!-- TODO: Uncomment when Platform docs are published - Learn more about [app identity in the Bookings Platform](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings-platform/app-identity-in-the-bookings-platform). -->'
1021
+ ).regex(
1022
+ /^[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}$/,
1023
+ "Must be a valid GUID"
1024
+ ).optional().nullable(),
1025
+ extendedFields: z.object({
1026
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
1027
+ "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
1028
+ ).optional()
1029
+ }).describe(
1030
+ "Extensions enabling users to save custom data related to the resource."
1031
+ ).optional()
1032
+ }).describe("The resulting resource after the bulk operation.").optional()
1033
+ })
1034
+ ).optional(),
1035
+ bulkActionMetadata: z.object({
1036
+ totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
1037
+ totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
1038
+ undetailedFailures: z.number().int().describe(
1039
+ "Number of failures without details because detailed failure threshold was exceeded."
1040
+ ).optional()
1041
+ }).describe("Delete statistics.").optional()
1042
+ });
1043
+ var SearchResourcesRequest = z.object({
1044
+ search: z.object({
1045
+ filter: z.object({
1046
+ _id: z.object({
1047
+ $eq: z.string(),
1048
+ $exists: z.boolean(),
1049
+ $gt: z.string(),
1050
+ $gte: z.string(),
1051
+ $hasAll: z.array(z.string()),
1052
+ $hasSome: z.array(z.string()),
1053
+ $in: z.array(z.string()),
1054
+ $lt: z.string(),
1055
+ $lte: z.string(),
1056
+ $ne: z.string(),
1057
+ $nin: z.array(z.string()),
1058
+ $startsWith: z.string()
1059
+ }).partial().strict().optional(),
1060
+ name: z.object({
1061
+ $eq: z.string(),
1062
+ $exists: z.boolean(),
1063
+ $gt: z.string(),
1064
+ $gte: z.string(),
1065
+ $hasAll: z.array(z.string()),
1066
+ $hasSome: z.array(z.string()),
1067
+ $in: z.array(z.string()),
1068
+ $lt: z.string(),
1069
+ $lte: z.string(),
1070
+ $ne: z.string(),
1071
+ $nin: z.array(z.string()),
1072
+ $startsWith: z.string()
1073
+ }).partial().strict().optional(),
1074
+ appId: z.object({
1075
+ $eq: z.string(),
1076
+ $exists: z.boolean(),
1077
+ $gt: z.string(),
1078
+ $gte: z.string(),
1079
+ $hasAll: z.array(z.string()),
1080
+ $hasSome: z.array(z.string()),
1081
+ $in: z.array(z.string()),
1082
+ $lt: z.string(),
1083
+ $lte: z.string(),
1084
+ $ne: z.string(),
1085
+ $nin: z.array(z.string()),
1086
+ $startsWith: z.string()
1087
+ }).partial().strict().optional(),
1088
+ _createdDate: z.object({
1089
+ $eq: z.string(),
1090
+ $exists: z.boolean(),
1091
+ $gt: z.string(),
1092
+ $gte: z.string(),
1093
+ $hasAll: z.array(z.string()),
1094
+ $hasSome: z.array(z.string()),
1095
+ $in: z.array(z.string()),
1096
+ $lt: z.string(),
1097
+ $lte: z.string(),
1098
+ $ne: z.string(),
1099
+ $nin: z.array(z.string()),
1100
+ $startsWith: z.string()
1101
+ }).partial().strict().optional(),
1102
+ _updatedDate: z.object({
1103
+ $eq: z.string(),
1104
+ $exists: z.boolean(),
1105
+ $gt: z.string(),
1106
+ $gte: z.string(),
1107
+ $hasAll: z.array(z.string()),
1108
+ $hasSome: z.array(z.string()),
1109
+ $in: z.array(z.string()),
1110
+ $lt: z.string(),
1111
+ $lte: z.string(),
1112
+ $ne: z.string(),
1113
+ $nin: z.array(z.string()),
1114
+ $startsWith: z.string()
1115
+ }).partial().strict().optional(),
1116
+ "singleResource.locationOptions.availableInAllLocations": z.object({
1117
+ $eq: z.any(),
1118
+ $exists: z.boolean(),
1119
+ $gt: z.any(),
1120
+ $gte: z.any(),
1121
+ $hasAll: z.array(z.any()),
1122
+ $hasSome: z.array(z.any()),
1123
+ $in: z.array(z.any()),
1124
+ $lt: z.any(),
1125
+ $lte: z.any(),
1126
+ $ne: z.any(),
1127
+ $nin: z.array(z.any()),
1128
+ $startsWith: z.string()
1129
+ }).partial().strict().optional(),
1130
+ "singleResource.locationOptions.specificLocationOptions.availableInBusinessLocations": z.object({
1131
+ $eq: z.any(),
1132
+ $exists: z.boolean(),
1133
+ $gt: z.any(),
1134
+ $gte: z.any(),
1135
+ $hasAll: z.array(z.any()),
1136
+ $hasSome: z.array(z.any()),
1137
+ $in: z.array(z.any()),
1138
+ $lt: z.any(),
1139
+ $lte: z.any(),
1140
+ $ne: z.any(),
1141
+ $nin: z.array(z.any()),
1142
+ $startsWith: z.string()
1143
+ }).partial().strict().optional(),
1144
+ "singleResource.locationOptions.specificLocationOptions.businessLocations.locationId": z.object({
1145
+ $eq: z.any(),
1146
+ $exists: z.boolean(),
1147
+ $gt: z.any(),
1148
+ $gte: z.any(),
1149
+ $hasAll: z.array(z.any()),
1150
+ $hasSome: z.array(z.any()),
1151
+ $in: z.array(z.any()),
1152
+ $lt: z.any(),
1153
+ $lte: z.any(),
1154
+ $ne: z.any(),
1155
+ $nin: z.array(z.any()),
1156
+ $startsWith: z.string()
1157
+ }).partial().strict().optional(),
1158
+ $and: z.array(z.any()).optional(),
1159
+ $or: z.array(z.any()).optional(),
1160
+ $not: z.any().optional()
1161
+ }).strict().optional(),
1162
+ sort: z.array(
1163
+ z.object({
1164
+ fieldName: z.enum([
1165
+ "_id",
1166
+ "name",
1167
+ "appId",
1168
+ "_createdDate",
1169
+ "_updatedDate",
1170
+ "singleResource.locationOptions.availableInAllLocations",
1171
+ "singleResource.locationOptions.specificLocationOptions.availableInBusinessLocations",
1172
+ "singleResource.locationOptions.specificLocationOptions.businessLocations.locationId"
1173
+ ]).optional(),
1174
+ order: z.enum(["ASC", "DESC"]).optional()
1175
+ })
1176
+ ).optional()
1177
+ }).catchall(z.any()).describe(
1178
+ "Search criteria including filter, sort, aggregations, and paging options."
1179
+ )
1180
+ });
1181
+ var SearchResourcesResponse = z.object({
1182
+ resources: z.array(
1183
+ z.object({
1184
+ _id: z.string().describe("Resource ID.").regex(
1185
+ /^[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}$/,
1186
+ "Must be a valid GUID"
1187
+ ).optional().nullable(),
1188
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1189
+ "Revision number, which increments by 1 each time the resource is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the resource."
1190
+ ).optional().nullable(),
1191
+ _createdDate: z.date().describe(
1192
+ "Time in `YYYY-MM-DDThh:mm:ss.sssZ` format the resource was created."
1193
+ ).optional().nullable(),
1194
+ _updatedDate: z.date().describe(
1195
+ "Time in `YYYY-MM-DDThh:mm:ss.sssZ` format the resource was last updated."
1196
+ ).optional().nullable(),
1197
+ name: z.string().describe("Name of the resource.").max(40).min(1).optional().nullable(),
1198
+ typeId: z.string().describe(
1199
+ "ID of the [resource type](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resource-types-v2/introduction).\n\nOnce a type has been set it can't be modified. You can create a resource\nwithout specifying a type. However, customers can't book such resources."
1200
+ ).regex(
1201
+ /^[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}$/,
1202
+ "Must be a valid GUID"
1203
+ ).optional().nullable(),
1204
+ workingHoursSchedules: z.object({
1205
+ values: z.array(
1206
+ z.object({
1207
+ scheduleId: z.string().describe(
1208
+ "ID of the working hour [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)."
1209
+ ).regex(
1210
+ /^[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}$/,
1211
+ "Must be a valid GUID"
1212
+ ).optional().nullable(),
1213
+ shared: z.boolean().describe(
1214
+ "Whether the schedule is shared by multiple resources or unique for this resource.\n\nDefault: `false`"
1215
+ ).optional().nullable()
1216
+ })
1217
+ ).max(1).optional()
1218
+ }).describe(
1219
+ "Information about the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)\nspecifying the working hours and locations of the resource.\n\nResources without a working hour schedule are available 24/7 at the locations\nspecified in the field `locationOptions`.\nWhen both `workingHoursSchedules` and `locationOptions` are set,\n`workingHoursSchedules` takes precedence."
1220
+ ).optional(),
1221
+ locationOptions: z.object({
1222
+ availableInAllLocations: z.boolean().describe(
1223
+ "Whether the resource is available in all [business locations](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations#location-types).\n\n- `true`: The resource is available in all business locations.\n- `false`: The resource is available only in specific locations.\n\nDefault: `false`"
1224
+ ).optional().nullable(),
1225
+ specificLocationOptions: z.object({
1226
+ availableInBusinessLocations: z.boolean().describe(
1227
+ "Whether the resource is available in [business locations](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations#location-types).\n\n- `true`: The resource is available in business locations.\n- `false`: The resource isn't available in business locations.\n\nDefault: `false`"
1228
+ ).optional().nullable(),
1229
+ businessLocations: z.array(
1230
+ z.object({
1231
+ locationId: z.string().describe(
1232
+ "ID of the business [location](https://dev.wix.com/docs/rest/business-management/locations/introduction)."
1233
+ ).regex(
1234
+ /^[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}$/,
1235
+ "Must be a valid GUID"
1236
+ ).optional().nullable()
1237
+ })
1238
+ ).max(100).optional()
1239
+ }).describe(
1240
+ "Details of resource availability in specific locations."
1241
+ ).optional()
1242
+ }).describe(
1243
+ "Information about the location where the resource is available."
1244
+ ).optional(),
1245
+ eventsSchedule: z.object({
1246
+ scheduleId: z.string().describe(
1247
+ "ID of the event [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)."
1248
+ ).regex(
1249
+ /^[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}$/,
1250
+ "Must be a valid GUID"
1251
+ ).optional().nullable()
1252
+ }).describe(
1253
+ "Schedule containing the [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction)\nfor which the resource has been booked."
1254
+ ).optional(),
1255
+ appId: z.string().describe(
1256
+ 'ID of the app associated with the resource. You can\'t update `appId`.\nResources are displayed in Wix Bookings only if they are associated with the Wix Bookings app ID or have no associated app ID.\nDefault: `13d21c63-b5ec-5912-8397-c3a5ddb27a97` (Wix Bookings app ID)\nFor resources from Wix apps, the following values apply:\n- Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`\n- Wix Services: `"cc552162-24a4-45e0-9695-230c4931ef40"`\n- Wix Meetings: `"6646a75c-2027-4f49-976c-58f3d713ed0f"`\n[Full list of apps created by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).\n<!-- TODO: Uncomment when Platform docs are published - Learn more about [app identity in the Bookings Platform](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings-platform/app-identity-in-the-bookings-platform). -->'
1257
+ ).regex(
1258
+ /^[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}$/,
1259
+ "Must be a valid GUID"
1260
+ ).optional().nullable(),
1261
+ extendedFields: z.object({
1262
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
1263
+ "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
1264
+ ).optional()
1265
+ }).describe(
1266
+ "Extensions enabling users to save custom data related to the resource."
1267
+ ).optional()
1268
+ })
1269
+ ).optional(),
1270
+ pagingMetadata: z.object({
1271
+ count: z.number().int().describe(
1272
+ "Number of items returned in the current response page.\n\nThis count reflects the actual number of items in the current result set,\nwhich may be less than the requested limit if fewer items are available."
1273
+ ).optional().nullable(),
1274
+ cursors: z.object({
1275
+ next: z.string().describe(
1276
+ "Cursor token for retrieving the next page of results.\n\nUse this token in subsequent requests to continue pagination forward.\nValue is `null` when on the last page of results."
1277
+ ).max(16e3).optional().nullable(),
1278
+ prev: z.string().describe(
1279
+ "Cursor token for retrieving the previous page of results.\n\nUse this token to navigate backwards through result pages.\nValue is `null` when on the first page of results."
1280
+ ).max(16e3).optional().nullable()
1281
+ }).describe(
1282
+ "Navigation cursors for moving between result pages.\n\nContains `next` and `prev` cursor tokens for pagination. Use the `next` cursor\nto retrieve subsequent pages and `prev` cursor to go back to previous pages.\nLearn more about cursor paging in the [API Query Language guide](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_cursor-paging)."
1283
+ ).optional(),
1284
+ hasNext: z.boolean().describe(
1285
+ "Indicates whether additional results are available beyond the current page.\n\n- `true`: More results exist and can be retrieved using the `next` cursor.\n- `false`: This is the final page of results."
1286
+ ).optional().nullable()
1287
+ }).describe(
1288
+ "Cursor-based paging metadata for navigating through search results.\n\nContains navigation information including the current page cursor, whether additional\nresults are available, and result counts. Use the `next` cursor to fetch subsequent pages."
1289
+ ).optional(),
1290
+ aggregationData: z.object({
1291
+ results: z.array(
1292
+ z.intersection(
1293
+ z.object({
1294
+ name: z.string().describe(
1295
+ "User-defined name of aggregation as derived from search request."
1296
+ ).max(100).optional(),
1297
+ type: z.enum(["VALUE", "RANGE", "SCALAR", "DATE_HISTOGRAM", "NESTED"]).describe(
1298
+ "Type of aggregation that must match specified kind as derived from search request."
1299
+ ).optional(),
1300
+ fieldPath: z.string().describe(
1301
+ "Path to the field to aggregate by in dot notation. For example `name` or `locationOptions.businessLocations.locationId`."
1302
+ ).max(200).optional()
1303
+ }),
1304
+ z.xor([
1305
+ z.object({
1306
+ values: z.never().optional(),
1307
+ ranges: z.never().optional(),
1308
+ scalar: z.never().optional(),
1309
+ groupedByValue: z.never().optional(),
1310
+ dateHistogram: z.never().optional(),
1311
+ nested: z.never().optional()
1312
+ }),
1313
+ z.object({
1314
+ ranges: z.never().optional(),
1315
+ scalar: z.never().optional(),
1316
+ groupedByValue: z.never().optional(),
1317
+ dateHistogram: z.never().optional(),
1318
+ nested: z.never().optional(),
1319
+ values: z.object({
1320
+ results: z.array(
1321
+ z.object({
1322
+ value: z.string().describe("Value of the field.").max(100).optional(),
1323
+ count: z.number().int().describe("Count of entities with this value.").optional()
1324
+ })
1325
+ ).max(250).optional()
1326
+ }).describe("Value aggregation results.")
1327
+ }),
1328
+ z.object({
1329
+ values: z.never().optional(),
1330
+ scalar: z.never().optional(),
1331
+ groupedByValue: z.never().optional(),
1332
+ dateHistogram: z.never().optional(),
1333
+ nested: z.never().optional(),
1334
+ ranges: z.object({
1335
+ results: z.array(
1336
+ z.object({
1337
+ from: z.number().describe("Inclusive lower bound of the range.").optional().nullable(),
1338
+ to: z.number().describe("Exclusive upper bound of the range.").optional().nullable(),
1339
+ count: z.number().int().describe("Count of entities in this range.").optional()
1340
+ })
1341
+ ).max(50).optional()
1342
+ }).describe("Range aggregation results.")
1343
+ }),
1344
+ z.object({
1345
+ values: z.never().optional(),
1346
+ ranges: z.never().optional(),
1347
+ groupedByValue: z.never().optional(),
1348
+ dateHistogram: z.never().optional(),
1349
+ nested: z.never().optional(),
1350
+ scalar: z.object({
1351
+ type: z.enum(["COUNT_DISTINCT", "MIN", "MAX"]).describe("Type of scalar aggregation.").optional(),
1352
+ value: z.number().describe("Value of the scalar aggregation.").optional()
1353
+ }).describe("Scalar aggregation results.")
1354
+ }),
1355
+ z.object({
1356
+ values: z.never().optional(),
1357
+ ranges: z.never().optional(),
1358
+ scalar: z.never().optional(),
1359
+ dateHistogram: z.never().optional(),
1360
+ nested: z.never().optional(),
1361
+ groupedByValue: z.object({
1362
+ results: z.array(
1363
+ z.object({
1364
+ value: z.string().describe("Value of the field.").max(1e3).optional(),
1365
+ nestedResults: z.intersection(
1366
+ z.object({
1367
+ name: z.string().describe(
1368
+ "User-defined name of aggregation, matches the one specified in request."
1369
+ ).max(100).optional(),
1370
+ type: z.enum([
1371
+ "VALUE",
1372
+ "RANGE",
1373
+ "SCALAR",
1374
+ "DATE_HISTOGRAM",
1375
+ "NESTED"
1376
+ ]).describe(
1377
+ "Type of aggregation that matches result."
1378
+ ).optional(),
1379
+ fieldPath: z.string().describe(
1380
+ "Path to the field to aggregate by in dot notation. For example `name` or `locationOptions.businessLocations.locationId`."
1381
+ ).max(200).optional()
1382
+ }),
1383
+ z.xor([
1384
+ z.object({
1385
+ values: z.never().optional(),
1386
+ ranges: z.never().optional(),
1387
+ scalar: z.never().optional()
1388
+ }),
1389
+ z.object({
1390
+ ranges: z.never().optional(),
1391
+ scalar: z.never().optional(),
1392
+ values: z.object({
1393
+ results: z.array(
1394
+ z.object({
1395
+ value: z.string().describe("Value of the field.").max(100).optional(),
1396
+ count: z.number().int().describe(
1397
+ "Count of entities with this value."
1398
+ ).optional()
1399
+ })
1400
+ ).max(250).optional()
1401
+ }).describe("Value aggregation results.")
1402
+ }),
1403
+ z.object({
1404
+ values: z.never().optional(),
1405
+ scalar: z.never().optional(),
1406
+ ranges: z.object({
1407
+ results: z.array(
1408
+ z.object({
1409
+ from: z.number().describe(
1410
+ "Inclusive lower bound of the range."
1411
+ ).optional().nullable(),
1412
+ to: z.number().describe(
1413
+ "Exclusive upper bound of the range."
1414
+ ).optional().nullable(),
1415
+ count: z.number().int().describe(
1416
+ "Count of entities in this range."
1417
+ ).optional()
1418
+ })
1419
+ ).max(50).optional()
1420
+ }).describe("Range aggregation results.")
1421
+ }),
1422
+ z.object({
1423
+ values: z.never().optional(),
1424
+ ranges: z.never().optional(),
1425
+ scalar: z.object({
1426
+ type: z.enum(["COUNT_DISTINCT", "MIN", "MAX"]).describe("Type of scalar aggregation.").optional(),
1427
+ value: z.number().describe(
1428
+ "Value of the scalar aggregation."
1429
+ ).optional()
1430
+ }).describe("Scalar aggregation results.")
1431
+ })
1432
+ ])
1433
+ ).describe("Nested aggregations result data.").optional()
1434
+ })
1435
+ ).max(1e3).optional()
1436
+ }).describe("Group by value aggregation results.")
1437
+ }),
1438
+ z.object({
1439
+ values: z.never().optional(),
1440
+ ranges: z.never().optional(),
1441
+ scalar: z.never().optional(),
1442
+ groupedByValue: z.never().optional(),
1443
+ nested: z.never().optional(),
1444
+ dateHistogram: z.object({
1445
+ results: z.array(
1446
+ z.object({
1447
+ value: z.string().describe(
1448
+ "Date in [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601)."
1449
+ ).max(100).optional(),
1450
+ count: z.number().int().describe("Count of documents in the bucket.").optional()
1451
+ })
1452
+ ).max(200).optional()
1453
+ }).describe("Date histogram aggregation results.")
1454
+ }),
1455
+ z.object({
1456
+ values: z.never().optional(),
1457
+ ranges: z.never().optional(),
1458
+ scalar: z.never().optional(),
1459
+ groupedByValue: z.never().optional(),
1460
+ dateHistogram: z.never().optional(),
1461
+ nested: z.object({
1462
+ results: z.array(
1463
+ z.object({
1464
+ results: z.record(
1465
+ z.string(),
1466
+ z.intersection(
1467
+ z.object({}),
1468
+ z.xor([
1469
+ z.object({
1470
+ value: z.never().optional(),
1471
+ range: z.never().optional(),
1472
+ scalar: z.never().optional(),
1473
+ dateHistogram: z.never().optional()
1474
+ }),
1475
+ z.object({
1476
+ range: z.never().optional(),
1477
+ scalar: z.never().optional(),
1478
+ dateHistogram: z.never().optional(),
1479
+ value: z.object({
1480
+ value: z.string().describe("Value of the field.").max(1e3).optional(),
1481
+ count: z.number().int().describe(
1482
+ "Count of entities with this value."
1483
+ ).optional().nullable()
1484
+ }).describe("Value aggregation result.")
1485
+ }),
1486
+ z.object({
1487
+ value: z.never().optional(),
1488
+ scalar: z.never().optional(),
1489
+ dateHistogram: z.never().optional(),
1490
+ range: z.object({
1491
+ from: z.number().describe(
1492
+ "Inclusive lower bound of the range."
1493
+ ).optional().nullable(),
1494
+ to: z.number().describe(
1495
+ "Exclusive upper bound of the range."
1496
+ ).optional().nullable(),
1497
+ count: z.number().int().describe(
1498
+ "Count of entities in this range."
1499
+ ).optional().nullable()
1500
+ }).describe("Range aggregation result.")
1501
+ }),
1502
+ z.object({
1503
+ value: z.never().optional(),
1504
+ range: z.never().optional(),
1505
+ dateHistogram: z.never().optional(),
1506
+ scalar: z.object({
1507
+ value: z.number().describe(
1508
+ "Value of the scalar aggregation."
1509
+ ).optional()
1510
+ }).describe("Scalar aggregation result.")
1511
+ }),
1512
+ z.object({
1513
+ value: z.never().optional(),
1514
+ range: z.never().optional(),
1515
+ scalar: z.never().optional(),
1516
+ dateHistogram: z.object({
1517
+ value: z.string().describe("Value of the field.").max(1e3).optional(),
1518
+ count: z.number().int().describe(
1519
+ "Count of entities with this value."
1520
+ ).optional().nullable()
1521
+ }).describe(
1522
+ "Date histogram aggregation result."
1523
+ )
1524
+ })
1525
+ ])
1526
+ )
1527
+ ).describe(
1528
+ "Map of nested aggregation results, keyed by aggregation name."
1529
+ ).optional()
1530
+ })
1531
+ ).max(1e3).optional()
1532
+ }).describe("Nested aggregation results.")
1533
+ })
1534
+ ])
1535
+ )
1536
+ ).max(1e4).optional()
1537
+ }).describe(
1538
+ "Aggregation results derived from the aggregations specified in the search request.\n\nProvides analytical summaries such as resource counts by type, location distribution,\nmanagement type statistics, or custom groupings. Only populated when aggregations\nare included in the search criteria."
1539
+ ).optional()
1540
+ });
1541
+ var QueryResourcesRequest = z.object({
1542
+ query: z.object({
1543
+ filter: z.object({
1544
+ _id: z.object({
1545
+ $eq: z.string(),
1546
+ $exists: z.boolean(),
1547
+ $gt: z.string(),
1548
+ $gte: z.string(),
1549
+ $hasAll: z.array(z.string()),
1550
+ $hasSome: z.array(z.string()),
1551
+ $in: z.array(z.string()),
1552
+ $lt: z.string(),
1553
+ $lte: z.string(),
1554
+ $ne: z.string(),
1555
+ $nin: z.array(z.string()),
1556
+ $startsWith: z.string()
1557
+ }).partial().strict().optional(),
1558
+ typeId: z.object({
1559
+ $eq: z.string(),
1560
+ $exists: z.boolean(),
1561
+ $gt: z.string(),
1562
+ $gte: z.string(),
1563
+ $hasAll: z.array(z.string()),
1564
+ $hasSome: z.array(z.string()),
1565
+ $in: z.array(z.string()),
1566
+ $lt: z.string(),
1567
+ $lte: z.string(),
1568
+ $ne: z.string(),
1569
+ $nin: z.array(z.string()),
1570
+ $startsWith: z.string()
1571
+ }).partial().strict().optional(),
1572
+ appId: z.object({
1573
+ $eq: z.string(),
1574
+ $exists: z.boolean(),
1575
+ $gt: z.string(),
1576
+ $gte: z.string(),
1577
+ $hasAll: z.array(z.string()),
1578
+ $hasSome: z.array(z.string()),
1579
+ $in: z.array(z.string()),
1580
+ $lt: z.string(),
1581
+ $lte: z.string(),
1582
+ $ne: z.string(),
1583
+ $nin: z.array(z.string()),
1584
+ $startsWith: z.string()
1585
+ }).partial().strict().optional(),
1586
+ _createdDate: z.object({
1587
+ $eq: z.string(),
1588
+ $exists: z.boolean(),
1589
+ $gt: z.string(),
1590
+ $gte: z.string(),
1591
+ $hasAll: z.array(z.string()),
1592
+ $hasSome: z.array(z.string()),
1593
+ $in: z.array(z.string()),
1594
+ $lt: z.string(),
1595
+ $lte: z.string(),
1596
+ $ne: z.string(),
1597
+ $nin: z.array(z.string()),
1598
+ $startsWith: z.string()
1599
+ }).partial().strict().optional(),
1600
+ _updatedDate: z.object({
1601
+ $eq: z.string(),
1602
+ $exists: z.boolean(),
1603
+ $gt: z.string(),
1604
+ $gte: z.string(),
1605
+ $hasAll: z.array(z.string()),
1606
+ $hasSome: z.array(z.string()),
1607
+ $in: z.array(z.string()),
1608
+ $lt: z.string(),
1609
+ $lte: z.string(),
1610
+ $ne: z.string(),
1611
+ $nin: z.array(z.string()),
1612
+ $startsWith: z.string()
1613
+ }).partial().strict().optional(),
1614
+ "locationOptions.availableInAllLocations": z.object({
1615
+ $eq: z.boolean(),
1616
+ $exists: z.boolean(),
1617
+ $gt: z.boolean(),
1618
+ $gte: z.boolean(),
1619
+ $hasAll: z.array(z.boolean()),
1620
+ $hasSome: z.array(z.boolean()),
1621
+ $in: z.array(z.boolean()),
1622
+ $lt: z.boolean(),
1623
+ $lte: z.boolean(),
1624
+ $ne: z.boolean(),
1625
+ $nin: z.array(z.boolean()),
1626
+ $startsWith: z.string()
1627
+ }).partial().strict().optional(),
1628
+ "locationOptions.specificLocationOptions.availableInBusinessLocations": z.object({
1629
+ $eq: z.boolean(),
1630
+ $exists: z.boolean(),
1631
+ $gt: z.boolean(),
1632
+ $gte: z.boolean(),
1633
+ $hasAll: z.array(z.boolean()),
1634
+ $hasSome: z.array(z.boolean()),
1635
+ $in: z.array(z.boolean()),
1636
+ $lt: z.boolean(),
1637
+ $lte: z.boolean(),
1638
+ $ne: z.boolean(),
1639
+ $nin: z.array(z.boolean()),
1640
+ $startsWith: z.string()
1641
+ }).partial().strict().optional(),
1642
+ "locationOptions.specificLocationOptions.businessLocations.locationId": z.object({
1643
+ $eq: z.string(),
1644
+ $exists: z.boolean(),
1645
+ $gt: z.string(),
1646
+ $gte: z.string(),
1647
+ $hasAll: z.array(z.string()),
1648
+ $hasSome: z.array(z.string()),
1649
+ $in: z.array(z.string()),
1650
+ $lt: z.string(),
1651
+ $lte: z.string(),
1652
+ $ne: z.string(),
1653
+ $nin: z.array(z.string()),
1654
+ $startsWith: z.string()
1655
+ }).partial().strict().optional(),
1656
+ "eventsSchedule.scheduleId": z.object({
1657
+ $eq: z.string(),
1658
+ $exists: z.boolean(),
1659
+ $gt: z.string(),
1660
+ $gte: z.string(),
1661
+ $hasAll: z.array(z.string()),
1662
+ $hasSome: z.array(z.string()),
1663
+ $in: z.array(z.string()),
1664
+ $lt: z.string(),
1665
+ $lte: z.string(),
1666
+ $ne: z.string(),
1667
+ $nin: z.array(z.string()),
1668
+ $startsWith: z.string()
1669
+ }).partial().strict().optional(),
1670
+ name: z.object({
1671
+ $eq: z.string(),
1672
+ $exists: z.boolean(),
1673
+ $gt: z.string(),
1674
+ $gte: z.string(),
1675
+ $hasAll: z.array(z.string()),
1676
+ $hasSome: z.array(z.string()),
1677
+ $in: z.array(z.string()),
1678
+ $lt: z.string(),
1679
+ $lte: z.string(),
1680
+ $ne: z.string(),
1681
+ $nin: z.array(z.string()),
1682
+ $startsWith: z.string()
1683
+ }).partial().strict().optional(),
1684
+ "singleResource.locationOptions.availableInAllLocations": z.object({
1685
+ $eq: z.any(),
1686
+ $exists: z.boolean(),
1687
+ $gt: z.any(),
1688
+ $gte: z.any(),
1689
+ $hasAll: z.array(z.any()),
1690
+ $hasSome: z.array(z.any()),
1691
+ $in: z.array(z.any()),
1692
+ $lt: z.any(),
1693
+ $lte: z.any(),
1694
+ $ne: z.any(),
1695
+ $nin: z.array(z.any()),
1696
+ $startsWith: z.string()
1697
+ }).partial().strict().optional(),
1698
+ "singleResource.locationOptions.specificLocationOptions.availableInBusinessLocations": z.object({
1699
+ $eq: z.any(),
1700
+ $exists: z.boolean(),
1701
+ $gt: z.any(),
1702
+ $gte: z.any(),
1703
+ $hasAll: z.array(z.any()),
1704
+ $hasSome: z.array(z.any()),
1705
+ $in: z.array(z.any()),
1706
+ $lt: z.any(),
1707
+ $lte: z.any(),
1708
+ $ne: z.any(),
1709
+ $nin: z.array(z.any()),
1710
+ $startsWith: z.string()
1711
+ }).partial().strict().optional(),
1712
+ "singleResource.locationOptions.specificLocationOptions.businessLocations.locationId": z.object({
1713
+ $eq: z.any(),
1714
+ $exists: z.boolean(),
1715
+ $gt: z.any(),
1716
+ $gte: z.any(),
1717
+ $hasAll: z.array(z.any()),
1718
+ $hasSome: z.array(z.any()),
1719
+ $in: z.array(z.any()),
1720
+ $lt: z.any(),
1721
+ $lte: z.any(),
1722
+ $ne: z.any(),
1723
+ $nin: z.array(z.any()),
1724
+ $startsWith: z.string()
1725
+ }).partial().strict().optional(),
1726
+ $and: z.array(z.any()).optional(),
1727
+ $or: z.array(z.any()).optional(),
1728
+ $not: z.any().optional()
1729
+ }).strict().optional(),
1730
+ sort: z.array(
1731
+ z.object({
1732
+ fieldName: z.enum([
1733
+ "_id",
1734
+ "typeId",
1735
+ "appId",
1736
+ "_createdDate",
1737
+ "_updatedDate",
1738
+ "locationOptions.availableInAllLocations",
1739
+ "locationOptions.specificLocationOptions.availableInBusinessLocations",
1740
+ "locationOptions.specificLocationOptions.businessLocations.locationId",
1741
+ "eventsSchedule.scheduleId",
1742
+ "singleResource.locationOptions.availableInAllLocations",
1743
+ "singleResource.locationOptions.specificLocationOptions.availableInBusinessLocations",
1744
+ "singleResource.locationOptions.specificLocationOptions.businessLocations.locationId"
1745
+ ]).optional(),
1746
+ order: z.enum(["ASC", "DESC"]).optional()
1747
+ })
1748
+ ).optional()
1749
+ }).catchall(z.any()).describe("Query object.")
1750
+ });
1751
+ var QueryResourcesResponse = z.object({
1752
+ resources: z.array(
1753
+ z.object({
1754
+ _id: z.string().describe("Resource ID.").regex(
1755
+ /^[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}$/,
1756
+ "Must be a valid GUID"
1757
+ ).optional().nullable(),
1758
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1759
+ "Revision number, which increments by 1 each time the resource is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the resource."
1760
+ ).optional().nullable(),
1761
+ _createdDate: z.date().describe(
1762
+ "Time in `YYYY-MM-DDThh:mm:ss.sssZ` format the resource was created."
1763
+ ).optional().nullable(),
1764
+ _updatedDate: z.date().describe(
1765
+ "Time in `YYYY-MM-DDThh:mm:ss.sssZ` format the resource was last updated."
1766
+ ).optional().nullable(),
1767
+ name: z.string().describe("Name of the resource.").max(40).min(1).optional().nullable(),
1768
+ typeId: z.string().describe(
1769
+ "ID of the [resource type](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resource-types-v2/introduction).\n\nOnce a type has been set it can't be modified. You can create a resource\nwithout specifying a type. However, customers can't book such resources."
1770
+ ).regex(
1771
+ /^[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}$/,
1772
+ "Must be a valid GUID"
1773
+ ).optional().nullable(),
1774
+ workingHoursSchedules: z.object({
1775
+ values: z.array(
1776
+ z.object({
1777
+ scheduleId: z.string().describe(
1778
+ "ID of the working hour [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)."
1779
+ ).regex(
1780
+ /^[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}$/,
1781
+ "Must be a valid GUID"
1782
+ ).optional().nullable(),
1783
+ shared: z.boolean().describe(
1784
+ "Whether the schedule is shared by multiple resources or unique for this resource.\n\nDefault: `false`"
1785
+ ).optional().nullable()
1786
+ })
1787
+ ).max(1).optional()
1788
+ }).describe(
1789
+ "Information about the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)\nspecifying the working hours and locations of the resource.\n\nResources without a working hour schedule are available 24/7 at the locations\nspecified in the field `locationOptions`.\nWhen both `workingHoursSchedules` and `locationOptions` are set,\n`workingHoursSchedules` takes precedence."
1790
+ ).optional(),
1791
+ locationOptions: z.object({
1792
+ availableInAllLocations: z.boolean().describe(
1793
+ "Whether the resource is available in all [business locations](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations#location-types).\n\n- `true`: The resource is available in all business locations.\n- `false`: The resource is available only in specific locations.\n\nDefault: `false`"
1794
+ ).optional().nullable(),
1795
+ specificLocationOptions: z.object({
1796
+ availableInBusinessLocations: z.boolean().describe(
1797
+ "Whether the resource is available in [business locations](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations#location-types).\n\n- `true`: The resource is available in business locations.\n- `false`: The resource isn't available in business locations.\n\nDefault: `false`"
1798
+ ).optional().nullable(),
1799
+ businessLocations: z.array(
1800
+ z.object({
1801
+ locationId: z.string().describe(
1802
+ "ID of the business [location](https://dev.wix.com/docs/rest/business-management/locations/introduction)."
1803
+ ).regex(
1804
+ /^[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}$/,
1805
+ "Must be a valid GUID"
1806
+ ).optional().nullable()
1807
+ })
1808
+ ).max(100).optional()
1809
+ }).describe(
1810
+ "Details of resource availability in specific locations."
1811
+ ).optional()
1812
+ }).describe(
1813
+ "Information about the location where the resource is available."
1814
+ ).optional(),
1815
+ eventsSchedule: z.object({
1816
+ scheduleId: z.string().describe(
1817
+ "ID of the event [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)."
1818
+ ).regex(
1819
+ /^[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}$/,
1820
+ "Must be a valid GUID"
1821
+ ).optional().nullable()
1822
+ }).describe(
1823
+ "Schedule containing the [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction)\nfor which the resource has been booked."
1824
+ ).optional(),
1825
+ appId: z.string().describe(
1826
+ 'ID of the app associated with the resource. You can\'t update `appId`.\nResources are displayed in Wix Bookings only if they are associated with the Wix Bookings app ID or have no associated app ID.\nDefault: `13d21c63-b5ec-5912-8397-c3a5ddb27a97` (Wix Bookings app ID)\nFor resources from Wix apps, the following values apply:\n- Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`\n- Wix Services: `"cc552162-24a4-45e0-9695-230c4931ef40"`\n- Wix Meetings: `"6646a75c-2027-4f49-976c-58f3d713ed0f"`\n[Full list of apps created by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).\n<!-- TODO: Uncomment when Platform docs are published - Learn more about [app identity in the Bookings Platform](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings-platform/app-identity-in-the-bookings-platform). -->'
1827
+ ).regex(
1828
+ /^[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}$/,
1829
+ "Must be a valid GUID"
1830
+ ).optional().nullable(),
1831
+ extendedFields: z.object({
1832
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
1833
+ "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
1834
+ ).optional()
1835
+ }).describe(
1836
+ "Extensions enabling users to save custom data related to the resource."
1837
+ ).optional()
1838
+ })
1839
+ ).optional(),
1840
+ pagingMetadata: z.object({
1841
+ count: z.number().int().describe(
1842
+ "Number of items returned in the current response page.\n\nThis count reflects the actual number of items in the current result set,\nwhich may be less than the requested limit if fewer items are available."
1843
+ ).optional().nullable(),
1844
+ cursors: z.object({
1845
+ next: z.string().describe(
1846
+ "Cursor token for retrieving the next page of results.\n\nUse this token in subsequent requests to continue pagination forward.\nValue is `null` when on the last page of results."
1847
+ ).max(16e3).optional().nullable(),
1848
+ prev: z.string().describe(
1849
+ "Cursor token for retrieving the previous page of results.\n\nUse this token to navigate backwards through result pages.\nValue is `null` when on the first page of results."
1850
+ ).max(16e3).optional().nullable()
1851
+ }).describe(
1852
+ "Navigation cursors for moving between result pages.\n\nContains `next` and `prev` cursor tokens for pagination. Use the `next` cursor\nto retrieve subsequent pages and `prev` cursor to go back to previous pages.\nLearn more about cursor paging in the [API Query Language guide](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_cursor-paging)."
1853
+ ).optional(),
1854
+ hasNext: z.boolean().describe(
1855
+ "Indicates whether additional results are available beyond the current page.\n\n- `true`: More results exist and can be retrieved using the `next` cursor.\n- `false`: This is the final page of results."
1856
+ ).optional().nullable()
1857
+ }).describe("Paging metadata.").optional()
1858
+ });
1859
+ var CountResourcesRequest = z.object({
1860
+ options: z.object({
1861
+ filter: z.record(z.string(), z.any()).describe(
1862
+ "Filter to base the count on. See [Query Resources](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resources-v2/query-resources) for a list of supported filters."
1863
+ ).optional().nullable(),
1864
+ search: z.object({
1865
+ mode: z.enum(["OR", "AND"]).optional(),
1866
+ expression: z.string().describe("Search term or expression.").max(100).optional().nullable(),
1867
+ fields: z.array(z.string()).max(20).optional(),
1868
+ fuzzy: z.boolean().describe(
1869
+ "Whether to enable the search function to use an algorithm to automatically find results that are close to the search expression, such as typos and declensions."
1870
+ ).optional()
1871
+ }).describe(
1872
+ "Free text to match in searchable fields. Field is deprecated due to decision to use query instead of search for performing the count."
1873
+ ).optional()
1874
+ }).describe(
1875
+ "Filter to base the count on. See *the supported filters article* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting)) for a complete list of filtering options."
1876
+ ).optional()
1877
+ });
1878
+ var CountResourcesResponse = z.object({
1879
+ count: z.number().int().describe("Total number of resources matching the filter.").optional()
1880
+ });
1881
+ // Annotate the CommonJS export names for ESM import in node:
1882
+ 0 && (module.exports = {
1883
+ BulkCreateResourcesRequest,
1884
+ BulkCreateResourcesResponse,
1885
+ BulkDeleteResourcesRequest,
1886
+ BulkDeleteResourcesResponse,
1887
+ BulkUpdateResourcesRequest,
1888
+ BulkUpdateResourcesResponse,
1889
+ CountResourcesRequest,
1890
+ CountResourcesResponse,
1891
+ CreateResourceRequest,
1892
+ CreateResourceResponse,
1893
+ DeleteResourceRequest,
1894
+ DeleteResourceResponse,
1895
+ GetResourceRequest,
1896
+ GetResourceResponse,
1897
+ QueryResourcesRequest,
1898
+ QueryResourcesResponse,
1899
+ SearchResourcesRequest,
1900
+ SearchResourcesResponse,
1901
+ UpdateResourceRequest,
1902
+ UpdateResourceResponse
1903
+ });
1904
+ //# sourceMappingURL=schemas.js.map