@wix/auto_sdk_restaurants_item-modifiers 1.0.66 → 1.0.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
17
15
  }
18
16
  return to;
19
17
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
19
 
30
20
  // index.ts
@@ -510,445 +500,6 @@ function bulkDeleteModifiers(payload) {
510
500
 
511
501
  // src/restaurants-menus-v1-item-modifier-item-modifiers.universal.ts
512
502
  var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
513
-
514
- // src/restaurants-menus-v1-item-modifier-item-modifiers.schemas.ts
515
- var z = __toESM(require("zod"));
516
- var CreateModifierRequest = z.object({
517
- modifier: z.object({
518
- _id: z.string().describe("Item modifier ID.").regex(
519
- /^[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}$/,
520
- "Must be a valid GUID"
521
- ).optional().nullable(),
522
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
523
- "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."
524
- ).optional().nullable(),
525
- _createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
526
- _updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
527
- name: z.string().describe("Item modifier display name.").min(1).max(200),
528
- extendedFields: z.object({
529
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
530
- "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)."
531
- ).optional()
532
- }).describe("Extended fields.").optional(),
533
- inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
534
- businessLocationIds: z.array(z.string()).max(100).optional()
535
- }).describe("Item modifier to create.")
536
- });
537
- var CreateModifierResponse = z.object({
538
- _id: z.string().describe("Item modifier ID.").regex(
539
- /^[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}$/,
540
- "Must be a valid GUID"
541
- ).optional().nullable(),
542
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
543
- "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."
544
- ).optional().nullable(),
545
- _createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
546
- _updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
547
- name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
548
- extendedFields: z.object({
549
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
550
- "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)."
551
- ).optional()
552
- }).describe("Extended fields.").optional(),
553
- inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
554
- businessLocationIds: z.array(z.string()).max(100).optional()
555
- });
556
- var GetModifierRequest = z.object({
557
- modifierId: z.string().describe("ID of the item modifier to retrieve.").regex(
558
- /^[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}$/,
559
- "Must be a valid GUID"
560
- )
561
- });
562
- var GetModifierResponse = z.object({
563
- _id: z.string().describe("Item modifier ID.").regex(
564
- /^[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}$/,
565
- "Must be a valid GUID"
566
- ).optional().nullable(),
567
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
568
- "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."
569
- ).optional().nullable(),
570
- _createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
571
- _updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
572
- name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
573
- extendedFields: z.object({
574
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
575
- "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)."
576
- ).optional()
577
- }).describe("Extended fields.").optional(),
578
- inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
579
- businessLocationIds: z.array(z.string()).max(100).optional()
580
- });
581
- var ListModifiersRequest = z.object({
582
- options: z.object({
583
- modifierIds: z.array(z.string()).max(500).optional(),
584
- paging: z.object({
585
- limit: z.number().int().describe("Maximum number of items to load.").min(0).max(500).optional().nullable(),
586
- cursor: z.string().describe(
587
- "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."
588
- ).optional().nullable()
589
- }).describe("Metadata of the paginated results.").optional()
590
- }).optional()
591
- });
592
- var ListModifiersResponse = z.object({
593
- modifiers: z.array(
594
- z.object({
595
- _id: z.string().describe("Item modifier ID.").regex(
596
- /^[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}$/,
597
- "Must be a valid GUID"
598
- ).optional().nullable(),
599
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
600
- "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."
601
- ).optional().nullable(),
602
- _createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
603
- _updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
604
- name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
605
- extendedFields: z.object({
606
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
607
- "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)."
608
- ).optional()
609
- }).describe("Extended fields.").optional(),
610
- inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
611
- businessLocationIds: z.array(z.string()).max(100).optional()
612
- })
613
- ).optional(),
614
- metadata: z.object({
615
- count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
616
- cursors: z.object({
617
- next: z.string().describe("Cursor pointing to next page in the list of results.").optional().nullable(),
618
- prev: z.string().describe(
619
- "Cursor pointing to previous page in the list of results."
620
- ).optional().nullable()
621
- }).describe(
622
- "Cursor pointing to the next page and the previous page in the list of results."
623
- ).optional(),
624
- hasNext: z.boolean().describe(
625
- "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."
626
- ).optional().nullable()
627
- }).describe("Metadata of the paginated results.").optional()
628
- });
629
- var UpdateModifierRequest = z.object({
630
- _id: z.string().describe("Item modifier ID.").regex(
631
- /^[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}$/,
632
- "Must be a valid GUID"
633
- ),
634
- modifier: z.object({
635
- _id: z.string().describe("Item modifier ID.").regex(
636
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
637
- "Must be a valid GUID"
638
- ).optional().nullable(),
639
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
640
- "Revision number, which increments by 1 each time the 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."
641
- ),
642
- _createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
643
- _updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
644
- name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
645
- extendedFields: z.object({
646
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
647
- "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)."
648
- ).optional()
649
- }).describe("Extended fields.").optional(),
650
- inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
651
- businessLocationIds: z.array(z.string()).max(100).optional()
652
- }).describe("Item Modifier with updated properties.")
653
- });
654
- var UpdateModifierResponse = z.object({
655
- _id: z.string().describe("Item modifier ID.").regex(
656
- /^[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}$/,
657
- "Must be a valid GUID"
658
- ).optional().nullable(),
659
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
660
- "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."
661
- ).optional().nullable(),
662
- _createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
663
- _updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
664
- name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
665
- extendedFields: z.object({
666
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
667
- "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)."
668
- ).optional()
669
- }).describe("Extended fields.").optional(),
670
- inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
671
- businessLocationIds: z.array(z.string()).max(100).optional()
672
- });
673
- var BulkCreateModifiersRequest = z.object({
674
- modifiers: z.array(
675
- z.object({
676
- _id: z.string().describe("Item modifier ID.").regex(
677
- /^[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}$/,
678
- "Must be a valid GUID"
679
- ).optional().nullable(),
680
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
681
- "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."
682
- ).optional().nullable(),
683
- _createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
684
- _updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
685
- name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
686
- extendedFields: z.object({
687
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
688
- "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)."
689
- ).optional()
690
- }).describe("Extended fields.").optional(),
691
- inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
692
- businessLocationIds: z.array(z.string()).max(100).optional()
693
- })
694
- ).max(100),
695
- options: z.object({
696
- returnEntity: z.boolean().describe(
697
- "Whether the created item modifiers are included in the response. <br />\nDefault: `false`."
698
- ).optional()
699
- }).optional()
700
- });
701
- var BulkCreateModifiersResponse = z.object({
702
- results: z.array(
703
- z.object({
704
- itemMetadata: z.object({
705
- _id: z.string().describe(
706
- "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
707
- ).optional().nullable(),
708
- originalIndex: z.number().int().describe(
709
- "Index of the item within the request array. Allows for correlation between request and response items."
710
- ).optional(),
711
- success: z.boolean().describe(
712
- "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
713
- ).optional(),
714
- error: z.object({
715
- code: z.string().describe("Error code.").optional(),
716
- description: z.string().describe("Description of the error.").optional(),
717
- data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
718
- }).describe("Details about the error in case of failure.").optional()
719
- }).describe("Metadata for creation of the item modifer.").optional(),
720
- modifier: z.object({
721
- _id: z.string().describe("Item modifier ID.").regex(
722
- /^[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}$/,
723
- "Must be a valid GUID"
724
- ).optional().nullable(),
725
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
726
- "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."
727
- ).optional().nullable(),
728
- _createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
729
- _updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
730
- name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
731
- extendedFields: z.object({
732
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
733
- "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)."
734
- ).optional()
735
- }).describe("Extended fields.").optional(),
736
- inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
737
- businessLocationIds: z.array(z.string()).max(100).optional()
738
- }).describe("Created item modifier.").optional()
739
- })
740
- ).optional(),
741
- bulkActionMetadata: z.object({
742
- totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
743
- totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
744
- undetailedFailures: z.number().int().describe(
745
- "Number of failures without details because detailed failure threshold was exceeded."
746
- ).optional()
747
- }).describe("Metadata for Bulk Create Modifiers API call.").optional()
748
- });
749
- var BulkUpdateModifiersRequest = z.object({
750
- modifiers: z.array(
751
- z.object({
752
- modifier: z.object({
753
- _id: z.string().describe("Item modifier ID.").regex(
754
- /^[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}$/,
755
- "Must be a valid GUID"
756
- ).optional().nullable(),
757
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
758
- "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."
759
- ).optional().nullable(),
760
- _createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
761
- _updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
762
- name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
763
- extendedFields: z.object({
764
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
765
- "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)."
766
- ).optional()
767
- }).describe("Extended fields.").optional(),
768
- inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
769
- businessLocationIds: z.array(z.string()).max(100).optional()
770
- }).describe("Item modifier to update.").optional(),
771
- mask: z.array(z.string()).optional()
772
- })
773
- ).min(1).max(100),
774
- options: z.object({
775
- returnEntity: z.boolean().describe(
776
- "Whether the updated item modifiers are included in the response."
777
- ).optional()
778
- }).optional()
779
- });
780
- var BulkUpdateModifiersResponse = z.object({
781
- results: z.array(
782
- z.object({
783
- itemMetadata: z.object({
784
- _id: z.string().describe(
785
- "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
786
- ).optional().nullable(),
787
- originalIndex: z.number().int().describe(
788
- "Index of the item within the request array. Allows for correlation between request and response items."
789
- ).optional(),
790
- success: z.boolean().describe(
791
- "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
792
- ).optional(),
793
- error: z.object({
794
- code: z.string().describe("Error code.").optional(),
795
- description: z.string().describe("Description of the error.").optional(),
796
- data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
797
- }).describe("Details about the error in case of failure.").optional()
798
- }).describe("Metadata for the update of the item modifer.").optional(),
799
- modifier: z.object({
800
- _id: z.string().describe("Item modifier ID.").regex(
801
- /^[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}$/,
802
- "Must be a valid GUID"
803
- ).optional().nullable(),
804
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
805
- "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."
806
- ).optional().nullable(),
807
- _createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
808
- _updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
809
- name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
810
- extendedFields: z.object({
811
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
812
- "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)."
813
- ).optional()
814
- }).describe("Extended fields.").optional(),
815
- inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
816
- businessLocationIds: z.array(z.string()).max(100).optional()
817
- }).describe("Updated item modifier.").optional()
818
- })
819
- ).min(1).max(100).optional(),
820
- bulkActionMetadata: z.object({
821
- totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
822
- totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
823
- undetailedFailures: z.number().int().describe(
824
- "Number of failures without details because detailed failure threshold was exceeded."
825
- ).optional()
826
- }).describe("Metadata for Bulk Update Modifiers API call.").optional()
827
- });
828
- var DeleteModifierRequest = z.object({
829
- modifierId: z.string().describe("ID of the item modifier to delete.").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
- )
833
- });
834
- var DeleteModifierResponse = z.object({});
835
- var QueryModifiersRequest = z.object({
836
- query: z.object({
837
- filter: z.object({
838
- _id: z.object({
839
- $eq: z.string(),
840
- $in: z.array(z.string()),
841
- $ne: z.string(),
842
- $nin: z.array(z.string())
843
- }).partial().strict().optional(),
844
- name: z.object({
845
- $eq: z.string(),
846
- $in: z.array(z.string()),
847
- $ne: z.string(),
848
- $nin: z.array(z.string())
849
- }).partial().strict().optional(),
850
- _createdDate: 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
- _updatedDate: z.object({
859
- $eq: z.string(),
860
- $gt: z.string(),
861
- $gte: z.string(),
862
- $lt: z.string(),
863
- $lte: z.string(),
864
- $ne: z.string()
865
- }).partial().strict().optional(),
866
- $and: z.array(z.any()).optional(),
867
- $or: z.array(z.any()).optional(),
868
- $not: z.any().optional()
869
- }).strict().optional(),
870
- sort: z.array(z.object({})).optional()
871
- }).catchall(z.any()).describe("Query options.")
872
- });
873
- var QueryModifiersResponse = z.object({
874
- modifiers: z.array(
875
- z.object({
876
- _id: z.string().describe("Item modifier ID.").regex(
877
- /^[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}$/,
878
- "Must be a valid GUID"
879
- ).optional().nullable(),
880
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
881
- "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."
882
- ).optional().nullable(),
883
- _createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
884
- _updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
885
- name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
886
- extendedFields: z.object({
887
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
888
- "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)."
889
- ).optional()
890
- }).describe("Extended fields.").optional(),
891
- inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
892
- businessLocationIds: z.array(z.string()).max(100).optional()
893
- })
894
- ).optional(),
895
- pagingMetadata: z.object({
896
- count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
897
- cursors: z.object({
898
- next: z.string().describe("Cursor pointing to next page in the list of results.").optional().nullable(),
899
- prev: z.string().describe(
900
- "Cursor pointing to previous page in the list of results."
901
- ).optional().nullable()
902
- }).describe(
903
- "Cursor pointing to the next page and the previous page in the list of results."
904
- ).optional(),
905
- hasNext: z.boolean().describe(
906
- "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."
907
- ).optional().nullable()
908
- }).describe("Metadata of the paginated results.").optional()
909
- });
910
- var CountModifiersRequest = z.object({
911
- options: z.object({
912
- filter: z.record(z.string(), z.any()).describe("Filter for counting modifiers.").optional().nullable()
913
- }).optional()
914
- });
915
- var CountModifiersResponse = z.object({
916
- count: z.number().int().describe("Counted modifiers.").optional()
917
- });
918
- var BulkDeleteModifiersRequest = z.object({
919
- ids: z.array(z.string()).max(200)
920
- });
921
- var BulkDeleteModifiersResponse = z.object({
922
- results: z.array(
923
- z.object({
924
- itemMetadata: z.object({
925
- _id: z.string().describe(
926
- "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
927
- ).optional().nullable(),
928
- originalIndex: z.number().int().describe(
929
- "Index of the item within the request array. Allows for correlation between request and response items."
930
- ).optional(),
931
- success: z.boolean().describe(
932
- "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
933
- ).optional(),
934
- error: z.object({
935
- code: z.string().describe("Error code.").optional(),
936
- description: z.string().describe("Description of the error.").optional(),
937
- data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
938
- }).describe("Details about the error in case of failure.").optional()
939
- }).describe("Metadata for modifiers deletion.").optional()
940
- })
941
- ).optional(),
942
- bulkActionMetadata: z.object({
943
- totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
944
- totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
945
- undetailedFailures: z.number().int().describe(
946
- "Number of failures without details because detailed failure threshold was exceeded."
947
- ).optional()
948
- }).describe("Metadata for the API call.").optional()
949
- });
950
-
951
- // src/restaurants-menus-v1-item-modifier-item-modifiers.universal.ts
952
503
  var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
