@wix/auto_sdk_restaurants_sections 1.0.69 → 1.0.70

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.
@@ -605,574 +605,6 @@ function bulkDeleteSections(payload) {
605
605
  import { transformSDKImageToRESTImage } from "@wix/sdk-runtime/transformations/image";
606
606
  import { transformRESTImageToSDKImage } from "@wix/sdk-runtime/transformations/image";
607
607
  import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
608
-
609
- // src/restaurants-menus-v1-section-sections.schemas.ts
610
- import * as z from "zod";
611
- var DuplicateSectionRequest = z.object({
612
- _id: z.string().describe("ID of the section to be duplicated.").regex(
613
- /^[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}$/,
614
- "Must be a valid GUID"
615
- ),
616
- options: z.object({
617
- businessLocationIds: z.array(z.string()).max(100).optional(),
618
- duplicateSubEntities: z.boolean().describe(
619
- "Whether to duplicate the section's sub-entities, such as its items.\n\nDefault: `false`"
620
- ).optional().nullable()
621
- }).optional()
622
- });
623
- var DuplicateSectionResponse = z.object({
624
- sectionId: z.array(z.string()).optional()
625
- });
626
- var CreateSectionRequest = z.object({
627
- section: z.object({
628
- _id: z.string().describe("Section 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 section is updated. To prevent conflicting changes, the current revision must be passed when updating the section. Ignored when creating a section."
634
- ).optional().nullable(),
635
- _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
636
- _updatedDate: z.date().describe("Date and time the section was updated.").optional().nullable(),
637
- name: z.string().describe("Section name.").min(1).max(500).optional(),
638
- description: z.string().describe("Section description.").max(1500).optional().nullable(),
639
- image: z.string().describe("Main section image.").optional(),
640
- additionalImages: z.array(z.string()).max(100).optional(),
641
- itemIds: z.array(z.string()).max(300).optional(),
642
- extendedFields: z.object({
643
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
644
- "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)."
645
- ).optional()
646
- }).describe("Extended fields.").optional(),
647
- visible: z.boolean().describe(
648
- "Whether the section is visible in the menu for site visitors."
649
- ).optional().nullable(),
650
- businessLocationId: z.string().describe(
651
- "ID of the business location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations)) where this section is available."
652
- ).regex(
653
- /^[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}$/,
654
- "Must be a valid GUID"
655
- ).optional().nullable()
656
- }).describe("Section details.")
657
- });
658
- var CreateSectionResponse = z.object({
659
- _id: z.string().describe("Section ID.").regex(
660
- /^[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}$/,
661
- "Must be a valid GUID"
662
- ).optional().nullable(),
663
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
664
- "Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current revision must be passed when updating the section. Ignored when creating a section."
665
- ).optional().nullable(),
666
- _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
667
- _updatedDate: z.date().describe("Date and time the section was updated.").optional().nullable(),
668
- name: z.string().describe("Section name.").min(1).max(500).optional(),
669
- description: z.string().describe("Section description.").max(1500).optional().nullable(),
670
- image: z.string().describe("Main section image.").optional(),
671
- additionalImages: z.array(z.string()).max(100).optional(),
672
- itemIds: z.array(z.string()).max(300).optional(),
673
- extendedFields: z.object({
674
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
675
- "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)."
676
- ).optional()
677
- }).describe("Extended fields.").optional(),
678
- visible: z.boolean().describe("Whether the section is visible in the menu for site visitors.").optional().nullable(),
679
- businessLocationId: z.string().describe(
680
- "ID of the business location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations)) where this section is available."
681
- ).regex(
682
- /^[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}$/,
683
- "Must be a valid GUID"
684
- ).optional().nullable()
685
- });
686
- var BulkCreateSectionsRequest = z.object({
687
- sections: z.array(
688
- z.object({
689
- _id: z.string().describe("Section ID.").regex(
690
- /^[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}$/,
691
- "Must be a valid GUID"
692
- ).optional().nullable(),
693
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
694
- "Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current revision must be passed when updating the section. Ignored when creating a section."
695
- ).optional().nullable(),
696
- _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
697
- _updatedDate: z.date().describe("Date and time the section was updated.").optional().nullable(),
698
- name: z.string().describe("Section name.").min(1).max(500).optional(),
699
- description: z.string().describe("Section description.").max(1500).optional().nullable(),
700
- image: z.string().describe("Main section image.").optional(),
701
- additionalImages: z.array(z.string()).max(100).optional(),
702
- itemIds: z.array(z.string()).max(300).optional(),
703
- extendedFields: z.object({
704
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
705
- "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)."
706
- ).optional()
707
- }).describe("Extended fields.").optional(),
708
- visible: z.boolean().describe(
709
- "Whether the section is visible in the menu for site visitors."
710
- ).optional().nullable(),
711
- businessLocationId: z.string().describe(
712
- "ID of the business location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations)) where this section is available."
713
- ).regex(
714
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
715
- "Must be a valid GUID"
716
- ).optional().nullable()
717
- })
718
- ).max(100),
719
- options: z.object({
720
- returnEntity: z.boolean().describe("Whether to receive the created sections in the response.").optional()
721
- }).optional()
722
- });
723
- var BulkCreateSectionsResponse = z.object({
724
- results: z.array(
725
- z.object({
726
- itemMetadata: z.object({
727
- _id: z.string().describe(
728
- "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
729
- ).optional().nullable(),
730
- originalIndex: z.number().int().describe(
731
- "Index of the item within the request array. Allows for correlation between request and response items."
732
- ).optional(),
733
- success: z.boolean().describe(
734
- "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
735
- ).optional(),
736
- error: z.object({
737
- code: z.string().describe("Error code.").optional(),
738
- description: z.string().describe("Description of the error.").optional(),
739
- data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
740
- }).describe("Details about the error in case of failure.").optional()
741
- }).describe("Metadata for created sections.").optional(),
742
- item: z.object({
743
- _id: z.string().describe("Section ID.").regex(
744
- /^[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}$/,
745
- "Must be a valid GUID"
746
- ).optional().nullable(),
747
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
748
- "Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current revision must be passed when updating the section. Ignored when creating a section."
749
- ).optional().nullable(),
750
- _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
751
- _updatedDate: z.date().describe("Date and time the section was updated.").optional().nullable(),
752
- name: z.string().describe("Section name.").min(1).max(500).optional(),
753
- description: z.string().describe("Section description.").max(1500).optional().nullable(),
754
- image: z.string().describe("Main section image.").optional(),
755
- additionalImages: z.array(z.string()).max(100).optional(),
756
- itemIds: z.array(z.string()).max(300).optional(),
757
- extendedFields: z.object({
758
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
759
- "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)."
760
- ).optional()
761
- }).describe("Extended fields.").optional(),
762
- visible: z.boolean().describe(
763
- "Whether the section is visible in the menu for site visitors."
764
- ).optional().nullable(),
765
- businessLocationId: z.string().describe(
766
- "ID of the business location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations)) where this section is available."
767
- ).regex(
768
- /^[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}$/,
769
- "Must be a valid GUID"
770
- ).optional().nullable()
771
- }).describe(
772
- "Created section. Only returned if `returnEntity` is set to `true`."
773
- ).optional()
774
- })
775
- ).optional(),
776
- bulkActionMetadata: z.object({
777
- totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
778
- totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
779
- undetailedFailures: z.number().int().describe(
780
- "Number of failures without details because detailed failure threshold was exceeded."
781
- ).optional()
782
- }).describe("Metadata for the API call.").optional()
783
- });
784
- var GetSectionRequest = z.object({
785
- sectionId: z.string().describe("Section ID.").regex(
786
- /^[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}$/,
787
- "Must be a valid GUID"
788
- )
789
- });
790
- var GetSectionResponse = z.object({
791
- _id: z.string().describe("Section ID.").regex(
792
- /^[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}$/,
793
- "Must be a valid GUID"
794
- ).optional().nullable(),
795
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
796
- "Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current revision must be passed when updating the section. Ignored when creating a section."
797
- ).optional().nullable(),
798
- _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
799
- _updatedDate: z.date().describe("Date and time the section was updated.").optional().nullable(),
800
- name: z.string().describe("Section name.").min(1).max(500).optional(),
801
- description: z.string().describe("Section description.").max(1500).optional().nullable(),
802
- image: z.string().describe("Main section image.").optional(),
803
- additionalImages: z.array(z.string()).max(100).optional(),
804
- itemIds: z.array(z.string()).max(300).optional(),
805
- extendedFields: z.object({
806
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
807
- "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)."
808
- ).optional()
809
- }).describe("Extended fields.").optional(),
810
- visible: z.boolean().describe("Whether the section is visible in the menu for site visitors.").optional().nullable(),
811
- businessLocationId: z.string().describe(
812
- "ID of the business location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations)) where this section is available."
813
- ).regex(
814
- /^[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}$/,
815
- "Must be a valid GUID"
816
- ).optional().nullable()
817
- });
818
- var ListSectionsRequest = z.object({
819
- options: z.object({
820
- sectionIds: z.array(z.string()).max(500).optional(),
821
- paging: z.object({
822
- limit: z.number().int().describe("Number of items to load.").min(0).max(500).optional().nullable(),
823
- cursor: z.string().describe(
824
- "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."
825
- ).optional().nullable()
826
- }).describe("The metadata of the paginated results.").optional(),
827
- onlyVisible: z.boolean().describe(
828
- "Whether to return only sections that are visible to site visitors."
829
- ).optional().nullable()
830
- }).optional()
831
- });
832
- var ListSectionsResponse = z.object({
833
- sections: z.array(
834
- z.object({
835
- _id: z.string().describe("Section ID.").regex(
836
- /^[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}$/,
837
- "Must be a valid GUID"
838
- ).optional().nullable(),
839
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
840
- "Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current revision must be passed when updating the section. Ignored when creating a section."
841
- ).optional().nullable(),
842
- _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
843
- _updatedDate: z.date().describe("Date and time the section was updated.").optional().nullable(),
844
- name: z.string().describe("Section name.").min(1).max(500).optional(),
845
- description: z.string().describe("Section description.").max(1500).optional().nullable(),
846
- image: z.string().describe("Main section image.").optional(),
847
- additionalImages: z.array(z.string()).max(100).optional(),
848
- itemIds: z.array(z.string()).max(300).optional(),
849
- extendedFields: z.object({
850
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
851
- "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)."
852
- ).optional()
853
- }).describe("Extended fields.").optional(),
854
- visible: z.boolean().describe(
855
- "Whether the section is visible in the menu for site visitors."
856
- ).optional().nullable(),
857
- businessLocationId: z.string().describe(
858
- "ID of the business location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations)) where this section is available."
859
- ).regex(
860
- /^[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}$/,
861
- "Must be a valid GUID"
862
- ).optional().nullable()
863
- })
864
- ).optional(),
865
- pagingMetadata: z.object({
866
- count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
867
- cursors: z.object({
868
- next: z.string().describe("Cursor pointing to next page in the list of results.").optional().nullable(),
869
- prev: z.string().describe(
870
- "Cursor pointing to previous page in the list of results."
871
- ).optional().nullable()
872
- }).describe("Offset that was requested.").optional(),
873
- hasNext: z.boolean().describe(
874
- "Indicates if there are more results after the current page.\nIf `true`, another page of results can be retrieved.\nIf `false`, this is the last page."
875
- ).optional().nullable()
876
- }).describe("The metadata of the paginated results.").optional()
877
- });
878
- var QuerySectionsRequest = z.object({
879
- query: z.object({
880
- filter: z.object({
881
- image: z.object({ $exists: z.boolean() }).partial().strict().optional(),
882
- _id: z.object({
883
- $eq: z.string(),
884
- $in: z.array(z.string()),
885
- $ne: z.string(),
886
- $nin: z.array(z.string())
887
- }).partial().strict().optional(),
888
- name: z.object({
889
- $eq: z.string(),
890
- $in: z.array(z.string()),
891
- $ne: z.string(),
892
- $nin: z.array(z.string()),
893
- $startsWith: z.string()
894
- }).partial().strict().optional(),
895
- description: z.object({
896
- $eq: z.string(),
897
- $in: z.array(z.string()),
898
- $ne: z.string(),
899
- $nin: z.array(z.string()),
900
- $startsWith: z.string()
901
- }).partial().strict().optional(),
902
- itemIds: z.object({ $exists: z.boolean(), $hasSome: z.array(z.string()) }).partial().strict().optional(),
903
- _createdDate: z.object({
904
- $eq: z.string(),
905
- $gt: z.string(),
906
- $gte: z.string(),
907
- $lt: z.string(),
908
- $lte: z.string(),
909
- $ne: z.string()
910
- }).partial().strict().optional(),
911
- _updatedDate: z.object({
912
- $eq: z.string(),
913
- $gt: z.string(),
914
- $gte: z.string(),
915
- $lt: z.string(),
916
- $lte: z.string(),
917
- $ne: z.string()
918
- }).partial().strict().optional(),
919
- $and: z.array(z.any()).optional(),
920
- $or: z.array(z.any()).optional(),
921
- $not: z.any().optional()
922
- }).strict().optional(),
923
- sort: z.array(z.object({})).optional()
924
- }).catchall(z.any()).describe("Query options.")
925
- });
926
- var QuerySectionsResponse = z.object({
927
- sections: z.array(
928
- z.object({
929
- _id: z.string().describe("Section ID.").regex(
930
- /^[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}$/,
931
- "Must be a valid GUID"
932
- ).optional().nullable(),
933
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
934
- "Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current revision must be passed when updating the section. Ignored when creating a section."
935
- ).optional().nullable(),
936
- _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
937
- _updatedDate: z.date().describe("Date and time the section was updated.").optional().nullable(),
938
- name: z.string().describe("Section name.").min(1).max(500).optional(),
939
- description: z.string().describe("Section description.").max(1500).optional().nullable(),
940
- image: z.string().describe("Main section image.").optional(),
941
- additionalImages: z.array(z.string()).max(100).optional(),
942
- itemIds: z.array(z.string()).max(300).optional(),
943
- extendedFields: z.object({
944
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
945
- "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)."
946
- ).optional()
947
- }).describe("Extended fields.").optional(),
948
- visible: z.boolean().describe(
949
- "Whether the section is visible in the menu for site visitors."
950
- ).optional().nullable(),
951
- businessLocationId: z.string().describe(
952
- "ID of the business location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations)) where this section is available."
953
- ).regex(
954
- /^[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}$/,
955
- "Must be a valid GUID"
956
- ).optional().nullable()
957
- })
958
- ).optional(),
959
- pagingMetadata: z.object({
960
- count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
961
- cursors: z.object({
962
- next: z.string().describe("Cursor pointing to next page in the list of results.").optional().nullable(),
963
- prev: z.string().describe(
964
- "Cursor pointing to previous page in the list of results."
965
- ).optional().nullable()
966
- }).describe("Offset that was requested.").optional(),
967
- hasNext: z.boolean().describe(
968
- "Indicates if there are more results after the current page.\nIf `true`, another page of results can be retrieved.\nIf `false`, this is the last page."
969
- ).optional().nullable()
970
- }).describe("The metadata of the paginated results.").optional()
971
- });
972
- var UpdateSectionRequest = z.object({
973
- _id: z.string().describe("Section ID.").regex(
974
- /^[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}$/,
975
- "Must be a valid GUID"
976
- ),
977
- section: z.object({
978
- _id: z.string().describe("Section ID.").regex(
979
- /^[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}$/,
980
- "Must be a valid GUID"
981
- ).optional().nullable(),
982
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
983
- "Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current revision must be passed when updating the section. Ignored when creating a section."
984
- ),
985
- _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
986
- _updatedDate: z.date().describe("Date and time the section was updated.").optional().nullable(),
987
- name: z.string().describe("Section name.").min(1).max(500).optional(),
988
- description: z.string().describe("Section description.").max(1500).optional().nullable(),
989
- image: z.string().describe("Main section image.").optional(),
990
- additionalImages: z.array(z.string()).max(100).optional(),
991
- itemIds: z.array(z.string()).max(300).optional(),
992
- extendedFields: z.object({
993
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
994
- "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)."
995
- ).optional()
996
- }).describe("Extended fields.").optional(),
997
- visible: z.boolean().describe(
998
- "Whether the section is visible in the menu for site visitors."
999
- ).optional().nullable(),
1000
- businessLocationId: z.string().describe(
1001
- "ID of the business location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations)) where this section is available."
1002
- ).regex(
1003
- /^[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}$/,
1004
- "Must be a valid GUID"
1005
- ).optional().nullable()
1006
- }).describe("Section update.")
1007
- });
1008
- var UpdateSectionResponse = z.object({
1009
- _id: z.string().describe("Section ID.").regex(
1010
- /^[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}$/,
1011
- "Must be a valid GUID"
1012
- ).optional().nullable(),
1013
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1014
- "Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current revision must be passed when updating the section. Ignored when creating a section."
1015
- ).optional().nullable(),
1016
- _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
1017
- _updatedDate: z.date().describe("Date and time the section was updated.").optional().nullable(),
1018
- name: z.string().describe("Section name.").min(1).max(500).optional(),
1019
- description: z.string().describe("Section description.").max(1500).optional().nullable(),
1020
- image: z.string().describe("Main section image.").optional(),
1021
- additionalImages: z.array(z.string()).max(100).optional(),
1022
- itemIds: z.array(z.string()).max(300).optional(),
1023
- extendedFields: z.object({
1024
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
1025
- "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)."
1026
- ).optional()
1027
- }).describe("Extended fields.").optional(),
1028
- visible: z.boolean().describe("Whether the section is visible in the menu for site visitors.").optional().nullable(),
1029
- businessLocationId: z.string().describe(
1030
- "ID of the business location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations)) where this section is available."
1031
- ).regex(
1032
- /^[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}$/,
1033
- "Must be a valid GUID"
1034
- ).optional().nullable()
1035
- });
1036
- var BulkUpdateSectionRequest = z.object({
1037
- sections: z.array(
1038
- z.object({
1039
- section: z.object({
1040
- _id: z.string().describe("Section ID.").regex(
1041
- /^[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}$/,
1042
- "Must be a valid GUID"
1043
- ),
1044
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1045
- "Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current revision must be passed when updating the section. Ignored when creating a section."
1046
- ),
1047
- _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
1048
- _updatedDate: z.date().describe("Date and time the section was updated.").optional().nullable(),
1049
- name: z.string().describe("Section name.").min(1).max(500).optional(),
1050
- description: z.string().describe("Section description.").max(1500).optional().nullable(),
1051
- image: z.string().describe("Main section image.").optional(),
1052
- additionalImages: z.array(z.string()).max(100).optional(),
1053
- itemIds: z.array(z.string()).max(300).optional(),
1054
- extendedFields: z.object({
1055
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
1056
- "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)."
1057
- ).optional()
1058
- }).describe("Extended fields.").optional(),
1059
- visible: z.boolean().describe(
1060
- "Whether the section is visible in the menu for site visitors."
1061
- ).optional().nullable(),
1062
- businessLocationId: z.string().describe(
1063
- "ID of the business location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations)) where this section is available."
1064
- ).regex(
1065
- /^[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}$/,
1066
- "Must be a valid GUID"
1067
- ).optional().nullable()
1068
- }).describe("Section update.").optional(),
1069
- mask: z.array(z.string()).optional()
1070
- })
1071
- ).min(1).max(100),
1072
- options: z.object({
1073
- returnEntity: z.boolean().describe("Whether to receive the updated sections in the response.").optional()
1074
- }).optional()
1075
- });
1076
- var BulkUpdateSectionResponse = z.object({
1077
- results: z.array(
1078
- z.object({
1079
- sectionMetadata: z.object({
1080
- _id: z.string().describe(
1081
- "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
1082
- ).optional().nullable(),
1083
- originalIndex: z.number().int().describe(
1084
- "Index of the item within the request array. Allows for correlation between request and response items."
1085
- ).optional(),
1086
- success: z.boolean().describe(
1087
- "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
1088
- ).optional(),
1089
- error: z.object({
1090
- code: z.string().describe("Error code.").optional(),
1091
- description: z.string().describe("Description of the error.").optional(),
1092
- data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
1093
- }).describe("Details about the error in case of failure.").optional()
1094
- }).describe("Whether to receive the updated sections in the response.").optional(),
1095
- section: z.object({
1096
- _id: z.string().describe("Section ID.").regex(
1097
- /^[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}$/,
1098
- "Must be a valid GUID"
1099
- ).optional().nullable(),
1100
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1101
- "Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current revision must be passed when updating the section. Ignored when creating a section."
1102
- ).optional().nullable(),
1103
- _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
1104
- _updatedDate: z.date().describe("Date and time the section was updated.").optional().nullable(),
1105
- name: z.string().describe("Section name.").min(1).max(500).optional(),
1106
- description: z.string().describe("Section description.").max(1500).optional().nullable(),
1107
- image: z.string().describe("Main section image.").optional(),
1108
- additionalImages: z.array(z.string()).max(100).optional(),
1109
- itemIds: z.array(z.string()).max(300).optional(),
1110
- extendedFields: z.object({
1111
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
1112
- "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)."
1113
- ).optional()
1114
- }).describe("Extended fields.").optional(),
1115
- visible: z.boolean().describe(
1116
- "Whether the section is visible in the menu for site visitors."
1117
- ).optional().nullable(),
1118
- businessLocationId: z.string().describe(
1119
- "ID of the business location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations)) where this section is available."
1120
- ).regex(
1121
- /^[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}$/,
1122
- "Must be a valid GUID"
1123
- ).optional().nullable()
1124
- }).describe(
1125
- "Updated section. Only returned if `returnEntity` is set to `true`."
1126
- ).optional()
1127
- })
1128
- ).min(1).max(100).optional(),
1129
- bulkActionMetadata: z.object({
1130
- totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
1131
- totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
1132
- undetailedFailures: z.number().int().describe(
1133
- "Number of failures without details because detailed failure threshold was exceeded."
1134
- ).optional()
1135
- }).describe("Metadata for the API call.").optional()
1136
- });
1137
- var DeleteSectionRequest = z.object({
1138
- sectionId: z.string().describe("Section ID.").regex(
1139
- /^[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}$/,
1140
- "Must be a valid GUID"
1141
- )
1142
- });
1143
- var DeleteSectionResponse = z.object({});
1144
- var BulkDeleteSectionsRequest = z.object({ ids: z.array(z.string()) });
1145
- var BulkDeleteSectionsResponse = z.object({
1146
- results: z.array(
1147
- z.object({
1148
- itemMetadata: z.object({
1149
- _id: z.string().describe(
1150
- "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
1151
- ).optional().nullable(),
1152
- originalIndex: z.number().int().describe(
1153
- "Index of the item within the request array. Allows for correlation between request and response items."
1154
- ).optional(),
1155
- success: z.boolean().describe(
1156
- "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
1157
- ).optional(),
1158
- error: z.object({
1159
- code: z.string().describe("Error code.").optional(),
1160
- description: z.string().describe("Description of the error.").optional(),
1161
- data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
1162
- }).describe("Details about the error in case of failure.").optional()
1163
- }).describe("Metadata for deleted sections.").optional()
1164
- })
1165
- ).optional(),
1166
- bulkActionMetadata: z.object({
1167
- totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
1168
- totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
1169
- undetailedFailures: z.number().int().describe(
1170
- "Number of failures without details because detailed failure threshold was exceeded."
1171
- ).optional()
1172
- }).describe("Metadata for the API call.").optional()
1173
- });
1174
-
1175
- // src/restaurants-menus-v1-section-sections.universal.ts
1176
608
  import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
