@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.
@@ -462,445 +462,6 @@ 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
904
465
  import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
905
466
  var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
906
467
  SortOrder2["ASC"] = "ASC";
@@ -916,10 +477,7 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
916
477
  return WebhookIdentityType2;
917
478
  })(WebhookIdentityType || {});
918
479
  async function createModifier2(modifier) {
919
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
920
- if (validateRequestSchema) {
921
- CreateModifierRequest.parse({ modifier });
922
- }
480
+ const { httpClient, sideEffects } = arguments[1];
923
481
  const payload = renameKeysFromSDKRequestToRESTRequest({ modifier });
924
482
  const reqOpts = createModifier(payload);
925
483
  sideEffects?.onSiteCall?.();
@@ -942,10 +500,7 @@ async function createModifier2(modifier) {
942
500
  }
943
501
  }
944
502
  async function getModifier2(modifierId) {
945
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
946
- if (validateRequestSchema) {
947
- GetModifierRequest.parse({ modifierId });
948
- }
503
+ const { httpClient, sideEffects } = arguments[1];
949
504
  const payload = renameKeysFromSDKRequestToRESTRequest({
950
505
  modifierId
951
506
  });
@@ -970,10 +525,7 @@ async function getModifier2(modifierId) {
970
525
  }
971
526
  }
