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