@wix/auto_sdk_stores_customizations-v-3 1.0.79 → 1.0.80
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 +11 -31
- package/build/cjs/index.js +39 -1614
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +14 -1
- package/build/cjs/index.typings.js +11 -1586
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +14 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +1 -1
- package/build/es/index.d.mts +11 -31
- package/build/es/index.mjs +39 -1604
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +14 -1
- package/build/es/index.typings.mjs +11 -1576
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +14 -1
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +1 -1
- package/build/internal/cjs/index.d.ts +13 -37
- package/build/internal/cjs/index.js +39 -1614
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +14 -1
- package/build/internal/cjs/index.typings.js +11 -1586
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +14 -1
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +1 -1
- package/build/internal/es/index.d.mts +13 -37
- package/build/internal/es/index.mjs +39 -1604
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +14 -1
- package/build/internal/es/index.typings.mjs +11 -1576
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +14 -1
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +1 -1
- package/package.json +2 -2
|
@@ -845,1523 +845,6 @@ function bulkUpdateCustomizations(payload) {
|
|
|
845
845
|
import { transformSDKImageToRESTImage } from "@wix/sdk-runtime/transformations/image";
|
|
846
846
|
import { transformRESTImageToSDKImage } from "@wix/sdk-runtime/transformations/image";
|
|
847
847
|
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
848
|
-
|
|
849
|
-
// src/stores-catalog-v3-customization-customizations-v-3.schemas.ts
|
|
850
|
-
import * as z from "zod";
|
|
851
|
-
var CreateCustomizationRequest = z.object({
|
|
852
|
-
customization: z.intersection(
|
|
853
|
-
z.object({
|
|
854
|
-
_id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
|
|
855
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
856
|
-
"Revision number, which increments by 1 each time the customization is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the customization.\n\nIgnored when creating a customization."
|
|
857
|
-
).optional().nullable(),
|
|
858
|
-
_createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
|
|
859
|
-
_updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
|
|
860
|
-
key: z.string().describe(
|
|
861
|
-
"A read-only identifier generated from the customization name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
862
|
-
).min(1).max(50).optional().nullable(),
|
|
863
|
-
name: z.string().describe(
|
|
864
|
-
'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
|
|
865
|
-
).min(1).max(50),
|
|
866
|
-
customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]),
|
|
867
|
-
customizationRenderType: z.enum([
|
|
868
|
-
"FREE_TEXT",
|
|
869
|
-
"TEXT_CHOICES",
|
|
870
|
-
"SWATCH_CHOICES"
|
|
871
|
-
]),
|
|
872
|
-
assignedProductsCount: z.number().int().describe(
|
|
873
|
-
'Number of products this customization is assigned to.\n> **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests.'
|
|
874
|
-
).optional().nullable()
|
|
875
|
-
}),
|
|
876
|
-
z.xor([
|
|
877
|
-
z.object({
|
|
878
|
-
choicesSettings: z.never().optional(),
|
|
879
|
-
freeTextInput: z.object({
|
|
880
|
-
minCharCount: z.number().int().describe("Minimum text character length.").optional(),
|
|
881
|
-
maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
|
|
882
|
-
defaultAddedPrice: z.string().describe(
|
|
883
|
-
"Default amount added to a product's price when this choice is assigned to a modifier."
|
|
884
|
-
).optional().nullable(),
|
|
885
|
-
title: z.string().describe(
|
|
886
|
-
"Title to display to customer for their free-text input."
|
|
887
|
-
).min(1).max(100),
|
|
888
|
-
key: z.string().describe(
|
|
889
|
-
"A read-only identifier generated from the title.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
890
|
-
).min(1).max(150).optional().nullable()
|
|
891
|
-
}).describe(
|
|
892
|
-
"Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
|
|
893
|
-
)
|
|
894
|
-
}),
|
|
895
|
-
z.object({
|
|
896
|
-
freeTextInput: z.never().optional(),
|
|
897
|
-
choicesSettings: z.object({
|
|
898
|
-
choices: z.array(
|
|
899
|
-
z.intersection(
|
|
900
|
-
z.object({
|
|
901
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
902
|
-
/^[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}$/,
|
|
903
|
-
"Must be a valid GUID"
|
|
904
|
-
).optional(),
|
|
905
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).optional(),
|
|
906
|
-
key: z.string().describe(
|
|
907
|
-
"A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
908
|
-
).min(1).max(50).optional().nullable(),
|
|
909
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
910
|
-
defaultAddedPrice: z.string().describe(
|
|
911
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
912
|
-
).optional().nullable()
|
|
913
|
-
}),
|
|
914
|
-
z.xor([
|
|
915
|
-
z.object({ colorCode: z.never().optional() }),
|
|
916
|
-
z.object({
|
|
917
|
-
colorCode: z.string().describe(
|
|
918
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
919
|
-
).min(3).max(20)
|
|
920
|
-
})
|
|
921
|
-
])
|
|
922
|
-
)
|
|
923
|
-
).min(1).max(200)
|
|
924
|
-
}).describe(
|
|
925
|
-
"Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
|
|
926
|
-
)
|
|
927
|
-
})
|
|
928
|
-
])
|
|
929
|
-
).describe("Customization to create.")
|
|
930
|
-
});
|
|
931
|
-
var CreateCustomizationResponse = z.intersection(
|
|
932
|
-
z.object({
|
|
933
|
-
_id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
|
|
934
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
935
|
-
"Revision number, which increments by 1 each time the customization is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the customization.\n\nIgnored when creating a customization."
|
|
936
|
-
).optional().nullable(),
|
|
937
|
-
_createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
|
|
938
|
-
_updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
|
|
939
|
-
key: z.string().describe(
|
|
940
|
-
"A read-only identifier generated from the customization name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
941
|
-
).min(1).max(50).optional().nullable(),
|
|
942
|
-
name: z.string().describe(
|
|
943
|
-
'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
|
|
944
|
-
).min(1).max(50).optional(),
|
|
945
|
-
customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
|
|
946
|
-
customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
|
|
947
|
-
"Customization render type.\n\nDefines how the customization will be displayed in the storefront."
|
|
948
|
-
).optional(),
|
|
949
|
-
assignedProductsCount: z.number().int().describe(
|
|
950
|
-
'Number of products this customization is assigned to.\n> **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests.'
|
|
951
|
-
).optional().nullable()
|
|
952
|
-
}),
|
|
953
|
-
z.xor([
|
|
954
|
-
z.object({
|
|
955
|
-
freeTextInput: z.never().optional(),
|
|
956
|
-
choicesSettings: z.never().optional()
|
|
957
|
-
}),
|
|
958
|
-
z.object({
|
|
959
|
-
choicesSettings: z.never().optional(),
|
|
960
|
-
freeTextInput: z.object({
|
|
961
|
-
minCharCount: z.number().int().describe("Minimum text character length.").optional(),
|
|
962
|
-
maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
|
|
963
|
-
defaultAddedPrice: z.string().describe(
|
|
964
|
-
"Default amount added to a product's price when this choice is assigned to a modifier."
|
|
965
|
-
).optional().nullable(),
|
|
966
|
-
title: z.string().describe("Title to display to customer for their free-text input.").min(1).max(100).optional(),
|
|
967
|
-
key: z.string().describe(
|
|
968
|
-
"A read-only identifier generated from the title.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
969
|
-
).min(1).max(150).optional().nullable()
|
|
970
|
-
}).describe(
|
|
971
|
-
"Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
|
|
972
|
-
)
|
|
973
|
-
}),
|
|
974
|
-
z.object({
|
|
975
|
-
freeTextInput: z.never().optional(),
|
|
976
|
-
choicesSettings: z.object({
|
|
977
|
-
choices: z.array(
|
|
978
|
-
z.intersection(
|
|
979
|
-
z.object({
|
|
980
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
981
|
-
/^[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}$/,
|
|
982
|
-
"Must be a valid GUID"
|
|
983
|
-
).optional(),
|
|
984
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
|
|
985
|
-
"Choice type.\n\n> **Notes:**\n> + For `customizationRenderType: SWATCH_CHOICES`, the supported `choiceType` value is: `ONE_COLOR`.\n> + For a `customizationRenderType` of `TEXT_CHOICES`, the supported `choiceType` value is: `CHOICE_TEXT`."
|
|
986
|
-
).optional(),
|
|
987
|
-
key: z.string().describe(
|
|
988
|
-
"A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
989
|
-
).min(1).max(50).optional().nullable(),
|
|
990
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
991
|
-
defaultAddedPrice: z.string().describe(
|
|
992
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
993
|
-
).optional().nullable()
|
|
994
|
-
}),
|
|
995
|
-
z.xor([
|
|
996
|
-
z.object({ colorCode: z.never().optional() }),
|
|
997
|
-
z.object({
|
|
998
|
-
colorCode: z.string().describe(
|
|
999
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
1000
|
-
).min(3).max(20)
|
|
1001
|
-
})
|
|
1002
|
-
])
|
|
1003
|
-
)
|
|
1004
|
-
).min(1).max(200).optional()
|
|
1005
|
-
}).describe(
|
|
1006
|
-
"Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
|
|
1007
|
-
)
|
|
1008
|
-
})
|
|
1009
|
-
])
|
|
1010
|
-
);
|
|
1011
|
-
var GetCustomizationRequest = z.object({
|
|
1012
|
-
customizationId: z.string().describe("Customization ID.").regex(
|
|
1013
|
-
/^[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}$/,
|
|
1014
|
-
"Must be a valid GUID"
|
|
1015
|
-
),
|
|
1016
|
-
options: z.object({
|
|
1017
|
-
fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
|
|
1018
|
-
}).optional()
|
|
1019
|
-
});
|
|
1020
|
-
var GetCustomizationResponse = z.intersection(
|
|
1021
|
-
z.object({
|
|
1022
|
-
_id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
|
|
1023
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1024
|
-
"Revision number, which increments by 1 each time the customization is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the customization.\n\nIgnored when creating a customization."
|
|
1025
|
-
).optional().nullable(),
|
|
1026
|
-
_createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
|
|
1027
|
-
_updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
|
|
1028
|
-
key: z.string().describe(
|
|
1029
|
-
"A read-only identifier generated from the customization name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
1030
|
-
).min(1).max(50).optional().nullable(),
|
|
1031
|
-
name: z.string().describe(
|
|
1032
|
-
'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
|
|
1033
|
-
).min(1).max(50).optional(),
|
|
1034
|
-
customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
|
|
1035
|
-
customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
|
|
1036
|
-
"Customization render type.\n\nDefines how the customization will be displayed in the storefront."
|
|
1037
|
-
).optional(),
|
|
1038
|
-
assignedProductsCount: z.number().int().describe(
|
|
1039
|
-
'Number of products this customization is assigned to.\n> **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests.'
|
|
1040
|
-
).optional().nullable()
|
|
1041
|
-
}),
|
|
1042
|
-
z.xor([
|
|
1043
|
-
z.object({
|
|
1044
|
-
freeTextInput: z.never().optional(),
|
|
1045
|
-
choicesSettings: z.never().optional()
|
|
1046
|
-
}),
|
|
1047
|
-
z.object({
|
|
1048
|
-
choicesSettings: z.never().optional(),
|
|
1049
|
-
freeTextInput: z.object({
|
|
1050
|
-
minCharCount: z.number().int().describe("Minimum text character length.").optional(),
|
|
1051
|
-
maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
|
|
1052
|
-
defaultAddedPrice: z.string().describe(
|
|
1053
|
-
"Default amount added to a product's price when this choice is assigned to a modifier."
|
|
1054
|
-
).optional().nullable(),
|
|
1055
|
-
title: z.string().describe("Title to display to customer for their free-text input.").min(1).max(100).optional(),
|
|
1056
|
-
key: z.string().describe(
|
|
1057
|
-
"A read-only identifier generated from the title.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
1058
|
-
).min(1).max(150).optional().nullable()
|
|
1059
|
-
}).describe(
|
|
1060
|
-
"Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
|
|
1061
|
-
)
|
|
1062
|
-
}),
|
|
1063
|
-
z.object({
|
|
1064
|
-
freeTextInput: z.never().optional(),
|
|
1065
|
-
choicesSettings: z.object({
|
|
1066
|
-
choices: z.array(
|
|
1067
|
-
z.intersection(
|
|
1068
|
-
z.object({
|
|
1069
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
1070
|
-
/^[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}$/,
|
|
1071
|
-
"Must be a valid GUID"
|
|
1072
|
-
).optional(),
|
|
1073
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
|
|
1074
|
-
"Choice type.\n\n> **Notes:**\n> + For `customizationRenderType: SWATCH_CHOICES`, the supported `choiceType` value is: `ONE_COLOR`.\n> + For a `customizationRenderType` of `TEXT_CHOICES`, the supported `choiceType` value is: `CHOICE_TEXT`."
|
|
1075
|
-
).optional(),
|
|
1076
|
-
key: z.string().describe(
|
|
1077
|
-
"A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
1078
|
-
).min(1).max(50).optional().nullable(),
|
|
1079
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
1080
|
-
defaultAddedPrice: z.string().describe(
|
|
1081
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
1082
|
-
).optional().nullable()
|
|
1083
|
-
}),
|
|
1084
|
-
z.xor([
|
|
1085
|
-
z.object({ colorCode: z.never().optional() }),
|
|
1086
|
-
z.object({
|
|
1087
|
-
colorCode: z.string().describe(
|
|
1088
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
1089
|
-
).min(3).max(20)
|
|
1090
|
-
})
|
|
1091
|
-
])
|
|
1092
|
-
)
|
|
1093
|
-
).min(1).max(200).optional()
|
|
1094
|
-
}).describe(
|
|
1095
|
-
"Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
|
|
1096
|
-
)
|
|
1097
|
-
})
|
|
1098
|
-
])
|
|
1099
|
-
);
|
|
1100
|
-
var UpdateCustomizationRequest = z.object({
|
|
1101
|
-
_id: z.string().describe("Customization ID.").min(1).max(36),
|
|
1102
|
-
customization: z.intersection(
|
|
1103
|
-
z.object({
|
|
1104
|
-
_id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
|
|
1105
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1106
|
-
"Revision number, which increments by 1 each time the customization is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the customization.\n\nIgnored when creating a customization."
|
|
1107
|
-
),
|
|
1108
|
-
_createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
|
|
1109
|
-
_updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
|
|
1110
|
-
key: z.string().describe(
|
|
1111
|
-
"A read-only identifier generated from the customization name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
1112
|
-
).min(1).max(50).optional().nullable(),
|
|
1113
|
-
name: z.string().describe(
|
|
1114
|
-
'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
|
|
1115
|
-
).min(1).max(50).optional(),
|
|
1116
|
-
customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).optional(),
|
|
1117
|
-
customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).optional(),
|
|
1118
|
-
assignedProductsCount: z.number().int().describe(
|
|
1119
|
-
'Number of products this customization is assigned to.\n> **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests.'
|
|
1120
|
-
).optional().nullable()
|
|
1121
|
-
}),
|
|
1122
|
-
z.xor([
|
|
1123
|
-
z.object({
|
|
1124
|
-
freeTextInput: z.never().optional(),
|
|
1125
|
-
choicesSettings: z.never().optional()
|
|
1126
|
-
}),
|
|
1127
|
-
z.object({
|
|
1128
|
-
choicesSettings: z.never().optional(),
|
|
1129
|
-
freeTextInput: z.object({
|
|
1130
|
-
minCharCount: z.number().int().describe("Minimum text character length.").optional(),
|
|
1131
|
-
maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
|
|
1132
|
-
defaultAddedPrice: z.string().describe(
|
|
1133
|
-
"Default amount added to a product's price when this choice is assigned to a modifier."
|
|
1134
|
-
).optional().nullable(),
|
|
1135
|
-
title: z.string().describe(
|
|
1136
|
-
"Title to display to customer for their free-text input."
|
|
1137
|
-
).min(1).max(100).optional(),
|
|
1138
|
-
key: z.string().describe(
|
|
1139
|
-
"A read-only identifier generated from the title.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
1140
|
-
).min(1).max(150).optional().nullable()
|
|
1141
|
-
}).describe(
|
|
1142
|
-
"Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
|
|
1143
|
-
)
|
|
1144
|
-
}),
|
|
1145
|
-
z.object({
|
|
1146
|
-
freeTextInput: z.never().optional(),
|
|
1147
|
-
choicesSettings: z.object({
|
|
1148
|
-
choices: z.array(
|
|
1149
|
-
z.intersection(
|
|
1150
|
-
z.object({
|
|
1151
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
1152
|
-
/^[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}$/,
|
|
1153
|
-
"Must be a valid GUID"
|
|
1154
|
-
),
|
|
1155
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).optional(),
|
|
1156
|
-
key: z.string().describe(
|
|
1157
|
-
"A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
1158
|
-
).min(1).max(50).optional().nullable(),
|
|
1159
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
1160
|
-
defaultAddedPrice: z.string().describe(
|
|
1161
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
1162
|
-
).optional().nullable()
|
|
1163
|
-
}),
|
|
1164
|
-
z.xor([
|
|
1165
|
-
z.object({ colorCode: z.never().optional() }),
|
|
1166
|
-
z.object({
|
|
1167
|
-
colorCode: z.string().describe(
|
|
1168
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
1169
|
-
).min(3).max(20)
|
|
1170
|
-
})
|
|
1171
|
-
])
|
|
1172
|
-
)
|
|
1173
|
-
).min(1).max(200).optional()
|
|
1174
|
-
}).describe(
|
|
1175
|
-
"Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
|
|
1176
|
-
)
|
|
1177
|
-
})
|
|
1178
|
-
])
|
|
1179
|
-
).describe("Customization to update."),
|
|
1180
|
-
options: z.object({
|
|
1181
|
-
fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
|
|
1182
|
-
}).optional()
|
|
1183
|
-
});
|
|
1184
|
-
var UpdateCustomizationResponse = z.intersection(
|
|
1185
|
-
z.object({
|
|
1186
|
-
_id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
|
|
1187
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1188
|
-
"Revision number, which increments by 1 each time the customization is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the customization.\n\nIgnored when creating a customization."
|
|
1189
|
-
).optional().nullable(),
|
|
1190
|
-
_createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
|
|
1191
|
-
_updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
|
|
1192
|
-
key: z.string().describe(
|
|
1193
|
-
"A read-only identifier generated from the customization name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
1194
|
-
).min(1).max(50).optional().nullable(),
|
|
1195
|
-
name: z.string().describe(
|
|
1196
|
-
'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
|
|
1197
|
-
).min(1).max(50).optional(),
|
|
1198
|
-
customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
|
|
1199
|
-
customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
|
|
1200
|
-
"Customization render type.\n\nDefines how the customization will be displayed in the storefront."
|
|
1201
|
-
).optional(),
|
|
1202
|
-
assignedProductsCount: z.number().int().describe(
|
|
1203
|
-
'Number of products this customization is assigned to.\n> **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests.'
|
|
1204
|
-
).optional().nullable()
|
|
1205
|
-
}),
|
|
1206
|
-
z.xor([
|
|
1207
|
-
z.object({
|
|
1208
|
-
freeTextInput: z.never().optional(),
|
|
1209
|
-
choicesSettings: z.never().optional()
|
|
1210
|
-
}),
|
|
1211
|
-
z.object({
|
|
1212
|
-
choicesSettings: z.never().optional(),
|
|
1213
|
-
freeTextInput: z.object({
|
|
1214
|
-
minCharCount: z.number().int().describe("Minimum text character length.").optional(),
|
|
1215
|
-
maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
|
|
1216
|
-
defaultAddedPrice: z.string().describe(
|
|
1217
|
-
"Default amount added to a product's price when this choice is assigned to a modifier."
|
|
1218
|
-
).optional().nullable(),
|
|
1219
|
-
title: z.string().describe("Title to display to customer for their free-text input.").min(1).max(100).optional(),
|
|
1220
|
-
key: z.string().describe(
|
|
1221
|
-
"A read-only identifier generated from the title.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
1222
|
-
).min(1).max(150).optional().nullable()
|
|
1223
|
-
}).describe(
|
|
1224
|
-
"Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
|
|
1225
|
-
)
|
|
1226
|
-
}),
|
|
1227
|
-
z.object({
|
|
1228
|
-
freeTextInput: z.never().optional(),
|
|
1229
|
-
choicesSettings: z.object({
|
|
1230
|
-
choices: z.array(
|
|
1231
|
-
z.intersection(
|
|
1232
|
-
z.object({
|
|
1233
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
1234
|
-
/^[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}$/,
|
|
1235
|
-
"Must be a valid GUID"
|
|
1236
|
-
).optional(),
|
|
1237
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
|
|
1238
|
-
"Choice type.\n\n> **Notes:**\n> + For `customizationRenderType: SWATCH_CHOICES`, the supported `choiceType` value is: `ONE_COLOR`.\n> + For a `customizationRenderType` of `TEXT_CHOICES`, the supported `choiceType` value is: `CHOICE_TEXT`."
|
|
1239
|
-
).optional(),
|
|
1240
|
-
key: z.string().describe(
|
|
1241
|
-
"A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
1242
|
-
).min(1).max(50).optional().nullable(),
|
|
1243
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
1244
|
-
defaultAddedPrice: z.string().describe(
|
|
1245
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
1246
|
-
).optional().nullable()
|
|
1247
|
-
}),
|
|
1248
|
-
z.xor([
|
|
1249
|
-
z.object({ colorCode: z.never().optional() }),
|
|
1250
|
-
z.object({
|
|
1251
|
-
colorCode: z.string().describe(
|
|
1252
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
1253
|
-
).min(3).max(20)
|
|
1254
|
-
})
|
|
1255
|
-
])
|
|
1256
|
-
)
|
|
1257
|
-
).min(1).max(200).optional()
|
|
1258
|
-
}).describe(
|
|
1259
|
-
"Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
|
|
1260
|
-
)
|
|
1261
|
-
})
|
|
1262
|
-
])
|
|
1263
|
-
);
|
|
1264
|
-
var DeleteCustomizationRequest = z.object({
|
|
1265
|
-
customizationId: z.string().describe("Customization ID.").regex(
|
|
1266
|
-
/^[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}$/,
|
|
1267
|
-
"Must be a valid GUID"
|
|
1268
|
-
)
|
|
1269
|
-
});
|
|
1270
|
-
var DeleteCustomizationResponse = z.object({});
|
|
1271
|
-
var QueryCustomizationsRequest = z.object({
|
|
1272
|
-
query: z.object({
|
|
1273
|
-
filter: z.object({
|
|
1274
|
-
_id: z.object({
|
|
1275
|
-
$eq: z.string(),
|
|
1276
|
-
$exists: z.boolean(),
|
|
1277
|
-
$gt: z.string(),
|
|
1278
|
-
$gte: z.string(),
|
|
1279
|
-
$hasAll: z.array(z.string()),
|
|
1280
|
-
$hasSome: z.array(z.string()),
|
|
1281
|
-
$in: z.array(z.string()),
|
|
1282
|
-
$lt: z.string(),
|
|
1283
|
-
$lte: z.string(),
|
|
1284
|
-
$ne: z.string(),
|
|
1285
|
-
$nin: z.array(z.string()),
|
|
1286
|
-
$startsWith: z.string()
|
|
1287
|
-
}).partial().strict().optional(),
|
|
1288
|
-
_createdDate: z.object({
|
|
1289
|
-
$eq: z.string(),
|
|
1290
|
-
$exists: z.boolean(),
|
|
1291
|
-
$gt: z.string(),
|
|
1292
|
-
$gte: z.string(),
|
|
1293
|
-
$hasAll: z.array(z.string()),
|
|
1294
|
-
$hasSome: z.array(z.string()),
|
|
1295
|
-
$in: z.array(z.string()),
|
|
1296
|
-
$lt: z.string(),
|
|
1297
|
-
$lte: z.string(),
|
|
1298
|
-
$ne: z.string(),
|
|
1299
|
-
$nin: z.array(z.string()),
|
|
1300
|
-
$startsWith: z.string()
|
|
1301
|
-
}).partial().strict().optional(),
|
|
1302
|
-
_updatedDate: z.object({
|
|
1303
|
-
$eq: z.string(),
|
|
1304
|
-
$exists: z.boolean(),
|
|
1305
|
-
$gt: z.string(),
|
|
1306
|
-
$gte: z.string(),
|
|
1307
|
-
$hasAll: z.array(z.string()),
|
|
1308
|
-
$hasSome: z.array(z.string()),
|
|
1309
|
-
$in: z.array(z.string()),
|
|
1310
|
-
$lt: z.string(),
|
|
1311
|
-
$lte: z.string(),
|
|
1312
|
-
$ne: z.string(),
|
|
1313
|
-
$nin: z.array(z.string()),
|
|
1314
|
-
$startsWith: z.string()
|
|
1315
|
-
}).partial().strict().optional(),
|
|
1316
|
-
name: z.object({
|
|
1317
|
-
$eq: z.string(),
|
|
1318
|
-
$exists: z.boolean(),
|
|
1319
|
-
$gt: z.string(),
|
|
1320
|
-
$gte: z.string(),
|
|
1321
|
-
$hasAll: z.array(z.string()),
|
|
1322
|
-
$hasSome: z.array(z.string()),
|
|
1323
|
-
$in: z.array(z.string()),
|
|
1324
|
-
$lt: z.string(),
|
|
1325
|
-
$lte: z.string(),
|
|
1326
|
-
$ne: z.string(),
|
|
1327
|
-
$nin: z.array(z.string()),
|
|
1328
|
-
$startsWith: z.string()
|
|
1329
|
-
}).partial().strict().optional(),
|
|
1330
|
-
customizationType: z.object({
|
|
1331
|
-
$eq: z.string(),
|
|
1332
|
-
$exists: z.boolean(),
|
|
1333
|
-
$gt: z.string(),
|
|
1334
|
-
$gte: z.string(),
|
|
1335
|
-
$hasAll: z.array(z.string()),
|
|
1336
|
-
$hasSome: z.array(z.string()),
|
|
1337
|
-
$in: z.array(z.string()),
|
|
1338
|
-
$lt: z.string(),
|
|
1339
|
-
$lte: z.string(),
|
|
1340
|
-
$ne: z.string(),
|
|
1341
|
-
$nin: z.array(z.string()),
|
|
1342
|
-
$startsWith: z.string()
|
|
1343
|
-
}).partial().strict().optional(),
|
|
1344
|
-
customizationRenderType: z.object({
|
|
1345
|
-
$eq: z.string(),
|
|
1346
|
-
$exists: z.boolean(),
|
|
1347
|
-
$gt: z.string(),
|
|
1348
|
-
$gte: z.string(),
|
|
1349
|
-
$hasAll: z.array(z.string()),
|
|
1350
|
-
$hasSome: z.array(z.string()),
|
|
1351
|
-
$in: z.array(z.string()),
|
|
1352
|
-
$lt: z.string(),
|
|
1353
|
-
$lte: z.string(),
|
|
1354
|
-
$ne: z.string(),
|
|
1355
|
-
$nin: z.array(z.string()),
|
|
1356
|
-
$startsWith: z.string()
|
|
1357
|
-
}).partial().strict().optional(),
|
|
1358
|
-
$and: z.array(z.any()).optional(),
|
|
1359
|
-
$or: z.array(z.any()).optional(),
|
|
1360
|
-
$not: z.any().optional()
|
|
1361
|
-
}).strict().optional(),
|
|
1362
|
-
sort: z.array(
|
|
1363
|
-
z.object({
|
|
1364
|
-
fieldName: z.enum(["_id", "_createdDate", "_updatedDate", "name"]).optional(),
|
|
1365
|
-
order: z.enum(["ASC", "DESC"]).optional()
|
|
1366
|
-
})
|
|
1367
|
-
).optional()
|
|
1368
|
-
}).catchall(z.any()).describe("Query options."),
|
|
1369
|
-
options: z.object({
|
|
1370
|
-
fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
|
|
1371
|
-
}).optional()
|
|
1372
|
-
});
|
|
1373
|
-
var QueryCustomizationsResponse = z.object({
|
|
1374
|
-
customizations: z.array(
|
|
1375
|
-
z.intersection(
|
|
1376
|
-
z.object({
|
|
1377
|
-
_id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
|
|
1378
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1379
|
-
"Revision number, which increments by 1 each time the customization is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the customization.\n\nIgnored when creating a customization."
|
|
1380
|
-
).optional().nullable(),
|
|
1381
|
-
_createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
|
|
1382
|
-
_updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
|
|
1383
|
-
key: z.string().describe(
|
|
1384
|
-
"A read-only identifier generated from the customization name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
1385
|
-
).min(1).max(50).optional().nullable(),
|
|
1386
|
-
name: z.string().describe(
|
|
1387
|
-
'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
|
|
1388
|
-
).min(1).max(50).optional(),
|
|
1389
|
-
customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
|
|
1390
|
-
customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
|
|
1391
|
-
"Customization render type.\n\nDefines how the customization will be displayed in the storefront."
|
|
1392
|
-
).optional(),
|
|
1393
|
-
assignedProductsCount: z.number().int().describe(
|
|
1394
|
-
'Number of products this customization is assigned to.\n> **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests.'
|
|
1395
|
-
).optional().nullable()
|
|
1396
|
-
}),
|
|
1397
|
-
z.xor([
|
|
1398
|
-
z.object({
|
|
1399
|
-
freeTextInput: z.never().optional(),
|
|
1400
|
-
choicesSettings: z.never().optional()
|
|
1401
|
-
}),
|
|
1402
|
-
z.object({
|
|
1403
|
-
choicesSettings: z.never().optional(),
|
|
1404
|
-
freeTextInput: z.object({
|
|
1405
|
-
minCharCount: z.number().int().describe("Minimum text character length.").optional(),
|
|
1406
|
-
maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
|
|
1407
|
-
defaultAddedPrice: z.string().describe(
|
|
1408
|
-
"Default amount added to a product's price when this choice is assigned to a modifier."
|
|
1409
|
-
).optional().nullable(),
|
|
1410
|
-
title: z.string().describe(
|
|
1411
|
-
"Title to display to customer for their free-text input."
|
|
1412
|
-
).min(1).max(100).optional(),
|
|
1413
|
-
key: z.string().describe(
|
|
1414
|
-
"A read-only identifier generated from the title.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
1415
|
-
).min(1).max(150).optional().nullable()
|
|
1416
|
-
}).describe(
|
|
1417
|
-
"Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
|
|
1418
|
-
)
|
|
1419
|
-
}),
|
|
1420
|
-
z.object({
|
|
1421
|
-
freeTextInput: z.never().optional(),
|
|
1422
|
-
choicesSettings: z.object({
|
|
1423
|
-
choices: z.array(
|
|
1424
|
-
z.intersection(
|
|
1425
|
-
z.object({
|
|
1426
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
1427
|
-
/^[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}$/,
|
|
1428
|
-
"Must be a valid GUID"
|
|
1429
|
-
).optional(),
|
|
1430
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
|
|
1431
|
-
"Choice type.\n\n> **Notes:**\n> + For `customizationRenderType: SWATCH_CHOICES`, the supported `choiceType` value is: `ONE_COLOR`.\n> + For a `customizationRenderType` of `TEXT_CHOICES`, the supported `choiceType` value is: `CHOICE_TEXT`."
|
|
1432
|
-
).optional(),
|
|
1433
|
-
key: z.string().describe(
|
|
1434
|
-
"A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
1435
|
-
).min(1).max(50).optional().nullable(),
|
|
1436
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
1437
|
-
defaultAddedPrice: z.string().describe(
|
|
1438
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
1439
|
-
).optional().nullable()
|
|
1440
|
-
}),
|
|
1441
|
-
z.xor([
|
|
1442
|
-
z.object({ colorCode: z.never().optional() }),
|
|
1443
|
-
z.object({
|
|
1444
|
-
colorCode: z.string().describe(
|
|
1445
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
1446
|
-
).min(3).max(20)
|
|
1447
|
-
})
|
|
1448
|
-
])
|
|
1449
|
-
)
|
|
1450
|
-
).min(1).max(200).optional()
|
|
1451
|
-
}).describe(
|
|
1452
|
-
"Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
|
|
1453
|
-
)
|
|
1454
|
-
})
|
|
1455
|
-
])
|
|
1456
|
-
)
|
|
1457
|
-
).min(1).max(200).optional(),
|
|
1458
|
-
pagingMetadata: z.object({
|
|
1459
|
-
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
1460
|
-
cursors: z.object({
|
|
1461
|
-
next: z.string().describe(
|
|
1462
|
-
"Cursor string pointing to the next page in the list of results."
|
|
1463
|
-
).max(16e3).optional().nullable(),
|
|
1464
|
-
prev: z.string().describe(
|
|
1465
|
-
"Cursor pointing to the previous page in the list of results."
|
|
1466
|
-
).max(16e3).optional().nullable()
|
|
1467
|
-
}).describe(
|
|
1468
|
-
"Cursor strings that point to the next page, previous page, or both."
|
|
1469
|
-
).optional(),
|
|
1470
|
-
hasNext: z.boolean().describe(
|
|
1471
|
-
"Whether there are more pages to retrieve following the current page.\n\n+ `true`: Another page of results can be retrieved.\n+ `false`: This is the last page."
|
|
1472
|
-
).optional().nullable()
|
|
1473
|
-
}).describe("Details on the paged set of results returned.").optional()
|
|
1474
|
-
});
|
|
1475
|
-
var BulkCreateCustomizationsRequest = z.object({
|
|
1476
|
-
customizations: z.array(
|
|
1477
|
-
z.intersection(
|
|
1478
|
-
z.object({
|
|
1479
|
-
_id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
|
|
1480
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1481
|
-
"Revision number, which increments by 1 each time the customization is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the customization.\n\nIgnored when creating a customization."
|
|
1482
|
-
).optional().nullable(),
|
|
1483
|
-
_createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
|
|
1484
|
-
_updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
|
|
1485
|
-
key: z.string().describe(
|
|
1486
|
-
"A read-only identifier generated from the customization name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
1487
|
-
).min(1).max(50).optional().nullable(),
|
|
1488
|
-
name: z.string().describe(
|
|
1489
|
-
'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
|
|
1490
|
-
).min(1).max(50).optional(),
|
|
1491
|
-
customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).optional(),
|
|
1492
|
-
customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).optional(),
|
|
1493
|
-
assignedProductsCount: z.number().int().describe(
|
|
1494
|
-
'Number of products this customization is assigned to.\n> **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests.'
|
|
1495
|
-
).optional().nullable()
|
|
1496
|
-
}),
|
|
1497
|
-
z.xor([
|
|
1498
|
-
z.object({
|
|
1499
|
-
freeTextInput: z.never().optional(),
|
|
1500
|
-
choicesSettings: z.never().optional()
|
|
1501
|
-
}),
|
|
1502
|
-
z.object({
|
|
1503
|
-
choicesSettings: z.never().optional(),
|
|
1504
|
-
freeTextInput: z.object({
|
|
1505
|
-
minCharCount: z.number().int().describe("Minimum text character length.").optional(),
|
|
1506
|
-
maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
|
|
1507
|
-
defaultAddedPrice: z.string().describe(
|
|
1508
|
-
"Default amount added to a product's price when this choice is assigned to a modifier."
|
|
1509
|
-
).optional().nullable(),
|
|
1510
|
-
title: z.string().describe(
|
|
1511
|
-
"Title to display to customer for their free-text input."
|
|
1512
|
-
).min(1).max(100).optional(),
|
|
1513
|
-
key: z.string().describe(
|
|
1514
|
-
"A read-only identifier generated from the title.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
1515
|
-
).min(1).max(150).optional().nullable()
|
|
1516
|
-
}).describe(
|
|
1517
|
-
"Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
|
|
1518
|
-
)
|
|
1519
|
-
}),
|
|
1520
|
-
z.object({
|
|
1521
|
-
freeTextInput: z.never().optional(),
|
|
1522
|
-
choicesSettings: z.object({
|
|
1523
|
-
choices: z.array(
|
|
1524
|
-
z.intersection(
|
|
1525
|
-
z.object({
|
|
1526
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
1527
|
-
/^[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}$/,
|
|
1528
|
-
"Must be a valid GUID"
|
|
1529
|
-
).optional(),
|
|
1530
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).optional(),
|
|
1531
|
-
key: z.string().describe(
|
|
1532
|
-
"A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
1533
|
-
).min(1).max(50).optional().nullable(),
|
|
1534
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
1535
|
-
defaultAddedPrice: z.string().describe(
|
|
1536
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
1537
|
-
).optional().nullable()
|
|
1538
|
-
}),
|
|
1539
|
-
z.xor([
|
|
1540
|
-
z.object({ colorCode: z.never().optional() }),
|
|
1541
|
-
z.object({
|
|
1542
|
-
colorCode: z.string().describe(
|
|
1543
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
1544
|
-
).min(3).max(20)
|
|
1545
|
-
})
|
|
1546
|
-
])
|
|
1547
|
-
)
|
|
1548
|
-
).min(1).max(200).optional()
|
|
1549
|
-
}).describe(
|
|
1550
|
-
"Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
|
|
1551
|
-
)
|
|
1552
|
-
})
|
|
1553
|
-
])
|
|
1554
|
-
)
|
|
1555
|
-
).min(1).max(100),
|
|
1556
|
-
options: z.object({
|
|
1557
|
-
returnEntity: z.boolean().describe(
|
|
1558
|
-
"Whether to return the full customization entities in the response.\n\nDefault: `false`"
|
|
1559
|
-
).optional()
|
|
1560
|
-
}).optional()
|
|
1561
|
-
});
|
|
1562
|
-
var BulkCreateCustomizationsResponse = z.object({
|
|
1563
|
-
results: z.array(
|
|
1564
|
-
z.object({
|
|
1565
|
-
itemMetadata: z.object({
|
|
1566
|
-
_id: z.string().describe(
|
|
1567
|
-
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
1568
|
-
).min(1).max(36).optional().nullable(),
|
|
1569
|
-
originalIndex: z.number().int().describe(
|
|
1570
|
-
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
1571
|
-
).optional(),
|
|
1572
|
-
success: z.boolean().describe(
|
|
1573
|
-
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
1574
|
-
).optional(),
|
|
1575
|
-
error: z.object({
|
|
1576
|
-
code: z.string().describe("Error code.").optional(),
|
|
1577
|
-
description: z.string().describe("Description of the error.").optional(),
|
|
1578
|
-
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
1579
|
-
}).describe("Details about the error in case of failure.").optional()
|
|
1580
|
-
}).describe("Bulk action metadata for customization.").optional(),
|
|
1581
|
-
customization: z.intersection(
|
|
1582
|
-
z.object({
|
|
1583
|
-
_id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
|
|
1584
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1585
|
-
"Revision number, which increments by 1 each time the customization is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the customization.\n\nIgnored when creating a customization."
|
|
1586
|
-
).optional().nullable(),
|
|
1587
|
-
_createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
|
|
1588
|
-
_updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
|
|
1589
|
-
key: z.string().describe(
|
|
1590
|
-
"A read-only identifier generated from the customization name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
1591
|
-
).min(1).max(50).optional().nullable(),
|
|
1592
|
-
name: z.string().describe(
|
|
1593
|
-
'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
|
|
1594
|
-
).min(1).max(50).optional(),
|
|
1595
|
-
customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
|
|
1596
|
-
customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
|
|
1597
|
-
"Customization render type.\n\nDefines how the customization will be displayed in the storefront."
|
|
1598
|
-
).optional(),
|
|
1599
|
-
assignedProductsCount: z.number().int().describe(
|
|
1600
|
-
'Number of products this customization is assigned to.\n> **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests.'
|
|
1601
|
-
).optional().nullable()
|
|
1602
|
-
}),
|
|
1603
|
-
z.xor([
|
|
1604
|
-
z.object({
|
|
1605
|
-
freeTextInput: z.never().optional(),
|
|
1606
|
-
choicesSettings: z.never().optional()
|
|
1607
|
-
}),
|
|
1608
|
-
z.object({
|
|
1609
|
-
choicesSettings: z.never().optional(),
|
|
1610
|
-
freeTextInput: z.object({
|
|
1611
|
-
minCharCount: z.number().int().describe("Minimum text character length.").optional(),
|
|
1612
|
-
maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
|
|
1613
|
-
defaultAddedPrice: z.string().describe(
|
|
1614
|
-
"Default amount added to a product's price when this choice is assigned to a modifier."
|
|
1615
|
-
).optional().nullable(),
|
|
1616
|
-
title: z.string().describe(
|
|
1617
|
-
"Title to display to customer for their free-text input."
|
|
1618
|
-
).min(1).max(100).optional(),
|
|
1619
|
-
key: z.string().describe(
|
|
1620
|
-
"A read-only identifier generated from the title.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
1621
|
-
).min(1).max(150).optional().nullable()
|
|
1622
|
-
}).describe(
|
|
1623
|
-
"Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
|
|
1624
|
-
)
|
|
1625
|
-
}),
|
|
1626
|
-
z.object({
|
|
1627
|
-
freeTextInput: z.never().optional(),
|
|
1628
|
-
choicesSettings: z.object({
|
|
1629
|
-
choices: z.array(
|
|
1630
|
-
z.intersection(
|
|
1631
|
-
z.object({
|
|
1632
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
1633
|
-
/^[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}$/,
|
|
1634
|
-
"Must be a valid GUID"
|
|
1635
|
-
).optional(),
|
|
1636
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
|
|
1637
|
-
"Choice type.\n\n> **Notes:**\n> + For `customizationRenderType: SWATCH_CHOICES`, the supported `choiceType` value is: `ONE_COLOR`.\n> + For a `customizationRenderType` of `TEXT_CHOICES`, the supported `choiceType` value is: `CHOICE_TEXT`."
|
|
1638
|
-
).optional(),
|
|
1639
|
-
key: z.string().describe(
|
|
1640
|
-
"A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
1641
|
-
).min(1).max(50).optional().nullable(),
|
|
1642
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
1643
|
-
defaultAddedPrice: z.string().describe(
|
|
1644
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
1645
|
-
).optional().nullable()
|
|
1646
|
-
}),
|
|
1647
|
-
z.xor([
|
|
1648
|
-
z.object({ colorCode: z.never().optional() }),
|
|
1649
|
-
z.object({
|
|
1650
|
-
colorCode: z.string().describe(
|
|
1651
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
1652
|
-
).min(3).max(20)
|
|
1653
|
-
})
|
|
1654
|
-
])
|
|
1655
|
-
)
|
|
1656
|
-
).min(1).max(200).optional()
|
|
1657
|
-
}).describe(
|
|
1658
|
-
"Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
|
|
1659
|
-
)
|
|
1660
|
-
})
|
|
1661
|
-
])
|
|
1662
|
-
).describe(
|
|
1663
|
-
"Full customization entity.\n\nReturned only if `returnEntity: true` is passed in the request."
|
|
1664
|
-
).optional()
|
|
1665
|
-
})
|
|
1666
|
-
).min(1).max(100).optional(),
|
|
1667
|
-
bulkActionMetadata: z.object({
|
|
1668
|
-
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
1669
|
-
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
1670
|
-
undetailedFailures: z.number().int().describe(
|
|
1671
|
-
"Number of failures without details because detailed failure threshold was exceeded."
|
|
1672
|
-
).optional()
|
|
1673
|
-
}).describe("Bulk action metadata.").optional()
|
|
1674
|
-
});
|
|
1675
|
-
var AddCustomizationChoicesRequest = z.object({
|
|
1676
|
-
customizationId: z.string().describe("Customization ID.").regex(
|
|
1677
|
-
/^[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}$/,
|
|
1678
|
-
"Must be a valid GUID"
|
|
1679
|
-
),
|
|
1680
|
-
choices: z.array(
|
|
1681
|
-
z.intersection(
|
|
1682
|
-
z.object({
|
|
1683
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
1684
|
-
/^[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}$/,
|
|
1685
|
-
"Must be a valid GUID"
|
|
1686
|
-
).optional(),
|
|
1687
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).optional(),
|
|
1688
|
-
key: z.string().describe(
|
|
1689
|
-
"A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
1690
|
-
).min(1).max(50).optional().nullable(),
|
|
1691
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
1692
|
-
defaultAddedPrice: z.string().describe(
|
|
1693
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
1694
|
-
).optional().nullable()
|
|
1695
|
-
}),
|
|
1696
|
-
z.xor([
|
|
1697
|
-
z.object({ colorCode: z.never().optional() }),
|
|
1698
|
-
z.object({
|
|
1699
|
-
colorCode: z.string().describe(
|
|
1700
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
1701
|
-
).min(3).max(20)
|
|
1702
|
-
})
|
|
1703
|
-
])
|
|
1704
|
-
)
|
|
1705
|
-
).min(1).max(100),
|
|
1706
|
-
options: z.object({
|
|
1707
|
-
fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
|
|
1708
|
-
}).optional()
|
|
1709
|
-
});
|
|
1710
|
-
var AddCustomizationChoicesResponse = z.object({
|
|
1711
|
-
customization: z.intersection(
|
|
1712
|
-
z.object({
|
|
1713
|
-
_id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
|
|
1714
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1715
|
-
"Revision number, which increments by 1 each time the customization is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the customization.\n\nIgnored when creating a customization."
|
|
1716
|
-
).optional().nullable(),
|
|
1717
|
-
_createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
|
|
1718
|
-
_updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
|
|
1719
|
-
key: z.string().describe(
|
|
1720
|
-
"A read-only identifier generated from the customization name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
1721
|
-
).min(1).max(50).optional().nullable(),
|
|
1722
|
-
name: z.string().describe(
|
|
1723
|
-
'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
|
|
1724
|
-
).min(1).max(50).optional(),
|
|
1725
|
-
customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
|
|
1726
|
-
customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
|
|
1727
|
-
"Customization render type.\n\nDefines how the customization will be displayed in the storefront."
|
|
1728
|
-
).optional(),
|
|
1729
|
-
assignedProductsCount: z.number().int().describe(
|
|
1730
|
-
'Number of products this customization is assigned to.\n> **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests.'
|
|
1731
|
-
).optional().nullable()
|
|
1732
|
-
}),
|
|
1733
|
-
z.xor([
|
|
1734
|
-
z.object({
|
|
1735
|
-
freeTextInput: z.never().optional(),
|
|
1736
|
-
choicesSettings: z.never().optional()
|
|
1737
|
-
}),
|
|
1738
|
-
z.object({
|
|
1739
|
-
choicesSettings: z.never().optional(),
|
|
1740
|
-
freeTextInput: z.object({
|
|
1741
|
-
minCharCount: z.number().int().describe("Minimum text character length.").optional(),
|
|
1742
|
-
maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
|
|
1743
|
-
defaultAddedPrice: z.string().describe(
|
|
1744
|
-
"Default amount added to a product's price when this choice is assigned to a modifier."
|
|
1745
|
-
).optional().nullable(),
|
|
1746
|
-
title: z.string().describe(
|
|
1747
|
-
"Title to display to customer for their free-text input."
|
|
1748
|
-
).min(1).max(100).optional(),
|
|
1749
|
-
key: z.string().describe(
|
|
1750
|
-
"A read-only identifier generated from the title.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
1751
|
-
).min(1).max(150).optional().nullable()
|
|
1752
|
-
}).describe(
|
|
1753
|
-
"Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
|
|
1754
|
-
)
|
|
1755
|
-
}),
|
|
1756
|
-
z.object({
|
|
1757
|
-
freeTextInput: z.never().optional(),
|
|
1758
|
-
choicesSettings: z.object({
|
|
1759
|
-
choices: z.array(
|
|
1760
|
-
z.intersection(
|
|
1761
|
-
z.object({
|
|
1762
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
1763
|
-
/^[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}$/,
|
|
1764
|
-
"Must be a valid GUID"
|
|
1765
|
-
).optional(),
|
|
1766
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
|
|
1767
|
-
"Choice type.\n\n> **Notes:**\n> + For `customizationRenderType: SWATCH_CHOICES`, the supported `choiceType` value is: `ONE_COLOR`.\n> + For a `customizationRenderType` of `TEXT_CHOICES`, the supported `choiceType` value is: `CHOICE_TEXT`."
|
|
1768
|
-
).optional(),
|
|
1769
|
-
key: z.string().describe(
|
|
1770
|
-
"A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
1771
|
-
).min(1).max(50).optional().nullable(),
|
|
1772
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
1773
|
-
defaultAddedPrice: z.string().describe(
|
|
1774
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
1775
|
-
).optional().nullable()
|
|
1776
|
-
}),
|
|
1777
|
-
z.xor([
|
|
1778
|
-
z.object({ colorCode: z.never().optional() }),
|
|
1779
|
-
z.object({
|
|
1780
|
-
colorCode: z.string().describe(
|
|
1781
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
1782
|
-
).min(3).max(20)
|
|
1783
|
-
})
|
|
1784
|
-
])
|
|
1785
|
-
)
|
|
1786
|
-
).min(1).max(200).optional()
|
|
1787
|
-
}).describe(
|
|
1788
|
-
"Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
|
|
1789
|
-
)
|
|
1790
|
-
})
|
|
1791
|
-
])
|
|
1792
|
-
).describe("Updated customization.").optional()
|
|
1793
|
-
});
|
|
1794
|
-
var SetCustomizationChoicesRequest = z.object({
|
|
1795
|
-
customizationId: z.string().describe("Customization ID.").regex(
|
|
1796
|
-
/^[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}$/,
|
|
1797
|
-
"Must be a valid GUID"
|
|
1798
|
-
),
|
|
1799
|
-
choices: z.array(
|
|
1800
|
-
z.intersection(
|
|
1801
|
-
z.object({
|
|
1802
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
1803
|
-
/^[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}$/,
|
|
1804
|
-
"Must be a valid GUID"
|
|
1805
|
-
).optional(),
|
|
1806
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).optional(),
|
|
1807
|
-
key: z.string().describe(
|
|
1808
|
-
"A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
1809
|
-
).min(1).max(50).optional().nullable(),
|
|
1810
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
1811
|
-
defaultAddedPrice: z.string().describe(
|
|
1812
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
1813
|
-
).optional().nullable()
|
|
1814
|
-
}),
|
|
1815
|
-
z.xor([
|
|
1816
|
-
z.object({ colorCode: z.never().optional() }),
|
|
1817
|
-
z.object({
|
|
1818
|
-
colorCode: z.string().describe(
|
|
1819
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
1820
|
-
).min(3).max(20)
|
|
1821
|
-
})
|
|
1822
|
-
])
|
|
1823
|
-
)
|
|
1824
|
-
).min(1).max(200),
|
|
1825
|
-
options: z.object({
|
|
1826
|
-
fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
|
|
1827
|
-
}).optional()
|
|
1828
|
-
});
|
|
1829
|
-
var SetCustomizationChoicesResponse = z.object({
|
|
1830
|
-
customization: z.intersection(
|
|
1831
|
-
z.object({
|
|
1832
|
-
_id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
|
|
1833
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1834
|
-
"Revision number, which increments by 1 each time the customization is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the customization.\n\nIgnored when creating a customization."
|
|
1835
|
-
).optional().nullable(),
|
|
1836
|
-
_createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
|
|
1837
|
-
_updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
|
|
1838
|
-
key: z.string().describe(
|
|
1839
|
-
"A read-only identifier generated from the customization name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
1840
|
-
).min(1).max(50).optional().nullable(),
|
|
1841
|
-
name: z.string().describe(
|
|
1842
|
-
'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
|
|
1843
|
-
).min(1).max(50).optional(),
|
|
1844
|
-
customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
|
|
1845
|
-
customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
|
|
1846
|
-
"Customization render type.\n\nDefines how the customization will be displayed in the storefront."
|
|
1847
|
-
).optional(),
|
|
1848
|
-
assignedProductsCount: z.number().int().describe(
|
|
1849
|
-
'Number of products this customization is assigned to.\n> **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests.'
|
|
1850
|
-
).optional().nullable()
|
|
1851
|
-
}),
|
|
1852
|
-
z.xor([
|
|
1853
|
-
z.object({
|
|
1854
|
-
freeTextInput: z.never().optional(),
|
|
1855
|
-
choicesSettings: z.never().optional()
|
|
1856
|
-
}),
|
|
1857
|
-
z.object({
|
|
1858
|
-
choicesSettings: z.never().optional(),
|
|
1859
|
-
freeTextInput: z.object({
|
|
1860
|
-
minCharCount: z.number().int().describe("Minimum text character length.").optional(),
|
|
1861
|
-
maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
|
|
1862
|
-
defaultAddedPrice: z.string().describe(
|
|
1863
|
-
"Default amount added to a product's price when this choice is assigned to a modifier."
|
|
1864
|
-
).optional().nullable(),
|
|
1865
|
-
title: z.string().describe(
|
|
1866
|
-
"Title to display to customer for their free-text input."
|
|
1867
|
-
).min(1).max(100).optional(),
|
|
1868
|
-
key: z.string().describe(
|
|
1869
|
-
"A read-only identifier generated from the title.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
1870
|
-
).min(1).max(150).optional().nullable()
|
|
1871
|
-
}).describe(
|
|
1872
|
-
"Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
|
|
1873
|
-
)
|
|
1874
|
-
}),
|
|
1875
|
-
z.object({
|
|
1876
|
-
freeTextInput: z.never().optional(),
|
|
1877
|
-
choicesSettings: z.object({
|
|
1878
|
-
choices: z.array(
|
|
1879
|
-
z.intersection(
|
|
1880
|
-
z.object({
|
|
1881
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
1882
|
-
/^[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}$/,
|
|
1883
|
-
"Must be a valid GUID"
|
|
1884
|
-
).optional(),
|
|
1885
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
|
|
1886
|
-
"Choice type.\n\n> **Notes:**\n> + For `customizationRenderType: SWATCH_CHOICES`, the supported `choiceType` value is: `ONE_COLOR`.\n> + For a `customizationRenderType` of `TEXT_CHOICES`, the supported `choiceType` value is: `CHOICE_TEXT`."
|
|
1887
|
-
).optional(),
|
|
1888
|
-
key: z.string().describe(
|
|
1889
|
-
"A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
1890
|
-
).min(1).max(50).optional().nullable(),
|
|
1891
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
1892
|
-
defaultAddedPrice: z.string().describe(
|
|
1893
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
1894
|
-
).optional().nullable()
|
|
1895
|
-
}),
|
|
1896
|
-
z.xor([
|
|
1897
|
-
z.object({ colorCode: z.never().optional() }),
|
|
1898
|
-
z.object({
|
|
1899
|
-
colorCode: z.string().describe(
|
|
1900
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
1901
|
-
).min(3).max(20)
|
|
1902
|
-
})
|
|
1903
|
-
])
|
|
1904
|
-
)
|
|
1905
|
-
).min(1).max(200).optional()
|
|
1906
|
-
}).describe(
|
|
1907
|
-
"Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
|
|
1908
|
-
)
|
|
1909
|
-
})
|
|
1910
|
-
])
|
|
1911
|
-
).describe("Updated customization.").optional()
|
|
1912
|
-
});
|
|
1913
|
-
var RemoveCustomizationChoicesRequest = z.object({
|
|
1914
|
-
customizationId: z.string().describe("Customization ID.").regex(
|
|
1915
|
-
/^[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}$/,
|
|
1916
|
-
"Must be a valid GUID"
|
|
1917
|
-
),
|
|
1918
|
-
choiceIds: z.array(z.string()).min(1).max(100),
|
|
1919
|
-
options: z.object({
|
|
1920
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe("Customization revision.").optional(),
|
|
1921
|
-
fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
|
|
1922
|
-
}).optional()
|
|
1923
|
-
});
|
|
1924
|
-
var RemoveCustomizationChoicesResponse = z.object({
|
|
1925
|
-
customization: z.intersection(
|
|
1926
|
-
z.object({
|
|
1927
|
-
_id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
|
|
1928
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1929
|
-
"Revision number, which increments by 1 each time the customization is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the customization.\n\nIgnored when creating a customization."
|
|
1930
|
-
).optional().nullable(),
|
|
1931
|
-
_createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
|
|
1932
|
-
_updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
|
|
1933
|
-
key: z.string().describe(
|
|
1934
|
-
"A read-only identifier generated from the customization name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
1935
|
-
).min(1).max(50).optional().nullable(),
|
|
1936
|
-
name: z.string().describe(
|
|
1937
|
-
'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
|
|
1938
|
-
).min(1).max(50).optional(),
|
|
1939
|
-
customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
|
|
1940
|
-
customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
|
|
1941
|
-
"Customization render type.\n\nDefines how the customization will be displayed in the storefront."
|
|
1942
|
-
).optional(),
|
|
1943
|
-
assignedProductsCount: z.number().int().describe(
|
|
1944
|
-
'Number of products this customization is assigned to.\n> **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests.'
|
|
1945
|
-
).optional().nullable()
|
|
1946
|
-
}),
|
|
1947
|
-
z.xor([
|
|
1948
|
-
z.object({
|
|
1949
|
-
freeTextInput: z.never().optional(),
|
|
1950
|
-
choicesSettings: z.never().optional()
|
|
1951
|
-
}),
|
|
1952
|
-
z.object({
|
|
1953
|
-
choicesSettings: z.never().optional(),
|
|
1954
|
-
freeTextInput: z.object({
|
|
1955
|
-
minCharCount: z.number().int().describe("Minimum text character length.").optional(),
|
|
1956
|
-
maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
|
|
1957
|
-
defaultAddedPrice: z.string().describe(
|
|
1958
|
-
"Default amount added to a product's price when this choice is assigned to a modifier."
|
|
1959
|
-
).optional().nullable(),
|
|
1960
|
-
title: z.string().describe(
|
|
1961
|
-
"Title to display to customer for their free-text input."
|
|
1962
|
-
).min(1).max(100).optional(),
|
|
1963
|
-
key: z.string().describe(
|
|
1964
|
-
"A read-only identifier generated from the title.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
1965
|
-
).min(1).max(150).optional().nullable()
|
|
1966
|
-
}).describe(
|
|
1967
|
-
"Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
|
|
1968
|
-
)
|
|
1969
|
-
}),
|
|
1970
|
-
z.object({
|
|
1971
|
-
freeTextInput: z.never().optional(),
|
|
1972
|
-
choicesSettings: z.object({
|
|
1973
|
-
choices: z.array(
|
|
1974
|
-
z.intersection(
|
|
1975
|
-
z.object({
|
|
1976
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
1977
|
-
/^[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}$/,
|
|
1978
|
-
"Must be a valid GUID"
|
|
1979
|
-
).optional(),
|
|
1980
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
|
|
1981
|
-
"Choice type.\n\n> **Notes:**\n> + For `customizationRenderType: SWATCH_CHOICES`, the supported `choiceType` value is: `ONE_COLOR`.\n> + For a `customizationRenderType` of `TEXT_CHOICES`, the supported `choiceType` value is: `CHOICE_TEXT`."
|
|
1982
|
-
).optional(),
|
|
1983
|
-
key: z.string().describe(
|
|
1984
|
-
"A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
1985
|
-
).min(1).max(50).optional().nullable(),
|
|
1986
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
1987
|
-
defaultAddedPrice: z.string().describe(
|
|
1988
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
1989
|
-
).optional().nullable()
|
|
1990
|
-
}),
|
|
1991
|
-
z.xor([
|
|
1992
|
-
z.object({ colorCode: z.never().optional() }),
|
|
1993
|
-
z.object({
|
|
1994
|
-
colorCode: z.string().describe(
|
|
1995
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
1996
|
-
).min(3).max(20)
|
|
1997
|
-
})
|
|
1998
|
-
])
|
|
1999
|
-
)
|
|
2000
|
-
).min(1).max(200).optional()
|
|
2001
|
-
}).describe(
|
|
2002
|
-
"Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
|
|
2003
|
-
)
|
|
2004
|
-
})
|
|
2005
|
-
])
|
|
2006
|
-
).describe("Updated customization.").optional()
|
|
2007
|
-
});
|
|
2008
|
-
var BulkAddCustomizationChoicesRequest = z.object({
|
|
2009
|
-
customizationsChoices: z.array(
|
|
2010
|
-
z.object({
|
|
2011
|
-
customizationId: z.string().describe("Customization ID.").min(1).max(36),
|
|
2012
|
-
choices: z.array(
|
|
2013
|
-
z.intersection(
|
|
2014
|
-
z.object({
|
|
2015
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
2016
|
-
/^[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}$/,
|
|
2017
|
-
"Must be a valid GUID"
|
|
2018
|
-
).optional(),
|
|
2019
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).optional(),
|
|
2020
|
-
key: z.string().describe(
|
|
2021
|
-
"A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
2022
|
-
).min(1).max(50).optional().nullable(),
|
|
2023
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
2024
|
-
defaultAddedPrice: z.string().describe(
|
|
2025
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
2026
|
-
).optional().nullable()
|
|
2027
|
-
}),
|
|
2028
|
-
z.xor([
|
|
2029
|
-
z.object({ colorCode: z.never().optional() }),
|
|
2030
|
-
z.object({
|
|
2031
|
-
colorCode: z.string().describe(
|
|
2032
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
2033
|
-
).min(3).max(20)
|
|
2034
|
-
})
|
|
2035
|
-
])
|
|
2036
|
-
)
|
|
2037
|
-
).min(1).max(100)
|
|
2038
|
-
})
|
|
2039
|
-
).min(1).max(100),
|
|
2040
|
-
options: z.object({
|
|
2041
|
-
returnEntity: z.boolean().describe(
|
|
2042
|
-
"Whether to return the full customization entities in the response.\n\nDefault: `false`"
|
|
2043
|
-
).optional(),
|
|
2044
|
-
fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
|
|
2045
|
-
}).optional()
|
|
2046
|
-
});
|
|
2047
|
-
var BulkAddCustomizationChoicesResponse = z.object({
|
|
2048
|
-
results: z.array(
|
|
2049
|
-
z.object({
|
|
2050
|
-
itemMetadata: z.object({
|
|
2051
|
-
_id: z.string().describe(
|
|
2052
|
-
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
2053
|
-
).min(1).max(36).optional().nullable(),
|
|
2054
|
-
originalIndex: z.number().int().describe(
|
|
2055
|
-
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
2056
|
-
).optional(),
|
|
2057
|
-
success: z.boolean().describe(
|
|
2058
|
-
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
2059
|
-
).optional(),
|
|
2060
|
-
error: z.object({
|
|
2061
|
-
code: z.string().describe("Error code.").optional(),
|
|
2062
|
-
description: z.string().describe("Description of the error.").optional(),
|
|
2063
|
-
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
2064
|
-
}).describe("Details about the error in case of failure.").optional()
|
|
2065
|
-
}).describe("Bulk action metadata for customization.").optional(),
|
|
2066
|
-
customization: z.intersection(
|
|
2067
|
-
z.object({
|
|
2068
|
-
_id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
|
|
2069
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
2070
|
-
"Revision number, which increments by 1 each time the customization is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the customization.\n\nIgnored when creating a customization."
|
|
2071
|
-
).optional().nullable(),
|
|
2072
|
-
_createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
|
|
2073
|
-
_updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
|
|
2074
|
-
key: z.string().describe(
|
|
2075
|
-
"A read-only identifier generated from the customization name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
2076
|
-
).min(1).max(50).optional().nullable(),
|
|
2077
|
-
name: z.string().describe(
|
|
2078
|
-
'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
|
|
2079
|
-
).min(1).max(50).optional(),
|
|
2080
|
-
customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
|
|
2081
|
-
customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
|
|
2082
|
-
"Customization render type.\n\nDefines how the customization will be displayed in the storefront."
|
|
2083
|
-
).optional(),
|
|
2084
|
-
assignedProductsCount: z.number().int().describe(
|
|
2085
|
-
'Number of products this customization is assigned to.\n> **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests.'
|
|
2086
|
-
).optional().nullable()
|
|
2087
|
-
}),
|
|
2088
|
-
z.xor([
|
|
2089
|
-
z.object({
|
|
2090
|
-
freeTextInput: z.never().optional(),
|
|
2091
|
-
choicesSettings: z.never().optional()
|
|
2092
|
-
}),
|
|
2093
|
-
z.object({
|
|
2094
|
-
choicesSettings: z.never().optional(),
|
|
2095
|
-
freeTextInput: z.object({
|
|
2096
|
-
minCharCount: z.number().int().describe("Minimum text character length.").optional(),
|
|
2097
|
-
maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
|
|
2098
|
-
defaultAddedPrice: z.string().describe(
|
|
2099
|
-
"Default amount added to a product's price when this choice is assigned to a modifier."
|
|
2100
|
-
).optional().nullable(),
|
|
2101
|
-
title: z.string().describe(
|
|
2102
|
-
"Title to display to customer for their free-text input."
|
|
2103
|
-
).min(1).max(100).optional(),
|
|
2104
|
-
key: z.string().describe(
|
|
2105
|
-
"A read-only identifier generated from the title.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
2106
|
-
).min(1).max(150).optional().nullable()
|
|
2107
|
-
}).describe(
|
|
2108
|
-
"Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
|
|
2109
|
-
)
|
|
2110
|
-
}),
|
|
2111
|
-
z.object({
|
|
2112
|
-
freeTextInput: z.never().optional(),
|
|
2113
|
-
choicesSettings: z.object({
|
|
2114
|
-
choices: z.array(
|
|
2115
|
-
z.intersection(
|
|
2116
|
-
z.object({
|
|
2117
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
2118
|
-
/^[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}$/,
|
|
2119
|
-
"Must be a valid GUID"
|
|
2120
|
-
).optional(),
|
|
2121
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
|
|
2122
|
-
"Choice type.\n\n> **Notes:**\n> + For `customizationRenderType: SWATCH_CHOICES`, the supported `choiceType` value is: `ONE_COLOR`.\n> + For a `customizationRenderType` of `TEXT_CHOICES`, the supported `choiceType` value is: `CHOICE_TEXT`."
|
|
2123
|
-
).optional(),
|
|
2124
|
-
key: z.string().describe(
|
|
2125
|
-
"A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
2126
|
-
).min(1).max(50).optional().nullable(),
|
|
2127
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
2128
|
-
defaultAddedPrice: z.string().describe(
|
|
2129
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
2130
|
-
).optional().nullable()
|
|
2131
|
-
}),
|
|
2132
|
-
z.xor([
|
|
2133
|
-
z.object({ colorCode: z.never().optional() }),
|
|
2134
|
-
z.object({
|
|
2135
|
-
colorCode: z.string().describe(
|
|
2136
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
2137
|
-
).min(3).max(20)
|
|
2138
|
-
})
|
|
2139
|
-
])
|
|
2140
|
-
)
|
|
2141
|
-
).min(1).max(200).optional()
|
|
2142
|
-
}).describe(
|
|
2143
|
-
"Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
|
|
2144
|
-
)
|
|
2145
|
-
})
|
|
2146
|
-
])
|
|
2147
|
-
).describe(
|
|
2148
|
-
"Full customization entity.\n\nReturned only if `returnEntity: true` is passed in the request."
|
|
2149
|
-
).optional()
|
|
2150
|
-
})
|
|
2151
|
-
).min(1).max(100).optional(),
|
|
2152
|
-
bulkActionMetadata: z.object({
|
|
2153
|
-
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
2154
|
-
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
2155
|
-
undetailedFailures: z.number().int().describe(
|
|
2156
|
-
"Number of failures without details because detailed failure threshold was exceeded."
|
|
2157
|
-
).optional()
|
|
2158
|
-
}).describe("Bulk action metadata.").optional()
|
|
2159
|
-
});
|
|
2160
|
-
var BulkUpdateCustomizationsRequest = z.object({
|
|
2161
|
-
customizations: z.array(
|
|
2162
|
-
z.object({
|
|
2163
|
-
customization: z.intersection(
|
|
2164
|
-
z.object({
|
|
2165
|
-
_id: z.string().describe("Customization ID.").min(1).max(36),
|
|
2166
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
2167
|
-
"Revision number, which increments by 1 each time the customization is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the customization.\n\nIgnored when creating a customization."
|
|
2168
|
-
),
|
|
2169
|
-
_createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
|
|
2170
|
-
_updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
|
|
2171
|
-
key: z.string().describe(
|
|
2172
|
-
"A read-only identifier generated from the customization name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
2173
|
-
).min(1).max(50).optional().nullable(),
|
|
2174
|
-
name: z.string().describe(
|
|
2175
|
-
'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
|
|
2176
|
-
).min(1).max(50),
|
|
2177
|
-
customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).optional(),
|
|
2178
|
-
customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).optional(),
|
|
2179
|
-
assignedProductsCount: z.number().int().describe(
|
|
2180
|
-
'Number of products this customization is assigned to.\n> **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests.'
|
|
2181
|
-
).optional().nullable()
|
|
2182
|
-
}),
|
|
2183
|
-
z.xor([
|
|
2184
|
-
z.object({
|
|
2185
|
-
freeTextInput: z.never().optional(),
|
|
2186
|
-
choicesSettings: z.never().optional()
|
|
2187
|
-
}),
|
|
2188
|
-
z.object({
|
|
2189
|
-
choicesSettings: z.never().optional(),
|
|
2190
|
-
freeTextInput: z.object({
|
|
2191
|
-
minCharCount: z.number().int().describe("Minimum text character length.").optional(),
|
|
2192
|
-
maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
|
|
2193
|
-
defaultAddedPrice: z.string().describe(
|
|
2194
|
-
"Default amount added to a product's price when this choice is assigned to a modifier."
|
|
2195
|
-
).optional().nullable(),
|
|
2196
|
-
title: z.string().describe(
|
|
2197
|
-
"Title to display to customer for their free-text input."
|
|
2198
|
-
).min(1).max(100).optional(),
|
|
2199
|
-
key: z.string().describe(
|
|
2200
|
-
"A read-only identifier generated from the title.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
2201
|
-
).min(1).max(150).optional().nullable()
|
|
2202
|
-
}).describe(
|
|
2203
|
-
"Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
|
|
2204
|
-
)
|
|
2205
|
-
}),
|
|
2206
|
-
z.object({
|
|
2207
|
-
freeTextInput: z.never().optional(),
|
|
2208
|
-
choicesSettings: z.object({
|
|
2209
|
-
choices: z.array(
|
|
2210
|
-
z.intersection(
|
|
2211
|
-
z.object({
|
|
2212
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
2213
|
-
/^[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}$/,
|
|
2214
|
-
"Must be a valid GUID"
|
|
2215
|
-
).optional(),
|
|
2216
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).optional(),
|
|
2217
|
-
key: z.string().describe(
|
|
2218
|
-
"A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
2219
|
-
).min(1).max(50).optional().nullable(),
|
|
2220
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
2221
|
-
defaultAddedPrice: z.string().describe(
|
|
2222
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
2223
|
-
).optional().nullable()
|
|
2224
|
-
}),
|
|
2225
|
-
z.xor([
|
|
2226
|
-
z.object({ colorCode: z.never().optional() }),
|
|
2227
|
-
z.object({
|
|
2228
|
-
colorCode: z.string().describe(
|
|
2229
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
2230
|
-
).min(3).max(20)
|
|
2231
|
-
})
|
|
2232
|
-
])
|
|
2233
|
-
)
|
|
2234
|
-
).min(1).max(200).optional()
|
|
2235
|
-
}).describe(
|
|
2236
|
-
"Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
|
|
2237
|
-
)
|
|
2238
|
-
})
|
|
2239
|
-
])
|
|
2240
|
-
).describe("Customization to update.").optional()
|
|
2241
|
-
})
|
|
2242
|
-
).min(1).max(100),
|
|
2243
|
-
options: z.object({
|
|
2244
|
-
returnEntity: z.boolean().describe(
|
|
2245
|
-
"Whether to return the full customization entities in the response.\n\nDefault: `false`"
|
|
2246
|
-
).optional(),
|
|
2247
|
-
fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
|
|
2248
|
-
}).optional()
|
|
2249
|
-
});
|
|
2250
|
-
var BulkUpdateCustomizationsResponse = z.object({
|
|
2251
|
-
results: z.array(
|
|
2252
|
-
z.object({
|
|
2253
|
-
itemMetadata: z.object({
|
|
2254
|
-
_id: z.string().describe(
|
|
2255
|
-
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
2256
|
-
).min(1).max(36).optional().nullable(),
|
|
2257
|
-
originalIndex: z.number().int().describe(
|
|
2258
|
-
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
2259
|
-
).optional(),
|
|
2260
|
-
success: z.boolean().describe(
|
|
2261
|
-
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
2262
|
-
).optional(),
|
|
2263
|
-
error: z.object({
|
|
2264
|
-
code: z.string().describe("Error code.").optional(),
|
|
2265
|
-
description: z.string().describe("Description of the error.").optional(),
|
|
2266
|
-
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
2267
|
-
}).describe("Details about the error in case of failure.").optional()
|
|
2268
|
-
}).describe("Bulk action metadata for customization.").optional(),
|
|
2269
|
-
customization: z.intersection(
|
|
2270
|
-
z.object({
|
|
2271
|
-
_id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
|
|
2272
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
2273
|
-
"Revision number, which increments by 1 each time the customization is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the customization.\n\nIgnored when creating a customization."
|
|
2274
|
-
).optional().nullable(),
|
|
2275
|
-
_createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
|
|
2276
|
-
_updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
|
|
2277
|
-
key: z.string().describe(
|
|
2278
|
-
"A read-only identifier generated from the customization name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
2279
|
-
).min(1).max(50).optional().nullable(),
|
|
2280
|
-
name: z.string().describe(
|
|
2281
|
-
'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
|
|
2282
|
-
).min(1).max(50).optional(),
|
|
2283
|
-
customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
|
|
2284
|
-
customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
|
|
2285
|
-
"Customization render type.\n\nDefines how the customization will be displayed in the storefront."
|
|
2286
|
-
).optional(),
|
|
2287
|
-
assignedProductsCount: z.number().int().describe(
|
|
2288
|
-
'Number of products this customization is assigned to.\n> **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests.'
|
|
2289
|
-
).optional().nullable()
|
|
2290
|
-
}),
|
|
2291
|
-
z.xor([
|
|
2292
|
-
z.object({
|
|
2293
|
-
freeTextInput: z.never().optional(),
|
|
2294
|
-
choicesSettings: z.never().optional()
|
|
2295
|
-
}),
|
|
2296
|
-
z.object({
|
|
2297
|
-
choicesSettings: z.never().optional(),
|
|
2298
|
-
freeTextInput: z.object({
|
|
2299
|
-
minCharCount: z.number().int().describe("Minimum text character length.").optional(),
|
|
2300
|
-
maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
|
|
2301
|
-
defaultAddedPrice: z.string().describe(
|
|
2302
|
-
"Default amount added to a product's price when this choice is assigned to a modifier."
|
|
2303
|
-
).optional().nullable(),
|
|
2304
|
-
title: z.string().describe(
|
|
2305
|
-
"Title to display to customer for their free-text input."
|
|
2306
|
-
).min(1).max(100).optional(),
|
|
2307
|
-
key: z.string().describe(
|
|
2308
|
-
"A read-only identifier generated from the title.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
2309
|
-
).min(1).max(150).optional().nullable()
|
|
2310
|
-
}).describe(
|
|
2311
|
-
"Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
|
|
2312
|
-
)
|
|
2313
|
-
}),
|
|
2314
|
-
z.object({
|
|
2315
|
-
freeTextInput: z.never().optional(),
|
|
2316
|
-
choicesSettings: z.object({
|
|
2317
|
-
choices: z.array(
|
|
2318
|
-
z.intersection(
|
|
2319
|
-
z.object({
|
|
2320
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
2321
|
-
/^[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}$/,
|
|
2322
|
-
"Must be a valid GUID"
|
|
2323
|
-
).optional(),
|
|
2324
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
|
|
2325
|
-
"Choice type.\n\n> **Notes:**\n> + For `customizationRenderType: SWATCH_CHOICES`, the supported `choiceType` value is: `ONE_COLOR`.\n> + For a `customizationRenderType` of `TEXT_CHOICES`, the supported `choiceType` value is: `CHOICE_TEXT`."
|
|
2326
|
-
).optional(),
|
|
2327
|
-
key: z.string().describe(
|
|
2328
|
-
"A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
|
|
2329
|
-
).min(1).max(50).optional().nullable(),
|
|
2330
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
2331
|
-
defaultAddedPrice: z.string().describe(
|
|
2332
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
2333
|
-
).optional().nullable()
|
|
2334
|
-
}),
|
|
2335
|
-
z.xor([
|
|
2336
|
-
z.object({ colorCode: z.never().optional() }),
|
|
2337
|
-
z.object({
|
|
2338
|
-
colorCode: z.string().describe(
|
|
2339
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
2340
|
-
).min(3).max(20)
|
|
2341
|
-
})
|
|
2342
|
-
])
|
|
2343
|
-
)
|
|
2344
|
-
).min(1).max(200).optional()
|
|
2345
|
-
}).describe(
|
|
2346
|
-
"Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
|
|
2347
|
-
)
|
|
2348
|
-
})
|
|
2349
|
-
])
|
|
2350
|
-
).describe(
|
|
2351
|
-
"Full customization entity.\n\nReturned only if `returnEntity: true` is passed in the request."
|
|
2352
|
-
).optional()
|
|
2353
|
-
})
|
|
2354
|
-
).min(1).max(100).optional(),
|
|
2355
|
-
bulkActionMetadata: z.object({
|
|
2356
|
-
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
2357
|
-
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
2358
|
-
undetailedFailures: z.number().int().describe(
|
|
2359
|
-
"Number of failures without details because detailed failure threshold was exceeded."
|
|
2360
|
-
).optional()
|
|
2361
|
-
}).describe("Bulk action metadata.").optional()
|
|
2362
|
-
});
|
|
2363
|
-
|
|
2364
|
-
// src/stores-catalog-v3-customization-customizations-v-3.universal.ts
|
|
2365
848
|
import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
|
|
2366
849
|
var CustomizationType = /* @__PURE__ */ ((CustomizationType2) => {
|
|
2367
850
|
CustomizationType2["PRODUCT_OPTION"] = "PRODUCT_OPTION";
|
|
@@ -2405,10 +888,7 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
2405
888
|
return WebhookIdentityType2;
|
|
2406
889
|
})(WebhookIdentityType || {});
|
|
2407
890
|
async function createCustomization2(customization) {
|
|
2408
|
-
const { httpClient, sideEffects
|
|
2409
|
-
if (validateRequestSchema) {
|
|
2410
|
-
CreateCustomizationRequest.parse({ customization });
|
|
2411
|
-
}
|
|
891
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
2412
892
|
const payload = transformPaths2(
|
|
2413
893
|
renameKeysFromSDKRequestToRESTRequest({ customization }),
|
|
2414
894
|
[
|
|
@@ -2452,10 +932,7 @@ async function createCustomization2(customization) {
|
|
|
2452
932
|
}
|
|
2453
933
|
}
|
|
2454
934
|
async function getCustomization2(customizationId, options) {
|
|
2455
|
-
const { httpClient, sideEffects
|
|
2456
|
-
if (validateRequestSchema) {
|
|
2457
|
-
GetCustomizationRequest.parse({ customizationId, options });
|
|
2458
|
-
}
|
|
935
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2459
936
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2460
937
|
customizationId,
|
|
2461
938
|
fields: options?.fields
|
|
@@ -2494,10 +971,7 @@ async function getCustomization2(customizationId, options) {
|
|
|
2494
971
|
}
|
|
2495
972
|
}
|
|
2496
973
|
async function updateCustomization2(_id, customization, options) {
|
|
2497
|
-
const { httpClient, sideEffects
|
|
2498
|
-
if (validateRequestSchema) {
|
|
2499
|
-
UpdateCustomizationRequest.parse({ _id, customization, options });
|
|
2500
|
-
}
|
|
974
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
2501
975
|
const payload = transformPaths2(
|
|
2502
976
|
renameKeysFromSDKRequestToRESTRequest({
|
|
2503
977
|
customization: { ...customization, id: _id },
|
|
@@ -2547,10 +1021,7 @@ async function updateCustomization2(_id, customization, options) {
|
|
|
2547
1021
|
}
|
|
2548
1022
|
}
|
|
2549
1023
|
async function deleteCustomization2(customizationId) {
|
|
2550
|
-
const { httpClient, sideEffects
|
|
2551
|
-
if (validateRequestSchema) {
|
|
2552
|
-
DeleteCustomizationRequest.parse({ customizationId });
|
|
2553
|
-
}
|
|
1024
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
2554
1025
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2555
1026
|
customizationId
|
|
2556
1027
|
});
|
|
@@ -2631,10 +1102,7 @@ function queryCustomizations2(options) {
|
|
|
2631
1102
|
});
|
|
2632
1103
|
}
|
|
2633
1104
|
async function typedQueryCustomizations(query, options) {
|
|
2634
|
-
const { httpClient, sideEffects
|
|
2635
|
-
if (validateRequestSchema) {
|
|
2636
|
-
QueryCustomizationsRequest.parse({ query, options });
|
|
2637
|
-
}
|
|
1105
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2638
1106
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2639
1107
|
query,
|
|
2640
1108
|
...options
|
|
@@ -2675,10 +1143,7 @@ var utils = {
|
|
|
2675
1143
|
}
|
|
2676
1144
|
};
|
|
2677
1145
|
async function bulkCreateCustomizations2(customizations, options) {
|
|
2678
|
-
const { httpClient, sideEffects
|
|
2679
|
-
if (validateRequestSchema) {
|
|
2680
|
-
BulkCreateCustomizationsRequest.parse({ customizations, options });
|
|
2681
|
-
}
|
|
1146
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2682
1147
|
const payload = transformPaths2(
|
|
2683
1148
|
renameKeysFromSDKRequestToRESTRequest({
|
|
2684
1149
|
customizations,
|
|
@@ -2730,14 +1195,7 @@ async function bulkCreateCustomizations2(customizations, options) {
|
|
|
2730
1195
|
}
|
|
2731
1196
|
}
|
|
2732
1197
|
async function addCustomizationChoices2(customizationId, choices, options) {
|
|
2733
|
-
const { httpClient, sideEffects
|
|
2734
|
-
if (validateRequestSchema) {
|
|
2735
|
-
AddCustomizationChoicesRequest.parse({
|
|
2736
|
-
customizationId,
|
|
2737
|
-
choices,
|
|
2738
|
-
options
|
|
2739
|
-
});
|
|
2740
|
-
}
|
|
1198
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
2741
1199
|
const payload = transformPaths2(
|
|
2742
1200
|
renameKeysFromSDKRequestToRESTRequest({
|
|
2743
1201
|
customizationId,
|
|
@@ -2786,14 +1244,7 @@ async function addCustomizationChoices2(customizationId, choices, options) {
|
|
|
2786
1244
|
}
|
|
2787
1245
|
}
|
|
2788
1246
|
async function setCustomizationChoices2(customizationId, choices, options) {
|
|
2789
|
-
const { httpClient, sideEffects
|
|
2790
|
-
if (validateRequestSchema) {
|
|
2791
|
-
SetCustomizationChoicesRequest.parse({
|
|
2792
|
-
customizationId,
|
|
2793
|
-
choices,
|
|
2794
|
-
options
|
|
2795
|
-
});
|
|
2796
|
-
}
|
|
1247
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
2797
1248
|
const payload = transformPaths2(
|
|
2798
1249
|
renameKeysFromSDKRequestToRESTRequest({
|
|
2799
1250
|
customizationId,
|
|
@@ -2842,14 +1293,7 @@ async function setCustomizationChoices2(customizationId, choices, options) {
|
|
|
2842
1293
|
}
|
|
2843
1294
|
}
|
|
2844
1295
|
async function removeCustomizationChoices2(customizationId, choiceIds, options) {
|
|
2845
|
-
const { httpClient, sideEffects
|
|
2846
|
-
if (validateRequestSchema) {
|
|
2847
|
-
RemoveCustomizationChoicesRequest.parse({
|
|
2848
|
-
customizationId,
|
|
2849
|
-
choiceIds,
|
|
2850
|
-
options
|
|
2851
|
-
});
|
|
2852
|
-
}
|
|
1296
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
2853
1297
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2854
1298
|
customizationId,
|
|
2855
1299
|
choiceIds,
|
|
@@ -2995,13 +1439,7 @@ async function reorderCustomizationChoices2(customizationId, revision, options)
|
|
|
2995
1439
|
}
|
|
2996
1440
|
}
|
|
2997
1441
|
async function bulkAddCustomizationChoices2(customizationsChoices, options) {
|
|
2998
|
-
const { httpClient, sideEffects
|
|
2999
|
-
if (validateRequestSchema) {
|
|
3000
|
-
BulkAddCustomizationChoicesRequest.parse({
|
|
3001
|
-
customizationsChoices,
|
|
3002
|
-
options
|
|
3003
|
-
});
|
|
3004
|
-
}
|
|
1442
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
3005
1443
|
const payload = transformPaths2(
|
|
3006
1444
|
renameKeysFromSDKRequestToRESTRequest({
|
|
3007
1445
|
customizationsChoices,
|
|
@@ -3057,10 +1495,7 @@ async function bulkAddCustomizationChoices2(customizationsChoices, options) {
|
|
|
3057
1495
|
}
|
|
3058
1496
|
}
|
|
3059
1497
|
async function bulkUpdateCustomizations2(customizations, options) {
|
|
3060
|
-
const { httpClient, sideEffects
|
|
3061
|
-
if (validateRequestSchema) {
|
|
3062
|
-
BulkUpdateCustomizationsRequest.parse({ customizations, options });
|
|
3063
|
-
}
|
|
1498
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
3064
1499
|
const payload = transformPaths2(
|
|
3065
1500
|
renameKeysFromSDKRequestToRESTRequest({
|
|
3066
1501
|
customizations,
|
|
@@ -3119,119 +1554,119 @@ async function bulkUpdateCustomizations2(customizations, options) {
|
|
|
3119
1554
|
}
|
|
3120
1555
|
|
|
3121
1556
|
// src/stores-catalog-v3-customization-customizations-v-3.public.ts
|
|
3122
|
-
function createCustomization3(httpClient
|
|
1557
|
+
function createCustomization3(httpClient) {
|
|
3123
1558
|
return (customization) => createCustomization2(
|
|
3124
1559
|
customization,
|
|
3125
1560
|
// @ts-ignore
|
|
3126
|
-
{ httpClient
|
|
1561
|
+
{ httpClient }
|
|
3127
1562
|
);
|
|
3128
1563
|
}
|
|
3129
|
-
function getCustomization3(httpClient
|
|
1564
|
+
function getCustomization3(httpClient) {
|
|
3130
1565
|
return (customizationId, options) => getCustomization2(
|
|
3131
1566
|
customizationId,
|
|
3132
1567
|
options,
|
|
3133
1568
|
// @ts-ignore
|
|
3134
|
-
{ httpClient
|
|
1569
|
+
{ httpClient }
|
|
3135
1570
|
);
|
|
3136
1571
|
}
|
|
3137
|
-
function updateCustomization3(httpClient
|
|
1572
|
+
function updateCustomization3(httpClient) {
|
|
3138
1573
|
return (_id, customization, options) => updateCustomization2(
|
|
3139
1574
|
_id,
|
|
3140
1575
|
customization,
|
|
3141
1576
|
options,
|
|
3142
1577
|
// @ts-ignore
|
|
3143
|
-
{ httpClient
|
|
1578
|
+
{ httpClient }
|
|
3144
1579
|
);
|
|
3145
1580
|
}
|
|
3146
|
-
function deleteCustomization3(httpClient
|
|
1581
|
+
function deleteCustomization3(httpClient) {
|
|
3147
1582
|
return (customizationId) => deleteCustomization2(
|
|
3148
1583
|
customizationId,
|
|
3149
1584
|
// @ts-ignore
|
|
3150
|
-
{ httpClient
|
|
1585
|
+
{ httpClient }
|
|
3151
1586
|
);
|
|
3152
1587
|
}
|
|
3153
|
-
function queryCustomizations3(httpClient
|
|
1588
|
+
function queryCustomizations3(httpClient) {
|
|
3154
1589
|
return (options) => queryCustomizations2(
|
|
3155
1590
|
options,
|
|
3156
1591
|
// @ts-ignore
|
|
3157
|
-
{ httpClient
|
|
1592
|
+
{ httpClient }
|
|
3158
1593
|
);
|
|
3159
1594
|
}
|
|
3160
|
-
function typedQueryCustomizations2(httpClient
|
|
1595
|
+
function typedQueryCustomizations2(httpClient) {
|
|
3161
1596
|
return (query, options) => typedQueryCustomizations(
|
|
3162
1597
|
query,
|
|
3163
1598
|
options,
|
|
3164
1599
|
// @ts-ignore
|
|
3165
|
-
{ httpClient
|
|
1600
|
+
{ httpClient }
|
|
3166
1601
|
);
|
|
3167
1602
|
}
|
|
3168
|
-
function bulkCreateCustomizations3(httpClient
|
|
1603
|
+
function bulkCreateCustomizations3(httpClient) {
|
|
3169
1604
|
return (customizations, options) => bulkCreateCustomizations2(
|
|
3170
1605
|
customizations,
|
|
3171
1606
|
options,
|
|
3172
1607
|
// @ts-ignore
|
|
3173
|
-
{ httpClient
|
|
1608
|
+
{ httpClient }
|
|
3174
1609
|
);
|
|
3175
1610
|
}
|
|
3176
|
-
function addCustomizationChoices3(httpClient
|
|
1611
|
+
function addCustomizationChoices3(httpClient) {
|
|
3177
1612
|
return (customizationId, choices, options) => addCustomizationChoices2(
|
|
3178
1613
|
customizationId,
|
|
3179
1614
|
choices,
|
|
3180
1615
|
options,
|
|
3181
1616
|
// @ts-ignore
|
|
3182
|
-
{ httpClient
|
|
1617
|
+
{ httpClient }
|
|
3183
1618
|
);
|
|
3184
1619
|
}
|
|
3185
|
-
function setCustomizationChoices3(httpClient
|
|
1620
|
+
function setCustomizationChoices3(httpClient) {
|
|
3186
1621
|
return (customizationId, choices, options) => setCustomizationChoices2(
|
|
3187
1622
|
customizationId,
|
|
3188
1623
|
choices,
|
|
3189
1624
|
options,
|
|
3190
1625
|
// @ts-ignore
|
|
3191
|
-
{ httpClient
|
|
1626
|
+
{ httpClient }
|
|
3192
1627
|
);
|
|
3193
1628
|
}
|
|
3194
|
-
function removeCustomizationChoices3(httpClient
|
|
1629
|
+
function removeCustomizationChoices3(httpClient) {
|
|
3195
1630
|
return (customizationId, choiceIds, options) => removeCustomizationChoices2(
|
|
3196
1631
|
customizationId,
|
|
3197
1632
|
choiceIds,
|
|
3198
1633
|
options,
|
|
3199
1634
|
// @ts-ignore
|
|
3200
|
-
{ httpClient
|
|
1635
|
+
{ httpClient }
|
|
3201
1636
|
);
|
|
3202
1637
|
}
|
|
3203
|
-
function updateCustomizationChoices3(httpClient
|
|
1638
|
+
function updateCustomizationChoices3(httpClient) {
|
|
3204
1639
|
return (customizationId, revision, options) => updateCustomizationChoices2(
|
|
3205
1640
|
customizationId,
|
|
3206
1641
|
revision,
|
|
3207
1642
|
options,
|
|
3208
1643
|
// @ts-ignore
|
|
3209
|
-
{ httpClient
|
|
1644
|
+
{ httpClient }
|
|
3210
1645
|
);
|
|
3211
1646
|
}
|
|
3212
|
-
function reorderCustomizationChoices3(httpClient
|
|
1647
|
+
function reorderCustomizationChoices3(httpClient) {
|
|
3213
1648
|
return (customizationId, revision, options) => reorderCustomizationChoices2(
|
|
3214
1649
|
customizationId,
|
|
3215
1650
|
revision,
|
|
3216
1651
|
options,
|
|
3217
1652
|
// @ts-ignore
|
|
3218
|
-
{ httpClient
|
|
1653
|
+
{ httpClient }
|
|
3219
1654
|
);
|
|
3220
1655
|
}
|
|
3221
|
-
function bulkAddCustomizationChoices3(httpClient
|
|
1656
|
+
function bulkAddCustomizationChoices3(httpClient) {
|
|
3222
1657
|
return (customizationsChoices, options) => bulkAddCustomizationChoices2(
|
|
3223
1658
|
customizationsChoices,
|
|
3224
1659
|
options,
|
|
3225
1660
|
// @ts-ignore
|
|
3226
|
-
{ httpClient
|
|
1661
|
+
{ httpClient }
|
|
3227
1662
|
);
|
|
3228
1663
|
}
|
|
3229
|
-
function bulkUpdateCustomizations3(httpClient
|
|
1664
|
+
function bulkUpdateCustomizations3(httpClient) {
|
|
3230
1665
|
return (customizations, options) => bulkUpdateCustomizations2(
|
|
3231
1666
|
customizations,
|
|
3232
1667
|
options,
|
|
3233
1668
|
// @ts-ignore
|
|
3234
|
-
{ httpClient
|
|
1669
|
+
{ httpClient }
|
|
3235
1670
|
);
|
|
3236
1671
|
}
|
|
3237
1672
|
var onCustomizationCreated = EventDefinition(
|