@wix/auto_sdk_restaurants_item-modifiers 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/index.d.ts +9 -27
- package/build/cjs/index.js +32 -511
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +10 -489
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.d.mts +9 -27
- package/build/es/index.mjs +32 -501
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.mjs +10 -479
- package/build/es/index.typings.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +9 -27
- package/build/internal/cjs/index.js +32 -511
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.js +10 -489
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/es/index.d.mts +9 -27
- package/build/internal/es/index.mjs +32 -501
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.mjs +10 -479
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
15
|
}
|
|
18
16
|
return to;
|
|
19
17
|
};
|
|
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
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
19
|
|
|
30
20
|
// index.typings.ts
|
|
@@ -502,445 +492,6 @@ function bulkDeleteModifiers(payload) {
|
|
|
502
492
|
|
|
503
493
|
// src/restaurants-menus-v1-item-modifier-item-modifiers.universal.ts
|
|
504
494
|
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
505
|
-
|
|
506
|
-
// src/restaurants-menus-v1-item-modifier-item-modifiers.schemas.ts
|
|
507
|
-
var z = __toESM(require("zod"));
|
|
508
|
-
var CreateModifierRequest = z.object({
|
|
509
|
-
modifier: z.object({
|
|
510
|
-
_id: z.string().describe("Item modifier ID.").regex(
|
|
511
|
-
/^[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}$/,
|
|
512
|
-
"Must be a valid GUID"
|
|
513
|
-
).optional().nullable(),
|
|
514
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
515
|
-
"Revision number, which increments by 1 each time the item modifier is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the item modifier. <br />\n\nIgnored when creating an item modifier."
|
|
516
|
-
).optional().nullable(),
|
|
517
|
-
_createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
|
|
518
|
-
_updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
|
|
519
|
-
name: z.string().describe("Item modifier display name.").min(1).max(200),
|
|
520
|
-
extendedFields: z.object({
|
|
521
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
522
|
-
"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)."
|
|
523
|
-
).optional()
|
|
524
|
-
}).describe("Extended fields.").optional(),
|
|
525
|
-
inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
|
|
526
|
-
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
527
|
-
}).describe("Item modifier to create.")
|
|
528
|
-
});
|
|
529
|
-
var CreateModifierResponse = z.object({
|
|
530
|
-
_id: z.string().describe("Item modifier ID.").regex(
|
|
531
|
-
/^[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}$/,
|
|
532
|
-
"Must be a valid GUID"
|
|
533
|
-
).optional().nullable(),
|
|
534
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
535
|
-
"Revision number, which increments by 1 each time the item modifier is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the item modifier. <br />\n\nIgnored when creating an item modifier."
|
|
536
|
-
).optional().nullable(),
|
|
537
|
-
_createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
|
|
538
|
-
_updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
|
|
539
|
-
name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
|
|
540
|
-
extendedFields: z.object({
|
|
541
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
542
|
-
"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)."
|
|
543
|
-
).optional()
|
|
544
|
-
}).describe("Extended fields.").optional(),
|
|
545
|
-
inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
|
|
546
|
-
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
547
|
-
});
|
|
548
|
-
var GetModifierRequest = z.object({
|
|
549
|
-
modifierId: z.string().describe("ID of the item modifier to retrieve.").regex(
|
|
550
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
551
|
-
"Must be a valid GUID"
|
|
552
|
-
)
|
|
553
|
-
});
|
|
554
|
-
var GetModifierResponse = z.object({
|
|
555
|
-
_id: z.string().describe("Item modifier ID.").regex(
|
|
556
|
-
/^[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}$/,
|
|
557
|
-
"Must be a valid GUID"
|
|
558
|
-
).optional().nullable(),
|
|
559
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
560
|
-
"Revision number, which increments by 1 each time the item modifier is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the item modifier. <br />\n\nIgnored when creating an item modifier."
|
|
561
|
-
).optional().nullable(),
|
|
562
|
-
_createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
|
|
563
|
-
_updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
|
|
564
|
-
name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
|
|
565
|
-
extendedFields: z.object({
|
|
566
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
567
|
-
"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)."
|
|
568
|
-
).optional()
|
|
569
|
-
}).describe("Extended fields.").optional(),
|
|
570
|
-
inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
|
|
571
|
-
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
572
|
-
});
|
|
573
|
-
var ListModifiersRequest = z.object({
|
|
574
|
-
options: z.object({
|
|
575
|
-
modifierIds: z.array(z.string()).max(500).optional(),
|
|
576
|
-
paging: z.object({
|
|
577
|
-
limit: z.number().int().describe("Maximum number of items to load.").min(0).max(500).optional().nullable(),
|
|
578
|
-
cursor: z.string().describe(
|
|
579
|
-
"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."
|
|
580
|
-
).optional().nullable()
|
|
581
|
-
}).describe("Metadata of the paginated results.").optional()
|
|
582
|
-
}).optional()
|
|
583
|
-
});
|
|
584
|
-
var ListModifiersResponse = z.object({
|
|
585
|
-
modifiers: z.array(
|
|
586
|
-
z.object({
|
|
587
|
-
_id: z.string().describe("Item modifier ID.").regex(
|
|
588
|
-
/^[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}$/,
|
|
589
|
-
"Must be a valid GUID"
|
|
590
|
-
).optional().nullable(),
|
|
591
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
592
|
-
"Revision number, which increments by 1 each time the item modifier is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the item modifier. <br />\n\nIgnored when creating an item modifier."
|
|
593
|
-
).optional().nullable(),
|
|
594
|
-
_createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
|
|
595
|
-
_updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
|
|
596
|
-
name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
|
|
597
|
-
extendedFields: z.object({
|
|
598
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
599
|
-
"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)."
|
|
600
|
-
).optional()
|
|
601
|
-
}).describe("Extended fields.").optional(),
|
|
602
|
-
inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
|
|
603
|
-
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
604
|
-
})
|
|
605
|
-
).optional(),
|
|
606
|
-
metadata: z.object({
|
|
607
|
-
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
608
|
-
cursors: z.object({
|
|
609
|
-
next: z.string().describe("Cursor pointing to next page in the list of results.").optional().nullable(),
|
|
610
|
-
prev: z.string().describe(
|
|
611
|
-
"Cursor pointing to previous page in the list of results."
|
|
612
|
-
).optional().nullable()
|
|
613
|
-
}).describe(
|
|
614
|
-
"Cursor pointing to the next page and the previous page in the list of results."
|
|
615
|
-
).optional(),
|
|
616
|
-
hasNext: z.boolean().describe(
|
|
617
|
-
"Whether there are more results after the current page.\nIf `true`, another page of results can be retrieved.\nIf `false`, this is the last page."
|
|
618
|
-
).optional().nullable()
|
|
619
|
-
}).describe("Metadata of the paginated results.").optional()
|
|
620
|
-
});
|
|
621
|
-
var UpdateModifierRequest = z.object({
|
|
622
|
-
_id: z.string().describe("Item modifier ID.").regex(
|
|
623
|
-
/^[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}$/,
|
|
624
|
-
"Must be a valid GUID"
|
|
625
|
-
),
|
|
626
|
-
modifier: z.object({
|
|
627
|
-
_id: z.string().describe("Item modifier ID.").regex(
|
|
628
|
-
/^[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}$/,
|
|
629
|
-
"Must be a valid GUID"
|
|
630
|
-
).optional().nullable(),
|
|
631
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
632
|
-
"Revision number, which increments by 1 each time the item modifier is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the item modifier. <br />\n\nIgnored when creating an item modifier."
|
|
633
|
-
),
|
|
634
|
-
_createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
|
|
635
|
-
_updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
|
|
636
|
-
name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
|
|
637
|
-
extendedFields: z.object({
|
|
638
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
639
|
-
"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)."
|
|
640
|
-
).optional()
|
|
641
|
-
}).describe("Extended fields.").optional(),
|
|
642
|
-
inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
|
|
643
|
-
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
644
|
-
}).describe("Item Modifier with updated properties.")
|
|
645
|
-
});
|
|
646
|
-
var UpdateModifierResponse = z.object({
|
|
647
|
-
_id: z.string().describe("Item modifier ID.").regex(
|
|
648
|
-
/^[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}$/,
|
|
649
|
-
"Must be a valid GUID"
|
|
650
|
-
).optional().nullable(),
|
|
651
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
652
|
-
"Revision number, which increments by 1 each time the item modifier is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the item modifier. <br />\n\nIgnored when creating an item modifier."
|
|
653
|
-
).optional().nullable(),
|
|
654
|
-
_createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
|
|
655
|
-
_updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
|
|
656
|
-
name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
|
|
657
|
-
extendedFields: z.object({
|
|
658
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
659
|
-
"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)."
|
|
660
|
-
).optional()
|
|
661
|
-
}).describe("Extended fields.").optional(),
|
|
662
|
-
inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
|
|
663
|
-
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
664
|
-
});
|
|
665
|
-
var BulkCreateModifiersRequest = z.object({
|
|
666
|
-
modifiers: z.array(
|
|
667
|
-
z.object({
|
|
668
|
-
_id: z.string().describe("Item modifier ID.").regex(
|
|
669
|
-
/^[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}$/,
|
|
670
|
-
"Must be a valid GUID"
|
|
671
|
-
).optional().nullable(),
|
|
672
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
673
|
-
"Revision number, which increments by 1 each time the item modifier is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the item modifier. <br />\n\nIgnored when creating an item modifier."
|
|
674
|
-
).optional().nullable(),
|
|
675
|
-
_createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
|
|
676
|
-
_updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
|
|
677
|
-
name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
|
|
678
|
-
extendedFields: z.object({
|
|
679
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
680
|
-
"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)."
|
|
681
|
-
).optional()
|
|
682
|
-
}).describe("Extended fields.").optional(),
|
|
683
|
-
inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
|
|
684
|
-
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
685
|
-
})
|
|
686
|
-
).max(100),
|
|
687
|
-
options: z.object({
|
|
688
|
-
returnEntity: z.boolean().describe(
|
|
689
|
-
"Whether the created item modifiers are included in the response. <br />\nDefault: `false`."
|
|
690
|
-
).optional()
|
|
691
|
-
}).optional()
|
|
692
|
-
});
|
|
693
|
-
var BulkCreateModifiersResponse = z.object({
|
|
694
|
-
results: z.array(
|
|
695
|
-
z.object({
|
|
696
|
-
itemMetadata: z.object({
|
|
697
|
-
_id: z.string().describe(
|
|
698
|
-
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
699
|
-
).optional().nullable(),
|
|
700
|
-
originalIndex: z.number().int().describe(
|
|
701
|
-
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
702
|
-
).optional(),
|
|
703
|
-
success: z.boolean().describe(
|
|
704
|
-
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
705
|
-
).optional(),
|
|
706
|
-
error: z.object({
|
|
707
|
-
code: z.string().describe("Error code.").optional(),
|
|
708
|
-
description: z.string().describe("Description of the error.").optional(),
|
|
709
|
-
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
710
|
-
}).describe("Details about the error in case of failure.").optional()
|
|
711
|
-
}).describe("Metadata for creation of the item modifer.").optional(),
|
|
712
|
-
modifier: z.object({
|
|
713
|
-
_id: z.string().describe("Item modifier ID.").regex(
|
|
714
|
-
/^[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}$/,
|
|
715
|
-
"Must be a valid GUID"
|
|
716
|
-
).optional().nullable(),
|
|
717
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
718
|
-
"Revision number, which increments by 1 each time the item modifier is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the item modifier. <br />\n\nIgnored when creating an item modifier."
|
|
719
|
-
).optional().nullable(),
|
|
720
|
-
_createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
|
|
721
|
-
_updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
|
|
722
|
-
name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
|
|
723
|
-
extendedFields: z.object({
|
|
724
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
725
|
-
"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)."
|
|
726
|
-
).optional()
|
|
727
|
-
}).describe("Extended fields.").optional(),
|
|
728
|
-
inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
|
|
729
|
-
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
730
|
-
}).describe("Created item modifier.").optional()
|
|
731
|
-
})
|
|
732
|
-
).optional(),
|
|
733
|
-
bulkActionMetadata: z.object({
|
|
734
|
-
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
735
|
-
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
736
|
-
undetailedFailures: z.number().int().describe(
|
|
737
|
-
"Number of failures without details because detailed failure threshold was exceeded."
|
|
738
|
-
).optional()
|
|
739
|
-
}).describe("Metadata for Bulk Create Modifiers API call.").optional()
|
|
740
|
-
});
|
|
741
|
-
var BulkUpdateModifiersRequest = z.object({
|
|
742
|
-
modifiers: z.array(
|
|
743
|
-
z.object({
|
|
744
|
-
modifier: z.object({
|
|
745
|
-
_id: z.string().describe("Item modifier ID.").regex(
|
|
746
|
-
/^[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}$/,
|
|
747
|
-
"Must be a valid GUID"
|
|
748
|
-
).optional().nullable(),
|
|
749
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
750
|
-
"Revision number, which increments by 1 each time the item modifier is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the item modifier. <br />\n\nIgnored when creating an item modifier."
|
|
751
|
-
).optional().nullable(),
|
|
752
|
-
_createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
|
|
753
|
-
_updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
|
|
754
|
-
name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
|
|
755
|
-
extendedFields: z.object({
|
|
756
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
757
|
-
"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)."
|
|
758
|
-
).optional()
|
|
759
|
-
}).describe("Extended fields.").optional(),
|
|
760
|
-
inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
|
|
761
|
-
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
762
|
-
}).describe("Item modifier to update.").optional(),
|
|
763
|
-
mask: z.array(z.string()).optional()
|
|
764
|
-
})
|
|
765
|
-
).min(1).max(100),
|
|
766
|
-
options: z.object({
|
|
767
|
-
returnEntity: z.boolean().describe(
|
|
768
|
-
"Whether the updated item modifiers are included in the response."
|
|
769
|
-
).optional()
|
|
770
|
-
}).optional()
|
|
771
|
-
});
|
|
772
|
-
var BulkUpdateModifiersResponse = z.object({
|
|
773
|
-
results: z.array(
|
|
774
|
-
z.object({
|
|
775
|
-
itemMetadata: z.object({
|
|
776
|
-
_id: z.string().describe(
|
|
777
|
-
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
778
|
-
).optional().nullable(),
|
|
779
|
-
originalIndex: z.number().int().describe(
|
|
780
|
-
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
781
|
-
).optional(),
|
|
782
|
-
success: z.boolean().describe(
|
|
783
|
-
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
784
|
-
).optional(),
|
|
785
|
-
error: z.object({
|
|
786
|
-
code: z.string().describe("Error code.").optional(),
|
|
787
|
-
description: z.string().describe("Description of the error.").optional(),
|
|
788
|
-
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
789
|
-
}).describe("Details about the error in case of failure.").optional()
|
|
790
|
-
}).describe("Metadata for the update of the item modifer.").optional(),
|
|
791
|
-
modifier: z.object({
|
|
792
|
-
_id: z.string().describe("Item modifier ID.").regex(
|
|
793
|
-
/^[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}$/,
|
|
794
|
-
"Must be a valid GUID"
|
|
795
|
-
).optional().nullable(),
|
|
796
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
797
|
-
"Revision number, which increments by 1 each time the item modifier is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the item modifier. <br />\n\nIgnored when creating an item modifier."
|
|
798
|
-
).optional().nullable(),
|
|
799
|
-
_createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
|
|
800
|
-
_updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
|
|
801
|
-
name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
|
|
802
|
-
extendedFields: z.object({
|
|
803
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
804
|
-
"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)."
|
|
805
|
-
).optional()
|
|
806
|
-
}).describe("Extended fields.").optional(),
|
|
807
|
-
inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
|
|
808
|
-
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
809
|
-
}).describe("Updated item modifier.").optional()
|
|
810
|
-
})
|
|
811
|
-
).min(1).max(100).optional(),
|
|
812
|
-
bulkActionMetadata: z.object({
|
|
813
|
-
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
814
|
-
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
815
|
-
undetailedFailures: z.number().int().describe(
|
|
816
|
-
"Number of failures without details because detailed failure threshold was exceeded."
|
|
817
|
-
).optional()
|
|
818
|
-
}).describe("Metadata for Bulk Update Modifiers API call.").optional()
|
|
819
|
-
});
|
|
820
|
-
var DeleteModifierRequest = z.object({
|
|
821
|
-
modifierId: z.string().describe("ID of the item modifier to delete.").regex(
|
|
822
|
-
/^[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}$/,
|
|
823
|
-
"Must be a valid GUID"
|
|
824
|
-
)
|
|
825
|
-
});
|
|
826
|
-
var DeleteModifierResponse = z.object({});
|
|
827
|
-
var QueryModifiersRequest = z.object({
|
|
828
|
-
query: z.object({
|
|
829
|
-
filter: z.object({
|
|
830
|
-
_id: z.object({
|
|
831
|
-
$eq: z.string(),
|
|
832
|
-
$in: z.array(z.string()),
|
|
833
|
-
$ne: z.string(),
|
|
834
|
-
$nin: z.array(z.string())
|
|
835
|
-
}).partial().strict().optional(),
|
|
836
|
-
name: z.object({
|
|
837
|
-
$eq: z.string(),
|
|
838
|
-
$in: z.array(z.string()),
|
|
839
|
-
$ne: z.string(),
|
|
840
|
-
$nin: z.array(z.string())
|
|
841
|
-
}).partial().strict().optional(),
|
|
842
|
-
_createdDate: z.object({
|
|
843
|
-
$eq: z.string(),
|
|
844
|
-
$gt: z.string(),
|
|
845
|
-
$gte: z.string(),
|
|
846
|
-
$lt: z.string(),
|
|
847
|
-
$lte: z.string(),
|
|
848
|
-
$ne: z.string()
|
|
849
|
-
}).partial().strict().optional(),
|
|
850
|
-
_updatedDate: z.object({
|
|
851
|
-
$eq: z.string(),
|
|
852
|
-
$gt: z.string(),
|
|
853
|
-
$gte: z.string(),
|
|
854
|
-
$lt: z.string(),
|
|
855
|
-
$lte: z.string(),
|
|
856
|
-
$ne: z.string()
|
|
857
|
-
}).partial().strict().optional(),
|
|
858
|
-
$and: z.array(z.any()).optional(),
|
|
859
|
-
$or: z.array(z.any()).optional(),
|
|
860
|
-
$not: z.any().optional()
|
|
861
|
-
}).strict().optional(),
|
|
862
|
-
sort: z.array(z.object({})).optional()
|
|
863
|
-
}).catchall(z.any()).describe("Query options.")
|
|
864
|
-
});
|
|
865
|
-
var QueryModifiersResponse = z.object({
|
|
866
|
-
modifiers: z.array(
|
|
867
|
-
z.object({
|
|
868
|
-
_id: z.string().describe("Item modifier ID.").regex(
|
|
869
|
-
/^[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}$/,
|
|
870
|
-
"Must be a valid GUID"
|
|
871
|
-
).optional().nullable(),
|
|
872
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
873
|
-
"Revision number, which increments by 1 each time the item modifier is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the item modifier. <br />\n\nIgnored when creating an item modifier."
|
|
874
|
-
).optional().nullable(),
|
|
875
|
-
_createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
|
|
876
|
-
_updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
|
|
877
|
-
name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
|
|
878
|
-
extendedFields: z.object({
|
|
879
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
880
|
-
"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)."
|
|
881
|
-
).optional()
|
|
882
|
-
}).describe("Extended fields.").optional(),
|
|
883
|
-
inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
|
|
884
|
-
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
885
|
-
})
|
|
886
|
-
).optional(),
|
|
887
|
-
pagingMetadata: z.object({
|
|
888
|
-
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
889
|
-
cursors: z.object({
|
|
890
|
-
next: z.string().describe("Cursor pointing to next page in the list of results.").optional().nullable(),
|
|
891
|
-
prev: z.string().describe(
|
|
892
|
-
"Cursor pointing to previous page in the list of results."
|
|
893
|
-
).optional().nullable()
|
|
894
|
-
}).describe(
|
|
895
|
-
"Cursor pointing to the next page and the previous page in the list of results."
|
|
896
|
-
).optional(),
|
|
897
|
-
hasNext: z.boolean().describe(
|
|
898
|
-
"Whether there are more results after the current page.\nIf `true`, another page of results can be retrieved.\nIf `false`, this is the last page."
|
|
899
|
-
).optional().nullable()
|
|
900
|
-
}).describe("Metadata of the paginated results.").optional()
|
|
901
|
-
});
|
|
902
|
-
var CountModifiersRequest = z.object({
|
|
903
|
-
options: z.object({
|
|
904
|
-
filter: z.record(z.string(), z.any()).describe("Filter for counting modifiers.").optional().nullable()
|
|
905
|
-
}).optional()
|
|
906
|
-
});
|
|
907
|
-
var CountModifiersResponse = z.object({
|
|
908
|
-
count: z.number().int().describe("Counted modifiers.").optional()
|
|
909
|
-
});
|
|
910
|
-
var BulkDeleteModifiersRequest = z.object({
|
|
911
|
-
ids: z.array(z.string()).max(200)
|
|
912
|
-
});
|
|
913
|
-
var BulkDeleteModifiersResponse = z.object({
|
|
914
|
-
results: z.array(
|
|
915
|
-
z.object({
|
|
916
|
-
itemMetadata: z.object({
|
|
917
|
-
_id: z.string().describe(
|
|
918
|
-
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
919
|
-
).optional().nullable(),
|
|
920
|
-
originalIndex: z.number().int().describe(
|
|
921
|
-
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
922
|
-
).optional(),
|
|
923
|
-
success: z.boolean().describe(
|
|
924
|
-
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
925
|
-
).optional(),
|
|
926
|
-
error: z.object({
|
|
927
|
-
code: z.string().describe("Error code.").optional(),
|
|
928
|
-
description: z.string().describe("Description of the error.").optional(),
|
|
929
|
-
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
930
|
-
}).describe("Details about the error in case of failure.").optional()
|
|
931
|
-
}).describe("Metadata for modifiers deletion.").optional()
|
|
932
|
-
})
|
|
933
|
-
).optional(),
|
|
934
|
-
bulkActionMetadata: z.object({
|
|
935
|
-
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
936
|
-
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
937
|
-
undetailedFailures: z.number().int().describe(
|
|
938
|
-
"Number of failures without details because detailed failure threshold was exceeded."
|
|
939
|
-
).optional()
|
|
940
|
-
}).describe("Metadata for the API call.").optional()
|
|
941
|
-
});
|
|
942
|
-
|
|
943
|
-
// src/restaurants-menus-v1-item-modifier-item-modifiers.universal.ts
|
|
944
495
|
var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
|
|
945
496
|
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
946
497
|
SortOrder2["ASC"] = "ASC";
|
|
@@ -956,10 +507,7 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
956
507
|
return WebhookIdentityType2;
|
|
957
508
|
})(WebhookIdentityType || {});
|
|
958
509
|
async function createModifier2(modifier) {
|
|
959
|
-
const { httpClient, sideEffects
|
|
960
|
-
if (validateRequestSchema) {
|
|
961
|
-
CreateModifierRequest.parse({ modifier });
|
|
962
|
-
}
|
|
510
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
963
511
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ modifier });
|
|
964
512
|
const reqOpts = createModifier(payload);
|
|
965
513
|
sideEffects?.onSiteCall?.();
|
|
@@ -982,10 +530,7 @@ async function createModifier2(modifier) {
|
|
|
982
530
|
}
|
|
983
531
|
}
|
|
984
532
|
async function getModifier2(modifierId) {
|
|
985
|
-
const { httpClient, sideEffects
|
|
986
|
-
if (validateRequestSchema) {
|
|
987
|
-
GetModifierRequest.parse({ modifierId });
|
|
988
|
-
}
|
|
533
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
989
534
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
990
535
|
modifierId
|
|
991
536
|
});
|
|
@@ -1010,10 +555,7 @@ async function getModifier2(modifierId) {
|
|
|
1010
555
|
}
|
|
1011
556
|
}
|
|
1012
557
|
async function listModifiers2(options) {
|
|
1013
|
-
const { httpClient, sideEffects
|
|
1014
|
-
if (validateRequestSchema) {
|
|
1015
|
-
ListModifiersRequest.parse({ options });
|
|
1016
|
-
}
|
|
558
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1017
559
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1018
560
|
modifierIds: options?.modifierIds,
|
|
1019
561
|
paging: options?.paging
|
|
@@ -1042,10 +584,7 @@ async function listModifiers2(options) {
|
|
|
1042
584
|
}
|
|
1043
585
|
}
|
|
1044
586
|
async function updateModifier2(_id, modifier) {
|
|
1045
|
-
const { httpClient, sideEffects
|
|
1046
|
-
if (validateRequestSchema) {
|
|
1047
|
-
UpdateModifierRequest.parse({ _id, modifier });
|
|
1048
|
-
}
|
|
587
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1049
588
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1050
589
|
modifier: { ...modifier, id: _id }
|
|
1051
590
|
});
|
|
@@ -1070,10 +609,7 @@ async function updateModifier2(_id, modifier) {
|
|
|
1070
609
|
}
|
|
1071
610
|
}
|
|
1072
611
|
async function bulkCreateModifiers2(modifiers, options) {
|
|
1073
|
-
const { httpClient, sideEffects
|
|
1074
|
-
if (validateRequestSchema) {
|
|
1075
|
-
BulkCreateModifiersRequest.parse({ modifiers, options });
|
|
1076
|
-
}
|
|
612
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1077
613
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1078
614
|
modifiers,
|
|
1079
615
|
returnEntity: options?.returnEntity
|
|
@@ -1102,10 +638,7 @@ async function bulkCreateModifiers2(modifiers, options) {
|
|
|
1102
638
|
}
|
|
1103
639
|
}
|
|
1104
640
|
async function bulkUpdateModifiers2(modifiers, options) {
|
|
1105
|
-
const { httpClient, sideEffects
|
|
1106
|
-
if (validateRequestSchema) {
|
|
1107
|
-
BulkUpdateModifiersRequest.parse({ modifiers, options });
|
|
1108
|
-
}
|
|
641
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1109
642
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1110
643
|
modifiers,
|
|
1111
644
|
returnEntity: options?.returnEntity
|
|
@@ -1134,10 +667,7 @@ async function bulkUpdateModifiers2(modifiers, options) {
|
|
|
1134
667
|
}
|
|
1135
668
|
}
|
|
1136
669
|
async function deleteModifier2(modifierId) {
|
|
1137
|
-
const { httpClient, sideEffects
|
|
1138
|
-
if (validateRequestSchema) {
|
|
1139
|
-
DeleteModifierRequest.parse({ modifierId });
|
|
1140
|
-
}
|
|
670
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1141
671
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1142
672
|
modifierId
|
|
1143
673
|
});
|
|
@@ -1204,10 +734,7 @@ function queryModifiers2() {
|
|
|
1204
734
|
});
|
|
1205
735
|
}
|
|
1206
736
|
async function typedQueryModifiers(query) {
|
|
1207
|
-
const { httpClient, sideEffects
|
|
1208
|
-
if (validateRequestSchema) {
|
|
1209
|
-
QueryModifiersRequest.parse({ query });
|
|
1210
|
-
}
|
|
737
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1211
738
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
|
|
1212
739
|
const reqOpts = queryModifiers(payload);
|
|
1213
740
|
sideEffects?.onSiteCall?.();
|
|
@@ -1235,10 +762,7 @@ var utils = {
|
|
|
1235
762
|
}
|
|
1236
763
|
};
|
|
1237
764
|
async function countModifiers2(options) {
|
|
1238
|
-
const { httpClient, sideEffects
|
|
1239
|
-
if (validateRequestSchema) {
|
|
1240
|
-
CountModifiersRequest.parse({ options });
|
|
1241
|
-
}
|
|
765
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1242
766
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1243
767
|
filter: options?.filter
|
|
1244
768
|
});
|
|
@@ -1263,10 +787,7 @@ async function countModifiers2(options) {
|
|
|
1263
787
|
}
|
|
1264
788
|
}
|
|
1265
789
|
async function bulkDeleteModifiers2(ids) {
|
|
1266
|
-
const { httpClient, sideEffects
|
|
1267
|
-
if (validateRequestSchema) {
|
|
1268
|
-
BulkDeleteModifiersRequest.parse({ ids });
|
|
1269
|
-
}
|
|
790
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1270
791
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ ids });
|
|
1271
792
|
const reqOpts = bulkDeleteModifiers(payload);
|
|
1272
793
|
sideEffects?.onSiteCall?.();
|