@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.
@@ -456,445 +456,6 @@ function bulkDeleteModifiers(payload) {
456
456
 
457
457
  // src/restaurants-menus-v1-item-modifier-item-modifiers.universal.ts
458
458
  import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
459
-
460
- // src/restaurants-menus-v1-item-modifier-item-modifiers.schemas.ts
461
- import * as z from "zod";
462
- var CreateModifierRequest = z.object({
463
- modifier: z.object({
464
- _id: z.string().describe("Item modifier ID.").regex(
465
- /^[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}$/,
466
- "Must be a valid GUID"
467
- ).optional().nullable(),
468
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
469
- "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."
470
- ).optional().nullable(),
471
- _createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
472
- _updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
473
- name: z.string().describe("Item modifier display name.").min(1).max(200),
474
- extendedFields: z.object({
475
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
476
- "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)."
477
- ).optional()
478
- }).describe("Extended fields.").optional(),
479
- inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
480
- businessLocationIds: z.array(z.string()).max(100).optional()
481
- }).describe("Item modifier to create.")
482
- });
483
- var CreateModifierResponse = z.object({
484
- _id: z.string().describe("Item modifier ID.").regex(
485
- /^[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}$/,
486
- "Must be a valid GUID"
487
- ).optional().nullable(),
488
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
489
- "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."
490
- ).optional().nullable(),
491
- _createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
492
- _updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
493
- name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
494
- extendedFields: z.object({
495
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
496
- "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)."
497
- ).optional()
498
- }).describe("Extended fields.").optional(),
499
- inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
500
- businessLocationIds: z.array(z.string()).max(100).optional()
501
- });
502
- var GetModifierRequest = z.object({
503
- modifierId: z.string().describe("ID of the item modifier to retrieve.").regex(
504
- /^[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}$/,
505
- "Must be a valid GUID"
506
- )
507
- });
508
- var GetModifierResponse = z.object({
509
- _id: z.string().describe("Item modifier ID.").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
- ).optional().nullable(),
513
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
514
- "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."
515
- ).optional().nullable(),
516
- _createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
517
- _updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
518
- name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
519
- extendedFields: z.object({
520
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
521
- "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)."
522
- ).optional()
523
- }).describe("Extended fields.").optional(),
524
- inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
525
- businessLocationIds: z.array(z.string()).max(100).optional()
526
- });
527
- var ListModifiersRequest = z.object({
528
- options: z.object({
529
- modifierIds: z.array(z.string()).max(500).optional(),
530
- paging: z.object({
531
- limit: z.number().int().describe("Maximum number of items to load.").min(0).max(500).optional().nullable(),
532
- cursor: z.string().describe(
533
- "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."
534
- ).optional().nullable()
535
- }).describe("Metadata of the paginated results.").optional()
536
- }).optional()
537
- });
538
- var ListModifiersResponse = z.object({
539
- modifiers: z.array(
540
- z.object({
541
- _id: z.string().describe("Item modifier ID.").regex(
542
- /^[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}$/,
543
- "Must be a valid GUID"
544
- ).optional().nullable(),
545
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
546
- "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."
547
- ).optional().nullable(),
548
- _createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
549
- _updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
550
- name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
551
- extendedFields: z.object({
552
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
553
- "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)."
554
- ).optional()
555
- }).describe("Extended fields.").optional(),
556
- inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
557
- businessLocationIds: z.array(z.string()).max(100).optional()
558
- })
559
- ).optional(),
560
- metadata: z.object({
561
- count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
562
- cursors: z.object({
563
- next: z.string().describe("Cursor pointing to next page in the list of results.").optional().nullable(),
564
- prev: z.string().describe(
565
- "Cursor pointing to previous page in the list of results."
566
- ).optional().nullable()
567
- }).describe(
568
- "Cursor pointing to the next page and the previous page in the list of results."
569
- ).optional(),
570
- hasNext: z.boolean().describe(
571
- "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."
572
- ).optional().nullable()
573
- }).describe("Metadata of the paginated results.").optional()
574
- });
575
- var UpdateModifierRequest = z.object({
576
- _id: z.string().describe("Item modifier ID.").regex(
577
- /^[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}$/,
578
- "Must be a valid GUID"
579
- ),
580
- modifier: z.object({
581
- _id: z.string().describe("Item modifier ID.").regex(
582
- /^[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}$/,
583
- "Must be a valid GUID"
584
- ).optional().nullable(),
585
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
586
- "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."
587
- ),
588
- _createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
589
- _updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
590
- name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
591
- extendedFields: z.object({
592
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
593
- "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)."
594
- ).optional()
595
- }).describe("Extended fields.").optional(),
596
- inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
597
- businessLocationIds: z.array(z.string()).max(100).optional()
598
- }).describe("Item Modifier with updated properties.")
599
- });
600
- var UpdateModifierResponse = z.object({
601
- _id: z.string().describe("Item modifier ID.").regex(
602
- /^[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}$/,
603
- "Must be a valid GUID"
604
- ).optional().nullable(),
605
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
606
- "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."
607
- ).optional().nullable(),
608
- _createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
609
- _updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
610
- name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
611
- extendedFields: z.object({
612
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
613
- "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)."
614
- ).optional()
615
- }).describe("Extended fields.").optional(),
616
- inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
617
- businessLocationIds: z.array(z.string()).max(100).optional()
618
- });
619
- var BulkCreateModifiersRequest = z.object({
620
- modifiers: z.array(
621
- z.object({
622
- _id: z.string().describe("Item modifier ID.").regex(
623
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
624
- "Must be a valid GUID"
625
- ).optional().nullable(),
626
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
627
- "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."
628
- ).optional().nullable(),
629
- _createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
630
- _updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
631
- name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
632
- extendedFields: z.object({
633
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
634
- "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)."
635
- ).optional()
636
- }).describe("Extended fields.").optional(),
637
- inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
638
- businessLocationIds: z.array(z.string()).max(100).optional()
639
- })
640
- ).max(100),
641
- options: z.object({
642
- returnEntity: z.boolean().describe(
643
- "Whether the created item modifiers are included in the response. <br />\nDefault: `false`."
644
- ).optional()
645
- }).optional()
646
- });
647
- var BulkCreateModifiersResponse = z.object({
648
- results: z.array(
649
- z.object({
650
- itemMetadata: z.object({
651
- _id: z.string().describe(
652
- "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
653
- ).optional().nullable(),
654
- originalIndex: z.number().int().describe(
655
- "Index of the item within the request array. Allows for correlation between request and response items."
656
- ).optional(),
657
- success: z.boolean().describe(
658
- "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
659
- ).optional(),
660
- error: z.object({
661
- code: z.string().describe("Error code.").optional(),
662
- description: z.string().describe("Description of the error.").optional(),
663
- data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
664
- }).describe("Details about the error in case of failure.").optional()
665
- }).describe("Metadata for creation of the item modifer.").optional(),
666
- modifier: z.object({
667
- _id: z.string().describe("Item modifier ID.").regex(
668
- /^[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}$/,
669
- "Must be a valid GUID"
670
- ).optional().nullable(),
671
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
672
- "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."
673
- ).optional().nullable(),
674
- _createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
675
- _updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
676
- name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
677
- extendedFields: z.object({
678
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
679
- "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)."
680
- ).optional()
681
- }).describe("Extended fields.").optional(),
682
- inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
683
- businessLocationIds: z.array(z.string()).max(100).optional()
684
- }).describe("Created item modifier.").optional()
685
- })
686
- ).optional(),
687
- bulkActionMetadata: z.object({
688
- totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
689
- totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
690
- undetailedFailures: z.number().int().describe(
691
- "Number of failures without details because detailed failure threshold was exceeded."
692
- ).optional()
693
- }).describe("Metadata for Bulk Create Modifiers API call.").optional()
694
- });
695
- var BulkUpdateModifiersRequest = z.object({
696
- modifiers: z.array(
697
- z.object({
698
- modifier: z.object({
699
- _id: z.string().describe("Item modifier ID.").regex(
700
- /^[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}$/,
701
- "Must be a valid GUID"
702
- ).optional().nullable(),
703
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
704
- "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."
705
- ).optional().nullable(),
706
- _createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
707
- _updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
708
- name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
709
- extendedFields: z.object({
710
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
711
- "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)."
712
- ).optional()
713
- }).describe("Extended fields.").optional(),
714
- inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
715
- businessLocationIds: z.array(z.string()).max(100).optional()
716
- }).describe("Item modifier to update.").optional(),
717
- mask: z.array(z.string()).optional()
718
- })
719
- ).min(1).max(100),
720
- options: z.object({
721
- returnEntity: z.boolean().describe(
722
- "Whether the updated item modifiers are included in the response."
723
- ).optional()
724
- }).optional()
725
- });
726
- var BulkUpdateModifiersResponse = z.object({
727
- results: z.array(
728
- z.object({
729
- itemMetadata: z.object({
730
- _id: z.string().describe(
731
- "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
732
- ).optional().nullable(),
733
- originalIndex: z.number().int().describe(
734
- "Index of the item within the request array. Allows for correlation between request and response items."
735
- ).optional(),
736
- success: z.boolean().describe(
737
- "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
738
- ).optional(),
739
- error: z.object({
740
- code: z.string().describe("Error code.").optional(),
741
- description: z.string().describe("Description of the error.").optional(),
742
- data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
743
- }).describe("Details about the error in case of failure.").optional()
744
- }).describe("Metadata for the update of the item modifer.").optional(),
745
- modifier: z.object({
746
- _id: z.string().describe("Item modifier ID.").regex(
747
- /^[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}$/,
748
- "Must be a valid GUID"
749
- ).optional().nullable(),
750
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
751
- "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."
752
- ).optional().nullable(),
753
- _createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
754
- _updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
755
- name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
756
- extendedFields: z.object({
757
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
758
- "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)."
759
- ).optional()
760
- }).describe("Extended fields.").optional(),
761
- inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
762
- businessLocationIds: z.array(z.string()).max(100).optional()
763
- }).describe("Updated item modifier.").optional()
764
- })
765
- ).min(1).max(100).optional(),
766
- bulkActionMetadata: z.object({
767
- totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
768
- totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
769
- undetailedFailures: z.number().int().describe(
770
- "Number of failures without details because detailed failure threshold was exceeded."
771
- ).optional()
772
- }).describe("Metadata for Bulk Update Modifiers API call.").optional()
773
- });
774
- var DeleteModifierRequest = z.object({
775
- modifierId: z.string().describe("ID of the item modifier to delete.").regex(
776
- /^[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}$/,
777
- "Must be a valid GUID"
778
- )
779
- });
780
- var DeleteModifierResponse = z.object({});
781
- var QueryModifiersRequest = z.object({
782
- query: z.object({
783
- filter: z.object({
784
- _id: z.object({
785
- $eq: z.string(),
786
- $in: z.array(z.string()),
787
- $ne: z.string(),
788
- $nin: z.array(z.string())
789
- }).partial().strict().optional(),
790
- name: 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
- _createdDate: z.object({
797
- $eq: z.string(),
798
- $gt: z.string(),
799
- $gte: z.string(),
800
- $lt: z.string(),
801
- $lte: z.string(),
802
- $ne: z.string()
803
- }).partial().strict().optional(),
804
- _updatedDate: z.object({
805
- $eq: z.string(),
806
- $gt: z.string(),
807
- $gte: z.string(),
808
- $lt: z.string(),
809
- $lte: z.string(),
810
- $ne: z.string()
811
- }).partial().strict().optional(),
812
- $and: z.array(z.any()).optional(),
813
- $or: z.array(z.any()).optional(),
814
- $not: z.any().optional()
815
- }).strict().optional(),
816
- sort: z.array(z.object({})).optional()
817
- }).catchall(z.any()).describe("Query options.")
818
- });
819
- var QueryModifiersResponse = z.object({
820
- modifiers: z.array(
821
- z.object({
822
- _id: z.string().describe("Item modifier ID.").regex(
823
- /^[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}$/,
824
- "Must be a valid GUID"
825
- ).optional().nullable(),
826
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
827
- "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."
828
- ).optional().nullable(),
829
- _createdDate: z.date().describe("Date and time the item modifier was created.").optional().nullable(),
830
- _updatedDate: z.date().describe("Date and time the item modifier was updated.").optional().nullable(),
831
- name: z.string().describe("Item modifier display name.").min(1).max(200).optional().nullable(),
832
- extendedFields: z.object({
833
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
834
- "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)."
835
- ).optional()
836
- }).describe("Extended fields.").optional(),
837
- inStock: z.boolean().describe("Whether the modifier is in stock.\nDefault: `true`.").optional().nullable(),
838
- businessLocationIds: z.array(z.string()).max(100).optional()
839
- })
840
- ).optional(),
841
- pagingMetadata: z.object({
842
- count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
843
- cursors: z.object({
844
- next: z.string().describe("Cursor pointing to next page in the list of results.").optional().nullable(),
845
- prev: z.string().describe(
846
- "Cursor pointing to previous page in the list of results."
847
- ).optional().nullable()
848
- }).describe(
849
- "Cursor pointing to the next page and the previous page in the list of results."
850
- ).optional(),
851
- hasNext: z.boolean().describe(
852
- "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."
853
- ).optional().nullable()
854
- }).describe("Metadata of the paginated results.").optional()
855
- });
856
- var CountModifiersRequest = z.object({
857
- options: z.object({
858
- filter: z.record(z.string(), z.any()).describe("Filter for counting modifiers.").optional().nullable()
859
- }).optional()
860
- });
861
- var CountModifiersResponse = z.object({
862
- count: z.number().int().describe("Counted modifiers.").optional()
863
- });
864
- var BulkDeleteModifiersRequest = z.object({
865
- ids: z.array(z.string()).max(200)
866
- });
867
- var BulkDeleteModifiersResponse = z.object({
868
- results: z.array(
869
- z.object({
870
- itemMetadata: z.object({
871
- _id: z.string().describe(
872
- "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
873
- ).optional().nullable(),
874
- originalIndex: z.number().int().describe(
875
- "Index of the item within the request array. Allows for correlation between request and response items."
876
- ).optional(),
877
- success: z.boolean().describe(
878
- "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
879
- ).optional(),
880
- error: z.object({
881
- code: z.string().describe("Error code.").optional(),
882
- description: z.string().describe("Description of the error.").optional(),
883
- data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
884
- }).describe("Details about the error in case of failure.").optional()
885
- }).describe("Metadata for modifiers deletion.").optional()
886
- })
887
- ).optional(),
888
- bulkActionMetadata: z.object({
889
- totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
890
- totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
891
- undetailedFailures: z.number().int().describe(
892
- "Number of failures without details because detailed failure threshold was exceeded."
893
- ).optional()
894
- }).describe("Metadata for the API call.").optional()
895
- });
896
-
897
- // src/restaurants-menus-v1-item-modifier-item-modifiers.universal.ts
898
459
  import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
