@wix/auto_sdk_restaurants_item-modifier-groups 1.0.66 → 1.0.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/schemas.d.ts +447 -0
- package/build/cjs/schemas.js +810 -0
- package/build/cjs/schemas.js.map +1 -0
- package/build/es/schemas.d.mts +447 -0
- package/build/es/schemas.mjs +754 -0
- package/build/es/schemas.mjs.map +1 -0
- package/build/internal/cjs/schemas.d.ts +447 -0
- package/build/internal/cjs/schemas.js +810 -0
- package/build/internal/cjs/schemas.js.map +1 -0
- package/build/internal/es/schemas.d.mts +447 -0
- package/build/internal/es/schemas.mjs +754 -0
- package/build/internal/es/schemas.mjs.map +1 -0
- package/package.json +12 -5
- package/schemas/package.json +3 -0
|
@@ -0,0 +1,810 @@
|
|
|
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
|
+
BulkCreateModifierGroupsRequest: () => BulkCreateModifierGroupsRequest,
|
|
34
|
+
BulkCreateModifierGroupsResponse: () => BulkCreateModifierGroupsResponse,
|
|
35
|
+
BulkDeleteModifierGroupsRequest: () => BulkDeleteModifierGroupsRequest,
|
|
36
|
+
BulkDeleteModifierGroupsResponse: () => BulkDeleteModifierGroupsResponse,
|
|
37
|
+
BulkUpdateModifierGroupsRequest: () => BulkUpdateModifierGroupsRequest,
|
|
38
|
+
BulkUpdateModifierGroupsResponse: () => BulkUpdateModifierGroupsResponse,
|
|
39
|
+
CountModifierGroupsRequest: () => CountModifierGroupsRequest,
|
|
40
|
+
CountModifierGroupsResponse: () => CountModifierGroupsResponse,
|
|
41
|
+
CreateModifierGroupRequest: () => CreateModifierGroupRequest,
|
|
42
|
+
CreateModifierGroupResponse: () => CreateModifierGroupResponse,
|
|
43
|
+
DeleteModifierGroupRequest: () => DeleteModifierGroupRequest,
|
|
44
|
+
DeleteModifierGroupResponse: () => DeleteModifierGroupResponse,
|
|
45
|
+
GetModifierGroupRequest: () => GetModifierGroupRequest,
|
|
46
|
+
GetModifierGroupResponse: () => GetModifierGroupResponse,
|
|
47
|
+
ListModifierGroupsRequest: () => ListModifierGroupsRequest,
|
|
48
|
+
ListModifierGroupsResponse: () => ListModifierGroupsResponse,
|
|
49
|
+
QueryModifierGroupsRequest: () => QueryModifierGroupsRequest,
|
|
50
|
+
QueryModifierGroupsResponse: () => QueryModifierGroupsResponse,
|
|
51
|
+
UpdateModifierGroupRequest: () => UpdateModifierGroupRequest,
|
|
52
|
+
UpdateModifierGroupResponse: () => UpdateModifierGroupResponse
|
|
53
|
+
});
|
|
54
|
+
module.exports = __toCommonJS(schemas_exports);
|
|
55
|
+
|
|
56
|
+
// src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.schemas.ts
|
|
57
|
+
var z = __toESM(require("zod"));
|
|
58
|
+
var CreateModifierGroupRequest = z.object({
|
|
59
|
+
modifierGroup: z.object({
|
|
60
|
+
_id: z.string().describe("Modifier group 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 modifier group is updated. To prevent conflicting changes, the current revision must be passed when updating the modifier group. Ignored when creating a modifier group."
|
|
66
|
+
).optional().nullable(),
|
|
67
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
68
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
69
|
+
name: z.string().describe("Modifier group name.").min(1).max(100),
|
|
70
|
+
modifiers: z.array(
|
|
71
|
+
z.object({
|
|
72
|
+
_id: z.string().describe("Item modifier ID.").regex(
|
|
73
|
+
/^[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}$/,
|
|
74
|
+
"Must be a valid GUID"
|
|
75
|
+
).optional(),
|
|
76
|
+
preSelected: z.boolean().describe(
|
|
77
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
78
|
+
).optional().nullable(),
|
|
79
|
+
additionalChargeInfo: z.object({
|
|
80
|
+
additionalCharge: z.string().describe(
|
|
81
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
82
|
+
).optional().nullable()
|
|
83
|
+
}).describe("Item modifier price details.").optional()
|
|
84
|
+
})
|
|
85
|
+
).min(0).max(500).optional(),
|
|
86
|
+
rule: z.object({
|
|
87
|
+
required: z.boolean().describe(
|
|
88
|
+
"Whether the items from the modifier group must be selected."
|
|
89
|
+
).optional().nullable(),
|
|
90
|
+
minSelections: z.number().int().describe(
|
|
91
|
+
"Minimum number of item modifiers a site visitor must select. The value must be lower or equal to the available item modifiers in the group.\nDefault: `0`."
|
|
92
|
+
).min(0).max(25).optional().nullable(),
|
|
93
|
+
maxSelections: z.number().int().describe(
|
|
94
|
+
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
95
|
+
).min(0).max(25).optional().nullable()
|
|
96
|
+
}).describe("Modifier group details.").optional(),
|
|
97
|
+
extendedFields: z.object({
|
|
98
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
99
|
+
"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)."
|
|
100
|
+
).optional()
|
|
101
|
+
}).describe("Extended fields.").optional(),
|
|
102
|
+
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
103
|
+
}).describe("Modifier group details.")
|
|
104
|
+
});
|
|
105
|
+
var CreateModifierGroupResponse = z.object({
|
|
106
|
+
_id: z.string().describe("Modifier group 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 modifier group is updated. To prevent conflicting changes, the current revision must be passed when updating the modifier group. Ignored when creating a modifier group."
|
|
112
|
+
).optional().nullable(),
|
|
113
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
114
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
115
|
+
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
116
|
+
modifiers: z.array(
|
|
117
|
+
z.object({
|
|
118
|
+
_id: z.string().describe("Item modifier ID.").regex(
|
|
119
|
+
/^[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}$/,
|
|
120
|
+
"Must be a valid GUID"
|
|
121
|
+
).optional(),
|
|
122
|
+
preSelected: z.boolean().describe(
|
|
123
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
124
|
+
).optional().nullable(),
|
|
125
|
+
additionalChargeInfo: z.object({
|
|
126
|
+
additionalCharge: z.string().describe(
|
|
127
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
128
|
+
).optional().nullable()
|
|
129
|
+
}).describe("Item modifier price details.").optional()
|
|
130
|
+
})
|
|
131
|
+
).min(0).max(500).optional(),
|
|
132
|
+
rule: z.object({
|
|
133
|
+
required: z.boolean().describe("Whether the items from the modifier group must be selected.").optional().nullable(),
|
|
134
|
+
minSelections: z.number().int().describe(
|
|
135
|
+
"Minimum number of item modifiers a site visitor must select. The value must be lower or equal to the available item modifiers in the group.\nDefault: `0`."
|
|
136
|
+
).min(0).max(25).optional().nullable(),
|
|
137
|
+
maxSelections: z.number().int().describe(
|
|
138
|
+
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
139
|
+
).min(0).max(25).optional().nullable()
|
|
140
|
+
}).describe("Modifier group details.").optional(),
|
|
141
|
+
extendedFields: z.object({
|
|
142
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
143
|
+
"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)."
|
|
144
|
+
).optional()
|
|
145
|
+
}).describe("Extended fields.").optional(),
|
|
146
|
+
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
147
|
+
});
|
|
148
|
+
var GetModifierGroupRequest = z.object({
|
|
149
|
+
modifierGroupId: z.string().describe("Modifier group ID.").regex(
|
|
150
|
+
/^[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}$/,
|
|
151
|
+
"Must be a valid GUID"
|
|
152
|
+
)
|
|
153
|
+
});
|
|
154
|
+
var GetModifierGroupResponse = z.object({
|
|
155
|
+
_id: z.string().describe("Modifier group ID.").regex(
|
|
156
|
+
/^[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}$/,
|
|
157
|
+
"Must be a valid GUID"
|
|
158
|
+
).optional().nullable(),
|
|
159
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
160
|
+
"Revision number, which increments by 1 each time the modifier group is updated. To prevent conflicting changes, the current revision must be passed when updating the modifier group. Ignored when creating a modifier group."
|
|
161
|
+
).optional().nullable(),
|
|
162
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
163
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
164
|
+
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
165
|
+
modifiers: z.array(
|
|
166
|
+
z.object({
|
|
167
|
+
_id: z.string().describe("Item modifier ID.").regex(
|
|
168
|
+
/^[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}$/,
|
|
169
|
+
"Must be a valid GUID"
|
|
170
|
+
).optional(),
|
|
171
|
+
preSelected: z.boolean().describe(
|
|
172
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
173
|
+
).optional().nullable(),
|
|
174
|
+
additionalChargeInfo: z.object({
|
|
175
|
+
additionalCharge: z.string().describe(
|
|
176
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
177
|
+
).optional().nullable()
|
|
178
|
+
}).describe("Item modifier price details.").optional()
|
|
179
|
+
})
|
|
180
|
+
).min(0).max(500).optional(),
|
|
181
|
+
rule: z.object({
|
|
182
|
+
required: z.boolean().describe("Whether the items from the modifier group must be selected.").optional().nullable(),
|
|
183
|
+
minSelections: z.number().int().describe(
|
|
184
|
+
"Minimum number of item modifiers a site visitor must select. The value must be lower or equal to the available item modifiers in the group.\nDefault: `0`."
|
|
185
|
+
).min(0).max(25).optional().nullable(),
|
|
186
|
+
maxSelections: z.number().int().describe(
|
|
187
|
+
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
188
|
+
).min(0).max(25).optional().nullable()
|
|
189
|
+
}).describe("Modifier group details.").optional(),
|
|
190
|
+
extendedFields: z.object({
|
|
191
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
192
|
+
"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)."
|
|
193
|
+
).optional()
|
|
194
|
+
}).describe("Extended fields.").optional(),
|
|
195
|
+
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
196
|
+
});
|
|
197
|
+
var ListModifierGroupsRequest = z.object({
|
|
198
|
+
options: z.object({
|
|
199
|
+
modifierGroupIds: z.array(z.string()).max(500).optional(),
|
|
200
|
+
paging: z.object({
|
|
201
|
+
limit: z.number().int().describe("Number of items to load.").min(0).max(500).optional().nullable(),
|
|
202
|
+
cursor: z.string().describe(
|
|
203
|
+
"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."
|
|
204
|
+
).optional().nullable()
|
|
205
|
+
}).describe("The metadata of the paginated results.").optional()
|
|
206
|
+
}).optional()
|
|
207
|
+
});
|
|
208
|
+
var ListModifierGroupsResponse = z.object({
|
|
209
|
+
modifierGroups: z.array(
|
|
210
|
+
z.object({
|
|
211
|
+
_id: z.string().describe("Modifier group ID.").regex(
|
|
212
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
213
|
+
"Must be a valid GUID"
|
|
214
|
+
).optional().nullable(),
|
|
215
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
216
|
+
"Revision number, which increments by 1 each time the modifier group is updated. To prevent conflicting changes, the current revision must be passed when updating the modifier group. Ignored when creating a modifier group."
|
|
217
|
+
).optional().nullable(),
|
|
218
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
219
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
220
|
+
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
221
|
+
modifiers: z.array(
|
|
222
|
+
z.object({
|
|
223
|
+
_id: z.string().describe("Item modifier ID.").regex(
|
|
224
|
+
/^[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}$/,
|
|
225
|
+
"Must be a valid GUID"
|
|
226
|
+
).optional(),
|
|
227
|
+
preSelected: z.boolean().describe(
|
|
228
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
229
|
+
).optional().nullable(),
|
|
230
|
+
additionalChargeInfo: z.object({
|
|
231
|
+
additionalCharge: z.string().describe(
|
|
232
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
233
|
+
).optional().nullable()
|
|
234
|
+
}).describe("Item modifier price details.").optional()
|
|
235
|
+
})
|
|
236
|
+
).min(0).max(500).optional(),
|
|
237
|
+
rule: z.object({
|
|
238
|
+
required: z.boolean().describe(
|
|
239
|
+
"Whether the items from the modifier group must be selected."
|
|
240
|
+
).optional().nullable(),
|
|
241
|
+
minSelections: z.number().int().describe(
|
|
242
|
+
"Minimum number of item modifiers a site visitor must select. The value must be lower or equal to the available item modifiers in the group.\nDefault: `0`."
|
|
243
|
+
).min(0).max(25).optional().nullable(),
|
|
244
|
+
maxSelections: z.number().int().describe(
|
|
245
|
+
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
246
|
+
).min(0).max(25).optional().nullable()
|
|
247
|
+
}).describe("Modifier group details.").optional(),
|
|
248
|
+
extendedFields: z.object({
|
|
249
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
250
|
+
"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)."
|
|
251
|
+
).optional()
|
|
252
|
+
}).describe("Extended fields.").optional(),
|
|
253
|
+
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
254
|
+
})
|
|
255
|
+
).optional(),
|
|
256
|
+
metadata: z.object({
|
|
257
|
+
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
258
|
+
cursors: z.object({
|
|
259
|
+
next: z.string().describe("Cursor pointing to next page in the list of results.").optional().nullable(),
|
|
260
|
+
prev: z.string().describe(
|
|
261
|
+
"Cursor pointing to previous page in the list of results."
|
|
262
|
+
).optional().nullable()
|
|
263
|
+
}).describe("Offset that was requested.").optional(),
|
|
264
|
+
hasNext: z.boolean().describe(
|
|
265
|
+
"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."
|
|
266
|
+
).optional().nullable()
|
|
267
|
+
}).describe("The metadata of the paginated results.").optional()
|
|
268
|
+
});
|
|
269
|
+
var QueryModifierGroupsRequest = z.object({
|
|
270
|
+
query: z.object({
|
|
271
|
+
filter: z.object({
|
|
272
|
+
_id: z.object({
|
|
273
|
+
$eq: z.string(),
|
|
274
|
+
$in: z.array(z.string()),
|
|
275
|
+
$ne: z.string(),
|
|
276
|
+
$nin: z.array(z.string())
|
|
277
|
+
}).partial().strict().optional(),
|
|
278
|
+
_createdDate: z.object({
|
|
279
|
+
$eq: z.string(),
|
|
280
|
+
$gt: z.string(),
|
|
281
|
+
$gte: z.string(),
|
|
282
|
+
$lt: z.string(),
|
|
283
|
+
$lte: z.string(),
|
|
284
|
+
$ne: z.string()
|
|
285
|
+
}).partial().strict().optional(),
|
|
286
|
+
_updatedDate: z.object({
|
|
287
|
+
$eq: z.string(),
|
|
288
|
+
$gt: z.string(),
|
|
289
|
+
$gte: z.string(),
|
|
290
|
+
$lt: z.string(),
|
|
291
|
+
$lte: z.string(),
|
|
292
|
+
$ne: z.string()
|
|
293
|
+
}).partial().strict().optional(),
|
|
294
|
+
"modifiers._id": z.object({
|
|
295
|
+
$hasSome: z.array(z.string()),
|
|
296
|
+
$in: z.array(z.string()),
|
|
297
|
+
$nin: z.array(z.string())
|
|
298
|
+
}).partial().strict().optional(),
|
|
299
|
+
"modifiers.preSelected": z.object({ $eq: z.boolean(), $ne: z.boolean() }).partial().strict().optional(),
|
|
300
|
+
"rule.minSelections": z.object({ $eq: z.number(), $ne: z.number() }).partial().strict().optional(),
|
|
301
|
+
"rule.maxSelections": z.object({ $eq: z.number(), $ne: z.number() }).partial().strict().optional(),
|
|
302
|
+
modifiers: z.object({ $exists: z.boolean() }).partial().strict().optional(),
|
|
303
|
+
"rule.required": z.object({
|
|
304
|
+
$eq: z.boolean(),
|
|
305
|
+
$in: z.array(z.boolean()),
|
|
306
|
+
$ne: z.boolean(),
|
|
307
|
+
$nin: z.array(z.boolean())
|
|
308
|
+
}).partial().strict().optional(),
|
|
309
|
+
rule: z.object({ $exists: z.boolean() }).partial().strict().optional(),
|
|
310
|
+
name: z.object({
|
|
311
|
+
$eq: z.string(),
|
|
312
|
+
$in: z.array(z.string()),
|
|
313
|
+
$ne: z.string(),
|
|
314
|
+
$nin: z.array(z.string()),
|
|
315
|
+
$startsWith: z.string()
|
|
316
|
+
}).partial().strict().optional(),
|
|
317
|
+
$and: z.array(z.any()).optional(),
|
|
318
|
+
$or: z.array(z.any()).optional(),
|
|
319
|
+
$not: z.any().optional()
|
|
320
|
+
}).strict().optional(),
|
|
321
|
+
sort: z.array(z.object({})).optional()
|
|
322
|
+
}).catchall(z.any()).describe("Query options.")
|
|
323
|
+
});
|
|
324
|
+
var QueryModifierGroupsResponse = z.object({
|
|
325
|
+
modifierGroups: z.array(
|
|
326
|
+
z.object({
|
|
327
|
+
_id: z.string().describe("Modifier group ID.").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
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
332
|
+
"Revision number, which increments by 1 each time the modifier group is updated. To prevent conflicting changes, the current revision must be passed when updating the modifier group. Ignored when creating a modifier group."
|
|
333
|
+
).optional().nullable(),
|
|
334
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
335
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
336
|
+
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
337
|
+
modifiers: z.array(
|
|
338
|
+
z.object({
|
|
339
|
+
_id: z.string().describe("Item modifier ID.").regex(
|
|
340
|
+
/^[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}$/,
|
|
341
|
+
"Must be a valid GUID"
|
|
342
|
+
).optional(),
|
|
343
|
+
preSelected: z.boolean().describe(
|
|
344
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
345
|
+
).optional().nullable(),
|
|
346
|
+
additionalChargeInfo: z.object({
|
|
347
|
+
additionalCharge: z.string().describe(
|
|
348
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
349
|
+
).optional().nullable()
|
|
350
|
+
}).describe("Item modifier price details.").optional()
|
|
351
|
+
})
|
|
352
|
+
).min(0).max(500).optional(),
|
|
353
|
+
rule: z.object({
|
|
354
|
+
required: z.boolean().describe(
|
|
355
|
+
"Whether the items from the modifier group must be selected."
|
|
356
|
+
).optional().nullable(),
|
|
357
|
+
minSelections: z.number().int().describe(
|
|
358
|
+
"Minimum number of item modifiers a site visitor must select. The value must be lower or equal to the available item modifiers in the group.\nDefault: `0`."
|
|
359
|
+
).min(0).max(25).optional().nullable(),
|
|
360
|
+
maxSelections: z.number().int().describe(
|
|
361
|
+
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
362
|
+
).min(0).max(25).optional().nullable()
|
|
363
|
+
}).describe("Modifier group details.").optional(),
|
|
364
|
+
extendedFields: z.object({
|
|
365
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
366
|
+
"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)."
|
|
367
|
+
).optional()
|
|
368
|
+
}).describe("Extended fields.").optional(),
|
|
369
|
+
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
370
|
+
})
|
|
371
|
+
).optional(),
|
|
372
|
+
pagingMetadata: z.object({
|
|
373
|
+
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
374
|
+
cursors: z.object({
|
|
375
|
+
next: z.string().describe("Cursor pointing to next page in the list of results.").optional().nullable(),
|
|
376
|
+
prev: z.string().describe(
|
|
377
|
+
"Cursor pointing to previous page in the list of results."
|
|
378
|
+
).optional().nullable()
|
|
379
|
+
}).describe("Offset that was requested.").optional(),
|
|
380
|
+
hasNext: z.boolean().describe(
|
|
381
|
+
"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."
|
|
382
|
+
).optional().nullable()
|
|
383
|
+
}).describe("Metadata of the paginated results.").optional()
|
|
384
|
+
});
|
|
385
|
+
var CountModifierGroupsRequest = z.object({
|
|
386
|
+
options: z.object({
|
|
387
|
+
filter: z.record(z.string(), z.any()).describe("Filter for counting modifier groups.").optional().nullable()
|
|
388
|
+
}).optional()
|
|
389
|
+
});
|
|
390
|
+
var CountModifierGroupsResponse = z.object({
|
|
391
|
+
count: z.number().int().describe("Counted modifier groups.").optional()
|
|
392
|
+
});
|
|
393
|
+
var UpdateModifierGroupRequest = z.object({
|
|
394
|
+
_id: z.string().describe("Modifier group ID.").regex(
|
|
395
|
+
/^[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}$/,
|
|
396
|
+
"Must be a valid GUID"
|
|
397
|
+
),
|
|
398
|
+
modifierGroup: z.object({
|
|
399
|
+
_id: z.string().describe("Modifier group ID.").regex(
|
|
400
|
+
/^[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}$/,
|
|
401
|
+
"Must be a valid GUID"
|
|
402
|
+
).optional().nullable(),
|
|
403
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
404
|
+
"Revision number, which increments by 1 each time the modifier group is updated. To prevent conflicting changes, the current revision must be passed when updating the modifier group. Ignored when creating a modifier group."
|
|
405
|
+
),
|
|
406
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
407
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
408
|
+
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
409
|
+
modifiers: z.array(
|
|
410
|
+
z.object({
|
|
411
|
+
_id: z.string().describe("Item modifier ID.").regex(
|
|
412
|
+
/^[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}$/,
|
|
413
|
+
"Must be a valid GUID"
|
|
414
|
+
).optional(),
|
|
415
|
+
preSelected: z.boolean().describe(
|
|
416
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
417
|
+
).optional().nullable(),
|
|
418
|
+
additionalChargeInfo: z.object({
|
|
419
|
+
additionalCharge: z.string().describe(
|
|
420
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
421
|
+
).optional().nullable()
|
|
422
|
+
}).describe("Item modifier price details.").optional()
|
|
423
|
+
})
|
|
424
|
+
).min(0).max(500).optional(),
|
|
425
|
+
rule: z.object({
|
|
426
|
+
required: z.boolean().describe(
|
|
427
|
+
"Whether the items from the modifier group must be selected."
|
|
428
|
+
).optional().nullable(),
|
|
429
|
+
minSelections: z.number().int().describe(
|
|
430
|
+
"Minimum number of item modifiers a site visitor must select. The value must be lower or equal to the available item modifiers in the group.\nDefault: `0`."
|
|
431
|
+
).min(0).max(25).optional().nullable(),
|
|
432
|
+
maxSelections: z.number().int().describe(
|
|
433
|
+
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
434
|
+
).min(0).max(25).optional().nullable()
|
|
435
|
+
}).describe("Modifier group details.").optional(),
|
|
436
|
+
extendedFields: z.object({
|
|
437
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
438
|
+
"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)."
|
|
439
|
+
).optional()
|
|
440
|
+
}).describe("Extended fields.").optional(),
|
|
441
|
+
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
442
|
+
}).describe("Modifier group to update.")
|
|
443
|
+
});
|
|
444
|
+
var UpdateModifierGroupResponse = z.object({
|
|
445
|
+
_id: z.string().describe("Modifier group ID.").regex(
|
|
446
|
+
/^[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}$/,
|
|
447
|
+
"Must be a valid GUID"
|
|
448
|
+
).optional().nullable(),
|
|
449
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
450
|
+
"Revision number, which increments by 1 each time the modifier group is updated. To prevent conflicting changes, the current revision must be passed when updating the modifier group. Ignored when creating a modifier group."
|
|
451
|
+
).optional().nullable(),
|
|
452
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
453
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
454
|
+
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
455
|
+
modifiers: z.array(
|
|
456
|
+
z.object({
|
|
457
|
+
_id: z.string().describe("Item modifier ID.").regex(
|
|
458
|
+
/^[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}$/,
|
|
459
|
+
"Must be a valid GUID"
|
|
460
|
+
).optional(),
|
|
461
|
+
preSelected: z.boolean().describe(
|
|
462
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
463
|
+
).optional().nullable(),
|
|
464
|
+
additionalChargeInfo: z.object({
|
|
465
|
+
additionalCharge: z.string().describe(
|
|
466
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
467
|
+
).optional().nullable()
|
|
468
|
+
}).describe("Item modifier price details.").optional()
|
|
469
|
+
})
|
|
470
|
+
).min(0).max(500).optional(),
|
|
471
|
+
rule: z.object({
|
|
472
|
+
required: z.boolean().describe("Whether the items from the modifier group must be selected.").optional().nullable(),
|
|
473
|
+
minSelections: z.number().int().describe(
|
|
474
|
+
"Minimum number of item modifiers a site visitor must select. The value must be lower or equal to the available item modifiers in the group.\nDefault: `0`."
|
|
475
|
+
).min(0).max(25).optional().nullable(),
|
|
476
|
+
maxSelections: z.number().int().describe(
|
|
477
|
+
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
478
|
+
).min(0).max(25).optional().nullable()
|
|
479
|
+
}).describe("Modifier group details.").optional(),
|
|
480
|
+
extendedFields: z.object({
|
|
481
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
482
|
+
"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)."
|
|
483
|
+
).optional()
|
|
484
|
+
}).describe("Extended fields.").optional(),
|
|
485
|
+
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
486
|
+
});
|
|
487
|
+
var DeleteModifierGroupRequest = z.object({
|
|
488
|
+
modifierGroupId: z.string().describe("Modifier group ID.").regex(
|
|
489
|
+
/^[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}$/,
|
|
490
|
+
"Must be a valid GUID"
|
|
491
|
+
)
|
|
492
|
+
});
|
|
493
|
+
var DeleteModifierGroupResponse = z.object({});
|
|
494
|
+
var BulkCreateModifierGroupsRequest = z.object({
|
|
495
|
+
modifierGroups: z.array(
|
|
496
|
+
z.object({
|
|
497
|
+
_id: z.string().describe("Modifier group ID.").regex(
|
|
498
|
+
/^[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}$/,
|
|
499
|
+
"Must be a valid GUID"
|
|
500
|
+
).optional().nullable(),
|
|
501
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
502
|
+
"Revision number, which increments by 1 each time the modifier group is updated. To prevent conflicting changes, the current revision must be passed when updating the modifier group. Ignored when creating a modifier group."
|
|
503
|
+
).optional().nullable(),
|
|
504
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
505
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
506
|
+
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
507
|
+
modifiers: z.array(
|
|
508
|
+
z.object({
|
|
509
|
+
_id: z.string().describe("Item modifier ID.").regex(
|
|
510
|
+
/^[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}$/,
|
|
511
|
+
"Must be a valid GUID"
|
|
512
|
+
).optional(),
|
|
513
|
+
preSelected: z.boolean().describe(
|
|
514
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
515
|
+
).optional().nullable(),
|
|
516
|
+
additionalChargeInfo: z.object({
|
|
517
|
+
additionalCharge: z.string().describe(
|
|
518
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
519
|
+
).optional().nullable()
|
|
520
|
+
}).describe("Item modifier price details.").optional()
|
|
521
|
+
})
|
|
522
|
+
).min(0).max(500).optional(),
|
|
523
|
+
rule: z.object({
|
|
524
|
+
required: z.boolean().describe(
|
|
525
|
+
"Whether the items from the modifier group must be selected."
|
|
526
|
+
).optional().nullable(),
|
|
527
|
+
minSelections: z.number().int().describe(
|
|
528
|
+
"Minimum number of item modifiers a site visitor must select. The value must be lower or equal to the available item modifiers in the group.\nDefault: `0`."
|
|
529
|
+
).min(0).max(25).optional().nullable(),
|
|
530
|
+
maxSelections: z.number().int().describe(
|
|
531
|
+
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
532
|
+
).min(0).max(25).optional().nullable()
|
|
533
|
+
}).describe("Modifier group details.").optional(),
|
|
534
|
+
extendedFields: z.object({
|
|
535
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
536
|
+
"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)."
|
|
537
|
+
).optional()
|
|
538
|
+
}).describe("Extended fields.").optional(),
|
|
539
|
+
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
540
|
+
})
|
|
541
|
+
).max(100),
|
|
542
|
+
options: z.object({
|
|
543
|
+
returnEntity: z.boolean().describe(
|
|
544
|
+
"Whether to receive the created modifier groups in the response."
|
|
545
|
+
).optional()
|
|
546
|
+
}).optional()
|
|
547
|
+
});
|
|
548
|
+
var BulkCreateModifierGroupsResponse = z.object({
|
|
549
|
+
results: z.array(
|
|
550
|
+
z.object({
|
|
551
|
+
itemMetadata: z.object({
|
|
552
|
+
_id: z.string().describe(
|
|
553
|
+
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
554
|
+
).optional().nullable(),
|
|
555
|
+
originalIndex: z.number().int().describe(
|
|
556
|
+
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
557
|
+
).optional(),
|
|
558
|
+
success: z.boolean().describe(
|
|
559
|
+
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
560
|
+
).optional(),
|
|
561
|
+
error: z.object({
|
|
562
|
+
code: z.string().describe("Error code.").optional(),
|
|
563
|
+
description: z.string().describe("Description of the error.").optional(),
|
|
564
|
+
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
565
|
+
}).describe("Details about the error in case of failure.").optional()
|
|
566
|
+
}).describe("Metadata for group modifier creation.").optional(),
|
|
567
|
+
modifierGroup: z.object({
|
|
568
|
+
_id: z.string().describe("Modifier group ID.").regex(
|
|
569
|
+
/^[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}$/,
|
|
570
|
+
"Must be a valid GUID"
|
|
571
|
+
).optional().nullable(),
|
|
572
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
573
|
+
"Revision number, which increments by 1 each time the modifier group is updated. To prevent conflicting changes, the current revision must be passed when updating the modifier group. Ignored when creating a modifier group."
|
|
574
|
+
).optional().nullable(),
|
|
575
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
576
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
577
|
+
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
578
|
+
modifiers: z.array(
|
|
579
|
+
z.object({
|
|
580
|
+
_id: z.string().describe("Item modifier ID.").regex(
|
|
581
|
+
/^[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}$/,
|
|
582
|
+
"Must be a valid GUID"
|
|
583
|
+
).optional(),
|
|
584
|
+
preSelected: z.boolean().describe(
|
|
585
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
586
|
+
).optional().nullable(),
|
|
587
|
+
additionalChargeInfo: z.object({
|
|
588
|
+
additionalCharge: z.string().describe(
|
|
589
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
590
|
+
).optional().nullable()
|
|
591
|
+
}).describe("Item modifier price details.").optional()
|
|
592
|
+
})
|
|
593
|
+
).min(0).max(500).optional(),
|
|
594
|
+
rule: z.object({
|
|
595
|
+
required: z.boolean().describe(
|
|
596
|
+
"Whether the items from the modifier group must be selected."
|
|
597
|
+
).optional().nullable(),
|
|
598
|
+
minSelections: z.number().int().describe(
|
|
599
|
+
"Minimum number of item modifiers a site visitor must select. The value must be lower or equal to the available item modifiers in the group.\nDefault: `0`."
|
|
600
|
+
).min(0).max(25).optional().nullable(),
|
|
601
|
+
maxSelections: z.number().int().describe(
|
|
602
|
+
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
603
|
+
).min(0).max(25).optional().nullable()
|
|
604
|
+
}).describe("Modifier group details.").optional(),
|
|
605
|
+
extendedFields: z.object({
|
|
606
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
607
|
+
"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)."
|
|
608
|
+
).optional()
|
|
609
|
+
}).describe("Extended fields.").optional(),
|
|
610
|
+
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
611
|
+
}).describe("Created modifier group.").optional()
|
|
612
|
+
})
|
|
613
|
+
).optional(),
|
|
614
|
+
bulkActionMetadata: z.object({
|
|
615
|
+
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
616
|
+
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
617
|
+
undetailedFailures: z.number().int().describe(
|
|
618
|
+
"Number of failures without details because detailed failure threshold was exceeded."
|
|
619
|
+
).optional()
|
|
620
|
+
}).describe("Metadata for the API call.").optional()
|
|
621
|
+
});
|
|
622
|
+
var BulkUpdateModifierGroupsRequest = z.object({
|
|
623
|
+
modifierGroups: z.array(
|
|
624
|
+
z.object({
|
|
625
|
+
modifierGroup: z.object({
|
|
626
|
+
_id: z.string().describe("Modifier group ID.").regex(
|
|
627
|
+
/^[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}$/,
|
|
628
|
+
"Must be a valid GUID"
|
|
629
|
+
),
|
|
630
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
631
|
+
"Revision number, which increments by 1 each time the modifier group is updated. To prevent conflicting changes, the current revision must be passed when updating the modifier group. Ignored when creating a modifier group."
|
|
632
|
+
),
|
|
633
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
634
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
635
|
+
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
636
|
+
modifiers: z.array(
|
|
637
|
+
z.object({
|
|
638
|
+
_id: z.string().describe("Item modifier ID.").regex(
|
|
639
|
+
/^[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}$/,
|
|
640
|
+
"Must be a valid GUID"
|
|
641
|
+
).optional(),
|
|
642
|
+
preSelected: z.boolean().describe(
|
|
643
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
644
|
+
).optional().nullable(),
|
|
645
|
+
additionalChargeInfo: z.object({
|
|
646
|
+
additionalCharge: z.string().describe(
|
|
647
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
648
|
+
).optional().nullable()
|
|
649
|
+
}).describe("Item modifier price details.").optional()
|
|
650
|
+
})
|
|
651
|
+
).min(0).max(500).optional(),
|
|
652
|
+
rule: z.object({
|
|
653
|
+
required: z.boolean().describe(
|
|
654
|
+
"Whether the items from the modifier group must be selected."
|
|
655
|
+
).optional().nullable(),
|
|
656
|
+
minSelections: z.number().int().describe(
|
|
657
|
+
"Minimum number of item modifiers a site visitor must select. The value must be lower or equal to the available item modifiers in the group.\nDefault: `0`."
|
|
658
|
+
).min(0).max(25).optional().nullable(),
|
|
659
|
+
maxSelections: z.number().int().describe(
|
|
660
|
+
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
661
|
+
).min(0).max(25).optional().nullable()
|
|
662
|
+
}).describe("Modifier group details.").optional(),
|
|
663
|
+
extendedFields: z.object({
|
|
664
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
665
|
+
"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)."
|
|
666
|
+
).optional()
|
|
667
|
+
}).describe("Extended fields.").optional(),
|
|
668
|
+
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
669
|
+
}).describe("Modifier group to update.").optional(),
|
|
670
|
+
mask: z.array(z.string()).optional()
|
|
671
|
+
})
|
|
672
|
+
).min(1).max(100),
|
|
673
|
+
options: z.object({
|
|
674
|
+
returnEntity: z.boolean().describe(
|
|
675
|
+
"Whether to receive the updated modifier groups in the response."
|
|
676
|
+
).optional()
|
|
677
|
+
}).optional()
|
|
678
|
+
});
|
|
679
|
+
var BulkUpdateModifierGroupsResponse = z.object({
|
|
680
|
+
results: z.array(
|
|
681
|
+
z.object({
|
|
682
|
+
itemMetadata: z.object({
|
|
683
|
+
_id: z.string().describe(
|
|
684
|
+
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
685
|
+
).optional().nullable(),
|
|
686
|
+
originalIndex: z.number().int().describe(
|
|
687
|
+
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
688
|
+
).optional(),
|
|
689
|
+
success: z.boolean().describe(
|
|
690
|
+
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
691
|
+
).optional(),
|
|
692
|
+
error: z.object({
|
|
693
|
+
code: z.string().describe("Error code.").optional(),
|
|
694
|
+
description: z.string().describe("Description of the error.").optional(),
|
|
695
|
+
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
696
|
+
}).describe("Details about the error in case of failure.").optional()
|
|
697
|
+
}).describe("Metadata for group modifier update.").optional(),
|
|
698
|
+
modifierGroup: z.object({
|
|
699
|
+
_id: z.string().describe("Modifier group ID.").regex(
|
|
700
|
+
/^[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}$/,
|
|
701
|
+
"Must be a valid GUID"
|
|
702
|
+
).optional().nullable(),
|
|
703
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
704
|
+
"Revision number, which increments by 1 each time the modifier group is updated. To prevent conflicting changes, the current revision must be passed when updating the modifier group. Ignored when creating a modifier group."
|
|
705
|
+
).optional().nullable(),
|
|
706
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
707
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
708
|
+
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
709
|
+
modifiers: z.array(
|
|
710
|
+
z.object({
|
|
711
|
+
_id: z.string().describe("Item modifier ID.").regex(
|
|
712
|
+
/^[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}$/,
|
|
713
|
+
"Must be a valid GUID"
|
|
714
|
+
).optional(),
|
|
715
|
+
preSelected: z.boolean().describe(
|
|
716
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
717
|
+
).optional().nullable(),
|
|
718
|
+
additionalChargeInfo: z.object({
|
|
719
|
+
additionalCharge: z.string().describe(
|
|
720
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
721
|
+
).optional().nullable()
|
|
722
|
+
}).describe("Item modifier price details.").optional()
|
|
723
|
+
})
|
|
724
|
+
).min(0).max(500).optional(),
|
|
725
|
+
rule: z.object({
|
|
726
|
+
required: z.boolean().describe(
|
|
727
|
+
"Whether the items from the modifier group must be selected."
|
|
728
|
+
).optional().nullable(),
|
|
729
|
+
minSelections: z.number().int().describe(
|
|
730
|
+
"Minimum number of item modifiers a site visitor must select. The value must be lower or equal to the available item modifiers in the group.\nDefault: `0`."
|
|
731
|
+
).min(0).max(25).optional().nullable(),
|
|
732
|
+
maxSelections: z.number().int().describe(
|
|
733
|
+
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
734
|
+
).min(0).max(25).optional().nullable()
|
|
735
|
+
}).describe("Modifier group details.").optional(),
|
|
736
|
+
extendedFields: z.object({
|
|
737
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
738
|
+
"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)."
|
|
739
|
+
).optional()
|
|
740
|
+
}).describe("Extended fields.").optional(),
|
|
741
|
+
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
742
|
+
}).describe(
|
|
743
|
+
"Updated modifier group. Only returned if `returnEntity` is set to `true`."
|
|
744
|
+
).optional()
|
|
745
|
+
})
|
|
746
|
+
).min(1).max(100).optional(),
|
|
747
|
+
bulkActionMetadata: z.object({
|
|
748
|
+
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
749
|
+
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
750
|
+
undetailedFailures: z.number().int().describe(
|
|
751
|
+
"Number of failures without details because detailed failure threshold was exceeded."
|
|
752
|
+
).optional()
|
|
753
|
+
}).describe("Metadata for the API call.").optional()
|
|
754
|
+
});
|
|
755
|
+
var BulkDeleteModifierGroupsRequest = z.object({
|
|
756
|
+
ids: z.array(z.string()).max(200)
|
|
757
|
+
});
|
|
758
|
+
var BulkDeleteModifierGroupsResponse = z.object({
|
|
759
|
+
results: z.array(
|
|
760
|
+
z.object({
|
|
761
|
+
itemMetadata: z.object({
|
|
762
|
+
_id: z.string().describe(
|
|
763
|
+
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
764
|
+
).optional().nullable(),
|
|
765
|
+
originalIndex: z.number().int().describe(
|
|
766
|
+
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
767
|
+
).optional(),
|
|
768
|
+
success: z.boolean().describe(
|
|
769
|
+
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
770
|
+
).optional(),
|
|
771
|
+
error: z.object({
|
|
772
|
+
code: z.string().describe("Error code.").optional(),
|
|
773
|
+
description: z.string().describe("Description of the error.").optional(),
|
|
774
|
+
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
775
|
+
}).describe("Details about the error in case of failure.").optional()
|
|
776
|
+
}).describe("Metadata for group modifier deletion.").optional()
|
|
777
|
+
})
|
|
778
|
+
).optional(),
|
|
779
|
+
bulkActionMetadata: z.object({
|
|
780
|
+
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
781
|
+
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
782
|
+
undetailedFailures: z.number().int().describe(
|
|
783
|
+
"Number of failures without details because detailed failure threshold was exceeded."
|
|
784
|
+
).optional()
|
|
785
|
+
}).describe("Metadata for the API call.").optional()
|
|
786
|
+
});
|
|
787
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
788
|
+
0 && (module.exports = {
|
|
789
|
+
BulkCreateModifierGroupsRequest,
|
|
790
|
+
BulkCreateModifierGroupsResponse,
|
|
791
|
+
BulkDeleteModifierGroupsRequest,
|
|
792
|
+
BulkDeleteModifierGroupsResponse,
|
|
793
|
+
BulkUpdateModifierGroupsRequest,
|
|
794
|
+
BulkUpdateModifierGroupsResponse,
|
|
795
|
+
CountModifierGroupsRequest,
|
|
796
|
+
CountModifierGroupsResponse,
|
|
797
|
+
CreateModifierGroupRequest,
|
|
798
|
+
CreateModifierGroupResponse,
|
|
799
|
+
DeleteModifierGroupRequest,
|
|
800
|
+
DeleteModifierGroupResponse,
|
|
801
|
+
GetModifierGroupRequest,
|
|
802
|
+
GetModifierGroupResponse,
|
|
803
|
+
ListModifierGroupsRequest,
|
|
804
|
+
ListModifierGroupsResponse,
|
|
805
|
+
QueryModifierGroupsRequest,
|
|
806
|
+
QueryModifierGroupsResponse,
|
|
807
|
+
UpdateModifierGroupRequest,
|
|
808
|
+
UpdateModifierGroupResponse
|
|
809
|
+
});
|
|
810
|
+
//# sourceMappingURL=schemas.js.map
|