@wix/auto_sdk_stores_customizations-v-3 1.0.79 → 1.0.81
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 +46 -33
- package/build/cjs/index.js +39 -1614
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +68 -3
- package/build/cjs/index.typings.js +11 -1586
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +26 -3
- package/build/cjs/meta.js +1 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +167 -2
- package/build/cjs/schemas.js +314 -25
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +46 -33
- package/build/es/index.mjs +39 -1604
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +68 -3
- package/build/es/index.typings.mjs +11 -1576
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +26 -3
- package/build/es/meta.mjs +1 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +167 -2
- package/build/es/schemas.mjs +310 -25
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +13 -41
- 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 +17 -6
- 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 +26 -3
- package/build/internal/cjs/meta.js +1 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +167 -2
- package/build/internal/cjs/schemas.js +314 -25
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +13 -41
- 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 +17 -6
- 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 +26 -3
- package/build/internal/es/meta.mjs +1 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +167 -2
- package/build/internal/es/schemas.mjs +310 -25
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
15
|
}
|
|
18
16
|
return to;
|
|
19
17
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
19
|
|
|
30
20
|
// index.ts
|
|
@@ -901,1523 +891,6 @@ function bulkUpdateCustomizations(payload) {
|
|
|
901
891
|
var import_image = require("@wix/sdk-runtime/transformations/image");
|
|
902
892
|
var import_image2 = require("@wix/sdk-runtime/transformations/image");
|
|
903
893
|
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
904
|
-
|
|
905
|
-
// src/stores-catalog-v3-customization-customizations-v-3.schemas.ts
|
|
906
|
-
var z = __toESM(require("zod"));
|
|
907
|
-
var CreateCustomizationRequest = z.object({
|
|
908
|
-
customization: z.intersection(
|
|
909
|
-
z.object({
|
|
910
|
-
_id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
|
|
911
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
912
|
-
"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."
|
|
913
|
-
).optional().nullable(),
|
|
914
|
-
_createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
|
|
915
|
-
_updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
|
|
916
|
-
key: z.string().describe(
|
|
917
|
-
"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)."
|
|
918
|
-
).min(1).max(50).optional().nullable(),
|
|
919
|
-
name: z.string().describe(
|
|
920
|
-
'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
|
|
921
|
-
).min(1).max(50),
|
|
922
|
-
customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]),
|
|
923
|
-
customizationRenderType: z.enum([
|
|
924
|
-
"FREE_TEXT",
|
|
925
|
-
"TEXT_CHOICES",
|
|
926
|
-
"SWATCH_CHOICES"
|
|
927
|
-
]),
|
|
928
|
-
assignedProductsCount: z.number().int().describe(
|
|
929
|
-
'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.'
|
|
930
|
-
).optional().nullable()
|
|
931
|
-
}),
|
|
932
|
-
z.xor([
|
|
933
|
-
z.object({
|
|
934
|
-
choicesSettings: z.never().optional(),
|
|
935
|
-
freeTextInput: z.object({
|
|
936
|
-
minCharCount: z.number().int().describe("Minimum text character length.").optional(),
|
|
937
|
-
maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
|
|
938
|
-
defaultAddedPrice: z.string().describe(
|
|
939
|
-
"Default amount added to a product's price when this choice is assigned to a modifier."
|
|
940
|
-
).optional().nullable(),
|
|
941
|
-
title: z.string().describe(
|
|
942
|
-
"Title to display to customer for their free-text input."
|
|
943
|
-
).min(1).max(100),
|
|
944
|
-
key: z.string().describe(
|
|
945
|
-
"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)."
|
|
946
|
-
).min(1).max(150).optional().nullable()
|
|
947
|
-
}).describe(
|
|
948
|
-
"Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
|
|
949
|
-
)
|
|
950
|
-
}),
|
|
951
|
-
z.object({
|
|
952
|
-
freeTextInput: z.never().optional(),
|
|
953
|
-
choicesSettings: z.object({
|
|
954
|
-
choices: z.array(
|
|
955
|
-
z.intersection(
|
|
956
|
-
z.object({
|
|
957
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
958
|
-
/^[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}$/,
|
|
959
|
-
"Must be a valid GUID"
|
|
960
|
-
).optional(),
|
|
961
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).optional(),
|
|
962
|
-
key: z.string().describe(
|
|
963
|
-
"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)."
|
|
964
|
-
).min(1).max(50).optional().nullable(),
|
|
965
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
966
|
-
defaultAddedPrice: z.string().describe(
|
|
967
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
968
|
-
).optional().nullable()
|
|
969
|
-
}),
|
|
970
|
-
z.xor([
|
|
971
|
-
z.object({ colorCode: z.never().optional() }),
|
|
972
|
-
z.object({
|
|
973
|
-
colorCode: z.string().describe(
|
|
974
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
975
|
-
).min(3).max(20)
|
|
976
|
-
})
|
|
977
|
-
])
|
|
978
|
-
)
|
|
979
|
-
).min(1).max(200)
|
|
980
|
-
}).describe(
|
|
981
|
-
"Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
|
|
982
|
-
)
|
|
983
|
-
})
|
|
984
|
-
])
|
|
985
|
-
).describe("Customization to create.")
|
|
986
|
-
});
|
|
987
|
-
var CreateCustomizationResponse = z.intersection(
|
|
988
|
-
z.object({
|
|
989
|
-
_id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
|
|
990
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
991
|
-
"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."
|
|
992
|
-
).optional().nullable(),
|
|
993
|
-
_createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
|
|
994
|
-
_updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
|
|
995
|
-
key: z.string().describe(
|
|
996
|
-
"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)."
|
|
997
|
-
).min(1).max(50).optional().nullable(),
|
|
998
|
-
name: z.string().describe(
|
|
999
|
-
'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
|
|
1000
|
-
).min(1).max(50).optional(),
|
|
1001
|
-
customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
|
|
1002
|
-
customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
|
|
1003
|
-
"Customization render type.\n\nDefines how the customization will be displayed in the storefront."
|
|
1004
|
-
).optional(),
|
|
1005
|
-
assignedProductsCount: z.number().int().describe(
|
|
1006
|
-
'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.'
|
|
1007
|
-
).optional().nullable()
|
|
1008
|
-
}),
|
|
1009
|
-
z.xor([
|
|
1010
|
-
z.object({
|
|
1011
|
-
freeTextInput: z.never().optional(),
|
|
1012
|
-
choicesSettings: z.never().optional()
|
|
1013
|
-
}),
|
|
1014
|
-
z.object({
|
|
1015
|
-
choicesSettings: z.never().optional(),
|
|
1016
|
-
freeTextInput: z.object({
|
|
1017
|
-
minCharCount: z.number().int().describe("Minimum text character length.").optional(),
|
|
1018
|
-
maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
|
|
1019
|
-
defaultAddedPrice: z.string().describe(
|
|
1020
|
-
"Default amount added to a product's price when this choice is assigned to a modifier."
|
|
1021
|
-
).optional().nullable(),
|
|
1022
|
-
title: z.string().describe("Title to display to customer for their free-text input.").min(1).max(100).optional(),
|
|
1023
|
-
key: z.string().describe(
|
|
1024
|
-
"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)."
|
|
1025
|
-
).min(1).max(150).optional().nullable()
|
|
1026
|
-
}).describe(
|
|
1027
|
-
"Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
|
|
1028
|
-
)
|
|
1029
|
-
}),
|
|
1030
|
-
z.object({
|
|
1031
|
-
freeTextInput: z.never().optional(),
|
|
1032
|
-
choicesSettings: z.object({
|
|
1033
|
-
choices: z.array(
|
|
1034
|
-
z.intersection(
|
|
1035
|
-
z.object({
|
|
1036
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
1037
|
-
/^[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}$/,
|
|
1038
|
-
"Must be a valid GUID"
|
|
1039
|
-
).optional(),
|
|
1040
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
|
|
1041
|
-
"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`."
|
|
1042
|
-
).optional(),
|
|
1043
|
-
key: z.string().describe(
|
|
1044
|
-
"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)."
|
|
1045
|
-
).min(1).max(50).optional().nullable(),
|
|
1046
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
1047
|
-
defaultAddedPrice: z.string().describe(
|
|
1048
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
1049
|
-
).optional().nullable()
|
|
1050
|
-
}),
|
|
1051
|
-
z.xor([
|
|
1052
|
-
z.object({ colorCode: z.never().optional() }),
|
|
1053
|
-
z.object({
|
|
1054
|
-
colorCode: z.string().describe(
|
|
1055
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
1056
|
-
).min(3).max(20)
|
|
1057
|
-
})
|
|
1058
|
-
])
|
|
1059
|
-
)
|
|
1060
|
-
).min(1).max(200).optional()
|
|
1061
|
-
}).describe(
|
|
1062
|
-
"Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
|
|
1063
|
-
)
|
|
1064
|
-
})
|
|
1065
|
-
])
|
|
1066
|
-
);
|
|
1067
|
-
var GetCustomizationRequest = z.object({
|
|
1068
|
-
customizationId: z.string().describe("Customization ID.").regex(
|
|
1069
|
-
/^[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}$/,
|
|
1070
|
-
"Must be a valid GUID"
|
|
1071
|
-
),
|
|
1072
|
-
options: z.object({
|
|
1073
|
-
fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
|
|
1074
|
-
}).optional()
|
|
1075
|
-
});
|
|
1076
|
-
var GetCustomizationResponse = z.intersection(
|
|
1077
|
-
z.object({
|
|
1078
|
-
_id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
|
|
1079
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1080
|
-
"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."
|
|
1081
|
-
).optional().nullable(),
|
|
1082
|
-
_createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
|
|
1083
|
-
_updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
|
|
1084
|
-
key: z.string().describe(
|
|
1085
|
-
"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)."
|
|
1086
|
-
).min(1).max(50).optional().nullable(),
|
|
1087
|
-
name: z.string().describe(
|
|
1088
|
-
'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
|
|
1089
|
-
).min(1).max(50).optional(),
|
|
1090
|
-
customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
|
|
1091
|
-
customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
|
|
1092
|
-
"Customization render type.\n\nDefines how the customization will be displayed in the storefront."
|
|
1093
|
-
).optional(),
|
|
1094
|
-
assignedProductsCount: z.number().int().describe(
|
|
1095
|
-
'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.'
|
|
1096
|
-
).optional().nullable()
|
|
1097
|
-
}),
|
|
1098
|
-
z.xor([
|
|
1099
|
-
z.object({
|
|
1100
|
-
freeTextInput: z.never().optional(),
|
|
1101
|
-
choicesSettings: z.never().optional()
|
|
1102
|
-
}),
|
|
1103
|
-
z.object({
|
|
1104
|
-
choicesSettings: z.never().optional(),
|
|
1105
|
-
freeTextInput: z.object({
|
|
1106
|
-
minCharCount: z.number().int().describe("Minimum text character length.").optional(),
|
|
1107
|
-
maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
|
|
1108
|
-
defaultAddedPrice: z.string().describe(
|
|
1109
|
-
"Default amount added to a product's price when this choice is assigned to a modifier."
|
|
1110
|
-
).optional().nullable(),
|
|
1111
|
-
title: z.string().describe("Title to display to customer for their free-text input.").min(1).max(100).optional(),
|
|
1112
|
-
key: z.string().describe(
|
|
1113
|
-
"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)."
|
|
1114
|
-
).min(1).max(150).optional().nullable()
|
|
1115
|
-
}).describe(
|
|
1116
|
-
"Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
|
|
1117
|
-
)
|
|
1118
|
-
}),
|
|
1119
|
-
z.object({
|
|
1120
|
-
freeTextInput: z.never().optional(),
|
|
1121
|
-
choicesSettings: z.object({
|
|
1122
|
-
choices: z.array(
|
|
1123
|
-
z.intersection(
|
|
1124
|
-
z.object({
|
|
1125
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
1126
|
-
/^[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}$/,
|
|
1127
|
-
"Must be a valid GUID"
|
|
1128
|
-
).optional(),
|
|
1129
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
|
|
1130
|
-
"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`."
|
|
1131
|
-
).optional(),
|
|
1132
|
-
key: z.string().describe(
|
|
1133
|
-
"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)."
|
|
1134
|
-
).min(1).max(50).optional().nullable(),
|
|
1135
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
1136
|
-
defaultAddedPrice: z.string().describe(
|
|
1137
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
1138
|
-
).optional().nullable()
|
|
1139
|
-
}),
|
|
1140
|
-
z.xor([
|
|
1141
|
-
z.object({ colorCode: z.never().optional() }),
|
|
1142
|
-
z.object({
|
|
1143
|
-
colorCode: z.string().describe(
|
|
1144
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
1145
|
-
).min(3).max(20)
|
|
1146
|
-
})
|
|
1147
|
-
])
|
|
1148
|
-
)
|
|
1149
|
-
).min(1).max(200).optional()
|
|
1150
|
-
}).describe(
|
|
1151
|
-
"Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
|
|
1152
|
-
)
|
|
1153
|
-
})
|
|
1154
|
-
])
|
|
1155
|
-
);
|
|
1156
|
-
var UpdateCustomizationRequest = z.object({
|
|
1157
|
-
_id: z.string().describe("Customization ID.").min(1).max(36),
|
|
1158
|
-
customization: z.intersection(
|
|
1159
|
-
z.object({
|
|
1160
|
-
_id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
|
|
1161
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1162
|
-
"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."
|
|
1163
|
-
),
|
|
1164
|
-
_createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
|
|
1165
|
-
_updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
|
|
1166
|
-
key: z.string().describe(
|
|
1167
|
-
"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)."
|
|
1168
|
-
).min(1).max(50).optional().nullable(),
|
|
1169
|
-
name: z.string().describe(
|
|
1170
|
-
'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
|
|
1171
|
-
).min(1).max(50).optional(),
|
|
1172
|
-
customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).optional(),
|
|
1173
|
-
customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).optional(),
|
|
1174
|
-
assignedProductsCount: z.number().int().describe(
|
|
1175
|
-
'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.'
|
|
1176
|
-
).optional().nullable()
|
|
1177
|
-
}),
|
|
1178
|
-
z.xor([
|
|
1179
|
-
z.object({
|
|
1180
|
-
freeTextInput: z.never().optional(),
|
|
1181
|
-
choicesSettings: z.never().optional()
|
|
1182
|
-
}),
|
|
1183
|
-
z.object({
|
|
1184
|
-
choicesSettings: z.never().optional(),
|
|
1185
|
-
freeTextInput: z.object({
|
|
1186
|
-
minCharCount: z.number().int().describe("Minimum text character length.").optional(),
|
|
1187
|
-
maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
|
|
1188
|
-
defaultAddedPrice: z.string().describe(
|
|
1189
|
-
"Default amount added to a product's price when this choice is assigned to a modifier."
|
|
1190
|
-
).optional().nullable(),
|
|
1191
|
-
title: z.string().describe(
|
|
1192
|
-
"Title to display to customer for their free-text input."
|
|
1193
|
-
).min(1).max(100).optional(),
|
|
1194
|
-
key: z.string().describe(
|
|
1195
|
-
"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)."
|
|
1196
|
-
).min(1).max(150).optional().nullable()
|
|
1197
|
-
}).describe(
|
|
1198
|
-
"Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
|
|
1199
|
-
)
|
|
1200
|
-
}),
|
|
1201
|
-
z.object({
|
|
1202
|
-
freeTextInput: z.never().optional(),
|
|
1203
|
-
choicesSettings: z.object({
|
|
1204
|
-
choices: z.array(
|
|
1205
|
-
z.intersection(
|
|
1206
|
-
z.object({
|
|
1207
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
1208
|
-
/^[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}$/,
|
|
1209
|
-
"Must be a valid GUID"
|
|
1210
|
-
),
|
|
1211
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).optional(),
|
|
1212
|
-
key: z.string().describe(
|
|
1213
|
-
"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)."
|
|
1214
|
-
).min(1).max(50).optional().nullable(),
|
|
1215
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
1216
|
-
defaultAddedPrice: z.string().describe(
|
|
1217
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
1218
|
-
).optional().nullable()
|
|
1219
|
-
}),
|
|
1220
|
-
z.xor([
|
|
1221
|
-
z.object({ colorCode: z.never().optional() }),
|
|
1222
|
-
z.object({
|
|
1223
|
-
colorCode: z.string().describe(
|
|
1224
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
1225
|
-
).min(3).max(20)
|
|
1226
|
-
})
|
|
1227
|
-
])
|
|
1228
|
-
)
|
|
1229
|
-
).min(1).max(200).optional()
|
|
1230
|
-
}).describe(
|
|
1231
|
-
"Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
|
|
1232
|
-
)
|
|
1233
|
-
})
|
|
1234
|
-
])
|
|
1235
|
-
).describe("Customization to update."),
|
|
1236
|
-
options: z.object({
|
|
1237
|
-
fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
|
|
1238
|
-
}).optional()
|
|
1239
|
-
});
|
|
1240
|
-
var UpdateCustomizationResponse = z.intersection(
|
|
1241
|
-
z.object({
|
|
1242
|
-
_id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
|
|
1243
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1244
|
-
"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."
|
|
1245
|
-
).optional().nullable(),
|
|
1246
|
-
_createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
|
|
1247
|
-
_updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
|
|
1248
|
-
key: z.string().describe(
|
|
1249
|
-
"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)."
|
|
1250
|
-
).min(1).max(50).optional().nullable(),
|
|
1251
|
-
name: z.string().describe(
|
|
1252
|
-
'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
|
|
1253
|
-
).min(1).max(50).optional(),
|
|
1254
|
-
customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
|
|
1255
|
-
customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
|
|
1256
|
-
"Customization render type.\n\nDefines how the customization will be displayed in the storefront."
|
|
1257
|
-
).optional(),
|
|
1258
|
-
assignedProductsCount: z.number().int().describe(
|
|
1259
|
-
'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.'
|
|
1260
|
-
).optional().nullable()
|
|
1261
|
-
}),
|
|
1262
|
-
z.xor([
|
|
1263
|
-
z.object({
|
|
1264
|
-
freeTextInput: z.never().optional(),
|
|
1265
|
-
choicesSettings: z.never().optional()
|
|
1266
|
-
}),
|
|
1267
|
-
z.object({
|
|
1268
|
-
choicesSettings: z.never().optional(),
|
|
1269
|
-
freeTextInput: z.object({
|
|
1270
|
-
minCharCount: z.number().int().describe("Minimum text character length.").optional(),
|
|
1271
|
-
maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
|
|
1272
|
-
defaultAddedPrice: z.string().describe(
|
|
1273
|
-
"Default amount added to a product's price when this choice is assigned to a modifier."
|
|
1274
|
-
).optional().nullable(),
|
|
1275
|
-
title: z.string().describe("Title to display to customer for their free-text input.").min(1).max(100).optional(),
|
|
1276
|
-
key: z.string().describe(
|
|
1277
|
-
"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)."
|
|
1278
|
-
).min(1).max(150).optional().nullable()
|
|
1279
|
-
}).describe(
|
|
1280
|
-
"Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
|
|
1281
|
-
)
|
|
1282
|
-
}),
|
|
1283
|
-
z.object({
|
|
1284
|
-
freeTextInput: z.never().optional(),
|
|
1285
|
-
choicesSettings: z.object({
|
|
1286
|
-
choices: z.array(
|
|
1287
|
-
z.intersection(
|
|
1288
|
-
z.object({
|
|
1289
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
1290
|
-
/^[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}$/,
|
|
1291
|
-
"Must be a valid GUID"
|
|
1292
|
-
).optional(),
|
|
1293
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
|
|
1294
|
-
"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`."
|
|
1295
|
-
).optional(),
|
|
1296
|
-
key: z.string().describe(
|
|
1297
|
-
"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)."
|
|
1298
|
-
).min(1).max(50).optional().nullable(),
|
|
1299
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
1300
|
-
defaultAddedPrice: z.string().describe(
|
|
1301
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
1302
|
-
).optional().nullable()
|
|
1303
|
-
}),
|
|
1304
|
-
z.xor([
|
|
1305
|
-
z.object({ colorCode: z.never().optional() }),
|
|
1306
|
-
z.object({
|
|
1307
|
-
colorCode: z.string().describe(
|
|
1308
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
1309
|
-
).min(3).max(20)
|
|
1310
|
-
})
|
|
1311
|
-
])
|
|
1312
|
-
)
|
|
1313
|
-
).min(1).max(200).optional()
|
|
1314
|
-
}).describe(
|
|
1315
|
-
"Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
|
|
1316
|
-
)
|
|
1317
|
-
})
|
|
1318
|
-
])
|
|
1319
|
-
);
|
|
1320
|
-
var DeleteCustomizationRequest = z.object({
|
|
1321
|
-
customizationId: z.string().describe("Customization ID.").regex(
|
|
1322
|
-
/^[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}$/,
|
|
1323
|
-
"Must be a valid GUID"
|
|
1324
|
-
)
|
|
1325
|
-
});
|
|
1326
|
-
var DeleteCustomizationResponse = z.object({});
|
|
1327
|
-
var QueryCustomizationsRequest = z.object({
|
|
1328
|
-
query: z.object({
|
|
1329
|
-
filter: z.object({
|
|
1330
|
-
_id: 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
|
-
_createdDate: 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
|
-
_updatedDate: z.object({
|
|
1359
|
-
$eq: z.string(),
|
|
1360
|
-
$exists: z.boolean(),
|
|
1361
|
-
$gt: z.string(),
|
|
1362
|
-
$gte: z.string(),
|
|
1363
|
-
$hasAll: z.array(z.string()),
|
|
1364
|
-
$hasSome: z.array(z.string()),
|
|
1365
|
-
$in: z.array(z.string()),
|
|
1366
|
-
$lt: z.string(),
|
|
1367
|
-
$lte: z.string(),
|
|
1368
|
-
$ne: z.string(),
|
|
1369
|
-
$nin: z.array(z.string()),
|
|
1370
|
-
$startsWith: z.string()
|
|
1371
|
-
}).partial().strict().optional(),
|
|
1372
|
-
name: z.object({
|
|
1373
|
-
$eq: z.string(),
|
|
1374
|
-
$exists: z.boolean(),
|
|
1375
|
-
$gt: z.string(),
|
|
1376
|
-
$gte: z.string(),
|
|
1377
|
-
$hasAll: z.array(z.string()),
|
|
1378
|
-
$hasSome: z.array(z.string()),
|
|
1379
|
-
$in: z.array(z.string()),
|
|
1380
|
-
$lt: z.string(),
|
|
1381
|
-
$lte: z.string(),
|
|
1382
|
-
$ne: z.string(),
|
|
1383
|
-
$nin: z.array(z.string()),
|
|
1384
|
-
$startsWith: z.string()
|
|
1385
|
-
}).partial().strict().optional(),
|
|
1386
|
-
customizationType: z.object({
|
|
1387
|
-
$eq: z.string(),
|
|
1388
|
-
$exists: z.boolean(),
|
|
1389
|
-
$gt: z.string(),
|
|
1390
|
-
$gte: z.string(),
|
|
1391
|
-
$hasAll: z.array(z.string()),
|
|
1392
|
-
$hasSome: z.array(z.string()),
|
|
1393
|
-
$in: z.array(z.string()),
|
|
1394
|
-
$lt: z.string(),
|
|
1395
|
-
$lte: z.string(),
|
|
1396
|
-
$ne: z.string(),
|
|
1397
|
-
$nin: z.array(z.string()),
|
|
1398
|
-
$startsWith: z.string()
|
|
1399
|
-
}).partial().strict().optional(),
|
|
1400
|
-
customizationRenderType: z.object({
|
|
1401
|
-
$eq: z.string(),
|
|
1402
|
-
$exists: z.boolean(),
|
|
1403
|
-
$gt: z.string(),
|
|
1404
|
-
$gte: z.string(),
|
|
1405
|
-
$hasAll: z.array(z.string()),
|
|
1406
|
-
$hasSome: z.array(z.string()),
|
|
1407
|
-
$in: z.array(z.string()),
|
|
1408
|
-
$lt: z.string(),
|
|
1409
|
-
$lte: z.string(),
|
|
1410
|
-
$ne: z.string(),
|
|
1411
|
-
$nin: z.array(z.string()),
|
|
1412
|
-
$startsWith: z.string()
|
|
1413
|
-
}).partial().strict().optional(),
|
|
1414
|
-
$and: z.array(z.any()).optional(),
|
|
1415
|
-
$or: z.array(z.any()).optional(),
|
|
1416
|
-
$not: z.any().optional()
|
|
1417
|
-
}).strict().optional(),
|
|
1418
|
-
sort: z.array(
|
|
1419
|
-
z.object({
|
|
1420
|
-
fieldName: z.enum(["_id", "_createdDate", "_updatedDate", "name"]).optional(),
|
|
1421
|
-
order: z.enum(["ASC", "DESC"]).optional()
|
|
1422
|
-
})
|
|
1423
|
-
).optional()
|
|
1424
|
-
}).catchall(z.any()).describe("Query options."),
|
|
1425
|
-
options: z.object({
|
|
1426
|
-
fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
|
|
1427
|
-
}).optional()
|
|
1428
|
-
});
|
|
1429
|
-
var QueryCustomizationsResponse = z.object({
|
|
1430
|
-
customizations: z.array(
|
|
1431
|
-
z.intersection(
|
|
1432
|
-
z.object({
|
|
1433
|
-
_id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
|
|
1434
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1435
|
-
"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."
|
|
1436
|
-
).optional().nullable(),
|
|
1437
|
-
_createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
|
|
1438
|
-
_updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
|
|
1439
|
-
key: z.string().describe(
|
|
1440
|
-
"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)."
|
|
1441
|
-
).min(1).max(50).optional().nullable(),
|
|
1442
|
-
name: z.string().describe(
|
|
1443
|
-
'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
|
|
1444
|
-
).min(1).max(50).optional(),
|
|
1445
|
-
customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
|
|
1446
|
-
customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
|
|
1447
|
-
"Customization render type.\n\nDefines how the customization will be displayed in the storefront."
|
|
1448
|
-
).optional(),
|
|
1449
|
-
assignedProductsCount: z.number().int().describe(
|
|
1450
|
-
'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.'
|
|
1451
|
-
).optional().nullable()
|
|
1452
|
-
}),
|
|
1453
|
-
z.xor([
|
|
1454
|
-
z.object({
|
|
1455
|
-
freeTextInput: z.never().optional(),
|
|
1456
|
-
choicesSettings: z.never().optional()
|
|
1457
|
-
}),
|
|
1458
|
-
z.object({
|
|
1459
|
-
choicesSettings: z.never().optional(),
|
|
1460
|
-
freeTextInput: z.object({
|
|
1461
|
-
minCharCount: z.number().int().describe("Minimum text character length.").optional(),
|
|
1462
|
-
maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
|
|
1463
|
-
defaultAddedPrice: z.string().describe(
|
|
1464
|
-
"Default amount added to a product's price when this choice is assigned to a modifier."
|
|
1465
|
-
).optional().nullable(),
|
|
1466
|
-
title: z.string().describe(
|
|
1467
|
-
"Title to display to customer for their free-text input."
|
|
1468
|
-
).min(1).max(100).optional(),
|
|
1469
|
-
key: z.string().describe(
|
|
1470
|
-
"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)."
|
|
1471
|
-
).min(1).max(150).optional().nullable()
|
|
1472
|
-
}).describe(
|
|
1473
|
-
"Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
|
|
1474
|
-
)
|
|
1475
|
-
}),
|
|
1476
|
-
z.object({
|
|
1477
|
-
freeTextInput: z.never().optional(),
|
|
1478
|
-
choicesSettings: z.object({
|
|
1479
|
-
choices: z.array(
|
|
1480
|
-
z.intersection(
|
|
1481
|
-
z.object({
|
|
1482
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
1483
|
-
/^[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}$/,
|
|
1484
|
-
"Must be a valid GUID"
|
|
1485
|
-
).optional(),
|
|
1486
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
|
|
1487
|
-
"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`."
|
|
1488
|
-
).optional(),
|
|
1489
|
-
key: z.string().describe(
|
|
1490
|
-
"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)."
|
|
1491
|
-
).min(1).max(50).optional().nullable(),
|
|
1492
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
1493
|
-
defaultAddedPrice: z.string().describe(
|
|
1494
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
1495
|
-
).optional().nullable()
|
|
1496
|
-
}),
|
|
1497
|
-
z.xor([
|
|
1498
|
-
z.object({ colorCode: z.never().optional() }),
|
|
1499
|
-
z.object({
|
|
1500
|
-
colorCode: z.string().describe(
|
|
1501
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
1502
|
-
).min(3).max(20)
|
|
1503
|
-
})
|
|
1504
|
-
])
|
|
1505
|
-
)
|
|
1506
|
-
).min(1).max(200).optional()
|
|
1507
|
-
}).describe(
|
|
1508
|
-
"Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
|
|
1509
|
-
)
|
|
1510
|
-
})
|
|
1511
|
-
])
|
|
1512
|
-
)
|
|
1513
|
-
).min(1).max(200).optional(),
|
|
1514
|
-
pagingMetadata: z.object({
|
|
1515
|
-
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
1516
|
-
cursors: z.object({
|
|
1517
|
-
next: z.string().describe(
|
|
1518
|
-
"Cursor string pointing to the next page in the list of results."
|
|
1519
|
-
).max(16e3).optional().nullable(),
|
|
1520
|
-
prev: z.string().describe(
|
|
1521
|
-
"Cursor pointing to the previous page in the list of results."
|
|
1522
|
-
).max(16e3).optional().nullable()
|
|
1523
|
-
}).describe(
|
|
1524
|
-
"Cursor strings that point to the next page, previous page, or both."
|
|
1525
|
-
).optional(),
|
|
1526
|
-
hasNext: z.boolean().describe(
|
|
1527
|
-
"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."
|
|
1528
|
-
).optional().nullable()
|
|
1529
|
-
}).describe("Details on the paged set of results returned.").optional()
|
|
1530
|
-
});
|
|
1531
|
-
var BulkCreateCustomizationsRequest = z.object({
|
|
1532
|
-
customizations: z.array(
|
|
1533
|
-
z.intersection(
|
|
1534
|
-
z.object({
|
|
1535
|
-
_id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
|
|
1536
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1537
|
-
"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."
|
|
1538
|
-
).optional().nullable(),
|
|
1539
|
-
_createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
|
|
1540
|
-
_updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
|
|
1541
|
-
key: z.string().describe(
|
|
1542
|
-
"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)."
|
|
1543
|
-
).min(1).max(50).optional().nullable(),
|
|
1544
|
-
name: z.string().describe(
|
|
1545
|
-
'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
|
|
1546
|
-
).min(1).max(50).optional(),
|
|
1547
|
-
customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).optional(),
|
|
1548
|
-
customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).optional(),
|
|
1549
|
-
assignedProductsCount: z.number().int().describe(
|
|
1550
|
-
'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.'
|
|
1551
|
-
).optional().nullable()
|
|
1552
|
-
}),
|
|
1553
|
-
z.xor([
|
|
1554
|
-
z.object({
|
|
1555
|
-
freeTextInput: z.never().optional(),
|
|
1556
|
-
choicesSettings: z.never().optional()
|
|
1557
|
-
}),
|
|
1558
|
-
z.object({
|
|
1559
|
-
choicesSettings: z.never().optional(),
|
|
1560
|
-
freeTextInput: z.object({
|
|
1561
|
-
minCharCount: z.number().int().describe("Minimum text character length.").optional(),
|
|
1562
|
-
maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
|
|
1563
|
-
defaultAddedPrice: z.string().describe(
|
|
1564
|
-
"Default amount added to a product's price when this choice is assigned to a modifier."
|
|
1565
|
-
).optional().nullable(),
|
|
1566
|
-
title: z.string().describe(
|
|
1567
|
-
"Title to display to customer for their free-text input."
|
|
1568
|
-
).min(1).max(100).optional(),
|
|
1569
|
-
key: z.string().describe(
|
|
1570
|
-
"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)."
|
|
1571
|
-
).min(1).max(150).optional().nullable()
|
|
1572
|
-
}).describe(
|
|
1573
|
-
"Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
|
|
1574
|
-
)
|
|
1575
|
-
}),
|
|
1576
|
-
z.object({
|
|
1577
|
-
freeTextInput: z.never().optional(),
|
|
1578
|
-
choicesSettings: z.object({
|
|
1579
|
-
choices: z.array(
|
|
1580
|
-
z.intersection(
|
|
1581
|
-
z.object({
|
|
1582
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
1583
|
-
/^[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}$/,
|
|
1584
|
-
"Must be a valid GUID"
|
|
1585
|
-
).optional(),
|
|
1586
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).optional(),
|
|
1587
|
-
key: z.string().describe(
|
|
1588
|
-
"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)."
|
|
1589
|
-
).min(1).max(50).optional().nullable(),
|
|
1590
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
1591
|
-
defaultAddedPrice: z.string().describe(
|
|
1592
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
1593
|
-
).optional().nullable()
|
|
1594
|
-
}),
|
|
1595
|
-
z.xor([
|
|
1596
|
-
z.object({ colorCode: z.never().optional() }),
|
|
1597
|
-
z.object({
|
|
1598
|
-
colorCode: z.string().describe(
|
|
1599
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
1600
|
-
).min(3).max(20)
|
|
1601
|
-
})
|
|
1602
|
-
])
|
|
1603
|
-
)
|
|
1604
|
-
).min(1).max(200).optional()
|
|
1605
|
-
}).describe(
|
|
1606
|
-
"Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
|
|
1607
|
-
)
|
|
1608
|
-
})
|
|
1609
|
-
])
|
|
1610
|
-
)
|
|
1611
|
-
).min(1).max(100),
|
|
1612
|
-
options: z.object({
|
|
1613
|
-
returnEntity: z.boolean().describe(
|
|
1614
|
-
"Whether to return the full customization entities in the response.\n\nDefault: `false`"
|
|
1615
|
-
).optional()
|
|
1616
|
-
}).optional()
|
|
1617
|
-
});
|
|
1618
|
-
var BulkCreateCustomizationsResponse = z.object({
|
|
1619
|
-
results: z.array(
|
|
1620
|
-
z.object({
|
|
1621
|
-
itemMetadata: z.object({
|
|
1622
|
-
_id: z.string().describe(
|
|
1623
|
-
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
1624
|
-
).min(1).max(36).optional().nullable(),
|
|
1625
|
-
originalIndex: z.number().int().describe(
|
|
1626
|
-
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
1627
|
-
).optional(),
|
|
1628
|
-
success: z.boolean().describe(
|
|
1629
|
-
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
1630
|
-
).optional(),
|
|
1631
|
-
error: z.object({
|
|
1632
|
-
code: z.string().describe("Error code.").optional(),
|
|
1633
|
-
description: z.string().describe("Description of the error.").optional(),
|
|
1634
|
-
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
1635
|
-
}).describe("Details about the error in case of failure.").optional()
|
|
1636
|
-
}).describe("Bulk action metadata for customization.").optional(),
|
|
1637
|
-
customization: z.intersection(
|
|
1638
|
-
z.object({
|
|
1639
|
-
_id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
|
|
1640
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1641
|
-
"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."
|
|
1642
|
-
).optional().nullable(),
|
|
1643
|
-
_createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
|
|
1644
|
-
_updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
|
|
1645
|
-
key: z.string().describe(
|
|
1646
|
-
"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)."
|
|
1647
|
-
).min(1).max(50).optional().nullable(),
|
|
1648
|
-
name: z.string().describe(
|
|
1649
|
-
'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
|
|
1650
|
-
).min(1).max(50).optional(),
|
|
1651
|
-
customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
|
|
1652
|
-
customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
|
|
1653
|
-
"Customization render type.\n\nDefines how the customization will be displayed in the storefront."
|
|
1654
|
-
).optional(),
|
|
1655
|
-
assignedProductsCount: z.number().int().describe(
|
|
1656
|
-
'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.'
|
|
1657
|
-
).optional().nullable()
|
|
1658
|
-
}),
|
|
1659
|
-
z.xor([
|
|
1660
|
-
z.object({
|
|
1661
|
-
freeTextInput: z.never().optional(),
|
|
1662
|
-
choicesSettings: z.never().optional()
|
|
1663
|
-
}),
|
|
1664
|
-
z.object({
|
|
1665
|
-
choicesSettings: z.never().optional(),
|
|
1666
|
-
freeTextInput: z.object({
|
|
1667
|
-
minCharCount: z.number().int().describe("Minimum text character length.").optional(),
|
|
1668
|
-
maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
|
|
1669
|
-
defaultAddedPrice: z.string().describe(
|
|
1670
|
-
"Default amount added to a product's price when this choice is assigned to a modifier."
|
|
1671
|
-
).optional().nullable(),
|
|
1672
|
-
title: z.string().describe(
|
|
1673
|
-
"Title to display to customer for their free-text input."
|
|
1674
|
-
).min(1).max(100).optional(),
|
|
1675
|
-
key: z.string().describe(
|
|
1676
|
-
"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)."
|
|
1677
|
-
).min(1).max(150).optional().nullable()
|
|
1678
|
-
}).describe(
|
|
1679
|
-
"Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
|
|
1680
|
-
)
|
|
1681
|
-
}),
|
|
1682
|
-
z.object({
|
|
1683
|
-
freeTextInput: z.never().optional(),
|
|
1684
|
-
choicesSettings: z.object({
|
|
1685
|
-
choices: z.array(
|
|
1686
|
-
z.intersection(
|
|
1687
|
-
z.object({
|
|
1688
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
1689
|
-
/^[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}$/,
|
|
1690
|
-
"Must be a valid GUID"
|
|
1691
|
-
).optional(),
|
|
1692
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
|
|
1693
|
-
"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`."
|
|
1694
|
-
).optional(),
|
|
1695
|
-
key: z.string().describe(
|
|
1696
|
-
"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)."
|
|
1697
|
-
).min(1).max(50).optional().nullable(),
|
|
1698
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
1699
|
-
defaultAddedPrice: z.string().describe(
|
|
1700
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
1701
|
-
).optional().nullable()
|
|
1702
|
-
}),
|
|
1703
|
-
z.xor([
|
|
1704
|
-
z.object({ colorCode: z.never().optional() }),
|
|
1705
|
-
z.object({
|
|
1706
|
-
colorCode: z.string().describe(
|
|
1707
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
1708
|
-
).min(3).max(20)
|
|
1709
|
-
})
|
|
1710
|
-
])
|
|
1711
|
-
)
|
|
1712
|
-
).min(1).max(200).optional()
|
|
1713
|
-
}).describe(
|
|
1714
|
-
"Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
|
|
1715
|
-
)
|
|
1716
|
-
})
|
|
1717
|
-
])
|
|
1718
|
-
).describe(
|
|
1719
|
-
"Full customization entity.\n\nReturned only if `returnEntity: true` is passed in the request."
|
|
1720
|
-
).optional()
|
|
1721
|
-
})
|
|
1722
|
-
).min(1).max(100).optional(),
|
|
1723
|
-
bulkActionMetadata: z.object({
|
|
1724
|
-
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
1725
|
-
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
1726
|
-
undetailedFailures: z.number().int().describe(
|
|
1727
|
-
"Number of failures without details because detailed failure threshold was exceeded."
|
|
1728
|
-
).optional()
|
|
1729
|
-
}).describe("Bulk action metadata.").optional()
|
|
1730
|
-
});
|
|
1731
|
-
var AddCustomizationChoicesRequest = z.object({
|
|
1732
|
-
customizationId: z.string().describe("Customization ID.").regex(
|
|
1733
|
-
/^[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}$/,
|
|
1734
|
-
"Must be a valid GUID"
|
|
1735
|
-
),
|
|
1736
|
-
choices: z.array(
|
|
1737
|
-
z.intersection(
|
|
1738
|
-
z.object({
|
|
1739
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
1740
|
-
/^[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}$/,
|
|
1741
|
-
"Must be a valid GUID"
|
|
1742
|
-
).optional(),
|
|
1743
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).optional(),
|
|
1744
|
-
key: z.string().describe(
|
|
1745
|
-
"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)."
|
|
1746
|
-
).min(1).max(50).optional().nullable(),
|
|
1747
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
1748
|
-
defaultAddedPrice: z.string().describe(
|
|
1749
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
1750
|
-
).optional().nullable()
|
|
1751
|
-
}),
|
|
1752
|
-
z.xor([
|
|
1753
|
-
z.object({ colorCode: z.never().optional() }),
|
|
1754
|
-
z.object({
|
|
1755
|
-
colorCode: z.string().describe(
|
|
1756
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
1757
|
-
).min(3).max(20)
|
|
1758
|
-
})
|
|
1759
|
-
])
|
|
1760
|
-
)
|
|
1761
|
-
).min(1).max(100),
|
|
1762
|
-
options: z.object({
|
|
1763
|
-
fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
|
|
1764
|
-
}).optional()
|
|
1765
|
-
});
|
|
1766
|
-
var AddCustomizationChoicesResponse = z.object({
|
|
1767
|
-
customization: z.intersection(
|
|
1768
|
-
z.object({
|
|
1769
|
-
_id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
|
|
1770
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1771
|
-
"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."
|
|
1772
|
-
).optional().nullable(),
|
|
1773
|
-
_createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
|
|
1774
|
-
_updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
|
|
1775
|
-
key: z.string().describe(
|
|
1776
|
-
"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)."
|
|
1777
|
-
).min(1).max(50).optional().nullable(),
|
|
1778
|
-
name: z.string().describe(
|
|
1779
|
-
'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
|
|
1780
|
-
).min(1).max(50).optional(),
|
|
1781
|
-
customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
|
|
1782
|
-
customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
|
|
1783
|
-
"Customization render type.\n\nDefines how the customization will be displayed in the storefront."
|
|
1784
|
-
).optional(),
|
|
1785
|
-
assignedProductsCount: z.number().int().describe(
|
|
1786
|
-
'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.'
|
|
1787
|
-
).optional().nullable()
|
|
1788
|
-
}),
|
|
1789
|
-
z.xor([
|
|
1790
|
-
z.object({
|
|
1791
|
-
freeTextInput: z.never().optional(),
|
|
1792
|
-
choicesSettings: z.never().optional()
|
|
1793
|
-
}),
|
|
1794
|
-
z.object({
|
|
1795
|
-
choicesSettings: z.never().optional(),
|
|
1796
|
-
freeTextInput: z.object({
|
|
1797
|
-
minCharCount: z.number().int().describe("Minimum text character length.").optional(),
|
|
1798
|
-
maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
|
|
1799
|
-
defaultAddedPrice: z.string().describe(
|
|
1800
|
-
"Default amount added to a product's price when this choice is assigned to a modifier."
|
|
1801
|
-
).optional().nullable(),
|
|
1802
|
-
title: z.string().describe(
|
|
1803
|
-
"Title to display to customer for their free-text input."
|
|
1804
|
-
).min(1).max(100).optional(),
|
|
1805
|
-
key: z.string().describe(
|
|
1806
|
-
"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)."
|
|
1807
|
-
).min(1).max(150).optional().nullable()
|
|
1808
|
-
}).describe(
|
|
1809
|
-
"Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
|
|
1810
|
-
)
|
|
1811
|
-
}),
|
|
1812
|
-
z.object({
|
|
1813
|
-
freeTextInput: z.never().optional(),
|
|
1814
|
-
choicesSettings: z.object({
|
|
1815
|
-
choices: z.array(
|
|
1816
|
-
z.intersection(
|
|
1817
|
-
z.object({
|
|
1818
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
1819
|
-
/^[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}$/,
|
|
1820
|
-
"Must be a valid GUID"
|
|
1821
|
-
).optional(),
|
|
1822
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
|
|
1823
|
-
"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`."
|
|
1824
|
-
).optional(),
|
|
1825
|
-
key: z.string().describe(
|
|
1826
|
-
"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)."
|
|
1827
|
-
).min(1).max(50).optional().nullable(),
|
|
1828
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
1829
|
-
defaultAddedPrice: z.string().describe(
|
|
1830
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
1831
|
-
).optional().nullable()
|
|
1832
|
-
}),
|
|
1833
|
-
z.xor([
|
|
1834
|
-
z.object({ colorCode: z.never().optional() }),
|
|
1835
|
-
z.object({
|
|
1836
|
-
colorCode: z.string().describe(
|
|
1837
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
1838
|
-
).min(3).max(20)
|
|
1839
|
-
})
|
|
1840
|
-
])
|
|
1841
|
-
)
|
|
1842
|
-
).min(1).max(200).optional()
|
|
1843
|
-
}).describe(
|
|
1844
|
-
"Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
|
|
1845
|
-
)
|
|
1846
|
-
})
|
|
1847
|
-
])
|
|
1848
|
-
).describe("Updated customization.").optional()
|
|
1849
|
-
});
|
|
1850
|
-
var SetCustomizationChoicesRequest = z.object({
|
|
1851
|
-
customizationId: z.string().describe("Customization ID.").regex(
|
|
1852
|
-
/^[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}$/,
|
|
1853
|
-
"Must be a valid GUID"
|
|
1854
|
-
),
|
|
1855
|
-
choices: z.array(
|
|
1856
|
-
z.intersection(
|
|
1857
|
-
z.object({
|
|
1858
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
1859
|
-
/^[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}$/,
|
|
1860
|
-
"Must be a valid GUID"
|
|
1861
|
-
).optional(),
|
|
1862
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).optional(),
|
|
1863
|
-
key: z.string().describe(
|
|
1864
|
-
"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)."
|
|
1865
|
-
).min(1).max(50).optional().nullable(),
|
|
1866
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
1867
|
-
defaultAddedPrice: z.string().describe(
|
|
1868
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
1869
|
-
).optional().nullable()
|
|
1870
|
-
}),
|
|
1871
|
-
z.xor([
|
|
1872
|
-
z.object({ colorCode: z.never().optional() }),
|
|
1873
|
-
z.object({
|
|
1874
|
-
colorCode: z.string().describe(
|
|
1875
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
1876
|
-
).min(3).max(20)
|
|
1877
|
-
})
|
|
1878
|
-
])
|
|
1879
|
-
)
|
|
1880
|
-
).min(1).max(200),
|
|
1881
|
-
options: z.object({
|
|
1882
|
-
fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
|
|
1883
|
-
}).optional()
|
|
1884
|
-
});
|
|
1885
|
-
var SetCustomizationChoicesResponse = z.object({
|
|
1886
|
-
customization: z.intersection(
|
|
1887
|
-
z.object({
|
|
1888
|
-
_id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
|
|
1889
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1890
|
-
"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."
|
|
1891
|
-
).optional().nullable(),
|
|
1892
|
-
_createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
|
|
1893
|
-
_updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
|
|
1894
|
-
key: z.string().describe(
|
|
1895
|
-
"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)."
|
|
1896
|
-
).min(1).max(50).optional().nullable(),
|
|
1897
|
-
name: z.string().describe(
|
|
1898
|
-
'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
|
|
1899
|
-
).min(1).max(50).optional(),
|
|
1900
|
-
customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
|
|
1901
|
-
customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
|
|
1902
|
-
"Customization render type.\n\nDefines how the customization will be displayed in the storefront."
|
|
1903
|
-
).optional(),
|
|
1904
|
-
assignedProductsCount: z.number().int().describe(
|
|
1905
|
-
'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.'
|
|
1906
|
-
).optional().nullable()
|
|
1907
|
-
}),
|
|
1908
|
-
z.xor([
|
|
1909
|
-
z.object({
|
|
1910
|
-
freeTextInput: z.never().optional(),
|
|
1911
|
-
choicesSettings: z.never().optional()
|
|
1912
|
-
}),
|
|
1913
|
-
z.object({
|
|
1914
|
-
choicesSettings: z.never().optional(),
|
|
1915
|
-
freeTextInput: z.object({
|
|
1916
|
-
minCharCount: z.number().int().describe("Minimum text character length.").optional(),
|
|
1917
|
-
maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
|
|
1918
|
-
defaultAddedPrice: z.string().describe(
|
|
1919
|
-
"Default amount added to a product's price when this choice is assigned to a modifier."
|
|
1920
|
-
).optional().nullable(),
|
|
1921
|
-
title: z.string().describe(
|
|
1922
|
-
"Title to display to customer for their free-text input."
|
|
1923
|
-
).min(1).max(100).optional(),
|
|
1924
|
-
key: z.string().describe(
|
|
1925
|
-
"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)."
|
|
1926
|
-
).min(1).max(150).optional().nullable()
|
|
1927
|
-
}).describe(
|
|
1928
|
-
"Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
|
|
1929
|
-
)
|
|
1930
|
-
}),
|
|
1931
|
-
z.object({
|
|
1932
|
-
freeTextInput: z.never().optional(),
|
|
1933
|
-
choicesSettings: z.object({
|
|
1934
|
-
choices: z.array(
|
|
1935
|
-
z.intersection(
|
|
1936
|
-
z.object({
|
|
1937
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
1938
|
-
/^[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}$/,
|
|
1939
|
-
"Must be a valid GUID"
|
|
1940
|
-
).optional(),
|
|
1941
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
|
|
1942
|
-
"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`."
|
|
1943
|
-
).optional(),
|
|
1944
|
-
key: z.string().describe(
|
|
1945
|
-
"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)."
|
|
1946
|
-
).min(1).max(50).optional().nullable(),
|
|
1947
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
1948
|
-
defaultAddedPrice: z.string().describe(
|
|
1949
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
1950
|
-
).optional().nullable()
|
|
1951
|
-
}),
|
|
1952
|
-
z.xor([
|
|
1953
|
-
z.object({ colorCode: z.never().optional() }),
|
|
1954
|
-
z.object({
|
|
1955
|
-
colorCode: z.string().describe(
|
|
1956
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
1957
|
-
).min(3).max(20)
|
|
1958
|
-
})
|
|
1959
|
-
])
|
|
1960
|
-
)
|
|
1961
|
-
).min(1).max(200).optional()
|
|
1962
|
-
}).describe(
|
|
1963
|
-
"Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
|
|
1964
|
-
)
|
|
1965
|
-
})
|
|
1966
|
-
])
|
|
1967
|
-
).describe("Updated customization.").optional()
|
|
1968
|
-
});
|
|
1969
|
-
var RemoveCustomizationChoicesRequest = z.object({
|
|
1970
|
-
customizationId: z.string().describe("Customization ID.").regex(
|
|
1971
|
-
/^[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}$/,
|
|
1972
|
-
"Must be a valid GUID"
|
|
1973
|
-
),
|
|
1974
|
-
choiceIds: z.array(z.string()).min(1).max(100),
|
|
1975
|
-
options: z.object({
|
|
1976
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe("Customization revision.").optional(),
|
|
1977
|
-
fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
|
|
1978
|
-
}).optional()
|
|
1979
|
-
});
|
|
1980
|
-
var RemoveCustomizationChoicesResponse = z.object({
|
|
1981
|
-
customization: z.intersection(
|
|
1982
|
-
z.object({
|
|
1983
|
-
_id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
|
|
1984
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1985
|
-
"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."
|
|
1986
|
-
).optional().nullable(),
|
|
1987
|
-
_createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
|
|
1988
|
-
_updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
|
|
1989
|
-
key: z.string().describe(
|
|
1990
|
-
"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)."
|
|
1991
|
-
).min(1).max(50).optional().nullable(),
|
|
1992
|
-
name: z.string().describe(
|
|
1993
|
-
'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
|
|
1994
|
-
).min(1).max(50).optional(),
|
|
1995
|
-
customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
|
|
1996
|
-
customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
|
|
1997
|
-
"Customization render type.\n\nDefines how the customization will be displayed in the storefront."
|
|
1998
|
-
).optional(),
|
|
1999
|
-
assignedProductsCount: z.number().int().describe(
|
|
2000
|
-
'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.'
|
|
2001
|
-
).optional().nullable()
|
|
2002
|
-
}),
|
|
2003
|
-
z.xor([
|
|
2004
|
-
z.object({
|
|
2005
|
-
freeTextInput: z.never().optional(),
|
|
2006
|
-
choicesSettings: z.never().optional()
|
|
2007
|
-
}),
|
|
2008
|
-
z.object({
|
|
2009
|
-
choicesSettings: z.never().optional(),
|
|
2010
|
-
freeTextInput: z.object({
|
|
2011
|
-
minCharCount: z.number().int().describe("Minimum text character length.").optional(),
|
|
2012
|
-
maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
|
|
2013
|
-
defaultAddedPrice: z.string().describe(
|
|
2014
|
-
"Default amount added to a product's price when this choice is assigned to a modifier."
|
|
2015
|
-
).optional().nullable(),
|
|
2016
|
-
title: z.string().describe(
|
|
2017
|
-
"Title to display to customer for their free-text input."
|
|
2018
|
-
).min(1).max(100).optional(),
|
|
2019
|
-
key: z.string().describe(
|
|
2020
|
-
"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)."
|
|
2021
|
-
).min(1).max(150).optional().nullable()
|
|
2022
|
-
}).describe(
|
|
2023
|
-
"Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
|
|
2024
|
-
)
|
|
2025
|
-
}),
|
|
2026
|
-
z.object({
|
|
2027
|
-
freeTextInput: z.never().optional(),
|
|
2028
|
-
choicesSettings: z.object({
|
|
2029
|
-
choices: z.array(
|
|
2030
|
-
z.intersection(
|
|
2031
|
-
z.object({
|
|
2032
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
2033
|
-
/^[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}$/,
|
|
2034
|
-
"Must be a valid GUID"
|
|
2035
|
-
).optional(),
|
|
2036
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
|
|
2037
|
-
"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`."
|
|
2038
|
-
).optional(),
|
|
2039
|
-
key: z.string().describe(
|
|
2040
|
-
"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)."
|
|
2041
|
-
).min(1).max(50).optional().nullable(),
|
|
2042
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
2043
|
-
defaultAddedPrice: z.string().describe(
|
|
2044
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
2045
|
-
).optional().nullable()
|
|
2046
|
-
}),
|
|
2047
|
-
z.xor([
|
|
2048
|
-
z.object({ colorCode: z.never().optional() }),
|
|
2049
|
-
z.object({
|
|
2050
|
-
colorCode: z.string().describe(
|
|
2051
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
2052
|
-
).min(3).max(20)
|
|
2053
|
-
})
|
|
2054
|
-
])
|
|
2055
|
-
)
|
|
2056
|
-
).min(1).max(200).optional()
|
|
2057
|
-
}).describe(
|
|
2058
|
-
"Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
|
|
2059
|
-
)
|
|
2060
|
-
})
|
|
2061
|
-
])
|
|
2062
|
-
).describe("Updated customization.").optional()
|
|
2063
|
-
});
|
|
2064
|
-
var BulkAddCustomizationChoicesRequest = z.object({
|
|
2065
|
-
customizationsChoices: z.array(
|
|
2066
|
-
z.object({
|
|
2067
|
-
customizationId: z.string().describe("Customization ID.").min(1).max(36),
|
|
2068
|
-
choices: z.array(
|
|
2069
|
-
z.intersection(
|
|
2070
|
-
z.object({
|
|
2071
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
2072
|
-
/^[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}$/,
|
|
2073
|
-
"Must be a valid GUID"
|
|
2074
|
-
).optional(),
|
|
2075
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).optional(),
|
|
2076
|
-
key: z.string().describe(
|
|
2077
|
-
"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)."
|
|
2078
|
-
).min(1).max(50).optional().nullable(),
|
|
2079
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
2080
|
-
defaultAddedPrice: z.string().describe(
|
|
2081
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
2082
|
-
).optional().nullable()
|
|
2083
|
-
}),
|
|
2084
|
-
z.xor([
|
|
2085
|
-
z.object({ colorCode: z.never().optional() }),
|
|
2086
|
-
z.object({
|
|
2087
|
-
colorCode: z.string().describe(
|
|
2088
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
2089
|
-
).min(3).max(20)
|
|
2090
|
-
})
|
|
2091
|
-
])
|
|
2092
|
-
)
|
|
2093
|
-
).min(1).max(100)
|
|
2094
|
-
})
|
|
2095
|
-
).min(1).max(100),
|
|
2096
|
-
options: z.object({
|
|
2097
|
-
returnEntity: z.boolean().describe(
|
|
2098
|
-
"Whether to return the full customization entities in the response.\n\nDefault: `false`"
|
|
2099
|
-
).optional(),
|
|
2100
|
-
fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
|
|
2101
|
-
}).optional()
|
|
2102
|
-
});
|
|
2103
|
-
var BulkAddCustomizationChoicesResponse = z.object({
|
|
2104
|
-
results: z.array(
|
|
2105
|
-
z.object({
|
|
2106
|
-
itemMetadata: z.object({
|
|
2107
|
-
_id: z.string().describe(
|
|
2108
|
-
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
2109
|
-
).min(1).max(36).optional().nullable(),
|
|
2110
|
-
originalIndex: z.number().int().describe(
|
|
2111
|
-
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
2112
|
-
).optional(),
|
|
2113
|
-
success: z.boolean().describe(
|
|
2114
|
-
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
2115
|
-
).optional(),
|
|
2116
|
-
error: z.object({
|
|
2117
|
-
code: z.string().describe("Error code.").optional(),
|
|
2118
|
-
description: z.string().describe("Description of the error.").optional(),
|
|
2119
|
-
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
2120
|
-
}).describe("Details about the error in case of failure.").optional()
|
|
2121
|
-
}).describe("Bulk action metadata for customization.").optional(),
|
|
2122
|
-
customization: z.intersection(
|
|
2123
|
-
z.object({
|
|
2124
|
-
_id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
|
|
2125
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
2126
|
-
"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."
|
|
2127
|
-
).optional().nullable(),
|
|
2128
|
-
_createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
|
|
2129
|
-
_updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
|
|
2130
|
-
key: z.string().describe(
|
|
2131
|
-
"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)."
|
|
2132
|
-
).min(1).max(50).optional().nullable(),
|
|
2133
|
-
name: z.string().describe(
|
|
2134
|
-
'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
|
|
2135
|
-
).min(1).max(50).optional(),
|
|
2136
|
-
customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
|
|
2137
|
-
customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
|
|
2138
|
-
"Customization render type.\n\nDefines how the customization will be displayed in the storefront."
|
|
2139
|
-
).optional(),
|
|
2140
|
-
assignedProductsCount: z.number().int().describe(
|
|
2141
|
-
'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.'
|
|
2142
|
-
).optional().nullable()
|
|
2143
|
-
}),
|
|
2144
|
-
z.xor([
|
|
2145
|
-
z.object({
|
|
2146
|
-
freeTextInput: z.never().optional(),
|
|
2147
|
-
choicesSettings: z.never().optional()
|
|
2148
|
-
}),
|
|
2149
|
-
z.object({
|
|
2150
|
-
choicesSettings: z.never().optional(),
|
|
2151
|
-
freeTextInput: z.object({
|
|
2152
|
-
minCharCount: z.number().int().describe("Minimum text character length.").optional(),
|
|
2153
|
-
maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
|
|
2154
|
-
defaultAddedPrice: z.string().describe(
|
|
2155
|
-
"Default amount added to a product's price when this choice is assigned to a modifier."
|
|
2156
|
-
).optional().nullable(),
|
|
2157
|
-
title: z.string().describe(
|
|
2158
|
-
"Title to display to customer for their free-text input."
|
|
2159
|
-
).min(1).max(100).optional(),
|
|
2160
|
-
key: z.string().describe(
|
|
2161
|
-
"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)."
|
|
2162
|
-
).min(1).max(150).optional().nullable()
|
|
2163
|
-
}).describe(
|
|
2164
|
-
"Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
|
|
2165
|
-
)
|
|
2166
|
-
}),
|
|
2167
|
-
z.object({
|
|
2168
|
-
freeTextInput: z.never().optional(),
|
|
2169
|
-
choicesSettings: z.object({
|
|
2170
|
-
choices: z.array(
|
|
2171
|
-
z.intersection(
|
|
2172
|
-
z.object({
|
|
2173
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
2174
|
-
/^[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}$/,
|
|
2175
|
-
"Must be a valid GUID"
|
|
2176
|
-
).optional(),
|
|
2177
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
|
|
2178
|
-
"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`."
|
|
2179
|
-
).optional(),
|
|
2180
|
-
key: z.string().describe(
|
|
2181
|
-
"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)."
|
|
2182
|
-
).min(1).max(50).optional().nullable(),
|
|
2183
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
2184
|
-
defaultAddedPrice: z.string().describe(
|
|
2185
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
2186
|
-
).optional().nullable()
|
|
2187
|
-
}),
|
|
2188
|
-
z.xor([
|
|
2189
|
-
z.object({ colorCode: z.never().optional() }),
|
|
2190
|
-
z.object({
|
|
2191
|
-
colorCode: z.string().describe(
|
|
2192
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
2193
|
-
).min(3).max(20)
|
|
2194
|
-
})
|
|
2195
|
-
])
|
|
2196
|
-
)
|
|
2197
|
-
).min(1).max(200).optional()
|
|
2198
|
-
}).describe(
|
|
2199
|
-
"Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
|
|
2200
|
-
)
|
|
2201
|
-
})
|
|
2202
|
-
])
|
|
2203
|
-
).describe(
|
|
2204
|
-
"Full customization entity.\n\nReturned only if `returnEntity: true` is passed in the request."
|
|
2205
|
-
).optional()
|
|
2206
|
-
})
|
|
2207
|
-
).min(1).max(100).optional(),
|
|
2208
|
-
bulkActionMetadata: z.object({
|
|
2209
|
-
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
2210
|
-
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
2211
|
-
undetailedFailures: z.number().int().describe(
|
|
2212
|
-
"Number of failures without details because detailed failure threshold was exceeded."
|
|
2213
|
-
).optional()
|
|
2214
|
-
}).describe("Bulk action metadata.").optional()
|
|
2215
|
-
});
|
|
2216
|
-
var BulkUpdateCustomizationsRequest = z.object({
|
|
2217
|
-
customizations: z.array(
|
|
2218
|
-
z.object({
|
|
2219
|
-
customization: z.intersection(
|
|
2220
|
-
z.object({
|
|
2221
|
-
_id: z.string().describe("Customization ID.").min(1).max(36),
|
|
2222
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
2223
|
-
"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."
|
|
2224
|
-
),
|
|
2225
|
-
_createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
|
|
2226
|
-
_updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
|
|
2227
|
-
key: z.string().describe(
|
|
2228
|
-
"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)."
|
|
2229
|
-
).min(1).max(50).optional().nullable(),
|
|
2230
|
-
name: z.string().describe(
|
|
2231
|
-
'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
|
|
2232
|
-
).min(1).max(50),
|
|
2233
|
-
customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).optional(),
|
|
2234
|
-
customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).optional(),
|
|
2235
|
-
assignedProductsCount: z.number().int().describe(
|
|
2236
|
-
'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.'
|
|
2237
|
-
).optional().nullable()
|
|
2238
|
-
}),
|
|
2239
|
-
z.xor([
|
|
2240
|
-
z.object({
|
|
2241
|
-
freeTextInput: z.never().optional(),
|
|
2242
|
-
choicesSettings: z.never().optional()
|
|
2243
|
-
}),
|
|
2244
|
-
z.object({
|
|
2245
|
-
choicesSettings: z.never().optional(),
|
|
2246
|
-
freeTextInput: z.object({
|
|
2247
|
-
minCharCount: z.number().int().describe("Minimum text character length.").optional(),
|
|
2248
|
-
maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
|
|
2249
|
-
defaultAddedPrice: z.string().describe(
|
|
2250
|
-
"Default amount added to a product's price when this choice is assigned to a modifier."
|
|
2251
|
-
).optional().nullable(),
|
|
2252
|
-
title: z.string().describe(
|
|
2253
|
-
"Title to display to customer for their free-text input."
|
|
2254
|
-
).min(1).max(100).optional(),
|
|
2255
|
-
key: z.string().describe(
|
|
2256
|
-
"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)."
|
|
2257
|
-
).min(1).max(150).optional().nullable()
|
|
2258
|
-
}).describe(
|
|
2259
|
-
"Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
|
|
2260
|
-
)
|
|
2261
|
-
}),
|
|
2262
|
-
z.object({
|
|
2263
|
-
freeTextInput: z.never().optional(),
|
|
2264
|
-
choicesSettings: z.object({
|
|
2265
|
-
choices: z.array(
|
|
2266
|
-
z.intersection(
|
|
2267
|
-
z.object({
|
|
2268
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
2269
|
-
/^[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}$/,
|
|
2270
|
-
"Must be a valid GUID"
|
|
2271
|
-
).optional(),
|
|
2272
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).optional(),
|
|
2273
|
-
key: z.string().describe(
|
|
2274
|
-
"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)."
|
|
2275
|
-
).min(1).max(50).optional().nullable(),
|
|
2276
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
2277
|
-
defaultAddedPrice: z.string().describe(
|
|
2278
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
2279
|
-
).optional().nullable()
|
|
2280
|
-
}),
|
|
2281
|
-
z.xor([
|
|
2282
|
-
z.object({ colorCode: z.never().optional() }),
|
|
2283
|
-
z.object({
|
|
2284
|
-
colorCode: z.string().describe(
|
|
2285
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
2286
|
-
).min(3).max(20)
|
|
2287
|
-
})
|
|
2288
|
-
])
|
|
2289
|
-
)
|
|
2290
|
-
).min(1).max(200).optional()
|
|
2291
|
-
}).describe(
|
|
2292
|
-
"Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
|
|
2293
|
-
)
|
|
2294
|
-
})
|
|
2295
|
-
])
|
|
2296
|
-
).describe("Customization to update.").optional()
|
|
2297
|
-
})
|
|
2298
|
-
).min(1).max(100),
|
|
2299
|
-
options: z.object({
|
|
2300
|
-
returnEntity: z.boolean().describe(
|
|
2301
|
-
"Whether to return the full customization entities in the response.\n\nDefault: `false`"
|
|
2302
|
-
).optional(),
|
|
2303
|
-
fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
|
|
2304
|
-
}).optional()
|
|
2305
|
-
});
|
|
2306
|
-
var BulkUpdateCustomizationsResponse = z.object({
|
|
2307
|
-
results: z.array(
|
|
2308
|
-
z.object({
|
|
2309
|
-
itemMetadata: z.object({
|
|
2310
|
-
_id: z.string().describe(
|
|
2311
|
-
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
2312
|
-
).min(1).max(36).optional().nullable(),
|
|
2313
|
-
originalIndex: z.number().int().describe(
|
|
2314
|
-
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
2315
|
-
).optional(),
|
|
2316
|
-
success: z.boolean().describe(
|
|
2317
|
-
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
2318
|
-
).optional(),
|
|
2319
|
-
error: z.object({
|
|
2320
|
-
code: z.string().describe("Error code.").optional(),
|
|
2321
|
-
description: z.string().describe("Description of the error.").optional(),
|
|
2322
|
-
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
2323
|
-
}).describe("Details about the error in case of failure.").optional()
|
|
2324
|
-
}).describe("Bulk action metadata for customization.").optional(),
|
|
2325
|
-
customization: z.intersection(
|
|
2326
|
-
z.object({
|
|
2327
|
-
_id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
|
|
2328
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
2329
|
-
"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."
|
|
2330
|
-
).optional().nullable(),
|
|
2331
|
-
_createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
|
|
2332
|
-
_updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
|
|
2333
|
-
key: z.string().describe(
|
|
2334
|
-
"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)."
|
|
2335
|
-
).min(1).max(50).optional().nullable(),
|
|
2336
|
-
name: z.string().describe(
|
|
2337
|
-
'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
|
|
2338
|
-
).min(1).max(50).optional(),
|
|
2339
|
-
customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
|
|
2340
|
-
customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
|
|
2341
|
-
"Customization render type.\n\nDefines how the customization will be displayed in the storefront."
|
|
2342
|
-
).optional(),
|
|
2343
|
-
assignedProductsCount: z.number().int().describe(
|
|
2344
|
-
'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.'
|
|
2345
|
-
).optional().nullable()
|
|
2346
|
-
}),
|
|
2347
|
-
z.xor([
|
|
2348
|
-
z.object({
|
|
2349
|
-
freeTextInput: z.never().optional(),
|
|
2350
|
-
choicesSettings: z.never().optional()
|
|
2351
|
-
}),
|
|
2352
|
-
z.object({
|
|
2353
|
-
choicesSettings: z.never().optional(),
|
|
2354
|
-
freeTextInput: z.object({
|
|
2355
|
-
minCharCount: z.number().int().describe("Minimum text character length.").optional(),
|
|
2356
|
-
maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
|
|
2357
|
-
defaultAddedPrice: z.string().describe(
|
|
2358
|
-
"Default amount added to a product's price when this choice is assigned to a modifier."
|
|
2359
|
-
).optional().nullable(),
|
|
2360
|
-
title: z.string().describe(
|
|
2361
|
-
"Title to display to customer for their free-text input."
|
|
2362
|
-
).min(1).max(100).optional(),
|
|
2363
|
-
key: z.string().describe(
|
|
2364
|
-
"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)."
|
|
2365
|
-
).min(1).max(150).optional().nullable()
|
|
2366
|
-
}).describe(
|
|
2367
|
-
"Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
|
|
2368
|
-
)
|
|
2369
|
-
}),
|
|
2370
|
-
z.object({
|
|
2371
|
-
freeTextInput: z.never().optional(),
|
|
2372
|
-
choicesSettings: z.object({
|
|
2373
|
-
choices: z.array(
|
|
2374
|
-
z.intersection(
|
|
2375
|
-
z.object({
|
|
2376
|
-
_id: z.string().describe("Choice ID.").regex(
|
|
2377
|
-
/^[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}$/,
|
|
2378
|
-
"Must be a valid GUID"
|
|
2379
|
-
).optional(),
|
|
2380
|
-
choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
|
|
2381
|
-
"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`."
|
|
2382
|
-
).optional(),
|
|
2383
|
-
key: z.string().describe(
|
|
2384
|
-
"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)."
|
|
2385
|
-
).min(1).max(50).optional().nullable(),
|
|
2386
|
-
name: z.string().describe("Choice name.").min(1).max(50).optional(),
|
|
2387
|
-
defaultAddedPrice: z.string().describe(
|
|
2388
|
-
"Default amount added to a product's price when this customization is assigned to a modifier."
|
|
2389
|
-
).optional().nullable()
|
|
2390
|
-
}),
|
|
2391
|
-
z.xor([
|
|
2392
|
-
z.object({ colorCode: z.never().optional() }),
|
|
2393
|
-
z.object({
|
|
2394
|
-
colorCode: z.string().describe(
|
|
2395
|
-
"Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
|
|
2396
|
-
).min(3).max(20)
|
|
2397
|
-
})
|
|
2398
|
-
])
|
|
2399
|
-
)
|
|
2400
|
-
).min(1).max(200).optional()
|
|
2401
|
-
}).describe(
|
|
2402
|
-
"Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
|
|
2403
|
-
)
|
|
2404
|
-
})
|
|
2405
|
-
])
|
|
2406
|
-
).describe(
|
|
2407
|
-
"Full customization entity.\n\nReturned only if `returnEntity: true` is passed in the request."
|
|
2408
|
-
).optional()
|
|
2409
|
-
})
|
|
2410
|
-
).min(1).max(100).optional(),
|
|
2411
|
-
bulkActionMetadata: z.object({
|
|
2412
|
-
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
2413
|
-
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
2414
|
-
undetailedFailures: z.number().int().describe(
|
|
2415
|
-
"Number of failures without details because detailed failure threshold was exceeded."
|
|
2416
|
-
).optional()
|
|
2417
|
-
}).describe("Bulk action metadata.").optional()
|
|
2418
|
-
});
|
|
2419
|
-
|
|
2420
|
-
// src/stores-catalog-v3-customization-customizations-v-3.universal.ts
|
|
2421
894
|
var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
|
|
2422
895
|
var CustomizationType = /* @__PURE__ */ ((CustomizationType2) => {
|
|
2423
896
|
CustomizationType2["PRODUCT_OPTION"] = "PRODUCT_OPTION";
|
|
@@ -2461,10 +934,7 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
2461
934
|
return WebhookIdentityType2;
|
|
2462
935
|
})(WebhookIdentityType || {});
|
|
2463
936
|
async function createCustomization2(customization) {
|
|
2464
|
-
const { httpClient, sideEffects
|
|
2465
|
-
if (validateRequestSchema) {
|
|
2466
|
-
CreateCustomizationRequest.parse({ customization });
|
|
2467
|
-
}
|
|
937
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
2468
938
|
const payload = (0, import_transform_paths2.transformPaths)(
|
|
2469
939
|
(0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ customization }),
|
|
2470
940
|
[
|
|
@@ -2508,10 +978,7 @@ async function createCustomization2(customization) {
|
|
|
2508
978
|
}
|
|
2509
979
|
}
|
|
2510
980
|
async function getCustomization2(customizationId, options) {
|
|
2511
|
-
const { httpClient, sideEffects
|
|
2512
|
-
if (validateRequestSchema) {
|
|
2513
|
-
GetCustomizationRequest.parse({ customizationId, options });
|
|
2514
|
-
}
|
|
981
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2515
982
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
2516
983
|
customizationId,
|
|
2517
984
|
fields: options?.fields
|
|
@@ -2550,10 +1017,7 @@ async function getCustomization2(customizationId, options) {
|
|
|
2550
1017
|
}
|
|
2551
1018
|
}
|
|
2552
1019
|
async function updateCustomization2(_id, customization, options) {
|
|
2553
|
-
const { httpClient, sideEffects
|
|
2554
|
-
if (validateRequestSchema) {
|
|
2555
|
-
UpdateCustomizationRequest.parse({ _id, customization, options });
|
|
2556
|
-
}
|
|
1020
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
2557
1021
|
const payload = (0, import_transform_paths2.transformPaths)(
|
|
2558
1022
|
(0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
2559
1023
|
customization: { ...customization, id: _id },
|
|
@@ -2603,10 +1067,7 @@ async function updateCustomization2(_id, customization, options) {
|
|
|
2603
1067
|
}
|
|
2604
1068
|
}
|
|
2605
1069
|
async function deleteCustomization2(customizationId) {
|
|
2606
|
-
const { httpClient, sideEffects
|
|
2607
|
-
if (validateRequestSchema) {
|
|
2608
|
-
DeleteCustomizationRequest.parse({ customizationId });
|
|
2609
|
-
}
|
|
1070
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
2610
1071
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
2611
1072
|
customizationId
|
|
2612
1073
|
});
|
|
@@ -2687,10 +1148,7 @@ function queryCustomizations2(options) {
|
|
|
2687
1148
|
});
|
|
2688
1149
|
}
|
|
2689
1150
|
async function typedQueryCustomizations(query, options) {
|
|
2690
|
-
const { httpClient, sideEffects
|
|
2691
|
-
if (validateRequestSchema) {
|
|
2692
|
-
QueryCustomizationsRequest.parse({ query, options });
|
|
2693
|
-
}
|
|
1151
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2694
1152
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
2695
1153
|
query,
|
|
2696
1154
|
...options
|
|
@@ -2731,10 +1189,7 @@ var utils = {
|
|
|
2731
1189
|
}
|
|
2732
1190
|
};
|
|
2733
1191
|
async function bulkCreateCustomizations2(customizations, options) {
|
|
2734
|
-
const { httpClient, sideEffects
|
|
2735
|
-
if (validateRequestSchema) {
|
|
2736
|
-
BulkCreateCustomizationsRequest.parse({ customizations, options });
|
|
2737
|
-
}
|
|
1192
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2738
1193
|
const payload = (0, import_transform_paths2.transformPaths)(
|
|
2739
1194
|
(0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
2740
1195
|
customizations,
|
|
@@ -2786,14 +1241,7 @@ async function bulkCreateCustomizations2(customizations, options) {
|
|
|
2786
1241
|
}
|
|
2787
1242
|
}
|
|
2788
1243
|
async function addCustomizationChoices2(customizationId, choices, options) {
|
|
2789
|
-
const { httpClient, sideEffects
|
|
2790
|
-
if (validateRequestSchema) {
|
|
2791
|
-
AddCustomizationChoicesRequest.parse({
|
|
2792
|
-
customizationId,
|
|
2793
|
-
choices,
|
|
2794
|
-
options
|
|
2795
|
-
});
|
|
2796
|
-
}
|
|
1244
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
2797
1245
|
const payload = (0, import_transform_paths2.transformPaths)(
|
|
2798
1246
|
(0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
2799
1247
|
customizationId,
|
|
@@ -2842,14 +1290,7 @@ async function addCustomizationChoices2(customizationId, choices, options) {
|
|
|
2842
1290
|
}
|
|
2843
1291
|
}
|
|
2844
1292
|
async function setCustomizationChoices2(customizationId, choices, options) {
|
|
2845
|
-
const { httpClient, sideEffects
|
|
2846
|
-
if (validateRequestSchema) {
|
|
2847
|
-
SetCustomizationChoicesRequest.parse({
|
|
2848
|
-
customizationId,
|
|
2849
|
-
choices,
|
|
2850
|
-
options
|
|
2851
|
-
});
|
|
2852
|
-
}
|
|
1293
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
2853
1294
|
const payload = (0, import_transform_paths2.transformPaths)(
|
|
2854
1295
|
(0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
2855
1296
|
customizationId,
|
|
@@ -2898,14 +1339,7 @@ async function setCustomizationChoices2(customizationId, choices, options) {
|
|
|
2898
1339
|
}
|
|
2899
1340
|
}
|
|
2900
1341
|
async function removeCustomizationChoices2(customizationId, choiceIds, options) {
|
|
2901
|
-
const { httpClient, sideEffects
|
|
2902
|
-
if (validateRequestSchema) {
|
|
2903
|
-
RemoveCustomizationChoicesRequest.parse({
|
|
2904
|
-
customizationId,
|
|
2905
|
-
choiceIds,
|
|
2906
|
-
options
|
|
2907
|
-
});
|
|
2908
|
-
}
|
|
1342
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
2909
1343
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
2910
1344
|
customizationId,
|
|
2911
1345
|
choiceIds,
|
|
@@ -3051,13 +1485,7 @@ async function reorderCustomizationChoices2(customizationId, revision, options)
|
|
|
3051
1485
|
}
|
|
3052
1486
|
}
|
|
3053
1487
|
async function bulkAddCustomizationChoices2(customizationsChoices, options) {
|
|
3054
|
-
const { httpClient, sideEffects
|
|
3055
|
-
if (validateRequestSchema) {
|
|
3056
|
-
BulkAddCustomizationChoicesRequest.parse({
|
|
3057
|
-
customizationsChoices,
|
|
3058
|
-
options
|
|
3059
|
-
});
|
|
3060
|
-
}
|
|
1488
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
3061
1489
|
const payload = (0, import_transform_paths2.transformPaths)(
|
|
3062
1490
|
(0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
3063
1491
|
customizationsChoices,
|
|
@@ -3113,10 +1541,7 @@ async function bulkAddCustomizationChoices2(customizationsChoices, options) {
|
|
|
3113
1541
|
}
|
|
3114
1542
|
}
|
|
3115
1543
|
async function bulkUpdateCustomizations2(customizations, options) {
|
|
3116
|
-
const { httpClient, sideEffects
|
|
3117
|
-
if (validateRequestSchema) {
|
|
3118
|
-
BulkUpdateCustomizationsRequest.parse({ customizations, options });
|
|
3119
|
-
}
|
|
1544
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
3120
1545
|
const payload = (0, import_transform_paths2.transformPaths)(
|
|
3121
1546
|
(0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
3122
1547
|
customizations,
|
|
@@ -3175,119 +1600,119 @@ async function bulkUpdateCustomizations2(customizations, options) {
|
|
|
3175
1600
|
}
|
|
3176
1601
|
|
|
3177
1602
|
// src/stores-catalog-v3-customization-customizations-v-3.public.ts
|
|
3178
|
-
function createCustomization3(httpClient
|
|
1603
|
+
function createCustomization3(httpClient) {
|
|
3179
1604
|
return (customization) => createCustomization2(
|
|
3180
1605
|
customization,
|
|
3181
1606
|
// @ts-ignore
|
|
3182
|
-
{ httpClient
|
|
1607
|
+
{ httpClient }
|
|
3183
1608
|
);
|
|
3184
1609
|
}
|
|
3185
|
-
function getCustomization3(httpClient
|
|
1610
|
+
function getCustomization3(httpClient) {
|
|
3186
1611
|
return (customizationId, options) => getCustomization2(
|
|
3187
1612
|
customizationId,
|
|
3188
1613
|
options,
|
|
3189
1614
|
// @ts-ignore
|
|
3190
|
-
{ httpClient
|
|
1615
|
+
{ httpClient }
|
|
3191
1616
|
);
|
|
3192
1617
|
}
|
|
3193
|
-
function updateCustomization3(httpClient
|
|
1618
|
+
function updateCustomization3(httpClient) {
|
|
3194
1619
|
return (_id, customization, options) => updateCustomization2(
|
|
3195
1620
|
_id,
|
|
3196
1621
|
customization,
|
|
3197
1622
|
options,
|
|
3198
1623
|
// @ts-ignore
|
|
3199
|
-
{ httpClient
|
|
1624
|
+
{ httpClient }
|
|
3200
1625
|
);
|
|
3201
1626
|
}
|
|
3202
|
-
function deleteCustomization3(httpClient
|
|
1627
|
+
function deleteCustomization3(httpClient) {
|
|
3203
1628
|
return (customizationId) => deleteCustomization2(
|
|
3204
1629
|
customizationId,
|
|
3205
1630
|
// @ts-ignore
|
|
3206
|
-
{ httpClient
|
|
1631
|
+
{ httpClient }
|
|
3207
1632
|
);
|
|
3208
1633
|
}
|
|
3209
|
-
function queryCustomizations3(httpClient
|
|
1634
|
+
function queryCustomizations3(httpClient) {
|
|
3210
1635
|
return (options) => queryCustomizations2(
|
|
3211
1636
|
options,
|
|
3212
1637
|
// @ts-ignore
|
|
3213
|
-
{ httpClient
|
|
1638
|
+
{ httpClient }
|
|
3214
1639
|
);
|
|
3215
1640
|
}
|
|
3216
|
-
function typedQueryCustomizations2(httpClient
|
|
1641
|
+
function typedQueryCustomizations2(httpClient) {
|
|
3217
1642
|
return (query, options) => typedQueryCustomizations(
|
|
3218
1643
|
query,
|
|
3219
1644
|
options,
|
|
3220
1645
|
// @ts-ignore
|
|
3221
|
-
{ httpClient
|
|
1646
|
+
{ httpClient }
|
|
3222
1647
|
);
|
|
3223
1648
|
}
|
|
3224
|
-
function bulkCreateCustomizations3(httpClient
|
|
1649
|
+
function bulkCreateCustomizations3(httpClient) {
|
|
3225
1650
|
return (customizations, options) => bulkCreateCustomizations2(
|
|
3226
1651
|
customizations,
|
|
3227
1652
|
options,
|
|
3228
1653
|
// @ts-ignore
|
|
3229
|
-
{ httpClient
|
|
1654
|
+
{ httpClient }
|
|
3230
1655
|
);
|
|
3231
1656
|
}
|
|
3232
|
-
function addCustomizationChoices3(httpClient
|
|
1657
|
+
function addCustomizationChoices3(httpClient) {
|
|
3233
1658
|
return (customizationId, choices, options) => addCustomizationChoices2(
|
|
3234
1659
|
customizationId,
|
|
3235
1660
|
choices,
|
|
3236
1661
|
options,
|
|
3237
1662
|
// @ts-ignore
|
|
3238
|
-
{ httpClient
|
|
1663
|
+
{ httpClient }
|
|
3239
1664
|
);
|
|
3240
1665
|
}
|
|
3241
|
-
function setCustomizationChoices3(httpClient
|
|
1666
|
+
function setCustomizationChoices3(httpClient) {
|
|
3242
1667
|
return (customizationId, choices, options) => setCustomizationChoices2(
|
|
3243
1668
|
customizationId,
|
|
3244
1669
|
choices,
|
|
3245
1670
|
options,
|
|
3246
1671
|
// @ts-ignore
|
|
3247
|
-
{ httpClient
|
|
1672
|
+
{ httpClient }
|
|
3248
1673
|
);
|
|
3249
1674
|
}
|
|
3250
|
-
function removeCustomizationChoices3(httpClient
|
|
1675
|
+
function removeCustomizationChoices3(httpClient) {
|
|
3251
1676
|
return (customizationId, choiceIds, options) => removeCustomizationChoices2(
|
|
3252
1677
|
customizationId,
|
|
3253
1678
|
choiceIds,
|
|
3254
1679
|
options,
|
|
3255
1680
|
// @ts-ignore
|
|
3256
|
-
{ httpClient
|
|
1681
|
+
{ httpClient }
|
|
3257
1682
|
);
|
|
3258
1683
|
}
|
|
3259
|
-
function updateCustomizationChoices3(httpClient
|
|
1684
|
+
function updateCustomizationChoices3(httpClient) {
|
|
3260
1685
|
return (customizationId, revision, options) => updateCustomizationChoices2(
|
|
3261
1686
|
customizationId,
|
|
3262
1687
|
revision,
|
|
3263
1688
|
options,
|
|
3264
1689
|
// @ts-ignore
|
|
3265
|
-
{ httpClient
|
|
1690
|
+
{ httpClient }
|
|
3266
1691
|
);
|
|
3267
1692
|
}
|
|
3268
|
-
function reorderCustomizationChoices3(httpClient
|
|
1693
|
+
function reorderCustomizationChoices3(httpClient) {
|
|
3269
1694
|
return (customizationId, revision, options) => reorderCustomizationChoices2(
|
|
3270
1695
|
customizationId,
|
|
3271
1696
|
revision,
|
|
3272
1697
|
options,
|
|
3273
1698
|
// @ts-ignore
|
|
3274
|
-
{ httpClient
|
|
1699
|
+
{ httpClient }
|
|
3275
1700
|
);
|
|
3276
1701
|
}
|
|
3277
|
-
function bulkAddCustomizationChoices3(httpClient
|
|
1702
|
+
function bulkAddCustomizationChoices3(httpClient) {
|
|
3278
1703
|
return (customizationsChoices, options) => bulkAddCustomizationChoices2(
|
|
3279
1704
|
customizationsChoices,
|
|
3280
1705
|
options,
|
|
3281
1706
|
// @ts-ignore
|
|
3282
|
-
{ httpClient
|
|
1707
|
+
{ httpClient }
|
|
3283
1708
|
);
|
|
3284
1709
|
}
|
|
3285
|
-
function bulkUpdateCustomizations3(httpClient
|
|
1710
|
+
function bulkUpdateCustomizations3(httpClient) {
|
|
3286
1711
|
return (customizations, options) => bulkUpdateCustomizations2(
|
|
3287
1712
|
customizations,
|
|
3288
1713
|
options,
|
|
3289
1714
|
// @ts-ignore
|
|
3290
|
-
{ httpClient
|
|
1715
|
+
{ httpClient }
|
|
3291
1716
|
);
|
|
3292
1717
|
}
|
|
3293
1718
|
var onCustomizationCreated = (0, import_sdk_types.EventDefinition)(
|