@wix/auto_sdk_ecom_delivery-solutions 1.0.55 → 1.0.56
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/schemas.d.ts +233 -0
- package/build/cjs/schemas.js +392 -0
- package/build/cjs/schemas.js.map +1 -0
- package/build/es/schemas.d.mts +233 -0
- package/build/es/schemas.mjs +354 -0
- package/build/es/schemas.mjs.map +1 -0
- package/build/internal/cjs/schemas.d.ts +233 -0
- package/build/internal/cjs/schemas.js +392 -0
- package/build/internal/cjs/schemas.js.map +1 -0
- package/build/internal/es/schemas.d.mts +233 -0
- package/build/internal/es/schemas.mjs +354 -0
- package/build/internal/es/schemas.mjs.map +1 -0
- package/package.json +11 -4
- package/schemas/package.json +3 -0
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const GetDeliverySolutionsRequest: z.ZodObject<{
|
|
4
|
+
lineItems: z.ZodArray<z.ZodObject<{
|
|
5
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
6
|
+
name: z.ZodOptional<z.ZodString>;
|
|
7
|
+
quantity: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
catalogReference: z.ZodOptional<z.ZodObject<{
|
|
9
|
+
catalogItemId: z.ZodOptional<z.ZodString>;
|
|
10
|
+
appId: z.ZodOptional<z.ZodString>;
|
|
11
|
+
options: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
12
|
+
}, z.core.$strip>>;
|
|
13
|
+
physicalProperties: z.ZodOptional<z.ZodObject<{
|
|
14
|
+
weight: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
15
|
+
sku: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
16
|
+
shippable: z.ZodOptional<z.ZodBoolean>;
|
|
17
|
+
}, z.core.$strip>>;
|
|
18
|
+
price: z.ZodOptional<z.ZodString>;
|
|
19
|
+
totalPriceBeforeDiscount: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
20
|
+
priceBeforeDiscount: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
21
|
+
totalPrice: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
22
|
+
deliveryProfileId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
23
|
+
taxIncludedInPrice: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
24
|
+
subscriptionSettings: z.ZodOptional<z.ZodObject<{
|
|
25
|
+
frequency: z.ZodOptional<z.ZodEnum<{
|
|
26
|
+
UNDEFINED: "UNDEFINED";
|
|
27
|
+
DAY: "DAY";
|
|
28
|
+
WEEK: "WEEK";
|
|
29
|
+
MONTH: "MONTH";
|
|
30
|
+
YEAR: "YEAR";
|
|
31
|
+
}>>;
|
|
32
|
+
}, z.core.$strip>>;
|
|
33
|
+
}, z.core.$strip>>;
|
|
34
|
+
options: z.ZodObject<{
|
|
35
|
+
destination: z.ZodIntersection<z.ZodObject<{
|
|
36
|
+
country: z.ZodString;
|
|
37
|
+
subdivision: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
38
|
+
city: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
39
|
+
postalCode: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
40
|
+
addressLine2: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
41
|
+
}, z.core.$strip>, z.ZodXor<readonly [z.ZodObject<{
|
|
42
|
+
streetAddress: z.ZodOptional<z.ZodNever>;
|
|
43
|
+
addressLine: z.ZodOptional<z.ZodNever>;
|
|
44
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
45
|
+
addressLine: z.ZodOptional<z.ZodNever>;
|
|
46
|
+
streetAddress: z.ZodObject<{
|
|
47
|
+
number: z.ZodOptional<z.ZodString>;
|
|
48
|
+
name: z.ZodOptional<z.ZodString>;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
51
|
+
streetAddress: z.ZodOptional<z.ZodNever>;
|
|
52
|
+
addressLine: z.ZodString;
|
|
53
|
+
}, z.core.$strip>]>>;
|
|
54
|
+
origin: z.ZodOptional<z.ZodIntersection<z.ZodObject<{
|
|
55
|
+
country: z.ZodString;
|
|
56
|
+
subdivision: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
57
|
+
city: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
58
|
+
postalCode: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
59
|
+
addressLine2: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
60
|
+
}, z.core.$strip>, z.ZodXor<readonly [z.ZodObject<{
|
|
61
|
+
streetAddress: z.ZodOptional<z.ZodNever>;
|
|
62
|
+
addressLine: z.ZodOptional<z.ZodNever>;
|
|
63
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
64
|
+
addressLine: z.ZodOptional<z.ZodNever>;
|
|
65
|
+
streetAddress: z.ZodObject<{
|
|
66
|
+
number: z.ZodOptional<z.ZodString>;
|
|
67
|
+
name: z.ZodOptional<z.ZodString>;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
70
|
+
streetAddress: z.ZodOptional<z.ZodNever>;
|
|
71
|
+
addressLine: z.ZodString;
|
|
72
|
+
}, z.core.$strip>]>>>;
|
|
73
|
+
currency: z.ZodString;
|
|
74
|
+
contactDetails: z.ZodOptional<z.ZodObject<{
|
|
75
|
+
firstName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
76
|
+
lastName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
77
|
+
phone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
78
|
+
company: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
79
|
+
email: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
80
|
+
vatId: z.ZodOptional<z.ZodObject<{
|
|
81
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
82
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
83
|
+
UNSPECIFIED: "UNSPECIFIED";
|
|
84
|
+
CPF: "CPF";
|
|
85
|
+
CNPJ: "CNPJ";
|
|
86
|
+
}>>;
|
|
87
|
+
}, z.core.$strip>>;
|
|
88
|
+
}, z.core.$strip>>;
|
|
89
|
+
weightUnit: z.ZodOptional<z.ZodEnum<{
|
|
90
|
+
UNSPECIFIED_WEIGHT_UNIT: "UNSPECIFIED_WEIGHT_UNIT";
|
|
91
|
+
KG: "KG";
|
|
92
|
+
LB: "LB";
|
|
93
|
+
}>>;
|
|
94
|
+
userPreferences: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
95
|
+
appId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
96
|
+
code: z.ZodOptional<z.ZodString>;
|
|
97
|
+
}, z.core.$strip>>>;
|
|
98
|
+
purchaseFlowId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
99
|
+
externalReferences: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
100
|
+
appId: z.ZodOptional<z.ZodString>;
|
|
101
|
+
resourceId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
102
|
+
}, z.core.$strip>>>;
|
|
103
|
+
extendedFields: z.ZodOptional<z.ZodObject<{
|
|
104
|
+
namespaces: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
105
|
+
}, z.core.$strip>>;
|
|
106
|
+
}, z.core.$strip>;
|
|
107
|
+
}, z.core.$strip>;
|
|
108
|
+
declare const GetDeliverySolutionsResponse: z.ZodObject<{
|
|
109
|
+
deliverySolutions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
110
|
+
code: z.ZodOptional<z.ZodString>;
|
|
111
|
+
deliveryReference: z.ZodOptional<z.ZodObject<{
|
|
112
|
+
code: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
113
|
+
appId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
114
|
+
}, z.core.$strip>>;
|
|
115
|
+
title: z.ZodOptional<z.ZodString>;
|
|
116
|
+
logistics: z.ZodOptional<z.ZodObject<{
|
|
117
|
+
deliveryTime: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
118
|
+
instructions: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
119
|
+
pickupDetails: z.ZodOptional<z.ZodObject<{
|
|
120
|
+
address: z.ZodOptional<z.ZodObject<{
|
|
121
|
+
city: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
122
|
+
subdivision: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
123
|
+
country: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
124
|
+
postalCode: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
125
|
+
addressLine1: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
126
|
+
addressLine2: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
127
|
+
}, z.core.$strip>>;
|
|
128
|
+
pickupMethod: z.ZodOptional<z.ZodEnum<{
|
|
129
|
+
STORE_PICKUP: "STORE_PICKUP";
|
|
130
|
+
PICKUP_POINT: "PICKUP_POINT";
|
|
131
|
+
}>>;
|
|
132
|
+
}, z.core.$strip>>;
|
|
133
|
+
deliveryTimeSlot: z.ZodOptional<z.ZodObject<{
|
|
134
|
+
from: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
135
|
+
to: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
136
|
+
timeZone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
137
|
+
}, z.core.$strip>>;
|
|
138
|
+
}, z.core.$strip>>;
|
|
139
|
+
cost: z.ZodOptional<z.ZodObject<{
|
|
140
|
+
price: z.ZodOptional<z.ZodString>;
|
|
141
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
142
|
+
deliveryPrice: z.ZodOptional<z.ZodObject<{
|
|
143
|
+
amount: z.ZodOptional<z.ZodString>;
|
|
144
|
+
convertedAmount: z.ZodOptional<z.ZodString>;
|
|
145
|
+
formattedAmount: z.ZodOptional<z.ZodString>;
|
|
146
|
+
formattedConvertedAmount: z.ZodOptional<z.ZodString>;
|
|
147
|
+
}, z.core.$strip>>;
|
|
148
|
+
additionalCosts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
149
|
+
description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
150
|
+
deliveryPrice: z.ZodOptional<z.ZodObject<{
|
|
151
|
+
amount: z.ZodOptional<z.ZodString>;
|
|
152
|
+
convertedAmount: z.ZodOptional<z.ZodString>;
|
|
153
|
+
formattedAmount: z.ZodOptional<z.ZodString>;
|
|
154
|
+
formattedConvertedAmount: z.ZodOptional<z.ZodString>;
|
|
155
|
+
}, z.core.$strip>>;
|
|
156
|
+
}, z.core.$strip>>>;
|
|
157
|
+
}, z.core.$strip>>;
|
|
158
|
+
deliveryAllocations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
159
|
+
deliveryCarrier: z.ZodOptional<z.ZodObject<{
|
|
160
|
+
appId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
161
|
+
code: z.ZodOptional<z.ZodString>;
|
|
162
|
+
}, z.core.$strip>>;
|
|
163
|
+
deliveryRegion: z.ZodOptional<z.ZodObject<{
|
|
164
|
+
_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
165
|
+
name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
166
|
+
}, z.core.$strip>>;
|
|
167
|
+
applicableLineItems: z.ZodOptional<z.ZodObject<{
|
|
168
|
+
lineItemIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
169
|
+
}, z.core.$strip>>;
|
|
170
|
+
}, z.core.$strip>>>;
|
|
171
|
+
partial: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
172
|
+
}, z.core.$strip>>>;
|
|
173
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
174
|
+
appId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
175
|
+
errorDetails: z.ZodOptional<z.ZodIntersection<z.ZodObject<{
|
|
176
|
+
tracing: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
177
|
+
}, z.core.$strip>, z.ZodXor<readonly [z.ZodObject<{
|
|
178
|
+
applicationError: z.ZodOptional<z.ZodNever>;
|
|
179
|
+
validationError: z.ZodOptional<z.ZodNever>;
|
|
180
|
+
systemError: z.ZodOptional<z.ZodNever>;
|
|
181
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
182
|
+
validationError: z.ZodOptional<z.ZodNever>;
|
|
183
|
+
systemError: z.ZodOptional<z.ZodNever>;
|
|
184
|
+
applicationError: z.ZodObject<{
|
|
185
|
+
code: z.ZodOptional<z.ZodString>;
|
|
186
|
+
description: z.ZodOptional<z.ZodString>;
|
|
187
|
+
data: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
188
|
+
}, z.core.$strip>;
|
|
189
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
190
|
+
applicationError: z.ZodOptional<z.ZodNever>;
|
|
191
|
+
systemError: z.ZodOptional<z.ZodNever>;
|
|
192
|
+
validationError: z.ZodObject<{
|
|
193
|
+
fieldViolations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
194
|
+
field: z.ZodOptional<z.ZodString>;
|
|
195
|
+
description: z.ZodOptional<z.ZodString>;
|
|
196
|
+
violatedRule: z.ZodOptional<z.ZodEnum<{
|
|
197
|
+
VALIDATION: "VALIDATION";
|
|
198
|
+
OTHER: "OTHER";
|
|
199
|
+
MAX: "MAX";
|
|
200
|
+
MIN: "MIN";
|
|
201
|
+
MAX_LENGTH: "MAX_LENGTH";
|
|
202
|
+
MIN_LENGTH: "MIN_LENGTH";
|
|
203
|
+
MAX_SIZE: "MAX_SIZE";
|
|
204
|
+
MIN_SIZE: "MIN_SIZE";
|
|
205
|
+
FORMAT: "FORMAT";
|
|
206
|
+
DECIMAL_LTE: "DECIMAL_LTE";
|
|
207
|
+
DECIMAL_GTE: "DECIMAL_GTE";
|
|
208
|
+
DECIMAL_LT: "DECIMAL_LT";
|
|
209
|
+
DECIMAL_GT: "DECIMAL_GT";
|
|
210
|
+
DECIMAL_MAX_SCALE: "DECIMAL_MAX_SCALE";
|
|
211
|
+
INVALID_ENUM_VALUE: "INVALID_ENUM_VALUE";
|
|
212
|
+
REQUIRED_FIELD: "REQUIRED_FIELD";
|
|
213
|
+
FIELD_NOT_ALLOWED: "FIELD_NOT_ALLOWED";
|
|
214
|
+
ONE_OF_ALIGNMENT: "ONE_OF_ALIGNMENT";
|
|
215
|
+
EXACT_LENGTH: "EXACT_LENGTH";
|
|
216
|
+
EXACT_SIZE: "EXACT_SIZE";
|
|
217
|
+
REQUIRED_ONE_OF_FIELD: "REQUIRED_ONE_OF_FIELD";
|
|
218
|
+
}>>;
|
|
219
|
+
ruleName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
220
|
+
data: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
221
|
+
}, z.core.$strip>>>;
|
|
222
|
+
}, z.core.$strip>;
|
|
223
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
224
|
+
applicationError: z.ZodOptional<z.ZodNever>;
|
|
225
|
+
validationError: z.ZodOptional<z.ZodNever>;
|
|
226
|
+
systemError: z.ZodObject<{
|
|
227
|
+
errorCode: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
228
|
+
}, z.core.$strip>;
|
|
229
|
+
}, z.core.$strip>]>>>;
|
|
230
|
+
}, z.core.$strip>>>;
|
|
231
|
+
}, z.core.$strip>;
|
|
232
|
+
|
|
233
|
+
export { GetDeliverySolutionsRequest, GetDeliverySolutionsResponse };
|
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
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
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// schemas.ts
|
|
31
|
+
var schemas_exports = {};
|
|
32
|
+
__export(schemas_exports, {
|
|
33
|
+
GetDeliverySolutionsRequest: () => GetDeliverySolutionsRequest,
|
|
34
|
+
GetDeliverySolutionsResponse: () => GetDeliverySolutionsResponse
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(schemas_exports);
|
|
37
|
+
|
|
38
|
+
// src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.schemas.ts
|
|
39
|
+
var z = __toESM(require("zod"));
|
|
40
|
+
var GetDeliverySolutionsRequest = z.object({
|
|
41
|
+
lineItems: z.array(
|
|
42
|
+
z.object({
|
|
43
|
+
_id: z.string().describe("The ID of the line item.").min(1).max(100).optional(),
|
|
44
|
+
name: z.string().describe("Item name.").max(400).optional(),
|
|
45
|
+
quantity: z.number().int().describe("The number of items ordered.").min(1).max(999999999).optional(),
|
|
46
|
+
catalogReference: z.object({
|
|
47
|
+
catalogItemId: z.string().describe("ID of the item within the catalog it belongs to.").min(1).max(36).optional(),
|
|
48
|
+
appId: z.string().describe(
|
|
49
|
+
'ID of the app providing the catalog.\n\nYou can get your app\'s ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\n\nFor items from Wix catalogs, the following values always apply:\n+ Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`\n+ Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`\n+ Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`'
|
|
50
|
+
).min(1).optional(),
|
|
51
|
+
options: z.record(z.string(), z.any()).describe(
|
|
52
|
+
"Additional item details in `key:value` pairs.\n\nUse this optional field for more specificity with item selection. The values of the `options` field differ depending on which catalog is providing the items.\n\nFor Wix Stores products, learn more about integrating with [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)\nor [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration), depending on [the version the site uses](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/introduction)."
|
|
53
|
+
).optional().nullable()
|
|
54
|
+
}).describe("Reference to the item's origin catalog.").optional(),
|
|
55
|
+
physicalProperties: z.object({
|
|
56
|
+
weight: z.number().describe(
|
|
57
|
+
"Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request."
|
|
58
|
+
).optional().nullable(),
|
|
59
|
+
sku: z.string().describe(
|
|
60
|
+
"Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku)."
|
|
61
|
+
).max(40).optional().nullable(),
|
|
62
|
+
shippable: z.boolean().describe("Whether this line item is shippable.").optional()
|
|
63
|
+
}).describe("Physical properties of the item.").optional(),
|
|
64
|
+
price: z.string().describe("Price of a single item after discounts.").optional(),
|
|
65
|
+
totalPriceBeforeDiscount: z.string().describe("Total line item price before discounts.").optional().nullable(),
|
|
66
|
+
priceBeforeDiscount: z.string().describe("Price of a single item before discounts.").optional().nullable(),
|
|
67
|
+
totalPrice: z.string().describe(
|
|
68
|
+
"Total line item price after discounts. This is equal to `price` multiplied by `quantity`."
|
|
69
|
+
).optional().nullable(),
|
|
70
|
+
deliveryProfileId: z.string().describe("For delivery rates by delivery profile id").regex(
|
|
71
|
+
/^[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}$/,
|
|
72
|
+
"Must be a valid GUID"
|
|
73
|
+
).optional().nullable(),
|
|
74
|
+
taxIncludedInPrice: z.boolean().describe("whether tax is included in line item price").optional().nullable(),
|
|
75
|
+
subscriptionSettings: z.object({
|
|
76
|
+
frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).optional()
|
|
77
|
+
}).describe("Subscription settings for the item").optional()
|
|
78
|
+
})
|
|
79
|
+
).min(1).max(300),
|
|
80
|
+
options: z.object({
|
|
81
|
+
destination: z.intersection(
|
|
82
|
+
z.object({
|
|
83
|
+
country: z.string().describe("Country code."),
|
|
84
|
+
subdivision: z.string().describe(
|
|
85
|
+
"Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)."
|
|
86
|
+
).optional().nullable(),
|
|
87
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
88
|
+
postalCode: z.string().describe("Zip/postal code.").optional().nullable(),
|
|
89
|
+
addressLine2: z.string().describe(
|
|
90
|
+
"Free text providing more detailed address info. Usually contains Apt, Suite, and Floor."
|
|
91
|
+
).optional().nullable()
|
|
92
|
+
}),
|
|
93
|
+
z.xor([
|
|
94
|
+
z.object({
|
|
95
|
+
streetAddress: z.never().optional(),
|
|
96
|
+
addressLine: z.never().optional()
|
|
97
|
+
}),
|
|
98
|
+
z.object({
|
|
99
|
+
addressLine: z.never().optional(),
|
|
100
|
+
streetAddress: z.object({
|
|
101
|
+
number: z.string().describe("Street number.").optional(),
|
|
102
|
+
name: z.string().describe("Street name.").optional()
|
|
103
|
+
}).describe("Street name and number.")
|
|
104
|
+
}),
|
|
105
|
+
z.object({
|
|
106
|
+
streetAddress: z.never().optional(),
|
|
107
|
+
addressLine: z.string().describe(
|
|
108
|
+
"Main address line, usually street and number as free text."
|
|
109
|
+
)
|
|
110
|
+
})
|
|
111
|
+
])
|
|
112
|
+
).describe("Destination the items should deliver to"),
|
|
113
|
+
origin: z.intersection(
|
|
114
|
+
z.object({
|
|
115
|
+
country: z.string().describe("Country code."),
|
|
116
|
+
subdivision: z.string().describe(
|
|
117
|
+
"Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)."
|
|
118
|
+
).optional().nullable(),
|
|
119
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
120
|
+
postalCode: z.string().describe("Zip/postal code.").optional().nullable(),
|
|
121
|
+
addressLine2: z.string().describe(
|
|
122
|
+
"Free text providing more detailed address info. Usually contains Apt, Suite, and Floor."
|
|
123
|
+
).optional().nullable()
|
|
124
|
+
}),
|
|
125
|
+
z.xor([
|
|
126
|
+
z.object({
|
|
127
|
+
streetAddress: z.never().optional(),
|
|
128
|
+
addressLine: z.never().optional()
|
|
129
|
+
}),
|
|
130
|
+
z.object({
|
|
131
|
+
addressLine: z.never().optional(),
|
|
132
|
+
streetAddress: z.object({
|
|
133
|
+
number: z.string().describe("Street number.").optional(),
|
|
134
|
+
name: z.string().describe("Street name.").optional()
|
|
135
|
+
}).describe("Street name and number.")
|
|
136
|
+
}),
|
|
137
|
+
z.object({
|
|
138
|
+
streetAddress: z.never().optional(),
|
|
139
|
+
addressLine: z.string().describe(
|
|
140
|
+
"Main address line, usually street and number as free text."
|
|
141
|
+
)
|
|
142
|
+
})
|
|
143
|
+
])
|
|
144
|
+
).describe("Origin the items should deliver from").optional(),
|
|
145
|
+
currency: z.string().describe("Currency - Defaults to site's currency"),
|
|
146
|
+
contactDetails: z.object({
|
|
147
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
148
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
149
|
+
phone: z.string().describe("Contact's phone number.").optional().nullable(),
|
|
150
|
+
company: z.string().describe("Contact's company name.").optional().nullable(),
|
|
151
|
+
email: z.string().describe("Email associated with the address.").email().optional().nullable(),
|
|
152
|
+
vatId: z.object({
|
|
153
|
+
_id: z.string().describe("Customer's tax ID.").optional(),
|
|
154
|
+
type: z.enum(["UNSPECIFIED", "CPF", "CNPJ"]).optional()
|
|
155
|
+
}).describe("Tax info. Currently usable only in Brazil.").optional()
|
|
156
|
+
}).describe("Contact details").optional(),
|
|
157
|
+
weightUnit: z.enum(["UNSPECIFIED_WEIGHT_UNIT", "KG", "LB"]).optional(),
|
|
158
|
+
userPreferences: z.array(
|
|
159
|
+
z.object({
|
|
160
|
+
appId: z.string().describe("The delivery carrier app id").regex(
|
|
161
|
+
/^[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}$/,
|
|
162
|
+
"Must be a valid GUID"
|
|
163
|
+
).optional().nullable(),
|
|
164
|
+
code: z.string().describe("The delivery option code").max(250).optional()
|
|
165
|
+
})
|
|
166
|
+
).max(5).optional(),
|
|
167
|
+
purchaseFlowId: z.string().describe(
|
|
168
|
+
"Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order."
|
|
169
|
+
).regex(
|
|
170
|
+
/^[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}$/,
|
|
171
|
+
"Must be a valid GUID"
|
|
172
|
+
).optional().nullable(),
|
|
173
|
+
externalReferences: z.array(
|
|
174
|
+
z.object({
|
|
175
|
+
appId: z.string().describe(
|
|
176
|
+
"ID of the app associated with the purchase flow.\nFor example, the Wix Pay Links app ID."
|
|
177
|
+
).regex(
|
|
178
|
+
/^[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}$/,
|
|
179
|
+
"Must be a valid GUID"
|
|
180
|
+
).optional(),
|
|
181
|
+
resourceId: z.string().describe(
|
|
182
|
+
"Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.\nFor example, a Wix Pay Link ID."
|
|
183
|
+
).min(1).max(100).optional().nullable()
|
|
184
|
+
})
|
|
185
|
+
).max(20).optional(),
|
|
186
|
+
extendedFields: z.object({
|
|
187
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
188
|
+
"Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
|
|
189
|
+
).optional()
|
|
190
|
+
}).describe(
|
|
191
|
+
"[Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
|
|
192
|
+
).optional()
|
|
193
|
+
})
|
|
194
|
+
});
|
|
195
|
+
var GetDeliverySolutionsResponse = z.object({
|
|
196
|
+
deliverySolutions: z.array(
|
|
197
|
+
z.object({
|
|
198
|
+
code: z.string().describe(
|
|
199
|
+
'Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`.\nDEPRECATED: Use delivery_reference.code instead'
|
|
200
|
+
).max(250).optional(),
|
|
201
|
+
deliveryReference: z.object({
|
|
202
|
+
code: z.string().describe("The delivery solution code provided by the carrier").max(250).optional().nullable(),
|
|
203
|
+
appId: z.string().describe("The carrier app id").regex(
|
|
204
|
+
/^[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}$/,
|
|
205
|
+
"Must be a valid GUID"
|
|
206
|
+
).optional().nullable()
|
|
207
|
+
}).describe(
|
|
208
|
+
"Represents a reference to a specific delivery solution. Combines both the carrier's code and its application identifier."
|
|
209
|
+
).optional(),
|
|
210
|
+
title: z.string().describe(
|
|
211
|
+
'Delivery rate title. For example, `"USPS Standard Overnight Delivery"`, `"Standard"`, or `"First-Class Package International"`.'
|
|
212
|
+
).max(250).optional(),
|
|
213
|
+
logistics: z.object({
|
|
214
|
+
deliveryTime: z.string().describe(
|
|
215
|
+
'When the item is expected to be delivered in free text. For example, `"3-5 business days"`.'
|
|
216
|
+
).max(1e3).optional().nullable(),
|
|
217
|
+
instructions: z.string().describe(
|
|
218
|
+
'Instructions for delivery. For example, for pickup: `"Ensure to come during business hours, and please don\'t park in the disabled spot"`.'
|
|
219
|
+
).max(1e3).optional().nullable(),
|
|
220
|
+
pickupDetails: z.object({
|
|
221
|
+
address: z.object({
|
|
222
|
+
city: z.string().optional().nullable(),
|
|
223
|
+
subdivision: z.string().optional().nullable(),
|
|
224
|
+
country: z.string().optional().nullable(),
|
|
225
|
+
postalCode: z.string().optional().nullable(),
|
|
226
|
+
addressLine1: z.string().optional().nullable(),
|
|
227
|
+
addressLine2: z.string().optional().nullable()
|
|
228
|
+
}).describe("Pickup address.").optional(),
|
|
229
|
+
pickupMethod: z.enum(["STORE_PICKUP", "PICKUP_POINT"]).describe(
|
|
230
|
+
'Pickup method.\n\nSupported values:\n+ `"STORE_PICKUP"`: When pickup is from the merchant\'s brick and mortar store.\n+ `"PICKUP_POINT"`: When item is shipped to a specified pickup point.'
|
|
231
|
+
).optional()
|
|
232
|
+
}).describe(
|
|
233
|
+
"Pickup details. Should be returned only if order is for pickup."
|
|
234
|
+
).optional(),
|
|
235
|
+
deliveryTimeSlot: z.object({
|
|
236
|
+
from: z.date().describe("starting time of the delivery time slot").optional().nullable(),
|
|
237
|
+
to: z.date().describe("ending time of the delivery time slot").optional().nullable(),
|
|
238
|
+
timeZone: z.string().describe(
|
|
239
|
+
`Time zone in IANA format (e.g "America/New_York")
|
|
240
|
+
If not provided, the cart/checkout will format the time slot based on the site's business location`
|
|
241
|
+
).max(64).optional().nullable()
|
|
242
|
+
}).describe("Date and Time of the delivery option").optional()
|
|
243
|
+
}).describe("Delivery logistics.").optional(),
|
|
244
|
+
cost: z.object({
|
|
245
|
+
price: z.string().describe(
|
|
246
|
+
"The shipping rate's price. Must align with the [currency's decimal separator](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)."
|
|
247
|
+
).optional(),
|
|
248
|
+
currency: z.string().describe(
|
|
249
|
+
"Currency of the shipping rate price as a 3-letter [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217). Must align with the `currency` passed to the function under the `metadata` field."
|
|
250
|
+
).optional(),
|
|
251
|
+
deliveryPrice: z.object({
|
|
252
|
+
amount: z.string().describe("Amount.").optional(),
|
|
253
|
+
convertedAmount: z.string().describe("Converted amount.").optional(),
|
|
254
|
+
formattedAmount: z.string().describe("Amount formatted with currency symbol.").optional(),
|
|
255
|
+
formattedConvertedAmount: z.string().describe("Converted amount formatted with currency symbol.").optional()
|
|
256
|
+
}).describe(
|
|
257
|
+
"The shipping rate's price. Must align with the [currency's decimal separator]"
|
|
258
|
+
).optional(),
|
|
259
|
+
additionalCosts: z.array(
|
|
260
|
+
z.object({
|
|
261
|
+
description: z.string().describe(
|
|
262
|
+
'Description of the additional charge. For example, `"Handling fee of $5 applied for gift wrapping"`.'
|
|
263
|
+
).max(250).optional().nullable(),
|
|
264
|
+
deliveryPrice: z.object({
|
|
265
|
+
amount: z.string().describe("Amount.").optional(),
|
|
266
|
+
convertedAmount: z.string().describe("Converted amount.").optional(),
|
|
267
|
+
formattedAmount: z.string().describe("Amount formatted with currency symbol.").optional(),
|
|
268
|
+
formattedConvertedAmount: z.string().describe(
|
|
269
|
+
"Converted amount formatted with currency symbol."
|
|
270
|
+
).optional()
|
|
271
|
+
}).describe(
|
|
272
|
+
"Delivery price of additional charge. For example, `12.5`."
|
|
273
|
+
).optional()
|
|
274
|
+
})
|
|
275
|
+
).max(100).optional()
|
|
276
|
+
}).describe("Delivery cost.").optional(),
|
|
277
|
+
deliveryAllocations: z.array(
|
|
278
|
+
z.object({
|
|
279
|
+
deliveryCarrier: z.object({
|
|
280
|
+
appId: z.string().describe("The carrier app id").regex(
|
|
281
|
+
/^[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}$/,
|
|
282
|
+
"Must be a valid GUID"
|
|
283
|
+
).optional().nullable(),
|
|
284
|
+
code: z.string().describe(
|
|
285
|
+
'Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`.'
|
|
286
|
+
).max(250).optional()
|
|
287
|
+
}).describe(
|
|
288
|
+
"The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers"
|
|
289
|
+
).optional(),
|
|
290
|
+
deliveryRegion: z.object({
|
|
291
|
+
_id: z.string().describe("The delivery region id.").regex(
|
|
292
|
+
/^[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}$/,
|
|
293
|
+
"Must be a valid GUID"
|
|
294
|
+
).optional().nullable(),
|
|
295
|
+
name: z.string().describe("The delivery region name.").max(100).optional().nullable()
|
|
296
|
+
}).describe(
|
|
297
|
+
"The delivery region that are relevant for this delivery solution."
|
|
298
|
+
).optional(),
|
|
299
|
+
applicableLineItems: z.object({
|
|
300
|
+
lineItemIds: z.array(z.string()).max(300).optional()
|
|
301
|
+
}).describe(
|
|
302
|
+
"Populated if the delivery solution is a partially supplied by this carrier."
|
|
303
|
+
).optional()
|
|
304
|
+
})
|
|
305
|
+
).min(1).max(300).optional(),
|
|
306
|
+
partial: z.boolean().describe(
|
|
307
|
+
"If the delivery solution is a partial and doesn't apply to all items."
|
|
308
|
+
).optional().nullable()
|
|
309
|
+
})
|
|
310
|
+
).max(300).optional(),
|
|
311
|
+
errors: z.array(
|
|
312
|
+
z.object({
|
|
313
|
+
appId: z.string().describe("The carrier app id").regex(
|
|
314
|
+
/^[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}$/,
|
|
315
|
+
"Must be a valid GUID"
|
|
316
|
+
).optional().nullable(),
|
|
317
|
+
errorDetails: z.intersection(
|
|
318
|
+
z.object({
|
|
319
|
+
tracing: z.record(z.string(), z.string()).describe(
|
|
320
|
+
"deprecated in API's - to enable migration from rendering arbitrary tracing to rest response"
|
|
321
|
+
).optional()
|
|
322
|
+
}),
|
|
323
|
+
z.xor([
|
|
324
|
+
z.object({
|
|
325
|
+
applicationError: z.never().optional(),
|
|
326
|
+
validationError: z.never().optional(),
|
|
327
|
+
systemError: z.never().optional()
|
|
328
|
+
}),
|
|
329
|
+
z.object({
|
|
330
|
+
validationError: z.never().optional(),
|
|
331
|
+
systemError: z.never().optional(),
|
|
332
|
+
applicationError: z.object({
|
|
333
|
+
code: z.string().describe("Error code.").optional(),
|
|
334
|
+
description: z.string().describe("Description of the error.").optional(),
|
|
335
|
+
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
336
|
+
})
|
|
337
|
+
}),
|
|
338
|
+
z.object({
|
|
339
|
+
applicationError: z.never().optional(),
|
|
340
|
+
systemError: z.never().optional(),
|
|
341
|
+
validationError: z.object({
|
|
342
|
+
fieldViolations: z.array(
|
|
343
|
+
z.object({
|
|
344
|
+
field: z.string().optional(),
|
|
345
|
+
description: z.string().optional(),
|
|
346
|
+
violatedRule: z.enum([
|
|
347
|
+
"VALIDATION",
|
|
348
|
+
"OTHER",
|
|
349
|
+
"MAX",
|
|
350
|
+
"MIN",
|
|
351
|
+
"MAX_LENGTH",
|
|
352
|
+
"MIN_LENGTH",
|
|
353
|
+
"MAX_SIZE",
|
|
354
|
+
"MIN_SIZE",
|
|
355
|
+
"FORMAT",
|
|
356
|
+
"DECIMAL_LTE",
|
|
357
|
+
"DECIMAL_GTE",
|
|
358
|
+
"DECIMAL_LT",
|
|
359
|
+
"DECIMAL_GT",
|
|
360
|
+
"DECIMAL_MAX_SCALE",
|
|
361
|
+
"INVALID_ENUM_VALUE",
|
|
362
|
+
"REQUIRED_FIELD",
|
|
363
|
+
"FIELD_NOT_ALLOWED",
|
|
364
|
+
"ONE_OF_ALIGNMENT",
|
|
365
|
+
"EXACT_LENGTH",
|
|
366
|
+
"EXACT_SIZE",
|
|
367
|
+
"REQUIRED_ONE_OF_FIELD"
|
|
368
|
+
]).optional(),
|
|
369
|
+
ruleName: z.string().describe("applicable when violated_rule=OTHER").optional().nullable(),
|
|
370
|
+
data: z.record(z.string(), z.any()).optional().nullable()
|
|
371
|
+
})
|
|
372
|
+
).optional()
|
|
373
|
+
})
|
|
374
|
+
}),
|
|
375
|
+
z.object({
|
|
376
|
+
applicationError: z.never().optional(),
|
|
377
|
+
validationError: z.never().optional(),
|
|
378
|
+
systemError: z.object({
|
|
379
|
+
errorCode: z.string().describe("Error code.").optional().nullable()
|
|
380
|
+
})
|
|
381
|
+
})
|
|
382
|
+
])
|
|
383
|
+
).describe("The error details").optional()
|
|
384
|
+
})
|
|
385
|
+
).max(50).optional()
|
|
386
|
+
});
|
|
387
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
388
|
+
0 && (module.exports = {
|
|
389
|
+
GetDeliverySolutionsRequest,
|
|
390
|
+
GetDeliverySolutionsResponse
|
|
391
|
+
});
|
|
392
|
+
//# sourceMappingURL=schemas.js.map
|