953
504
  var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
954
505
  SortOrder2["ASC"] = "ASC";
@@ -964,10 +515,7 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
964
515
  return WebhookIdentityType2;
965
516
  })(WebhookIdentityType || {});
966
517
  async function createModifier2(modifier) {
967
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
968
- if (validateRequestSchema) {
969
- CreateModifierRequest.parse({ modifier });
970
- }
518
+ const { httpClient, sideEffects } = arguments[1];
971
519
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ modifier });
972
520
  const reqOpts = createModifier(payload);
973
521
  sideEffects?.onSiteCall?.();
@@ -990,10 +538,7 @@ async function createModifier2(modifier) {
990
538
  }
991
539
  }
992
540
  async function getModifier2(modifierId) {
993
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
994
- if (validateRequestSchema) {
995
- GetModifierRequest.parse({ modifierId });
996
- }
541
+ const { httpClient, sideEffects } = arguments[1];
997
542
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
998
543
  modifierId
999
544
  });
@@ -1018,10 +563,7 @@ async function getModifier2(modifierId) {
1018
563
  }
1019
564
  }
1020
565
  async function listModifiers2(options) {
1021
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1022
- if (validateRequestSchema) {
1023
- ListModifiersRequest.parse({ options });
1024
- }
566
+ const { httpClient, sideEffects } = arguments[1];
1025
567
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1026
568
  modifierIds: options?.modifierIds,
1027
569
  paging: options?.paging
@@ -1050,10 +592,7 @@ async function listModifiers2(options) {
1050
592
  }
1051
593
  }
