@wix/auto_sdk_restaurants_item-modifiers 1.0.64 → 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.
@@ -462,6 +462,445 @@ function bulkDeleteModifiers(payload) {
462
462
 
463
463
  // src/restaurants-menus-v1-item-modifier-item-modifiers.universal.ts
464
464
  import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
465
+
466
+ // src/restaurants-menus-v1-item-modifier-item-modifiers.schemas.ts
467
+ import * as z from "zod";
468
+ var CreateModifierRequest = z.object({
469
+ modifier: z.object({
470
+ _id: z.string().describe("Item modifier ID.").regex(
471
+ /^[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}$/,
472
+ "Must be a valid GUID"
473
+ ).optional().nullable(),
474
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
475
+ "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."
476
+ ).optional().nullable(),
477
+ _createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
478
+ _updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
479
+ name: z.string().describe("Item modifier display name.").min(1).max(200),
480
+ extendedFields: z.object({
481
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
482
+ "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)."
483
+ ).optional()
484
+ }).describe("Extended fields.").optional(),
485
+ inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
486
+ businessLocationIds: z.array(z.string()).max(100).optional()
487
+ }).describe("Item modifier to create.")
488
+ });
489
+ var CreateModifierResponse = 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().nullable(),
494
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
495
+ "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."
496
+ ).optional().nullable(),
497
+ _createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
498
+ _updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
499
+ name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
500
+ extendedFields: z.object({
501
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
502
+ "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)."
503
+ ).optional()
504
+ }).describe("Extended fields.").optional(),
505
+ inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
506
+ businessLocationIds: z.array(z.string()).max(100).optional()
507
+ });
508
+ var GetModifierRequest = z.object({
509
+ modifierId: z.string().describe("ID of the item modifier to retrieve.").regex(
510
+ /^[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}$/,
511
+ "Must be a valid GUID"
512
+ )
513
+ });
514
+ var GetModifierResponse = z.object({
515
+ _id: z.string().describe("Item modifier ID.").regex(
516
+ /^[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}$/,
517
+ "Must be a valid GUID"
518
+ ).optional().nullable(),
519
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
520
+ "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."
521
+ ).optional().nullable(),
522
+ _createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
523
+ _updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
524
+ name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
525
+ extendedFields: z.object({
526
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
527
+ "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)."
528
+ ).optional()
529
+ }).describe("Extended fields.").optional(),
530
+ inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
531
+ businessLocationIds: z.array(z.string()).max(100).optional()
532
+ });
533
+ var ListModifiersRequest = z.object({
534
+ options: z.object({
535
+ modifierIds: z.array(z.string()).max(500).optional(),
536
+ paging: z.object({
537
+ limit: z.number().int().describe("Maximum number of items to load.").min(0).max(500).optional().nullable(),
538
+ cursor: z.string().describe(
539
+ "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."
540
+ ).optional().nullable()
541
+ }).describe("Metadata of the paginated results.").optional()
542
+ }).optional()
543
+ });
544
+ var ListModifiersResponse = z.object({
545
+ modifiers: z.array(
546
+ z.object({
547
+ _id: z.string().describe("Item modifier ID.").regex(
548
+ /^[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}$/,
549
+ "Must be a valid GUID"
550
+ ).optional().nullable(),
551
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
552
+ "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."
553
+ ).optional().nullable(),
554
+ _createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
555
+ _updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
556
+ name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
557
+ extendedFields: z.object({
558
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
559
+ "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)."
560
+ ).optional()
561
+ }).describe("Extended fields.").optional(),
562
+ inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
563
+ businessLocationIds: z.array(z.string()).max(100).optional()
564
+ })
565
+ ).optional(),
566
+ metadata: z.object({
567
+ count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
568
+ cursors: z.object({
569
+ next: z.string().describe("Cursor pointing to next page in the list of results.").optional().nullable(),
570
+ prev: z.string().describe(
571
+ "Cursor pointing to previous page in the list of results."
572
+ ).optional().nullable()
573
+ }).describe(
574
+ "Cursor pointing to the next page and the previous page in the list of results."
575
+ ).optional(),
576
+ hasNext: z.boolean().describe(
577
+ "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."
578
+ ).optional().nullable()
579
+ }).describe("Metadata of the paginated results.").optional()
580
+ });
581
+ var UpdateModifierRequest = z.object({
582
+ _id: z.string().describe("Item modifier ID.").regex(
583
+ /^[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}$/,
584
+ "Must be a valid GUID"
585
+ ),
586
+ modifier: 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
+ ),
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
+ }).describe("Item Modifier with updated properties.")
605
+ });
606
+ var UpdateModifierResponse = z.object({
607
+ _id: z.string().describe("Item modifier ID.").regex(
608
+ /^[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}$/,
609
+ "Must be a valid GUID"
610
+ ).optional().nullable(),
611
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
612
+ "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."
613
+ ).optional().nullable(),
614
+ _createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
615
+ _updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
616
+ name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
617
+ extendedFields: z.object({
618
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
619
+ "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)."
620
+ ).optional()
621
+ }).describe("Extended fields.").optional(),
622
+ inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
623
+ businessLocationIds: z.array(z.string()).max(100).optional()
624
+ });
625
+ var BulkCreateModifiersRequest = z.object({
626
+ modifiers: z.array(
627
+ z.object({
628
+ _id: z.string().describe("Item modifier ID.").regex(
629
+ /^[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}$/,
630
+ "Must be a valid GUID"
631
+ ).optional().nullable(),
632
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
633
+ "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."
634
+ ).optional().nullable(),
635
+ _createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
636
+ _updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
637
+ name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
638
+ extendedFields: z.object({
639
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
640
+ "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)."
641
+ ).optional()
642
+ }).describe("Extended fields.").optional(),
643
+ inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
644
+ businessLocationIds: z.array(z.string()).max(100).optional()
645
+ })
646
+ ).max(100),
647
+ options: z.object({
648
+ returnEntity: z.boolean().describe(
649
+ "Whether the created item modifiers are included in the response. <br />\nDefault: `false`."
650
+ ).optional()
651
+ }).optional()
652
+ });
653
+ var BulkCreateModifiersResponse = z.object({
654
+ results: z.array(
655
+ z.object({
656
+ itemMetadata: z.object({
657
+ _id: z.string().describe(
658
+ "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
659
+ ).optional().nullable(),
660
+ originalIndex: z.number().int().describe(
661
+ "Index of the item within the request array. Allows for correlation between request and response items."
662
+ ).optional(),
663
+ success: z.boolean().describe(
664
+ "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
665
+ ).optional(),
666
+ error: z.object({
667
+ code: z.string().describe("Error code.").optional(),
668
+ description: z.string().describe("Description of the error.").optional(),
669
+ data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
670
+ }).describe("Details about the error in case of failure.").optional()
671
+ }).describe("Metadata for creation of the item modifer.").optional(),
672
+ modifier: z.object({
673
+ _id: z.string().describe("Item modifier ID.").regex(
674
+ /^[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}$/,
675
+ "Must be a valid GUID"
676
+ ).optional().nullable(),
677
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
678
+ "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."
679
+ ).optional().nullable(),
680
+ _createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
681
+ _updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
682
+ name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
683
+ extendedFields: z.object({
684
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
685
+ "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)."
686
+ ).optional()
687
+ }).describe("Extended fields.").optional(),
688
+ inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
689
+ businessLocationIds: z.array(z.string()).max(100).optional()
690
+ }).describe("Created item modifier.").optional()
691
+ })
692
+ ).optional(),
693
+ bulkActionMetadata: z.object({
694
+ totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
695
+ totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
696
+ undetailedFailures: z.number().int().describe(
697
+ "Number of failures without details because detailed failure threshold was exceeded."
698
+ ).optional()
699
+ }).describe("Metadata for Bulk Create Modifiers API call.").optional()
700
+ });
701
+ var BulkUpdateModifiersRequest = z.object({
702
+ modifiers: z.array(
703
+ z.object({
704
+ modifier: z.object({
705
+ _id: z.string().describe("Item modifier ID.").regex(
706
+ /^[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}$/,
707
+ "Must be a valid GUID"
708
+ ).optional().nullable(),
709
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
710
+ "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."
711
+ ).optional().nullable(),
712
+ _createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
713
+ _updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
714
+ name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
715
+ extendedFields: z.object({
716
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
717
+ "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)."
718
+ ).optional()
719
+ }).describe("Extended fields.").optional(),
720
+ inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
721
+ businessLocationIds: z.array(z.string()).max(100).optional()
722
+ }).describe("Item modifier to update.").optional(),
723
+ mask: z.array(z.string()).optional()
724
+ })
725
+ ).min(1).max(100),
726
+ options: z.object({
727
+ returnEntity: z.boolean().describe(
728
+ "Whether the updated item modifiers are included in the response."
729
+ ).optional()
730
+ }).optional()
731
+ });
732
+ var BulkUpdateModifiersResponse = z.object({
733
+ results: z.array(
734
+ z.object({
735
+ itemMetadata: z.object({
736
+ _id: z.string().describe(
737
+ "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
738
+ ).optional().nullable(),
739
+ originalIndex: z.number().int().describe(
740
+ "Index of the item within the request array. Allows for correlation between request and response items."
741
+ ).optional(),
742
+ success: z.boolean().describe(
743
+ "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
744
+ ).optional(),
745
+ error: z.object({
746
+ code: z.string().describe("Error code.").optional(),
747
+ description: z.string().describe("Description of the error.").optional(),
748
+ data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
749
+ }).describe("Details about the error in case of failure.").optional()
750
+ }).describe("Metadata for the update of the item modifer.").optional(),
751
+ modifier: z.object({
752
+ _id: z.string().describe("Item modifier ID.").regex(
753
+ /^[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}$/,
754
+ "Must be a valid GUID"
755
+ ).optional().nullable(),
756
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
757
+ "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."
758
+ ).optional().nullable(),
759
+ _createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
760
+ _updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
761
+ name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
762
+ extendedFields: z.object({
763
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
764
+ "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)."
765
+ ).optional()
766
+ }).describe("Extended fields.").optional(),
767
+ inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
768
+ businessLocationIds: z.array(z.string()).max(100).optional()
769
+ }).describe("Updated item modifier.").optional()
770
+ })
771
+ ).min(1).max(100).optional(),
772
+ bulkActionMetadata: z.object({
773
+ totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
774
+ totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
775
+ undetailedFailures: z.number().int().describe(
776
+ "Number of failures without details because detailed failure threshold was exceeded."
777
+ ).optional()
778
+ }).describe("Metadata for Bulk Update Modifiers API call.").optional()
779
+ });
780
+ var DeleteModifierRequest = z.object({
781
+ modifierId: z.string().describe("ID of the item modifier to delete.").regex(
782
+ /^[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}$/,
783
+ "Must be a valid GUID"
784
+ )
785
+ });
786
+ var DeleteModifierResponse = z.object({});
787
+ var QueryModifiersRequest = z.object({
788
+ query: z.object({
789
+ filter: z.object({
790
+ _id: z.object({
791
+ $eq: z.string(),
792
+ $in: z.array(z.string()),
793
+ $ne: z.string(),
794
+ $nin: z.array(z.string())
795
+ }).partial().strict().optional(),
796
+ name: z.object({
797
+ $eq: z.string(),
798
+ $in: z.array(z.string()),
799
+ $ne: z.string(),
800
+ $nin: z.array(z.string())
801
+ }).partial().strict().optional(),
802
+ _createdDate: z.object({
803
+ $eq: z.string(),
804
+ $gt: z.string(),
805
+ $gte: z.string(),
806
+ $lt: z.string(),
807
+ $lte: z.string(),
808
+ $ne: z.string()
809
+ }).partial().strict().optional(),
810
+ _updatedDate: z.object({
811
+ $eq: z.string(),
812
+ $gt: z.string(),
813
+ $gte: z.string(),
814
+ $lt: z.string(),
815
+ $lte: z.string(),
816
+ $ne: z.string()
817
+ }).partial().strict().optional(),
818
+ $and: z.array(z.any()).optional(),
819
+ $or: z.array(z.any()).optional(),
820
+ $not: z.any().optional()
821
+ }).strict().optional(),
822
+ sort: z.array(z.object({})).optional()
823
+ }).catchall(z.any()).describe("Query options.")
824
+ });
825
+ var QueryModifiersResponse = z.object({
826
+ modifiers: z.array(
827
+ z.object({
828
+ _id: z.string().describe("Item modifier ID.").regex(
829
+ /^[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}$/,
830
+ "Must be a valid GUID"
831
+ ).optional().nullable(),
832
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
833
+ "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."
834
+ ).optional().nullable(),
835
+ _createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
836
+ _updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
837
+ name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
838
+ extendedFields: z.object({
839
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
840
+ "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)."
841
+ ).optional()
842
+ }).describe("Extended fields.").optional(),
843
+ inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
844
+ businessLocationIds: z.array(z.string()).max(100).optional()
845
+ })
846
+ ).optional(),
847
+ pagingMetadata: z.object({
848
+ count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
849
+ cursors: z.object({
850
+ next: z.string().describe("Cursor pointing to next page in the list of results.").optional().nullable(),
851
+ prev: z.string().describe(
852
+ "Cursor pointing to previous page in the list of results."
853
+ ).optional().nullable()
854
+ }).describe(
855
+ "Cursor pointing to the next page and the previous page in the list of results."
856
+ ).optional(),
857
+ hasNext: z.boolean().describe(
858
+ "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."
859
+ ).optional().nullable()
860
+ }).describe("Metadata of the paginated results.").optional()
861
+ });
862
+ var CountModifiersRequest = z.object({
863
+ options: z.object({
864
+ filter: z.record(z.string(), z.any()).describe("Filter for counting modifiers.").optional().nullable()
865
+ }).optional()
866
+ });
867
+ var CountModifiersResponse = z.object({
868
+ count: z.number().int().describe("Counted modifiers.").optional()
869
+ });
870
+ var BulkDeleteModifiersRequest = z.object({
871
+ ids: z.array(z.string()).max(200)
872
+ });
873
+ var BulkDeleteModifiersResponse = z.object({
874
+ results: z.array(
875
+ z.object({
876
+ itemMetadata: z.object({
877
+ _id: z.string().describe(
878
+ "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
879
+ ).optional().nullable(),
880
+ originalIndex: z.number().int().describe(
881
+ "Index of the item within the request array. Allows for correlation between request and response items."
882
+ ).optional(),
883
+ success: z.boolean().describe(
884
+ "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
885
+ ).optional(),
886
+ error: z.object({
887
+ code: z.string().describe("Error code.").optional(),
888
+ description: z.string().describe("Description of the error.").optional(),
889
+ data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
890
+ }).describe("Details about the error in case of failure.").optional()
891
+ }).describe("Metadata for modifiers deletion.").optional()
892
+ })
893
+ ).optional(),
894
+ bulkActionMetadata: z.object({
895
+ totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
896
+ totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
897
+ undetailedFailures: z.number().int().describe(
898
+ "Number of failures without details because detailed failure threshold was exceeded."
899
+ ).optional()
900
+ }).describe("Metadata for the API call.").optional()
901
+ });
902
+
903
+ // src/restaurants-menus-v1-item-modifier-item-modifiers.universal.ts
465
904
  import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
