@wix/auto_sdk_restaurants_item-modifier-groups 1.0.69 → 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 +27 -9
- package/build/cjs/index.js +806 -32
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +784 -10
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.d.mts +27 -9
- package/build/es/index.mjs +796 -32
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.mjs +774 -10
- package/build/es/index.typings.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +27 -9
- package/build/internal/cjs/index.js +806 -32
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.js +784 -10
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/es/index.d.mts +27 -9
- package/build/internal/es/index.mjs +796 -32
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.mjs +774 -10
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -470,6 +470,740 @@ function bulkDeleteModifierGroups(payload) {
|
|
|
470
470
|
|
|
471
471
|
// src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.universal.ts
|
|
472
472
|
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
473
|
+
|
|
474
|
+
// src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.schemas.ts
|
|
475
|
+
import * as z from "zod";
|
|
476
|
+
var CreateModifierGroupRequest = z.object({
|
|
477
|
+
modifierGroup: z.object({
|
|
478
|
+
_id: z.string().describe("Modifier group ID.").regex(
|
|
479
|
+
/^[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}$/,
|
|
480
|
+
"Must be a valid GUID"
|
|
481
|
+
).optional().nullable(),
|
|
482
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
483
|
+
"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."
|
|
484
|
+
).optional().nullable(),
|
|
485
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
486
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
487
|
+
name: z.string().describe("Modifier group name.").min(1).max(100),
|
|
488
|
+
modifiers: z.array(
|
|
489
|
+
z.object({
|
|
490
|
+
_id: z.string().describe("Item modifier ID.").regex(
|
|
491
|
+
/^[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}$/,
|
|
492
|
+
"Must be a valid GUID"
|
|
493
|
+
).optional(),
|
|
494
|
+
preSelected: z.boolean().describe(
|
|
495
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
496
|
+
).optional().nullable(),
|
|
497
|
+
additionalChargeInfo: z.object({
|
|
498
|
+
additionalCharge: z.string().describe(
|
|
499
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
500
|
+
).optional().nullable()
|
|
501
|
+
}).describe("Item modifier price details.").optional()
|
|
502
|
+
})
|
|
503
|
+
).min(0).max(500).optional(),
|
|
504
|
+
rule: z.object({
|
|
505
|
+
required: z.boolean().describe(
|
|
506
|
+
"Whether the items from the modifier group must be selected."
|
|
507
|
+
).optional().nullable(),
|
|
508
|
+
minSelections: z.number().int().describe(
|
|
509
|
+
"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`."
|
|
510
|
+
).min(0).max(25).optional().nullable(),
|
|
511
|
+
maxSelections: z.number().int().describe(
|
|
512
|
+
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
513
|
+
).min(0).max(25).optional().nullable()
|
|
514
|
+
}).describe("Modifier group details.").optional(),
|
|
515
|
+
extendedFields: z.object({
|
|
516
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
517
|
+
"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)."
|
|
518
|
+
).optional()
|
|
519
|
+
}).describe("Extended fields.").optional(),
|
|
520
|
+
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
521
|
+
}).describe("Modifier group details.")
|
|
522
|
+
});
|
|
523
|
+
var CreateModifierGroupResponse = z.object({
|
|
524
|
+
_id: z.string().describe("Modifier group ID.").regex(
|
|
525
|
+
/^[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}$/,
|
|
526
|
+
"Must be a valid GUID"
|
|
527
|
+
).optional().nullable(),
|
|
528
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
529
|
+
"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."
|
|
530
|
+
).optional().nullable(),
|
|
531
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
532
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
533
|
+
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
534
|
+
modifiers: z.array(
|
|
535
|
+
z.object({
|
|
536
|
+
_id: z.string().describe("Item modifier ID.").regex(
|
|
537
|
+
/^[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}$/,
|
|
538
|
+
"Must be a valid GUID"
|
|
539
|
+
).optional(),
|
|
540
|
+
preSelected: z.boolean().describe(
|
|
541
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
542
|
+
).optional().nullable(),
|
|
543
|
+
additionalChargeInfo: z.object({
|
|
544
|
+
additionalCharge: z.string().describe(
|
|
545
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
546
|
+
).optional().nullable()
|
|
547
|
+
}).describe("Item modifier price details.").optional()
|
|
548
|
+
})
|
|
549
|
+
).min(0).max(500).optional(),
|
|
550
|
+
rule: z.object({
|
|
551
|
+
required: z.boolean().describe("Whether the items from the modifier group must be selected.").optional().nullable(),
|
|
552
|
+
minSelections: z.number().int().describe(
|
|
553
|
+
"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`."
|
|
554
|
+
).min(0).max(25).optional().nullable(),
|
|
555
|
+
maxSelections: z.number().int().describe(
|
|
556
|
+
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
557
|
+
).min(0).max(25).optional().nullable()
|
|
558
|
+
}).describe("Modifier group details.").optional(),
|
|
559
|
+
extendedFields: z.object({
|
|
560
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
561
|
+
"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)."
|
|
562
|
+
).optional()
|
|
563
|
+
}).describe("Extended fields.").optional(),
|
|
564
|
+
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
565
|
+
});
|
|
566
|
+
var GetModifierGroupRequest = z.object({
|
|
567
|
+
modifierGroupId: z.string().describe("Modifier group ID.").regex(
|
|
568
|
+
/^[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}$/,
|
|
569
|
+
"Must be a valid GUID"
|
|
570
|
+
)
|
|
571
|
+
});
|
|
572
|
+
var GetModifierGroupResponse = z.object({
|
|
573
|
+
_id: 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
|
+
).optional().nullable(),
|
|
577
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
578
|
+
"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."
|
|
579
|
+
).optional().nullable(),
|
|
580
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
581
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
582
|
+
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
583
|
+
modifiers: z.array(
|
|
584
|
+
z.object({
|
|
585
|
+
_id: z.string().describe("Item modifier ID.").regex(
|
|
586
|
+
/^[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}$/,
|
|
587
|
+
"Must be a valid GUID"
|
|
588
|
+
).optional(),
|
|
589
|
+
preSelected: z.boolean().describe(
|
|
590
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
591
|
+
).optional().nullable(),
|
|
592
|
+
additionalChargeInfo: z.object({
|
|
593
|
+
additionalCharge: z.string().describe(
|
|
594
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
595
|
+
).optional().nullable()
|
|
596
|
+
}).describe("Item modifier price details.").optional()
|
|
597
|
+
})
|
|
598
|
+
).min(0).max(500).optional(),
|
|
599
|
+
rule: z.object({
|
|
600
|
+
required: z.boolean().describe("Whether the items from the modifier group must be selected.").optional().nullable(),
|
|
601
|
+
minSelections: z.number().int().describe(
|
|
602
|
+
"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`."
|
|
603
|
+
).min(0).max(25).optional().nullable(),
|
|
604
|
+
maxSelections: z.number().int().describe(
|
|
605
|
+
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
606
|
+
).min(0).max(25).optional().nullable()
|
|
607
|
+
}).describe("Modifier group details.").optional(),
|
|
608
|
+
extendedFields: z.object({
|
|
609
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
610
|
+
"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)."
|
|
611
|
+
).optional()
|
|
612
|
+
}).describe("Extended fields.").optional(),
|
|
613
|
+
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
614
|
+
});
|
|
615
|
+
var ListModifierGroupsRequest = z.object({
|
|
616
|
+
options: z.object({
|
|
617
|
+
modifierGroupIds: z.array(z.string()).max(500).optional(),
|
|
618
|
+
paging: z.object({
|
|
619
|
+
limit: z.number().int().describe("Number of items to load.").min(0).max(500).optional().nullable(),
|
|
620
|
+
cursor: z.string().describe(
|
|
621
|
+
"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."
|
|
622
|
+
).optional().nullable()
|
|
623
|
+
}).describe("The metadata of the paginated results.").optional()
|
|
624
|
+
}).optional()
|
|
625
|
+
});
|
|
626
|
+
var ListModifierGroupsResponse = z.object({
|
|
627
|
+
modifierGroups: z.array(
|
|
628
|
+
z.object({
|
|
629
|
+
_id: z.string().describe("Modifier group ID.").regex(
|
|
630
|
+
/^[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}$/,
|
|
631
|
+
"Must be a valid GUID"
|
|
632
|
+
).optional().nullable(),
|
|
633
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
634
|
+
"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."
|
|
635
|
+
).optional().nullable(),
|
|
636
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
637
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
638
|
+
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
639
|
+
modifiers: z.array(
|
|
640
|
+
z.object({
|
|
641
|
+
_id: z.string().describe("Item modifier ID.").regex(
|
|
642
|
+
/^[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}$/,
|
|
643
|
+
"Must be a valid GUID"
|
|
644
|
+
).optional(),
|
|
645
|
+
preSelected: z.boolean().describe(
|
|
646
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
647
|
+
).optional().nullable(),
|
|
648
|
+
additionalChargeInfo: z.object({
|
|
649
|
+
additionalCharge: z.string().describe(
|
|
650
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
651
|
+
).optional().nullable()
|
|
652
|
+
}).describe("Item modifier price details.").optional()
|
|
653
|
+
})
|
|
654
|
+
).min(0).max(500).optional(),
|
|
655
|
+
rule: z.object({
|
|
656
|
+
required: z.boolean().describe(
|
|
657
|
+
"Whether the items from the modifier group must be selected."
|
|
658
|
+
).optional().nullable(),
|
|
659
|
+
minSelections: z.number().int().describe(
|
|
660
|
+
"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`."
|
|
661
|
+
).min(0).max(25).optional().nullable(),
|
|
662
|
+
maxSelections: z.number().int().describe(
|
|
663
|
+
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
664
|
+
).min(0).max(25).optional().nullable()
|
|
665
|
+
}).describe("Modifier group details.").optional(),
|
|
666
|
+
extendedFields: z.object({
|
|
667
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
668
|
+
"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)."
|
|
669
|
+
).optional()
|
|
670
|
+
}).describe("Extended fields.").optional(),
|
|
671
|
+
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
672
|
+
})
|
|
673
|
+
).optional(),
|
|
674
|
+
metadata: z.object({
|
|
675
|
+
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
676
|
+
cursors: z.object({
|
|
677
|
+
next: z.string().describe("Cursor pointing to next page in the list of results.").optional().nullable(),
|
|
678
|
+
prev: z.string().describe(
|
|
679
|
+
"Cursor pointing to previous page in the list of results."
|
|
680
|
+
).optional().nullable()
|
|
681
|
+
}).describe("Offset that was requested.").optional(),
|
|
682
|
+
hasNext: z.boolean().describe(
|
|
683
|
+
"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."
|
|
684
|
+
).optional().nullable()
|
|
685
|
+
}).describe("The metadata of the paginated results.").optional()
|
|
686
|
+
});
|
|
687
|
+
var QueryModifierGroupsRequest = z.object({
|
|
688
|
+
query: z.object({
|
|
689
|
+
filter: z.object({
|
|
690
|
+
_id: z.object({
|
|
691
|
+
$eq: z.string(),
|
|
692
|
+
$in: z.array(z.string()),
|
|
693
|
+
$ne: z.string(),
|
|
694
|
+
$nin: z.array(z.string())
|
|
695
|
+
}).partial().strict().optional(),
|
|
696
|
+
_createdDate: z.object({
|
|
697
|
+
$eq: z.string(),
|
|
698
|
+
$gt: z.string(),
|
|
699
|
+
$gte: z.string(),
|
|
700
|
+
$lt: z.string(),
|
|
701
|
+
$lte: z.string(),
|
|
702
|
+
$ne: z.string()
|
|
703
|
+
}).partial().strict().optional(),
|
|
704
|
+
_updatedDate: z.object({
|
|
705
|
+
$eq: z.string(),
|
|
706
|
+
$gt: z.string(),
|
|
707
|
+
$gte: z.string(),
|
|
708
|
+
$lt: z.string(),
|
|
709
|
+
$lte: z.string(),
|
|
710
|
+
$ne: z.string()
|
|
711
|
+
}).partial().strict().optional(),
|
|
712
|
+
"modifiers._id": z.object({
|
|
713
|
+
$hasSome: z.array(z.string()),
|
|
714
|
+
$in: z.array(z.string()),
|
|
715
|
+
$nin: z.array(z.string())
|
|
716
|
+
}).partial().strict().optional(),
|
|
717
|
+
"modifiers.preSelected": z.object({ $eq: z.boolean(), $ne: z.boolean() }).partial().strict().optional(),
|
|
718
|
+
"rule.minSelections": z.object({ $eq: z.number(), $ne: z.number() }).partial().strict().optional(),
|
|
719
|
+
"rule.maxSelections": z.object({ $eq: z.number(), $ne: z.number() }).partial().strict().optional(),
|
|
720
|
+
modifiers: z.object({ $exists: z.boolean() }).partial().strict().optional(),
|
|
721
|
+
"rule.required": z.object({
|
|
722
|
+
$eq: z.boolean(),
|
|
723
|
+
$in: z.array(z.boolean()),
|
|
724
|
+
$ne: z.boolean(),
|
|
725
|
+
$nin: z.array(z.boolean())
|
|
726
|
+
}).partial().strict().optional(),
|
|
727
|
+
rule: z.object({ $exists: z.boolean() }).partial().strict().optional(),
|
|
728
|
+
name: z.object({
|
|
729
|
+
$eq: z.string(),
|
|
730
|
+
$in: z.array(z.string()),
|
|
731
|
+
$ne: z.string(),
|
|
732
|
+
$nin: z.array(z.string()),
|
|
733
|
+
$startsWith: z.string()
|
|
734
|
+
}).partial().strict().optional(),
|
|
735
|
+
$and: z.array(z.any()).optional(),
|
|
736
|
+
$or: z.array(z.any()).optional(),
|
|
737
|
+
$not: z.any().optional()
|
|
738
|
+
}).strict().optional(),
|
|
739
|
+
sort: z.array(z.object({})).optional()
|
|
740
|
+
}).catchall(z.any()).describe("Query options.")
|
|
741
|
+
});
|
|
742
|
+
var QueryModifierGroupsResponse = z.object({
|
|
743
|
+
modifierGroups: z.array(
|
|
744
|
+
z.object({
|
|
745
|
+
_id: z.string().describe("Modifier group ID.").regex(
|
|
746
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
747
|
+
"Must be a valid GUID"
|
|
748
|
+
).optional().nullable(),
|
|
749
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
750
|
+
"Revision number, which increments by 1 each time the 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."
|
|
751
|
+
).optional().nullable(),
|
|
752
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
753
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
754
|
+
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
755
|
+
modifiers: z.array(
|
|
756
|
+
z.object({
|
|
757
|
+
_id: z.string().describe("Item modifier ID.").regex(
|
|
758
|
+
/^[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}$/,
|
|
759
|
+
"Must be a valid GUID"
|
|
760
|
+
).optional(),
|
|
761
|
+
preSelected: z.boolean().describe(
|
|
762
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
763
|
+
).optional().nullable(),
|
|
764
|
+
additionalChargeInfo: z.object({
|
|
765
|
+
additionalCharge: z.string().describe(
|
|
766
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
767
|
+
).optional().nullable()
|
|
768
|
+
}).describe("Item modifier price details.").optional()
|
|
769
|
+
})
|
|
770
|
+
).min(0).max(500).optional(),
|
|
771
|
+
rule: z.object({
|
|
772
|
+
required: z.boolean().describe(
|
|
773
|
+
"Whether the items from the modifier group must be selected."
|
|
774
|
+
).optional().nullable(),
|
|
775
|
+
minSelections: z.number().int().describe(
|
|
776
|
+
"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`."
|
|
777
|
+
).min(0).max(25).optional().nullable(),
|
|
778
|
+
maxSelections: z.number().int().describe(
|
|
779
|
+
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
780
|
+
).min(0).max(25).optional().nullable()
|
|
781
|
+
}).describe("Modifier group details.").optional(),
|
|
782
|
+
extendedFields: z.object({
|
|
783
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
784
|
+
"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)."
|
|
785
|
+
).optional()
|
|
786
|
+
}).describe("Extended fields.").optional(),
|
|
787
|
+
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
788
|
+
})
|
|
789
|
+
).optional(),
|
|
790
|
+
pagingMetadata: z.object({
|
|
791
|
+
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
792
|
+
cursors: z.object({
|
|
793
|
+
next: z.string().describe("Cursor pointing to next page in the list of results.").optional().nullable(),
|
|
794
|
+
prev: z.string().describe(
|
|
795
|
+
"Cursor pointing to previous page in the list of results."
|
|
796
|
+
).optional().nullable()
|
|
797
|
+
}).describe("Offset that was requested.").optional(),
|
|
798
|
+
hasNext: z.boolean().describe(
|
|
799
|
+
"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."
|
|
800
|
+
).optional().nullable()
|
|
801
|
+
}).describe("Metadata of the paginated results.").optional()
|
|
802
|
+
});
|
|
803
|
+
var CountModifierGroupsRequest = z.object({
|
|
804
|
+
options: z.object({
|
|
805
|
+
filter: z.record(z.string(), z.any()).describe("Filter for counting modifier groups.").optional().nullable()
|
|
806
|
+
}).optional()
|
|
807
|
+
});
|
|
808
|
+
var CountModifierGroupsResponse = z.object({
|
|
809
|
+
count: z.number().int().describe("Counted modifier groups.").optional()
|
|
810
|
+
});
|
|
811
|
+
var UpdateModifierGroupRequest = z.object({
|
|
812
|
+
_id: z.string().describe("Modifier group ID.").regex(
|
|
813
|
+
/^[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}$/,
|
|
814
|
+
"Must be a valid GUID"
|
|
815
|
+
),
|
|
816
|
+
modifierGroup: z.object({
|
|
817
|
+
_id: z.string().describe("Modifier group ID.").regex(
|
|
818
|
+
/^[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}$/,
|
|
819
|
+
"Must be a valid GUID"
|
|
820
|
+
).optional().nullable(),
|
|
821
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
822
|
+
"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."
|
|
823
|
+
),
|
|
824
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
825
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
826
|
+
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
827
|
+
modifiers: z.array(
|
|
828
|
+
z.object({
|
|
829
|
+
_id: z.string().describe("Item modifier ID.").regex(
|
|
830
|
+
/^[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}$/,
|
|
831
|
+
"Must be a valid GUID"
|
|
832
|
+
).optional(),
|
|
833
|
+
preSelected: z.boolean().describe(
|
|
834
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
835
|
+
).optional().nullable(),
|
|
836
|
+
additionalChargeInfo: z.object({
|
|
837
|
+
additionalCharge: z.string().describe(
|
|
838
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
839
|
+
).optional().nullable()
|
|
840
|
+
}).describe("Item modifier price details.").optional()
|
|
841
|
+
})
|
|
842
|
+
).min(0).max(500).optional(),
|
|
843
|
+
rule: z.object({
|
|
844
|
+
required: z.boolean().describe(
|
|
845
|
+
"Whether the items from the modifier group must be selected."
|
|
846
|
+
).optional().nullable(),
|
|
847
|
+
minSelections: z.number().int().describe(
|
|
848
|
+
"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`."
|
|
849
|
+
).min(0).max(25).optional().nullable(),
|
|
850
|
+
maxSelections: z.number().int().describe(
|
|
851
|
+
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
852
|
+
).min(0).max(25).optional().nullable()
|
|
853
|
+
}).describe("Modifier group details.").optional(),
|
|
854
|
+
extendedFields: z.object({
|
|
855
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
856
|
+
"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)."
|
|
857
|
+
).optional()
|
|
858
|
+
}).describe("Extended fields.").optional(),
|
|
859
|
+
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
860
|
+
}).describe("Modifier group to update.")
|
|
861
|
+
});
|
|
862
|
+
var UpdateModifierGroupResponse = z.object({
|
|
863
|
+
_id: z.string().describe("Modifier group ID.").regex(
|
|
864
|
+
/^[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}$/,
|
|
865
|
+
"Must be a valid GUID"
|
|
866
|
+
).optional().nullable(),
|
|
867
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
868
|
+
"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."
|
|
869
|
+
).optional().nullable(),
|
|
870
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
871
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
872
|
+
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
873
|
+
modifiers: z.array(
|
|
874
|
+
z.object({
|
|
875
|
+
_id: z.string().describe("Item modifier ID.").regex(
|
|
876
|
+
/^[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}$/,
|
|
877
|
+
"Must be a valid GUID"
|
|
878
|
+
).optional(),
|
|
879
|
+
preSelected: z.boolean().describe(
|
|
880
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
881
|
+
).optional().nullable(),
|
|
882
|
+
additionalChargeInfo: z.object({
|
|
883
|
+
additionalCharge: z.string().describe(
|
|
884
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
885
|
+
).optional().nullable()
|
|
886
|
+
}).describe("Item modifier price details.").optional()
|
|
887
|
+
})
|
|
888
|
+
).min(0).max(500).optional(),
|
|
889
|
+
rule: z.object({
|
|
890
|
+
required: z.boolean().describe("Whether the items from the modifier group must be selected.").optional().nullable(),
|
|
891
|
+
minSelections: z.number().int().describe(
|
|
892
|
+
"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`."
|
|
893
|
+
).min(0).max(25).optional().nullable(),
|
|
894
|
+
maxSelections: z.number().int().describe(
|
|
895
|
+
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
896
|
+
).min(0).max(25).optional().nullable()
|
|
897
|
+
}).describe("Modifier group details.").optional(),
|
|
898
|
+
extendedFields: z.object({
|
|
899
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
900
|
+
"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)."
|
|
901
|
+
).optional()
|
|
902
|
+
}).describe("Extended fields.").optional(),
|
|
903
|
+
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
904
|
+
});
|
|
905
|
+
var DeleteModifierGroupRequest = z.object({
|
|
906
|
+
modifierGroupId: z.string().describe("Modifier group ID.").regex(
|
|
907
|
+
/^[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}$/,
|
|
908
|
+
"Must be a valid GUID"
|
|
909
|
+
)
|
|
910
|
+
});
|
|
911
|
+
var DeleteModifierGroupResponse = z.object({});
|
|
912
|
+
var BulkCreateModifierGroupsRequest = z.object({
|
|
913
|
+
modifierGroups: z.array(
|
|
914
|
+
z.object({
|
|
915
|
+
_id: z.string().describe("Modifier group ID.").regex(
|
|
916
|
+
/^[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}$/,
|
|
917
|
+
"Must be a valid GUID"
|
|
918
|
+
).optional().nullable(),
|
|
919
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
920
|
+
"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."
|
|
921
|
+
).optional().nullable(),
|
|
922
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
923
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
924
|
+
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
925
|
+
modifiers: z.array(
|
|
926
|
+
z.object({
|
|
927
|
+
_id: z.string().describe("Item modifier ID.").regex(
|
|
928
|
+
/^[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}$/,
|
|
929
|
+
"Must be a valid GUID"
|
|
930
|
+
).optional(),
|
|
931
|
+
preSelected: z.boolean().describe(
|
|
932
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
933
|
+
).optional().nullable(),
|
|
934
|
+
additionalChargeInfo: z.object({
|
|
935
|
+
additionalCharge: z.string().describe(
|
|
936
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
937
|
+
).optional().nullable()
|
|
938
|
+
}).describe("Item modifier price details.").optional()
|
|
939
|
+
})
|
|
940
|
+
).min(0).max(500).optional(),
|
|
941
|
+
rule: z.object({
|
|
942
|
+
required: z.boolean().describe(
|
|
943
|
+
"Whether the items from the modifier group must be selected."
|
|
944
|
+
).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
|
+
).max(100),
|
|
960
|
+
options: z.object({
|
|
961
|
+
returnEntity: z.boolean().describe(
|
|
962
|
+
"Whether to receive the created modifier groups in the response."
|
|
963
|
+
).optional()
|
|
964
|
+
}).optional()
|
|
965
|
+
});
|
|
966
|
+
var BulkCreateModifierGroupsResponse = z.object({
|
|
967
|
+
results: z.array(
|
|
968
|
+
z.object({
|
|
969
|
+
itemMetadata: z.object({
|
|
970
|
+
_id: z.string().describe(
|
|
971
|
+
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
972
|
+
).optional().nullable(),
|
|
973
|
+
originalIndex: z.number().int().describe(
|
|
974
|
+
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
975
|
+
).optional(),
|
|
976
|
+
success: z.boolean().describe(
|
|
977
|
+
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
978
|
+
).optional(),
|
|
979
|
+
error: z.object({
|
|
980
|
+
code: z.string().describe("Error code.").optional(),
|
|
981
|
+
description: z.string().describe("Description of the error.").optional(),
|
|
982
|
+
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
983
|
+
}).describe("Details about the error in case of failure.").optional()
|
|
984
|
+
}).describe("Metadata for group modifier creation.").optional(),
|
|
985
|
+
modifierGroup: z.object({
|
|
986
|
+
_id: z.string().describe("Modifier group ID.").regex(
|
|
987
|
+
/^[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}$/,
|
|
988
|
+
"Must be a valid GUID"
|
|
989
|
+
).optional().nullable(),
|
|
990
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
991
|
+
"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."
|
|
992
|
+
).optional().nullable(),
|
|
993
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
994
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
995
|
+
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
996
|
+
modifiers: z.array(
|
|
997
|
+
z.object({
|
|
998
|
+
_id: z.string().describe("Item modifier ID.").regex(
|
|
999
|
+
/^[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}$/,
|
|
1000
|
+
"Must be a valid GUID"
|
|
1001
|
+
).optional(),
|
|
1002
|
+
preSelected: z.boolean().describe(
|
|
1003
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
1004
|
+
).optional().nullable(),
|
|
1005
|
+
additionalChargeInfo: z.object({
|
|
1006
|
+
additionalCharge: z.string().describe(
|
|
1007
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
1008
|
+
).optional().nullable()
|
|
1009
|
+
}).describe("Item modifier price details.").optional()
|
|
1010
|
+
})
|
|
1011
|
+
).min(0).max(500).optional(),
|
|
1012
|
+
rule: z.object({
|
|
1013
|
+
required: z.boolean().describe(
|
|
1014
|
+
"Whether the items from the modifier group must be selected."
|
|
1015
|
+
).optional().nullable(),
|
|
1016
|
+
minSelections: z.number().int().describe(
|
|
1017
|
+
"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`."
|
|
1018
|
+
).min(0).max(25).optional().nullable(),
|
|
1019
|
+
maxSelections: z.number().int().describe(
|
|
1020
|
+
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
1021
|
+
).min(0).max(25).optional().nullable()
|
|
1022
|
+
}).describe("Modifier group details.").optional(),
|
|
1023
|
+
extendedFields: z.object({
|
|
1024
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1025
|
+
"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)."
|
|
1026
|
+
).optional()
|
|
1027
|
+
}).describe("Extended fields.").optional(),
|
|
1028
|
+
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
1029
|
+
}).describe("Created modifier group.").optional()
|
|
1030
|
+
})
|
|
1031
|
+
).optional(),
|
|
1032
|
+
bulkActionMetadata: z.object({
|
|
1033
|
+
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
1034
|
+
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
1035
|
+
undetailedFailures: z.number().int().describe(
|
|
1036
|
+
"Number of failures without details because detailed failure threshold was exceeded."
|
|
1037
|
+
).optional()
|
|
1038
|
+
}).describe("Metadata for the API call.").optional()
|
|
1039
|
+
});
|
|
1040
|
+
var BulkUpdateModifierGroupsRequest = z.object({
|
|
1041
|
+
modifierGroups: z.array(
|
|
1042
|
+
z.object({
|
|
1043
|
+
modifierGroup: z.object({
|
|
1044
|
+
_id: z.string().describe("Modifier group ID.").regex(
|
|
1045
|
+
/^[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}$/,
|
|
1046
|
+
"Must be a valid GUID"
|
|
1047
|
+
),
|
|
1048
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1049
|
+
"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."
|
|
1050
|
+
),
|
|
1051
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
1052
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
1053
|
+
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
1054
|
+
modifiers: z.array(
|
|
1055
|
+
z.object({
|
|
1056
|
+
_id: z.string().describe("Item modifier ID.").regex(
|
|
1057
|
+
/^[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}$/,
|
|
1058
|
+
"Must be a valid GUID"
|
|
1059
|
+
).optional(),
|
|
1060
|
+
preSelected: z.boolean().describe(
|
|
1061
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
1062
|
+
).optional().nullable(),
|
|
1063
|
+
additionalChargeInfo: z.object({
|
|
1064
|
+
additionalCharge: z.string().describe(
|
|
1065
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
1066
|
+
).optional().nullable()
|
|
1067
|
+
}).describe("Item modifier price details.").optional()
|
|
1068
|
+
})
|
|
1069
|
+
).min(0).max(500).optional(),
|
|
1070
|
+
rule: z.object({
|
|
1071
|
+
required: z.boolean().describe(
|
|
1072
|
+
"Whether the items from the modifier group must be selected."
|
|
1073
|
+
).optional().nullable(),
|
|
1074
|
+
minSelections: z.number().int().describe(
|
|
1075
|
+
"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`."
|
|
1076
|
+
).min(0).max(25).optional().nullable(),
|
|
1077
|
+
maxSelections: z.number().int().describe(
|
|
1078
|
+
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
1079
|
+
).min(0).max(25).optional().nullable()
|
|
1080
|
+
}).describe("Modifier group details.").optional(),
|
|
1081
|
+
extendedFields: z.object({
|
|
1082
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1083
|
+
"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)."
|
|
1084
|
+
).optional()
|
|
1085
|
+
}).describe("Extended fields.").optional(),
|
|
1086
|
+
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
1087
|
+
}).describe("Modifier group to update.").optional(),
|
|
1088
|
+
mask: z.array(z.string()).optional()
|
|
1089
|
+
})
|
|
1090
|
+
).min(1).max(100),
|
|
1091
|
+
options: z.object({
|
|
1092
|
+
returnEntity: z.boolean().describe(
|
|
1093
|
+
"Whether to receive the updated modifier groups in the response."
|
|
1094
|
+
).optional()
|
|
1095
|
+
}).optional()
|
|
1096
|
+
});
|
|
1097
|
+
var BulkUpdateModifierGroupsResponse = z.object({
|
|
1098
|
+
results: z.array(
|
|
1099
|
+
z.object({
|
|
1100
|
+
itemMetadata: z.object({
|
|
1101
|
+
_id: z.string().describe(
|
|
1102
|
+
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
1103
|
+
).optional().nullable(),
|
|
1104
|
+
originalIndex: z.number().int().describe(
|
|
1105
|
+
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
1106
|
+
).optional(),
|
|
1107
|
+
success: z.boolean().describe(
|
|
1108
|
+
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
1109
|
+
).optional(),
|
|
1110
|
+
error: z.object({
|
|
1111
|
+
code: z.string().describe("Error code.").optional(),
|
|
1112
|
+
description: z.string().describe("Description of the error.").optional(),
|
|
1113
|
+
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
1114
|
+
}).describe("Details about the error in case of failure.").optional()
|
|
1115
|
+
}).describe("Metadata for group modifier update.").optional(),
|
|
1116
|
+
modifierGroup: z.object({
|
|
1117
|
+
_id: z.string().describe("Modifier group ID.").regex(
|
|
1118
|
+
/^[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}$/,
|
|
1119
|
+
"Must be a valid GUID"
|
|
1120
|
+
).optional().nullable(),
|
|
1121
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1122
|
+
"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."
|
|
1123
|
+
).optional().nullable(),
|
|
1124
|
+
_createdDate: z.date().describe("Date and time the modifier group was created.").optional().nullable(),
|
|
1125
|
+
_updatedDate: z.date().describe("Date and time the modifier group was updated.").optional().nullable(),
|
|
1126
|
+
name: z.string().describe("Modifier group name.").min(1).max(100).optional().nullable(),
|
|
1127
|
+
modifiers: z.array(
|
|
1128
|
+
z.object({
|
|
1129
|
+
_id: z.string().describe("Item modifier ID.").regex(
|
|
1130
|
+
/^[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}$/,
|
|
1131
|
+
"Must be a valid GUID"
|
|
1132
|
+
).optional(),
|
|
1133
|
+
preSelected: z.boolean().describe(
|
|
1134
|
+
"Whether the item modifier is pre-selected.\nDefault: `false`."
|
|
1135
|
+
).optional().nullable(),
|
|
1136
|
+
additionalChargeInfo: z.object({
|
|
1137
|
+
additionalCharge: z.string().describe(
|
|
1138
|
+
"Additional charge for the item modifier. A value of `0` means the item modifier is free."
|
|
1139
|
+
).optional().nullable()
|
|
1140
|
+
}).describe("Item modifier price details.").optional()
|
|
1141
|
+
})
|
|
1142
|
+
).min(0).max(500).optional(),
|
|
1143
|
+
rule: z.object({
|
|
1144
|
+
required: z.boolean().describe(
|
|
1145
|
+
"Whether the items from the modifier group must be selected."
|
|
1146
|
+
).optional().nullable(),
|
|
1147
|
+
minSelections: z.number().int().describe(
|
|
1148
|
+
"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`."
|
|
1149
|
+
).min(0).max(25).optional().nullable(),
|
|
1150
|
+
maxSelections: z.number().int().describe(
|
|
1151
|
+
"Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`."
|
|
1152
|
+
).min(0).max(25).optional().nullable()
|
|
1153
|
+
}).describe("Modifier group details.").optional(),
|
|
1154
|
+
extendedFields: z.object({
|
|
1155
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1156
|
+
"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)."
|
|
1157
|
+
).optional()
|
|
1158
|
+
}).describe("Extended fields.").optional(),
|
|
1159
|
+
businessLocationIds: z.array(z.string()).max(100).optional()
|
|
1160
|
+
}).describe(
|
|
1161
|
+
"Updated modifier group. Only returned if `returnEntity` is set to `true`."
|
|
1162
|
+
).optional()
|
|
1163
|
+
})
|
|
1164
|
+
).min(1).max(100).optional(),
|
|
1165
|
+
bulkActionMetadata: z.object({
|
|
1166
|
+
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
1167
|
+
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
1168
|
+
undetailedFailures: z.number().int().describe(
|
|
1169
|
+
"Number of failures without details because detailed failure threshold was exceeded."
|
|
1170
|
+
).optional()
|
|
1171
|
+
}).describe("Metadata for the API call.").optional()
|
|
1172
|
+
});
|
|
1173
|
+
var BulkDeleteModifierGroupsRequest = z.object({
|
|
1174
|
+
ids: z.array(z.string()).max(200)
|
|
1175
|
+
});
|
|
1176
|
+
var BulkDeleteModifierGroupsResponse = z.object({
|
|
1177
|
+
results: z.array(
|
|
1178
|
+
z.object({
|
|
1179
|
+
itemMetadata: z.object({
|
|
1180
|
+
_id: z.string().describe(
|
|
1181
|
+
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
1182
|
+
).optional().nullable(),
|
|
1183
|
+
originalIndex: z.number().int().describe(
|
|
1184
|
+
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
1185
|
+
).optional(),
|
|
1186
|
+
success: z.boolean().describe(
|
|
1187
|
+
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
1188
|
+
).optional(),
|
|
1189
|
+
error: z.object({
|
|
1190
|
+
code: z.string().describe("Error code.").optional(),
|
|
1191
|
+
description: z.string().describe("Description of the error.").optional(),
|
|
1192
|
+
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
1193
|
+
}).describe("Details about the error in case of failure.").optional()
|
|
1194
|
+
}).describe("Metadata for group modifier deletion.").optional()
|
|
1195
|
+
})
|
|
1196
|
+
).optional(),
|
|
1197
|
+
bulkActionMetadata: z.object({
|
|
1198
|
+
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
1199
|
+
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
1200
|
+
undetailedFailures: z.number().int().describe(
|
|
1201
|
+
"Number of failures without details because detailed failure threshold was exceeded."
|
|
1202
|
+
).optional()
|
|
1203
|
+
}).describe("Metadata for the API call.").optional()
|
|
1204
|
+
});
|
|
1205
|
+
|
|
1206
|
+
// src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.universal.ts
|
|
473
1207
|
import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
|
|
474
1208
|
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
475
1209
|
SortOrder2["ASC"] = "ASC";
|
|
@@ -485,7 +1219,10 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
485
1219
|
return WebhookIdentityType2;
|
|
486
1220
|
})(WebhookIdentityType || {});
|
|
487
1221
|
async function createModifierGroup2(modifierGroup) {
|
|
488
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
1222
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
1223
|
+
if (validateRequestSchema) {
|
|
1224
|
+
CreateModifierGroupRequest.parse({ modifierGroup });
|
|
1225
|
+
}
|
|
489
1226
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
490
1227
|
modifierGroup
|
|
491
1228
|
});
|
|
@@ -512,7 +1249,10 @@ async function createModifierGroup2(modifierGroup) {
|
|
|
512
1249
|
}
|
|
513
1250
|
}
|
|
514
1251
|
async function getModifierGroup2(modifierGroupId) {
|
|
515
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
1252
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
1253
|
+
if (validateRequestSchema) {
|
|
1254
|
+
GetModifierGroupRequest.parse({ modifierGroupId });
|
|
1255
|
+
}
|
|
516
1256
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
517
1257
|
modifierGroupId
|
|
518
1258
|
});
|
|
@@ -537,7 +1277,10 @@ async function getModifierGroup2(modifierGroupId) {
|
|
|
537
1277
|
}
|
|
538
1278
|
}
|
|
539
1279
|
async function listModifierGroups2(options) {
|
|
540
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
1280
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
1281
|
+
if (validateRequestSchema) {
|
|
1282
|
+
ListModifierGroupsRequest.parse({ options });
|
|
1283
|
+
}
|
|
541
1284
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
542
1285
|
modifierGroupIds: options?.modifierGroupIds,
|
|
543
1286
|
paging: options?.paging
|
|
@@ -615,7 +1358,10 @@ function queryModifierGroups2() {
|
|
|
615
1358
|
});
|
|
616
1359
|
}
|
|
617
1360
|
async function typedQueryModifierGroups(query) {
|
|
618
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
1361
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
1362
|
+
if (validateRequestSchema) {
|
|
1363
|
+
QueryModifierGroupsRequest.parse({ query });
|
|
1364
|
+
}
|
|
619
1365
|
const payload = renameKeysFromSDKRequestToRESTRequest({ query });
|
|
620
1366
|
const reqOpts = queryModifierGroups(
|
|
621
1367
|
payload
|
|
@@ -645,7 +1391,10 @@ var utils = {
|
|
|
645
1391
|
}
|
|
646
1392
|
};
|
|
647
1393
|
async function countModifierGroups2(options) {
|
|
648
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
1394
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
1395
|
+
if (validateRequestSchema) {
|
|
1396
|
+
CountModifierGroupsRequest.parse({ options });
|
|
1397
|
+
}
|
|
649
1398
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
650
1399
|
filter: options?.filter
|
|
651
1400
|
});
|
|
@@ -672,7 +1421,10 @@ async function countModifierGroups2(options) {
|
|
|
672
1421
|
}
|
|
673
1422
|
}
|
|
674
1423
|
async function updateModifierGroup2(_id, modifierGroup) {
|
|
675
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
1424
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
1425
|
+
if (validateRequestSchema) {
|
|
1426
|
+
UpdateModifierGroupRequest.parse({ _id, modifierGroup });
|
|
1427
|
+
}
|
|
676
1428
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
677
1429
|
modifierGroup: { ...modifierGroup, id: _id }
|
|
678
1430
|
});
|
|
@@ -699,7 +1451,10 @@ async function updateModifierGroup2(_id, modifierGroup) {
|
|
|
699
1451
|
}
|
|
700
1452
|
}
|
|
701
1453
|
async function deleteModifierGroup2(modifierGroupId) {
|
|
702
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
1454
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
1455
|
+
if (validateRequestSchema) {
|
|
1456
|
+
DeleteModifierGroupRequest.parse({ modifierGroupId });
|
|
1457
|
+
}
|
|
703
1458
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
704
1459
|
modifierGroupId
|
|
705
1460
|
});
|
|
@@ -725,7 +1480,10 @@ async function deleteModifierGroup2(modifierGroupId) {
|
|
|
725
1480
|
}
|
|
726
1481
|
}
|
|
727
1482
|
async function bulkCreateModifierGroups2(modifierGroups, options) {
|
|
728
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
1483
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
1484
|
+
if (validateRequestSchema) {
|
|
1485
|
+
BulkCreateModifierGroupsRequest.parse({ modifierGroups, options });
|
|
1486
|
+
}
|
|
729
1487
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
730
1488
|
modifierGroups,
|
|
731
1489
|
returnEntity: options?.returnEntity
|
|
@@ -756,7 +1514,10 @@ async function bulkCreateModifierGroups2(modifierGroups, options) {
|
|
|
756
1514
|
}
|
|
757
1515
|
}
|
|
758
1516
|
async function bulkUpdateModifierGroups2(modifierGroups, options) {
|
|
759
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
1517
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
1518
|
+
if (validateRequestSchema) {
|
|
1519
|
+
BulkUpdateModifierGroupsRequest.parse({ modifierGroups, options });
|
|
1520
|
+
}
|
|
760
1521
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
761
1522
|
modifierGroups,
|
|
762
1523
|
returnEntity: options?.returnEntity
|
|
@@ -787,7 +1548,10 @@ async function bulkUpdateModifierGroups2(modifierGroups, options) {
|
|
|
787
1548
|
}
|
|
788
1549
|
}
|
|
789
1550
|
async function bulkDeleteModifierGroups2(ids) {
|
|
790
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
1551
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
1552
|
+
if (validateRequestSchema) {
|
|
1553
|
+
BulkDeleteModifierGroupsRequest.parse({ ids });
|
|
1554
|
+
}
|
|
791
1555
|
const payload = renameKeysFromSDKRequestToRESTRequest({ ids });
|
|
792
1556
|
const reqOpts = bulkDeleteModifierGroups(
|
|
793
1557
|
payload
|