972
527
  async function listModifiers2(options) {
973
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
974
- if (validateRequestSchema) {
975
- ListModifiersRequest.parse({ options });
976
- }
528
+ const { httpClient, sideEffects } = arguments[1];
977
529
  const payload = renameKeysFromSDKRequestToRESTRequest({
978
530
  modifierIds: options?.modifierIds,
979
531
  paging: options?.paging
@@ -1002,10 +554,7 @@ async function listModifiers2(options) {
1002
554
  }
1003
555
  }
1004
556
  async function updateModifier2(_id, modifier) {
1005
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1006
- if (validateRequestSchema) {
1007
- UpdateModifierRequest.parse({ _id, modifier });
1008
- }
557
+ const { httpClient, sideEffects } = arguments[2];
1009
558
  const payload = renameKeysFromSDKRequestToRESTRequest({
1010
559
  modifier: { ...modifier, id: _id }
1011
560
  });
@@ -1030,10 +579,7 @@ async function updateModifier2(_id, modifier) {
1030
579
  }
1031
580
  }
1032
581
  async function bulkCreateModifiers2(modifiers, options) {
1033
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1034
- if (validateRequestSchema) {
1035
- BulkCreateModifiersRequest.parse({ modifiers, options });
1036
- }
582
+ const { httpClient, sideEffects } = arguments[2];
1037
583
  const payload = renameKeysFromSDKRequestToRESTRequest({
1038
584
  modifiers,
1039
585
  returnEntity: options?.returnEntity
@@ -1062,10 +608,7 @@ async function bulkCreateModifiers2(modifiers, options) {
1062
608
  }
1063
609
  }
1064
610
  async function bulkUpdateModifiers2(modifiers, options) {
1065
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1066
- if (validateRequestSchema) {
1067
- BulkUpdateModifiersRequest.parse({ modifiers, options });
1068
- }
611
+ const { httpClient, sideEffects } = arguments[2];
1069
612
  const payload = renameKeysFromSDKRequestToRESTRequest({
1070
613
  modifiers,
1071
614
  returnEntity: options?.returnEntity
@@ -1094,10 +637,7 @@ async function bulkUpdateModifiers2(modifiers, options) {
1094
637
  }
1095
638
  }
1096
639
  async function deleteModifier2(modifierId) {
1097
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1098
- if (validateRequestSchema) {
1099
- DeleteModifierRequest.parse({ modifierId });
1100
- }
640
+ const { httpClient, sideEffects } = arguments[1];
1101
641
  const payload = renameKeysFromSDKRequestToRESTRequest({
1102
642
  modifierId
1103
643
  });
@@ -1164,10 +704,7 @@ function queryModifiers2() {
1164
704
  });
1165
705
  }
1166
706
  async function typedQueryModifiers(query) {
1167
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1168
- if (validateRequestSchema) {
1169
- QueryModifiersRequest.parse({ query });
1170
- }
707
+ const { httpClient, sideEffects } = arguments[1];
1171
708
  const payload = renameKeysFromSDKRequestToRESTRequest({ query });
1172
709
  const reqOpts = queryModifiers(payload);
1173
710
  sideEffects?.onSiteCall?.();
@@ -1195,10 +732,7 @@ var utils = {
1195
732
  }
1196
733
  };
1197
734
  async function countModifiers2(options) {
1198
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1199
- if (validateRequestSchema) {
1200
- CountModifiersRequest.parse({ options });
1201
- }
735
+ const { httpClient, sideEffects } = arguments[1];
1202
736
  const payload = renameKeysFromSDKRequestToRESTRequest({
1203
737
  filter: options?.filter
1204
738
  });
@@ -1223,10 +757,7 @@ async function countModifiers2(options) {
1223
757
  }
1224
758
  }
1225
759
  async function bulkDeleteModifiers2(ids) {
1226
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1227
- if (validateRequestSchema) {
1228
- BulkDeleteModifiersRequest.parse({ ids });
1229
- }
760
+ const { httpClient, sideEffects } = arguments[1];
1230
761
  const payload = renameKeysFromSDKRequestToRESTRequest({ ids });
1231
762
  const reqOpts = bulkDeleteModifiers(payload);
1232
763
  sideEffects?.onSiteCall?.();
@@ -1250,83 +781,83 @@ async function bulkDeleteModifiers2(ids) {
1250
781
  }
1251
782
 
1252
783
  // src/restaurants-menus-v1-item-modifier-item-modifiers.public.ts
1253
- function createModifier3(httpClient, __options) {
784
+ function createModifier3(httpClient) {
1254
785
  return (modifier) => createModifier2(
1255
786
  modifier,
1256
787
  // @ts-ignore
1257
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
788
+ { httpClient }
1258
789
  );
1259
790
  }
1260
- function getModifier3(httpClient, __options) {
791
+ function getModifier3(httpClient) {
1261
792
  return (modifierId) => getModifier2(
1262
793
  modifierId,
1263
794
  // @ts-ignore
1264
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
795
+ { httpClient }
1265
796
  );
1266
797
  }
1267
- function listModifiers3(httpClient, __options) {
798
+ function listModifiers3(httpClient) {
1268
799
  return (options) => listModifiers2(
1269
800
  options,
1270
801
  // @ts-ignore
1271
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
802
+ { httpClient }
1272
803
  );
1273
804
  }
1274
- function updateModifier3(httpClient, __options) {
805
+ function updateModifier3(httpClient) {
1275
806
  return (_id, modifier) => updateModifier2(
1276
807
  _id,
1277
808
  modifier,
1278
809
  // @ts-ignore
1279
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
810
+ { httpClient }
1280
811
  );
1281
812
  }
1282
- function bulkCreateModifiers3(httpClient, __options) {
813
+ function bulkCreateModifiers3(httpClient) {
1283
814
  return (modifiers, options) => bulkCreateModifiers2(
1284
815
  modifiers,
1285
816
  options,
1286
817
  // @ts-ignore
1287
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
818
+ { httpClient }
1288
819
  );
1289
820
  }
1290
- function bulkUpdateModifiers3(httpClient, __options) {
821
+ function bulkUpdateModifiers3(httpClient) {
1291
822
  return (modifiers, options) => bulkUpdateModifiers2(
1292
823
  modifiers,
1293
824
  options,
1294
825
  // @ts-ignore
1295
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
826
+ { httpClient }
1296
827
  );
1297
828
  }
1298
- function deleteModifier3(httpClient, __options) {
829
+ function deleteModifier3(httpClient) {
1299
830
  return (modifierId) => deleteModifier2(
1300
831
  modifierId,
1301
832
  // @ts-ignore
1302
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
833
+ { httpClient }
1303
834
  );
1304
835
  }
1305
- function queryModifiers3(httpClient, __options) {
836
+ function queryModifiers3(httpClient) {
1306
837
  return () => queryModifiers2(
1307
838
  // @ts-ignore
1308
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
839
+ { httpClient }
1309
840
  );
1310
841
  }
1311
- function typedQueryModifiers2(httpClient, __options) {
842
+ function typedQueryModifiers2(httpClient) {
1312
843
  return (query) => typedQueryModifiers(
1313
844
  query,
1314
845
  // @ts-ignore
1315
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
846
+ { httpClient }
1316
847
  );
1317
848
  }
1318
- function countModifiers3(httpClient, __options) {
849
+ function countModifiers3(httpClient) {
1319
850
  return (options) => countModifiers2(
1320
851
  options,
1321
852
  // @ts-ignore
1322
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
853
+ { httpClient }
1323
854
  );
1324
855
  }
1325
- function bulkDeleteModifiers3(httpClient, __options) {
856
+ function bulkDeleteModifiers3(httpClient) {
1326
857
  return (ids) => bulkDeleteModifiers2(
1327
858
  ids,
1328
859
  // @ts-ignore
1329
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
860
+ { httpClient }
1330
861
  );
1331
862
  }
1332
863
  var onItemModifierCreated = EventDefinition(