@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.
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
17
15
  }
18
16
  return to;
19
17
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
19
 
30
20
  // index.typings.ts
@@ -653,574 +643,6 @@ function bulkDeleteSections(payload) {
653
643
  var import_image = require("@wix/sdk-runtime/transformations/image");
654
644
  var import_image2 = require("@wix/sdk-runtime/transformations/image");
655
645
  var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
656
-
657
- // src/restaurants-menus-v1-section-sections.schemas.ts
658
- var z = __toESM(require("zod"));
659
- var DuplicateSectionRequest = z.object({
660
- _id: z.string().describe("ID of the section to be duplicated.").regex(
661
- /^[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}$/,
662
- "Must be a valid GUID"
663
- ),
664
- options: z.object({
665
- businessLocationIds: z.array(z.string()).max(100).optional(),
666
- duplicateSubEntities: z.boolean().describe(
667
- "Whether to duplicate the section's sub-entities, such as its items.\n\nDefault: `false`"
668
- ).optional().nullable()
669
- }).optional()
670
- });
671
- var DuplicateSectionResponse = z.object({
672
- sectionId: z.array(z.string()).optional()
673
- });
674
- var CreateSectionRequest = z.object({
675
- section: z.object({
676
- _id: z.string().describe("Section ID.").regex(
677
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
678
- "Must be a valid GUID"
679
- ).optional().nullable(),
680
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
681
- "Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current revision must be passed when updating the section. Ignored when creating a section."
682
- ).optional().nullable(),
683
- _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
684
- _updatedDate: z.date().describe("Date and time the section was updated.").optional().nullable(),
685
- name: z.string().describe("Section name.").min(1).max(500).optional(),
686
- description: z.string().describe("Section description.").max(1500).optional().nullable(),
687
- image: z.string().describe("Main section image.").optional(),
688
- additionalImages: z.array(z.string()).max(100).optional(),
689
- itemIds: z.array(z.string()).max(300).optional(),
690
- extendedFields: z.object({
691
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
692
- "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)."
693
- ).optional()
694
- }).describe("Extended fields.").optional(),
695
- visible: z.boolean().describe(
696
- "Whether the section is visible in the menu for site visitors."
697
- ).optional().nullable(),
698
- businessLocationId: z.string().describe(
699
- "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."
700
- ).regex(
701
- /^[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}$/,
702
- "Must be a valid GUID"
703
- ).optional().nullable()
704
- }).describe("Section details.")
705
- });
706
- var CreateSectionResponse = z.object({
707
- _id: z.string().describe("Section ID.").regex(
708
- /^[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}$/,
709
- "Must be a valid GUID"
710
- ).optional().nullable(),
711
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
712
- "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."
713
- ).optional().nullable(),
714
- _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
715
- _updatedDate: z.date().describe("Date and time the section was updated.").optional().nullable(),
716
- name: z.string().describe("Section name.").min(1).max(500).optional(),
717
- description: z.string().describe("Section description.").max(1500).optional().nullable(),
718
- image: z.string().describe("Main section image.").optional(),
719
- additionalImages: z.array(z.string()).max(100).optional(),
720
- itemIds: z.array(z.string()).max(300).optional(),
721
- extendedFields: z.object({
722
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
723
- "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)."
724
- ).optional()
725
- }).describe("Extended fields.").optional(),
726
- visible: z.boolean().describe("Whether the section is visible in the menu for site visitors.").optional().nullable(),
727
- businessLocationId: z.string().describe(
728
- "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."
729
- ).regex(
730
- /^[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}$/,
731
- "Must be a valid GUID"
732
- ).optional().nullable()
733
- });
734
- var BulkCreateSectionsRequest = z.object({
735
- sections: z.array(
736
- z.object({
737
- _id: z.string().describe("Section ID.").regex(
738
- /^[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}$/,
739
- "Must be a valid GUID"
740
- ).optional().nullable(),
741
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
742
- "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."
743
- ).optional().nullable(),
744
- _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
745
- _updatedDate: z.date().describe("Date and time the section was updated.").optional().nullable(),
746
- name: z.string().describe("Section name.").min(1).max(500).optional(),
747
- description: z.string().describe("Section description.").max(1500).optional().nullable(),
748
- image: z.string().describe("Main section image.").optional(),
749
- additionalImages: z.array(z.string()).max(100).optional(),
750
- itemIds: z.array(z.string()).max(300).optional(),
751
- extendedFields: z.object({
752
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
753
- "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)."
754
- ).optional()
755
- }).describe("Extended fields.").optional(),
756
- visible: z.boolean().describe(
757
- "Whether the section is visible in the menu for site visitors."
758
- ).optional().nullable(),
759
- businessLocationId: z.string().describe(
760
- "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."
761
- ).regex(
762
- /^[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}$/,
763
- "Must be a valid GUID"
764
- ).optional().nullable()
765
- })
766
- ).max(100),
767
- options: z.object({
768
- returnEntity: z.boolean().describe("Whether to receive the created sections in the response.").optional()
769
- }).optional()
770
- });
771
- var BulkCreateSectionsResponse = z.object({
772
- results: z.array(
773
- z.object({
774
- itemMetadata: z.object({
775
- _id: z.string().describe(
776
- "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
777
- ).optional().nullable(),
778
- originalIndex: z.number().int().describe(
779
- "Index of the item within the request array. Allows for correlation between request and response items."
780
- ).optional(),
781
- success: z.boolean().describe(
782
- "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
783
- ).optional(),
784
- error: z.object({
785
- code: z.string().describe("Error code.").optional(),
786
- description: z.string().describe("Description of the error.").optional(),
787
- data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
788
- }).describe("Details about the error in case of failure.").optional()
789
- }).describe("Metadata for created sections.").optional(),
790
- item: 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(
811
- "Whether the section is visible in the menu for site visitors."
812
- ).optional().nullable(),
813
- businessLocationId: z.string().describe(
814
- "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."
815
- ).regex(
816
- /^[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}$/,
817
- "Must be a valid GUID"
818
- ).optional().nullable()
819
- }).describe(
820
- "Created section. Only returned if `returnEntity` is set to `true`."
821
- ).optional()
822
- })
823
- ).optional(),
824
- bulkActionMetadata: z.object({
825
- totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
826
- totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
827
- undetailedFailures: z.number().int().describe(
828
- "Number of failures without details because detailed failure threshold was exceeded."
829
- ).optional()
830
- }).describe("Metadata for the API call.").optional()
831
- });
832
- var GetSectionRequest = z.object({
833
- sectionId: z.string().describe("Section ID.").regex(
834
- /^[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}$/,
835
- "Must be a valid GUID"
836
- )
837
- });
838
- var GetSectionResponse = z.object({
839
- _id: z.string().describe("Section ID.").regex(
840
- /^[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}$/,
841
- "Must be a valid GUID"
842
- ).optional().nullable(),
843
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
844
- "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."
845
- ).optional().nullable(),
846
- _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
847
- _updatedDate: z.date().describe("Date and time the section was updated.").optional().nullable(),
848
- name: z.string().describe("Section name.").min(1).max(500).optional(),
849
- description: z.string().describe("Section description.").max(1500).optional().nullable(),
850
- image: z.string().describe("Main section image.").optional(),
851
- additionalImages: z.array(z.string()).max(100).optional(),
852
- itemIds: z.array(z.string()).max(300).optional(),
853
- extendedFields: z.object({
854
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
855
- "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)."
856
- ).optional()
857
- }).describe("Extended fields.").optional(),
858
- visible: z.boolean().describe("Whether the section is visible in the menu for site visitors.").optional().nullable(),
859
- businessLocationId: z.string().describe(
860
- "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."
861
- ).regex(
862
- /^[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}$/,
863
- "Must be a valid GUID"
864
- ).optional().nullable()
865
- });
866
- var ListSectionsRequest = z.object({
867
- options: z.object({
868
- sectionIds: z.array(z.string()).max(500).optional(),
869
- paging: z.object({
870
- limit: z.number().int().describe("Number of items to load.").min(0).max(500).optional().nullable(),
871
- cursor: z.string().describe(
872
- "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."
873
- ).optional().nullable()
874
- }).describe("The metadata of the paginated results.").optional(),
875
- onlyVisible: z.boolean().describe(
876
- "Whether to return only sections that are visible to site visitors."
877
- ).optional().nullable()
878
- }).optional()
879
- });
880
- var ListSectionsResponse = z.object({
881
- sections: z.array(
882
- z.object({
883
- _id: z.string().describe("Section ID.").regex(
884
- /^[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}$/,
885
- "Must be a valid GUID"
886
- ).optional().nullable(),
887
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
888
- "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."
889
- ).optional().nullable(),
890
- _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
891
- _updatedDate: z.date().describe("Date and time the section was updated.").optional().nullable(),
892
- name: z.string().describe("Section name.").min(1).max(500).optional(),
893
- description: z.string().describe("Section description.").max(1500).optional().nullable(),
894
- image: z.string().describe("Main section image.").optional(),
895
- additionalImages: z.array(z.string()).max(100).optional(),
896
- itemIds: z.array(z.string()).max(300).optional(),
897
- extendedFields: z.object({
898
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
899
- "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)."
900
- ).optional()
901
- }).describe("Extended fields.").optional(),
902
- visible: z.boolean().describe(
903
- "Whether the section is visible in the menu for site visitors."
904
- ).optional().nullable(),
905
- businessLocationId: z.string().describe(
906
- "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."
907
- ).regex(
908
- /^[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}$/,
909
- "Must be a valid GUID"
910
- ).optional().nullable()
911
- })
912
- ).optional(),
913
- pagingMetadata: z.object({
914
- count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
915
- cursors: z.object({
916
- next: z.string().describe("Cursor pointing to next page in the list of results.").optional().nullable(),
917
- prev: z.string().describe(
918
- "Cursor pointing to previous page in the list of results."
919
- ).optional().nullable()
920
- }).describe("Offset that was requested.").optional(),
921
- hasNext: z.boolean().describe(
922
- "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."
923
- ).optional().nullable()
924
- }).describe("The metadata of the paginated results.").optional()
925
- });
926
- var QuerySectionsRequest = z.object({
927
- query: z.object({
928
- filter: z.object({
929
- image: z.object({ $exists: z.boolean() }).partial().strict().optional(),
930
- _id: z.object({
931
- $eq: z.string(),
932
- $in: z.array(z.string()),
933
- $ne: z.string(),
934
- $nin: z.array(z.string())
935
- }).partial().strict().optional(),
936
- name: z.object({
937
- $eq: z.string(),
938
- $in: z.array(z.string()),
939
- $ne: z.string(),
940
- $nin: z.array(z.string()),
941
- $startsWith: z.string()
942
- }).partial().strict().optional(),
943
- description: z.object({
944
- $eq: z.string(),
945
- $in: z.array(z.string()),
946
- $ne: z.string(),
947
- $nin: z.array(z.string()),
948
- $startsWith: z.string()
949
- }).partial().strict().optional(),
950
- itemIds: z.object({ $exists: z.boolean(), $hasSome: z.array(z.string()) }).partial().strict().optional(),
951
- _createdDate: z.object({
952
- $eq: z.string(),
953
- $gt: z.string(),
954
- $gte: z.string(),
955
- $lt: z.string(),
956
- $lte: z.string(),
957
- $ne: z.string()
958
- }).partial().strict().optional(),
959
- _updatedDate: z.object({
960
- $eq: z.string(),
961
- $gt: z.string(),
962
- $gte: z.string(),
963
- $lt: z.string(),
964
- $lte: z.string(),
965
- $ne: z.string()
966
- }).partial().strict().optional(),
967
- $and: z.array(z.any()).optional(),
968
- $or: z.array(z.any()).optional(),
969
- $not: z.any().optional()
970
- }).strict().optional(),
971
- sort: z.array(z.object({})).optional()
972
- }).catchall(z.any()).describe("Query options.")
973
- });
974
- var QuerySectionsResponse = z.object({
975
- sections: z.array(
976
- z.object({
977
- _id: z.string().describe("Section ID.").regex(
978
- /^[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}$/,
979
- "Must be a valid GUID"
980
- ).optional().nullable(),
981
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
982
- "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."
983
- ).optional().nullable(),
984
- _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
985
- _updatedDate: z.date().describe("Date and time the section was updated.").optional().nullable(),
986
- name: z.string().describe("Section name.").min(1).max(500).optional(),
987
- description: z.string().describe("Section description.").max(1500).optional().nullable(),
988
- image: z.string().describe("Main section image.").optional(),
989
- additionalImages: z.array(z.string()).max(100).optional(),
990
- itemIds: z.array(z.string()).max(300).optional(),
991
- extendedFields: z.object({
992
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
993
- "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)."
994
- ).optional()
995
- }).describe("Extended fields.").optional(),
996
- visible: z.boolean().describe(
997
- "Whether the section is visible in the menu for site visitors."
998
- ).optional().nullable(),
999
- businessLocationId: z.string().describe(
1000
- "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."
1001
- ).regex(
1002
- /^[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}$/,
1003
- "Must be a valid GUID"
1004
- ).optional().nullable()
1005
- })
1006
- ).optional(),
1007
- pagingMetadata: z.object({
1008
- count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
1009
- cursors: z.object({
1010
- next: z.string().describe("Cursor pointing to next page in the list of results.").optional().nullable(),
1011
- prev: z.string().describe(
1012
- "Cursor pointing to previous page in the list of results."
1013
- ).optional().nullable()
1014
- }).describe("Offset that was requested.").optional(),
1015
- hasNext: z.boolean().describe(
1016
- "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."
1017
- ).optional().nullable()
1018
- }).describe("The metadata of the paginated results.").optional()
1019
- });
1020
- var UpdateSectionRequest = z.object({
1021
- _id: z.string().describe("Section ID.").regex(
1022
- /^[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}$/,
1023
- "Must be a valid GUID"
1024
- ),
1025
- section: z.object({
1026
- _id: z.string().describe("Section ID.").regex(
1027
- /^[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}$/,
1028
- "Must be a valid GUID"
1029
- ).optional().nullable(),
1030
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1031
- "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."
1032
- ),
1033
- _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
1034
- _updatedDate: z.date().describe("Date and time the section was updated.").optional().nullable(),
1035
- name: z.string().describe("Section name.").min(1).max(500).optional(),
1036
- description: z.string().describe("Section description.").max(1500).optional().nullable(),
1037
- image: z.string().describe("Main section image.").optional(),
1038
- additionalImages: z.array(z.string()).max(100).optional(),
1039
- itemIds: z.array(z.string()).max(300).optional(),
1040
- extendedFields: z.object({
1041
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
1042
- "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)."
1043
- ).optional()
1044
- }).describe("Extended fields.").optional(),
1045
- visible: z.boolean().describe(
1046
- "Whether the section is visible in the menu for site visitors."
1047
- ).optional().nullable(),
1048
- businessLocationId: z.string().describe(
1049
- "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."
1050
- ).regex(
1051
- /^[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}$/,
1052
- "Must be a valid GUID"
1053
- ).optional().nullable()
1054
- }).describe("Section update.")
1055
- });
1056
- var UpdateSectionResponse = z.object({
1057
- _id: z.string().describe("Section ID.").regex(
1058
- /^[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}$/,
1059
- "Must be a valid GUID"
1060
- ).optional().nullable(),
1061
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1062
- "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."
1063
- ).optional().nullable(),
1064
- _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
1065
- _updatedDate: z.date().describe("Date and time the section was updated.").optional().nullable(),
1066
- name: z.string().describe("Section name.").min(1).max(500).optional(),
1067
- description: z.string().describe("Section description.").max(1500).optional().nullable(),
1068
- image: z.string().describe("Main section image.").optional(),
1069
- additionalImages: z.array(z.string()).max(100).optional(),
1070
- itemIds: z.array(z.string()).max(300).optional(),
1071
- extendedFields: z.object({
1072
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
1073
- "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)."
1074
- ).optional()
1075
- }).describe("Extended fields.").optional(),
1076
- visible: z.boolean().describe("Whether the section is visible in the menu for site visitors.").optional().nullable(),
1077
- businessLocationId: z.string().describe(
1078
- "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."
1079
- ).regex(
1080
- /^[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}$/,
1081
- "Must be a valid GUID"
1082
- ).optional().nullable()
1083
- });
1084
- var BulkUpdateSectionRequest = z.object({
1085
- sections: z.array(
1086
- z.object({
1087
- section: z.object({
1088
- _id: z.string().describe("Section ID.").regex(
1089
- /^[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}$/,
1090
- "Must be a valid GUID"
1091
- ),
1092
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1093
- "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."
1094
- ),
1095
- _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
1096
- _updatedDate: z.date().describe("Date and time the section was updated.").optional().nullable(),
1097
- name: z.string().describe("Section name.").min(1).max(500).optional(),
1098
- description: z.string().describe("Section description.").max(1500).optional().nullable(),
1099
- image: z.string().describe("Main section image.").optional(),
1100
- additionalImages: z.array(z.string()).max(100).optional(),
1101
- itemIds: z.array(z.string()).max(300).optional(),
1102
- extendedFields: z.object({
1103
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
1104
- "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)."
1105
- ).optional()
1106
- }).describe("Extended fields.").optional(),
1107
- visible: z.boolean().describe(
1108
- "Whether the section is visible in the menu for site visitors."
1109
- ).optional().nullable(),
1110
- businessLocationId: z.string().describe(
1111
- "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."
1112
- ).regex(
1113
- /^[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}$/,
1114
- "Must be a valid GUID"
1115
- ).optional().nullable()
1116
- }).describe("Section update.").optional(),
1117
- mask: z.array(z.string()).optional()
1118
- })
1119
- ).min(1).max(100),
1120
- options: z.object({
1121
- returnEntity: z.boolean().describe("Whether to receive the updated sections in the response.").optional()
1122
- }).optional()
1123
- });
1124
- var BulkUpdateSectionResponse = z.object({
1125
- results: z.array(
1126
- z.object({
1127
- sectionMetadata: z.object({
1128
- _id: z.string().describe(
1129
- "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
1130
- ).optional().nullable(),
1131
- originalIndex: z.number().int().describe(
1132
- "Index of the item within the request array. Allows for correlation between request and response items."
1133
- ).optional(),
1134
- success: z.boolean().describe(
1135
- "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
1136
- ).optional(),
1137
- error: z.object({
1138
- code: z.string().describe("Error code.").optional(),
1139
- description: z.string().describe("Description of the error.").optional(),
1140
- data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
1141
- }).describe("Details about the error in case of failure.").optional()
1142
- }).describe("Whether to receive the updated sections in the response.").optional(),
1143
- section: z.object({
1144
- _id: z.string().describe("Section ID.").regex(
1145
- /^[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}$/,
1146
- "Must be a valid GUID"
1147
- ).optional().nullable(),
1148
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1149
- "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."
1150
- ).optional().nullable(),
1151
- _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
1152
- _updatedDate: z.date().describe("Date and time the section was updated.").optional().nullable(),
1153
- name: z.string().describe("Section name.").min(1).max(500).optional(),
1154
- description: z.string().describe("Section description.").max(1500).optional().nullable(),
1155
- image: z.string().describe("Main section image.").optional(),
1156
- additionalImages: z.array(z.string()).max(100).optional(),
1157
- itemIds: z.array(z.string()).max(300).optional(),
1158
- extendedFields: z.object({
1159
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
1160
- "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)."
1161
- ).optional()
1162
- }).describe("Extended fields.").optional(),
1163
- visible: z.boolean().describe(
1164
- "Whether the section is visible in the menu for site visitors."
1165
- ).optional().nullable(),
1166
- businessLocationId: z.string().describe(
1167
- "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."
1168
- ).regex(
1169
- /^[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}$/,
1170
- "Must be a valid GUID"
1171
- ).optional().nullable()
1172
- }).describe(
1173
- "Updated section. Only returned if `returnEntity` is set to `true`."
1174
- ).optional()
1175
- })
1176
- ).min(1).max(100).optional(),
1177
- bulkActionMetadata: z.object({
1178
- totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
1179
- totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
1180
- undetailedFailures: z.number().int().describe(
1181
- "Number of failures without details because detailed failure threshold was exceeded."
1182
- ).optional()
1183
- }).describe("Metadata for the API call.").optional()
1184
- });
1185
- var DeleteSectionRequest = z.object({
1186
- sectionId: z.string().describe("Section ID.").regex(
1187
- /^[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}$/,
1188
- "Must be a valid GUID"
1189
- )
1190
- });
1191
- var DeleteSectionResponse = z.object({});
1192
- var BulkDeleteSectionsRequest = z.object({ ids: z.array(z.string()) });
1193
- var BulkDeleteSectionsResponse = z.object({
1194
- results: z.array(
1195
- z.object({
1196
- itemMetadata: z.object({
1197
- _id: z.string().describe(
1198
- "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
1199
- ).optional().nullable(),
1200
- originalIndex: z.number().int().describe(
1201
- "Index of the item within the request array. Allows for correlation between request and response items."
1202
- ).optional(),
1203
- success: z.boolean().describe(
1204
- "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
1205
- ).optional(),
1206
- error: z.object({
1207
- code: z.string().describe("Error code.").optional(),
1208
- description: z.string().describe("Description of the error.").optional(),
1209
- data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
1210
- }).describe("Details about the error in case of failure.").optional()
1211
- }).describe("Metadata for deleted sections.").optional()
1212
- })
1213
- ).optional(),
1214
- bulkActionMetadata: z.object({
1215
- totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
1216
- totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
1217
- undetailedFailures: z.number().int().describe(
1218
- "Number of failures without details because detailed failure threshold was exceeded."
1219
- ).optional()
1220
- }).describe("Metadata for the API call.").optional()
1221
- });
1222
-
1223
- // src/restaurants-menus-v1-section-sections.universal.ts
1224
646
  var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
