@deliverart/sdk-js-menu 0.0.0-dev-20260721002647
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/README.md +226 -0
- package/dist/index.cjs +1543 -0
- package/dist/index.d.cts +4488 -0
- package/dist/index.d.ts +4488 -0
- package/dist/index.js +1370 -0
- package/package.json +35 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,1370 @@
|
|
|
1
|
+
// src/models.ts
|
|
2
|
+
import {
|
|
3
|
+
arrayContainsMatchSchema,
|
|
4
|
+
booleanSchema,
|
|
5
|
+
datetimeSchema,
|
|
6
|
+
menuItemModifierScopeSchema as menuItemModifierScopeSchema2,
|
|
7
|
+
menuItemModifierTargetItemTypeSchema,
|
|
8
|
+
sortDirSchema,
|
|
9
|
+
timestampsFilterSchema
|
|
10
|
+
} from "@deliverart/sdk-js-global-types";
|
|
11
|
+
import { imageIriSchema, imageSchema } from "@deliverart/sdk-js-image";
|
|
12
|
+
import { pointOfSaleIriSchema } from "@deliverart/sdk-js-point-of-sale";
|
|
13
|
+
import { salesModeIriSchema } from "@deliverart/sdk-js-sales-mode";
|
|
14
|
+
import { z } from "zod";
|
|
15
|
+
|
|
16
|
+
// src/types.ts
|
|
17
|
+
import { iriNullableSchema, iriSchema } from "@deliverart/sdk-js-global-types";
|
|
18
|
+
import {
|
|
19
|
+
menuChannels,
|
|
20
|
+
menuChannelSchema,
|
|
21
|
+
menuItemAllergens,
|
|
22
|
+
menuItemAllergenSchema,
|
|
23
|
+
menuItemDiets,
|
|
24
|
+
menuItemDietSchema,
|
|
25
|
+
menuItemModifierScopes,
|
|
26
|
+
menuItemModifierScopeSchema,
|
|
27
|
+
menuItemPriceOverrideTypes,
|
|
28
|
+
menuItemPriceOverrideTypeSchema,
|
|
29
|
+
menuItemTypes,
|
|
30
|
+
menuItemTypeSchema
|
|
31
|
+
} from "@deliverart/sdk-js-global-types";
|
|
32
|
+
var menuItemIriSchema = iriSchema("/menu_items/:id");
|
|
33
|
+
var menuItemNullableIriSchema = iriNullableSchema("/menu_items/:id");
|
|
34
|
+
var menuVersionIriSchema = iriSchema("/point_of_sales/:pointOfSaleId/menu_versions/:id");
|
|
35
|
+
var menuVersionNullableIriSchema = iriNullableSchema(
|
|
36
|
+
"/point_of_sales/:pointOfSaleId/menu_versions/:id"
|
|
37
|
+
);
|
|
38
|
+
var menuItemSalesPriceIriSchema = iriSchema("/menu_items/sales_prices/:id");
|
|
39
|
+
var menuItemSalesPriceNullableIriSchema = iriNullableSchema("/menu_items/sales_prices/:id");
|
|
40
|
+
var menuItemCategoryIriSchema = iriSchema("/menu_item_categories/:id");
|
|
41
|
+
var menuItemCategoryNullableIriSchema = iriNullableSchema("/menu_item_categories/:id");
|
|
42
|
+
var menuItemModifierIriSchema = iriSchema("/menu_item_modifiers/:id");
|
|
43
|
+
var menuItemModifierNullableIriSchema = iriNullableSchema("/menu_item_modifiers/:id");
|
|
44
|
+
var menuItemPriceOverrideIriSchema = iriSchema("/menu_item_price_overrides/:id");
|
|
45
|
+
var menuItemPriceOverrideNullableIriSchema = iriNullableSchema(
|
|
46
|
+
"/menu_item_price_overrides/:id"
|
|
47
|
+
);
|
|
48
|
+
var menuItemPriceOverrideSalesPriceIriSchema = iriSchema(
|
|
49
|
+
"/menu_item_price_overrides/sales_prices/:id"
|
|
50
|
+
);
|
|
51
|
+
var menuItemPriceOverrideSalesPriceNullableIriSchema = iriNullableSchema(
|
|
52
|
+
"/menu_item_price_overrides/sales_prices/:id"
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
// src/models.ts
|
|
56
|
+
var localeItemSchema = z.object({
|
|
57
|
+
locale: z.string().regex(/^[a-z]{2}(_[A-Z]{2})?$/).nonempty(),
|
|
58
|
+
text: z.string().nonempty()
|
|
59
|
+
}).required();
|
|
60
|
+
var salesPriceDTOSchema = z.object({
|
|
61
|
+
salesMode: salesModeIriSchema,
|
|
62
|
+
price: z.string()
|
|
63
|
+
});
|
|
64
|
+
var menuVersionSchema = z.object({
|
|
65
|
+
id: z.string(),
|
|
66
|
+
pointOfSale: pointOfSaleIriSchema,
|
|
67
|
+
contentUrl: z.url(),
|
|
68
|
+
filePath: z.string(),
|
|
69
|
+
createdAt: datetimeSchema,
|
|
70
|
+
updatedAt: datetimeSchema
|
|
71
|
+
});
|
|
72
|
+
var menuItemCompleteBaseSchema = z.object({
|
|
73
|
+
id: z.string(),
|
|
74
|
+
channels: z.array(menuChannelSchema).min(0),
|
|
75
|
+
tags: z.array(z.string()).min(0),
|
|
76
|
+
category: menuItemCategoryNullableIriSchema,
|
|
77
|
+
type: menuItemTypeSchema,
|
|
78
|
+
name: z.array(localeItemSchema).nonempty(),
|
|
79
|
+
description: z.array(localeItemSchema).min(0),
|
|
80
|
+
allergens: z.array(menuItemAllergenSchema).min(0),
|
|
81
|
+
diets: z.array(menuItemDietSchema).min(0),
|
|
82
|
+
price: z.string(),
|
|
83
|
+
taxRate: z.coerce.number(),
|
|
84
|
+
containsAlcohol: z.boolean(),
|
|
85
|
+
countable: z.boolean(),
|
|
86
|
+
soldIndividually: z.boolean(),
|
|
87
|
+
suspended: z.boolean(),
|
|
88
|
+
compositions: z.array(menuItemIriSchema).min(0),
|
|
89
|
+
modifiers: z.array(menuItemModifierIriSchema).min(0),
|
|
90
|
+
variants: z.array(menuItemPriceOverrideIriSchema).min(0),
|
|
91
|
+
salesPrices: z.array(salesPriceDTOSchema).min(0),
|
|
92
|
+
images: z.array(imageSchema).min(0),
|
|
93
|
+
createdAt: datetimeSchema,
|
|
94
|
+
updatedAt: datetimeSchema
|
|
95
|
+
});
|
|
96
|
+
var menuItemVariantSchema = z.lazy(
|
|
97
|
+
() => z.object({
|
|
98
|
+
id: z.string(),
|
|
99
|
+
type: z.literal("ITEM"),
|
|
100
|
+
price: z.string(),
|
|
101
|
+
inModifier: menuItemModifierNullableIriSchema,
|
|
102
|
+
referenceItem: menuItemSchema,
|
|
103
|
+
suspended: z.boolean(),
|
|
104
|
+
salesPrices: z.array(salesPriceDTOSchema).min(0),
|
|
105
|
+
createdAt: datetimeSchema,
|
|
106
|
+
updatedAt: datetimeSchema
|
|
107
|
+
})
|
|
108
|
+
);
|
|
109
|
+
var menuItemChoiceSchema = z.lazy(
|
|
110
|
+
() => menuItemCompleteBaseSchema.omit({ type: true, category: true, compositions: true, modifiers: true, variants: true }).extend({
|
|
111
|
+
type: z.literal("CHOICE")
|
|
112
|
+
})
|
|
113
|
+
);
|
|
114
|
+
var menuItemItemSchema = z.lazy(
|
|
115
|
+
() => menuItemCompleteBaseSchema.omit({ type: true, variants: true }).extend({
|
|
116
|
+
type: z.literal("ITEM"),
|
|
117
|
+
variants: z.array(menuItemVariantSchema).min(0)
|
|
118
|
+
})
|
|
119
|
+
);
|
|
120
|
+
var menuItemBundleSchema = z.lazy(
|
|
121
|
+
() => menuItemCompleteBaseSchema.omit({ type: true, variants: true }).extend({
|
|
122
|
+
type: z.literal("BUNDLE"),
|
|
123
|
+
variants: z.array(menuItemVariantSchema).min(0)
|
|
124
|
+
})
|
|
125
|
+
);
|
|
126
|
+
var menuItemSchema = z.lazy(
|
|
127
|
+
() => z.discriminatedUnion("type", [
|
|
128
|
+
menuItemChoiceSchema,
|
|
129
|
+
menuItemItemSchema,
|
|
130
|
+
menuItemBundleSchema
|
|
131
|
+
])
|
|
132
|
+
);
|
|
133
|
+
var menuItemChoiceDetailsSchema = z.lazy(
|
|
134
|
+
() => menuItemCompleteBaseSchema.omit({ type: true, category: true, compositions: true, modifiers: true, variants: true }).extend({
|
|
135
|
+
type: z.literal("CHOICE"),
|
|
136
|
+
pointOfSale: pointOfSaleIriSchema
|
|
137
|
+
})
|
|
138
|
+
);
|
|
139
|
+
var menuItemItemDetailsSchema = z.lazy(
|
|
140
|
+
() => menuItemCompleteBaseSchema.omit({ type: true, variants: true }).extend({
|
|
141
|
+
type: z.literal("ITEM"),
|
|
142
|
+
variants: z.array(menuItemVariantSchema).min(0),
|
|
143
|
+
pointOfSale: pointOfSaleIriSchema
|
|
144
|
+
})
|
|
145
|
+
);
|
|
146
|
+
var menuItemBundleDetailsSchema = z.lazy(
|
|
147
|
+
() => menuItemCompleteBaseSchema.omit({ type: true, variants: true }).extend({
|
|
148
|
+
type: z.literal("BUNDLE"),
|
|
149
|
+
variants: z.array(menuItemVariantSchema).min(0),
|
|
150
|
+
pointOfSale: pointOfSaleIriSchema
|
|
151
|
+
})
|
|
152
|
+
);
|
|
153
|
+
var menuItemDetailsSchema = z.lazy(
|
|
154
|
+
() => z.discriminatedUnion("type", [
|
|
155
|
+
menuItemChoiceDetailsSchema,
|
|
156
|
+
menuItemItemDetailsSchema,
|
|
157
|
+
menuItemBundleDetailsSchema
|
|
158
|
+
])
|
|
159
|
+
);
|
|
160
|
+
var writableMenuItemSchema = menuItemCompleteBaseSchema.pick({
|
|
161
|
+
channels: true,
|
|
162
|
+
tags: true,
|
|
163
|
+
category: true,
|
|
164
|
+
type: true,
|
|
165
|
+
name: true,
|
|
166
|
+
description: true,
|
|
167
|
+
allergens: true,
|
|
168
|
+
diets: true,
|
|
169
|
+
price: true,
|
|
170
|
+
taxRate: true,
|
|
171
|
+
containsAlcohol: true,
|
|
172
|
+
countable: true,
|
|
173
|
+
suspended: true,
|
|
174
|
+
compositions: true,
|
|
175
|
+
salesPrices: true
|
|
176
|
+
}).extend({
|
|
177
|
+
pointOfSale: pointOfSaleIriSchema,
|
|
178
|
+
images: z.array(imageIriSchema).min(0)
|
|
179
|
+
});
|
|
180
|
+
var menuItemCategorySchema = z.object({
|
|
181
|
+
id: z.string(),
|
|
182
|
+
name: z.array(localeItemSchema),
|
|
183
|
+
description: z.array(localeItemSchema),
|
|
184
|
+
sorting: z.coerce.number(),
|
|
185
|
+
suspended: z.boolean(),
|
|
186
|
+
images: z.array(imageSchema),
|
|
187
|
+
createdAt: datetimeSchema,
|
|
188
|
+
updatedAt: datetimeSchema
|
|
189
|
+
});
|
|
190
|
+
var menuItemCategoryDetailsSchema = menuItemCategorySchema.extend({
|
|
191
|
+
pointOfSale: pointOfSaleIriSchema,
|
|
192
|
+
items: z.array(menuItemIriSchema).default([]),
|
|
193
|
+
modifiers: z.array(menuItemModifierIriSchema).default([])
|
|
194
|
+
});
|
|
195
|
+
var writableMenuItemCategorySchema = menuItemCategorySchema.pick({
|
|
196
|
+
name: true,
|
|
197
|
+
description: true,
|
|
198
|
+
sorting: true,
|
|
199
|
+
suspended: true
|
|
200
|
+
}).extend({
|
|
201
|
+
pointOfSale: pointOfSaleIriSchema,
|
|
202
|
+
images: z.array(imageIriSchema).min(0).optional()
|
|
203
|
+
});
|
|
204
|
+
var menuItemModifierSchema = z.object({
|
|
205
|
+
id: z.string(),
|
|
206
|
+
targetItemType: menuItemModifierTargetItemTypeSchema,
|
|
207
|
+
scope: menuItemModifierScopeSchema2,
|
|
208
|
+
category: menuItemCategoryNullableIriSchema.optional().nullable(),
|
|
209
|
+
referenceItem: menuItemNullableIriSchema.optional().nullable(),
|
|
210
|
+
name: z.array(localeItemSchema).nonempty(),
|
|
211
|
+
description: z.array(localeItemSchema).min(0),
|
|
212
|
+
sorting: z.coerce.number(),
|
|
213
|
+
minSelection: z.coerce.number(),
|
|
214
|
+
maxSelection: z.coerce.number().nullable(),
|
|
215
|
+
repeatable: z.boolean(),
|
|
216
|
+
items: z.array(menuItemIriSchema).min(0),
|
|
217
|
+
choices: z.array(menuItemIriSchema).min(0),
|
|
218
|
+
priceOverrides: z.array(menuItemPriceOverrideIriSchema).min(0),
|
|
219
|
+
variantOverrides: z.array(menuItemPriceOverrideIriSchema).min(0),
|
|
220
|
+
createdAt: datetimeSchema,
|
|
221
|
+
updatedAt: datetimeSchema
|
|
222
|
+
});
|
|
223
|
+
var menuItemModifierDetailsSchema = menuItemModifierSchema.extend({
|
|
224
|
+
pointOfSale: pointOfSaleIriSchema
|
|
225
|
+
});
|
|
226
|
+
var writableMenuItemModifierSchema = menuItemModifierSchema.pick({
|
|
227
|
+
name: true,
|
|
228
|
+
targetItemType: true,
|
|
229
|
+
scope: true,
|
|
230
|
+
category: true,
|
|
231
|
+
referenceItem: true,
|
|
232
|
+
description: true,
|
|
233
|
+
sorting: true,
|
|
234
|
+
minSelection: true,
|
|
235
|
+
maxSelection: true,
|
|
236
|
+
repeatable: true,
|
|
237
|
+
items: true,
|
|
238
|
+
choices: true
|
|
239
|
+
}).extend({
|
|
240
|
+
pointOfSale: pointOfSaleIriSchema
|
|
241
|
+
});
|
|
242
|
+
var menuItemPriceOverrideItemSchema = z.object({
|
|
243
|
+
type: z.literal("ITEM"),
|
|
244
|
+
fromItem: menuItemNullableIriSchema,
|
|
245
|
+
inModifier: menuItemModifierNullableIriSchema
|
|
246
|
+
});
|
|
247
|
+
var menuItemPriceOverrideModifierSchema = z.object({
|
|
248
|
+
type: z.literal("MODIFIER"),
|
|
249
|
+
fromModifier: menuItemModifierNullableIriSchema
|
|
250
|
+
});
|
|
251
|
+
var baseMenuItemPriceOverrideFields = z.object({
|
|
252
|
+
id: z.string(),
|
|
253
|
+
price: z.string(),
|
|
254
|
+
referenceItem: menuItemNullableIriSchema,
|
|
255
|
+
suspended: z.boolean(),
|
|
256
|
+
salesPrices: z.array(salesPriceDTOSchema).min(0),
|
|
257
|
+
createdAt: datetimeSchema,
|
|
258
|
+
updatedAt: datetimeSchema
|
|
259
|
+
});
|
|
260
|
+
var menuItemPriceOverrideSchema = z.discriminatedUnion("type", [
|
|
261
|
+
menuItemPriceOverrideItemSchema,
|
|
262
|
+
menuItemPriceOverrideModifierSchema
|
|
263
|
+
]).and(baseMenuItemPriceOverrideFields);
|
|
264
|
+
var menuItemPriceOverrideDetailsSchema = menuItemPriceOverrideSchema;
|
|
265
|
+
var menuItemPriceOverrideWritableItemSchema = z.object({
|
|
266
|
+
type: z.literal("ITEM"),
|
|
267
|
+
fromItem: menuItemNullableIriSchema,
|
|
268
|
+
inModifier: menuItemModifierNullableIriSchema
|
|
269
|
+
});
|
|
270
|
+
var menuItemPriceOverrideWritableModifierSchema = z.object({
|
|
271
|
+
type: z.literal("MODIFIER"),
|
|
272
|
+
fromModifier: menuItemModifierNullableIriSchema
|
|
273
|
+
});
|
|
274
|
+
var menuItemPriceOverrideWritableShared = z.object({
|
|
275
|
+
price: z.string(),
|
|
276
|
+
referenceItem: menuItemIriSchema,
|
|
277
|
+
suspended: z.boolean(),
|
|
278
|
+
salesPrices: z.array(salesPriceDTOSchema).min(0)
|
|
279
|
+
});
|
|
280
|
+
var writableMenuItemPriceOverrideSchema = z.discriminatedUnion("type", [
|
|
281
|
+
menuItemPriceOverrideWritableItemSchema,
|
|
282
|
+
menuItemPriceOverrideWritableModifierSchema
|
|
283
|
+
]).and(menuItemPriceOverrideWritableShared);
|
|
284
|
+
var writableMenuItemPriceOverridePartialSchema = z.discriminatedUnion("type", [
|
|
285
|
+
menuItemPriceOverrideWritableItemSchema,
|
|
286
|
+
menuItemPriceOverrideWritableModifierSchema
|
|
287
|
+
]).and(menuItemPriceOverrideWritableShared.partial());
|
|
288
|
+
var menuItemsQuerySchema = z.object({
|
|
289
|
+
id: z.union([z.uuid(), menuItemIriSchema, z.array(z.uuid()), z.array(menuItemIriSchema)]).optional(),
|
|
290
|
+
countable: booleanSchema.optional(),
|
|
291
|
+
soldIndividually: booleanSchema.optional(),
|
|
292
|
+
containsAlcohol: booleanSchema.optional(),
|
|
293
|
+
suspended: booleanSchema.optional(),
|
|
294
|
+
nameSort: z.string().optional(),
|
|
295
|
+
category: z.union([menuItemCategoryIriSchema, z.array(menuItemCategoryIriSchema)]).optional(),
|
|
296
|
+
// enum statuses
|
|
297
|
+
channels: z.union([menuChannelSchema, z.array(menuChannelSchema)]).optional(),
|
|
298
|
+
type: z.union([menuItemTypeSchema, z.array(menuItemTypeSchema)]).optional(),
|
|
299
|
+
tags: z.array(z.string()).optional(),
|
|
300
|
+
"tags.match": arrayContainsMatchSchema.optional(),
|
|
301
|
+
// price
|
|
302
|
+
"price[between]": z.coerce.number().optional(),
|
|
303
|
+
"price[gt]": z.coerce.number().optional(),
|
|
304
|
+
"price[gte]": z.coerce.number().optional(),
|
|
305
|
+
"price[lt]": z.coerce.number().optional(),
|
|
306
|
+
"price[lte]": z.coerce.number().optional(),
|
|
307
|
+
// orders
|
|
308
|
+
"order[nameSort]": sortDirSchema.optional(),
|
|
309
|
+
"order[createdAt]": sortDirSchema.optional(),
|
|
310
|
+
"order[price]": sortDirSchema.optional(),
|
|
311
|
+
page: z.coerce.number().optional()
|
|
312
|
+
}).extend(timestampsFilterSchema.shape);
|
|
313
|
+
var menuItemCategoriesQuerySchema = z.object({
|
|
314
|
+
id: z.union([
|
|
315
|
+
z.uuid(),
|
|
316
|
+
menuItemCategoryIriSchema,
|
|
317
|
+
z.array(z.uuid()),
|
|
318
|
+
z.array(menuItemCategoryIriSchema)
|
|
319
|
+
]).optional(),
|
|
320
|
+
suspended: booleanSchema.optional(),
|
|
321
|
+
nameSort: z.string().optional(),
|
|
322
|
+
"order[nameSort]": sortDirSchema.optional(),
|
|
323
|
+
"order[sorting]": sortDirSchema.optional(),
|
|
324
|
+
page: z.coerce.number().optional()
|
|
325
|
+
}).extend(timestampsFilterSchema.shape);
|
|
326
|
+
var menuItemModifiersQuerySchema = z.object({
|
|
327
|
+
id: z.union([
|
|
328
|
+
z.uuid(),
|
|
329
|
+
menuItemModifierIriSchema,
|
|
330
|
+
z.array(z.uuid()),
|
|
331
|
+
z.array(menuItemModifierIriSchema)
|
|
332
|
+
]).optional(),
|
|
333
|
+
targetItemType: z.union([menuItemModifierTargetItemTypeSchema, z.array(menuItemModifierTargetItemTypeSchema)]).optional(),
|
|
334
|
+
scope: z.union([menuItemModifierScopeSchema2, z.array(menuItemModifierScopeSchema2)]).optional(),
|
|
335
|
+
category: z.union([menuItemCategoryIriSchema, z.array(menuItemCategoryIriSchema)]).optional(),
|
|
336
|
+
referenceItem: z.union([menuItemIriSchema, z.array(menuItemIriSchema)]).optional(),
|
|
337
|
+
repeatable: booleanSchema.optional(),
|
|
338
|
+
// minSelection
|
|
339
|
+
"minSelection[between]": z.coerce.number().optional(),
|
|
340
|
+
"minSelection[gt]": z.coerce.number().optional(),
|
|
341
|
+
"minSelection[gte]": z.coerce.number().optional(),
|
|
342
|
+
"minSelection[lt]": z.coerce.number().optional(),
|
|
343
|
+
"minSelection[lte]": z.coerce.number().optional(),
|
|
344
|
+
// maxSelection
|
|
345
|
+
"maxSelection[between]": z.coerce.number().optional(),
|
|
346
|
+
"maxSelection[gt]": z.coerce.number().optional(),
|
|
347
|
+
"maxSelection[gte]": z.coerce.number().optional(),
|
|
348
|
+
"maxSelection[lt]": z.coerce.number().optional(),
|
|
349
|
+
"maxSelection[lte]": z.coerce.number().optional(),
|
|
350
|
+
// orders
|
|
351
|
+
"order[sorting]": sortDirSchema.optional(),
|
|
352
|
+
"order[nameSort]": sortDirSchema.optional(),
|
|
353
|
+
page: z.coerce.number().optional()
|
|
354
|
+
}).extend(timestampsFilterSchema.shape);
|
|
355
|
+
var menuItemPriceOverridesQuerySchema = z.object({
|
|
356
|
+
id: z.union([
|
|
357
|
+
z.uuid(),
|
|
358
|
+
menuItemPriceOverrideIriSchema,
|
|
359
|
+
z.array(z.uuid()),
|
|
360
|
+
z.array(menuItemPriceOverrideIriSchema)
|
|
361
|
+
]).optional(),
|
|
362
|
+
suspended: booleanSchema.optional(),
|
|
363
|
+
// enum statuses
|
|
364
|
+
type: z.union([menuItemPriceOverrideTypeSchema, z.array(menuItemPriceOverrideTypeSchema)]).optional(),
|
|
365
|
+
// price
|
|
366
|
+
"price[between]": z.coerce.number().optional(),
|
|
367
|
+
"price[gt]": z.coerce.number().optional(),
|
|
368
|
+
"price[gte]": z.coerce.number().optional(),
|
|
369
|
+
"price[lt]": z.coerce.number().optional(),
|
|
370
|
+
"price[lte]": z.coerce.number().optional(),
|
|
371
|
+
// orders
|
|
372
|
+
"order[createdAt]": sortDirSchema.optional(),
|
|
373
|
+
"order[price]": sortDirSchema.optional(),
|
|
374
|
+
page: z.coerce.number().optional()
|
|
375
|
+
}).extend(timestampsFilterSchema.shape);
|
|
376
|
+
var menuPriceDtoSchema = z.object({
|
|
377
|
+
salesModeId: z.uuid().nullable(),
|
|
378
|
+
salesModeName: z.string().nullable(),
|
|
379
|
+
price: z.string()
|
|
380
|
+
}).strict();
|
|
381
|
+
var menuPriceOverrideDtoSchema = z.object({
|
|
382
|
+
id: z.uuid(),
|
|
383
|
+
type: menuItemPriceOverrideTypeSchema,
|
|
384
|
+
prices: z.array(menuPriceDtoSchema),
|
|
385
|
+
suspended: z.boolean(),
|
|
386
|
+
referenceItem: z.uuid()
|
|
387
|
+
}).strict();
|
|
388
|
+
var menuCategoryDtoSchema = z.object({
|
|
389
|
+
id: z.uuid(),
|
|
390
|
+
name: z.array(localeItemSchema).nonempty(),
|
|
391
|
+
description: z.array(localeItemSchema),
|
|
392
|
+
items: z.array(z.uuid())
|
|
393
|
+
}).strict();
|
|
394
|
+
var menuItemDtoSchema = z.object({
|
|
395
|
+
id: z.uuid(),
|
|
396
|
+
type: menuItemTypeSchema,
|
|
397
|
+
category: z.uuid().nullable(),
|
|
398
|
+
name: z.array(localeItemSchema).nonempty(),
|
|
399
|
+
description: z.array(localeItemSchema),
|
|
400
|
+
allergens: z.array(menuItemAllergenSchema),
|
|
401
|
+
diets: z.array(menuItemDietSchema),
|
|
402
|
+
prices: z.array(menuPriceDtoSchema),
|
|
403
|
+
containsAlcohol: z.boolean(),
|
|
404
|
+
soldIndividually: z.boolean(),
|
|
405
|
+
suspended: z.boolean(),
|
|
406
|
+
variants: z.array(menuPriceOverrideDtoSchema),
|
|
407
|
+
modifiers: z.array(z.uuid()),
|
|
408
|
+
compositions: z.array(z.uuid())
|
|
409
|
+
}).strict();
|
|
410
|
+
var menuModifierDtoSchema = z.object({
|
|
411
|
+
id: z.uuid(),
|
|
412
|
+
name: z.array(localeItemSchema).nonempty(),
|
|
413
|
+
description: z.array(localeItemSchema),
|
|
414
|
+
sorting: z.coerce.number().int(),
|
|
415
|
+
minSelection: z.coerce.number().int(),
|
|
416
|
+
maxSelection: z.coerce.number().int().nullable(),
|
|
417
|
+
repeatable: z.boolean(),
|
|
418
|
+
choices: z.array(z.uuid()),
|
|
419
|
+
priceOverrides: z.array(menuPriceOverrideDtoSchema),
|
|
420
|
+
variantOverrides: z.array(menuPriceOverrideDtoSchema)
|
|
421
|
+
}).strict();
|
|
422
|
+
var menuDtoSchema = z.object({
|
|
423
|
+
categories: z.array(menuCategoryDtoSchema),
|
|
424
|
+
items: z.array(menuItemDtoSchema),
|
|
425
|
+
modifiers: z.array(menuModifierDtoSchema)
|
|
426
|
+
}).strict();
|
|
427
|
+
|
|
428
|
+
// src/requests/menu-item-categories/CreateMenuItemCategory.ts
|
|
429
|
+
import { AbstractApiRequest } from "@deliverart/sdk-js-core";
|
|
430
|
+
var createMenuItemCategoryInputSchema = writableMenuItemCategorySchema.required({
|
|
431
|
+
name: true,
|
|
432
|
+
description: true,
|
|
433
|
+
sorting: true,
|
|
434
|
+
suspended: true,
|
|
435
|
+
pointOfSale: true
|
|
436
|
+
});
|
|
437
|
+
var createMenuItemCategoryResponseSchema = menuItemCategoryDetailsSchema;
|
|
438
|
+
var CreateMenuItemCategory = class extends AbstractApiRequest {
|
|
439
|
+
constructor(input) {
|
|
440
|
+
super(input);
|
|
441
|
+
this.method = "POST";
|
|
442
|
+
this.contentType = "application/json";
|
|
443
|
+
this.accept = "application/json";
|
|
444
|
+
this.inputSchema = createMenuItemCategoryInputSchema;
|
|
445
|
+
this.outputSchema = createMenuItemCategoryResponseSchema;
|
|
446
|
+
this.querySchema = void 0;
|
|
447
|
+
this.headersSchema = void 0;
|
|
448
|
+
}
|
|
449
|
+
getPath() {
|
|
450
|
+
return "/menu_item_categories";
|
|
451
|
+
}
|
|
452
|
+
};
|
|
453
|
+
|
|
454
|
+
// src/requests/menu-item-categories/DeleteMenuItemCategory.ts
|
|
455
|
+
import { AbstractApiRequest as AbstractApiRequest2 } from "@deliverart/sdk-js-core";
|
|
456
|
+
import { emptyResponseSchema } from "@deliverart/sdk-js-global-types";
|
|
457
|
+
import { z as z2 } from "zod";
|
|
458
|
+
var deleteMenuItemCategoryInputSchema = z2.undefined();
|
|
459
|
+
var deleteMenuItemCategoryResponseSchema = emptyResponseSchema;
|
|
460
|
+
var DeleteMenuItemCategory = class extends AbstractApiRequest2 {
|
|
461
|
+
constructor(menuItemCategoryId) {
|
|
462
|
+
super(void 0);
|
|
463
|
+
this.method = "DELETE";
|
|
464
|
+
this.contentType = "application/json";
|
|
465
|
+
this.accept = "application/json";
|
|
466
|
+
this.inputSchema = deleteMenuItemCategoryInputSchema;
|
|
467
|
+
this.outputSchema = deleteMenuItemCategoryResponseSchema;
|
|
468
|
+
this.querySchema = void 0;
|
|
469
|
+
this.headersSchema = void 0;
|
|
470
|
+
this.menuItemCategoryId = menuItemCategoryId;
|
|
471
|
+
}
|
|
472
|
+
getPath() {
|
|
473
|
+
return `/menu_item_categories/${this.menuItemCategoryId}`;
|
|
474
|
+
}
|
|
475
|
+
};
|
|
476
|
+
|
|
477
|
+
// src/requests/menu-item-categories/GetMenuItemCategories.ts
|
|
478
|
+
import { AbstractApiRequest as AbstractApiRequest3 } from "@deliverart/sdk-js-core";
|
|
479
|
+
import { createPaginatedSchema } from "@deliverart/sdk-js-global-types";
|
|
480
|
+
import { z as z3 } from "zod";
|
|
481
|
+
var getMenuItemCategoriesQuerySchema = menuItemCategoriesQuerySchema;
|
|
482
|
+
var getMenuItemCategoriesInputSchema = z3.undefined();
|
|
483
|
+
var getMenuItemCategoriesResponseSchema = createPaginatedSchema(menuItemCategorySchema);
|
|
484
|
+
var GetMenuItemCategories = class extends AbstractApiRequest3 {
|
|
485
|
+
constructor(options) {
|
|
486
|
+
super(void 0, options);
|
|
487
|
+
this.method = "GET";
|
|
488
|
+
this.contentType = "application/json";
|
|
489
|
+
this.accept = "application/json";
|
|
490
|
+
this.inputSchema = getMenuItemCategoriesInputSchema;
|
|
491
|
+
this.outputSchema = getMenuItemCategoriesResponseSchema;
|
|
492
|
+
this.querySchema = getMenuItemCategoriesQuerySchema;
|
|
493
|
+
this.headersSchema = void 0;
|
|
494
|
+
this.listItemSchema = menuItemCategorySchema;
|
|
495
|
+
this.paginationDefaultEnabled = true;
|
|
496
|
+
}
|
|
497
|
+
getPath() {
|
|
498
|
+
return "/menu_item_categories";
|
|
499
|
+
}
|
|
500
|
+
};
|
|
501
|
+
|
|
502
|
+
// src/requests/menu-item-categories/GetMenuItemCategoriesFromPointOfSale.ts
|
|
503
|
+
import { AbstractApiRequest as AbstractApiRequest4 } from "@deliverart/sdk-js-core";
|
|
504
|
+
import { createPaginatedSchema as createPaginatedSchema2 } from "@deliverart/sdk-js-global-types";
|
|
505
|
+
import { z as z4 } from "zod";
|
|
506
|
+
var getMenuItemCategoriesFromPointOfSaleQuerySchema = menuItemCategoriesQuerySchema;
|
|
507
|
+
var getMenuItemCategoriesFromPointOfSaleInputSchema = z4.undefined();
|
|
508
|
+
var getMenuItemCategoriesFromPointOfSaleResponseSchema = createPaginatedSchema2(menuItemCategorySchema);
|
|
509
|
+
var GetMenuItemCategoriesFromPointOfSale = class extends AbstractApiRequest4 {
|
|
510
|
+
constructor(pointOfSaleId, options) {
|
|
511
|
+
super(void 0, options);
|
|
512
|
+
this.method = "GET";
|
|
513
|
+
this.contentType = "application/json";
|
|
514
|
+
this.accept = "application/json";
|
|
515
|
+
this.inputSchema = getMenuItemCategoriesFromPointOfSaleInputSchema;
|
|
516
|
+
this.outputSchema = getMenuItemCategoriesFromPointOfSaleResponseSchema;
|
|
517
|
+
this.querySchema = getMenuItemCategoriesFromPointOfSaleQuerySchema;
|
|
518
|
+
this.headersSchema = void 0;
|
|
519
|
+
this.listItemSchema = menuItemCategorySchema;
|
|
520
|
+
this.paginationDefaultEnabled = true;
|
|
521
|
+
this.pointOfSaleId = pointOfSaleId;
|
|
522
|
+
}
|
|
523
|
+
getPath() {
|
|
524
|
+
return `/point_of_sales/${this.pointOfSaleId}/menu_item_categories`;
|
|
525
|
+
}
|
|
526
|
+
};
|
|
527
|
+
|
|
528
|
+
// src/requests/menu-item-categories/GetMenuItemCategoryDetails.ts
|
|
529
|
+
import { AbstractApiRequest as AbstractApiRequest5 } from "@deliverart/sdk-js-core";
|
|
530
|
+
import { z as z5 } from "zod";
|
|
531
|
+
var getMenuItemCategoryDetailsInputSchema = z5.undefined();
|
|
532
|
+
var getMenuItemCategoryDetailsResponseSchema = menuItemCategoryDetailsSchema;
|
|
533
|
+
var GetMenuItemCategoryDetails = class extends AbstractApiRequest5 {
|
|
534
|
+
constructor(menuItemCategoryId) {
|
|
535
|
+
super(void 0);
|
|
536
|
+
this.method = "GET";
|
|
537
|
+
this.contentType = "application/json";
|
|
538
|
+
this.accept = "application/json";
|
|
539
|
+
this.inputSchema = getMenuItemCategoryDetailsInputSchema;
|
|
540
|
+
this.outputSchema = getMenuItemCategoryDetailsResponseSchema;
|
|
541
|
+
this.querySchema = void 0;
|
|
542
|
+
this.headersSchema = void 0;
|
|
543
|
+
this.menuItemCategoryId = menuItemCategoryId;
|
|
544
|
+
}
|
|
545
|
+
getPath() {
|
|
546
|
+
return `/menu_item_categories/${this.menuItemCategoryId}`;
|
|
547
|
+
}
|
|
548
|
+
};
|
|
549
|
+
|
|
550
|
+
// src/requests/menu-item-categories/UpdateMenuItemCategory.ts
|
|
551
|
+
import { AbstractApiRequest as AbstractApiRequest6 } from "@deliverart/sdk-js-core";
|
|
552
|
+
var updateMenuItemCategoryInputSchema = writableMenuItemCategorySchema.omit({
|
|
553
|
+
pointOfSale: true
|
|
554
|
+
}).partial();
|
|
555
|
+
var updateMenuItemCategoryResponseSchema = menuItemCategoryDetailsSchema;
|
|
556
|
+
var UpdateMenuItemCategory = class extends AbstractApiRequest6 {
|
|
557
|
+
constructor(menuItemCategoryId, input) {
|
|
558
|
+
super(input);
|
|
559
|
+
this.method = "PATCH";
|
|
560
|
+
this.contentType = "application/merge-patch+json";
|
|
561
|
+
this.accept = "application/json";
|
|
562
|
+
this.inputSchema = updateMenuItemCategoryInputSchema;
|
|
563
|
+
this.outputSchema = updateMenuItemCategoryResponseSchema;
|
|
564
|
+
this.querySchema = void 0;
|
|
565
|
+
this.headersSchema = void 0;
|
|
566
|
+
this.menuItemCategoryId = menuItemCategoryId;
|
|
567
|
+
}
|
|
568
|
+
getPath() {
|
|
569
|
+
return `/menu_item_categories/${this.menuItemCategoryId}`;
|
|
570
|
+
}
|
|
571
|
+
};
|
|
572
|
+
|
|
573
|
+
// src/requests/menu-item-modifiers/CreateMenuItemModifier.ts
|
|
574
|
+
import { AbstractApiRequest as AbstractApiRequest7 } from "@deliverart/sdk-js-core";
|
|
575
|
+
var createMenuItemModifierInputSchema = writableMenuItemModifierSchema.required().extend({
|
|
576
|
+
items: writableMenuItemModifierSchema.shape.items.optional(),
|
|
577
|
+
referenceItem: writableMenuItemModifierSchema.shape.referenceItem.optional()
|
|
578
|
+
});
|
|
579
|
+
var createMenuItemModifierResponseSchema = menuItemModifierDetailsSchema;
|
|
580
|
+
var CreateMenuItemModifier = class extends AbstractApiRequest7 {
|
|
581
|
+
constructor(input) {
|
|
582
|
+
super(input);
|
|
583
|
+
this.method = "POST";
|
|
584
|
+
this.contentType = "application/json";
|
|
585
|
+
this.accept = "application/json";
|
|
586
|
+
this.inputSchema = createMenuItemModifierInputSchema;
|
|
587
|
+
this.outputSchema = createMenuItemModifierResponseSchema;
|
|
588
|
+
this.querySchema = void 0;
|
|
589
|
+
this.headersSchema = void 0;
|
|
590
|
+
}
|
|
591
|
+
getPath() {
|
|
592
|
+
return "/menu_item_modifiers";
|
|
593
|
+
}
|
|
594
|
+
};
|
|
595
|
+
|
|
596
|
+
// src/requests/menu-item-modifiers/DeleteMenuItemModifier.ts
|
|
597
|
+
import { AbstractApiRequest as AbstractApiRequest8 } from "@deliverart/sdk-js-core";
|
|
598
|
+
import { emptyResponseSchema as emptyResponseSchema2 } from "@deliverart/sdk-js-global-types";
|
|
599
|
+
import { z as z6 } from "zod";
|
|
600
|
+
var deleteMenuItemModifierInputSchema = z6.undefined();
|
|
601
|
+
var deleteMenuItemModifierResponseSchema = emptyResponseSchema2;
|
|
602
|
+
var DeleteMenuItemModifier = class extends AbstractApiRequest8 {
|
|
603
|
+
constructor(menuItemModifierId) {
|
|
604
|
+
super(void 0);
|
|
605
|
+
this.method = "DELETE";
|
|
606
|
+
this.contentType = "application/json";
|
|
607
|
+
this.accept = "application/json";
|
|
608
|
+
this.inputSchema = deleteMenuItemModifierInputSchema;
|
|
609
|
+
this.outputSchema = deleteMenuItemModifierResponseSchema;
|
|
610
|
+
this.querySchema = void 0;
|
|
611
|
+
this.headersSchema = void 0;
|
|
612
|
+
this.menuItemModifierId = menuItemModifierId;
|
|
613
|
+
}
|
|
614
|
+
getPath() {
|
|
615
|
+
return `/menu_item_modifiers/${this.menuItemModifierId}`;
|
|
616
|
+
}
|
|
617
|
+
};
|
|
618
|
+
|
|
619
|
+
// src/requests/menu-item-modifiers/GetMenuItemModifierDetails.ts
|
|
620
|
+
import { AbstractApiRequest as AbstractApiRequest9 } from "@deliverart/sdk-js-core";
|
|
621
|
+
import { z as z7 } from "zod";
|
|
622
|
+
var getMenuItemModifierDetailsInputSchema = z7.undefined();
|
|
623
|
+
var getMenuItemModifierDetailsResponseSchema = menuItemModifierDetailsSchema;
|
|
624
|
+
var GetMenuItemModifierDetails = class extends AbstractApiRequest9 {
|
|
625
|
+
constructor(menuItemModifierId) {
|
|
626
|
+
super(void 0);
|
|
627
|
+
this.method = "GET";
|
|
628
|
+
this.contentType = "application/json";
|
|
629
|
+
this.accept = "application/json";
|
|
630
|
+
this.inputSchema = getMenuItemModifierDetailsInputSchema;
|
|
631
|
+
this.outputSchema = getMenuItemModifierDetailsResponseSchema;
|
|
632
|
+
this.querySchema = void 0;
|
|
633
|
+
this.headersSchema = void 0;
|
|
634
|
+
this.menuItemModifierId = menuItemModifierId;
|
|
635
|
+
}
|
|
636
|
+
getPath() {
|
|
637
|
+
return `/menu_item_modifiers/${this.menuItemModifierId}`;
|
|
638
|
+
}
|
|
639
|
+
};
|
|
640
|
+
|
|
641
|
+
// src/requests/menu-item-modifiers/GetMenuItemModifiers.ts
|
|
642
|
+
import { AbstractApiRequest as AbstractApiRequest10 } from "@deliverart/sdk-js-core";
|
|
643
|
+
import { createPaginatedSchema as createPaginatedSchema3 } from "@deliverart/sdk-js-global-types";
|
|
644
|
+
import { z as z8 } from "zod";
|
|
645
|
+
var getMenuItemModifiersQuerySchema = menuItemModifiersQuerySchema;
|
|
646
|
+
var getMenuItemModifiersInputSchema = z8.undefined();
|
|
647
|
+
var getMenuItemModifiersResponseSchema = createPaginatedSchema3(menuItemModifierSchema);
|
|
648
|
+
var GetMenuItemModifiers = class extends AbstractApiRequest10 {
|
|
649
|
+
constructor(options) {
|
|
650
|
+
super(void 0, options);
|
|
651
|
+
this.method = "GET";
|
|
652
|
+
this.contentType = "application/json";
|
|
653
|
+
this.accept = "application/json";
|
|
654
|
+
this.inputSchema = getMenuItemModifiersInputSchema;
|
|
655
|
+
this.outputSchema = getMenuItemModifiersResponseSchema;
|
|
656
|
+
this.querySchema = getMenuItemModifiersQuerySchema;
|
|
657
|
+
this.headersSchema = void 0;
|
|
658
|
+
this.listItemSchema = menuItemModifierSchema;
|
|
659
|
+
this.paginationDefaultEnabled = true;
|
|
660
|
+
}
|
|
661
|
+
getPath() {
|
|
662
|
+
return "/menu_item_modifiers";
|
|
663
|
+
}
|
|
664
|
+
};
|
|
665
|
+
|
|
666
|
+
// src/requests/menu-item-modifiers/GetMenuItemModifiersFromPointOfSale.ts
|
|
667
|
+
import { AbstractApiRequest as AbstractApiRequest11 } from "@deliverart/sdk-js-core";
|
|
668
|
+
import { createPaginatedSchema as createPaginatedSchema4 } from "@deliverart/sdk-js-global-types";
|
|
669
|
+
import { z as z9 } from "zod";
|
|
670
|
+
var getMenuItemModifiersFromPointOfSaleQuerySchema = menuItemModifiersQuerySchema;
|
|
671
|
+
var getMenuItemModifiersFromPointOfSaleInputSchema = z9.undefined();
|
|
672
|
+
var getMenuItemModifiersFromPointOfSaleResponseSchema = createPaginatedSchema4(menuItemModifierSchema);
|
|
673
|
+
var GetMenuItemModifiersFromPointOfSale = class extends AbstractApiRequest11 {
|
|
674
|
+
constructor(pointOfSaleId, options) {
|
|
675
|
+
super(void 0, options);
|
|
676
|
+
this.method = "GET";
|
|
677
|
+
this.contentType = "application/json";
|
|
678
|
+
this.accept = "application/json";
|
|
679
|
+
this.inputSchema = getMenuItemModifiersFromPointOfSaleInputSchema;
|
|
680
|
+
this.outputSchema = getMenuItemModifiersFromPointOfSaleResponseSchema;
|
|
681
|
+
this.querySchema = getMenuItemModifiersFromPointOfSaleQuerySchema;
|
|
682
|
+
this.headersSchema = void 0;
|
|
683
|
+
this.listItemSchema = menuItemModifierSchema;
|
|
684
|
+
this.paginationDefaultEnabled = true;
|
|
685
|
+
this.pointOfSaleId = pointOfSaleId;
|
|
686
|
+
}
|
|
687
|
+
getPath() {
|
|
688
|
+
return `/point_of_sales/${this.pointOfSaleId}/menu_item_modifiers`;
|
|
689
|
+
}
|
|
690
|
+
};
|
|
691
|
+
|
|
692
|
+
// src/requests/menu-item-modifiers/UpdateMenuItemModifier.ts
|
|
693
|
+
import { AbstractApiRequest as AbstractApiRequest12 } from "@deliverart/sdk-js-core";
|
|
694
|
+
var updateMenuItemModifierInputSchema = writableMenuItemModifierSchema.omit({
|
|
695
|
+
pointOfSale: true,
|
|
696
|
+
targetItemType: true,
|
|
697
|
+
scope: true,
|
|
698
|
+
category: true,
|
|
699
|
+
referenceItem: true
|
|
700
|
+
}).partial();
|
|
701
|
+
var updateMenuItemModifierResponseSchema = menuItemModifierDetailsSchema;
|
|
702
|
+
var UpdateMenuItemModifier = class extends AbstractApiRequest12 {
|
|
703
|
+
constructor(menuItemModifierId, input) {
|
|
704
|
+
super(input);
|
|
705
|
+
this.method = "PATCH";
|
|
706
|
+
this.contentType = "application/merge-patch+json";
|
|
707
|
+
this.accept = "application/json";
|
|
708
|
+
this.inputSchema = updateMenuItemModifierInputSchema;
|
|
709
|
+
this.outputSchema = updateMenuItemModifierResponseSchema;
|
|
710
|
+
this.querySchema = void 0;
|
|
711
|
+
this.headersSchema = void 0;
|
|
712
|
+
this.menuItemModifierId = menuItemModifierId;
|
|
713
|
+
}
|
|
714
|
+
getPath() {
|
|
715
|
+
return `/menu_item_modifiers/${this.menuItemModifierId}`;
|
|
716
|
+
}
|
|
717
|
+
};
|
|
718
|
+
|
|
719
|
+
// src/requests/menu-item-price-overrides/CreateMenuItemPriceOverride.ts
|
|
720
|
+
import { AbstractApiRequest as AbstractApiRequest13 } from "@deliverart/sdk-js-core";
|
|
721
|
+
var createMenuItemPriceOverrideInputSchema = writableMenuItemPriceOverrideSchema;
|
|
722
|
+
var createMenuItemPriceOverrideResponseSchema = menuItemPriceOverrideDetailsSchema;
|
|
723
|
+
var CreateMenuItemPriceOverride = class extends AbstractApiRequest13 {
|
|
724
|
+
constructor(input) {
|
|
725
|
+
super(input);
|
|
726
|
+
this.method = "POST";
|
|
727
|
+
this.contentType = "application/json";
|
|
728
|
+
this.accept = "application/json";
|
|
729
|
+
this.inputSchema = createMenuItemPriceOverrideInputSchema;
|
|
730
|
+
this.outputSchema = createMenuItemPriceOverrideResponseSchema;
|
|
731
|
+
this.querySchema = void 0;
|
|
732
|
+
this.headersSchema = void 0;
|
|
733
|
+
}
|
|
734
|
+
getPath() {
|
|
735
|
+
return "/menu_item_price_overrides";
|
|
736
|
+
}
|
|
737
|
+
};
|
|
738
|
+
|
|
739
|
+
// src/requests/menu-item-price-overrides/DeleteMenuItemPriceOverride.ts
|
|
740
|
+
import { AbstractApiRequest as AbstractApiRequest14 } from "@deliverart/sdk-js-core";
|
|
741
|
+
import { emptyResponseSchema as emptyResponseSchema3 } from "@deliverart/sdk-js-global-types";
|
|
742
|
+
import { z as z10 } from "zod";
|
|
743
|
+
var deleteMenuItemPriceOverrideInputSchema = z10.undefined();
|
|
744
|
+
var deleteMenuItemPriceOverrideResponseSchema = emptyResponseSchema3;
|
|
745
|
+
var DeleteMenuItemPriceOverride = class extends AbstractApiRequest14 {
|
|
746
|
+
constructor(menuItemPriceOverrideId) {
|
|
747
|
+
super(void 0);
|
|
748
|
+
this.method = "DELETE";
|
|
749
|
+
this.contentType = "application/json";
|
|
750
|
+
this.accept = "application/json";
|
|
751
|
+
this.inputSchema = deleteMenuItemPriceOverrideInputSchema;
|
|
752
|
+
this.outputSchema = deleteMenuItemPriceOverrideResponseSchema;
|
|
753
|
+
this.querySchema = void 0;
|
|
754
|
+
this.headersSchema = void 0;
|
|
755
|
+
this.menuItemPriceOverrideId = menuItemPriceOverrideId;
|
|
756
|
+
}
|
|
757
|
+
getPath() {
|
|
758
|
+
return `/menu_item_price_overrides/${this.menuItemPriceOverrideId}`;
|
|
759
|
+
}
|
|
760
|
+
};
|
|
761
|
+
|
|
762
|
+
// src/requests/menu-item-price-overrides/GetMenuItemPriceOverrideDetails.ts
|
|
763
|
+
import { AbstractApiRequest as AbstractApiRequest15 } from "@deliverart/sdk-js-core";
|
|
764
|
+
import { z as z11 } from "zod";
|
|
765
|
+
var getMenuItemPriceOverrideDetailsInputSchema = z11.undefined();
|
|
766
|
+
var getMenuItemPriceOverrideDetailsResponseSchema = menuItemPriceOverrideDetailsSchema;
|
|
767
|
+
var GetMenuItemPriceOverrideDetails = class extends AbstractApiRequest15 {
|
|
768
|
+
constructor(menuItemPriceOverrideId) {
|
|
769
|
+
super(void 0);
|
|
770
|
+
this.method = "GET";
|
|
771
|
+
this.contentType = "application/json";
|
|
772
|
+
this.accept = "application/json";
|
|
773
|
+
this.inputSchema = getMenuItemPriceOverrideDetailsInputSchema;
|
|
774
|
+
this.outputSchema = getMenuItemPriceOverrideDetailsResponseSchema;
|
|
775
|
+
this.querySchema = void 0;
|
|
776
|
+
this.headersSchema = void 0;
|
|
777
|
+
this.menuItemPriceOverrideId = menuItemPriceOverrideId;
|
|
778
|
+
}
|
|
779
|
+
getPath() {
|
|
780
|
+
return `/menu_item_price_overrides/${this.menuItemPriceOverrideId}`;
|
|
781
|
+
}
|
|
782
|
+
};
|
|
783
|
+
|
|
784
|
+
// src/requests/menu-item-price-overrides/GetMenuItemPriceOverrides.ts
|
|
785
|
+
import { AbstractApiRequest as AbstractApiRequest16 } from "@deliverart/sdk-js-core";
|
|
786
|
+
import { createPaginatedSchema as createPaginatedSchema5 } from "@deliverart/sdk-js-global-types";
|
|
787
|
+
import { z as z12 } from "zod";
|
|
788
|
+
var getMenuItemPriceOverridesQuerySchema = menuItemPriceOverridesQuerySchema;
|
|
789
|
+
var getMenuItemPriceOverridesInputSchema = z12.undefined();
|
|
790
|
+
var getMenuItemPriceOverridesResponseSchema = createPaginatedSchema5(
|
|
791
|
+
menuItemPriceOverrideSchema
|
|
792
|
+
);
|
|
793
|
+
var GetMenuItemPriceOverrides = class extends AbstractApiRequest16 {
|
|
794
|
+
constructor(options) {
|
|
795
|
+
super(void 0, options);
|
|
796
|
+
this.method = "GET";
|
|
797
|
+
this.contentType = "application/json";
|
|
798
|
+
this.accept = "application/json";
|
|
799
|
+
this.inputSchema = getMenuItemPriceOverridesInputSchema;
|
|
800
|
+
this.outputSchema = getMenuItemPriceOverridesResponseSchema;
|
|
801
|
+
this.querySchema = getMenuItemPriceOverridesQuerySchema;
|
|
802
|
+
this.headersSchema = void 0;
|
|
803
|
+
this.listItemSchema = menuItemPriceOverrideSchema;
|
|
804
|
+
this.paginationDefaultEnabled = true;
|
|
805
|
+
}
|
|
806
|
+
getPath() {
|
|
807
|
+
return "/menu_item_price_overrides";
|
|
808
|
+
}
|
|
809
|
+
};
|
|
810
|
+
|
|
811
|
+
// src/requests/menu-item-price-overrides/GetMenuItemPriceOverridesAsVariantOverridesFromMenuItemModifier.ts
|
|
812
|
+
import { AbstractApiRequest as AbstractApiRequest17 } from "@deliverart/sdk-js-core";
|
|
813
|
+
import { z as z13 } from "zod";
|
|
814
|
+
var getMenuItemPriceOverridesAsVariantOverridesFromMenuItemModifierQuerySchema = menuItemPriceOverridesQuerySchema;
|
|
815
|
+
var getMenuItemPriceOverridesAsVariantOverridesFromMenuItemModifierInputSchema = z13.undefined();
|
|
816
|
+
var getMenuItemPriceOverridesAsVariantOverridesFromMenuItemModifierResponseSchema = z13.array(menuItemPriceOverrideSchema);
|
|
817
|
+
var GetMenuItemPriceOverridesAsVariantOverridesFromMenuItemModifier = class extends AbstractApiRequest17 {
|
|
818
|
+
constructor(menuItemModifierId, options) {
|
|
819
|
+
super(void 0, options);
|
|
820
|
+
this.method = "GET";
|
|
821
|
+
this.contentType = "application/json";
|
|
822
|
+
this.accept = "application/json";
|
|
823
|
+
this.inputSchema = getMenuItemPriceOverridesAsVariantOverridesFromMenuItemModifierInputSchema;
|
|
824
|
+
this.outputSchema = getMenuItemPriceOverridesAsVariantOverridesFromMenuItemModifierResponseSchema;
|
|
825
|
+
this.querySchema = getMenuItemPriceOverridesAsVariantOverridesFromMenuItemModifierQuerySchema;
|
|
826
|
+
this.headersSchema = void 0;
|
|
827
|
+
this.listItemSchema = menuItemPriceOverrideSchema;
|
|
828
|
+
this.paginationDefaultEnabled = false;
|
|
829
|
+
this.menuItemModifierId = menuItemModifierId;
|
|
830
|
+
}
|
|
831
|
+
getPath() {
|
|
832
|
+
return `/menu_item_modifiers/${this.menuItemModifierId}/variant_overrides`;
|
|
833
|
+
}
|
|
834
|
+
};
|
|
835
|
+
|
|
836
|
+
// src/requests/menu-item-price-overrides/GetMenuItemPriceOverridesAsVariantsFromMenuItem.ts
|
|
837
|
+
import { AbstractApiRequest as AbstractApiRequest18 } from "@deliverart/sdk-js-core";
|
|
838
|
+
import { z as z14 } from "zod";
|
|
839
|
+
var getMenuItemPriceOverridesAsVariantsFromMenuItemQuerySchema = menuItemPriceOverridesQuerySchema;
|
|
840
|
+
var getMenuItemPriceOverridesAsVariantsFromMenuItemInputSchema = z14.undefined();
|
|
841
|
+
var getMenuItemPriceOverridesAsVariantsFromMenuItemResponseSchema = z14.array(
|
|
842
|
+
menuItemPriceOverrideSchema
|
|
843
|
+
);
|
|
844
|
+
var GetMenuItemPriceOverridesAsVariantsFromMenuItem = class extends AbstractApiRequest18 {
|
|
845
|
+
constructor(menuItemId, options) {
|
|
846
|
+
super(void 0, options);
|
|
847
|
+
this.method = "GET";
|
|
848
|
+
this.contentType = "application/json";
|
|
849
|
+
this.accept = "application/json";
|
|
850
|
+
this.inputSchema = getMenuItemPriceOverridesAsVariantsFromMenuItemInputSchema;
|
|
851
|
+
this.outputSchema = getMenuItemPriceOverridesAsVariantsFromMenuItemResponseSchema;
|
|
852
|
+
this.querySchema = getMenuItemPriceOverridesAsVariantsFromMenuItemQuerySchema;
|
|
853
|
+
this.headersSchema = void 0;
|
|
854
|
+
this.listItemSchema = menuItemPriceOverrideSchema;
|
|
855
|
+
this.paginationDefaultEnabled = false;
|
|
856
|
+
this.menuItemId = menuItemId;
|
|
857
|
+
}
|
|
858
|
+
getPath() {
|
|
859
|
+
return `/menu_items/${this.menuItemId}/variants`;
|
|
860
|
+
}
|
|
861
|
+
};
|
|
862
|
+
|
|
863
|
+
// src/requests/menu-item-price-overrides/GetMenuItemPriceOverridesFromMenuItemModifier.ts
|
|
864
|
+
import { AbstractApiRequest as AbstractApiRequest19 } from "@deliverart/sdk-js-core";
|
|
865
|
+
import { z as z15 } from "zod";
|
|
866
|
+
var getMenuItemPriceOverridesFromMenuItemModifierQuerySchema = menuItemPriceOverridesQuerySchema;
|
|
867
|
+
var getMenuItemPriceOverridesFromMenuItemModifierInputSchema = z15.undefined();
|
|
868
|
+
var getMenuItemPriceOverridesFromMenuItemModifierResponseSchema = z15.array(
|
|
869
|
+
menuItemPriceOverrideSchema
|
|
870
|
+
);
|
|
871
|
+
var GetMenuItemPriceOverridesFromMenuItemModifier = class extends AbstractApiRequest19 {
|
|
872
|
+
constructor(menuItemModifierId, options) {
|
|
873
|
+
super(void 0, options);
|
|
874
|
+
this.method = "GET";
|
|
875
|
+
this.contentType = "application/json";
|
|
876
|
+
this.accept = "application/json";
|
|
877
|
+
this.inputSchema = getMenuItemPriceOverridesFromMenuItemModifierInputSchema;
|
|
878
|
+
this.outputSchema = getMenuItemPriceOverridesFromMenuItemModifierResponseSchema;
|
|
879
|
+
this.querySchema = getMenuItemPriceOverridesFromMenuItemModifierQuerySchema;
|
|
880
|
+
this.headersSchema = void 0;
|
|
881
|
+
this.listItemSchema = menuItemPriceOverrideSchema;
|
|
882
|
+
this.paginationDefaultEnabled = false;
|
|
883
|
+
this.menuItemModifierId = menuItemModifierId;
|
|
884
|
+
}
|
|
885
|
+
getPath() {
|
|
886
|
+
return `/menu_item_modifiers/${this.menuItemModifierId}/price_overrides`;
|
|
887
|
+
}
|
|
888
|
+
};
|
|
889
|
+
|
|
890
|
+
// src/requests/menu-item-price-overrides/UpdateMenuItemPriceOverride.ts
|
|
891
|
+
import { AbstractApiRequest as AbstractApiRequest20 } from "@deliverart/sdk-js-core";
|
|
892
|
+
var updateMenuItemPriceOverrideInputSchema = writableMenuItemPriceOverridePartialSchema;
|
|
893
|
+
var updateMenuItemPriceOverrideResponseSchema = menuItemPriceOverrideDetailsSchema;
|
|
894
|
+
var UpdateMenuItemPriceOverride = class extends AbstractApiRequest20 {
|
|
895
|
+
constructor(menuItemPriceOverrideId, input) {
|
|
896
|
+
super(input);
|
|
897
|
+
this.method = "PATCH";
|
|
898
|
+
this.contentType = "application/merge-patch+json";
|
|
899
|
+
this.accept = "application/json";
|
|
900
|
+
this.inputSchema = updateMenuItemPriceOverrideInputSchema;
|
|
901
|
+
this.outputSchema = updateMenuItemPriceOverrideResponseSchema;
|
|
902
|
+
this.querySchema = void 0;
|
|
903
|
+
this.headersSchema = void 0;
|
|
904
|
+
this.menuItemPriceOverrideId = menuItemPriceOverrideId;
|
|
905
|
+
}
|
|
906
|
+
getPath() {
|
|
907
|
+
return `/menu_item_price_overrides/${this.menuItemPriceOverrideId}`;
|
|
908
|
+
}
|
|
909
|
+
};
|
|
910
|
+
|
|
911
|
+
// src/requests/menu-items/CreateMenuItem.ts
|
|
912
|
+
import { AbstractApiRequest as AbstractApiRequest21 } from "@deliverart/sdk-js-core";
|
|
913
|
+
var createMenuItemInputSchema = writableMenuItemSchema.required();
|
|
914
|
+
var createMenuItemResponseSchema = menuItemDetailsSchema;
|
|
915
|
+
var CreateMenuItem = class extends AbstractApiRequest21 {
|
|
916
|
+
constructor(input) {
|
|
917
|
+
super(input);
|
|
918
|
+
this.method = "POST";
|
|
919
|
+
this.contentType = "application/json";
|
|
920
|
+
this.accept = "application/json";
|
|
921
|
+
this.inputSchema = createMenuItemInputSchema;
|
|
922
|
+
this.outputSchema = createMenuItemResponseSchema;
|
|
923
|
+
this.querySchema = void 0;
|
|
924
|
+
this.headersSchema = void 0;
|
|
925
|
+
}
|
|
926
|
+
getPath() {
|
|
927
|
+
return "/menu_items";
|
|
928
|
+
}
|
|
929
|
+
};
|
|
930
|
+
|
|
931
|
+
// src/requests/menu-items/DeleteMenuItem.ts
|
|
932
|
+
import { AbstractApiRequest as AbstractApiRequest22 } from "@deliverart/sdk-js-core";
|
|
933
|
+
import { emptyResponseSchema as emptyResponseSchema4 } from "@deliverart/sdk-js-global-types";
|
|
934
|
+
import { z as z16 } from "zod";
|
|
935
|
+
var deleteMenuItemInputSchema = z16.undefined();
|
|
936
|
+
var deleteMenuItemResponseSchema = emptyResponseSchema4;
|
|
937
|
+
var DeleteMenuItem = class extends AbstractApiRequest22 {
|
|
938
|
+
constructor(menuItemId) {
|
|
939
|
+
super(void 0);
|
|
940
|
+
this.method = "DELETE";
|
|
941
|
+
this.contentType = "application/json";
|
|
942
|
+
this.accept = "application/json";
|
|
943
|
+
this.inputSchema = deleteMenuItemInputSchema;
|
|
944
|
+
this.outputSchema = deleteMenuItemResponseSchema;
|
|
945
|
+
this.querySchema = void 0;
|
|
946
|
+
this.headersSchema = void 0;
|
|
947
|
+
this.menuItemId = menuItemId;
|
|
948
|
+
}
|
|
949
|
+
getPath() {
|
|
950
|
+
return `/menu_items/${this.menuItemId}`;
|
|
951
|
+
}
|
|
952
|
+
};
|
|
953
|
+
|
|
954
|
+
// src/requests/menu-items/GetMenuItemDetails.ts
|
|
955
|
+
import { AbstractApiRequest as AbstractApiRequest23 } from "@deliverart/sdk-js-core";
|
|
956
|
+
import { z as z17 } from "zod";
|
|
957
|
+
var getMenuItemDetailsInputSchema = z17.undefined();
|
|
958
|
+
var getMenuItemDetailsResponseSchema = menuItemDetailsSchema;
|
|
959
|
+
var GetMenuItemDetails = class extends AbstractApiRequest23 {
|
|
960
|
+
constructor(menuItemId) {
|
|
961
|
+
super(void 0);
|
|
962
|
+
this.method = "GET";
|
|
963
|
+
this.contentType = "application/json";
|
|
964
|
+
this.accept = "application/json";
|
|
965
|
+
this.inputSchema = getMenuItemDetailsInputSchema;
|
|
966
|
+
this.outputSchema = getMenuItemDetailsResponseSchema;
|
|
967
|
+
this.querySchema = void 0;
|
|
968
|
+
this.headersSchema = void 0;
|
|
969
|
+
this.menuItemId = menuItemId;
|
|
970
|
+
}
|
|
971
|
+
getPath() {
|
|
972
|
+
return `/menu_items/${this.menuItemId}`;
|
|
973
|
+
}
|
|
974
|
+
};
|
|
975
|
+
|
|
976
|
+
// src/requests/menu-items/GetMenuItems.ts
|
|
977
|
+
import { AbstractApiRequest as AbstractApiRequest24 } from "@deliverart/sdk-js-core";
|
|
978
|
+
import { createPaginatedSchema as createPaginatedSchema6 } from "@deliverart/sdk-js-global-types";
|
|
979
|
+
import { z as z18 } from "zod";
|
|
980
|
+
var getMenuItemsQuerySchema = menuItemsQuerySchema;
|
|
981
|
+
var getMenuItemsInputSchema = z18.undefined();
|
|
982
|
+
var getMenuItemsResponseSchema = createPaginatedSchema6(menuItemSchema);
|
|
983
|
+
var GetMenuItems = class extends AbstractApiRequest24 {
|
|
984
|
+
constructor(options) {
|
|
985
|
+
super(void 0, options);
|
|
986
|
+
this.method = "GET";
|
|
987
|
+
this.contentType = "application/json";
|
|
988
|
+
this.accept = "application/json";
|
|
989
|
+
this.inputSchema = getMenuItemsInputSchema;
|
|
990
|
+
this.outputSchema = getMenuItemsResponseSchema;
|
|
991
|
+
this.querySchema = getMenuItemsQuerySchema;
|
|
992
|
+
this.headersSchema = void 0;
|
|
993
|
+
this.listItemSchema = menuItemSchema;
|
|
994
|
+
this.paginationDefaultEnabled = true;
|
|
995
|
+
}
|
|
996
|
+
getPath() {
|
|
997
|
+
return "/menu_items";
|
|
998
|
+
}
|
|
999
|
+
};
|
|
1000
|
+
|
|
1001
|
+
// src/requests/menu-items/GetMenuItemsAsChoicesFromMenuItemModifier.ts
|
|
1002
|
+
import { AbstractApiRequest as AbstractApiRequest25 } from "@deliverart/sdk-js-core";
|
|
1003
|
+
import { z as z19 } from "zod";
|
|
1004
|
+
var getMenuItemsAsChoicesFromMenuItemModifierQuerySchema = menuItemsQuerySchema;
|
|
1005
|
+
var getMenuItemsAsChoicesFromMenuItemModifierInputSchema = z19.undefined();
|
|
1006
|
+
var getMenuItemsAsChoicesFromMenuItemModifierResponseSchema = z19.array(menuItemSchema);
|
|
1007
|
+
var GetMenuItemsAsChoicesFromMenuItemModifier = class extends AbstractApiRequest25 {
|
|
1008
|
+
constructor(menuItemModifierId, options) {
|
|
1009
|
+
super(void 0, options);
|
|
1010
|
+
this.method = "GET";
|
|
1011
|
+
this.contentType = "application/json";
|
|
1012
|
+
this.accept = "application/json";
|
|
1013
|
+
this.inputSchema = getMenuItemsAsChoicesFromMenuItemModifierInputSchema;
|
|
1014
|
+
this.outputSchema = getMenuItemsAsChoicesFromMenuItemModifierResponseSchema;
|
|
1015
|
+
this.querySchema = getMenuItemsAsChoicesFromMenuItemModifierQuerySchema;
|
|
1016
|
+
this.headersSchema = void 0;
|
|
1017
|
+
this.listItemSchema = menuItemSchema;
|
|
1018
|
+
this.paginationDefaultEnabled = false;
|
|
1019
|
+
this.menuItemModifierId = menuItemModifierId;
|
|
1020
|
+
}
|
|
1021
|
+
getPath() {
|
|
1022
|
+
return `/menu_item_modifiers/${this.menuItemModifierId}/choices`;
|
|
1023
|
+
}
|
|
1024
|
+
};
|
|
1025
|
+
|
|
1026
|
+
// src/requests/menu-items/GetMenuItemsFromMenuItemCategory.ts
|
|
1027
|
+
import { AbstractApiRequest as AbstractApiRequest26 } from "@deliverart/sdk-js-core";
|
|
1028
|
+
import { createPaginatedSchema as createPaginatedSchema7 } from "@deliverart/sdk-js-global-types";
|
|
1029
|
+
import { z as z20 } from "zod";
|
|
1030
|
+
var getMenuItemsFromMenuItemCategoryQuerySchema = menuItemsQuerySchema;
|
|
1031
|
+
var getMenuItemsFromMenuItemCategoryInputSchema = z20.undefined();
|
|
1032
|
+
var getMenuItemsFromMenuItemCategoryResponseSchema = createPaginatedSchema7(menuItemSchema);
|
|
1033
|
+
var GetMenuItemsFromMenuItemCategory = class extends AbstractApiRequest26 {
|
|
1034
|
+
constructor(menuItemCategoryId, options) {
|
|
1035
|
+
super(void 0, options);
|
|
1036
|
+
this.method = "GET";
|
|
1037
|
+
this.contentType = "application/json";
|
|
1038
|
+
this.accept = "application/json";
|
|
1039
|
+
this.inputSchema = getMenuItemsFromMenuItemCategoryInputSchema;
|
|
1040
|
+
this.outputSchema = getMenuItemsFromMenuItemCategoryResponseSchema;
|
|
1041
|
+
this.querySchema = getMenuItemsFromMenuItemCategoryQuerySchema;
|
|
1042
|
+
this.headersSchema = void 0;
|
|
1043
|
+
this.listItemSchema = menuItemSchema;
|
|
1044
|
+
this.paginationDefaultEnabled = true;
|
|
1045
|
+
this.menuItemCategoryId = menuItemCategoryId;
|
|
1046
|
+
}
|
|
1047
|
+
getPath() {
|
|
1048
|
+
return `/menu_item_categories/${this.menuItemCategoryId}/menu_items`;
|
|
1049
|
+
}
|
|
1050
|
+
};
|
|
1051
|
+
|
|
1052
|
+
// src/requests/menu-items/GetMenuItemsFromMenuItemModifier.ts
|
|
1053
|
+
import { AbstractApiRequest as AbstractApiRequest27 } from "@deliverart/sdk-js-core";
|
|
1054
|
+
import { z as z21 } from "zod";
|
|
1055
|
+
var getMenuItemsFromMenuItemModifierQuerySchema = menuItemsQuerySchema;
|
|
1056
|
+
var getMenuItemsFromMenuItemModifierInputSchema = z21.undefined();
|
|
1057
|
+
var getMenuItemsFromMenuItemModifierResponseSchema = z21.array(menuItemSchema);
|
|
1058
|
+
var GetMenuItemsFromMenuItemModifier = class extends AbstractApiRequest27 {
|
|
1059
|
+
constructor(menuItemModifierId, options) {
|
|
1060
|
+
super(void 0, options);
|
|
1061
|
+
this.method = "GET";
|
|
1062
|
+
this.contentType = "application/json";
|
|
1063
|
+
this.accept = "application/json";
|
|
1064
|
+
this.inputSchema = getMenuItemsFromMenuItemModifierInputSchema;
|
|
1065
|
+
this.outputSchema = getMenuItemsFromMenuItemModifierResponseSchema;
|
|
1066
|
+
this.querySchema = getMenuItemsFromMenuItemModifierQuerySchema;
|
|
1067
|
+
this.headersSchema = void 0;
|
|
1068
|
+
this.listItemSchema = menuItemSchema;
|
|
1069
|
+
this.paginationDefaultEnabled = false;
|
|
1070
|
+
this.menuItemModifierId = menuItemModifierId;
|
|
1071
|
+
}
|
|
1072
|
+
getPath() {
|
|
1073
|
+
return `/menu_item_modifiers/${this.menuItemModifierId}/items`;
|
|
1074
|
+
}
|
|
1075
|
+
};
|
|
1076
|
+
|
|
1077
|
+
// src/requests/menu-items/GetMenuItemsFromPointOfSale.ts
|
|
1078
|
+
import { AbstractApiRequest as AbstractApiRequest28 } from "@deliverart/sdk-js-core";
|
|
1079
|
+
import { createPaginatedSchema as createPaginatedSchema8 } from "@deliverart/sdk-js-global-types";
|
|
1080
|
+
import { z as z22 } from "zod";
|
|
1081
|
+
var getMenuItemsFromPointOfSaleQuerySchema = menuItemsQuerySchema;
|
|
1082
|
+
var getMenuItemsFromPointOfSaleInputSchema = z22.undefined();
|
|
1083
|
+
var getMenuItemsFromPointOfSaleResponseSchema = createPaginatedSchema8(menuItemSchema);
|
|
1084
|
+
var GetMenuItemsFromPointOfSale = class extends AbstractApiRequest28 {
|
|
1085
|
+
constructor(pointOfSaleId, options) {
|
|
1086
|
+
super(void 0, options);
|
|
1087
|
+
this.method = "GET";
|
|
1088
|
+
this.contentType = "application/json";
|
|
1089
|
+
this.accept = "application/json";
|
|
1090
|
+
this.inputSchema = getMenuItemsFromPointOfSaleInputSchema;
|
|
1091
|
+
this.outputSchema = getMenuItemsFromPointOfSaleResponseSchema;
|
|
1092
|
+
this.querySchema = getMenuItemsFromPointOfSaleQuerySchema;
|
|
1093
|
+
this.headersSchema = void 0;
|
|
1094
|
+
// Declare list behavior
|
|
1095
|
+
this.listItemSchema = menuItemSchema;
|
|
1096
|
+
this.paginationDefaultEnabled = true;
|
|
1097
|
+
this.pointOfSaleId = pointOfSaleId;
|
|
1098
|
+
}
|
|
1099
|
+
getPath() {
|
|
1100
|
+
return `/point_of_sales/${this.pointOfSaleId}/menu_items`;
|
|
1101
|
+
}
|
|
1102
|
+
};
|
|
1103
|
+
|
|
1104
|
+
// src/requests/menu-items/GetMenuItemTagsFromPointOfSale.ts
|
|
1105
|
+
import { AbstractApiRequest as AbstractApiRequest29 } from "@deliverart/sdk-js-core";
|
|
1106
|
+
import { z as z23 } from "zod";
|
|
1107
|
+
var getMenuItemTagsFromPointOfSaleInputSchema = z23.undefined();
|
|
1108
|
+
var getMenuItemTagsFromPointOfSaleResponseSchema = z23.array(z23.string());
|
|
1109
|
+
var GetMenuItemTagsFromPointOfSale = class extends AbstractApiRequest29 {
|
|
1110
|
+
constructor(pointOfSaleId) {
|
|
1111
|
+
super(void 0);
|
|
1112
|
+
this.method = "GET";
|
|
1113
|
+
this.contentType = "application/json";
|
|
1114
|
+
this.accept = "application/json";
|
|
1115
|
+
this.inputSchema = getMenuItemTagsFromPointOfSaleInputSchema;
|
|
1116
|
+
this.outputSchema = getMenuItemTagsFromPointOfSaleResponseSchema;
|
|
1117
|
+
this.querySchema = void 0;
|
|
1118
|
+
this.headersSchema = void 0;
|
|
1119
|
+
this.pointOfSaleId = pointOfSaleId;
|
|
1120
|
+
}
|
|
1121
|
+
getPath() {
|
|
1122
|
+
return `/point_of_sales/${this.pointOfSaleId}/menu_items/tags`;
|
|
1123
|
+
}
|
|
1124
|
+
};
|
|
1125
|
+
|
|
1126
|
+
// src/requests/menu-items/UpdateMenuItem.ts
|
|
1127
|
+
import { AbstractApiRequest as AbstractApiRequest30 } from "@deliverart/sdk-js-core";
|
|
1128
|
+
var updateMenuItemInputSchema = writableMenuItemSchema.omit({
|
|
1129
|
+
pointOfSale: true
|
|
1130
|
+
}).partial();
|
|
1131
|
+
var updateMenuItemResponseSchema = menuItemDetailsSchema;
|
|
1132
|
+
var UpdateMenuItem = class extends AbstractApiRequest30 {
|
|
1133
|
+
constructor(menuItemId, input) {
|
|
1134
|
+
super(input);
|
|
1135
|
+
this.method = "PATCH";
|
|
1136
|
+
this.contentType = "application/merge-patch+json";
|
|
1137
|
+
this.accept = "application/json";
|
|
1138
|
+
this.inputSchema = updateMenuItemInputSchema;
|
|
1139
|
+
this.outputSchema = updateMenuItemResponseSchema;
|
|
1140
|
+
this.querySchema = void 0;
|
|
1141
|
+
this.headersSchema = void 0;
|
|
1142
|
+
this.menuItemId = menuItemId;
|
|
1143
|
+
}
|
|
1144
|
+
getPath() {
|
|
1145
|
+
return `/menu_items/${this.menuItemId}`;
|
|
1146
|
+
}
|
|
1147
|
+
};
|
|
1148
|
+
|
|
1149
|
+
// src/requests/menu-versions/GetMenuVersionDetails.ts
|
|
1150
|
+
import { AbstractApiRequest as AbstractApiRequest31 } from "@deliverart/sdk-js-core";
|
|
1151
|
+
import { z as z24 } from "zod";
|
|
1152
|
+
var getMenuVersionDetailsInputSchema = z24.undefined();
|
|
1153
|
+
var getMenuVersionDetailsResponseSchema = menuVersionSchema;
|
|
1154
|
+
var GetMenuVersionDetails = class extends AbstractApiRequest31 {
|
|
1155
|
+
constructor(pointOfSaleId, menuVersionId) {
|
|
1156
|
+
super(void 0);
|
|
1157
|
+
this.method = "GET";
|
|
1158
|
+
this.contentType = "application/json";
|
|
1159
|
+
this.accept = "application/json";
|
|
1160
|
+
this.inputSchema = getMenuVersionDetailsInputSchema;
|
|
1161
|
+
this.outputSchema = getMenuVersionDetailsResponseSchema;
|
|
1162
|
+
this.querySchema = void 0;
|
|
1163
|
+
this.headersSchema = void 0;
|
|
1164
|
+
this.pointOfSaleId = pointOfSaleId;
|
|
1165
|
+
this.menuVersionId = menuVersionId;
|
|
1166
|
+
}
|
|
1167
|
+
getPath() {
|
|
1168
|
+
return `/point_of_sales/${this.pointOfSaleId}/menu_versions/${this.menuVersionId}`;
|
|
1169
|
+
}
|
|
1170
|
+
};
|
|
1171
|
+
|
|
1172
|
+
// src/requests/menu-versions/GetMenuVersions.ts
|
|
1173
|
+
import { AbstractApiRequest as AbstractApiRequest32 } from "@deliverart/sdk-js-core";
|
|
1174
|
+
import { createPaginatedSchema as createPaginatedSchema9 } from "@deliverart/sdk-js-global-types";
|
|
1175
|
+
import { z as z25 } from "zod";
|
|
1176
|
+
var getMenuVersionsQuerySchema = z25.object({
|
|
1177
|
+
id: z25.union([z25.uuid(), menuVersionIriSchema, z25.array(z25.uuid()), z25.array(menuVersionIriSchema)]).optional(),
|
|
1178
|
+
page: z25.coerce.number().optional()
|
|
1179
|
+
});
|
|
1180
|
+
var getMenuVersionsInputSchema = z25.undefined();
|
|
1181
|
+
var getMenuVersionsResponseSchema = createPaginatedSchema9(menuVersionSchema);
|
|
1182
|
+
var GetMenuVersions = class extends AbstractApiRequest32 {
|
|
1183
|
+
constructor(pointOfSaleId, options) {
|
|
1184
|
+
super(void 0, options);
|
|
1185
|
+
this.method = "GET";
|
|
1186
|
+
this.contentType = "application/json";
|
|
1187
|
+
this.accept = "application/json";
|
|
1188
|
+
this.inputSchema = getMenuVersionsInputSchema;
|
|
1189
|
+
this.outputSchema = getMenuVersionsResponseSchema;
|
|
1190
|
+
this.querySchema = getMenuVersionsQuerySchema;
|
|
1191
|
+
this.headersSchema = void 0;
|
|
1192
|
+
// Declare list behavior
|
|
1193
|
+
this.listItemSchema = menuVersionSchema;
|
|
1194
|
+
this.paginationDefaultEnabled = true;
|
|
1195
|
+
this.pointOfSaleId = pointOfSaleId;
|
|
1196
|
+
}
|
|
1197
|
+
getPath() {
|
|
1198
|
+
return `/point_of_sales/${this.pointOfSaleId}/menu_versions`;
|
|
1199
|
+
}
|
|
1200
|
+
};
|
|
1201
|
+
export {
|
|
1202
|
+
CreateMenuItem,
|
|
1203
|
+
CreateMenuItemCategory,
|
|
1204
|
+
CreateMenuItemModifier,
|
|
1205
|
+
CreateMenuItemPriceOverride,
|
|
1206
|
+
DeleteMenuItem,
|
|
1207
|
+
DeleteMenuItemCategory,
|
|
1208
|
+
DeleteMenuItemModifier,
|
|
1209
|
+
DeleteMenuItemPriceOverride,
|
|
1210
|
+
GetMenuItemCategories,
|
|
1211
|
+
GetMenuItemCategoriesFromPointOfSale,
|
|
1212
|
+
GetMenuItemCategoryDetails,
|
|
1213
|
+
GetMenuItemDetails,
|
|
1214
|
+
GetMenuItemModifierDetails,
|
|
1215
|
+
GetMenuItemModifiers,
|
|
1216
|
+
GetMenuItemModifiersFromPointOfSale,
|
|
1217
|
+
GetMenuItemPriceOverrideDetails,
|
|
1218
|
+
GetMenuItemPriceOverrides,
|
|
1219
|
+
GetMenuItemPriceOverridesAsVariantOverridesFromMenuItemModifier,
|
|
1220
|
+
GetMenuItemPriceOverridesAsVariantsFromMenuItem,
|
|
1221
|
+
GetMenuItemPriceOverridesFromMenuItemModifier,
|
|
1222
|
+
GetMenuItemTagsFromPointOfSale,
|
|
1223
|
+
GetMenuItems,
|
|
1224
|
+
GetMenuItemsAsChoicesFromMenuItemModifier,
|
|
1225
|
+
GetMenuItemsFromMenuItemCategory,
|
|
1226
|
+
GetMenuItemsFromMenuItemModifier,
|
|
1227
|
+
GetMenuItemsFromPointOfSale,
|
|
1228
|
+
GetMenuVersionDetails,
|
|
1229
|
+
GetMenuVersions,
|
|
1230
|
+
UpdateMenuItem,
|
|
1231
|
+
UpdateMenuItemCategory,
|
|
1232
|
+
UpdateMenuItemModifier,
|
|
1233
|
+
UpdateMenuItemPriceOverride,
|
|
1234
|
+
createMenuItemCategoryInputSchema,
|
|
1235
|
+
createMenuItemCategoryResponseSchema,
|
|
1236
|
+
createMenuItemInputSchema,
|
|
1237
|
+
createMenuItemModifierInputSchema,
|
|
1238
|
+
createMenuItemModifierResponseSchema,
|
|
1239
|
+
createMenuItemPriceOverrideInputSchema,
|
|
1240
|
+
createMenuItemPriceOverrideResponseSchema,
|
|
1241
|
+
createMenuItemResponseSchema,
|
|
1242
|
+
deleteMenuItemCategoryInputSchema,
|
|
1243
|
+
deleteMenuItemCategoryResponseSchema,
|
|
1244
|
+
deleteMenuItemInputSchema,
|
|
1245
|
+
deleteMenuItemModifierInputSchema,
|
|
1246
|
+
deleteMenuItemModifierResponseSchema,
|
|
1247
|
+
deleteMenuItemPriceOverrideInputSchema,
|
|
1248
|
+
deleteMenuItemPriceOverrideResponseSchema,
|
|
1249
|
+
deleteMenuItemResponseSchema,
|
|
1250
|
+
getMenuItemCategoriesFromPointOfSaleInputSchema,
|
|
1251
|
+
getMenuItemCategoriesFromPointOfSaleQuerySchema,
|
|
1252
|
+
getMenuItemCategoriesFromPointOfSaleResponseSchema,
|
|
1253
|
+
getMenuItemCategoriesInputSchema,
|
|
1254
|
+
getMenuItemCategoriesQuerySchema,
|
|
1255
|
+
getMenuItemCategoriesResponseSchema,
|
|
1256
|
+
getMenuItemCategoryDetailsInputSchema,
|
|
1257
|
+
getMenuItemCategoryDetailsResponseSchema,
|
|
1258
|
+
getMenuItemDetailsInputSchema,
|
|
1259
|
+
getMenuItemDetailsResponseSchema,
|
|
1260
|
+
getMenuItemModifierDetailsInputSchema,
|
|
1261
|
+
getMenuItemModifierDetailsResponseSchema,
|
|
1262
|
+
getMenuItemModifiersFromPointOfSaleInputSchema,
|
|
1263
|
+
getMenuItemModifiersFromPointOfSaleQuerySchema,
|
|
1264
|
+
getMenuItemModifiersFromPointOfSaleResponseSchema,
|
|
1265
|
+
getMenuItemModifiersInputSchema,
|
|
1266
|
+
getMenuItemModifiersQuerySchema,
|
|
1267
|
+
getMenuItemModifiersResponseSchema,
|
|
1268
|
+
getMenuItemPriceOverrideDetailsInputSchema,
|
|
1269
|
+
getMenuItemPriceOverrideDetailsResponseSchema,
|
|
1270
|
+
getMenuItemPriceOverridesAsVariantOverridesFromMenuItemModifierInputSchema,
|
|
1271
|
+
getMenuItemPriceOverridesAsVariantOverridesFromMenuItemModifierQuerySchema,
|
|
1272
|
+
getMenuItemPriceOverridesAsVariantOverridesFromMenuItemModifierResponseSchema,
|
|
1273
|
+
getMenuItemPriceOverridesAsVariantsFromMenuItemInputSchema,
|
|
1274
|
+
getMenuItemPriceOverridesAsVariantsFromMenuItemQuerySchema,
|
|
1275
|
+
getMenuItemPriceOverridesAsVariantsFromMenuItemResponseSchema,
|
|
1276
|
+
getMenuItemPriceOverridesFromMenuItemModifierInputSchema,
|
|
1277
|
+
getMenuItemPriceOverridesFromMenuItemModifierQuerySchema,
|
|
1278
|
+
getMenuItemPriceOverridesFromMenuItemModifierResponseSchema,
|
|
1279
|
+
getMenuItemPriceOverridesInputSchema,
|
|
1280
|
+
getMenuItemPriceOverridesQuerySchema,
|
|
1281
|
+
getMenuItemPriceOverridesResponseSchema,
|
|
1282
|
+
getMenuItemTagsFromPointOfSaleInputSchema,
|
|
1283
|
+
getMenuItemTagsFromPointOfSaleResponseSchema,
|
|
1284
|
+
getMenuItemsAsChoicesFromMenuItemModifierInputSchema,
|
|
1285
|
+
getMenuItemsAsChoicesFromMenuItemModifierQuerySchema,
|
|
1286
|
+
getMenuItemsAsChoicesFromMenuItemModifierResponseSchema,
|
|
1287
|
+
getMenuItemsFromMenuItemCategoryInputSchema,
|
|
1288
|
+
getMenuItemsFromMenuItemCategoryQuerySchema,
|
|
1289
|
+
getMenuItemsFromMenuItemCategoryResponseSchema,
|
|
1290
|
+
getMenuItemsFromMenuItemModifierInputSchema,
|
|
1291
|
+
getMenuItemsFromMenuItemModifierQuerySchema,
|
|
1292
|
+
getMenuItemsFromMenuItemModifierResponseSchema,
|
|
1293
|
+
getMenuItemsFromPointOfSaleInputSchema,
|
|
1294
|
+
getMenuItemsFromPointOfSaleQuerySchema,
|
|
1295
|
+
getMenuItemsFromPointOfSaleResponseSchema,
|
|
1296
|
+
getMenuItemsInputSchema,
|
|
1297
|
+
getMenuItemsQuerySchema,
|
|
1298
|
+
getMenuItemsResponseSchema,
|
|
1299
|
+
getMenuVersionDetailsInputSchema,
|
|
1300
|
+
getMenuVersionDetailsResponseSchema,
|
|
1301
|
+
getMenuVersionsInputSchema,
|
|
1302
|
+
getMenuVersionsQuerySchema,
|
|
1303
|
+
getMenuVersionsResponseSchema,
|
|
1304
|
+
localeItemSchema,
|
|
1305
|
+
menuCategoryDtoSchema,
|
|
1306
|
+
menuChannelSchema,
|
|
1307
|
+
menuChannels,
|
|
1308
|
+
menuDtoSchema,
|
|
1309
|
+
menuItemAllergenSchema,
|
|
1310
|
+
menuItemAllergens,
|
|
1311
|
+
menuItemBundleDetailsSchema,
|
|
1312
|
+
menuItemBundleSchema,
|
|
1313
|
+
menuItemCategoriesQuerySchema,
|
|
1314
|
+
menuItemCategoryDetailsSchema,
|
|
1315
|
+
menuItemCategoryIriSchema,
|
|
1316
|
+
menuItemCategoryNullableIriSchema,
|
|
1317
|
+
menuItemCategorySchema,
|
|
1318
|
+
menuItemChoiceDetailsSchema,
|
|
1319
|
+
menuItemChoiceSchema,
|
|
1320
|
+
menuItemDetailsSchema,
|
|
1321
|
+
menuItemDietSchema,
|
|
1322
|
+
menuItemDiets,
|
|
1323
|
+
menuItemDtoSchema,
|
|
1324
|
+
menuItemIriSchema,
|
|
1325
|
+
menuItemItemDetailsSchema,
|
|
1326
|
+
menuItemItemSchema,
|
|
1327
|
+
menuItemModifierDetailsSchema,
|
|
1328
|
+
menuItemModifierIriSchema,
|
|
1329
|
+
menuItemModifierNullableIriSchema,
|
|
1330
|
+
menuItemModifierSchema,
|
|
1331
|
+
menuItemModifierScopeSchema,
|
|
1332
|
+
menuItemModifierScopes,
|
|
1333
|
+
menuItemModifiersQuerySchema,
|
|
1334
|
+
menuItemNullableIriSchema,
|
|
1335
|
+
menuItemPriceOverrideDetailsSchema,
|
|
1336
|
+
menuItemPriceOverrideIriSchema,
|
|
1337
|
+
menuItemPriceOverrideNullableIriSchema,
|
|
1338
|
+
menuItemPriceOverrideSalesPriceIriSchema,
|
|
1339
|
+
menuItemPriceOverrideSalesPriceNullableIriSchema,
|
|
1340
|
+
menuItemPriceOverrideSchema,
|
|
1341
|
+
menuItemPriceOverrideTypeSchema,
|
|
1342
|
+
menuItemPriceOverrideTypes,
|
|
1343
|
+
menuItemPriceOverridesQuerySchema,
|
|
1344
|
+
menuItemSalesPriceIriSchema,
|
|
1345
|
+
menuItemSalesPriceNullableIriSchema,
|
|
1346
|
+
menuItemSchema,
|
|
1347
|
+
menuItemTypeSchema,
|
|
1348
|
+
menuItemTypes,
|
|
1349
|
+
menuItemsQuerySchema,
|
|
1350
|
+
menuModifierDtoSchema,
|
|
1351
|
+
menuPriceDtoSchema,
|
|
1352
|
+
menuPriceOverrideDtoSchema,
|
|
1353
|
+
menuVersionIriSchema,
|
|
1354
|
+
menuVersionNullableIriSchema,
|
|
1355
|
+
menuVersionSchema,
|
|
1356
|
+
salesPriceDTOSchema,
|
|
1357
|
+
updateMenuItemCategoryInputSchema,
|
|
1358
|
+
updateMenuItemCategoryResponseSchema,
|
|
1359
|
+
updateMenuItemInputSchema,
|
|
1360
|
+
updateMenuItemModifierInputSchema,
|
|
1361
|
+
updateMenuItemModifierResponseSchema,
|
|
1362
|
+
updateMenuItemPriceOverrideInputSchema,
|
|
1363
|
+
updateMenuItemPriceOverrideResponseSchema,
|
|
1364
|
+
updateMenuItemResponseSchema,
|
|
1365
|
+
writableMenuItemCategorySchema,
|
|
1366
|
+
writableMenuItemModifierSchema,
|
|
1367
|
+
writableMenuItemPriceOverridePartialSchema,
|
|
1368
|
+
writableMenuItemPriceOverrideSchema,
|
|
1369
|
+
writableMenuItemSchema
|
|
1370
|
+
};
|