@wix/auto_sdk_restaurants_item-modifier-groups 1.0.68 → 1.0.70
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 +35 -17
- package/build/cjs/index.js +806 -32
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +8 -8
- package/build/cjs/index.typings.js +784 -10
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +35 -17
- package/build/es/index.mjs +796 -32
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +8 -8
- package/build/es/index.typings.mjs +774 -10
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +35 -17
- package/build/internal/cjs/index.js +806 -32
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +8 -8
- package/build/internal/cjs/index.typings.js +784 -10
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +35 -17
- package/build/internal/es/index.mjs +796 -32
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +8 -8
- package/build/internal/es/index.typings.mjs +774 -10
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/es/index.mjs
CHANGED
|
@@ -476,6 +476,740 @@ function bulkDeleteModifierGroups(payload) {
|
|
|
476
476
|
|
|
477
477
|
// src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.universal.ts
|
|
478
478
|
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
479
|
+
|
|
480
|
+
// src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.schemas.ts
|
|
481
|
+
import * as z from "zod";
|
|
482
|
+
var CreateModifierGroupRequest = z.object({
|
|
483
|
+
modifierGroup: z.object({
|
|
484
|
+
_id: z.string().describe("Modifier group ID.").regex(
|
|
485
|
+
/^[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}$/,
|
|
486
|
+
"Must be a valid GUID"
|
|
487
|
+
).optional().nullable(),
|
|
488
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
489
|
+
"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."
|
|
490
|
+
).optional().nullable(),
|
|
491
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
492
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
493
|
+
name: z.string().describe("Modifier group name.").min(1).max(100),
|
|
494
|
+
modifiers: z.array(
|
|
495
|
+
z.object({
|
|
496
|
+
_id: z.string().describe("Item modifier ID.").regex(
|
|
497
|
+
/^[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}$/,
|
|
498
|
+
"Must be a valid GUID"
|
|
499
|
+
).optional(),
|
|
500
|
+
preSelected: z.boolean().describe(
|
|
501
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
502
|
+
).optional().nullable(),
|
|
503
|
+
additionalChargeInfo: z.object({
|
|
504
|
+
additionalCharge: z.string().describe(
|
|
505
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
506
|
+
).optional().nullable()
|
|
507
|
+
}).describe("Item modifier price details.").optional()
|
|
508
|
+
})
|
|
509
|
+
).min(0).max(500).optional(),
|
|
510
|
+
rule: z.object({
|
|
511
|
+
required: z.boolean().describe(
|
|
512
|
+
"Whether the items from the modifier group must be selected."
|
|
513
|
+
).optional().nullable(),
|
|
514
|
+
minSelections: z.number().int().describe(
|
|
515
|
+
"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`."
|
|
516
|
+
).min(0).max(25).optional().nullable(),
|
|
517
|
+
maxSelections: z.number().int().describe(
|
|
518
|
+
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
519
|
+
).min(0).max(25).optional().nullable()
|
|
520
|
+
}).describe("Modifier group details.").optional(),
|
|
521
|
+
extendedFields: z.object({
|
|
522
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
523
|
+
"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)."
|
|
524
|
+
).optional()
|
|
525
|
+
}).describe("Extended fields.").optional(),
|
|
526
|
+
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
527
|
+
}).describe("Modifier group details.")
|
|
528
|
+
});
|
|
529
|
+
var CreateModifierGroupResponse = z.object({
|
|
530
|
+
_id: z.string().describe("Modifier group 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 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."
|
|
536
|
+
).optional().nullable(),
|
|
537
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
538
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
539
|
+
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
540
|
+
modifiers: z.array(
|
|
541
|
+
z.object({
|
|
542
|
+
_id: z.string().describe("Item modifier ID.").regex(
|
|
543
|
+
/^[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}$/,
|
|
544
|
+
"Must be a valid GUID"
|
|
545
|
+
).optional(),
|
|
546
|
+
preSelected: z.boolean().describe(
|
|
547
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
548
|
+
).optional().nullable(),
|
|
549
|
+
additionalChargeInfo: z.object({
|
|
550
|
+
additionalCharge: z.string().describe(
|
|
551
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
552
|
+
).optional().nullable()
|
|
553
|
+
}).describe("Item modifier price details.").optional()
|
|
554
|
+
})
|
|
555
|
+
).min(0).max(500).optional(),
|
|
556
|
+
rule: z.object({
|
|
557
|
+
required: z.boolean().describe("Whether the items from the modifier group must be selected.").optional().nullable(),
|
|
558
|
+
minSelections: z.number().int().describe(
|
|
559
|
+
"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`."
|
|
560
|
+
).min(0).max(25).optional().nullable(),
|
|
561
|
+
maxSelections: z.number().int().describe(
|
|
562
|
+
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
563
|
+
).min(0).max(25).optional().nullable()
|
|
564
|
+
}).describe("Modifier group details.").optional(),
|
|
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
|
+
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
571
|
+
});
|
|
572
|
+
var GetModifierGroupRequest = z.object({
|
|
573
|
+
modifierGroupId: z.string().describe("Modifier group ID.").regex(
|
|
574
|
+
/^[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}$/,
|
|
575
|
+
"Must be a valid GUID"
|
|
576
|
+
)
|
|
577
|
+
});
|
|
578
|
+
var GetModifierGroupResponse = z.object({
|
|
579
|
+
_id: z.string().describe("Modifier group ID.").regex(
|
|
580
|
+
/^[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}$/,
|
|
581
|
+
"Must be a valid GUID"
|
|
582
|
+
).optional().nullable(),
|
|
583
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
584
|
+
"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."
|
|
585
|
+
).optional().nullable(),
|
|
586
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
587
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
588
|
+
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
589
|
+
modifiers: z.array(
|
|
590
|
+
z.object({
|
|
591
|
+
_id: z.string().describe("Item modifier ID.").regex(
|
|
592
|
+
/^[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}$/,
|
|
593
|
+
"Must be a valid GUID"
|
|
594
|
+
).optional(),
|
|
595
|
+
preSelected: z.boolean().describe(
|
|
596
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
597
|
+
).optional().nullable(),
|
|
598
|
+
additionalChargeInfo: z.object({
|
|
599
|
+
additionalCharge: z.string().describe(
|
|
600
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
601
|
+
).optional().nullable()
|
|
602
|
+
}).describe("Item modifier price details.").optional()
|
|
603
|
+
})
|
|
604
|
+
).min(0).max(500).optional(),
|
|
605
|
+
rule: z.object({
|
|
606
|
+
required: z.boolean().describe("Whether the items from the modifier group must be selected.").optional().nullable(),
|
|
607
|
+
minSelections: z.number().int().describe(
|
|
608
|
+
"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`."
|
|
609
|
+
).min(0).max(25).optional().nullable(),
|
|
610
|
+
maxSelections: z.number().int().describe(
|
|
611
|
+
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
612
|
+
).min(0).max(25).optional().nullable()
|
|
613
|
+
}).describe("Modifier group details.").optional(),
|
|
614
|
+
extendedFields: z.object({
|
|
615
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
616
|
+
"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)."
|
|
617
|
+
).optional()
|
|
618
|
+
}).describe("Extended fields.").optional(),
|
|
619
|
+
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
620
|
+
});
|
|
621
|
+
var ListModifierGroupsRequest = z.object({
|
|
622
|
+
options: z.object({
|
|
623
|
+
modifierGroupIds: z.array(z.string()).max(500).optional(),
|
|
624
|
+
paging: z.object({
|
|
625
|
+
limit: z.number().int().describe("Number of items to load.").min(0).max(500).optional().nullable(),
|
|
626
|
+
cursor: z.string().describe(
|
|
627
|
+
"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."
|
|
628
|
+
).optional().nullable()
|
|
629
|
+
}).describe("The metadata of the paginated results.").optional()
|
|
630
|
+
}).optional()
|
|
631
|
+
});
|
|
632
|
+
var ListModifierGroupsResponse = z.object({
|
|
633
|
+
modifierGroups: z.array(
|
|
634
|
+
z.object({
|
|
635
|
+
_id: z.string().describe("Modifier group ID.").regex(
|
|
636
|
+
/^[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}$/,
|
|
637
|
+
"Must be a valid GUID"
|
|
638
|
+
).optional().nullable(),
|
|
639
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
640
|
+
"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."
|
|
641
|
+
).optional().nullable(),
|
|
642
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
643
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
644
|
+
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
645
|
+
modifiers: z.array(
|
|
646
|
+
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(),
|
|
651
|
+
preSelected: z.boolean().describe(
|
|
652
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
653
|
+
).optional().nullable(),
|
|
654
|
+
additionalChargeInfo: z.object({
|
|
655
|
+
additionalCharge: z.string().describe(
|
|
656
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
657
|
+
).optional().nullable()
|
|
658
|
+
}).describe("Item modifier price details.").optional()
|
|
659
|
+
})
|
|
660
|
+
).min(0).max(500).optional(),
|
|
661
|
+
rule: z.object({
|
|
662
|
+
required: z.boolean().describe(
|
|
663
|
+
"Whether the items from the modifier group must be selected."
|
|
664
|
+
).optional().nullable(),
|
|
665
|
+
minSelections: z.number().int().describe(
|
|
666
|
+
"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`."
|
|
667
|
+
).min(0).max(25).optional().nullable(),
|
|
668
|
+
maxSelections: z.number().int().describe(
|
|
669
|
+
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
670
|
+
).min(0).max(25).optional().nullable()
|
|
671
|
+
}).describe("Modifier group details.").optional(),
|
|
672
|
+
extendedFields: z.object({
|
|
673
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
674
|
+
"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)."
|
|
675
|
+
).optional()
|
|
676
|
+
}).describe("Extended fields.").optional(),
|
|
677
|
+
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
678
|
+
})
|
|
679
|
+
).optional(),
|
|
680
|
+
metadata: z.object({
|
|
681
|
+
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
682
|
+
cursors: z.object({
|
|
683
|
+
next: z.string().describe("Cursor pointing to next page in the list of results.").optional().nullable(),
|
|
684
|
+
prev: z.string().describe(
|
|
685
|
+
"Cursor pointing to previous page in the list of results."
|
|
686
|
+
).optional().nullable()
|
|
687
|
+
}).describe("Offset that was requested.").optional(),
|
|
688
|
+
hasNext: z.boolean().describe(
|
|
689
|
+
"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."
|
|
690
|
+
).optional().nullable()
|
|
691
|
+
}).describe("The metadata of the paginated results.").optional()
|
|
692
|
+
});
|
|
693
|
+
var QueryModifierGroupsRequest = z.object({
|
|
694
|
+
query: z.object({
|
|
695
|
+
filter: z.object({
|
|
696
|
+
_id: z.object({
|
|
697
|
+
$eq: z.string(),
|
|
698
|
+
$in: z.array(z.string()),
|
|
699
|
+
$ne: z.string(),
|
|
700
|
+
$nin: z.array(z.string())
|
|
701
|
+
}).partial().strict().optional(),
|
|
702
|
+
_createdDate: z.object({
|
|
703
|
+
$eq: z.string(),
|
|
704
|
+
$gt: z.string(),
|
|
705
|
+
$gte: z.string(),
|
|
706
|
+
$lt: z.string(),
|
|
707
|
+
$lte: z.string(),
|
|
708
|
+
$ne: z.string()
|
|
709
|
+
}).partial().strict().optional(),
|
|
710
|
+
_updatedDate: z.object({
|
|
711
|
+
$eq: z.string(),
|
|
712
|
+
$gt: z.string(),
|
|
713
|
+
$gte: z.string(),
|
|
714
|
+
$lt: z.string(),
|
|
715
|
+
$lte: z.string(),
|
|
716
|
+
$ne: z.string()
|
|
717
|
+
}).partial().strict().optional(),
|
|
718
|
+
"modifiers._id": z.object({
|
|
719
|
+
$hasSome: z.array(z.string()),
|
|
720
|
+
$in: z.array(z.string()),
|
|
721
|
+
$nin: z.array(z.string())
|
|
722
|
+
}).partial().strict().optional(),
|
|
723
|
+
"modifiers.preSelected": z.object({ $eq: z.boolean(), $ne: z.boolean() }).partial().strict().optional(),
|
|
724
|
+
"rule.minSelections": z.object({ $eq: z.number(), $ne: z.number() }).partial().strict().optional(),
|
|
725
|
+
"rule.maxSelections": z.object({ $eq: z.number(), $ne: z.number() }).partial().strict().optional(),
|
|
726
|
+
modifiers: z.object({ $exists: z.boolean() }).partial().strict().optional(),
|
|
727
|
+
"rule.required": z.object({
|
|
728
|
+
$eq: z.boolean(),
|
|
729
|
+
$in: z.array(z.boolean()),
|
|
730
|
+
$ne: z.boolean(),
|
|
731
|
+
$nin: z.array(z.boolean())
|
|
732
|
+
}).partial().strict().optional(),
|
|
733
|
+
rule: z.object({ $exists: z.boolean() }).partial().strict().optional(),
|
|
734
|
+
name: z.object({
|
|
735
|
+
$eq: z.string(),
|
|
736
|
+
$in: z.array(z.string()),
|
|
737
|
+
$ne: z.string(),
|
|
738
|
+
$nin: z.array(z.string()),
|
|
739
|
+
$startsWith: z.string()
|
|
740
|
+
}).partial().strict().optional(),
|
|
741
|
+
$and: z.array(z.any()).optional(),
|
|
742
|
+
$or: z.array(z.any()).optional(),
|
|
743
|
+
$not: z.any().optional()
|
|
744
|
+
}).strict().optional(),
|
|
745
|
+
sort: z.array(z.object({})).optional()
|
|
746
|
+
}).catchall(z.any()).describe("Query options.")
|
|
747
|
+
});
|
|
748
|
+
var QueryModifierGroupsResponse = z.object({
|
|
749
|
+
modifierGroups: z.array(
|
|
750
|
+
z.object({
|
|
751
|
+
_id: z.string().describe("Modifier group ID.").regex(
|
|
752
|
+
/^[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}$/,
|
|
753
|
+
"Must be a valid GUID"
|
|
754
|
+
).optional().nullable(),
|
|
755
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
756
|
+
"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."
|
|
757
|
+
).optional().nullable(),
|
|
758
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
759
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
760
|
+
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
761
|
+
modifiers: z.array(
|
|
762
|
+
z.object({
|
|
763
|
+
_id: z.string().describe("Item modifier ID.").regex(
|
|
764
|
+
/^[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}$/,
|
|
765
|
+
"Must be a valid GUID"
|
|
766
|
+
).optional(),
|
|
767
|
+
preSelected: z.boolean().describe(
|
|
768
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
769
|
+
).optional().nullable(),
|
|
770
|
+
additionalChargeInfo: z.object({
|
|
771
|
+
additionalCharge: z.string().describe(
|
|
772
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
773
|
+
).optional().nullable()
|
|
774
|
+
}).describe("Item modifier price details.").optional()
|
|
775
|
+
})
|
|
776
|
+
).min(0).max(500).optional(),
|
|
777
|
+
rule: z.object({
|
|
778
|
+
required: z.boolean().describe(
|
|
779
|
+
"Whether the items from the modifier group must be selected."
|
|
780
|
+
).optional().nullable(),
|
|
781
|
+
minSelections: z.number().int().describe(
|
|
782
|
+
"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`."
|
|
783
|
+
).min(0).max(25).optional().nullable(),
|
|
784
|
+
maxSelections: z.number().int().describe(
|
|
785
|
+
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
786
|
+
).min(0).max(25).optional().nullable()
|
|
787
|
+
}).describe("Modifier group details.").optional(),
|
|
788
|
+
extendedFields: z.object({
|
|
789
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
790
|
+
"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)."
|
|
791
|
+
).optional()
|
|
792
|
+
}).describe("Extended fields.").optional(),
|
|
793
|
+
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
794
|
+
})
|
|
795
|
+
).optional(),
|
|
796
|
+
pagingMetadata: z.object({
|
|
797
|
+
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
798
|
+
cursors: z.object({
|
|
799
|
+
next: z.string().describe("Cursor pointing to next page in the list of results.").optional().nullable(),
|
|
800
|
+
prev: z.string().describe(
|
|
801
|
+
"Cursor pointing to previous page in the list of results."
|
|
802
|
+
).optional().nullable()
|
|
803
|
+
}).describe("Offset that was requested.").optional(),
|
|
804
|
+
hasNext: z.boolean().describe(
|
|
805
|
+
"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."
|
|
806
|
+
).optional().nullable()
|
|
807
|
+
}).describe("Metadata of the paginated results.").optional()
|
|
808
|
+
});
|
|
809
|
+
var CountModifierGroupsRequest = z.object({
|
|
810
|
+
options: z.object({
|
|
811
|
+
filter: z.record(z.string(), z.any()).describe("Filter for counting modifier groups.").optional().nullable()
|
|
812
|
+
}).optional()
|
|
813
|
+
});
|
|
814
|
+
var CountModifierGroupsResponse = z.object({
|
|
815
|
+
count: z.number().int().describe("Counted modifier groups.").optional()
|
|
816
|
+
});
|
|
817
|
+
var UpdateModifierGroupRequest = z.object({
|
|
818
|
+
_id: z.string().describe("Modifier group ID.").regex(
|
|
819
|
+
/^[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}$/,
|
|
820
|
+
"Must be a valid GUID"
|
|
821
|
+
),
|
|
822
|
+
modifierGroup: z.object({
|
|
823
|
+
_id: z.string().describe("Modifier group ID.").regex(
|
|
824
|
+
/^[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}$/,
|
|
825
|
+
"Must be a valid GUID"
|
|
826
|
+
).optional().nullable(),
|
|
827
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
828
|
+
"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."
|
|
829
|
+
),
|
|
830
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
831
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
832
|
+
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
833
|
+
modifiers: z.array(
|
|
834
|
+
z.object({
|
|
835
|
+
_id: z.string().describe("Item modifier ID.").regex(
|
|
836
|
+
/^[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}$/,
|
|
837
|
+
"Must be a valid GUID"
|
|
838
|
+
).optional(),
|
|
839
|
+
preSelected: z.boolean().describe(
|
|
840
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
841
|
+
).optional().nullable(),
|
|
842
|
+
additionalChargeInfo: z.object({
|
|
843
|
+
additionalCharge: z.string().describe(
|
|
844
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
845
|
+
).optional().nullable()
|
|
846
|
+
}).describe("Item modifier price details.").optional()
|
|
847
|
+
})
|
|
848
|
+
).min(0).max(500).optional(),
|
|
849
|
+
rule: z.object({
|
|
850
|
+
required: z.boolean().describe(
|
|
851
|
+
"Whether the items from the modifier group must be selected."
|
|
852
|
+
).optional().nullable(),
|
|
853
|
+
minSelections: z.number().int().describe(
|
|
854
|
+
"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`."
|
|
855
|
+
).min(0).max(25).optional().nullable(),
|
|
856
|
+
maxSelections: z.number().int().describe(
|
|
857
|
+
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
858
|
+
).min(0).max(25).optional().nullable()
|
|
859
|
+
}).describe("Modifier group details.").optional(),
|
|
860
|
+
extendedFields: z.object({
|
|
861
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
862
|
+
"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)."
|
|
863
|
+
).optional()
|
|
864
|
+
}).describe("Extended fields.").optional(),
|
|
865
|
+
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
866
|
+
}).describe("Modifier group to update.")
|
|
867
|
+
});
|
|
868
|
+
var UpdateModifierGroupResponse = z.object({
|
|
869
|
+
_id: z.string().describe("Modifier group ID.").regex(
|
|
870
|
+
/^[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}$/,
|
|
871
|
+
"Must be a valid GUID"
|
|
872
|
+
).optional().nullable(),
|
|
873
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
874
|
+
"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."
|
|
875
|
+
).optional().nullable(),
|
|
876
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
877
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
878
|
+
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
879
|
+
modifiers: z.array(
|
|
880
|
+
z.object({
|
|
881
|
+
_id: z.string().describe("Item modifier ID.").regex(
|
|
882
|
+
/^[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}$/,
|
|
883
|
+
"Must be a valid GUID"
|
|
884
|
+
).optional(),
|
|
885
|
+
preSelected: z.boolean().describe(
|
|
886
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
887
|
+
).optional().nullable(),
|
|
888
|
+
additionalChargeInfo: z.object({
|
|
889
|
+
additionalCharge: z.string().describe(
|
|
890
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
891
|
+
).optional().nullable()
|
|
892
|
+
}).describe("Item modifier price details.").optional()
|
|
893
|
+
})
|
|
894
|
+
).min(0).max(500).optional(),
|
|
895
|
+
rule: z.object({
|
|
896
|
+
required: z.boolean().describe("Whether the items from the modifier group must be selected.").optional().nullable(),
|
|
897
|
+
minSelections: z.number().int().describe(
|
|
898
|
+
"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`."
|
|
899
|
+
).min(0).max(25).optional().nullable(),
|
|
900
|
+
maxSelections: z.number().int().describe(
|
|
901
|
+
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
902
|
+
).min(0).max(25).optional().nullable()
|
|
903
|
+
}).describe("Modifier group details.").optional(),
|
|
904
|
+
extendedFields: z.object({
|
|
905
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
906
|
+
"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)."
|
|
907
|
+
).optional()
|
|
908
|
+
}).describe("Extended fields.").optional(),
|
|
909
|
+
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
910
|
+
});
|
|
911
|
+
var DeleteModifierGroupRequest = z.object({
|
|
912
|
+
modifierGroupId: z.string().describe("Modifier group ID.").regex(
|
|
913
|
+
/^[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}$/,
|
|
914
|
+
"Must be a valid GUID"
|
|
915
|
+
)
|
|
916
|
+
});
|
|
917
|
+
var DeleteModifierGroupResponse = z.object({});
|
|
918
|
+
var BulkCreateModifierGroupsRequest = z.object({
|
|
919
|
+
modifierGroups: z.array(
|
|
920
|
+
z.object({
|
|
921
|
+
_id: z.string().describe("Modifier group ID.").regex(
|
|
922
|
+
/^[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}$/,
|
|
923
|
+
"Must be a valid GUID"
|
|
924
|
+
).optional().nullable(),
|
|
925
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
926
|
+
"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."
|
|
927
|
+
).optional().nullable(),
|
|
928
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
929
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
930
|
+
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
931
|
+
modifiers: z.array(
|
|
932
|
+
z.object({
|
|
933
|
+
_id: z.string().describe("Item modifier ID.").regex(
|
|
934
|
+
/^[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}$/,
|
|
935
|
+
"Must be a valid GUID"
|
|
936
|
+
).optional(),
|
|
937
|
+
preSelected: z.boolean().describe(
|
|
938
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
939
|
+
).optional().nullable(),
|
|
940
|
+
additionalChargeInfo: z.object({
|
|
941
|
+
additionalCharge: z.string().describe(
|
|
942
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
943
|
+
).optional().nullable()
|
|
944
|
+
}).describe("Item modifier price details.").optional()
|
|
945
|
+
})
|
|
946
|
+
).min(0).max(500).optional(),
|
|
947
|
+
rule: z.object({
|
|
948
|
+
required: z.boolean().describe(
|
|
949
|
+
"Whether the items from the modifier group must be selected."
|
|
950
|
+
).optional().nullable(),
|
|
951
|
+
minSelections: z.number().int().describe(
|
|
952
|
+
"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`."
|
|
953
|
+
).min(0).max(25).optional().nullable(),
|
|
954
|
+
maxSelections: z.number().int().describe(
|
|
955
|
+
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
956
|
+
).min(0).max(25).optional().nullable()
|
|
957
|
+
}).describe("Modifier group details.").optional(),
|
|
958
|
+
extendedFields: z.object({
|
|
959
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
960
|
+
"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)."
|
|
961
|
+
).optional()
|
|
962
|
+
}).describe("Extended fields.").optional(),
|
|
963
|
+
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
964
|
+
})
|
|
965
|
+
).max(100),
|
|
966
|
+
options: z.object({
|
|
967
|
+
returnEntity: z.boolean().describe(
|
|
968
|
+
"Whether to receive the created modifier groups in the response."
|
|
969
|
+
).optional()
|
|
970
|
+
}).optional()
|
|
971
|
+
});
|
|
972
|
+
var BulkCreateModifierGroupsResponse = z.object({
|
|
973
|
+
results: z.array(
|
|
974
|
+
z.object({
|
|
975
|
+
itemMetadata: z.object({
|
|
976
|
+
_id: z.string().describe(
|
|
977
|
+
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
978
|
+
).optional().nullable(),
|
|
979
|
+
originalIndex: z.number().int().describe(
|
|
980
|
+
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
981
|
+
).optional(),
|
|
982
|
+
success: z.boolean().describe(
|
|
983
|
+
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
984
|
+
).optional(),
|
|
985
|
+
error: z.object({
|
|
986
|
+
code: z.string().describe("Error code.").optional(),
|
|
987
|
+
description: z.string().describe("Description of the error.").optional(),
|
|
988
|
+
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
989
|
+
}).describe("Details about the error in case of failure.").optional()
|
|
990
|
+
}).describe("Metadata for group modifier creation.").optional(),
|
|
991
|
+
modifierGroup: z.object({
|
|
992
|
+
_id: z.string().describe("Modifier group ID.").regex(
|
|
993
|
+
/^[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}$/,
|
|
994
|
+
"Must be a valid GUID"
|
|
995
|
+
).optional().nullable(),
|
|
996
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
997
|
+
"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."
|
|
998
|
+
).optional().nullable(),
|
|
999
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
1000
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
1001
|
+
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
1002
|
+
modifiers: z.array(
|
|
1003
|
+
z.object({
|
|
1004
|
+
_id: z.string().describe("Item modifier ID.").regex(
|
|
1005
|
+
/^[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}$/,
|
|
1006
|
+
"Must be a valid GUID"
|
|
1007
|
+
).optional(),
|
|
1008
|
+
preSelected: z.boolean().describe(
|
|
1009
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
1010
|
+
).optional().nullable(),
|
|
1011
|
+
additionalChargeInfo: z.object({
|
|
1012
|
+
additionalCharge: z.string().describe(
|
|
1013
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
1014
|
+
).optional().nullable()
|
|
1015
|
+
}).describe("Item modifier price details.").optional()
|
|
1016
|
+
})
|
|
1017
|
+
).min(0).max(500).optional(),
|
|
1018
|
+
rule: z.object({
|
|
1019
|
+
required: z.boolean().describe(
|
|
1020
|
+
"Whether the items from the modifier group must be selected."
|
|
1021
|
+
).optional().nullable(),
|
|
1022
|
+
minSelections: z.number().int().describe(
|
|
1023
|
+
"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`."
|
|
1024
|
+
).min(0).max(25).optional().nullable(),
|
|
1025
|
+
maxSelections: z.number().int().describe(
|
|
1026
|
+
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
1027
|
+
).min(0).max(25).optional().nullable()
|
|
1028
|
+
}).describe("Modifier group details.").optional(),
|
|
1029
|
+
extendedFields: z.object({
|
|
1030
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1031
|
+
"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)."
|
|
1032
|
+
).optional()
|
|
1033
|
+
}).describe("Extended fields.").optional(),
|
|
1034
|
+
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
1035
|
+
}).describe("Created modifier group.").optional()
|
|
1036
|
+
})
|
|
1037
|
+
).optional(),
|
|
1038
|
+
bulkActionMetadata: z.object({
|
|
1039
|
+
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
1040
|
+
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
1041
|
+
undetailedFailures: z.number().int().describe(
|
|
1042
|
+
"Number of failures without details because detailed failure threshold was exceeded."
|
|
1043
|
+
).optional()
|
|
1044
|
+
}).describe("Metadata for the API call.").optional()
|
|
1045
|
+
});
|
|
1046
|
+
var BulkUpdateModifierGroupsRequest = z.object({
|
|
1047
|
+
modifierGroups: z.array(
|
|
1048
|
+
z.object({
|
|
1049
|
+
modifierGroup: z.object({
|
|
1050
|
+
_id: z.string().describe("Modifier group ID.").regex(
|
|
1051
|
+
/^[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}$/,
|
|
1052
|
+
"Must be a valid GUID"
|
|
1053
|
+
),
|
|
1054
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1055
|
+
"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."
|
|
1056
|
+
),
|
|
1057
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
1058
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
1059
|
+
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
1060
|
+
modifiers: z.array(
|
|
1061
|
+
z.object({
|
|
1062
|
+
_id: z.string().describe("Item modifier ID.").regex(
|
|
1063
|
+
/^[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}$/,
|
|
1064
|
+
"Must be a valid GUID"
|
|
1065
|
+
).optional(),
|
|
1066
|
+
preSelected: z.boolean().describe(
|
|
1067
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
1068
|
+
).optional().nullable(),
|
|
1069
|
+
additionalChargeInfo: z.object({
|
|
1070
|
+
additionalCharge: z.string().describe(
|
|
1071
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
1072
|
+
).optional().nullable()
|
|
1073
|
+
}).describe("Item modifier price details.").optional()
|
|
1074
|
+
})
|
|
1075
|
+
).min(0).max(500).optional(),
|
|
1076
|
+
rule: z.object({
|
|
1077
|
+
required: z.boolean().describe(
|
|
1078
|
+
"Whether the items from the modifier group must be selected."
|
|
1079
|
+
).optional().nullable(),
|
|
1080
|
+
minSelections: z.number().int().describe(
|
|
1081
|
+
"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`."
|
|
1082
|
+
).min(0).max(25).optional().nullable(),
|
|
1083
|
+
maxSelections: z.number().int().describe(
|
|
1084
|
+
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
1085
|
+
).min(0).max(25).optional().nullable()
|
|
1086
|
+
}).describe("Modifier group details.").optional(),
|
|
1087
|
+
extendedFields: z.object({
|
|
1088
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1089
|
+
"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)."
|
|
1090
|
+
).optional()
|
|
1091
|
+
}).describe("Extended fields.").optional(),
|
|
1092
|
+
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
1093
|
+
}).describe("Modifier group to update.").optional(),
|
|
1094
|
+
mask: z.array(z.string()).optional()
|
|
1095
|
+
})
|
|
1096
|
+
).min(1).max(100),
|
|
1097
|
+
options: z.object({
|
|
1098
|
+
returnEntity: z.boolean().describe(
|
|
1099
|
+
"Whether to receive the updated modifier groups in the response."
|
|
1100
|
+
).optional()
|
|
1101
|
+
}).optional()
|
|
1102
|
+
});
|
|
1103
|
+
var BulkUpdateModifierGroupsResponse = z.object({
|
|
1104
|
+
results: z.array(
|
|
1105
|
+
z.object({
|
|
1106
|
+
itemMetadata: z.object({
|
|
1107
|
+
_id: z.string().describe(
|
|
1108
|
+
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
1109
|
+
).optional().nullable(),
|
|
1110
|
+
originalIndex: z.number().int().describe(
|
|
1111
|
+
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
1112
|
+
).optional(),
|
|
1113
|
+
success: z.boolean().describe(
|
|
1114
|
+
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
1115
|
+
).optional(),
|
|
1116
|
+
error: z.object({
|
|
1117
|
+
code: z.string().describe("Error code.").optional(),
|
|
1118
|
+
description: z.string().describe("Description of the error.").optional(),
|
|
1119
|
+
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
1120
|
+
}).describe("Details about the error in case of failure.").optional()
|
|
1121
|
+
}).describe("Metadata for group modifier update.").optional(),
|
|
1122
|
+
modifierGroup: z.object({
|
|
1123
|
+
_id: z.string().describe("Modifier group ID.").regex(
|
|
1124
|
+
/^[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}$/,
|
|
1125
|
+
"Must be a valid GUID"
|
|
1126
|
+
).optional().nullable(),
|
|
1127
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1128
|
+
"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."
|
|
1129
|
+
).optional().nullable(),
|
|
1130
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
1131
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
1132
|
+
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
1133
|
+
modifiers: z.array(
|
|
1134
|
+
z.object({
|
|
1135
|
+
_id: z.string().describe("Item modifier ID.").regex(
|
|
1136
|
+
/^[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}$/,
|
|
1137
|
+
"Must be a valid GUID"
|
|
1138
|
+
).optional(),
|
|
1139
|
+
preSelected: z.boolean().describe(
|
|
1140
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
1141
|
+
).optional().nullable(),
|
|
1142
|
+
additionalChargeInfo: z.object({
|
|
1143
|
+
additionalCharge: z.string().describe(
|
|
1144
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
1145
|
+
).optional().nullable()
|
|
1146
|
+
}).describe("Item modifier price details.").optional()
|
|
1147
|
+
})
|
|
1148
|
+
).min(0).max(500).optional(),
|
|
1149
|
+
rule: z.object({
|
|
1150
|
+
required: z.boolean().describe(
|
|
1151
|
+
"Whether the items from the modifier group must be selected."
|
|
1152
|
+
).optional().nullable(),
|
|
1153
|
+
minSelections: z.number().int().describe(
|
|
1154
|
+
"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`."
|
|
1155
|
+
).min(0).max(25).optional().nullable(),
|
|
1156
|
+
maxSelections: z.number().int().describe(
|
|
1157
|
+
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
1158
|
+
).min(0).max(25).optional().nullable()
|
|
1159
|
+
}).describe("Modifier group details.").optional(),
|
|
1160
|
+
extendedFields: z.object({
|
|
1161
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1162
|
+
"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)."
|
|
1163
|
+
).optional()
|
|
1164
|
+
}).describe("Extended fields.").optional(),
|
|
1165
|
+
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
1166
|
+
}).describe(
|
|
1167
|
+
"Updated modifier group. Only returned if `returnEntity` is set to `true`."
|
|
1168
|
+
).optional()
|
|
1169
|
+
})
|
|
1170
|
+
).min(1).max(100).optional(),
|
|
1171
|
+
bulkActionMetadata: z.object({
|
|
1172
|
+
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
1173
|
+
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
1174
|
+
undetailedFailures: z.number().int().describe(
|
|
1175
|
+
"Number of failures without details because detailed failure threshold was exceeded."
|
|
1176
|
+
).optional()
|
|
1177
|
+
}).describe("Metadata for the API call.").optional()
|
|
1178
|
+
});
|
|
1179
|
+
var BulkDeleteModifierGroupsRequest = z.object({
|
|
1180
|
+
ids: z.array(z.string()).max(200)
|
|
1181
|
+
});
|
|
1182
|
+
var BulkDeleteModifierGroupsResponse = z.object({
|
|
1183
|
+
results: z.array(
|
|
1184
|
+
z.object({
|
|
1185
|
+
itemMetadata: z.object({
|
|
1186
|
+
_id: z.string().describe(
|
|
1187
|
+
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
1188
|
+
).optional().nullable(),
|
|
1189
|
+
originalIndex: z.number().int().describe(
|
|
1190
|
+
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
1191
|
+
).optional(),
|
|
1192
|
+
success: z.boolean().describe(
|
|
1193
|
+
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
1194
|
+
).optional(),
|
|
1195
|
+
error: z.object({
|
|
1196
|
+
code: z.string().describe("Error code.").optional(),
|
|
1197
|
+
description: z.string().describe("Description of the error.").optional(),
|
|
1198
|
+
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
1199
|
+
}).describe("Details about the error in case of failure.").optional()
|
|
1200
|
+
}).describe("Metadata for group modifier deletion.").optional()
|
|
1201
|
+
})
|
|
1202
|
+
).optional(),
|
|
1203
|
+
bulkActionMetadata: z.object({
|
|
1204
|
+
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
1205
|
+
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
1206
|
+
undetailedFailures: z.number().int().describe(
|
|
1207
|
+
"Number of failures without details because detailed failure threshold was exceeded."
|
|
1208
|
+
).optional()
|
|
1209
|
+
}).describe("Metadata for the API call.").optional()
|
|
1210
|
+
});
|
|
1211
|
+
|
|
1212
|
+
// src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.universal.ts
|
|
479
1213
|
import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
|
|
480
1214
|
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
481
1215
|
SortOrder2["ASC"] = "ASC";
|
|
@@ -491,7 +1225,10 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
491
1225
|
return WebhookIdentityType2;
|
|
492
1226
|
})(WebhookIdentityType || {});
|
|
493
1227
|
async function createModifierGroup2(modifierGroup) {
|
|
494
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
1228
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
1229
|
+
if (validateRequestSchema) {
|
|
1230
|
+
CreateModifierGroupRequest.parse({ modifierGroup });
|
|
1231
|
+
}
|
|
495
1232
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
496
1233
|
modifierGroup
|
|
497
1234
|
});
|
|
@@ -518,7 +1255,10 @@ async function createModifierGroup2(modifierGroup) {
|
|
|
518
1255
|
}
|
|
519
1256
|
}
|
|
520
1257
|
async function getModifierGroup2(modifierGroupId) {
|
|
521
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
1258
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
1259
|
+
if (validateRequestSchema) {
|
|
1260
|
+
GetModifierGroupRequest.parse({ modifierGroupId });
|
|
1261
|
+
}
|
|
522
1262
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
523
1263
|
modifierGroupId
|
|
524
1264
|
});
|
|
@@ -543,7 +1283,10 @@ async function getModifierGroup2(modifierGroupId) {
|
|
|
543
1283
|
}
|
|
544
1284
|
}
|
|
545
1285
|
async function listModifierGroups2(options) {
|
|
546
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
1286
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
1287
|
+
if (validateRequestSchema) {
|
|
1288
|
+
ListModifierGroupsRequest.parse({ options });
|
|
1289
|
+
}
|
|
547
1290
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
548
1291
|
modifierGroupIds: options?.modifierGroupIds,
|
|
549
1292
|
paging: options?.paging
|
|
@@ -621,7 +1364,10 @@ function queryModifierGroups2() {
|
|
|
621
1364
|
});
|
|
622
1365
|
}
|
|
623
1366
|
async function typedQueryModifierGroups(query) {
|
|
624
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
1367
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
1368
|
+
if (validateRequestSchema) {
|
|
1369
|
+
QueryModifierGroupsRequest.parse({ query });
|
|
1370
|
+
}
|
|
625
1371
|
const payload = renameKeysFromSDKRequestToRESTRequest({ query });
|
|
626
1372
|
const reqOpts = queryModifierGroups(
|
|
627
1373
|
payload
|
|
@@ -651,7 +1397,10 @@ var utils = {
|
|
|
651
1397
|
}
|
|
652
1398
|
};
|
|
653
1399
|
async function countModifierGroups2(options) {
|
|
654
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
1400
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
1401
|
+
if (validateRequestSchema) {
|
|
1402
|
+
CountModifierGroupsRequest.parse({ options });
|
|
1403
|
+
}
|
|
655
1404
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
656
1405
|
filter: options?.filter
|
|
657
1406
|
});
|
|
@@ -678,7 +1427,10 @@ async function countModifierGroups2(options) {
|
|
|
678
1427
|
}
|
|
679
1428
|
}
|
|
680
1429
|
async function updateModifierGroup2(_id, modifierGroup) {
|
|
681
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
1430
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
1431
|
+
if (validateRequestSchema) {
|
|
1432
|
+
UpdateModifierGroupRequest.parse({ _id, modifierGroup });
|
|
1433
|
+
}
|
|
682
1434
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
683
1435
|
modifierGroup: { ...modifierGroup, id: _id }
|
|
684
1436
|
});
|
|
@@ -705,7 +1457,10 @@ async function updateModifierGroup2(_id, modifierGroup) {
|
|
|
705
1457
|
}
|
|
706
1458
|
}
|
|
707
1459
|
async function deleteModifierGroup2(modifierGroupId) {
|
|
708
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
1460
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
1461
|
+
if (validateRequestSchema) {
|
|
1462
|
+
DeleteModifierGroupRequest.parse({ modifierGroupId });
|
|
1463
|
+
}
|
|
709
1464
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
710
1465
|
modifierGroupId
|
|
711
1466
|
});
|
|
@@ -731,7 +1486,10 @@ async function deleteModifierGroup2(modifierGroupId) {
|
|
|
731
1486
|
}
|
|
732
1487
|
}
|
|
733
1488
|
async function bulkCreateModifierGroups2(modifierGroups, options) {
|
|
734
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
1489
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
1490
|
+
if (validateRequestSchema) {
|
|
1491
|
+
BulkCreateModifierGroupsRequest.parse({ modifierGroups, options });
|
|
1492
|
+
}
|
|
735
1493
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
736
1494
|
modifierGroups,
|
|
737
1495
|
returnEntity: options?.returnEntity
|
|
@@ -762,7 +1520,10 @@ async function bulkCreateModifierGroups2(modifierGroups, options) {
|
|
|
762
1520
|
}
|
|
763
1521
|
}
|
|
764
1522
|
async function bulkUpdateModifierGroups2(modifierGroups, options) {
|
|
765
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
1523
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
1524
|
+
if (validateRequestSchema) {
|
|
1525
|
+
BulkUpdateModifierGroupsRequest.parse({ modifierGroups, options });
|
|
1526
|
+
}
|
|
766
1527
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
767
1528
|
modifierGroups,
|
|
768
1529
|
returnEntity: options?.returnEntity
|
|
@@ -793,7 +1554,10 @@ async function bulkUpdateModifierGroups2(modifierGroups, options) {
|
|
|
793
1554
|
}
|
|
794
1555
|
}
|
|
795
1556
|
async function bulkDeleteModifierGroups2(ids) {
|
|
796
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
1557
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
1558
|
+
if (validateRequestSchema) {
|
|
1559
|
+
BulkDeleteModifierGroupsRequest.parse({ ids });
|
|
1560
|
+
}
|
|
797
1561
|
const payload = renameKeysFromSDKRequestToRESTRequest({ ids });
|
|
798
1562
|
const reqOpts = bulkDeleteModifierGroups(
|
|
799
1563
|
payload
|
|
@@ -819,83 +1583,83 @@ async function bulkDeleteModifierGroups2(ids) {
|
|
|
819
1583
|
}
|
|
820
1584
|
|
|
821
1585
|
// src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.public.ts
|
|
822
|
-
function createModifierGroup3(httpClient) {
|
|
1586
|
+
function createModifierGroup3(httpClient, __options) {
|
|
823
1587
|
return (modifierGroup) => createModifierGroup2(
|
|
824
1588
|
modifierGroup,
|
|
825
1589
|
// @ts-ignore
|
|
826
|
-
{ httpClient }
|
|
1590
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
827
1591
|
);
|
|
828
1592
|
}
|
|
829
|
-
function getModifierGroup3(httpClient) {
|
|
1593
|
+
function getModifierGroup3(httpClient, __options) {
|
|
830
1594
|
return (modifierGroupId) => getModifierGroup2(
|
|
831
1595
|
modifierGroupId,
|
|
832
1596
|
// @ts-ignore
|
|
833
|
-
{ httpClient }
|
|
1597
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
834
1598
|
);
|
|
835
1599
|
}
|
|
836
|
-
function listModifierGroups3(httpClient) {
|
|
1600
|
+
function listModifierGroups3(httpClient, __options) {
|
|
837
1601
|
return (options) => listModifierGroups2(
|
|
838
1602
|
options,
|
|
839
1603
|
// @ts-ignore
|
|
840
|
-
{ httpClient }
|
|
1604
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
841
1605
|
);
|
|
842
1606
|
}
|
|
843
|
-
function queryModifierGroups3(httpClient) {
|
|
1607
|
+
function queryModifierGroups3(httpClient, __options) {
|
|
844
1608
|
return () => queryModifierGroups2(
|
|
845
1609
|
// @ts-ignore
|
|
846
|
-
{ httpClient }
|
|
1610
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
847
1611
|
);
|
|
848
1612
|
}
|
|
849
|
-
function typedQueryModifierGroups2(httpClient) {
|
|
1613
|
+
function typedQueryModifierGroups2(httpClient, __options) {
|
|
850
1614
|
return (query) => typedQueryModifierGroups(
|
|
851
1615
|
query,
|
|
852
1616
|
// @ts-ignore
|
|
853
|
-
{ httpClient }
|
|
1617
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
854
1618
|
);
|
|
855
1619
|
}
|
|
856
|
-
function countModifierGroups3(httpClient) {
|
|
1620
|
+
function countModifierGroups3(httpClient, __options) {
|
|
857
1621
|
return (options) => countModifierGroups2(
|
|
858
1622
|
options,
|
|
859
1623
|
// @ts-ignore
|
|
860
|
-
{ httpClient }
|
|
1624
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
861
1625
|
);
|
|
862
1626
|
}
|
|
863
|
-
function updateModifierGroup3(httpClient) {
|
|
1627
|
+
function updateModifierGroup3(httpClient, __options) {
|
|
864
1628
|
return (_id, modifierGroup) => updateModifierGroup2(
|
|
865
1629
|
_id,
|
|
866
1630
|
modifierGroup,
|
|
867
1631
|
// @ts-ignore
|
|
868
|
-
{ httpClient }
|
|
1632
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
869
1633
|
);
|
|
870
1634
|
}
|
|
871
|
-
function deleteModifierGroup3(httpClient) {
|
|
1635
|
+
function deleteModifierGroup3(httpClient, __options) {
|
|
872
1636
|
return (modifierGroupId) => deleteModifierGroup2(
|
|
873
1637
|
modifierGroupId,
|
|
874
1638
|
// @ts-ignore
|
|
875
|
-
{ httpClient }
|
|
1639
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
876
1640
|
);
|
|
877
1641
|
}
|
|
878
|
-
function bulkCreateModifierGroups3(httpClient) {
|
|
1642
|
+
function bulkCreateModifierGroups3(httpClient, __options) {
|
|
879
1643
|
return (modifierGroups, options) => bulkCreateModifierGroups2(
|
|
880
1644
|
modifierGroups,
|
|
881
1645
|
options,
|
|
882
1646
|
// @ts-ignore
|
|
883
|
-
{ httpClient }
|
|
1647
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
884
1648
|
);
|
|
885
1649
|
}
|
|
886
|
-
function bulkUpdateModifierGroups3(httpClient) {
|
|
1650
|
+
function bulkUpdateModifierGroups3(httpClient, __options) {
|
|
887
1651
|
return (modifierGroups, options) => bulkUpdateModifierGroups2(
|
|
888
1652
|
modifierGroups,
|
|
889
1653
|
options,
|
|
890
1654
|
// @ts-ignore
|
|
891
|
-
{ httpClient }
|
|
1655
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
892
1656
|
);
|
|
893
1657
|
}
|
|
894
|
-
function bulkDeleteModifierGroups3(httpClient) {
|
|
1658
|
+
function bulkDeleteModifierGroups3(httpClient, __options) {
|
|
895
1659
|
return (ids) => bulkDeleteModifierGroups2(
|
|
896
1660
|
ids,
|
|
897
1661
|
// @ts-ignore
|
|
898
|
-
{ httpClient }
|
|
1662
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
899
1663
|
);
|
|
900
1664
|
}
|
|
901
1665
|
var onItemModifierGroupCreated = EventDefinition(
|