1225
647
  var AvailabilityType = /* @__PURE__ */ ((AvailabilityType2) => {
1226
648
  AvailabilityType2["UNSPECIFIED_AVAILABILITY_OPTION"] = "UNSPECIFIED_AVAILABILITY_OPTION";
@@ -1253,10 +675,7 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
1253
675
  return WebhookIdentityType2;
1254
676
  })(WebhookIdentityType || {});
1255
677
  async function duplicateSection2(_id, options) {
1256
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1257
- if (validateRequestSchema) {
1258
- DuplicateSectionRequest.parse({ _id, options });
1259
- }
678
+ const { httpClient, sideEffects } = arguments[2];
1260
679
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1261
680
  id: _id,
1262
681
  businessLocationIds: options?.businessLocationIds,
@@ -1287,10 +706,7 @@ async function duplicateSection2(_id, options) {
1287
706
  }
1288
707
  }
1289
708
  async function createSection2(section) {
1290
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1291
- if (validateRequestSchema) {
1292
- CreateSectionRequest.parse({ section });
1293
- }
709
+ const { httpClient, sideEffects } = arguments[1];
1294
710
  const payload = (0, import_transform_paths2.transformPaths)(
1295
711
  (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ section }),
1296
712
  [
@@ -1334,10 +750,7 @@ async function createSection2(section) {
1334
750
  }
1335
751
  }
1336
752
  async function bulkCreateSections2(sections, options) {
1337
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1338
- if (validateRequestSchema) {
1339
- BulkCreateSectionsRequest.parse({ sections, options });
1340
- }
753
+ const { httpClient, sideEffects } = arguments[2];
1341
754
  const payload = (0, import_transform_paths2.transformPaths)(
1342
755
  (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1343
756
  sections,
@@ -1387,10 +800,7 @@ async function bulkCreateSections2(sections, options) {
1387
800
  }
1388
801
  }
1389
802
  async function getSection2(sectionId) {
1390
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1391
- if (validateRequestSchema) {
1392
- GetSectionRequest.parse({ sectionId });
1393
- }
803
+ const { httpClient, sideEffects } = arguments[1];
1394
804
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1395
805
  sectionId
1396
806
  });
@@ -1425,10 +835,7 @@ async function getSection2(sectionId) {
1425
835
  }
1426
836
  }
1427
837
  async function listSections2(options) {
1428
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1429
- if (validateRequestSchema) {
1430
- ListSectionsRequest.parse({ options });
1431
- }
838
+ const { httpClient, sideEffects } = arguments[1];
1432
839
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1433
840
  sectionIds: options?.sectionIds,
1434
841
  paging: options?.paging,
@@ -1520,10 +927,7 @@ function querySections2() {
1520
927
  });
1521
928
  }
