@wix/auto_sdk_restaurants_sections 1.0.68 → 1.0.69
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.
- package/build/cjs/index.d.ts +27 -9
- package/build/cjs/index.js +640 -32
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +618 -10
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.d.mts +27 -9
- package/build/es/index.mjs +630 -32
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.mjs +608 -10
- package/build/es/index.typings.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +27 -9
- package/build/internal/cjs/index.js +640 -32
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.js +618 -10
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/es/index.d.mts +27 -9
- package/build/internal/es/index.mjs +630 -32
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.mjs +608 -10
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -605,6 +605,574 @@ 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
|
|
608
1176
|
import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
|
|
609
1177
|
var AvailabilityType = /* @__PURE__ */ ((AvailabilityType2) => {
|
|
610
1178
|
AvailabilityType2["UNSPECIFIED_AVAILABILITY_OPTION"] = "UNSPECIFIED_AVAILABILITY_OPTION";
|
|
@@ -637,7 +1205,10 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
637
1205
|
return WebhookIdentityType2;
|
|
638
1206
|
})(WebhookIdentityType || {});
|
|
639
1207
|
async function duplicateSection2(_id, options) {
|
|
640
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
1208
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
1209
|
+
if (validateRequestSchema) {
|
|
1210
|
+
DuplicateSectionRequest.parse({ _id, options });
|
|
1211
|
+
}
|
|
641
1212
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
642
1213
|
id: _id,
|
|
643
1214
|
businessLocationIds: options?.businessLocationIds,
|
|
@@ -668,7 +1239,10 @@ async function duplicateSection2(_id, options) {
|
|
|
668
1239
|
}
|
|
669
1240
|
}
|
|
670
1241
|
async function createSection2(section) {
|
|
671
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
1242
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
1243
|
+
if (validateRequestSchema) {
|
|
1244
|
+
CreateSectionRequest.parse({ section });
|
|
1245
|
+
}
|
|
672
1246
|
const payload = transformPaths2(
|
|
673
1247
|
renameKeysFromSDKRequestToRESTRequest({ section }),
|
|
674
1248
|
[
|
|
@@ -712,7 +1286,10 @@ async function createSection2(section) {
|
|
|
712
1286
|
}
|
|
713
1287
|
}
|
|
714
1288
|
async function bulkCreateSections2(sections, options) {
|
|
715
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
1289
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
1290
|
+
if (validateRequestSchema) {
|
|
1291
|
+
BulkCreateSectionsRequest.parse({ sections, options });
|
|
1292
|
+
}
|
|
716
1293
|
const payload = transformPaths2(
|
|
717
1294
|
renameKeysFromSDKRequestToRESTRequest({
|
|
718
1295
|
sections,
|
|
@@ -762,7 +1339,10 @@ async function bulkCreateSections2(sections, options) {
|
|
|
762
1339
|
}
|
|
763
1340
|
}
|
|
764
1341
|
async function getSection2(sectionId) {
|
|
765
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
1342
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
1343
|
+
if (validateRequestSchema) {
|
|
1344
|
+
GetSectionRequest.parse({ sectionId });
|
|
1345
|
+
}
|
|
766
1346
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
767
1347
|
sectionId
|
|
768
1348
|
});
|
|
@@ -797,7 +1377,10 @@ async function getSection2(sectionId) {
|
|
|
797
1377
|
}
|
|
798
1378
|
}
|
|
799
1379
|
async function listSections2(options) {
|
|
800
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
1380
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
1381
|
+
if (validateRequestSchema) {
|
|
1382
|
+
ListSectionsRequest.parse({ options });
|
|
1383
|
+
}
|
|
801
1384
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
802
1385
|
sectionIds: options?.sectionIds,
|
|
803
1386
|
paging: options?.paging,
|
|
@@ -889,7 +1472,10 @@ function querySections2() {
|
|
|
889
1472
|
});
|
|
890
1473
|
}
|
|
891
1474
|
async function typedQuerySections(query) {
|
|
892
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
1475
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
1476
|
+
if (validateRequestSchema) {
|
|
1477
|
+
QuerySectionsRequest.parse({ query });
|
|
1478
|
+
}
|
|
893
1479
|
const payload = renameKeysFromSDKRequestToRESTRequest({ query });
|
|
894
1480
|
const reqOpts = querySections(payload);
|
|
895
1481
|
sideEffects?.onSiteCall?.();
|
|
@@ -927,7 +1513,10 @@ var utils = {
|
|
|
927
1513
|
}
|
|
928
1514
|
};
|
|
929
1515
|
async function updateSection2(_id, section) {
|
|
930
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
1516
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
1517
|
+
if (validateRequestSchema) {
|
|
1518
|
+
UpdateSectionRequest.parse({ _id, section });
|
|
1519
|
+
}
|
|
931
1520
|
const payload = transformPaths2(
|
|
932
1521
|
renameKeysFromSDKRequestToRESTRequest({ section: { ...section, id: _id } }),
|
|
933
1522
|
[
|
|
@@ -971,7 +1560,10 @@ async function updateSection2(_id, section) {
|
|
|
971
1560
|
}
|
|
972
1561
|
}
|
|
973
1562
|
async function bulkUpdateSection2(sections, options) {
|
|
974
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
1563
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
1564
|
+
if (validateRequestSchema) {
|
|
1565
|
+
BulkUpdateSectionRequest.parse({ sections, options });
|
|
1566
|
+
}
|
|
975
1567
|
const payload = transformPaths2(
|
|
976
1568
|
renameKeysFromSDKRequestToRESTRequest({
|
|
977
1569
|
sections,
|
|
@@ -1021,7 +1613,10 @@ async function bulkUpdateSection2(sections, options) {
|
|
|
1021
1613
|
}
|
|
1022
1614
|
}
|
|
1023
1615
|
async function deleteSection2(sectionId) {
|
|
1024
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
1616
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
1617
|
+
if (validateRequestSchema) {
|
|
1618
|
+
DeleteSectionRequest.parse({ sectionId });
|
|
1619
|
+
}
|
|
1025
1620
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1026
1621
|
sectionId
|
|
1027
1622
|
});
|
|
@@ -1045,7 +1640,10 @@ async function deleteSection2(sectionId) {
|
|
|
1045
1640
|
}
|
|
1046
1641
|
}
|
|
1047
1642
|
async function bulkDeleteSections2(ids) {
|
|
1048
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
1643
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
1644
|
+
if (validateRequestSchema) {
|
|
1645
|
+
BulkDeleteSectionsRequest.parse({ ids });
|
|
1646
|
+
}
|
|
1049
1647
|
const payload = renameKeysFromSDKRequestToRESTRequest({ ids });
|
|
1050
1648
|
const reqOpts = bulkDeleteSections(payload);
|
|
1051
1649
|
sideEffects?.onSiteCall?.();
|