1177
609
  var AvailabilityType = /* @__PURE__ */ ((AvailabilityType2) => {
1178
610
  AvailabilityType2["UNSPECIFIED_AVAILABILITY_OPTION"] = "UNSPECIFIED_AVAILABILITY_OPTION";
@@ -1205,10 +637,7 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
1205
637
  return WebhookIdentityType2;
1206
638
  })(WebhookIdentityType || {});
1207
639
  async function duplicateSection2(_id, options) {
1208
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1209
- if (validateRequestSchema) {
1210
- DuplicateSectionRequest.parse({ _id, options });
1211
- }
640
+ const { httpClient, sideEffects } = arguments[2];
1212
641
  const payload = renameKeysFromSDKRequestToRESTRequest({
1213
642
  id: _id,
1214
643
  businessLocationIds: options?.businessLocationIds,
@@ -1239,10 +668,7 @@ async function duplicateSection2(_id, options) {
1239
668
  }
1240
669
  }
1241
670
  async function createSection2(section) {
1242
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1243
- if (validateRequestSchema) {
1244
- CreateSectionRequest.parse({ section });
1245
- }
671
+ const { httpClient, sideEffects } = arguments[1];
1246
672
  const payload = transformPaths2(
1247
673
  renameKeysFromSDKRequestToRESTRequest({ section }),
1248
674
  [
@@ -1286,10 +712,7 @@ async function createSection2(section) {
1286
712
  }
1287
713
  }
1288
714
  async function bulkCreateSections2(sections, options) {
1289
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1290
- if (validateRequestSchema) {
1291
- BulkCreateSectionsRequest.parse({ sections, options });
1292
- }
715
+ const { httpClient, sideEffects } = arguments[2];
1293
716
  const payload = transformPaths2(
1294
717
  renameKeysFromSDKRequestToRESTRequest({
1295
718
  sections,
@@ -1339,10 +762,7 @@ async function bulkCreateSections2(sections, options) {
1339
762
  }
1340
763
  }
1341
764
  async function getSection2(sectionId) {
1342
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1343
- if (validateRequestSchema) {
1344
- GetSectionRequest.parse({ sectionId });
1345
- }
765
+ const { httpClient, sideEffects } = arguments[1];
1346
766
  const payload = renameKeysFromSDKRequestToRESTRequest({
1347
767
  sectionId
1348
768
  });
@@ -1377,10 +797,7 @@ async function getSection2(sectionId) {
1377
797
  }
1378
798
  }
1379
799
  async function listSections2(options) {
1380
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1381
- if (validateRequestSchema) {
1382
- ListSectionsRequest.parse({ options });
1383
- }
800
+ const { httpClient, sideEffects } = arguments[1];
1384
801
  const payload = renameKeysFromSDKRequestToRESTRequest({
1385
802
  sectionIds: options?.sectionIds,
1386
803
  paging: options?.paging,
@@ -1472,10 +889,7 @@ function querySections2() {
1472
889
  });
1473
890
  }
1474
891
  async function typedQuerySections(query) {
1475
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1476
- if (validateRequestSchema) {
1477
- QuerySectionsRequest.parse({ query });
1478
- }
892
+ const { httpClient, sideEffects } = arguments[1];
1479
893
  const payload = renameKeysFromSDKRequestToRESTRequest({ query });
1480
894
  const reqOpts = querySections(payload);
1481
895
  sideEffects?.onSiteCall?.();
@@ -1513,10 +927,7 @@ var utils = {
1513
927
  }
1514
928
  };
1515
929
  async function updateSection2(_id, section) {
1516
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1517
- if (validateRequestSchema) {
1518
- UpdateSectionRequest.parse({ _id, section });
1519
- }
930
+ const { httpClient, sideEffects } = arguments[2];
1520
931
  const payload = transformPaths2(
1521
932
  renameKeysFromSDKRequestToRESTRequest({ section: { ...section, id: _id } }),
1522
933
  [
@@ -1560,10 +971,7 @@ async function updateSection2(_id, section) {
1560
971
  }
1561
972
  }
1562
973
  async function bulkUpdateSection2(sections, options) {
1563
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1564
- if (validateRequestSchema) {
1565
- BulkUpdateSectionRequest.parse({ sections, options });
1566
- }
974
+ const { httpClient, sideEffects } = arguments[2];
1567
975
  const payload = transformPaths2(
1568
976
  renameKeysFromSDKRequestToRESTRequest({
1569
977
  sections,
@@ -1613,10 +1021,7 @@ async function bulkUpdateSection2(sections, options) {
1613
1021
  }
1614
1022
  }
1615
1023
  async function deleteSection2(sectionId) {
1616
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1617
- if (validateRequestSchema) {
1618
- DeleteSectionRequest.parse({ sectionId });
1619
- }
1024
+ const { httpClient, sideEffects } = arguments[1];
1620
1025
  const payload = renameKeysFromSDKRequestToRESTRequest({
1621
1026
  sectionId
1622
1027
  });
@@ -1640,10 +1045,7 @@ async function deleteSection2(sectionId) {
1640
1045
  }
1641
1046
  }
1642
1047
  async function bulkDeleteSections2(ids) {
1643
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1644
- if (validateRequestSchema) {
1645
- BulkDeleteSectionsRequest.parse({ ids });
1646
- }
1048
+ const { httpClient, sideEffects } = arguments[1];
1647
1049
  const payload = renameKeysFromSDKRequestToRESTRequest({ ids });
1648
1050
  const reqOpts = bulkDeleteSections(payload);
1649
1051
  sideEffects?.onSiteCall?.();