1522
929
  async function typedQuerySections(query) {
1523
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1524
- if (validateRequestSchema) {
1525
- QuerySectionsRequest.parse({ query });
1526
- }
930
+ const { httpClient, sideEffects } = arguments[1];
1527
931
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
1528
932
  const reqOpts = querySections(payload);
1529
933
  sideEffects?.onSiteCall?.();
@@ -1561,10 +965,7 @@ var utils = {
1561
965
  }
1562
966
  };
1563
967
  async function updateSection2(_id, section) {
1564
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1565
- if (validateRequestSchema) {
1566
- UpdateSectionRequest.parse({ _id, section });
1567
- }
968
+ const { httpClient, sideEffects } = arguments[2];
1568
969
  const payload = (0, import_transform_paths2.transformPaths)(
1569
970
  (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ section: { ...section, id: _id } }),
1570
971
  [
@@ -1608,10 +1009,7 @@ async function updateSection2(_id, section) {
1608
1009
  }
1609
1010
  }
1610
1011
  async function bulkUpdateSection2(sections, options) {
1611
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1612
- if (validateRequestSchema) {
1613
- BulkUpdateSectionRequest.parse({ sections, options });
1614
- }
1012
+ const { httpClient, sideEffects } = arguments[2];
1615
1013
  const payload = (0, import_transform_paths2.transformPaths)(
1616
1014
  (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1617
1015
  sections,
@@ -1661,10 +1059,7 @@ async function bulkUpdateSection2(sections, options) {
1661
1059
  }
1662
1060
  }
1663
1061
  async function deleteSection2(sectionId) {
1664
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1665
- if (validateRequestSchema) {
1666
- DeleteSectionRequest.parse({ sectionId });
1667
- }
1062
+ const { httpClient, sideEffects } = arguments[1];
1668
1063
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1669
1064
  sectionId
1670
1065
  });
@@ -1688,10 +1083,7 @@ async function deleteSection2(sectionId) {
1688
1083
  }
1689
1084
  }
1690
1085
  async function bulkDeleteSections2(ids) {
1691
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1692
- if (validateRequestSchema) {
1693
- BulkDeleteSectionsRequest.parse({ ids });
1694
- }
1086
+ const { httpClient, sideEffects } = arguments[1];
1695
1087
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ ids });
1696
1088
  const reqOpts = bulkDeleteSections(payload);
1697
1089
  sideEffects?.onSiteCall?.();