@wix/auto_sdk_restaurants_item-modifier-groups 1.0.70 → 1.0.71
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 -806
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +10 -784
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.d.mts +9 -27
- package/build/es/index.mjs +32 -796
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.mjs +10 -774
- 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 -806
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.js +10 -784
- 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 -796
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.mjs +10 -774
- 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.ts
|
|
@@ -524,740 +514,6 @@ function bulkDeleteModifierGroups(payload) {
|
|
|
524
514
|
|
|
525
515
|
// src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.universal.ts
|
|
526
516
|
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
527
|
-
|
|
528
|
-
// src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.schemas.ts
|
|
529
|
-
var z = __toESM(require("zod"));
|
|
530
|
-
var CreateModifierGroupRequest = z.object({
|
|
531
|
-
modifierGroup: z.object({
|
|
532
|
-
_id: z.string().describe("Modifier group ID.").regex(
|
|
533
|
-
/^[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}$/,
|
|
534
|
-
"Must be a valid GUID"
|
|
535
|
-
).optional().nullable(),
|
|
536
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
537
|
-
"Revision number, which increments by 1 each time the modifier group is updated. To prevent conflicting changes, the current revision must be passed when updating the modifier group. Ignored when creating a modifier group."
|
|
538
|
-
).optional().nullable(),
|
|
539
|
-
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
540
|
-
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
541
|
-
name: z.string().describe("Modifier group name.").min(1).max(100),
|
|
542
|
-
modifiers: z.array(
|
|
543
|
-
z.object({
|
|
544
|
-
_id: z.string().describe("Item modifier ID.").regex(
|
|
545
|
-
/^[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}$/,
|
|
546
|
-
"Must be a valid GUID"
|
|
547
|
-
).optional(),
|
|
548
|
-
preSelected: z.boolean().describe(
|
|
549
|
-
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
550
|
-
).optional().nullable(),
|
|
551
|
-
additionalChargeInfo: z.object({
|
|
552
|
-
additionalCharge: z.string().describe(
|
|
553
|
-
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
554
|
-
).optional().nullable()
|
|
555
|
-
}).describe("Item modifier price details.").optional()
|
|
556
|
-
})
|
|
557
|
-
).min(0).max(500).optional(),
|
|
558
|
-
rule: z.object({
|
|
559
|
-
required: z.boolean().describe(
|
|
560
|
-
"Whether the items from the modifier group must be selected."
|
|
561
|
-
).optional().nullable(),
|
|
562
|
-
minSelections: z.number().int().describe(
|
|
563
|
-
"Minimum number of item modifiers a site visitor must select. The value must be lower or equal to the available item modifiers in the group.\nDefault: `0`."
|
|
564
|
-
).min(0).max(25).optional().nullable(),
|
|
565
|
-
maxSelections: z.number().int().describe(
|
|
566
|
-
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
567
|
-
).min(0).max(25).optional().nullable()
|
|
568
|
-
}).describe("Modifier group details.").optional(),
|
|
569
|
-
extendedFields: z.object({
|
|
570
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
571
|
-
"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)."
|
|
572
|
-
).optional()
|
|
573
|
-
}).describe("Extended fields.").optional(),
|
|
574
|
-
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
575
|
-
}).describe("Modifier group details.")
|
|
576
|
-
});
|
|
577
|
-
var CreateModifierGroupResponse = z.object({
|
|
578
|
-
_id: z.string().describe("Modifier group ID.").regex(
|
|
579
|
-
/^[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}$/,
|
|
580
|
-
"Must be a valid GUID"
|
|
581
|
-
).optional().nullable(),
|
|
582
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
583
|
-
"Revision number, which increments by 1 each time the modifier group is updated. To prevent conflicting changes, the current revision must be passed when updating the modifier group. Ignored when creating a modifier group."
|
|
584
|
-
).optional().nullable(),
|
|
585
|
-
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
586
|
-
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
587
|
-
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
588
|
-
modifiers: z.array(
|
|
589
|
-
z.object({
|
|
590
|
-
_id: z.string().describe("Item modifier ID.").regex(
|
|
591
|
-
/^[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}$/,
|
|
592
|
-
"Must be a valid GUID"
|
|
593
|
-
).optional(),
|
|
594
|
-
preSelected: z.boolean().describe(
|
|
595
|
-
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
596
|
-
).optional().nullable(),
|
|
597
|
-
additionalChargeInfo: z.object({
|
|
598
|
-
additionalCharge: z.string().describe(
|
|
599
|
-
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
600
|
-
).optional().nullable()
|
|
601
|
-
}).describe("Item modifier price details.").optional()
|
|
602
|
-
})
|
|
603
|
-
).min(0).max(500).optional(),
|
|
604
|
-
rule: z.object({
|
|
605
|
-
required: z.boolean().describe("Whether the items from the modifier group must be selected.").optional().nullable(),
|
|
606
|
-
minSelections: z.number().int().describe(
|
|
607
|
-
"Minimum number of item modifiers a site visitor must select. The value must be lower or equal to the available item modifiers in the group.\nDefault: `0`."
|
|
608
|
-
).min(0).max(25).optional().nullable(),
|
|
609
|
-
maxSelections: z.number().int().describe(
|
|
610
|
-
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
611
|
-
).min(0).max(25).optional().nullable()
|
|
612
|
-
}).describe("Modifier group details.").optional(),
|
|
613
|
-
extendedFields: z.object({
|
|
614
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
615
|
-
"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)."
|
|
616
|
-
).optional()
|
|
617
|
-
}).describe("Extended fields.").optional(),
|
|
618
|
-
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
619
|
-
});
|
|
620
|
-
var GetModifierGroupRequest = z.object({
|
|
621
|
-
modifierGroupId: z.string().describe("Modifier group ID.").regex(
|
|
622
|
-
/^[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}$/,
|
|
623
|
-
"Must be a valid GUID"
|
|
624
|
-
)
|
|
625
|
-
});
|
|
626
|
-
var GetModifierGroupResponse = z.object({
|
|
627
|
-
_id: z.string().describe("Modifier group 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 modifier group is updated. To prevent conflicting changes, the current revision must be passed when updating the modifier group. Ignored when creating a modifier group."
|
|
633
|
-
).optional().nullable(),
|
|
634
|
-
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
635
|
-
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
636
|
-
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
637
|
-
modifiers: z.array(
|
|
638
|
-
z.object({
|
|
639
|
-
_id: z.string().describe("Item modifier ID.").regex(
|
|
640
|
-
/^[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}$/,
|
|
641
|
-
"Must be a valid GUID"
|
|
642
|
-
).optional(),
|
|
643
|
-
preSelected: z.boolean().describe(
|
|
644
|
-
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
645
|
-
).optional().nullable(),
|
|
646
|
-
additionalChargeInfo: z.object({
|
|
647
|
-
additionalCharge: z.string().describe(
|
|
648
|
-
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
649
|
-
).optional().nullable()
|
|
650
|
-
}).describe("Item modifier price details.").optional()
|
|
651
|
-
})
|
|
652
|
-
).min(0).max(500).optional(),
|
|
653
|
-
rule: z.object({
|
|
654
|
-
required: z.boolean().describe("Whether the items from the modifier group must be selected.").optional().nullable(),
|
|
655
|
-
minSelections: z.number().int().describe(
|
|
656
|
-
"Minimum number of item modifiers a site visitor must select. The value must be lower or equal to the available item modifiers in the group.\nDefault: `0`."
|
|
657
|
-
).min(0).max(25).optional().nullable(),
|
|
658
|
-
maxSelections: z.number().int().describe(
|
|
659
|
-
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
660
|
-
).min(0).max(25).optional().nullable()
|
|
661
|
-
}).describe("Modifier group details.").optional(),
|
|
662
|
-
extendedFields: z.object({
|
|
663
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
664
|
-
"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)."
|
|
665
|
-
).optional()
|
|
666
|
-
}).describe("Extended fields.").optional(),
|
|
667
|
-
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
668
|
-
});
|
|
669
|
-
var ListModifierGroupsRequest = z.object({
|
|
670
|
-
options: z.object({
|
|
671
|
-
modifierGroupIds: z.array(z.string()).max(500).optional(),
|
|
672
|
-
paging: z.object({
|
|
673
|
-
limit: z.number().int().describe("Number of items to load.").min(0).max(500).optional().nullable(),
|
|
674
|
-
cursor: z.string().describe(
|
|
675
|
-
"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."
|
|
676
|
-
).optional().nullable()
|
|
677
|
-
}).describe("The metadata of the paginated results.").optional()
|
|
678
|
-
}).optional()
|
|
679
|
-
});
|
|
680
|
-
var ListModifierGroupsResponse = z.object({
|
|
681
|
-
modifierGroups: z.array(
|
|
682
|
-
z.object({
|
|
683
|
-
_id: z.string().describe("Modifier group ID.").regex(
|
|
684
|
-
/^[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}$/,
|
|
685
|
-
"Must be a valid GUID"
|
|
686
|
-
).optional().nullable(),
|
|
687
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
688
|
-
"Revision number, which increments by 1 each time the modifier group is updated. To prevent conflicting changes, the current revision must be passed when updating the modifier group. Ignored when creating a modifier group."
|
|
689
|
-
).optional().nullable(),
|
|
690
|
-
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
691
|
-
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
692
|
-
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
693
|
-
modifiers: z.array(
|
|
694
|
-
z.object({
|
|
695
|
-
_id: z.string().describe("Item modifier ID.").regex(
|
|
696
|
-
/^[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}$/,
|
|
697
|
-
"Must be a valid GUID"
|
|
698
|
-
).optional(),
|
|
699
|
-
preSelected: z.boolean().describe(
|
|
700
|
-
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
701
|
-
).optional().nullable(),
|
|
702
|
-
additionalChargeInfo: z.object({
|
|
703
|
-
additionalCharge: z.string().describe(
|
|
704
|
-
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
705
|
-
).optional().nullable()
|
|
706
|
-
}).describe("Item modifier price details.").optional()
|
|
707
|
-
})
|
|
708
|
-
).min(0).max(500).optional(),
|
|
709
|
-
rule: z.object({
|
|
710
|
-
required: z.boolean().describe(
|
|
711
|
-
"Whether the items from the modifier group must be selected."
|
|
712
|
-
).optional().nullable(),
|
|
713
|
-
minSelections: z.number().int().describe(
|
|
714
|
-
"Minimum number of item modifiers a site visitor must select. The value must be lower or equal to the available item modifiers in the group.\nDefault: `0`."
|
|
715
|
-
).min(0).max(25).optional().nullable(),
|
|
716
|
-
maxSelections: z.number().int().describe(
|
|
717
|
-
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
718
|
-
).min(0).max(25).optional().nullable()
|
|
719
|
-
}).describe("Modifier group details.").optional(),
|
|
720
|
-
extendedFields: z.object({
|
|
721
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
722
|
-
"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)."
|
|
723
|
-
).optional()
|
|
724
|
-
}).describe("Extended fields.").optional(),
|
|
725
|
-
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
726
|
-
})
|
|
727
|
-
).optional(),
|
|
728
|
-
metadata: z.object({
|
|
729
|
-
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
730
|
-
cursors: z.object({
|
|
731
|
-
next: z.string().describe("Cursor pointing to next page in the list of results.").optional().nullable(),
|
|
732
|
-
prev: z.string().describe(
|
|
733
|
-
"Cursor pointing to previous page in the list of results."
|
|
734
|
-
).optional().nullable()
|
|
735
|
-
}).describe("Offset that was requested.").optional(),
|
|
736
|
-
hasNext: z.boolean().describe(
|
|
737
|
-
"Indicates if there are more results after the current page.\nIf `true`, another page of results can be retrieved.\nIf `false`, this is the last page."
|
|
738
|
-
).optional().nullable()
|
|
739
|
-
}).describe("The metadata of the paginated results.").optional()
|
|
740
|
-
});
|
|
741
|
-
var QueryModifierGroupsRequest = z.object({
|
|
742
|
-
query: z.object({
|
|
743
|
-
filter: z.object({
|
|
744
|
-
_id: z.object({
|
|
745
|
-
$eq: z.string(),
|
|
746
|
-
$in: z.array(z.string()),
|
|
747
|
-
$ne: z.string(),
|
|
748
|
-
$nin: z.array(z.string())
|
|
749
|
-
}).partial().strict().optional(),
|
|
750
|
-
_createdDate: z.object({
|
|
751
|
-
$eq: z.string(),
|
|
752
|
-
$gt: z.string(),
|
|
753
|
-
$gte: z.string(),
|
|
754
|
-
$lt: z.string(),
|
|
755
|
-
$lte: z.string(),
|
|
756
|
-
$ne: z.string()
|
|
757
|
-
}).partial().strict().optional(),
|
|
758
|
-
_updatedDate: z.object({
|
|
759
|
-
$eq: z.string(),
|
|
760
|
-
$gt: z.string(),
|
|
761
|
-
$gte: z.string(),
|
|
762
|
-
$lt: z.string(),
|
|
763
|
-
$lte: z.string(),
|
|
764
|
-
$ne: z.string()
|
|
765
|
-
}).partial().strict().optional(),
|
|
766
|
-
"modifiers._id": z.object({
|
|
767
|
-
$hasSome: z.array(z.string()),
|
|
768
|
-
$in: z.array(z.string()),
|
|
769
|
-
$nin: z.array(z.string())
|
|
770
|
-
}).partial().strict().optional(),
|
|
771
|
-
"modifiers.preSelected": z.object({ $eq: z.boolean(), $ne: z.boolean() }).partial().strict().optional(),
|
|
772
|
-
"rule.minSelections": z.object({ $eq: z.number(), $ne: z.number() }).partial().strict().optional(),
|
|
773
|
-
"rule.maxSelections": z.object({ $eq: z.number(), $ne: z.number() }).partial().strict().optional(),
|
|
774
|
-
modifiers: z.object({ $exists: z.boolean() }).partial().strict().optional(),
|
|
775
|
-
"rule.required": z.object({
|
|
776
|
-
$eq: z.boolean(),
|
|
777
|
-
$in: z.array(z.boolean()),
|
|
778
|
-
$ne: z.boolean(),
|
|
779
|
-
$nin: z.array(z.boolean())
|
|
780
|
-
}).partial().strict().optional(),
|
|
781
|
-
rule: z.object({ $exists: z.boolean() }).partial().strict().optional(),
|
|
782
|
-
name: z.object({
|
|
783
|
-
$eq: z.string(),
|
|
784
|
-
$in: z.array(z.string()),
|
|
785
|
-
$ne: z.string(),
|
|
786
|
-
$nin: z.array(z.string()),
|
|
787
|
-
$startsWith: z.string()
|
|
788
|
-
}).partial().strict().optional(),
|
|
789
|
-
$and: z.array(z.any()).optional(),
|
|
790
|
-
$or: z.array(z.any()).optional(),
|
|
791
|
-
$not: z.any().optional()
|
|
792
|
-
}).strict().optional(),
|
|
793
|
-
sort: z.array(z.object({})).optional()
|
|
794
|
-
}).catchall(z.any()).describe("Query options.")
|
|
795
|
-
});
|
|
796
|
-
var QueryModifierGroupsResponse = z.object({
|
|
797
|
-
modifierGroups: z.array(
|
|
798
|
-
z.object({
|
|
799
|
-
_id: z.string().describe("Modifier group ID.").regex(
|
|
800
|
-
/^[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}$/,
|
|
801
|
-
"Must be a valid GUID"
|
|
802
|
-
).optional().nullable(),
|
|
803
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
804
|
-
"Revision number, which increments by 1 each time the modifier group is updated. To prevent conflicting changes, the current revision must be passed when updating the modifier group. Ignored when creating a modifier group."
|
|
805
|
-
).optional().nullable(),
|
|
806
|
-
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
807
|
-
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
808
|
-
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
809
|
-
modifiers: z.array(
|
|
810
|
-
z.object({
|
|
811
|
-
_id: z.string().describe("Item modifier ID.").regex(
|
|
812
|
-
/^[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}$/,
|
|
813
|
-
"Must be a valid GUID"
|
|
814
|
-
).optional(),
|
|
815
|
-
preSelected: z.boolean().describe(
|
|
816
|
-
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
817
|
-
).optional().nullable(),
|
|
818
|
-
additionalChargeInfo: z.object({
|
|
819
|
-
additionalCharge: z.string().describe(
|
|
820
|
-
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
821
|
-
).optional().nullable()
|
|
822
|
-
}).describe("Item modifier price details.").optional()
|
|
823
|
-
})
|
|
824
|
-
).min(0).max(500).optional(),
|
|
825
|
-
rule: z.object({
|
|
826
|
-
required: z.boolean().describe(
|
|
827
|
-
"Whether the items from the modifier group must be selected."
|
|
828
|
-
).optional().nullable(),
|
|
829
|
-
minSelections: z.number().int().describe(
|
|
830
|
-
"Minimum number of item modifiers a site visitor must select. The value must be lower or equal to the available item modifiers in the group.\nDefault: `0`."
|
|
831
|
-
).min(0).max(25).optional().nullable(),
|
|
832
|
-
maxSelections: z.number().int().describe(
|
|
833
|
-
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
834
|
-
).min(0).max(25).optional().nullable()
|
|
835
|
-
}).describe("Modifier group details.").optional(),
|
|
836
|
-
extendedFields: z.object({
|
|
837
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
838
|
-
"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)."
|
|
839
|
-
).optional()
|
|
840
|
-
}).describe("Extended fields.").optional(),
|
|
841
|
-
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
842
|
-
})
|
|
843
|
-
).optional(),
|
|
844
|
-
pagingMetadata: z.object({
|
|
845
|
-
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
846
|
-
cursors: z.object({
|
|
847
|
-
next: z.string().describe("Cursor pointing to next page in the list of results.").optional().nullable(),
|
|
848
|
-
prev: z.string().describe(
|
|
849
|
-
"Cursor pointing to previous page in the list of results."
|
|
850
|
-
).optional().nullable()
|
|
851
|
-
}).describe("Offset that was requested.").optional(),
|
|
852
|
-
hasNext: z.boolean().describe(
|
|
853
|
-
"Indicates if there are more results after the current page.\nIf `true`, another page of results can be retrieved.\nIf `false`, this is the last page."
|
|
854
|
-
).optional().nullable()
|
|
855
|
-
}).describe("Metadata of the paginated results.").optional()
|
|
856
|
-
});
|
|
857
|
-
var CountModifierGroupsRequest = z.object({
|
|
858
|
-
options: z.object({
|
|
859
|
-
filter: z.record(z.string(), z.any()).describe("Filter for counting modifier groups.").optional().nullable()
|
|
860
|
-
}).optional()
|
|
861
|
-
});
|
|
862
|
-
var CountModifierGroupsResponse = z.object({
|
|
863
|
-
count: z.number().int().describe("Counted modifier groups.").optional()
|
|
864
|
-
});
|
|
865
|
-
var UpdateModifierGroupRequest = z.object({
|
|
866
|
-
_id: z.string().describe("Modifier group ID.").regex(
|
|
867
|
-
/^[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}$/,
|
|
868
|
-
"Must be a valid GUID"
|
|
869
|
-
),
|
|
870
|
-
modifierGroup: z.object({
|
|
871
|
-
_id: z.string().describe("Modifier group ID.").regex(
|
|
872
|
-
/^[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}$/,
|
|
873
|
-
"Must be a valid GUID"
|
|
874
|
-
).optional().nullable(),
|
|
875
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
876
|
-
"Revision number, which increments by 1 each time the modifier group is updated. To prevent conflicting changes, the current revision must be passed when updating the modifier group. Ignored when creating a modifier group."
|
|
877
|
-
),
|
|
878
|
-
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
879
|
-
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
880
|
-
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
881
|
-
modifiers: z.array(
|
|
882
|
-
z.object({
|
|
883
|
-
_id: z.string().describe("Item modifier ID.").regex(
|
|
884
|
-
/^[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}$/,
|
|
885
|
-
"Must be a valid GUID"
|
|
886
|
-
).optional(),
|
|
887
|
-
preSelected: z.boolean().describe(
|
|
888
|
-
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
889
|
-
).optional().nullable(),
|
|
890
|
-
additionalChargeInfo: z.object({
|
|
891
|
-
additionalCharge: z.string().describe(
|
|
892
|
-
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
893
|
-
).optional().nullable()
|
|
894
|
-
}).describe("Item modifier price details.").optional()
|
|
895
|
-
})
|
|
896
|
-
).min(0).max(500).optional(),
|
|
897
|
-
rule: z.object({
|
|
898
|
-
required: z.boolean().describe(
|
|
899
|
-
"Whether the items from the modifier group must be selected."
|
|
900
|
-
).optional().nullable(),
|
|
901
|
-
minSelections: z.number().int().describe(
|
|
902
|
-
"Minimum number of item modifiers a site visitor must select. The value must be lower or equal to the available item modifiers in the group.\nDefault: `0`."
|
|
903
|
-
).min(0).max(25).optional().nullable(),
|
|
904
|
-
maxSelections: z.number().int().describe(
|
|
905
|
-
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
906
|
-
).min(0).max(25).optional().nullable()
|
|
907
|
-
}).describe("Modifier group details.").optional(),
|
|
908
|
-
extendedFields: z.object({
|
|
909
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
910
|
-
"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)."
|
|
911
|
-
).optional()
|
|
912
|
-
}).describe("Extended fields.").optional(),
|
|
913
|
-
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
914
|
-
}).describe("Modifier group to update.")
|
|
915
|
-
});
|
|
916
|
-
var UpdateModifierGroupResponse = z.object({
|
|
917
|
-
_id: z.string().describe("Modifier group ID.").regex(
|
|
918
|
-
/^[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}$/,
|
|
919
|
-
"Must be a valid GUID"
|
|
920
|
-
).optional().nullable(),
|
|
921
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
922
|
-
"Revision number, which increments by 1 each time the modifier group is updated. To prevent conflicting changes, the current revision must be passed when updating the modifier group. Ignored when creating a modifier group."
|
|
923
|
-
).optional().nullable(),
|
|
924
|
-
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
925
|
-
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
926
|
-
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
927
|
-
modifiers: z.array(
|
|
928
|
-
z.object({
|
|
929
|
-
_id: z.string().describe("Item modifier ID.").regex(
|
|
930
|
-
/^[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}$/,
|
|
931
|
-
"Must be a valid GUID"
|
|
932
|
-
).optional(),
|
|
933
|
-
preSelected: z.boolean().describe(
|
|
934
|
-
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
935
|
-
).optional().nullable(),
|
|
936
|
-
additionalChargeInfo: z.object({
|
|
937
|
-
additionalCharge: z.string().describe(
|
|
938
|
-
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
939
|
-
).optional().nullable()
|
|
940
|
-
}).describe("Item modifier price details.").optional()
|
|
941
|
-
})
|
|
942
|
-
).min(0).max(500).optional(),
|
|
943
|
-
rule: z.object({
|
|
944
|
-
required: z.boolean().describe("Whether the items from the modifier group must be selected.").optional().nullable(),
|
|
945
|
-
minSelections: z.number().int().describe(
|
|
946
|
-
"Minimum number of item modifiers a site visitor must select. The value must be lower or equal to the available item modifiers in the group.\nDefault: `0`."
|
|
947
|
-
).min(0).max(25).optional().nullable(),
|
|
948
|
-
maxSelections: z.number().int().describe(
|
|
949
|
-
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
950
|
-
).min(0).max(25).optional().nullable()
|
|
951
|
-
}).describe("Modifier group details.").optional(),
|
|
952
|
-
extendedFields: z.object({
|
|
953
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
954
|
-
"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)."
|
|
955
|
-
).optional()
|
|
956
|
-
}).describe("Extended fields.").optional(),
|
|
957
|
-
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
958
|
-
});
|
|
959
|
-
var DeleteModifierGroupRequest = z.object({
|
|
960
|
-
modifierGroupId: z.string().describe("Modifier group ID.").regex(
|
|
961
|
-
/^[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}$/,
|
|
962
|
-
"Must be a valid GUID"
|
|
963
|
-
)
|
|
964
|
-
});
|
|
965
|
-
var DeleteModifierGroupResponse = z.object({});
|
|
966
|
-
var BulkCreateModifierGroupsRequest = z.object({
|
|
967
|
-
modifierGroups: z.array(
|
|
968
|
-
z.object({
|
|
969
|
-
_id: z.string().describe("Modifier group ID.").regex(
|
|
970
|
-
/^[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}$/,
|
|
971
|
-
"Must be a valid GUID"
|
|
972
|
-
).optional().nullable(),
|
|
973
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
974
|
-
"Revision number, which increments by 1 each time the modifier group is updated. To prevent conflicting changes, the current revision must be passed when updating the modifier group. Ignored when creating a modifier group."
|
|
975
|
-
).optional().nullable(),
|
|
976
|
-
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
977
|
-
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
978
|
-
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
979
|
-
modifiers: z.array(
|
|
980
|
-
z.object({
|
|
981
|
-
_id: z.string().describe("Item modifier ID.").regex(
|
|
982
|
-
/^[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}$/,
|
|
983
|
-
"Must be a valid GUID"
|
|
984
|
-
).optional(),
|
|
985
|
-
preSelected: z.boolean().describe(
|
|
986
|
-
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
987
|
-
).optional().nullable(),
|
|
988
|
-
additionalChargeInfo: z.object({
|
|
989
|
-
additionalCharge: z.string().describe(
|
|
990
|
-
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
991
|
-
).optional().nullable()
|
|
992
|
-
}).describe("Item modifier price details.").optional()
|
|
993
|
-
})
|
|
994
|
-
).min(0).max(500).optional(),
|
|
995
|
-
rule: z.object({
|
|
996
|
-
required: z.boolean().describe(
|
|
997
|
-
"Whether the items from the modifier group must be selected."
|
|
998
|
-
).optional().nullable(),
|
|
999
|
-
minSelections: z.number().int().describe(
|
|
1000
|
-
"Minimum number of item modifiers a site visitor must select. The value must be lower or equal to the available item modifiers in the group.\nDefault: `0`."
|
|
1001
|
-
).min(0).max(25).optional().nullable(),
|
|
1002
|
-
maxSelections: z.number().int().describe(
|
|
1003
|
-
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
1004
|
-
).min(0).max(25).optional().nullable()
|
|
1005
|
-
}).describe("Modifier group details.").optional(),
|
|
1006
|
-
extendedFields: z.object({
|
|
1007
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1008
|
-
"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)."
|
|
1009
|
-
).optional()
|
|
1010
|
-
}).describe("Extended fields.").optional(),
|
|
1011
|
-
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
1012
|
-
})
|
|
1013
|
-
).max(100),
|
|
1014
|
-
options: z.object({
|
|
1015
|
-
returnEntity: z.boolean().describe(
|
|
1016
|
-
"Whether to receive the created modifier groups in the response."
|
|
1017
|
-
).optional()
|
|
1018
|
-
}).optional()
|
|
1019
|
-
});
|
|
1020
|
-
var BulkCreateModifierGroupsResponse = z.object({
|
|
1021
|
-
results: z.array(
|
|
1022
|
-
z.object({
|
|
1023
|
-
itemMetadata: z.object({
|
|
1024
|
-
_id: z.string().describe(
|
|
1025
|
-
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
1026
|
-
).optional().nullable(),
|
|
1027
|
-
originalIndex: z.number().int().describe(
|
|
1028
|
-
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
1029
|
-
).optional(),
|
|
1030
|
-
success: z.boolean().describe(
|
|
1031
|
-
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
1032
|
-
).optional(),
|
|
1033
|
-
error: z.object({
|
|
1034
|
-
code: z.string().describe("Error code.").optional(),
|
|
1035
|
-
description: z.string().describe("Description of the error.").optional(),
|
|
1036
|
-
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
1037
|
-
}).describe("Details about the error in case of failure.").optional()
|
|
1038
|
-
}).describe("Metadata for group modifier creation.").optional(),
|
|
1039
|
-
modifierGroup: z.object({
|
|
1040
|
-
_id: z.string().describe("Modifier group ID.").regex(
|
|
1041
|
-
/^[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}$/,
|
|
1042
|
-
"Must be a valid GUID"
|
|
1043
|
-
).optional().nullable(),
|
|
1044
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1045
|
-
"Revision number, which increments by 1 each time the modifier group is updated. To prevent conflicting changes, the current revision must be passed when updating the modifier group. Ignored when creating a modifier group."
|
|
1046
|
-
).optional().nullable(),
|
|
1047
|
-
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
1048
|
-
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
1049
|
-
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
1050
|
-
modifiers: z.array(
|
|
1051
|
-
z.object({
|
|
1052
|
-
_id: z.string().describe("Item modifier ID.").regex(
|
|
1053
|
-
/^[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}$/,
|
|
1054
|
-
"Must be a valid GUID"
|
|
1055
|
-
).optional(),
|
|
1056
|
-
preSelected: z.boolean().describe(
|
|
1057
|
-
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
1058
|
-
).optional().nullable(),
|
|
1059
|
-
additionalChargeInfo: z.object({
|
|
1060
|
-
additionalCharge: z.string().describe(
|
|
1061
|
-
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
1062
|
-
).optional().nullable()
|
|
1063
|
-
}).describe("Item modifier price details.").optional()
|
|
1064
|
-
})
|
|
1065
|
-
).min(0).max(500).optional(),
|
|
1066
|
-
rule: z.object({
|
|
1067
|
-
required: z.boolean().describe(
|
|
1068
|
-
"Whether the items from the modifier group must be selected."
|
|
1069
|
-
).optional().nullable(),
|
|
1070
|
-
minSelections: z.number().int().describe(
|
|
1071
|
-
"Minimum number of item modifiers a site visitor must select. The value must be lower or equal to the available item modifiers in the group.\nDefault: `0`."
|
|
1072
|
-
).min(0).max(25).optional().nullable(),
|
|
1073
|
-
maxSelections: z.number().int().describe(
|
|
1074
|
-
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
1075
|
-
).min(0).max(25).optional().nullable()
|
|
1076
|
-
}).describe("Modifier group details.").optional(),
|
|
1077
|
-
extendedFields: z.object({
|
|
1078
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1079
|
-
"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)."
|
|
1080
|
-
).optional()
|
|
1081
|
-
}).describe("Extended fields.").optional(),
|
|
1082
|
-
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
1083
|
-
}).describe("Created modifier group.").optional()
|
|
1084
|
-
})
|
|
1085
|
-
).optional(),
|
|
1086
|
-
bulkActionMetadata: z.object({
|
|
1087
|
-
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
1088
|
-
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
1089
|
-
undetailedFailures: z.number().int().describe(
|
|
1090
|
-
"Number of failures without details because detailed failure threshold was exceeded."
|
|
1091
|
-
).optional()
|
|
1092
|
-
}).describe("Metadata for the API call.").optional()
|
|
1093
|
-
});
|
|
1094
|
-
var BulkUpdateModifierGroupsRequest = z.object({
|
|
1095
|
-
modifierGroups: z.array(
|
|
1096
|
-
z.object({
|
|
1097
|
-
modifierGroup: z.object({
|
|
1098
|
-
_id: z.string().describe("Modifier group ID.").regex(
|
|
1099
|
-
/^[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}$/,
|
|
1100
|
-
"Must be a valid GUID"
|
|
1101
|
-
),
|
|
1102
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1103
|
-
"Revision number, which increments by 1 each time the modifier group is updated. To prevent conflicting changes, the current revision must be passed when updating the modifier group. Ignored when creating a modifier group."
|
|
1104
|
-
),
|
|
1105
|
-
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
1106
|
-
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
1107
|
-
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
1108
|
-
modifiers: z.array(
|
|
1109
|
-
z.object({
|
|
1110
|
-
_id: z.string().describe("Item modifier ID.").regex(
|
|
1111
|
-
/^[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}$/,
|
|
1112
|
-
"Must be a valid GUID"
|
|
1113
|
-
).optional(),
|
|
1114
|
-
preSelected: z.boolean().describe(
|
|
1115
|
-
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
1116
|
-
).optional().nullable(),
|
|
1117
|
-
additionalChargeInfo: z.object({
|
|
1118
|
-
additionalCharge: z.string().describe(
|
|
1119
|
-
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
1120
|
-
).optional().nullable()
|
|
1121
|
-
}).describe("Item modifier price details.").optional()
|
|
1122
|
-
})
|
|
1123
|
-
).min(0).max(500).optional(),
|
|
1124
|
-
rule: z.object({
|
|
1125
|
-
required: z.boolean().describe(
|
|
1126
|
-
"Whether the items from the modifier group must be selected."
|
|
1127
|
-
).optional().nullable(),
|
|
1128
|
-
minSelections: z.number().int().describe(
|
|
1129
|
-
"Minimum number of item modifiers a site visitor must select. The value must be lower or equal to the available item modifiers in the group.\nDefault: `0`."
|
|
1130
|
-
).min(0).max(25).optional().nullable(),
|
|
1131
|
-
maxSelections: z.number().int().describe(
|
|
1132
|
-
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
1133
|
-
).min(0).max(25).optional().nullable()
|
|
1134
|
-
}).describe("Modifier group details.").optional(),
|
|
1135
|
-
extendedFields: z.object({
|
|
1136
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1137
|
-
"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)."
|
|
1138
|
-
).optional()
|
|
1139
|
-
}).describe("Extended fields.").optional(),
|
|
1140
|
-
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
1141
|
-
}).describe("Modifier group to update.").optional(),
|
|
1142
|
-
mask: z.array(z.string()).optional()
|
|
1143
|
-
})
|
|
1144
|
-
).min(1).max(100),
|
|
1145
|
-
options: z.object({
|
|
1146
|
-
returnEntity: z.boolean().describe(
|
|
1147
|
-
"Whether to receive the updated modifier groups in the response."
|
|
1148
|
-
).optional()
|
|
1149
|
-
}).optional()
|
|
1150
|
-
});
|
|
1151
|
-
var BulkUpdateModifierGroupsResponse = z.object({
|
|
1152
|
-
results: z.array(
|
|
1153
|
-
z.object({
|
|
1154
|
-
itemMetadata: z.object({
|
|
1155
|
-
_id: z.string().describe(
|
|
1156
|
-
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
1157
|
-
).optional().nullable(),
|
|
1158
|
-
originalIndex: z.number().int().describe(
|
|
1159
|
-
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
1160
|
-
).optional(),
|
|
1161
|
-
success: z.boolean().describe(
|
|
1162
|
-
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
1163
|
-
).optional(),
|
|
1164
|
-
error: z.object({
|
|
1165
|
-
code: z.string().describe("Error code.").optional(),
|
|
1166
|
-
description: z.string().describe("Description of the error.").optional(),
|
|
1167
|
-
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
1168
|
-
}).describe("Details about the error in case of failure.").optional()
|
|
1169
|
-
}).describe("Metadata for group modifier update.").optional(),
|
|
1170
|
-
modifierGroup: z.object({
|
|
1171
|
-
_id: z.string().describe("Modifier group ID.").regex(
|
|
1172
|
-
/^[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}$/,
|
|
1173
|
-
"Must be a valid GUID"
|
|
1174
|
-
).optional().nullable(),
|
|
1175
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1176
|
-
"Revision number, which increments by 1 each time the modifier group is updated. To prevent conflicting changes, the current revision must be passed when updating the modifier group. Ignored when creating a modifier group."
|
|
1177
|
-
).optional().nullable(),
|
|
1178
|
-
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
1179
|
-
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
1180
|
-
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
1181
|
-
modifiers: z.array(
|
|
1182
|
-
z.object({
|
|
1183
|
-
_id: z.string().describe("Item modifier ID.").regex(
|
|
1184
|
-
/^[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}$/,
|
|
1185
|
-
"Must be a valid GUID"
|
|
1186
|
-
).optional(),
|
|
1187
|
-
preSelected: z.boolean().describe(
|
|
1188
|
-
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
1189
|
-
).optional().nullable(),
|
|
1190
|
-
additionalChargeInfo: z.object({
|
|
1191
|
-
additionalCharge: z.string().describe(
|
|
1192
|
-
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
1193
|
-
).optional().nullable()
|
|
1194
|
-
}).describe("Item modifier price details.").optional()
|
|
1195
|
-
})
|
|
1196
|
-
).min(0).max(500).optional(),
|
|
1197
|
-
rule: z.object({
|
|
1198
|
-
required: z.boolean().describe(
|
|
1199
|
-
"Whether the items from the modifier group must be selected."
|
|
1200
|
-
).optional().nullable(),
|
|
1201
|
-
minSelections: z.number().int().describe(
|
|
1202
|
-
"Minimum number of item modifiers a site visitor must select. The value must be lower or equal to the available item modifiers in the group.\nDefault: `0`."
|
|
1203
|
-
).min(0).max(25).optional().nullable(),
|
|
1204
|
-
maxSelections: z.number().int().describe(
|
|
1205
|
-
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
1206
|
-
).min(0).max(25).optional().nullable()
|
|
1207
|
-
}).describe("Modifier group details.").optional(),
|
|
1208
|
-
extendedFields: z.object({
|
|
1209
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1210
|
-
"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)."
|
|
1211
|
-
).optional()
|
|
1212
|
-
}).describe("Extended fields.").optional(),
|
|
1213
|
-
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
1214
|
-
}).describe(
|
|
1215
|
-
"Updated modifier group. Only returned if `returnEntity` is set to `true`."
|
|
1216
|
-
).optional()
|
|
1217
|
-
})
|
|
1218
|
-
).min(1).max(100).optional(),
|
|
1219
|
-
bulkActionMetadata: z.object({
|
|
1220
|
-
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
1221
|
-
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
1222
|
-
undetailedFailures: z.number().int().describe(
|
|
1223
|
-
"Number of failures without details because detailed failure threshold was exceeded."
|
|
1224
|
-
).optional()
|
|
1225
|
-
}).describe("Metadata for the API call.").optional()
|
|
1226
|
-
});
|
|
1227
|
-
var BulkDeleteModifierGroupsRequest = z.object({
|
|
1228
|
-
ids: z.array(z.string()).max(200)
|
|
1229
|
-
});
|
|
1230
|
-
var BulkDeleteModifierGroupsResponse = z.object({
|
|
1231
|
-
results: z.array(
|
|
1232
|
-
z.object({
|
|
1233
|
-
itemMetadata: z.object({
|
|
1234
|
-
_id: z.string().describe(
|
|
1235
|
-
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
1236
|
-
).optional().nullable(),
|
|
1237
|
-
originalIndex: z.number().int().describe(
|
|
1238
|
-
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
1239
|
-
).optional(),
|
|
1240
|
-
success: z.boolean().describe(
|
|
1241
|
-
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
1242
|
-
).optional(),
|
|
1243
|
-
error: z.object({
|
|
1244
|
-
code: z.string().describe("Error code.").optional(),
|
|
1245
|
-
description: z.string().describe("Description of the error.").optional(),
|
|
1246
|
-
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
1247
|
-
}).describe("Details about the error in case of failure.").optional()
|
|
1248
|
-
}).describe("Metadata for group modifier deletion.").optional()
|
|
1249
|
-
})
|
|
1250
|
-
).optional(),
|
|
1251
|
-
bulkActionMetadata: z.object({
|
|
1252
|
-
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
1253
|
-
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
1254
|
-
undetailedFailures: z.number().int().describe(
|
|
1255
|
-
"Number of failures without details because detailed failure threshold was exceeded."
|
|
1256
|
-
).optional()
|
|
1257
|
-
}).describe("Metadata for the API call.").optional()
|
|
1258
|
-
});
|
|
1259
|
-
|
|
1260
|
-
// src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.universal.ts
|
|
1261
517
|
var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
|
|
1262
518
|
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
1263
519
|
SortOrder2["ASC"] = "ASC";
|
|
@@ -1273,10 +529,7 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
1273
529
|
return WebhookIdentityType2;
|
|
1274
530
|
})(WebhookIdentityType || {});
|
|
1275
531
|
async function createModifierGroup2(modifierGroup) {
|
|
1276
|
-
const { httpClient, sideEffects
|
|
1277
|
-
if (validateRequestSchema) {
|
|
1278
|
-
CreateModifierGroupRequest.parse({ modifierGroup });
|
|
1279
|
-
}
|
|
532
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1280
533
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1281
534
|
modifierGroup
|
|
1282
535
|
});
|
|
@@ -1303,10 +556,7 @@ async function createModifierGroup2(modifierGroup) {
|
|
|
1303
556
|
}
|
|
1304
557
|
}
|
|
1305
558
|
async function getModifierGroup2(modifierGroupId) {
|
|
1306
|
-
const { httpClient, sideEffects
|
|
1307
|
-
if (validateRequestSchema) {
|
|
1308
|
-
GetModifierGroupRequest.parse({ modifierGroupId });
|
|
1309
|
-
}
|
|
559
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1310
560
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1311
561
|
modifierGroupId
|
|
1312
562
|
});
|
|
@@ -1331,10 +581,7 @@ async function getModifierGroup2(modifierGroupId) {
|
|
|
1331
581
|
}
|
|
1332
582
|
}
|
|
1333
583
|
async function listModifierGroups2(options) {
|
|
1334
|
-
const { httpClient, sideEffects
|
|
1335
|
-
if (validateRequestSchema) {
|
|
1336
|
-
ListModifierGroupsRequest.parse({ options });
|
|
1337
|
-
}
|
|
584
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1338
585
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1339
586
|
modifierGroupIds: options?.modifierGroupIds,
|
|
1340
587
|
paging: options?.paging
|
|
@@ -1412,10 +659,7 @@ function queryModifierGroups2() {
|
|
|
1412
659
|
});
|
|
1413
660
|
}
|
|
1414
661
|
async function typedQueryModifierGroups(query) {
|
|
1415
|
-
const { httpClient, sideEffects
|
|
1416
|
-
if (validateRequestSchema) {
|
|
1417
|
-
QueryModifierGroupsRequest.parse({ query });
|
|
1418
|
-
}
|
|
662
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1419
663
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
|
|
1420
664
|
const reqOpts = queryModifierGroups(
|
|
1421
665
|
payload
|
|
@@ -1445,10 +689,7 @@ var utils = {
|
|
|
1445
689
|
}
|
|
1446
690
|
};
|
|
1447
691
|
async function countModifierGroups2(options) {
|
|
1448
|
-
const { httpClient, sideEffects
|
|
1449
|
-
if (validateRequestSchema) {
|
|
1450
|
-
CountModifierGroupsRequest.parse({ options });
|
|
1451
|
-
}
|
|
692
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1452
693
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1453
694
|
filter: options?.filter
|
|
1454
695
|
});
|
|
@@ -1475,10 +716,7 @@ async function countModifierGroups2(options) {
|
|
|
1475
716
|
}
|
|
1476
717
|
}
|
|
1477
718
|
async function updateModifierGroup2(_id, modifierGroup) {
|
|
1478
|
-
const { httpClient, sideEffects
|
|
1479
|
-
if (validateRequestSchema) {
|
|
1480
|
-
UpdateModifierGroupRequest.parse({ _id, modifierGroup });
|
|
1481
|
-
}
|
|
719
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1482
720
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1483
721
|
modifierGroup: { ...modifierGroup, id: _id }
|
|
1484
722
|
});
|
|
@@ -1505,10 +743,7 @@ async function updateModifierGroup2(_id, modifierGroup) {
|
|
|
1505
743
|
}
|
|
1506
744
|
}
|
|
1507
745
|
async function deleteModifierGroup2(modifierGroupId) {
|
|
1508
|
-
const { httpClient, sideEffects
|
|
1509
|
-
if (validateRequestSchema) {
|
|
1510
|
-
DeleteModifierGroupRequest.parse({ modifierGroupId });
|
|
1511
|
-
}
|
|
746
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1512
747
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1513
748
|
modifierGroupId
|
|
1514
749
|
});
|
|
@@ -1534,10 +769,7 @@ async function deleteModifierGroup2(modifierGroupId) {
|
|
|
1534
769
|
}
|
|
1535
770
|
}
|
|
1536
771
|
async function bulkCreateModifierGroups2(modifierGroups, options) {
|
|
1537
|
-
const { httpClient, sideEffects
|
|
1538
|
-
if (validateRequestSchema) {
|
|
1539
|
-
BulkCreateModifierGroupsRequest.parse({ modifierGroups, options });
|
|
1540
|
-
}
|
|
772
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1541
773
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1542
774
|
modifierGroups,
|
|
1543
775
|
returnEntity: options?.returnEntity
|
|
@@ -1568,10 +800,7 @@ async function bulkCreateModifierGroups2(modifierGroups, options) {
|
|
|
1568
800
|
}
|
|
1569
801
|
}
|
|
1570
802
|
async function bulkUpdateModifierGroups2(modifierGroups, options) {
|
|
1571
|
-
const { httpClient, sideEffects
|
|
1572
|
-
if (validateRequestSchema) {
|
|
1573
|
-
BulkUpdateModifierGroupsRequest.parse({ modifierGroups, options });
|
|
1574
|
-
}
|
|
803
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1575
804
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1576
805
|
modifierGroups,
|
|
1577
806
|
returnEntity: options?.returnEntity
|
|
@@ -1602,10 +831,7 @@ async function bulkUpdateModifierGroups2(modifierGroups, options) {
|
|
|
1602
831
|
}
|
|
1603
832
|
}
|
|
1604
833
|
async function bulkDeleteModifierGroups2(ids) {
|
|
1605
|
-
const { httpClient, sideEffects
|
|
1606
|
-
if (validateRequestSchema) {
|
|
1607
|
-
BulkDeleteModifierGroupsRequest.parse({ ids });
|
|
1608
|
-
}
|
|
834
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1609
835
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ ids });
|
|
1610
836
|
const reqOpts = bulkDeleteModifierGroups(
|
|
1611
837
|
payload
|
|
@@ -1631,83 +857,83 @@ async function bulkDeleteModifierGroups2(ids) {
|
|
|
1631
857
|
}
|
|
1632
858
|
|
|
1633
859
|
// src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.public.ts
|
|
1634
|
-
function createModifierGroup3(httpClient
|
|
860
|
+
function createModifierGroup3(httpClient) {
|
|
1635
861
|
return (modifierGroup) => createModifierGroup2(
|
|
1636
862
|
modifierGroup,
|
|
1637
863
|
// @ts-ignore
|
|
1638
|
-
{ httpClient
|
|
864
|
+
{ httpClient }
|
|
1639
865
|
);
|
|
1640
866
|
}
|
|
1641
|
-
function getModifierGroup3(httpClient
|
|
867
|
+
function getModifierGroup3(httpClient) {
|
|
1642
868
|
return (modifierGroupId) => getModifierGroup2(
|
|
1643
869
|
modifierGroupId,
|
|
1644
870
|
// @ts-ignore
|
|
1645
|
-
{ httpClient
|
|
871
|
+
{ httpClient }
|
|
1646
872
|
);
|
|
1647
873
|
}
|
|
1648
|
-
function listModifierGroups3(httpClient
|
|
874
|
+
function listModifierGroups3(httpClient) {
|
|
1649
875
|
return (options) => listModifierGroups2(
|
|
1650
876
|
options,
|
|
1651
877
|
// @ts-ignore
|
|
1652
|
-
{ httpClient
|
|
878
|
+
{ httpClient }
|
|
1653
879
|
);
|
|
1654
880
|
}
|
|
1655
|
-
function queryModifierGroups3(httpClient
|
|
881
|
+
function queryModifierGroups3(httpClient) {
|
|
1656
882
|
return () => queryModifierGroups2(
|
|
1657
883
|
// @ts-ignore
|
|
1658
|
-
{ httpClient
|
|
884
|
+
{ httpClient }
|
|
1659
885
|
);
|
|
1660
886
|
}
|
|
1661
|
-
function typedQueryModifierGroups2(httpClient
|
|
887
|
+
function typedQueryModifierGroups2(httpClient) {
|
|
1662
888
|
return (query) => typedQueryModifierGroups(
|
|
1663
889
|
query,
|
|
1664
890
|
// @ts-ignore
|
|
1665
|
-
{ httpClient
|
|
891
|
+
{ httpClient }
|
|
1666
892
|
);
|
|
1667
893
|
}
|
|
1668
|
-
function countModifierGroups3(httpClient
|
|
894
|
+
function countModifierGroups3(httpClient) {
|
|
1669
895
|
return (options) => countModifierGroups2(
|
|
1670
896
|
options,
|
|
1671
897
|
// @ts-ignore
|
|
1672
|
-
{ httpClient
|
|
898
|
+
{ httpClient }
|
|
1673
899
|
);
|
|
1674
900
|
}
|
|
1675
|
-
function updateModifierGroup3(httpClient
|
|
901
|
+
function updateModifierGroup3(httpClient) {
|
|
1676
902
|
return (_id, modifierGroup) => updateModifierGroup2(
|
|
1677
903
|
_id,
|
|
1678
904
|
modifierGroup,
|
|
1679
905
|
// @ts-ignore
|
|
1680
|
-
{ httpClient
|
|
906
|
+
{ httpClient }
|
|
1681
907
|
);
|
|
1682
908
|
}
|
|
1683
|
-
function deleteModifierGroup3(httpClient
|
|
909
|
+
function deleteModifierGroup3(httpClient) {
|
|
1684
910
|
return (modifierGroupId) => deleteModifierGroup2(
|
|
1685
911
|
modifierGroupId,
|
|
1686
912
|
// @ts-ignore
|
|
1687
|
-
{ httpClient
|
|
913
|
+
{ httpClient }
|
|
1688
914
|
);
|
|
1689
915
|
}
|
|
1690
|
-
function bulkCreateModifierGroups3(httpClient
|
|
916
|
+
function bulkCreateModifierGroups3(httpClient) {
|
|
1691
917
|
return (modifierGroups, options) => bulkCreateModifierGroups2(
|
|
1692
918
|
modifierGroups,
|
|
1693
919
|
options,
|
|
1694
920
|
// @ts-ignore
|
|
1695
|
-
{ httpClient
|
|
921
|
+
{ httpClient }
|
|
1696
922
|
);
|
|
1697
923
|
}
|
|
1698
|
-
function bulkUpdateModifierGroups3(httpClient
|
|
924
|
+
function bulkUpdateModifierGroups3(httpClient) {
|
|
1699
925
|
return (modifierGroups, options) => bulkUpdateModifierGroups2(
|
|
1700
926
|
modifierGroups,
|
|
1701
927
|
options,
|
|
1702
928
|
// @ts-ignore
|
|
1703
|
-
{ httpClient
|
|
929
|
+
{ httpClient }
|
|
1704
930
|
);
|
|
1705
931
|
}
|
|
1706
|
-
function bulkDeleteModifierGroups3(httpClient
|
|
932
|
+
function bulkDeleteModifierGroups3(httpClient) {
|
|
1707
933
|
return (ids) => bulkDeleteModifierGroups2(
|
|
1708
934
|
ids,
|
|
1709
935
|
// @ts-ignore
|
|
1710
|
-
{ httpClient
|
|
936
|
+
{ httpClient }
|
|
1711
937
|
);
|
|
1712
938
|
}
|
|
1713
939
|
var onItemModifierGroupCreated = (0, import_sdk_types.EventDefinition)(
|