@wix/auto_sdk_ecom_shippo-configurations 1.0.24 → 1.0.25
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 +2 -2
- package/build/cjs/{ecom-v1-shippo-configuration-shippo-configurations.universal-D-nyXVmj.d.ts → index.typings.d.ts} +156 -1
- package/build/cjs/index.typings.js +749 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +2 -1
- package/build/es/index.d.mts +2 -2
- package/build/es/{ecom-v1-shippo-configuration-shippo-configurations.universal-D-nyXVmj.d.mts → index.typings.d.mts} +156 -1
- package/build/es/index.typings.mjs +712 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +2 -1
- package/build/internal/cjs/index.d.ts +2 -2
- package/build/internal/cjs/{ecom-v1-shippo-configuration-shippo-configurations.universal-D-nyXVmj.d.ts → index.typings.d.ts} +156 -1
- package/build/internal/cjs/index.typings.js +749 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +2 -1
- package/build/internal/es/index.d.mts +2 -2
- package/build/internal/es/{ecom-v1-shippo-configuration-shippo-configurations.universal-D-nyXVmj.d.mts → index.typings.d.mts} +156 -1
- package/build/internal/es/index.typings.mjs +712 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +2 -1
- package/package.json +2 -2
|
@@ -0,0 +1,712 @@
|
|
|
1
|
+
// src/ecom-v1-shippo-configuration-shippo-configurations.universal.ts
|
|
2
|
+
import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
|
|
3
|
+
import { queryBuilder } from "@wix/sdk-runtime/query-builder";
|
|
4
|
+
import {
|
|
5
|
+
renameKeysFromSDKRequestToRESTRequest,
|
|
6
|
+
renameKeysFromRESTResponseToSDKResponse
|
|
7
|
+
} from "@wix/sdk-runtime/rename-all-nested-keys";
|
|
8
|
+
|
|
9
|
+
// src/ecom-v1-shippo-configuration-shippo-configurations.http.ts
|
|
10
|
+
import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
|
|
11
|
+
import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
|
|
12
|
+
import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
|
|
13
|
+
import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
14
|
+
import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
15
|
+
import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
|
|
16
|
+
import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
17
|
+
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
18
|
+
function resolveWixEcomDeliveryV1ShippoServiceUrl(opts) {
|
|
19
|
+
const domainToMappings = {
|
|
20
|
+
"manage._base_domain_": [
|
|
21
|
+
{
|
|
22
|
+
srcPath: "/_api/shippo-service",
|
|
23
|
+
destPath: ""
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"www.wixapis.com": [
|
|
27
|
+
{
|
|
28
|
+
srcPath: "/ecom/v1/shippo-configurations",
|
|
29
|
+
destPath: "/v1/shippo-configurations"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
};
|
|
33
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
34
|
+
}
|
|
35
|
+
var PACKAGE_NAME = "@wix/auto_sdk_ecom_shippo-configurations";
|
|
36
|
+
function createShippoConfiguration(payload) {
|
|
37
|
+
function __createShippoConfiguration({ host }) {
|
|
38
|
+
const serializedData = transformPaths(payload, [
|
|
39
|
+
{
|
|
40
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
41
|
+
paths: [
|
|
42
|
+
{ path: "shippoConfiguration.createdDate" },
|
|
43
|
+
{ path: "shippoConfiguration.updatedDate" }
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
48
|
+
paths: [
|
|
49
|
+
{ path: "shippoConfiguration.shipFromAddress.geocode.latitude" },
|
|
50
|
+
{ path: "shippoConfiguration.shipFromAddress.geocode.longitude" }
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
]);
|
|
54
|
+
const metadata = {
|
|
55
|
+
entityFqdn: "wix.ecom.v1.shippo_configuration",
|
|
56
|
+
method: "POST",
|
|
57
|
+
methodFqn: "wix.ecom.delivery.v1.ShippoService.CreateShippoConfiguration",
|
|
58
|
+
packageName: PACKAGE_NAME,
|
|
59
|
+
url: resolveWixEcomDeliveryV1ShippoServiceUrl({
|
|
60
|
+
protoPath: "/v1/shippo-configurations",
|
|
61
|
+
data: serializedData,
|
|
62
|
+
host
|
|
63
|
+
}),
|
|
64
|
+
data: serializedData,
|
|
65
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
66
|
+
{
|
|
67
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
68
|
+
paths: [
|
|
69
|
+
{ path: "shippoConfiguration.createdDate" },
|
|
70
|
+
{ path: "shippoConfiguration.updatedDate" }
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
75
|
+
paths: [
|
|
76
|
+
{ path: "shippoConfiguration.shipFromAddress.geocode.latitude" },
|
|
77
|
+
{ path: "shippoConfiguration.shipFromAddress.geocode.longitude" }
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
])
|
|
81
|
+
};
|
|
82
|
+
return metadata;
|
|
83
|
+
}
|
|
84
|
+
return __createShippoConfiguration;
|
|
85
|
+
}
|
|
86
|
+
function getShippoConfiguration(payload) {
|
|
87
|
+
function __getShippoConfiguration({ host }) {
|
|
88
|
+
const metadata = {
|
|
89
|
+
entityFqdn: "wix.ecom.v1.shippo_configuration",
|
|
90
|
+
method: "GET",
|
|
91
|
+
methodFqn: "wix.ecom.delivery.v1.ShippoService.GetShippoConfiguration",
|
|
92
|
+
packageName: PACKAGE_NAME,
|
|
93
|
+
url: resolveWixEcomDeliveryV1ShippoServiceUrl({
|
|
94
|
+
protoPath: "/v1/shippo-configurations/{shippoConfigurationId}",
|
|
95
|
+
data: payload,
|
|
96
|
+
host
|
|
97
|
+
}),
|
|
98
|
+
params: toURLSearchParams(payload),
|
|
99
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
100
|
+
{
|
|
101
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
102
|
+
paths: [
|
|
103
|
+
{ path: "shippoConfiguration.createdDate" },
|
|
104
|
+
{ path: "shippoConfiguration.updatedDate" }
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
109
|
+
paths: [
|
|
110
|
+
{ path: "shippoConfiguration.shipFromAddress.geocode.latitude" },
|
|
111
|
+
{ path: "shippoConfiguration.shipFromAddress.geocode.longitude" }
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
])
|
|
115
|
+
};
|
|
116
|
+
return metadata;
|
|
117
|
+
}
|
|
118
|
+
return __getShippoConfiguration;
|
|
119
|
+
}
|
|
120
|
+
function updateShippoConfiguration(payload) {
|
|
121
|
+
function __updateShippoConfiguration({ host }) {
|
|
122
|
+
const serializedData = transformPaths(payload, [
|
|
123
|
+
{
|
|
124
|
+
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
125
|
+
paths: [{ path: "fieldMask" }]
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
129
|
+
paths: [
|
|
130
|
+
{ path: "shippoConfiguration.createdDate" },
|
|
131
|
+
{ path: "shippoConfiguration.updatedDate" }
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
136
|
+
paths: [
|
|
137
|
+
{ path: "shippoConfiguration.shipFromAddress.geocode.latitude" },
|
|
138
|
+
{ path: "shippoConfiguration.shipFromAddress.geocode.longitude" }
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
]);
|
|
142
|
+
const metadata = {
|
|
143
|
+
entityFqdn: "wix.ecom.v1.shippo_configuration",
|
|
144
|
+
method: "PATCH",
|
|
145
|
+
methodFqn: "wix.ecom.delivery.v1.ShippoService.UpdateShippoConfiguration",
|
|
146
|
+
packageName: PACKAGE_NAME,
|
|
147
|
+
url: resolveWixEcomDeliveryV1ShippoServiceUrl({
|
|
148
|
+
protoPath: "/v1/shippo-configurations/{shippoConfiguration.id}",
|
|
149
|
+
data: serializedData,
|
|
150
|
+
host
|
|
151
|
+
}),
|
|
152
|
+
data: serializedData,
|
|
153
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
154
|
+
{
|
|
155
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
156
|
+
paths: [
|
|
157
|
+
{ path: "shippoConfiguration.createdDate" },
|
|
158
|
+
{ path: "shippoConfiguration.updatedDate" }
|
|
159
|
+
]
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
163
|
+
paths: [
|
|
164
|
+
{ path: "shippoConfiguration.shipFromAddress.geocode.latitude" },
|
|
165
|
+
{ path: "shippoConfiguration.shipFromAddress.geocode.longitude" }
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
])
|
|
169
|
+
};
|
|
170
|
+
return metadata;
|
|
171
|
+
}
|
|
172
|
+
return __updateShippoConfiguration;
|
|
173
|
+
}
|
|
174
|
+
function deleteShippoConfiguration(payload) {
|
|
175
|
+
function __deleteShippoConfiguration({ host }) {
|
|
176
|
+
const metadata = {
|
|
177
|
+
entityFqdn: "wix.ecom.v1.shippo_configuration",
|
|
178
|
+
method: "DELETE",
|
|
179
|
+
methodFqn: "wix.ecom.delivery.v1.ShippoService.DeleteShippoConfiguration",
|
|
180
|
+
packageName: PACKAGE_NAME,
|
|
181
|
+
url: resolveWixEcomDeliveryV1ShippoServiceUrl({
|
|
182
|
+
protoPath: "/v1/shippo-configurations/{shippoConfigurationId}",
|
|
183
|
+
data: payload,
|
|
184
|
+
host
|
|
185
|
+
}),
|
|
186
|
+
params: toURLSearchParams(payload)
|
|
187
|
+
};
|
|
188
|
+
return metadata;
|
|
189
|
+
}
|
|
190
|
+
return __deleteShippoConfiguration;
|
|
191
|
+
}
|
|
192
|
+
function queryShippoConfigurations(payload) {
|
|
193
|
+
function __queryShippoConfigurations({ host }) {
|
|
194
|
+
const metadata = {
|
|
195
|
+
entityFqdn: "wix.ecom.v1.shippo_configuration",
|
|
196
|
+
method: "POST",
|
|
197
|
+
methodFqn: "wix.ecom.delivery.v1.ShippoService.QueryShippoConfigurations",
|
|
198
|
+
packageName: PACKAGE_NAME,
|
|
199
|
+
url: resolveWixEcomDeliveryV1ShippoServiceUrl({
|
|
200
|
+
protoPath: "/v1/shippo-configurations/query",
|
|
201
|
+
data: payload,
|
|
202
|
+
host
|
|
203
|
+
}),
|
|
204
|
+
data: payload,
|
|
205
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
206
|
+
{
|
|
207
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
208
|
+
paths: [
|
|
209
|
+
{ path: "shippoConfigurations.createdDate" },
|
|
210
|
+
{ path: "shippoConfigurations.updatedDate" }
|
|
211
|
+
]
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
215
|
+
paths: [
|
|
216
|
+
{ path: "shippoConfigurations.shipFromAddress.geocode.latitude" },
|
|
217
|
+
{
|
|
218
|
+
path: "shippoConfigurations.shipFromAddress.geocode.longitude"
|
|
219
|
+
}
|
|
220
|
+
]
|
|
221
|
+
}
|
|
222
|
+
]),
|
|
223
|
+
fallback: [
|
|
224
|
+
{
|
|
225
|
+
method: "POST",
|
|
226
|
+
url: resolveWixEcomDeliveryV1ShippoServiceUrl({
|
|
227
|
+
protoPath: "/v1/shippo-configurations/query",
|
|
228
|
+
data: payload,
|
|
229
|
+
host
|
|
230
|
+
}),
|
|
231
|
+
data: payload
|
|
232
|
+
}
|
|
233
|
+
]
|
|
234
|
+
};
|
|
235
|
+
return metadata;
|
|
236
|
+
}
|
|
237
|
+
return __queryShippoConfigurations;
|
|
238
|
+
}
|
|
239
|
+
function updateExtendedFields(payload) {
|
|
240
|
+
function __updateExtendedFields({ host }) {
|
|
241
|
+
const metadata = {
|
|
242
|
+
entityFqdn: "wix.ecom.v1.shippo_configuration",
|
|
243
|
+
method: "POST",
|
|
244
|
+
methodFqn: "wix.ecom.delivery.v1.ShippoService.UpdateExtendedFields",
|
|
245
|
+
packageName: PACKAGE_NAME,
|
|
246
|
+
url: resolveWixEcomDeliveryV1ShippoServiceUrl({
|
|
247
|
+
protoPath: "/v1/shippo-configurations/{id}/update-extended-fields",
|
|
248
|
+
data: payload,
|
|
249
|
+
host
|
|
250
|
+
}),
|
|
251
|
+
data: payload,
|
|
252
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
253
|
+
{
|
|
254
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
255
|
+
paths: [
|
|
256
|
+
{ path: "shippoConfiguration.createdDate" },
|
|
257
|
+
{ path: "shippoConfiguration.updatedDate" }
|
|
258
|
+
]
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
262
|
+
paths: [
|
|
263
|
+
{ path: "shippoConfiguration.shipFromAddress.geocode.latitude" },
|
|
264
|
+
{ path: "shippoConfiguration.shipFromAddress.geocode.longitude" }
|
|
265
|
+
]
|
|
266
|
+
}
|
|
267
|
+
])
|
|
268
|
+
};
|
|
269
|
+
return metadata;
|
|
270
|
+
}
|
|
271
|
+
return __updateExtendedFields;
|
|
272
|
+
}
|
|
273
|
+
function addDeliveryRegion(payload) {
|
|
274
|
+
function __addDeliveryRegion({ host }) {
|
|
275
|
+
const metadata = {
|
|
276
|
+
entityFqdn: "wix.ecom.v1.shippo_configuration",
|
|
277
|
+
method: "POST",
|
|
278
|
+
methodFqn: "wix.ecom.delivery.v1.ShippoService.AddDeliveryRegion",
|
|
279
|
+
packageName: PACKAGE_NAME,
|
|
280
|
+
url: resolveWixEcomDeliveryV1ShippoServiceUrl({
|
|
281
|
+
protoPath: "/v1/shippo-configurations/{shippoConfigurationId}/delivery-regions",
|
|
282
|
+
data: payload,
|
|
283
|
+
host
|
|
284
|
+
}),
|
|
285
|
+
data: payload,
|
|
286
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
287
|
+
{
|
|
288
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
289
|
+
paths: [
|
|
290
|
+
{ path: "shippoConfiguration.createdDate" },
|
|
291
|
+
{ path: "shippoConfiguration.updatedDate" }
|
|
292
|
+
]
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
296
|
+
paths: [
|
|
297
|
+
{ path: "shippoConfiguration.shipFromAddress.geocode.latitude" },
|
|
298
|
+
{ path: "shippoConfiguration.shipFromAddress.geocode.longitude" }
|
|
299
|
+
]
|
|
300
|
+
}
|
|
301
|
+
])
|
|
302
|
+
};
|
|
303
|
+
return metadata;
|
|
304
|
+
}
|
|
305
|
+
return __addDeliveryRegion;
|
|
306
|
+
}
|
|
307
|
+
function removeDeliveryRegion(payload) {
|
|
308
|
+
function __removeDeliveryRegion({ host }) {
|
|
309
|
+
const metadata = {
|
|
310
|
+
entityFqdn: "wix.ecom.v1.shippo_configuration",
|
|
311
|
+
method: "DELETE",
|
|
312
|
+
methodFqn: "wix.ecom.delivery.v1.ShippoService.RemoveDeliveryRegion",
|
|
313
|
+
packageName: PACKAGE_NAME,
|
|
314
|
+
url: resolveWixEcomDeliveryV1ShippoServiceUrl({
|
|
315
|
+
protoPath: "/v1/shippo-configurations/{shippoConfigurationId}/delivery-regions/{deliveryRegionId}",
|
|
316
|
+
data: payload,
|
|
317
|
+
host
|
|
318
|
+
}),
|
|
319
|
+
params: toURLSearchParams(payload),
|
|
320
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
321
|
+
{
|
|
322
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
323
|
+
paths: [
|
|
324
|
+
{ path: "shippoConfiguration.createdDate" },
|
|
325
|
+
{ path: "shippoConfiguration.updatedDate" }
|
|
326
|
+
]
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
330
|
+
paths: [
|
|
331
|
+
{ path: "shippoConfiguration.shipFromAddress.geocode.latitude" },
|
|
332
|
+
{ path: "shippoConfiguration.shipFromAddress.geocode.longitude" }
|
|
333
|
+
]
|
|
334
|
+
}
|
|
335
|
+
])
|
|
336
|
+
};
|
|
337
|
+
return metadata;
|
|
338
|
+
}
|
|
339
|
+
return __removeDeliveryRegion;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
// src/ecom-v1-shippo-configuration-shippo-configurations.universal.ts
|
|
343
|
+
import { transformSDKAddressToRESTAddress } from "@wix/sdk-runtime/transformations/address";
|
|
344
|
+
import { transformRESTAddressToSDKAddress } from "@wix/sdk-runtime/transformations/address";
|
|
345
|
+
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
346
|
+
var DomesticService = /* @__PURE__ */ ((DomesticService2) => {
|
|
347
|
+
DomesticService2["UNKNOWN_DOMESTIC_SERVICE"] = "UNKNOWN_DOMESTIC_SERVICE";
|
|
348
|
+
DomesticService2["GROUND_ADVANTAGE"] = "GROUND_ADVANTAGE";
|
|
349
|
+
DomesticService2["PRIORITY_MAIL"] = "PRIORITY_MAIL";
|
|
350
|
+
DomesticService2["PRIORITY_MAIL_EXPRESS"] = "PRIORITY_MAIL_EXPRESS";
|
|
351
|
+
return DomesticService2;
|
|
352
|
+
})(DomesticService || {});
|
|
353
|
+
var CalculationType = /* @__PURE__ */ ((CalculationType2) => {
|
|
354
|
+
CalculationType2["UNKNOWN_TYPE"] = "UNKNOWN_TYPE";
|
|
355
|
+
CalculationType2["FIXED"] = "FIXED";
|
|
356
|
+
CalculationType2["PERCENTAGE"] = "PERCENTAGE";
|
|
357
|
+
return CalculationType2;
|
|
358
|
+
})(CalculationType || {});
|
|
359
|
+
var InternationalService = /* @__PURE__ */ ((InternationalService2) => {
|
|
360
|
+
InternationalService2["UNKNOWN_INTERNATIONAL_SERVICE"] = "UNKNOWN_INTERNATIONAL_SERVICE";
|
|
361
|
+
InternationalService2["FIRST_CLASS_PACKAGE_INTERNATIONAL"] = "FIRST_CLASS_PACKAGE_INTERNATIONAL";
|
|
362
|
+
InternationalService2["PRIORITY_MAIL_INTERNATIONAL"] = "PRIORITY_MAIL_INTERNATIONAL";
|
|
363
|
+
InternationalService2["PRIORITY_MAIL_EXPRESS_INTERNATIONAL"] = "PRIORITY_MAIL_EXPRESS_INTERNATIONAL";
|
|
364
|
+
return InternationalService2;
|
|
365
|
+
})(InternationalService || {});
|
|
366
|
+
var PackageType = /* @__PURE__ */ ((PackageType2) => {
|
|
367
|
+
PackageType2["UNKNOWN_PACKAGE_TYPE"] = "UNKNOWN_PACKAGE_TYPE";
|
|
368
|
+
PackageType2["CUSTOM"] = "CUSTOM";
|
|
369
|
+
PackageType2["FLAT_RATE_ENVELOPE"] = "FLAT_RATE_ENVELOPE";
|
|
370
|
+
PackageType2["PADDED_FLAT_RATE_ENVELOPE"] = "PADDED_FLAT_RATE_ENVELOPE";
|
|
371
|
+
PackageType2["SMALL_FLAT_RATE_BOX"] = "SMALL_FLAT_RATE_BOX";
|
|
372
|
+
PackageType2["MEDIUM_FLAT_RATE_BOX_1"] = "MEDIUM_FLAT_RATE_BOX_1";
|
|
373
|
+
PackageType2["MEDIUM_FLAT_RATE_BOX_2"] = "MEDIUM_FLAT_RATE_BOX_2";
|
|
374
|
+
PackageType2["LARGE_FLAT_RATE_BOX"] = "LARGE_FLAT_RATE_BOX";
|
|
375
|
+
return PackageType2;
|
|
376
|
+
})(PackageType || {});
|
|
377
|
+
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
378
|
+
SortOrder2["ASC"] = "ASC";
|
|
379
|
+
SortOrder2["DESC"] = "DESC";
|
|
380
|
+
return SortOrder2;
|
|
381
|
+
})(SortOrder || {});
|
|
382
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
383
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
384
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
385
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
386
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
387
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
388
|
+
return WebhookIdentityType2;
|
|
389
|
+
})(WebhookIdentityType || {});
|
|
390
|
+
async function createShippoConfiguration2(shippoConfiguration, options) {
|
|
391
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
392
|
+
const payload = transformPaths2(
|
|
393
|
+
renameKeysFromSDKRequestToRESTRequest({
|
|
394
|
+
shippoConfiguration,
|
|
395
|
+
backupRate: options?.backupRate
|
|
396
|
+
}),
|
|
397
|
+
[
|
|
398
|
+
{
|
|
399
|
+
transformFn: transformSDKAddressToRESTAddress,
|
|
400
|
+
paths: [{ path: "shippoConfiguration.shipFromAddress" }]
|
|
401
|
+
}
|
|
402
|
+
]
|
|
403
|
+
);
|
|
404
|
+
const reqOpts = createShippoConfiguration(payload);
|
|
405
|
+
sideEffects?.onSiteCall?.();
|
|
406
|
+
try {
|
|
407
|
+
const result = await httpClient.request(reqOpts);
|
|
408
|
+
sideEffects?.onSuccess?.(result);
|
|
409
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
410
|
+
transformPaths2(result.data, [
|
|
411
|
+
{
|
|
412
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
413
|
+
paths: [{ path: "shippoConfiguration.shipFromAddress" }]
|
|
414
|
+
}
|
|
415
|
+
])
|
|
416
|
+
)?.shippoConfiguration;
|
|
417
|
+
} catch (err) {
|
|
418
|
+
const transformedError = sdkTransformError(
|
|
419
|
+
err,
|
|
420
|
+
{
|
|
421
|
+
spreadPathsToArguments: {},
|
|
422
|
+
explicitPathsToArguments: {
|
|
423
|
+
shippoConfiguration: "$[0]",
|
|
424
|
+
backupRate: "$[1].backupRate"
|
|
425
|
+
},
|
|
426
|
+
singleArgumentUnchanged: false
|
|
427
|
+
},
|
|
428
|
+
["shippoConfiguration", "options"]
|
|
429
|
+
);
|
|
430
|
+
sideEffects?.onError?.(err);
|
|
431
|
+
throw transformedError;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
async function getShippoConfiguration2(shippoConfigurationId) {
|
|
435
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
436
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
437
|
+
shippoConfigurationId
|
|
438
|
+
});
|
|
439
|
+
const reqOpts = getShippoConfiguration(payload);
|
|
440
|
+
sideEffects?.onSiteCall?.();
|
|
441
|
+
try {
|
|
442
|
+
const result = await httpClient.request(reqOpts);
|
|
443
|
+
sideEffects?.onSuccess?.(result);
|
|
444
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
445
|
+
transformPaths2(result.data, [
|
|
446
|
+
{
|
|
447
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
448
|
+
paths: [{ path: "shippoConfiguration.shipFromAddress" }]
|
|
449
|
+
}
|
|
450
|
+
])
|
|
451
|
+
)?.shippoConfiguration;
|
|
452
|
+
} catch (err) {
|
|
453
|
+
const transformedError = sdkTransformError(
|
|
454
|
+
err,
|
|
455
|
+
{
|
|
456
|
+
spreadPathsToArguments: {},
|
|
457
|
+
explicitPathsToArguments: { shippoConfigurationId: "$[0]" },
|
|
458
|
+
singleArgumentUnchanged: false
|
|
459
|
+
},
|
|
460
|
+
["shippoConfigurationId"]
|
|
461
|
+
);
|
|
462
|
+
sideEffects?.onError?.(err);
|
|
463
|
+
throw transformedError;
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
async function updateShippoConfiguration2(_id, shippoConfiguration) {
|
|
467
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
468
|
+
const payload = transformPaths2(
|
|
469
|
+
renameKeysFromSDKRequestToRESTRequest({
|
|
470
|
+
shippoConfiguration: { ...shippoConfiguration, id: _id }
|
|
471
|
+
}),
|
|
472
|
+
[
|
|
473
|
+
{
|
|
474
|
+
transformFn: transformSDKAddressToRESTAddress,
|
|
475
|
+
paths: [{ path: "shippoConfiguration.shipFromAddress" }]
|
|
476
|
+
}
|
|
477
|
+
]
|
|
478
|
+
);
|
|
479
|
+
const reqOpts = updateShippoConfiguration(payload);
|
|
480
|
+
sideEffects?.onSiteCall?.();
|
|
481
|
+
try {
|
|
482
|
+
const result = await httpClient.request(reqOpts);
|
|
483
|
+
sideEffects?.onSuccess?.(result);
|
|
484
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
485
|
+
transformPaths2(result.data, [
|
|
486
|
+
{
|
|
487
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
488
|
+
paths: [{ path: "shippoConfiguration.shipFromAddress" }]
|
|
489
|
+
}
|
|
490
|
+
])
|
|
491
|
+
)?.shippoConfiguration;
|
|
492
|
+
} catch (err) {
|
|
493
|
+
const transformedError = sdkTransformError(
|
|
494
|
+
err,
|
|
495
|
+
{
|
|
496
|
+
spreadPathsToArguments: { shippoConfiguration: "$[1]" },
|
|
497
|
+
explicitPathsToArguments: { "shippoConfiguration.id": "$[0]" },
|
|
498
|
+
singleArgumentUnchanged: false
|
|
499
|
+
},
|
|
500
|
+
["_id", "shippoConfiguration"]
|
|
501
|
+
);
|
|
502
|
+
sideEffects?.onError?.(err);
|
|
503
|
+
throw transformedError;
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
async function deleteShippoConfiguration2(shippoConfigurationId) {
|
|
507
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
508
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
509
|
+
shippoConfigurationId
|
|
510
|
+
});
|
|
511
|
+
const reqOpts = deleteShippoConfiguration(payload);
|
|
512
|
+
sideEffects?.onSiteCall?.();
|
|
513
|
+
try {
|
|
514
|
+
const result = await httpClient.request(reqOpts);
|
|
515
|
+
sideEffects?.onSuccess?.(result);
|
|
516
|
+
} catch (err) {
|
|
517
|
+
const transformedError = sdkTransformError(
|
|
518
|
+
err,
|
|
519
|
+
{
|
|
520
|
+
spreadPathsToArguments: {},
|
|
521
|
+
explicitPathsToArguments: { shippoConfigurationId: "$[0]" },
|
|
522
|
+
singleArgumentUnchanged: false
|
|
523
|
+
},
|
|
524
|
+
["shippoConfigurationId"]
|
|
525
|
+
);
|
|
526
|
+
sideEffects?.onError?.(err);
|
|
527
|
+
throw transformedError;
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
function queryShippoConfigurations2() {
|
|
531
|
+
const { httpClient, sideEffects } = arguments[0];
|
|
532
|
+
return queryBuilder({
|
|
533
|
+
func: async (payload) => {
|
|
534
|
+
const reqOpts = queryShippoConfigurations(
|
|
535
|
+
payload
|
|
536
|
+
);
|
|
537
|
+
sideEffects?.onSiteCall?.();
|
|
538
|
+
try {
|
|
539
|
+
const result = await httpClient.request(reqOpts);
|
|
540
|
+
sideEffects?.onSuccess?.(result);
|
|
541
|
+
return result;
|
|
542
|
+
} catch (err) {
|
|
543
|
+
sideEffects?.onError?.(err);
|
|
544
|
+
throw err;
|
|
545
|
+
}
|
|
546
|
+
},
|
|
547
|
+
requestTransformer: (query) => {
|
|
548
|
+
const args = [query, {}];
|
|
549
|
+
return renameKeysFromSDKRequestToRESTRequest({
|
|
550
|
+
...args?.[1],
|
|
551
|
+
query: args?.[0]
|
|
552
|
+
});
|
|
553
|
+
},
|
|
554
|
+
responseTransformer: ({
|
|
555
|
+
data
|
|
556
|
+
}) => {
|
|
557
|
+
const transformedData = renameKeysFromRESTResponseToSDKResponse(
|
|
558
|
+
transformPaths2(data, [
|
|
559
|
+
{
|
|
560
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
561
|
+
paths: [{ path: "shippoConfigurations.shipFromAddress" }]
|
|
562
|
+
}
|
|
563
|
+
])
|
|
564
|
+
);
|
|
565
|
+
return {
|
|
566
|
+
items: transformedData?.shippoConfigurations,
|
|
567
|
+
pagingMetadata: transformedData?.pagingMetadata
|
|
568
|
+
};
|
|
569
|
+
},
|
|
570
|
+
errorTransformer: (err) => {
|
|
571
|
+
const transformedError = sdkTransformError(err, {
|
|
572
|
+
spreadPathsToArguments: {},
|
|
573
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
574
|
+
singleArgumentUnchanged: false
|
|
575
|
+
});
|
|
576
|
+
throw transformedError;
|
|
577
|
+
},
|
|
578
|
+
pagingMethod: "CURSOR",
|
|
579
|
+
transformationPaths: {}
|
|
580
|
+
});
|
|
581
|
+
}
|
|
582
|
+
async function updateExtendedFields2(_id, namespace, options) {
|
|
583
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
584
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
585
|
+
id: _id,
|
|
586
|
+
namespace,
|
|
587
|
+
namespaceData: options?.namespaceData
|
|
588
|
+
});
|
|
589
|
+
const reqOpts = updateExtendedFields(payload);
|
|
590
|
+
sideEffects?.onSiteCall?.();
|
|
591
|
+
try {
|
|
592
|
+
const result = await httpClient.request(reqOpts);
|
|
593
|
+
sideEffects?.onSuccess?.(result);
|
|
594
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
595
|
+
transformPaths2(result.data, [
|
|
596
|
+
{
|
|
597
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
598
|
+
paths: [{ path: "shippoConfiguration.shipFromAddress" }]
|
|
599
|
+
}
|
|
600
|
+
])
|
|
601
|
+
);
|
|
602
|
+
} catch (err) {
|
|
603
|
+
const transformedError = sdkTransformError(
|
|
604
|
+
err,
|
|
605
|
+
{
|
|
606
|
+
spreadPathsToArguments: {},
|
|
607
|
+
explicitPathsToArguments: {
|
|
608
|
+
id: "$[0]",
|
|
609
|
+
namespace: "$[1]",
|
|
610
|
+
namespaceData: "$[2].namespaceData"
|
|
611
|
+
},
|
|
612
|
+
singleArgumentUnchanged: false
|
|
613
|
+
},
|
|
614
|
+
["_id", "namespace", "options"]
|
|
615
|
+
);
|
|
616
|
+
sideEffects?.onError?.(err);
|
|
617
|
+
throw transformedError;
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
async function addDeliveryRegion2(shippoConfigurationId, deliveryRegionId, options) {
|
|
621
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
622
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
623
|
+
shippoConfigurationId,
|
|
624
|
+
deliveryRegionId,
|
|
625
|
+
revision: options?.revision
|
|
626
|
+
});
|
|
627
|
+
const reqOpts = addDeliveryRegion(payload);
|
|
628
|
+
sideEffects?.onSiteCall?.();
|
|
629
|
+
try {
|
|
630
|
+
const result = await httpClient.request(reqOpts);
|
|
631
|
+
sideEffects?.onSuccess?.(result);
|
|
632
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
633
|
+
transformPaths2(result.data, [
|
|
634
|
+
{
|
|
635
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
636
|
+
paths: [{ path: "shippoConfiguration.shipFromAddress" }]
|
|
637
|
+
}
|
|
638
|
+
])
|
|
639
|
+
);
|
|
640
|
+
} catch (err) {
|
|
641
|
+
const transformedError = sdkTransformError(
|
|
642
|
+
err,
|
|
643
|
+
{
|
|
644
|
+
spreadPathsToArguments: {},
|
|
645
|
+
explicitPathsToArguments: {
|
|
646
|
+
shippoConfigurationId: "$[0]",
|
|
647
|
+
deliveryRegionId: "$[1]",
|
|
648
|
+
revision: "$[2].revision"
|
|
649
|
+
},
|
|
650
|
+
singleArgumentUnchanged: false
|
|
651
|
+
},
|
|
652
|
+
["shippoConfigurationId", "deliveryRegionId", "options"]
|
|
653
|
+
);
|
|
654
|
+
sideEffects?.onError?.(err);
|
|
655
|
+
throw transformedError;
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
async function removeDeliveryRegion2(identifiers, options) {
|
|
659
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
660
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
661
|
+
shippoConfigurationId: identifiers?.shippoConfigurationId,
|
|
662
|
+
deliveryRegionId: identifiers?.deliveryRegionId,
|
|
663
|
+
revision: options?.revision
|
|
664
|
+
});
|
|
665
|
+
const reqOpts = removeDeliveryRegion(payload);
|
|
666
|
+
sideEffects?.onSiteCall?.();
|
|
667
|
+
try {
|
|
668
|
+
const result = await httpClient.request(reqOpts);
|
|
669
|
+
sideEffects?.onSuccess?.(result);
|
|
670
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
671
|
+
transformPaths2(result.data, [
|
|
672
|
+
{
|
|
673
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
674
|
+
paths: [{ path: "shippoConfiguration.shipFromAddress" }]
|
|
675
|
+
}
|
|
676
|
+
])
|
|
677
|
+
);
|
|
678
|
+
} catch (err) {
|
|
679
|
+
const transformedError = sdkTransformError(
|
|
680
|
+
err,
|
|
681
|
+
{
|
|
682
|
+
spreadPathsToArguments: {},
|
|
683
|
+
explicitPathsToArguments: {
|
|
684
|
+
shippoConfigurationId: "$[0].shippoConfigurationId",
|
|
685
|
+
deliveryRegionId: "$[0].deliveryRegionId",
|
|
686
|
+
revision: "$[1].revision"
|
|
687
|
+
},
|
|
688
|
+
singleArgumentUnchanged: false
|
|
689
|
+
},
|
|
690
|
+
["identifiers", "options"]
|
|
691
|
+
);
|
|
692
|
+
sideEffects?.onError?.(err);
|
|
693
|
+
throw transformedError;
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
export {
|
|
697
|
+
CalculationType,
|
|
698
|
+
DomesticService,
|
|
699
|
+
InternationalService,
|
|
700
|
+
PackageType,
|
|
701
|
+
SortOrder,
|
|
702
|
+
WebhookIdentityType,
|
|
703
|
+
addDeliveryRegion2 as addDeliveryRegion,
|
|
704
|
+
createShippoConfiguration2 as createShippoConfiguration,
|
|
705
|
+
deleteShippoConfiguration2 as deleteShippoConfiguration,
|
|
706
|
+
getShippoConfiguration2 as getShippoConfiguration,
|
|
707
|
+
queryShippoConfigurations2 as queryShippoConfigurations,
|
|
708
|
+
removeDeliveryRegion2 as removeDeliveryRegion,
|
|
709
|
+
updateExtendedFields2 as updateExtendedFields,
|
|
710
|
+
updateShippoConfiguration2 as updateShippoConfiguration
|
|
711
|
+
};
|
|
712
|
+
//# sourceMappingURL=index.typings.mjs.map
|