1052
594
  async function updateModifier2(_id, modifier) {
1053
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1054
- if (validateRequestSchema) {
1055
- UpdateModifierRequest.parse({ _id, modifier });
1056
- }
595
+ const { httpClient, sideEffects } = arguments[2];
1057
596
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1058
597
  modifier: { ...modifier, id: _id }
1059
598
  });
@@ -1078,10 +617,7 @@ async function updateModifier2(_id, modifier) {
1078
617
  }
1079
618
  }
1080
619
  async function bulkCreateModifiers2(modifiers, options) {
1081
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1082
- if (validateRequestSchema) {
1083
- BulkCreateModifiersRequest.parse({ modifiers, options });
1084
- }
620
+ const { httpClient, sideEffects } = arguments[2];
1085
621
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1086
622
  modifiers,
1087
623
  returnEntity: options?.returnEntity
@@ -1110,10 +646,7 @@ async function bulkCreateModifiers2(modifiers, options) {
1110
646
  }
1111
647
  }
1112
648
  async function bulkUpdateModifiers2(modifiers, options) {
1113
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1114
- if (validateRequestSchema) {
1115
- BulkUpdateModifiersRequest.parse({ modifiers, options });
1116
- }
649
+ const { httpClient, sideEffects } = arguments[2];
1117
650
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1118
651
  modifiers,
1119
652
  returnEntity: options?.returnEntity
@@ -1142,10 +675,7 @@ async function bulkUpdateModifiers2(modifiers, options) {
1142
675
  }
1143
676
  }
