@wix/auto_sdk_restaurants_item-modifiers 1.0.65 → 1.0.66

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