@wix/auto_sdk_ecom_local-delivery-options 1.0.18 → 1.0.19
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 +8 -4
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1165 -0
- package/build/cjs/index.typings.js +1126 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +2 -1
- package/build/es/index.d.mts +8 -4
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1165 -0
- package/build/es/index.typings.mjs +1086 -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 +8 -4
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +1165 -0
- package/build/internal/cjs/index.typings.js +1126 -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 +8 -4
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +1165 -0
- package/build/internal/es/index.typings.mjs +1086 -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
- package/build/cjs/ecom-v1-local-delivery-option-local-delivery-options.universal-B14pmV_K.d.ts +0 -800
- package/build/es/ecom-v1-local-delivery-option-local-delivery-options.universal-B14pmV_K.d.mts +0 -800
- package/build/internal/cjs/ecom-v1-local-delivery-option-local-delivery-options.universal-B14pmV_K.d.ts +0 -800
- package/build/internal/es/ecom-v1-local-delivery-option-local-delivery-options.universal-B14pmV_K.d.mts +0 -800
|
@@ -0,0 +1,1086 @@
|
|
|
1
|
+
// src/ecom-v1-local-delivery-option-local-delivery-options.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-local-delivery-option-local-delivery-options.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 resolveComWixEcomShipmentsLocaldeliveryLocalDeliveryUrl(opts) {
|
|
19
|
+
const domainToMappings = {
|
|
20
|
+
"api._api_base_domain_": [
|
|
21
|
+
{
|
|
22
|
+
srcPath: "/wix-ecommerce-shipments-local-delivery-web",
|
|
23
|
+
destPath: ""
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"www.wixapis.com": [
|
|
27
|
+
{
|
|
28
|
+
srcPath: "/stores/v1/localDeliveryOptions",
|
|
29
|
+
destPath: "/v1/localDeliveryOptions"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"www._base_domain_": [
|
|
33
|
+
{
|
|
34
|
+
srcPath: "/_api/local-delivery-server",
|
|
35
|
+
destPath: ""
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"manage._base_domain_": [
|
|
39
|
+
{
|
|
40
|
+
srcPath: "/_api/local-delivery-server",
|
|
41
|
+
destPath: ""
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
};
|
|
45
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
46
|
+
}
|
|
47
|
+
var PACKAGE_NAME = "@wix/auto_sdk_ecom_local-delivery-options";
|
|
48
|
+
function createLocalDeliveryOption(payload) {
|
|
49
|
+
function __createLocalDeliveryOption({ host }) {
|
|
50
|
+
const serializedData = transformPaths(payload, [
|
|
51
|
+
{
|
|
52
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
53
|
+
paths: [
|
|
54
|
+
{ path: "localDeliveryOption.minimumFreeDeliveryOrderAmount" },
|
|
55
|
+
{ path: "localDeliveryOption.radiusConfig.address.geocode.latitude" },
|
|
56
|
+
{
|
|
57
|
+
path: "localDeliveryOption.radiusConfig.address.geocode.longitude"
|
|
58
|
+
},
|
|
59
|
+
{ path: "localDeliveryOption.customAreaConfig.geocodes.latitude" },
|
|
60
|
+
{ path: "localDeliveryOption.customAreaConfig.geocodes.longitude" },
|
|
61
|
+
{ path: "localDeliveryOption.radiusConfig.radius" }
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
66
|
+
paths: [
|
|
67
|
+
{ path: "localDeliveryOption.createdDate" },
|
|
68
|
+
{ path: "localDeliveryOption.updatedDate" }
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
]);
|
|
72
|
+
const metadata = {
|
|
73
|
+
entityFqdn: "wix.ecom.v1.local_delivery_option",
|
|
74
|
+
method: "POST",
|
|
75
|
+
methodFqn: "com.wix.ecom.shipments.localdelivery.LocalDelivery.CreateLocalDeliveryOption",
|
|
76
|
+
packageName: PACKAGE_NAME,
|
|
77
|
+
url: resolveComWixEcomShipmentsLocaldeliveryLocalDeliveryUrl({
|
|
78
|
+
protoPath: "/v1/local-delivery-options",
|
|
79
|
+
data: serializedData,
|
|
80
|
+
host
|
|
81
|
+
}),
|
|
82
|
+
data: serializedData,
|
|
83
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
84
|
+
{
|
|
85
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
86
|
+
paths: [
|
|
87
|
+
{ path: "localDeliveryOption.minimumFreeDeliveryOrderAmount" },
|
|
88
|
+
{
|
|
89
|
+
path: "localDeliveryOption.radiusConfig.address.geocode.latitude"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
path: "localDeliveryOption.radiusConfig.address.geocode.longitude"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
path: "localDeliveryOption.customAreaConfig.geocodes.latitude"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
path: "localDeliveryOption.customAreaConfig.geocodes.longitude"
|
|
99
|
+
},
|
|
100
|
+
{ path: "localDeliveryOption.radiusConfig.radius" }
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
105
|
+
paths: [
|
|
106
|
+
{ path: "localDeliveryOption.createdDate" },
|
|
107
|
+
{ path: "localDeliveryOption.updatedDate" }
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
])
|
|
111
|
+
};
|
|
112
|
+
return metadata;
|
|
113
|
+
}
|
|
114
|
+
return __createLocalDeliveryOption;
|
|
115
|
+
}
|
|
116
|
+
function getLocalDeliveryOption(payload) {
|
|
117
|
+
function __getLocalDeliveryOption({ host }) {
|
|
118
|
+
const metadata = {
|
|
119
|
+
entityFqdn: "wix.ecom.v1.local_delivery_option",
|
|
120
|
+
method: "GET",
|
|
121
|
+
methodFqn: "com.wix.ecom.shipments.localdelivery.LocalDelivery.GetLocalDeliveryOption",
|
|
122
|
+
packageName: PACKAGE_NAME,
|
|
123
|
+
url: resolveComWixEcomShipmentsLocaldeliveryLocalDeliveryUrl({
|
|
124
|
+
protoPath: "/v1/local-delivery-options/{localDeliveryOptionId}",
|
|
125
|
+
data: payload,
|
|
126
|
+
host
|
|
127
|
+
}),
|
|
128
|
+
params: toURLSearchParams(payload),
|
|
129
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
130
|
+
{
|
|
131
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
132
|
+
paths: [
|
|
133
|
+
{ path: "localDeliveryOption.minimumFreeDeliveryOrderAmount" },
|
|
134
|
+
{
|
|
135
|
+
path: "localDeliveryOption.radiusConfig.address.geocode.latitude"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
path: "localDeliveryOption.radiusConfig.address.geocode.longitude"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
path: "localDeliveryOption.customAreaConfig.geocodes.latitude"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
path: "localDeliveryOption.customAreaConfig.geocodes.longitude"
|
|
145
|
+
},
|
|
146
|
+
{ path: "localDeliveryOption.radiusConfig.radius" }
|
|
147
|
+
]
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
151
|
+
paths: [
|
|
152
|
+
{ path: "localDeliveryOption.createdDate" },
|
|
153
|
+
{ path: "localDeliveryOption.updatedDate" }
|
|
154
|
+
]
|
|
155
|
+
}
|
|
156
|
+
]),
|
|
157
|
+
fallback: [
|
|
158
|
+
{
|
|
159
|
+
method: "GET",
|
|
160
|
+
url: resolveComWixEcomShipmentsLocaldeliveryLocalDeliveryUrl({
|
|
161
|
+
protoPath: "/v1/local-delivery-options/{localDeliveryOptionId}",
|
|
162
|
+
data: payload,
|
|
163
|
+
host
|
|
164
|
+
}),
|
|
165
|
+
params: toURLSearchParams(payload)
|
|
166
|
+
}
|
|
167
|
+
]
|
|
168
|
+
};
|
|
169
|
+
return metadata;
|
|
170
|
+
}
|
|
171
|
+
return __getLocalDeliveryOption;
|
|
172
|
+
}
|
|
173
|
+
function listLocalDeliveryOptions(payload) {
|
|
174
|
+
function __listLocalDeliveryOptions({ host }) {
|
|
175
|
+
const metadata = {
|
|
176
|
+
entityFqdn: "wix.ecom.v1.local_delivery_option",
|
|
177
|
+
method: "GET",
|
|
178
|
+
methodFqn: "com.wix.ecom.shipments.localdelivery.LocalDelivery.ListLocalDeliveryOptions",
|
|
179
|
+
packageName: PACKAGE_NAME,
|
|
180
|
+
url: resolveComWixEcomShipmentsLocaldeliveryLocalDeliveryUrl({
|
|
181
|
+
protoPath: "/v1/localDeliveryOptions",
|
|
182
|
+
data: payload,
|
|
183
|
+
host
|
|
184
|
+
}),
|
|
185
|
+
params: toURLSearchParams(payload),
|
|
186
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
187
|
+
{
|
|
188
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
189
|
+
paths: [
|
|
190
|
+
{ path: "localDeliveryOptions.minimumFreeDeliveryOrderAmount" },
|
|
191
|
+
{
|
|
192
|
+
path: "localDeliveryOptions.radiusConfig.address.geocode.latitude"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
path: "localDeliveryOptions.radiusConfig.address.geocode.longitude"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
path: "localDeliveryOptions.customAreaConfig.geocodes.latitude"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
path: "localDeliveryOptions.customAreaConfig.geocodes.longitude"
|
|
202
|
+
},
|
|
203
|
+
{ path: "localDeliveryOptions.radiusConfig.radius" }
|
|
204
|
+
]
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
208
|
+
paths: [
|
|
209
|
+
{ path: "localDeliveryOptions.createdDate" },
|
|
210
|
+
{ path: "localDeliveryOptions.updatedDate" }
|
|
211
|
+
]
|
|
212
|
+
}
|
|
213
|
+
])
|
|
214
|
+
};
|
|
215
|
+
return metadata;
|
|
216
|
+
}
|
|
217
|
+
return __listLocalDeliveryOptions;
|
|
218
|
+
}
|
|
219
|
+
function queryLocalDeliveryOptions(payload) {
|
|
220
|
+
function __queryLocalDeliveryOptions({ host }) {
|
|
221
|
+
const metadata = {
|
|
222
|
+
entityFqdn: "wix.ecom.v1.local_delivery_option",
|
|
223
|
+
method: "POST",
|
|
224
|
+
methodFqn: "com.wix.ecom.shipments.localdelivery.LocalDelivery.QueryLocalDeliveryOptions",
|
|
225
|
+
packageName: PACKAGE_NAME,
|
|
226
|
+
url: resolveComWixEcomShipmentsLocaldeliveryLocalDeliveryUrl({
|
|
227
|
+
protoPath: "/v1/local-delivery-options/query",
|
|
228
|
+
data: payload,
|
|
229
|
+
host
|
|
230
|
+
}),
|
|
231
|
+
data: payload,
|
|
232
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
233
|
+
{
|
|
234
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
235
|
+
paths: [
|
|
236
|
+
{ path: "localDeliveryOptions.minimumFreeDeliveryOrderAmount" },
|
|
237
|
+
{
|
|
238
|
+
path: "localDeliveryOptions.radiusConfig.address.geocode.latitude"
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
path: "localDeliveryOptions.radiusConfig.address.geocode.longitude"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
path: "localDeliveryOptions.customAreaConfig.geocodes.latitude"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
path: "localDeliveryOptions.customAreaConfig.geocodes.longitude"
|
|
248
|
+
},
|
|
249
|
+
{ path: "localDeliveryOptions.radiusConfig.radius" }
|
|
250
|
+
]
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
254
|
+
paths: [
|
|
255
|
+
{ path: "localDeliveryOptions.createdDate" },
|
|
256
|
+
{ path: "localDeliveryOptions.updatedDate" }
|
|
257
|
+
]
|
|
258
|
+
}
|
|
259
|
+
])
|
|
260
|
+
};
|
|
261
|
+
return metadata;
|
|
262
|
+
}
|
|
263
|
+
return __queryLocalDeliveryOptions;
|
|
264
|
+
}
|
|
265
|
+
function updateLocalDeliveryOption(payload) {
|
|
266
|
+
function __updateLocalDeliveryOption({ host }) {
|
|
267
|
+
const serializedData = transformPaths(payload, [
|
|
268
|
+
{
|
|
269
|
+
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
270
|
+
paths: [{ path: "fieldMask" }]
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
274
|
+
paths: [
|
|
275
|
+
{ path: "localDeliveryOption.minimumFreeDeliveryOrderAmount" },
|
|
276
|
+
{ path: "localDeliveryOption.radiusConfig.address.geocode.latitude" },
|
|
277
|
+
{
|
|
278
|
+
path: "localDeliveryOption.radiusConfig.address.geocode.longitude"
|
|
279
|
+
},
|
|
280
|
+
{ path: "localDeliveryOption.customAreaConfig.geocodes.latitude" },
|
|
281
|
+
{ path: "localDeliveryOption.customAreaConfig.geocodes.longitude" },
|
|
282
|
+
{ path: "localDeliveryOption.radiusConfig.radius" }
|
|
283
|
+
]
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
287
|
+
paths: [
|
|
288
|
+
{ path: "localDeliveryOption.createdDate" },
|
|
289
|
+
{ path: "localDeliveryOption.updatedDate" }
|
|
290
|
+
]
|
|
291
|
+
}
|
|
292
|
+
]);
|
|
293
|
+
const metadata = {
|
|
294
|
+
entityFqdn: "wix.ecom.v1.local_delivery_option",
|
|
295
|
+
method: "PATCH",
|
|
296
|
+
methodFqn: "com.wix.ecom.shipments.localdelivery.LocalDelivery.UpdateLocalDeliveryOption",
|
|
297
|
+
packageName: PACKAGE_NAME,
|
|
298
|
+
url: resolveComWixEcomShipmentsLocaldeliveryLocalDeliveryUrl({
|
|
299
|
+
protoPath: "/v1/local-delivery-options/{localDeliveryOption.id}",
|
|
300
|
+
data: serializedData,
|
|
301
|
+
host
|
|
302
|
+
}),
|
|
303
|
+
data: serializedData,
|
|
304
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
305
|
+
{
|
|
306
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
307
|
+
paths: [
|
|
308
|
+
{ path: "localDeliveryOption.minimumFreeDeliveryOrderAmount" },
|
|
309
|
+
{
|
|
310
|
+
path: "localDeliveryOption.radiusConfig.address.geocode.latitude"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
path: "localDeliveryOption.radiusConfig.address.geocode.longitude"
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
path: "localDeliveryOption.customAreaConfig.geocodes.latitude"
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
path: "localDeliveryOption.customAreaConfig.geocodes.longitude"
|
|
320
|
+
},
|
|
321
|
+
{ path: "localDeliveryOption.radiusConfig.radius" }
|
|
322
|
+
]
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
326
|
+
paths: [
|
|
327
|
+
{ path: "localDeliveryOption.createdDate" },
|
|
328
|
+
{ path: "localDeliveryOption.updatedDate" }
|
|
329
|
+
]
|
|
330
|
+
}
|
|
331
|
+
])
|
|
332
|
+
};
|
|
333
|
+
return metadata;
|
|
334
|
+
}
|
|
335
|
+
return __updateLocalDeliveryOption;
|
|
336
|
+
}
|
|
337
|
+
function deleteLocalDeliveryOption(payload) {
|
|
338
|
+
function __deleteLocalDeliveryOption({ host }) {
|
|
339
|
+
const metadata = {
|
|
340
|
+
entityFqdn: "wix.ecom.v1.local_delivery_option",
|
|
341
|
+
method: "DELETE",
|
|
342
|
+
methodFqn: "com.wix.ecom.shipments.localdelivery.LocalDelivery.DeleteLocalDeliveryOption",
|
|
343
|
+
packageName: PACKAGE_NAME,
|
|
344
|
+
url: resolveComWixEcomShipmentsLocaldeliveryLocalDeliveryUrl({
|
|
345
|
+
protoPath: "/v1/local-delivery-options/{localDeliveryOptionId}",
|
|
346
|
+
data: payload,
|
|
347
|
+
host
|
|
348
|
+
}),
|
|
349
|
+
params: toURLSearchParams(payload)
|
|
350
|
+
};
|
|
351
|
+
return metadata;
|
|
352
|
+
}
|
|
353
|
+
return __deleteLocalDeliveryOption;
|
|
354
|
+
}
|
|
355
|
+
function bulkCreateLocalDeliveryOption(payload) {
|
|
356
|
+
function __bulkCreateLocalDeliveryOption({ host }) {
|
|
357
|
+
const serializedData = transformPaths(payload, [
|
|
358
|
+
{
|
|
359
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
360
|
+
paths: [
|
|
361
|
+
{ path: "localDeliveryOptions.minimumFreeDeliveryOrderAmount" },
|
|
362
|
+
{
|
|
363
|
+
path: "localDeliveryOptions.radiusConfig.address.geocode.latitude"
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
path: "localDeliveryOptions.radiusConfig.address.geocode.longitude"
|
|
367
|
+
},
|
|
368
|
+
{ path: "localDeliveryOptions.customAreaConfig.geocodes.latitude" },
|
|
369
|
+
{ path: "localDeliveryOptions.customAreaConfig.geocodes.longitude" },
|
|
370
|
+
{ path: "localDeliveryOptions.radiusConfig.radius" }
|
|
371
|
+
]
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
375
|
+
paths: [
|
|
376
|
+
{ path: "localDeliveryOptions.createdDate" },
|
|
377
|
+
{ path: "localDeliveryOptions.updatedDate" }
|
|
378
|
+
]
|
|
379
|
+
}
|
|
380
|
+
]);
|
|
381
|
+
const metadata = {
|
|
382
|
+
entityFqdn: "wix.ecom.v1.local_delivery_option",
|
|
383
|
+
method: "POST",
|
|
384
|
+
methodFqn: "com.wix.ecom.shipments.localdelivery.LocalDelivery.BulkCreateLocalDeliveryOption",
|
|
385
|
+
packageName: PACKAGE_NAME,
|
|
386
|
+
url: resolveComWixEcomShipmentsLocaldeliveryLocalDeliveryUrl({
|
|
387
|
+
protoPath: "/v1/bulk/local-delivery-options/create",
|
|
388
|
+
data: serializedData,
|
|
389
|
+
host
|
|
390
|
+
}),
|
|
391
|
+
data: serializedData,
|
|
392
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
393
|
+
{
|
|
394
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
395
|
+
paths: [
|
|
396
|
+
{ path: "localDeliveryOptions.minimumFreeDeliveryOrderAmount" },
|
|
397
|
+
{
|
|
398
|
+
path: "localDeliveryOptions.radiusConfig.address.geocode.latitude"
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
path: "localDeliveryOptions.radiusConfig.address.geocode.longitude"
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
path: "localDeliveryOptions.customAreaConfig.geocodes.latitude"
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
path: "localDeliveryOptions.customAreaConfig.geocodes.longitude"
|
|
408
|
+
},
|
|
409
|
+
{ path: "localDeliveryOptions.radiusConfig.radius" }
|
|
410
|
+
]
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
414
|
+
paths: [
|
|
415
|
+
{ path: "localDeliveryOptions.createdDate" },
|
|
416
|
+
{ path: "localDeliveryOptions.updatedDate" }
|
|
417
|
+
]
|
|
418
|
+
}
|
|
419
|
+
])
|
|
420
|
+
};
|
|
421
|
+
return metadata;
|
|
422
|
+
}
|
|
423
|
+
return __bulkCreateLocalDeliveryOption;
|
|
424
|
+
}
|
|
425
|
+
function bulkUpdateLocalDeliveryOption(payload) {
|
|
426
|
+
function __bulkUpdateLocalDeliveryOption({ host }) {
|
|
427
|
+
const serializedData = transformPaths(payload, [
|
|
428
|
+
{
|
|
429
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
430
|
+
paths: [
|
|
431
|
+
{ path: "localDeliveryOptions.minimumFreeDeliveryOrderAmount" },
|
|
432
|
+
{
|
|
433
|
+
path: "localDeliveryOptions.radiusConfig.address.geocode.latitude"
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
path: "localDeliveryOptions.radiusConfig.address.geocode.longitude"
|
|
437
|
+
},
|
|
438
|
+
{ path: "localDeliveryOptions.customAreaConfig.geocodes.latitude" },
|
|
439
|
+
{ path: "localDeliveryOptions.customAreaConfig.geocodes.longitude" },
|
|
440
|
+
{ path: "localDeliveryOptions.radiusConfig.radius" }
|
|
441
|
+
]
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
445
|
+
paths: [
|
|
446
|
+
{ path: "localDeliveryOptions.createdDate" },
|
|
447
|
+
{ path: "localDeliveryOptions.updatedDate" }
|
|
448
|
+
]
|
|
449
|
+
}
|
|
450
|
+
]);
|
|
451
|
+
const metadata = {
|
|
452
|
+
entityFqdn: "wix.ecom.v1.local_delivery_option",
|
|
453
|
+
method: "PATCH",
|
|
454
|
+
methodFqn: "com.wix.ecom.shipments.localdelivery.LocalDelivery.BulkUpdateLocalDeliveryOption",
|
|
455
|
+
packageName: PACKAGE_NAME,
|
|
456
|
+
url: resolveComWixEcomShipmentsLocaldeliveryLocalDeliveryUrl({
|
|
457
|
+
protoPath: "/v1/bulk/local-delivery-options/update",
|
|
458
|
+
data: serializedData,
|
|
459
|
+
host
|
|
460
|
+
}),
|
|
461
|
+
data: serializedData,
|
|
462
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
463
|
+
{
|
|
464
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
465
|
+
paths: [
|
|
466
|
+
{ path: "localDeliveryOptions.minimumFreeDeliveryOrderAmount" },
|
|
467
|
+
{
|
|
468
|
+
path: "localDeliveryOptions.radiusConfig.address.geocode.latitude"
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
path: "localDeliveryOptions.radiusConfig.address.geocode.longitude"
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
path: "localDeliveryOptions.customAreaConfig.geocodes.latitude"
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
path: "localDeliveryOptions.customAreaConfig.geocodes.longitude"
|
|
478
|
+
},
|
|
479
|
+
{ path: "localDeliveryOptions.radiusConfig.radius" }
|
|
480
|
+
]
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
484
|
+
paths: [
|
|
485
|
+
{ path: "localDeliveryOptions.createdDate" },
|
|
486
|
+
{ path: "localDeliveryOptions.updatedDate" }
|
|
487
|
+
]
|
|
488
|
+
}
|
|
489
|
+
])
|
|
490
|
+
};
|
|
491
|
+
return metadata;
|
|
492
|
+
}
|
|
493
|
+
return __bulkUpdateLocalDeliveryOption;
|
|
494
|
+
}
|
|
495
|
+
function bulkDeleteLocalDeliveryOption(payload) {
|
|
496
|
+
function __bulkDeleteLocalDeliveryOption({ host }) {
|
|
497
|
+
const metadata = {
|
|
498
|
+
entityFqdn: "wix.ecom.v1.local_delivery_option",
|
|
499
|
+
method: "DELETE",
|
|
500
|
+
methodFqn: "com.wix.ecom.shipments.localdelivery.LocalDelivery.BulkDeleteLocalDeliveryOption",
|
|
501
|
+
packageName: PACKAGE_NAME,
|
|
502
|
+
url: resolveComWixEcomShipmentsLocaldeliveryLocalDeliveryUrl({
|
|
503
|
+
protoPath: "/v1/bulk/local-delivery-options/delete",
|
|
504
|
+
data: payload,
|
|
505
|
+
host
|
|
506
|
+
}),
|
|
507
|
+
params: toURLSearchParams(payload)
|
|
508
|
+
};
|
|
509
|
+
return metadata;
|
|
510
|
+
}
|
|
511
|
+
return __bulkDeleteLocalDeliveryOption;
|
|
512
|
+
}
|
|
513
|
+
function addDeliveryRegion(payload) {
|
|
514
|
+
function __addDeliveryRegion({ host }) {
|
|
515
|
+
const metadata = {
|
|
516
|
+
entityFqdn: "wix.ecom.v1.local_delivery_option",
|
|
517
|
+
method: "POST",
|
|
518
|
+
methodFqn: "com.wix.ecom.shipments.localdelivery.LocalDelivery.AddDeliveryRegion",
|
|
519
|
+
packageName: PACKAGE_NAME,
|
|
520
|
+
url: resolveComWixEcomShipmentsLocaldeliveryLocalDeliveryUrl({
|
|
521
|
+
protoPath: "/v1/local-delivery-options/add-delivery-region",
|
|
522
|
+
data: payload,
|
|
523
|
+
host
|
|
524
|
+
}),
|
|
525
|
+
data: payload,
|
|
526
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
527
|
+
{
|
|
528
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
529
|
+
paths: [
|
|
530
|
+
{ path: "localDeliveryOption.minimumFreeDeliveryOrderAmount" },
|
|
531
|
+
{
|
|
532
|
+
path: "localDeliveryOption.radiusConfig.address.geocode.latitude"
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
path: "localDeliveryOption.radiusConfig.address.geocode.longitude"
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
path: "localDeliveryOption.customAreaConfig.geocodes.latitude"
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
path: "localDeliveryOption.customAreaConfig.geocodes.longitude"
|
|
542
|
+
},
|
|
543
|
+
{ path: "localDeliveryOption.radiusConfig.radius" }
|
|
544
|
+
]
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
548
|
+
paths: [
|
|
549
|
+
{ path: "localDeliveryOption.createdDate" },
|
|
550
|
+
{ path: "localDeliveryOption.updatedDate" }
|
|
551
|
+
]
|
|
552
|
+
}
|
|
553
|
+
])
|
|
554
|
+
};
|
|
555
|
+
return metadata;
|
|
556
|
+
}
|
|
557
|
+
return __addDeliveryRegion;
|
|
558
|
+
}
|
|
559
|
+
function removeDeliveryRegion(payload) {
|
|
560
|
+
function __removeDeliveryRegion({ host }) {
|
|
561
|
+
const metadata = {
|
|
562
|
+
entityFqdn: "wix.ecom.v1.local_delivery_option",
|
|
563
|
+
method: "POST",
|
|
564
|
+
methodFqn: "com.wix.ecom.shipments.localdelivery.LocalDelivery.RemoveDeliveryRegion",
|
|
565
|
+
packageName: PACKAGE_NAME,
|
|
566
|
+
url: resolveComWixEcomShipmentsLocaldeliveryLocalDeliveryUrl({
|
|
567
|
+
protoPath: "/v1/local-delivery-options/remove-delivery-region",
|
|
568
|
+
data: payload,
|
|
569
|
+
host
|
|
570
|
+
}),
|
|
571
|
+
data: payload,
|
|
572
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
573
|
+
{
|
|
574
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
575
|
+
paths: [
|
|
576
|
+
{ path: "localDeliveryOption.minimumFreeDeliveryOrderAmount" },
|
|
577
|
+
{
|
|
578
|
+
path: "localDeliveryOption.radiusConfig.address.geocode.latitude"
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
path: "localDeliveryOption.radiusConfig.address.geocode.longitude"
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
path: "localDeliveryOption.customAreaConfig.geocodes.latitude"
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
path: "localDeliveryOption.customAreaConfig.geocodes.longitude"
|
|
588
|
+
},
|
|
589
|
+
{ path: "localDeliveryOption.radiusConfig.radius" }
|
|
590
|
+
]
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
594
|
+
paths: [
|
|
595
|
+
{ path: "localDeliveryOption.createdDate" },
|
|
596
|
+
{ path: "localDeliveryOption.updatedDate" }
|
|
597
|
+
]
|
|
598
|
+
}
|
|
599
|
+
])
|
|
600
|
+
};
|
|
601
|
+
return metadata;
|
|
602
|
+
}
|
|
603
|
+
return __removeDeliveryRegion;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
// src/ecom-v1-local-delivery-option-local-delivery-options.universal.ts
|
|
607
|
+
import { transformSDKAddressToRESTAddress } from "@wix/sdk-runtime/transformations/address";
|
|
608
|
+
import { transformRESTAddressToSDKAddress } from "@wix/sdk-runtime/transformations/address";
|
|
609
|
+
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
610
|
+
var LengthUnit = /* @__PURE__ */ ((LengthUnit2) => {
|
|
611
|
+
LengthUnit2["UNSPECIFIED_LENGTH_UNIT"] = "UNSPECIFIED_LENGTH_UNIT";
|
|
612
|
+
LengthUnit2["KM"] = "KM";
|
|
613
|
+
LengthUnit2["MI"] = "MI";
|
|
614
|
+
return LengthUnit2;
|
|
615
|
+
})(LengthUnit || {});
|
|
616
|
+
var DayOfWeek = /* @__PURE__ */ ((DayOfWeek2) => {
|
|
617
|
+
DayOfWeek2["MON"] = "MON";
|
|
618
|
+
DayOfWeek2["TUE"] = "TUE";
|
|
619
|
+
DayOfWeek2["WED"] = "WED";
|
|
620
|
+
DayOfWeek2["THU"] = "THU";
|
|
621
|
+
DayOfWeek2["FRI"] = "FRI";
|
|
622
|
+
DayOfWeek2["SAT"] = "SAT";
|
|
623
|
+
DayOfWeek2["SUN"] = "SUN";
|
|
624
|
+
return DayOfWeek2;
|
|
625
|
+
})(DayOfWeek || {});
|
|
626
|
+
var ConditionType = /* @__PURE__ */ ((ConditionType2) => {
|
|
627
|
+
ConditionType2["UNKNOWN_TYPE"] = "UNKNOWN_TYPE";
|
|
628
|
+
ConditionType2["BY_TOTAL_WEIGHT"] = "BY_TOTAL_WEIGHT";
|
|
629
|
+
ConditionType2["BY_TOTAL_PRICE"] = "BY_TOTAL_PRICE";
|
|
630
|
+
ConditionType2["BY_TOTAL_QUANTITY"] = "BY_TOTAL_QUANTITY";
|
|
631
|
+
return ConditionType2;
|
|
632
|
+
})(ConditionType || {});
|
|
633
|
+
var LogicalOperator = /* @__PURE__ */ ((LogicalOperator2) => {
|
|
634
|
+
LogicalOperator2["UNKNOWN_LOGICAL_OPERATOR_TYPE"] = "UNKNOWN_LOGICAL_OPERATOR_TYPE";
|
|
635
|
+
LogicalOperator2["EQ"] = "EQ";
|
|
636
|
+
LogicalOperator2["GT"] = "GT";
|
|
637
|
+
LogicalOperator2["GTE"] = "GTE";
|
|
638
|
+
LogicalOperator2["LT"] = "LT";
|
|
639
|
+
LogicalOperator2["LTE"] = "LTE";
|
|
640
|
+
return LogicalOperator2;
|
|
641
|
+
})(LogicalOperator || {});
|
|
642
|
+
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
643
|
+
SortOrder2["ASC"] = "ASC";
|
|
644
|
+
SortOrder2["DESC"] = "DESC";
|
|
645
|
+
return SortOrder2;
|
|
646
|
+
})(SortOrder || {});
|
|
647
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
648
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
649
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
650
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
651
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
652
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
653
|
+
return WebhookIdentityType2;
|
|
654
|
+
})(WebhookIdentityType || {});
|
|
655
|
+
async function createLocalDeliveryOption2(localDeliveryOption) {
|
|
656
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
657
|
+
const payload = transformPaths2(
|
|
658
|
+
renameKeysFromSDKRequestToRESTRequest({
|
|
659
|
+
localDeliveryOption
|
|
660
|
+
}),
|
|
661
|
+
[
|
|
662
|
+
{
|
|
663
|
+
transformFn: transformSDKAddressToRESTAddress,
|
|
664
|
+
paths: [{ path: "localDeliveryOption.radiusConfig.address" }]
|
|
665
|
+
}
|
|
666
|
+
]
|
|
667
|
+
);
|
|
668
|
+
const reqOpts = createLocalDeliveryOption(payload);
|
|
669
|
+
sideEffects?.onSiteCall?.();
|
|
670
|
+
try {
|
|
671
|
+
const result = await httpClient.request(reqOpts);
|
|
672
|
+
sideEffects?.onSuccess?.(result);
|
|
673
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
674
|
+
transformPaths2(result.data, [
|
|
675
|
+
{
|
|
676
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
677
|
+
paths: [{ path: "localDeliveryOption.radiusConfig.address" }]
|
|
678
|
+
}
|
|
679
|
+
])
|
|
680
|
+
)?.localDeliveryOption;
|
|
681
|
+
} catch (err) {
|
|
682
|
+
const transformedError = sdkTransformError(
|
|
683
|
+
err,
|
|
684
|
+
{
|
|
685
|
+
spreadPathsToArguments: {},
|
|
686
|
+
explicitPathsToArguments: { localDeliveryOption: "$[0]" },
|
|
687
|
+
singleArgumentUnchanged: false
|
|
688
|
+
},
|
|
689
|
+
["localDeliveryOption"]
|
|
690
|
+
);
|
|
691
|
+
sideEffects?.onError?.(err);
|
|
692
|
+
throw transformedError;
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
async function getLocalDeliveryOption2(localDeliveryOptionId, options) {
|
|
696
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
697
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
698
|
+
localDeliveryOptionId,
|
|
699
|
+
id: options?._id
|
|
700
|
+
});
|
|
701
|
+
const reqOpts = getLocalDeliveryOption(payload);
|
|
702
|
+
sideEffects?.onSiteCall?.();
|
|
703
|
+
try {
|
|
704
|
+
const result = await httpClient.request(reqOpts);
|
|
705
|
+
sideEffects?.onSuccess?.(result);
|
|
706
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
707
|
+
transformPaths2(result.data, [
|
|
708
|
+
{
|
|
709
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
710
|
+
paths: [{ path: "localDeliveryOption.radiusConfig.address" }]
|
|
711
|
+
}
|
|
712
|
+
])
|
|
713
|
+
)?.localDeliveryOption;
|
|
714
|
+
} catch (err) {
|
|
715
|
+
const transformedError = sdkTransformError(
|
|
716
|
+
err,
|
|
717
|
+
{
|
|
718
|
+
spreadPathsToArguments: {},
|
|
719
|
+
explicitPathsToArguments: {
|
|
720
|
+
localDeliveryOptionId: "$[0]",
|
|
721
|
+
id: "$[1]._id"
|
|
722
|
+
},
|
|
723
|
+
singleArgumentUnchanged: false
|
|
724
|
+
},
|
|
725
|
+
["localDeliveryOptionId", "options"]
|
|
726
|
+
);
|
|
727
|
+
sideEffects?.onError?.(err);
|
|
728
|
+
throw transformedError;
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
async function listLocalDeliveryOptions2(externalId) {
|
|
732
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
733
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
734
|
+
externalId
|
|
735
|
+
});
|
|
736
|
+
const reqOpts = listLocalDeliveryOptions(payload);
|
|
737
|
+
sideEffects?.onSiteCall?.();
|
|
738
|
+
try {
|
|
739
|
+
const result = await httpClient.request(reqOpts);
|
|
740
|
+
sideEffects?.onSuccess?.(result);
|
|
741
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
742
|
+
transformPaths2(result.data, [
|
|
743
|
+
{
|
|
744
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
745
|
+
paths: [{ path: "localDeliveryOptions.radiusConfig.address" }]
|
|
746
|
+
}
|
|
747
|
+
])
|
|
748
|
+
);
|
|
749
|
+
} catch (err) {
|
|
750
|
+
const transformedError = sdkTransformError(
|
|
751
|
+
err,
|
|
752
|
+
{
|
|
753
|
+
spreadPathsToArguments: {},
|
|
754
|
+
explicitPathsToArguments: { externalId: "$[0]" },
|
|
755
|
+
singleArgumentUnchanged: false
|
|
756
|
+
},
|
|
757
|
+
["externalId"]
|
|
758
|
+
);
|
|
759
|
+
sideEffects?.onError?.(err);
|
|
760
|
+
throw transformedError;
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
function queryLocalDeliveryOptions2() {
|
|
764
|
+
const { httpClient, sideEffects } = arguments[0];
|
|
765
|
+
return queryBuilder({
|
|
766
|
+
func: async (payload) => {
|
|
767
|
+
const reqOpts = queryLocalDeliveryOptions(
|
|
768
|
+
payload
|
|
769
|
+
);
|
|
770
|
+
sideEffects?.onSiteCall?.();
|
|
771
|
+
try {
|
|
772
|
+
const result = await httpClient.request(reqOpts);
|
|
773
|
+
sideEffects?.onSuccess?.(result);
|
|
774
|
+
return result;
|
|
775
|
+
} catch (err) {
|
|
776
|
+
sideEffects?.onError?.(err);
|
|
777
|
+
throw err;
|
|
778
|
+
}
|
|
779
|
+
},
|
|
780
|
+
requestTransformer: (query) => {
|
|
781
|
+
const args = [query, {}];
|
|
782
|
+
return renameKeysFromSDKRequestToRESTRequest({
|
|
783
|
+
...args?.[1],
|
|
784
|
+
query: args?.[0]
|
|
785
|
+
});
|
|
786
|
+
},
|
|
787
|
+
responseTransformer: ({
|
|
788
|
+
data
|
|
789
|
+
}) => {
|
|
790
|
+
const transformedData = renameKeysFromRESTResponseToSDKResponse(
|
|
791
|
+
transformPaths2(data, [
|
|
792
|
+
{
|
|
793
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
794
|
+
paths: [{ path: "localDeliveryOptions.radiusConfig.address" }]
|
|
795
|
+
}
|
|
796
|
+
])
|
|
797
|
+
);
|
|
798
|
+
return {
|
|
799
|
+
items: transformedData?.localDeliveryOptions,
|
|
800
|
+
pagingMetadata: transformedData?.pagingMetadata
|
|
801
|
+
};
|
|
802
|
+
},
|
|
803
|
+
errorTransformer: (err) => {
|
|
804
|
+
const transformedError = sdkTransformError(err, {
|
|
805
|
+
spreadPathsToArguments: {},
|
|
806
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
807
|
+
singleArgumentUnchanged: false
|
|
808
|
+
});
|
|
809
|
+
throw transformedError;
|
|
810
|
+
},
|
|
811
|
+
pagingMethod: "CURSOR",
|
|
812
|
+
transformationPaths: {}
|
|
813
|
+
});
|
|
814
|
+
}
|
|
815
|
+
async function updateLocalDeliveryOption2(_id, localDeliveryOption) {
|
|
816
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
817
|
+
const payload = transformPaths2(
|
|
818
|
+
renameKeysFromSDKRequestToRESTRequest({
|
|
819
|
+
localDeliveryOption: { ...localDeliveryOption, id: _id }
|
|
820
|
+
}),
|
|
821
|
+
[
|
|
822
|
+
{
|
|
823
|
+
transformFn: transformSDKAddressToRESTAddress,
|
|
824
|
+
paths: [{ path: "localDeliveryOption.radiusConfig.address" }]
|
|
825
|
+
}
|
|
826
|
+
]
|
|
827
|
+
);
|
|
828
|
+
const reqOpts = updateLocalDeliveryOption(payload);
|
|
829
|
+
sideEffects?.onSiteCall?.();
|
|
830
|
+
try {
|
|
831
|
+
const result = await httpClient.request(reqOpts);
|
|
832
|
+
sideEffects?.onSuccess?.(result);
|
|
833
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
834
|
+
transformPaths2(result.data, [
|
|
835
|
+
{
|
|
836
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
837
|
+
paths: [{ path: "localDeliveryOption.radiusConfig.address" }]
|
|
838
|
+
}
|
|
839
|
+
])
|
|
840
|
+
)?.localDeliveryOption;
|
|
841
|
+
} catch (err) {
|
|
842
|
+
const transformedError = sdkTransformError(
|
|
843
|
+
err,
|
|
844
|
+
{
|
|
845
|
+
spreadPathsToArguments: { localDeliveryOption: "$[1]" },
|
|
846
|
+
explicitPathsToArguments: { "localDeliveryOption.id": "$[0]" },
|
|
847
|
+
singleArgumentUnchanged: false
|
|
848
|
+
},
|
|
849
|
+
["_id", "localDeliveryOption"]
|
|
850
|
+
);
|
|
851
|
+
sideEffects?.onError?.(err);
|
|
852
|
+
throw transformedError;
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
async function deleteLocalDeliveryOption2(localDeliveryOptionId, options) {
|
|
856
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
857
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
858
|
+
localDeliveryOptionId,
|
|
859
|
+
id: options?._id
|
|
860
|
+
});
|
|
861
|
+
const reqOpts = deleteLocalDeliveryOption(payload);
|
|
862
|
+
sideEffects?.onSiteCall?.();
|
|
863
|
+
try {
|
|
864
|
+
const result = await httpClient.request(reqOpts);
|
|
865
|
+
sideEffects?.onSuccess?.(result);
|
|
866
|
+
} catch (err) {
|
|
867
|
+
const transformedError = sdkTransformError(
|
|
868
|
+
err,
|
|
869
|
+
{
|
|
870
|
+
spreadPathsToArguments: {},
|
|
871
|
+
explicitPathsToArguments: {
|
|
872
|
+
localDeliveryOptionId: "$[0]",
|
|
873
|
+
id: "$[1]._id"
|
|
874
|
+
},
|
|
875
|
+
singleArgumentUnchanged: false
|
|
876
|
+
},
|
|
877
|
+
["localDeliveryOptionId", "options"]
|
|
878
|
+
);
|
|
879
|
+
sideEffects?.onError?.(err);
|
|
880
|
+
throw transformedError;
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
async function bulkCreateLocalDeliveryOption2(localDeliveryOptions) {
|
|
884
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
885
|
+
const payload = transformPaths2(
|
|
886
|
+
renameKeysFromSDKRequestToRESTRequest({
|
|
887
|
+
localDeliveryOptions
|
|
888
|
+
}),
|
|
889
|
+
[
|
|
890
|
+
{
|
|
891
|
+
transformFn: transformSDKAddressToRESTAddress,
|
|
892
|
+
paths: [{ path: "localDeliveryOptions.radiusConfig.address" }]
|
|
893
|
+
}
|
|
894
|
+
]
|
|
895
|
+
);
|
|
896
|
+
const reqOpts = bulkCreateLocalDeliveryOption(
|
|
897
|
+
payload
|
|
898
|
+
);
|
|
899
|
+
sideEffects?.onSiteCall?.();
|
|
900
|
+
try {
|
|
901
|
+
const result = await httpClient.request(reqOpts);
|
|
902
|
+
sideEffects?.onSuccess?.(result);
|
|
903
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
904
|
+
transformPaths2(result.data, [
|
|
905
|
+
{
|
|
906
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
907
|
+
paths: [{ path: "localDeliveryOptions.radiusConfig.address" }]
|
|
908
|
+
}
|
|
909
|
+
])
|
|
910
|
+
);
|
|
911
|
+
} catch (err) {
|
|
912
|
+
const transformedError = sdkTransformError(
|
|
913
|
+
err,
|
|
914
|
+
{
|
|
915
|
+
spreadPathsToArguments: {},
|
|
916
|
+
explicitPathsToArguments: { localDeliveryOptions: "$[0]" },
|
|
917
|
+
singleArgumentUnchanged: false
|
|
918
|
+
},
|
|
919
|
+
["localDeliveryOptions"]
|
|
920
|
+
);
|
|
921
|
+
sideEffects?.onError?.(err);
|
|
922
|
+
throw transformedError;
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
async function bulkUpdateLocalDeliveryOption2(localDeliveryOptions) {
|
|
926
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
927
|
+
const payload = transformPaths2(
|
|
928
|
+
renameKeysFromSDKRequestToRESTRequest({
|
|
929
|
+
localDeliveryOptions
|
|
930
|
+
}),
|
|
931
|
+
[
|
|
932
|
+
{
|
|
933
|
+
transformFn: transformSDKAddressToRESTAddress,
|
|
934
|
+
paths: [{ path: "localDeliveryOptions.radiusConfig.address" }]
|
|
935
|
+
}
|
|
936
|
+
]
|
|
937
|
+
);
|
|
938
|
+
const reqOpts = bulkUpdateLocalDeliveryOption(
|
|
939
|
+
payload
|
|
940
|
+
);
|
|
941
|
+
sideEffects?.onSiteCall?.();
|
|
942
|
+
try {
|
|
943
|
+
const result = await httpClient.request(reqOpts);
|
|
944
|
+
sideEffects?.onSuccess?.(result);
|
|
945
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
946
|
+
transformPaths2(result.data, [
|
|
947
|
+
{
|
|
948
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
949
|
+
paths: [{ path: "localDeliveryOptions.radiusConfig.address" }]
|
|
950
|
+
}
|
|
951
|
+
])
|
|
952
|
+
);
|
|
953
|
+
} catch (err) {
|
|
954
|
+
const transformedError = sdkTransformError(
|
|
955
|
+
err,
|
|
956
|
+
{
|
|
957
|
+
spreadPathsToArguments: {},
|
|
958
|
+
explicitPathsToArguments: { localDeliveryOptions: "$[0]" },
|
|
959
|
+
singleArgumentUnchanged: false
|
|
960
|
+
},
|
|
961
|
+
["localDeliveryOptions"]
|
|
962
|
+
);
|
|
963
|
+
sideEffects?.onError?.(err);
|
|
964
|
+
throw transformedError;
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
async function bulkDeleteLocalDeliveryOption2(ids) {
|
|
968
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
969
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ ids });
|
|
970
|
+
const reqOpts = bulkDeleteLocalDeliveryOption(
|
|
971
|
+
payload
|
|
972
|
+
);
|
|
973
|
+
sideEffects?.onSiteCall?.();
|
|
974
|
+
try {
|
|
975
|
+
const result = await httpClient.request(reqOpts);
|
|
976
|
+
sideEffects?.onSuccess?.(result);
|
|
977
|
+
} catch (err) {
|
|
978
|
+
const transformedError = sdkTransformError(
|
|
979
|
+
err,
|
|
980
|
+
{
|
|
981
|
+
spreadPathsToArguments: {},
|
|
982
|
+
explicitPathsToArguments: { ids: "$[0]" },
|
|
983
|
+
singleArgumentUnchanged: false
|
|
984
|
+
},
|
|
985
|
+
["ids"]
|
|
986
|
+
);
|
|
987
|
+
sideEffects?.onError?.(err);
|
|
988
|
+
throw transformedError;
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
async function addDeliveryRegion2(deliveryRegionId, options) {
|
|
992
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
993
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
994
|
+
deliveryRegionId,
|
|
995
|
+
localDeliveryOptionId: options?.localDeliveryOptionId,
|
|
996
|
+
revision: options?.revision
|
|
997
|
+
});
|
|
998
|
+
const reqOpts = addDeliveryRegion(payload);
|
|
999
|
+
sideEffects?.onSiteCall?.();
|
|
1000
|
+
try {
|
|
1001
|
+
const result = await httpClient.request(reqOpts);
|
|
1002
|
+
sideEffects?.onSuccess?.(result);
|
|
1003
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
1004
|
+
transformPaths2(result.data, [
|
|
1005
|
+
{
|
|
1006
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
1007
|
+
paths: [{ path: "localDeliveryOption.radiusConfig.address" }]
|
|
1008
|
+
}
|
|
1009
|
+
])
|
|
1010
|
+
);
|
|
1011
|
+
} catch (err) {
|
|
1012
|
+
const transformedError = sdkTransformError(
|
|
1013
|
+
err,
|
|
1014
|
+
{
|
|
1015
|
+
spreadPathsToArguments: {},
|
|
1016
|
+
explicitPathsToArguments: {
|
|
1017
|
+
deliveryRegionId: "$[0]",
|
|
1018
|
+
localDeliveryOptionId: "$[1].localDeliveryOptionId",
|
|
1019
|
+
revision: "$[1].revision"
|
|
1020
|
+
},
|
|
1021
|
+
singleArgumentUnchanged: false
|
|
1022
|
+
},
|
|
1023
|
+
["deliveryRegionId", "options"]
|
|
1024
|
+
);
|
|
1025
|
+
sideEffects?.onError?.(err);
|
|
1026
|
+
throw transformedError;
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
async function removeDeliveryRegion2(deliveryRegionId, options) {
|
|
1030
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1031
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1032
|
+
deliveryRegionId,
|
|
1033
|
+
localDeliveryOptionId: options?.localDeliveryOptionId,
|
|
1034
|
+
revision: options?.revision
|
|
1035
|
+
});
|
|
1036
|
+
const reqOpts = removeDeliveryRegion(payload);
|
|
1037
|
+
sideEffects?.onSiteCall?.();
|
|
1038
|
+
try {
|
|
1039
|
+
const result = await httpClient.request(reqOpts);
|
|
1040
|
+
sideEffects?.onSuccess?.(result);
|
|
1041
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
1042
|
+
transformPaths2(result.data, [
|
|
1043
|
+
{
|
|
1044
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
1045
|
+
paths: [{ path: "localDeliveryOption.radiusConfig.address" }]
|
|
1046
|
+
}
|
|
1047
|
+
])
|
|
1048
|
+
);
|
|
1049
|
+
} catch (err) {
|
|
1050
|
+
const transformedError = sdkTransformError(
|
|
1051
|
+
err,
|
|
1052
|
+
{
|
|
1053
|
+
spreadPathsToArguments: {},
|
|
1054
|
+
explicitPathsToArguments: {
|
|
1055
|
+
deliveryRegionId: "$[0]",
|
|
1056
|
+
localDeliveryOptionId: "$[1].localDeliveryOptionId",
|
|
1057
|
+
revision: "$[1].revision"
|
|
1058
|
+
},
|
|
1059
|
+
singleArgumentUnchanged: false
|
|
1060
|
+
},
|
|
1061
|
+
["deliveryRegionId", "options"]
|
|
1062
|
+
);
|
|
1063
|
+
sideEffects?.onError?.(err);
|
|
1064
|
+
throw transformedError;
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
export {
|
|
1068
|
+
ConditionType,
|
|
1069
|
+
DayOfWeek,
|
|
1070
|
+
LengthUnit,
|
|
1071
|
+
LogicalOperator,
|
|
1072
|
+
SortOrder,
|
|
1073
|
+
WebhookIdentityType,
|
|
1074
|
+
addDeliveryRegion2 as addDeliveryRegion,
|
|
1075
|
+
bulkCreateLocalDeliveryOption2 as bulkCreateLocalDeliveryOption,
|
|
1076
|
+
bulkDeleteLocalDeliveryOption2 as bulkDeleteLocalDeliveryOption,
|
|
1077
|
+
bulkUpdateLocalDeliveryOption2 as bulkUpdateLocalDeliveryOption,
|
|
1078
|
+
createLocalDeliveryOption2 as createLocalDeliveryOption,
|
|
1079
|
+
deleteLocalDeliveryOption2 as deleteLocalDeliveryOption,
|
|
1080
|
+
getLocalDeliveryOption2 as getLocalDeliveryOption,
|
|
1081
|
+
listLocalDeliveryOptions2 as listLocalDeliveryOptions,
|
|
1082
|
+
queryLocalDeliveryOptions2 as queryLocalDeliveryOptions,
|
|
1083
|
+
removeDeliveryRegion2 as removeDeliveryRegion,
|
|
1084
|
+
updateLocalDeliveryOption2 as updateLocalDeliveryOption
|
|
1085
|
+
};
|
|
1086
|
+
//# sourceMappingURL=index.typings.mjs.map
|