1144
677
  async function deleteModifier2(modifierId) {
1145
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1146
- if (validateRequestSchema) {
1147
- DeleteModifierRequest.parse({ modifierId });
1148
- }
678
+ const { httpClient, sideEffects } = arguments[1];
1149
679
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1150
680
  modifierId
1151
681
  });
@@ -1212,10 +742,7 @@ function queryModifiers2() {
1212
742
  });
1213
743
  }
1214
744
  async function typedQueryModifiers(query) {
1215
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1216
- if (validateRequestSchema) {
1217
- QueryModifiersRequest.parse({ query });
1218
- }
745
+ const { httpClient, sideEffects } = arguments[1];
1219
746
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
1220
747
  const reqOpts = queryModifiers(payload);
1221
748
  sideEffects?.onSiteCall?.();
@@ -1243,10 +770,7 @@ var utils = {
1243
770
  }
1244
771
  };
1245
772
  async function countModifiers2(options) {
1246
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1247
- if (validateRequestSchema) {
1248
- CountModifiersRequest.parse({ options });
1249
- }
773
+ const { httpClient, sideEffects } = arguments[1];
1250
774
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1251
775
  filter: options?.filter
1252
776
  });
@@ -1271,10 +795,7 @@ async function countModifiers2(options) {
1271
795
  }
