@wix/auto_sdk_restaurants_sections 1.0.65 → 1.0.66

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,644 @@
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
+ BulkCreateSectionsRequest: () => BulkCreateSectionsRequest,
34
+ BulkCreateSectionsResponse: () => BulkCreateSectionsResponse,
35
+ BulkDeleteSectionsRequest: () => BulkDeleteSectionsRequest,
36
+ BulkDeleteSectionsResponse: () => BulkDeleteSectionsResponse,
37
+ BulkUpdateSectionRequest: () => BulkUpdateSectionRequest,
38
+ BulkUpdateSectionResponse: () => BulkUpdateSectionResponse,
39
+ CreateSectionRequest: () => CreateSectionRequest,
40
+ CreateSectionResponse: () => CreateSectionResponse,
41
+ DeleteSectionRequest: () => DeleteSectionRequest,
42
+ DeleteSectionResponse: () => DeleteSectionResponse,
43
+ DuplicateSectionRequest: () => DuplicateSectionRequest,
44
+ DuplicateSectionResponse: () => DuplicateSectionResponse,
45
+ GetSectionRequest: () => GetSectionRequest,
46
+ GetSectionResponse: () => GetSectionResponse,
47
+ ListSectionsRequest: () => ListSectionsRequest,
48
+ ListSectionsResponse: () => ListSectionsResponse,
49
+ QuerySectionsRequest: () => QuerySectionsRequest,
50
+ QuerySectionsResponse: () => QuerySectionsResponse,
51
+ UpdateSectionRequest: () => UpdateSectionRequest,
52
+ UpdateSectionResponse: () => UpdateSectionResponse
53
+ });
54
+ module.exports = __toCommonJS(schemas_exports);
55
+
56
+ // src/restaurants-menus-v1-section-sections.schemas.ts
57
+ var z = __toESM(require("zod"));
58
+ var DuplicateSectionRequest = z.object({
59
+ _id: z.string().describe("ID of the section to be duplicated.").regex(
60
+ /^[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}$/,
61
+ "Must be a valid GUID"
62
+ ),
63
+ options: z.object({
64
+ businessLocationIds: z.array(z.string()).max(100).optional(),
65
+ duplicateSubEntities: z.boolean().describe(
66
+ "Whether to duplicate the section's sub-entities, such as its items.\n\nDefault: `false`"
67
+ ).optional().nullable()
68
+ }).optional()
69
+ });
70
+ var DuplicateSectionResponse = z.object({
71
+ sectionId: z.array(z.string()).optional()
72
+ });
73
+ var CreateSectionRequest = z.object({
74
+ section: z.object({
75
+ _id: z.string().describe("Section ID.").regex(
76
+ /^[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}$/,
77
+ "Must be a valid GUID"
78
+ ).optional().nullable(),
79
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
80
+ "Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current revision must be passed when updating the section. Ignored when creating a section."
81
+ ).optional().nullable(),
82
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
83
+ _updatedDate: z.date().describe("Date and time the section was updated.").optional().nullable(),
84
+ name: z.string().describe("Section name.").min(1).max(500).optional(),
85
+ description: z.string().describe("Section description.").max(1500).optional().nullable(),
86
+ image: z.string().describe("Main section image.").optional(),
87
+ additionalImages: z.array(z.string()).max(100).optional(),
88
+ itemIds: z.array(z.string()).max(300).optional(),
89
+ extendedFields: z.object({
90
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
91
+ "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)."
92
+ ).optional()
93
+ }).describe("Extended fields.").optional(),
94
+ visible: z.boolean().describe(
95
+ "Whether the section is visible in the menu for site visitors."
96
+ ).optional().nullable(),
97
+ businessLocationId: z.string().describe(
98
+ "ID of the business location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations)) where this section is available."
99
+ ).regex(
100
+ /^[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}$/,
101
+ "Must be a valid GUID"
102
+ ).optional().nullable()
103
+ }).describe("Section details.")
104
+ });
105
+ var CreateSectionResponse = z.object({
106
+ _id: z.string().describe("Section ID.").regex(
107
+ /^[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}$/,
108
+ "Must be a valid GUID"
109
+ ).optional().nullable(),
110
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
111
+ "Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current revision must be passed when updating the section. Ignored when creating a section."
112
+ ).optional().nullable(),
113
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
114
+ _updatedDate: z.date().describe("Date and time the section was updated.").optional().nullable(),
115
+ name: z.string().describe("Section name.").min(1).max(500).optional(),
116
+ description: z.string().describe("Section description.").max(1500).optional().nullable(),
117
+ image: z.string().describe("Main section image.").optional(),
118
+ additionalImages: z.array(z.string()).max(100).optional(),
119
+ itemIds: z.array(z.string()).max(300).optional(),
120
+ extendedFields: z.object({
121
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
122
+ "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)."
123
+ ).optional()
124
+ }).describe("Extended fields.").optional(),
125
+ visible: z.boolean().describe("Whether the section is visible in the menu for site visitors.").optional().nullable(),
126
+ businessLocationId: z.string().describe(
127
+ "ID of the business location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations)) where this section is available."
128
+ ).regex(
129
+ /^[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}$/,
130
+ "Must be a valid GUID"
131
+ ).optional().nullable()
132
+ });
133
+ var BulkCreateSectionsRequest = z.object({
134
+ sections: z.array(
135
+ z.object({
136
+ _id: z.string().describe("Section ID.").regex(
137
+ /^[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}$/,
138
+ "Must be a valid GUID"
139
+ ).optional().nullable(),
140
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
141
+ "Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current revision must be passed when updating the section. Ignored when creating a section."
142
+ ).optional().nullable(),
143
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
144
+ _updatedDate: z.date().describe("Date and time the section was updated.").optional().nullable(),
145
+ name: z.string().describe("Section name.").min(1).max(500).optional(),
146
+ description: z.string().describe("Section description.").max(1500).optional().nullable(),
147
+ image: z.string().describe("Main section image.").optional(),
148
+ additionalImages: z.array(z.string()).max(100).optional(),
149
+ itemIds: z.array(z.string()).max(300).optional(),
150
+ extendedFields: z.object({
151
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
152
+ "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)."
153
+ ).optional()
154
+ }).describe("Extended fields.").optional(),
155
+ visible: z.boolean().describe(
156
+ "Whether the section is visible in the menu for site visitors."
157
+ ).optional().nullable(),
158
+ businessLocationId: z.string().describe(
159
+ "ID of the business location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations)) where this section is available."
160
+ ).regex(
161
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
162
+ "Must be a valid GUID"
163
+ ).optional().nullable()
164
+ })
165
+ ).max(100),
166
+ options: z.object({
167
+ returnEntity: z.boolean().describe("Whether to receive the created sections in the response.").optional()
168
+ }).optional()
169
+ });
170
+ var BulkCreateSectionsResponse = z.object({
171
+ results: z.array(
172
+ z.object({
173
+ itemMetadata: z.object({
174
+ _id: z.string().describe(
175
+ "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
176
+ ).optional().nullable(),
177
+ originalIndex: z.number().int().describe(
178
+ "Index of the item within the request array. Allows for correlation between request and response items."
179
+ ).optional(),
180
+ success: z.boolean().describe(
181
+ "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
182
+ ).optional(),
183
+ error: z.object({
184
+ code: z.string().describe("Error code.").optional(),
185
+ description: z.string().describe("Description of the error.").optional(),
186
+ data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
187
+ }).describe("Details about the error in case of failure.").optional()
188
+ }).describe("Metadata for created sections.").optional(),
189
+ item: z.object({
190
+ _id: z.string().describe("Section ID.").regex(
191
+ /^[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}$/,
192
+ "Must be a valid GUID"
193
+ ).optional().nullable(),
194
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
195
+ "Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current revision must be passed when updating the section. Ignored when creating a section."
196
+ ).optional().nullable(),
197
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
198
+ _updatedDate: z.date().describe("Date and time the section was updated.").optional().nullable(),
199
+ name: z.string().describe("Section name.").min(1).max(500).optional(),
200
+ description: z.string().describe("Section description.").max(1500).optional().nullable(),
201
+ image: z.string().describe("Main section image.").optional(),
202
+ additionalImages: z.array(z.string()).max(100).optional(),
203
+ itemIds: z.array(z.string()).max(300).optional(),
204
+ extendedFields: z.object({
205
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
206
+ "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)."
207
+ ).optional()
208
+ }).describe("Extended fields.").optional(),
209
+ visible: z.boolean().describe(
210
+ "Whether the section is visible in the menu for site visitors."
211
+ ).optional().nullable(),
212
+ businessLocationId: z.string().describe(
213
+ "ID of the business location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations)) where this section is available."
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
+ }).describe(
219
+ "Created section. Only returned if `returnEntity` is set to `true`."
220
+ ).optional()
221
+ })
222
+ ).optional(),
223
+ bulkActionMetadata: z.object({
224
+ totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
225
+ totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
226
+ undetailedFailures: z.number().int().describe(
227
+ "Number of failures without details because detailed failure threshold was exceeded."
228
+ ).optional()
229
+ }).describe("Metadata for the API call.").optional()
230
+ });
231
+ var GetSectionRequest = z.object({
232
+ sectionId: z.string().describe("Section ID.").regex(
233
+ /^[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}$/,
234
+ "Must be a valid GUID"
235
+ )
236
+ });
237
+ var GetSectionResponse = z.object({
238
+ _id: z.string().describe("Section ID.").regex(
239
+ /^[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}$/,
240
+ "Must be a valid GUID"
241
+ ).optional().nullable(),
242
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
243
+ "Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current revision must be passed when updating the section. Ignored when creating a section."
244
+ ).optional().nullable(),
245
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
246
+ _updatedDate: z.date().describe("Date and time the section was updated.").optional().nullable(),
247
+ name: z.string().describe("Section name.").min(1).max(500).optional(),
248
+ description: z.string().describe("Section description.").max(1500).optional().nullable(),
249
+ image: z.string().describe("Main section image.").optional(),
250
+ additionalImages: z.array(z.string()).max(100).optional(),
251
+ itemIds: z.array(z.string()).max(300).optional(),
252
+ extendedFields: z.object({
253
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
254
+ "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)."
255
+ ).optional()
256
+ }).describe("Extended fields.").optional(),
257
+ visible: z.boolean().describe("Whether the section is visible in the menu for site visitors.").optional().nullable(),
258
+ businessLocationId: z.string().describe(
259
+ "ID of the business location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations)) where this section is available."
260
+ ).regex(
261
+ /^[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}$/,
262
+ "Must be a valid GUID"
263
+ ).optional().nullable()
264
+ });
265
+ var ListSectionsRequest = z.object({
266
+ options: z.object({
267
+ sectionIds: z.array(z.string()).max(500).optional(),
268
+ paging: z.object({
269
+ limit: z.number().int().describe("Number of items to load.").min(0).max(500).optional().nullable(),
270
+ cursor: z.string().describe(
271
+ "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request."
272
+ ).optional().nullable()
273
+ }).describe("The metadata of the paginated results.").optional(),
274
+ onlyVisible: z.boolean().describe(
275
+ "Whether to return only sections that are visible to site visitors."
276
+ ).optional().nullable()
277
+ }).optional()
278
+ });
279
+ var ListSectionsResponse = z.object({
280
+ sections: z.array(
281
+ z.object({
282
+ _id: z.string().describe("Section ID.").regex(
283
+ /^[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}$/,
284
+ "Must be a valid GUID"
285
+ ).optional().nullable(),
286
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
287
+ "Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current revision must be passed when updating the section. Ignored when creating a section."
288
+ ).optional().nullable(),
289
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
290
+ _updatedDate: z.date().describe("Date and time the section was updated.").optional().nullable(),
291
+ name: z.string().describe("Section name.").min(1).max(500).optional(),
292
+ description: z.string().describe("Section description.").max(1500).optional().nullable(),
293
+ image: z.string().describe("Main section image.").optional(),
294
+ additionalImages: z.array(z.string()).max(100).optional(),
295
+ itemIds: z.array(z.string()).max(300).optional(),
296
+ extendedFields: z.object({
297
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
298
+ "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)."
299
+ ).optional()
300
+ }).describe("Extended fields.").optional(),
301
+ visible: z.boolean().describe(
302
+ "Whether the section is visible in the menu for site visitors."
303
+ ).optional().nullable(),
304
+ businessLocationId: z.string().describe(
305
+ "ID of the business location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations)) where this section is available."
306
+ ).regex(
307
+ /^[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}$/,
308
+ "Must be a valid GUID"
309
+ ).optional().nullable()
310
+ })
311
+ ).optional(),
312
+ pagingMetadata: z.object({
313
+ count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
314
+ cursors: z.object({
315
+ next: z.string().describe("Cursor pointing to next page in the list of results.").optional().nullable(),
316
+ prev: z.string().describe(
317
+ "Cursor pointing to previous page in the list of results."
318
+ ).optional().nullable()
319
+ }).describe("Offset that was requested.").optional(),
320
+ hasNext: z.boolean().describe(
321
+ "Indicates if there are more results after the current page.\nIf `true`, another page of results can be retrieved.\nIf `false`, this is the last page."
322
+ ).optional().nullable()
323
+ }).describe("The metadata of the paginated results.").optional()
324
+ });
325
+ var QuerySectionsRequest = z.object({
326
+ query: z.object({
327
+ filter: z.object({
328
+ image: z.object({ $exists: z.boolean() }).partial().strict().optional(),
329
+ _id: z.object({
330
+ $eq: z.string(),
331
+ $in: z.array(z.string()),
332
+ $ne: z.string(),
333
+ $nin: z.array(z.string())
334
+ }).partial().strict().optional(),
335
+ name: z.object({
336
+ $eq: z.string(),
337
+ $in: z.array(z.string()),
338
+ $ne: z.string(),
339
+ $nin: z.array(z.string()),
340
+ $startsWith: z.string()
341
+ }).partial().strict().optional(),
342
+ description: z.object({
343
+ $eq: z.string(),
344
+ $in: z.array(z.string()),
345
+ $ne: z.string(),
346
+ $nin: z.array(z.string()),
347
+ $startsWith: z.string()
348
+ }).partial().strict().optional(),
349
+ itemIds: z.object({ $exists: z.boolean(), $hasSome: z.array(z.string()) }).partial().strict().optional(),
350
+ _createdDate: z.object({
351
+ $eq: z.string(),
352
+ $gt: z.string(),
353
+ $gte: z.string(),
354
+ $lt: z.string(),
355
+ $lte: z.string(),
356
+ $ne: z.string()
357
+ }).partial().strict().optional(),
358
+ _updatedDate: z.object({
359
+ $eq: z.string(),
360
+ $gt: z.string(),
361
+ $gte: z.string(),
362
+ $lt: z.string(),
363
+ $lte: z.string(),
364
+ $ne: z.string()
365
+ }).partial().strict().optional(),
366
+ $and: z.array(z.any()).optional(),
367
+ $or: z.array(z.any()).optional(),
368
+ $not: z.any().optional()
369
+ }).strict().optional(),
370
+ sort: z.array(z.object({})).optional()
371
+ }).catchall(z.any()).describe("Query options.")
372
+ });
373
+ var QuerySectionsResponse = z.object({
374
+ sections: z.array(
375
+ z.object({
376
+ _id: z.string().describe("Section ID.").regex(
377
+ /^[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}$/,
378
+ "Must be a valid GUID"
379
+ ).optional().nullable(),
380
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
381
+ "Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current revision must be passed when updating the section. Ignored when creating a section."
382
+ ).optional().nullable(),
383
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
384
+ _updatedDate: z.date().describe("Date and time the section was updated.").optional().nullable(),
385
+ name: z.string().describe("Section name.").min(1).max(500).optional(),
386
+ description: z.string().describe("Section description.").max(1500).optional().nullable(),
387
+ image: z.string().describe("Main section image.").optional(),
388
+ additionalImages: z.array(z.string()).max(100).optional(),
389
+ itemIds: z.array(z.string()).max(300).optional(),
390
+ extendedFields: z.object({
391
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
392
+ "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)."
393
+ ).optional()
394
+ }).describe("Extended fields.").optional(),
395
+ visible: z.boolean().describe(
396
+ "Whether the section is visible in the menu for site visitors."
397
+ ).optional().nullable(),
398
+ businessLocationId: z.string().describe(
399
+ "ID of the business location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations)) where this section is available."
400
+ ).regex(
401
+ /^[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}$/,
402
+ "Must be a valid GUID"
403
+ ).optional().nullable()
404
+ })
405
+ ).optional(),
406
+ pagingMetadata: z.object({
407
+ count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
408
+ cursors: z.object({
409
+ next: z.string().describe("Cursor pointing to next page in the list of results.").optional().nullable(),
410
+ prev: z.string().describe(
411
+ "Cursor pointing to previous page in the list of results."
412
+ ).optional().nullable()
413
+ }).describe("Offset that was requested.").optional(),
414
+ hasNext: z.boolean().describe(
415
+ "Indicates if there are more results after the current page.\nIf `true`, another page of results can be retrieved.\nIf `false`, this is the last page."
416
+ ).optional().nullable()
417
+ }).describe("The metadata of the paginated results.").optional()
418
+ });
419
+ var UpdateSectionRequest = z.object({
420
+ _id: z.string().describe("Section ID.").regex(
421
+ /^[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}$/,
422
+ "Must be a valid GUID"
423
+ ),
424
+ section: z.object({
425
+ _id: z.string().describe("Section ID.").regex(
426
+ /^[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}$/,
427
+ "Must be a valid GUID"
428
+ ).optional().nullable(),
429
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
430
+ "Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current revision must be passed when updating the section. Ignored when creating a section."
431
+ ),
432
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
433
+ _updatedDate: z.date().describe("Date and time the section was updated.").optional().nullable(),
434
+ name: z.string().describe("Section name.").min(1).max(500).optional(),
435
+ description: z.string().describe("Section description.").max(1500).optional().nullable(),
436
+ image: z.string().describe("Main section image.").optional(),
437
+ additionalImages: z.array(z.string()).max(100).optional(),
438
+ itemIds: z.array(z.string()).max(300).optional(),
439
+ extendedFields: z.object({
440
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
441
+ "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)."
442
+ ).optional()
443
+ }).describe("Extended fields.").optional(),
444
+ visible: z.boolean().describe(
445
+ "Whether the section is visible in the menu for site visitors."
446
+ ).optional().nullable(),
447
+ businessLocationId: z.string().describe(
448
+ "ID of the business location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations)) where this section is available."
449
+ ).regex(
450
+ /^[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}$/,
451
+ "Must be a valid GUID"
452
+ ).optional().nullable()
453
+ }).describe("Section update.")
454
+ });
455
+ var UpdateSectionResponse = z.object({
456
+ _id: z.string().describe("Section ID.").regex(
457
+ /^[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}$/,
458
+ "Must be a valid GUID"
459
+ ).optional().nullable(),
460
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
461
+ "Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current revision must be passed when updating the section. Ignored when creating a section."
462
+ ).optional().nullable(),
463
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
464
+ _updatedDate: z.date().describe("Date and time the section was updated.").optional().nullable(),
465
+ name: z.string().describe("Section name.").min(1).max(500).optional(),
466
+ description: z.string().describe("Section description.").max(1500).optional().nullable(),
467
+ image: z.string().describe("Main section image.").optional(),
468
+ additionalImages: z.array(z.string()).max(100).optional(),
469
+ itemIds: z.array(z.string()).max(300).optional(),
470
+ extendedFields: z.object({
471
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
472
+ "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)."
473
+ ).optional()
474
+ }).describe("Extended fields.").optional(),
475
+ visible: z.boolean().describe("Whether the section is visible in the menu for site visitors.").optional().nullable(),
476
+ businessLocationId: z.string().describe(
477
+ "ID of the business location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations)) where this section is available."
478
+ ).regex(
479
+ /^[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}$/,
480
+ "Must be a valid GUID"
481
+ ).optional().nullable()
482
+ });
483
+ var BulkUpdateSectionRequest = z.object({
484
+ sections: z.array(
485
+ z.object({
486
+ section: z.object({
487
+ _id: z.string().describe("Section ID.").regex(
488
+ /^[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}$/,
489
+ "Must be a valid GUID"
490
+ ),
491
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
492
+ "Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current revision must be passed when updating the section. Ignored when creating a section."
493
+ ),
494
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
495
+ _updatedDate: z.date().describe("Date and time the section was updated.").optional().nullable(),
496
+ name: z.string().describe("Section name.").min(1).max(500).optional(),
497
+ description: z.string().describe("Section description.").max(1500).optional().nullable(),
498
+ image: z.string().describe("Main section image.").optional(),
499
+ additionalImages: z.array(z.string()).max(100).optional(),
500
+ itemIds: z.array(z.string()).max(300).optional(),
501
+ extendedFields: z.object({
502
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
503
+ "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)."
504
+ ).optional()
505
+ }).describe("Extended fields.").optional(),
506
+ visible: z.boolean().describe(
507
+ "Whether the section is visible in the menu for site visitors."
508
+ ).optional().nullable(),
509
+ businessLocationId: z.string().describe(
510
+ "ID of the business location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations)) where this section is available."
511
+ ).regex(
512
+ /^[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}$/,
513
+ "Must be a valid GUID"
514
+ ).optional().nullable()
515
+ }).describe("Section update.").optional(),
516
+ mask: z.array(z.string()).optional()
517
+ })
518
+ ).min(1).max(100),
519
+ options: z.object({
520
+ returnEntity: z.boolean().describe("Whether to receive the updated sections in the response.").optional()
521
+ }).optional()
522
+ });
523
+ var BulkUpdateSectionResponse = z.object({
524
+ results: z.array(
525
+ z.object({
526
+ sectionMetadata: z.object({
527
+ _id: z.string().describe(
528
+ "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
529
+ ).optional().nullable(),
530
+ originalIndex: z.number().int().describe(
531
+ "Index of the item within the request array. Allows for correlation between request and response items."
532
+ ).optional(),
533
+ success: z.boolean().describe(
534
+ "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
535
+ ).optional(),
536
+ error: z.object({
537
+ code: z.string().describe("Error code.").optional(),
538
+ description: z.string().describe("Description of the error.").optional(),
539
+ data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
540
+ }).describe("Details about the error in case of failure.").optional()
541
+ }).describe("Whether to receive the updated sections in the response.").optional(),
542
+ section: z.object({
543
+ _id: z.string().describe("Section ID.").regex(
544
+ /^[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}$/,
545
+ "Must be a valid GUID"
546
+ ).optional().nullable(),
547
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
548
+ "Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current revision must be passed when updating the section. Ignored when creating a section."
549
+ ).optional().nullable(),
550
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
551
+ _updatedDate: z.date().describe("Date and time the section was updated.").optional().nullable(),
552
+ name: z.string().describe("Section name.").min(1).max(500).optional(),
553
+ description: z.string().describe("Section description.").max(1500).optional().nullable(),
554
+ image: z.string().describe("Main section image.").optional(),
555
+ additionalImages: z.array(z.string()).max(100).optional(),
556
+ itemIds: z.array(z.string()).max(300).optional(),
557
+ extendedFields: z.object({
558
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
559
+ "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)."
560
+ ).optional()
561
+ }).describe("Extended fields.").optional(),
562
+ visible: z.boolean().describe(
563
+ "Whether the section is visible in the menu for site visitors."
564
+ ).optional().nullable(),
565
+ businessLocationId: z.string().describe(
566
+ "ID of the business location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations)) where this section is available."
567
+ ).regex(
568
+ /^[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}$/,
569
+ "Must be a valid GUID"
570
+ ).optional().nullable()
571
+ }).describe(
572
+ "Updated section. Only returned if `returnEntity` is set to `true`."
573
+ ).optional()
574
+ })
575
+ ).min(1).max(100).optional(),
576
+ bulkActionMetadata: z.object({
577
+ totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
578
+ totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
579
+ undetailedFailures: z.number().int().describe(
580
+ "Number of failures without details because detailed failure threshold was exceeded."
581
+ ).optional()
582
+ }).describe("Metadata for the API call.").optional()
583
+ });
584
+ var DeleteSectionRequest = z.object({
585
+ sectionId: z.string().describe("Section ID.").regex(
586
+ /^[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}$/,
587
+ "Must be a valid GUID"
588
+ )
589
+ });
590
+ var DeleteSectionResponse = z.object({});
591
+ var BulkDeleteSectionsRequest = z.object({ ids: z.array(z.string()) });
592
+ var BulkDeleteSectionsResponse = z.object({
593
+ results: z.array(
594
+ z.object({
595
+ itemMetadata: z.object({
596
+ _id: z.string().describe(
597
+ "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
598
+ ).optional().nullable(),
599
+ originalIndex: z.number().int().describe(
600
+ "Index of the item within the request array. Allows for correlation between request and response items."
601
+ ).optional(),
602
+ success: z.boolean().describe(
603
+ "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
604
+ ).optional(),
605
+ error: z.object({
606
+ code: z.string().describe("Error code.").optional(),
607
+ description: z.string().describe("Description of the error.").optional(),
608
+ data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
609
+ }).describe("Details about the error in case of failure.").optional()
610
+ }).describe("Metadata for deleted sections.").optional()
611
+ })
612
+ ).optional(),
613
+ bulkActionMetadata: z.object({
614
+ totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
615
+ totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
616
+ undetailedFailures: z.number().int().describe(
617
+ "Number of failures without details because detailed failure threshold was exceeded."
618
+ ).optional()
619
+ }).describe("Metadata for the API call.").optional()
620
+ });
621
+ // Annotate the CommonJS export names for ESM import in node:
622
+ 0 && (module.exports = {
623
+ BulkCreateSectionsRequest,
624
+ BulkCreateSectionsResponse,
625
+ BulkDeleteSectionsRequest,
626
+ BulkDeleteSectionsResponse,
627
+ BulkUpdateSectionRequest,
628
+ BulkUpdateSectionResponse,
629
+ CreateSectionRequest,
630
+ CreateSectionResponse,
631
+ DeleteSectionRequest,
632
+ DeleteSectionResponse,
633
+ DuplicateSectionRequest,
634
+ DuplicateSectionResponse,
635
+ GetSectionRequest,
636
+ GetSectionResponse,
637
+ ListSectionsRequest,
638
+ ListSectionsResponse,
639
+ QuerySectionsRequest,
640
+ QuerySectionsResponse,
641
+ UpdateSectionRequest,
642
+ UpdateSectionResponse
643
+ });
644
+ //# sourceMappingURL=schemas.js.map