466
905
  var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
467
906
  SortOrder2["ASC"] = "ASC";
@@ -477,7 +916,10 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
477
916
  return WebhookIdentityType2;
478
917
  })(WebhookIdentityType || {});
479
918
  async function createModifier2(modifier) {
480
- const { httpClient, sideEffects } = arguments[1];
919
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
920
+ if (validateRequestSchema) {
921
+ CreateModifierRequest.parse({ modifier });
922
+ }
481
923
  const payload = renameKeysFromSDKRequestToRESTRequest({ modifier });
482
924
  const reqOpts = createModifier(payload);
483
925
  sideEffects?.onSiteCall?.();
@@ -500,7 +942,10 @@ async function createModifier2(modifier) {
500
942
  }
501
943
  }
502
944
  async function getModifier2(modifierId) {
503
- const { httpClient, sideEffects } = arguments[1];
945
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
946
+ if (validateRequestSchema) {
947
+ GetModifierRequest.parse({ modifierId });
948
+ }
504
949
  const payload = renameKeysFromSDKRequestToRESTRequest({
505
950
  modifierId
506
951
  });
@@ -525,7 +970,10 @@ async function getModifier2(modifierId) {
525
970
  }
526
971
  }
527
972
  async function listModifiers2(options) {
528
- const { httpClient, sideEffects } = arguments[1];
973
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
974
+ if (validateRequestSchema) {
975
+ ListModifiersRequest.parse({ options });
976
+ }
529
977
  const payload = renameKeysFromSDKRequestToRESTRequest({
530
978
  modifierIds: options?.modifierIds,
531
979
  paging: options?.paging
@@ -554,7 +1002,10 @@ async function listModifiers2(options) {
554
1002
  }
555
1003
  }
556
1004
  async function updateModifier2(_id, modifier) {
557
- const { httpClient, sideEffects } = arguments[2];
1005
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1006
+ if (validateRequestSchema) {
1007
+ UpdateModifierRequest.parse({ _id, modifier });
1008
+ }
558
1009
  const payload = renameKeysFromSDKRequestToRESTRequest({
559
1010
  modifier: { ...modifier, id: _id }
560
1011
  });
@@ -579,7 +1030,10 @@ async function updateModifier2(_id, modifier) {
579
1030
  }
580
1031
  }
581
1032
  async function bulkCreateModifiers2(modifiers, options) {
582
- const { httpClient, sideEffects } = arguments[2];
1033
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1034
+ if (validateRequestSchema) {
1035
+ BulkCreateModifiersRequest.parse({ modifiers, options });
1036
+ }
583
1037
  const payload = renameKeysFromSDKRequestToRESTRequest({
584
1038
  modifiers,
585
1039
  returnEntity: options?.returnEntity
@@ -608,7 +1062,10 @@ async function bulkCreateModifiers2(modifiers, options) {
608
1062
  }
609
1063
  }
610
1064
  async function bulkUpdateModifiers2(modifiers, options) {
611
- const { httpClient, sideEffects } = arguments[2];
1065
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1066
+ if (validateRequestSchema) {
1067
+ BulkUpdateModifiersRequest.parse({ modifiers, options });
1068
+ }
612
1069
  const payload = renameKeysFromSDKRequestToRESTRequest({
613
1070
  modifiers,
614
1071
  returnEntity: options?.returnEntity
@@ -637,7 +1094,10 @@ async function bulkUpdateModifiers2(modifiers, options) {
637
1094
  }
638
1095
  }
639
1096
  async function deleteModifier2(modifierId) {
640
- const { httpClient, sideEffects } = arguments[1];
1097
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1098
+ if (validateRequestSchema) {
1099
+ DeleteModifierRequest.parse({ modifierId });
1100
+ }
641
1101
  const payload = renameKeysFromSDKRequestToRESTRequest({
642
1102
  modifierId
643
1103
  });
@@ -704,7 +1164,10 @@ function queryModifiers2() {
704
1164
  });
705
1165
  }
706
1166
  async function typedQueryModifiers(query) {
707
- const { httpClient, sideEffects } = arguments[1];
1167
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1168
+ if (validateRequestSchema) {
1169
+ QueryModifiersRequest.parse({ query });
1170
+ }
708
1171
  const payload = renameKeysFromSDKRequestToRESTRequest({ query });
709
1172
  const reqOpts = queryModifiers(payload);
710
1173
  sideEffects?.onSiteCall?.();
@@ -732,7 +1195,10 @@ var utils = {
732
1195
  }
733
1196
  };
734
1197
  async function countModifiers2(options) {
735
- const { httpClient, sideEffects } = arguments[1];
1198
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1199
+ if (validateRequestSchema) {
1200
+ CountModifiersRequest.parse({ options });
1201
+ }
736
1202
  const payload = renameKeysFromSDKRequestToRESTRequest({
737
1203
  filter: options?.filter
738
1204
  });
@@ -757,7 +1223,10 @@ async function countModifiers2(options) {
757
1223
  }
758
1224
  }
759
1225
  async function bulkDeleteModifiers2(ids) {
760
- const { httpClient, sideEffects } = arguments[1];
1226
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1227
+ if (validateRequestSchema) {
1228
+ BulkDeleteModifiersRequest.parse({ ids });
1229
+ }
761
1230
  const payload = renameKeysFromSDKRequestToRESTRequest({ ids });
762
1231
  const reqOpts = bulkDeleteModifiers(payload);
763
1232
  sideEffects?.onSiteCall?.();
@@ -781,83 +1250,83 @@ async function bulkDeleteModifiers2(ids) {
781
1250
  }
782
1251
 
783
1252
  // src/restaurants-menus-v1-item-modifier-item-modifiers.public.ts
784
- function createModifier3(httpClient) {
1253
+ function createModifier3(httpClient, __options) {
785
1254
  return (modifier) => createModifier2(
786
1255
  modifier,
787
1256
  // @ts-ignore
788
- { httpClient }
1257
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
789
1258
  );
790
1259
  }
791
- function getModifier3(httpClient) {
1260
+ function getModifier3(httpClient, __options) {
792
1261
  return (modifierId) => getModifier2(
793
1262
  modifierId,
794
1263
  // @ts-ignore
795
- { httpClient }
1264
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
796
1265
  );
797
1266
  }
798
- function listModifiers3(httpClient) {
1267
+ function listModifiers3(httpClient, __options) {
799
1268
  return (options) => listModifiers2(
800
1269
  options,
801
1270
  // @ts-ignore
802
- { httpClient }
1271
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
803
1272
  );
804
1273
  }
805
- function updateModifier3(httpClient) {
1274
+ function updateModifier3(httpClient, __options) {
806
1275
  return (_id, modifier) => updateModifier2(
807
1276
  _id,
808
1277
  modifier,
809
1278
  // @ts-ignore
810
- { httpClient }
1279
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
811
1280
  );
812
1281
  }
813
- function bulkCreateModifiers3(httpClient) {
1282
+ function bulkCreateModifiers3(httpClient, __options) {
814
1283
  return (modifiers, options) => bulkCreateModifiers2(
815
1284
  modifiers,
816
1285
  options,
817
1286
  // @ts-ignore
818
- { httpClient }
1287
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
819
1288
  );
820
1289
  }
821
- function bulkUpdateModifiers3(httpClient) {
1290
+ function bulkUpdateModifiers3(httpClient, __options) {
822
1291
  return (modifiers, options) => bulkUpdateModifiers2(
823
1292
  modifiers,
824
1293
  options,
825
1294
  // @ts-ignore
826
- { httpClient }
1295
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
827
1296
  );
828
1297
  }
829
- function deleteModifier3(httpClient) {
1298
+ function deleteModifier3(httpClient, __options) {
830
1299
  return (modifierId) => deleteModifier2(
831
1300
  modifierId,
832
1301
  // @ts-ignore
833
- { httpClient }
1302
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
834
1303
  );
835
1304
  }
836
- function queryModifiers3(httpClient) {
1305
+ function queryModifiers3(httpClient, __options) {
837
1306
  return () => queryModifiers2(
838
1307
  // @ts-ignore
839
- { httpClient }
1308
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
840
1309
  );
841
1310
  }
842
- function typedQueryModifiers2(httpClient) {
1311
+ function typedQueryModifiers2(httpClient, __options) {
843
1312
  return (query) => typedQueryModifiers(
844
1313
  query,
845
1314
  // @ts-ignore
846
- { httpClient }
1315
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
847
1316
  );
848
1317
  }
849
- function countModifiers3(httpClient) {
1318
+ function countModifiers3(httpClient, __options) {
850
1319
  return (options) => countModifiers2(
851
1320
  options,
852
1321
  // @ts-ignore
853
- { httpClient }
1322
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
854
1323
  );
855
1324
  }
856
- function bulkDeleteModifiers3(httpClient) {
1325
+ function bulkDeleteModifiers3(httpClient, __options) {
857
1326
  return (ids) => bulkDeleteModifiers2(
858
1327
  ids,
859
1328
  // @ts-ignore
860
- { httpClient }
1329
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
861
1330
  );
862
1331
  }
863
1332
  var onItemModifierCreated = EventDefinition(