1272
796
  }
1273
797
  async function bulkDeleteModifiers2(ids) {
1274
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1275
- if (validateRequestSchema) {
1276
- BulkDeleteModifiersRequest.parse({ ids });
1277
- }
798
+ const { httpClient, sideEffects } = arguments[1];
1278
799
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ ids });
1279
800
  const reqOpts = bulkDeleteModifiers(payload);
1280
801
  sideEffects?.onSiteCall?.();
@@ -1298,83 +819,83 @@ async function bulkDeleteModifiers2(ids) {
1298
819
  }
1299
820
 
1300
821
  // src/restaurants-menus-v1-item-modifier-item-modifiers.public.ts
1301
- function createModifier3(httpClient, __options) {
822
+ function createModifier3(httpClient) {
1302
823
  return (modifier) => createModifier2(
1303
824
  modifier,
1304
825
  // @ts-ignore
1305
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
826
+ { httpClient }
1306
827
  );
1307
828
  }
1308
- function getModifier3(httpClient, __options) {
829
+ function getModifier3(httpClient) {
1309
830
  return (modifierId) => getModifier2(
1310
831
  modifierId,
1311
832
  // @ts-ignore
1312
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
833
+ { httpClient }
1313
834
  );
1314
835
  }
1315
- function listModifiers3(httpClient, __options) {
836
+ function listModifiers3(httpClient) {
1316
837
  return (options) => listModifiers2(
1317
838
  options,
1318
839
  // @ts-ignore
1319
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
840
+ { httpClient }
1320
841
  );
1321
842
  }
1322
- function updateModifier3(httpClient, __options) {
843
+ function updateModifier3(httpClient) {
1323
844
  return (_id, modifier) => updateModifier2(
1324
845
  _id,
1325
846
  modifier,
1326
847
  // @ts-ignore
1327
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
848
+ { httpClient }
1328
849
  );
1329
850
  }
1330
- function bulkCreateModifiers3(httpClient, __options) {
851
+ function bulkCreateModifiers3(httpClient) {
1331
852
  return (modifiers, options) => bulkCreateModifiers2(
1332
853
  modifiers,
1333
854
  options,
1334
855
  // @ts-ignore
1335
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
856
+ { httpClient }
1336
857
  );
1337
858
  }
1338
- function bulkUpdateModifiers3(httpClient, __options) {
859
+ function bulkUpdateModifiers3(httpClient) {
1339
860
  return (modifiers, options) => bulkUpdateModifiers2(
1340
861
  modifiers,
1341
862
  options,
1342
863
  // @ts-ignore
1343
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
864
+ { httpClient }
1344
865
  );
1345
866
  }
1346
- function deleteModifier3(httpClient, __options) {
867
+ function deleteModifier3(httpClient) {
1347
868
  return (modifierId) => deleteModifier2(
1348
869
  modifierId,
1349
870
  // @ts-ignore
1350
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
871
+ { httpClient }
1351
872
  );
1352
873
  }
1353
- function queryModifiers3(httpClient, __options) {
874
+ function queryModifiers3(httpClient) {
1354
875
  return () => queryModifiers2(
1355
876
  // @ts-ignore
1356
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
877
+ { httpClient }
1357
878
  );
1358
879
  }
1359
- function typedQueryModifiers2(httpClient, __options) {
880
+ function typedQueryModifiers2(httpClient) {
1360
881
  return (query) => typedQueryModifiers(
1361
882
  query,
1362
883
  // @ts-ignore
1363
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
884
+ { httpClient }
1364
885
  );
1365
886
  }
1366
- function countModifiers3(httpClient, __options) {
887
+ function countModifiers3(httpClient) {
1367
888
  return (options) => countModifiers2(
1368
889
  options,
1369
890
  // @ts-ignore
1370
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
891
+ { httpClient }
1371
892
  );
1372
893
  }
1373
- function bulkDeleteModifiers3(httpClient, __options) {
894
+ function bulkDeleteModifiers3(httpClient) {
1374
895
  return (ids) => bulkDeleteModifiers2(
1375
896
  ids,
1376
897
  // @ts-ignore
1377
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
898
+ { httpClient }
1378
899
  );
1379
900
  }
1380
901
  var onItemModifierCreated = (0, import_sdk_types.EventDefinition)(