899
460
  var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
900
461
  SortOrder2["ASC"] = "ASC";
@@ -910,10 +471,7 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
910
471
  return WebhookIdentityType2;
911
472
  })(WebhookIdentityType || {});
912
473
  async function createModifier2(modifier) {
913
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
914
- if (validateRequestSchema) {
915
- CreateModifierRequest.parse({ modifier });
916
- }
474
+ const { httpClient, sideEffects } = arguments[1];
917
475
  const payload = renameKeysFromSDKRequestToRESTRequest({ modifier });
918
476
  const reqOpts = createModifier(payload);
919
477
  sideEffects?.onSiteCall?.();
@@ -936,10 +494,7 @@ async function createModifier2(modifier) {
936
494
  }
937
495
  }
938
496
  async function getModifier2(modifierId) {
939
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
940
- if (validateRequestSchema) {
941
- GetModifierRequest.parse({ modifierId });
942
- }
497
+ const { httpClient, sideEffects } = arguments[1];
943
498
  const payload = renameKeysFromSDKRequestToRESTRequest({
944
499
  modifierId
945
500
  });
@@ -964,10 +519,7 @@ async function getModifier2(modifierId) {
964
519
  }
965
520
  }
966
521
  async function listModifiers2(options) {
967
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
968
- if (validateRequestSchema) {
969
- ListModifiersRequest.parse({ options });
970
- }
522
+ const { httpClient, sideEffects } = arguments[1];
971
523
  const payload = renameKeysFromSDKRequestToRESTRequest({
972
524
  modifierIds: options?.modifierIds,
973
525
  paging: options?.paging
@@ -996,10 +548,7 @@ async function listModifiers2(options) {
996
548
  }
997
549
  }
998
550
  async function updateModifier2(_id, modifier) {
999
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1000
- if (validateRequestSchema) {
1001
- UpdateModifierRequest.parse({ _id, modifier });
1002
- }
551
+ const { httpClient, sideEffects } = arguments[2];
1003
552
  const payload = renameKeysFromSDKRequestToRESTRequest({
1004
553
  modifier: { ...modifier, id: _id }
1005
554
  });
@@ -1024,10 +573,7 @@ async function updateModifier2(_id, modifier) {
1024
573
  }
1025
574
  }
1026
575
  async function bulkCreateModifiers2(modifiers, options) {
1027
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1028
- if (validateRequestSchema) {
1029
- BulkCreateModifiersRequest.parse({ modifiers, options });
1030
- }
576
+ const { httpClient, sideEffects } = arguments[2];
1031
577
  const payload = renameKeysFromSDKRequestToRESTRequest({
1032
578
  modifiers,
1033
579
  returnEntity: options?.returnEntity
@@ -1056,10 +602,7 @@ async function bulkCreateModifiers2(modifiers, options) {
1056
602
  }
1057
603
  }
1058
604
  async function bulkUpdateModifiers2(modifiers, options) {
1059
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1060
- if (validateRequestSchema) {
1061
- BulkUpdateModifiersRequest.parse({ modifiers, options });
1062
- }
605
+ const { httpClient, sideEffects } = arguments[2];
1063
606
  const payload = renameKeysFromSDKRequestToRESTRequest({
1064
607
  modifiers,
1065
608
  returnEntity: options?.returnEntity
@@ -1088,10 +631,7 @@ async function bulkUpdateModifiers2(modifiers, options) {
1088
631
  }
1089
632
  }
1090
633
  async function deleteModifier2(modifierId) {
1091
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1092
- if (validateRequestSchema) {
1093
- DeleteModifierRequest.parse({ modifierId });
1094
- }
634
+ const { httpClient, sideEffects } = arguments[1];
1095
635
  const payload = renameKeysFromSDKRequestToRESTRequest({
1096
636
  modifierId
1097
637
  });
@@ -1158,10 +698,7 @@ function queryModifiers2() {
1158
698
  });
1159
699
  }
1160
700
  async function typedQueryModifiers(query) {
1161
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1162
- if (validateRequestSchema) {
1163
- QueryModifiersRequest.parse({ query });
1164
- }
701
+ const { httpClient, sideEffects } = arguments[1];
1165
702
  const payload = renameKeysFromSDKRequestToRESTRequest({ query });
1166
703
  const reqOpts = queryModifiers(payload);
1167
704
  sideEffects?.onSiteCall?.();
@@ -1189,10 +726,7 @@ var utils = {
1189
726
  }
1190
727
  };
1191
728
  async function countModifiers2(options) {
1192
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1193
- if (validateRequestSchema) {
1194
- CountModifiersRequest.parse({ options });
1195
- }
729
+ const { httpClient, sideEffects } = arguments[1];
1196
730
  const payload = renameKeysFromSDKRequestToRESTRequest({
1197
731
  filter: options?.filter
1198
732
  });
@@ -1217,10 +751,7 @@ async function countModifiers2(options) {
1217
751
  }
1218
752
  }
1219
753
  async function bulkDeleteModifiers2(ids) {
1220
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1221
- if (validateRequestSchema) {
1222
- BulkDeleteModifiersRequest.parse({ ids });
1223
- }
754
+ const { httpClient, sideEffects } = arguments[1];
1224
755
  const payload = renameKeysFromSDKRequestToRESTRequest({ ids });
1225
756
  const reqOpts = bulkDeleteModifiers(payload);
1226
757
  sideEffects?.onSiteCall?.();