@wix/auto_sdk_ecom_orders 1.0.71 → 1.0.72
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/{internal/cjs/ecom-v1-order-orders.universal-BuGgtT93.d.ts → cjs/ecom-v1-order-orders.universal-C73TYoI7.d.ts} +1548 -736
- package/build/cjs/index.d.ts +56 -3
- package/build/cjs/index.js +1035 -8
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +2 -2
- package/build/cjs/index.typings.js +1259 -332
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +1006 -38
- package/build/cjs/meta.js +637 -2
- package/build/cjs/meta.js.map +1 -1
- package/build/{internal/es/ecom-v1-order-orders.universal-BuGgtT93.d.mts → es/ecom-v1-order-orders.universal-C73TYoI7.d.mts} +1548 -736
- package/build/es/index.d.mts +56 -3
- package/build/es/index.mjs +1008 -7
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +2 -2
- package/build/es/index.typings.mjs +1232 -331
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +1006 -38
- package/build/es/meta.mjs +625 -1
- package/build/es/meta.mjs.map +1 -1
- package/build/{cjs/ecom-v1-order-orders.universal-B51dgVhk.d.ts → internal/cjs/ecom-v1-order-orders.universal-KCtJReRk.d.ts} +2225 -222
- package/build/internal/cjs/index.d.ts +162 -3
- package/build/internal/cjs/index.js +1035 -8
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +2 -2
- package/build/internal/cjs/index.typings.js +1259 -332
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +1006 -38
- package/build/internal/cjs/meta.js +637 -2
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/{es/ecom-v1-order-orders.universal-B51dgVhk.d.mts → internal/es/ecom-v1-order-orders.universal-KCtJReRk.d.mts} +2225 -222
- package/build/internal/es/index.d.mts +162 -3
- package/build/internal/es/index.mjs +1008 -7
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +2 -2
- package/build/internal/es/index.typings.mjs +1232 -331
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +1006 -38
- package/build/internal/es/meta.mjs +625 -1
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -45,20 +45,109 @@ function resolveComWixEcomOrdersV1OrdersUrl(opts) {
|
|
|
45
45
|
};
|
|
46
46
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
47
47
|
}
|
|
48
|
+
function resolveComWixEcomOrdersPaymentsCollectorV1PaymentsCollectorUrl(opts) {
|
|
49
|
+
const domainToMappings = {
|
|
50
|
+
"api._api_base_domain_": [
|
|
51
|
+
{
|
|
52
|
+
srcPath: "/payments-collector",
|
|
53
|
+
destPath: ""
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"www.wixapis.com": [
|
|
57
|
+
{
|
|
58
|
+
srcPath: "/ecom/v1/payments-collector",
|
|
59
|
+
destPath: "/v1/payments-collector"
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"manage._base_domain_": [
|
|
63
|
+
{
|
|
64
|
+
srcPath: "/ecom/v1/payments-collector",
|
|
65
|
+
destPath: "/v1/payments-collector"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
srcPath: "/_api/v1/payments-collector",
|
|
69
|
+
destPath: "/v1/payments-collector"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
srcPath: "/v1/payments-collector",
|
|
73
|
+
destPath: "/v1/payments-collector"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
srcPath: "/_api/payments-collector",
|
|
77
|
+
destPath: "/v1/payments-collector"
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
};
|
|
81
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
82
|
+
}
|
|
48
83
|
var PACKAGE_NAME = "@wix/auto_sdk_ecom_orders";
|
|
49
|
-
function
|
|
50
|
-
function
|
|
84
|
+
function preparePaymentCollection(payload) {
|
|
85
|
+
function __preparePaymentCollection({ host }) {
|
|
86
|
+
const metadata = {
|
|
87
|
+
entityFqdn: "wix.ecom.v1.order",
|
|
88
|
+
method: "POST",
|
|
89
|
+
methodFqn: "com.wix.ecom.orders.payments_collector.v1.PaymentsCollector.PreparePaymentCollection",
|
|
90
|
+
packageName: PACKAGE_NAME,
|
|
91
|
+
url: resolveComWixEcomOrdersPaymentsCollectorV1PaymentsCollectorUrl({
|
|
92
|
+
protoPath: "/v1/payments-collector/orders/{ecomOrderId}/prepare-payment-collection",
|
|
93
|
+
data: payload,
|
|
94
|
+
host
|
|
95
|
+
}),
|
|
96
|
+
data: payload
|
|
97
|
+
};
|
|
98
|
+
return metadata;
|
|
99
|
+
}
|
|
100
|
+
return __preparePaymentCollection;
|
|
101
|
+
}
|
|
102
|
+
function getPaymentCollectabilityStatus(payload) {
|
|
103
|
+
function __getPaymentCollectabilityStatus({ host }) {
|
|
51
104
|
const metadata = {
|
|
52
105
|
entityFqdn: "wix.ecom.v1.order",
|
|
53
106
|
method: "GET",
|
|
54
|
-
methodFqn: "com.wix.ecom.orders.v1.
|
|
107
|
+
methodFqn: "com.wix.ecom.orders.payments_collector.v1.PaymentsCollector.GetPaymentCollectabilityStatus",
|
|
55
108
|
packageName: PACKAGE_NAME,
|
|
56
|
-
url:
|
|
57
|
-
protoPath: "/v1/orders/{
|
|
109
|
+
url: resolveComWixEcomOrdersPaymentsCollectorV1PaymentsCollectorUrl({
|
|
110
|
+
protoPath: "/v1/payments-collector/orders/{ecomOrderId}/payment-collectability-status",
|
|
58
111
|
data: payload,
|
|
59
112
|
host
|
|
60
113
|
}),
|
|
61
|
-
params: toURLSearchParams(payload)
|
|
114
|
+
params: toURLSearchParams(payload)
|
|
115
|
+
};
|
|
116
|
+
return metadata;
|
|
117
|
+
}
|
|
118
|
+
return __getPaymentCollectabilityStatus;
|
|
119
|
+
}
|
|
120
|
+
function recordManuallyCollectedPayment(payload) {
|
|
121
|
+
function __recordManuallyCollectedPayment({ host }) {
|
|
122
|
+
const metadata = {
|
|
123
|
+
entityFqdn: "wix.ecom.v1.order",
|
|
124
|
+
method: "POST",
|
|
125
|
+
methodFqn: "com.wix.ecom.orders.payments_collector.v1.PaymentsCollector.RecordManuallyCollectedPayment",
|
|
126
|
+
packageName: PACKAGE_NAME,
|
|
127
|
+
url: resolveComWixEcomOrdersPaymentsCollectorV1PaymentsCollectorUrl({
|
|
128
|
+
protoPath: "/v1/payments-collector/orders/{orderId}/manual-payment",
|
|
129
|
+
data: payload,
|
|
130
|
+
host
|
|
131
|
+
}),
|
|
132
|
+
data: payload
|
|
133
|
+
};
|
|
134
|
+
return metadata;
|
|
135
|
+
}
|
|
136
|
+
return __recordManuallyCollectedPayment;
|
|
137
|
+
}
|
|
138
|
+
function paymentCollectionMarkOrderAsPaid(payload) {
|
|
139
|
+
function __paymentCollectionMarkOrderAsPaid({ host }) {
|
|
140
|
+
const metadata = {
|
|
141
|
+
entityFqdn: "wix.ecom.v1.order",
|
|
142
|
+
method: "POST",
|
|
143
|
+
methodFqn: "com.wix.ecom.orders.payments_collector.v1.PaymentsCollector.MarkOrderAsPaid",
|
|
144
|
+
packageName: PACKAGE_NAME,
|
|
145
|
+
url: resolveComWixEcomOrdersPaymentsCollectorV1PaymentsCollectorUrl({
|
|
146
|
+
protoPath: "/v1/payments-collector/orders/{ecomOrderId}/mark-as-paid",
|
|
147
|
+
data: payload,
|
|
148
|
+
host
|
|
149
|
+
}),
|
|
150
|
+
data: payload,
|
|
62
151
|
transformResponse: (payload2) => transformPaths(payload2, [
|
|
63
152
|
{
|
|
64
153
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
@@ -105,17 +194,17 @@ function getOrder(payload) {
|
|
|
105
194
|
};
|
|
106
195
|
return metadata;
|
|
107
196
|
}
|
|
108
|
-
return
|
|
197
|
+
return __paymentCollectionMarkOrderAsPaid;
|
|
109
198
|
}
|
|
110
|
-
function
|
|
111
|
-
function
|
|
199
|
+
function paymentCollectionBulkMarkOrdersAsPaid(payload) {
|
|
200
|
+
function __paymentCollectionBulkMarkOrdersAsPaid({ host }) {
|
|
112
201
|
const metadata = {
|
|
113
202
|
entityFqdn: "wix.ecom.v1.order",
|
|
114
203
|
method: "POST",
|
|
115
|
-
methodFqn: "com.wix.ecom.orders.v1.
|
|
204
|
+
methodFqn: "com.wix.ecom.orders.payments_collector.v1.PaymentsCollector.BulkMarkOrdersAsPaid",
|
|
116
205
|
packageName: PACKAGE_NAME,
|
|
117
|
-
url:
|
|
118
|
-
protoPath: "/v1/
|
|
206
|
+
url: resolveComWixEcomOrdersPaymentsCollectorV1PaymentsCollectorUrl({
|
|
207
|
+
protoPath: "/v1/bulk/payments-collector/mark-as-paid",
|
|
119
208
|
data: payload,
|
|
120
209
|
host
|
|
121
210
|
}),
|
|
@@ -124,214 +213,265 @@ function searchOrders(payload) {
|
|
|
124
213
|
{
|
|
125
214
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
126
215
|
paths: [
|
|
127
|
-
{ path: "
|
|
128
|
-
{ path: "
|
|
129
|
-
{ path: "
|
|
130
|
-
{ path: "
|
|
131
|
-
{ path: "
|
|
216
|
+
{ path: "results.item.createdDate" },
|
|
217
|
+
{ path: "results.item.updatedDate" },
|
|
218
|
+
{ path: "results.item.purchasedDate" },
|
|
219
|
+
{ path: "results.item.lineItems.image.urlExpirationDate" },
|
|
220
|
+
{ path: "results.item.lineItems.digitalFile.expirationDate" },
|
|
132
221
|
{
|
|
133
|
-
path: "
|
|
222
|
+
path: "results.item.lineItems.subscriptionInfo.subscriptionSettings.startDate"
|
|
134
223
|
},
|
|
135
|
-
{ path: "
|
|
136
|
-
{
|
|
137
|
-
|
|
138
|
-
|
|
224
|
+
{ path: "results.item.shippingInfo.logistics.deliverByDate" },
|
|
225
|
+
{
|
|
226
|
+
path: "results.item.shippingInfo.logistics.deliveryTimeSlot.from"
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
path: "results.item.shippingInfo.logistics.deliveryTimeSlot.to"
|
|
230
|
+
},
|
|
231
|
+
{ path: "results.item.activities.createdDate" }
|
|
139
232
|
]
|
|
140
233
|
},
|
|
141
234
|
{
|
|
142
235
|
transformFn: transformRESTFloatToSDKFloat,
|
|
143
236
|
paths: [
|
|
144
|
-
{ path: "
|
|
145
|
-
{ path: "
|
|
146
|
-
{ path: "
|
|
147
|
-
{ path: "
|
|
148
|
-
{ path: "
|
|
237
|
+
{ path: "results.item.lineItems.image.focalPoint.x" },
|
|
238
|
+
{ path: "results.item.lineItems.image.focalPoint.y" },
|
|
239
|
+
{ path: "results.item.lineItems.physicalProperties.weight" },
|
|
240
|
+
{ path: "results.item.billingInfo.address.geocode.latitude" },
|
|
241
|
+
{ path: "results.item.billingInfo.address.geocode.longitude" },
|
|
149
242
|
{
|
|
150
|
-
path: "
|
|
243
|
+
path: "results.item.shippingInfo.logistics.shippingDestination.address.geocode.latitude"
|
|
151
244
|
},
|
|
152
245
|
{
|
|
153
|
-
path: "
|
|
246
|
+
path: "results.item.shippingInfo.logistics.shippingDestination.address.geocode.longitude"
|
|
154
247
|
},
|
|
155
248
|
{
|
|
156
|
-
path: "
|
|
249
|
+
path: "results.item.shippingInfo.logistics.pickupDetails.address.geocode.latitude"
|
|
157
250
|
},
|
|
158
251
|
{
|
|
159
|
-
path: "
|
|
252
|
+
path: "results.item.shippingInfo.logistics.pickupDetails.address.geocode.longitude"
|
|
160
253
|
},
|
|
161
|
-
{ path: "
|
|
162
|
-
{ path: "
|
|
254
|
+
{ path: "results.item.recipientInfo.address.geocode.latitude" },
|
|
255
|
+
{ path: "results.item.recipientInfo.address.geocode.longitude" }
|
|
163
256
|
]
|
|
164
257
|
}
|
|
165
258
|
])
|
|
166
259
|
};
|
|
167
260
|
return metadata;
|
|
168
261
|
}
|
|
169
|
-
return
|
|
262
|
+
return __paymentCollectionBulkMarkOrdersAsPaid;
|
|
170
263
|
}
|
|
171
|
-
function
|
|
172
|
-
function
|
|
264
|
+
function getRefundabilityStatus(payload) {
|
|
265
|
+
function __getRefundabilityStatus({ host }) {
|
|
266
|
+
const metadata = {
|
|
267
|
+
entityFqdn: "wix.ecom.v1.order",
|
|
268
|
+
method: "GET",
|
|
269
|
+
methodFqn: "com.wix.ecom.orders.payments_collector.v1.PaymentsCollector.GetRefundabilityStatus",
|
|
270
|
+
packageName: PACKAGE_NAME,
|
|
271
|
+
url: resolveComWixEcomOrdersPaymentsCollectorV1PaymentsCollectorUrl({
|
|
272
|
+
protoPath: "/v1/payments-collector/orders/{ecomOrderId}/refundability",
|
|
273
|
+
data: payload,
|
|
274
|
+
host
|
|
275
|
+
}),
|
|
276
|
+
params: toURLSearchParams(payload)
|
|
277
|
+
};
|
|
278
|
+
return metadata;
|
|
279
|
+
}
|
|
280
|
+
return __getRefundabilityStatus;
|
|
281
|
+
}
|
|
282
|
+
function paymentCollectionCreatePaymentGatewayOrder(payload) {
|
|
283
|
+
function __paymentCollectionCreatePaymentGatewayOrder({ host }) {
|
|
284
|
+
const metadata = {
|
|
285
|
+
entityFqdn: "wix.ecom.v1.order",
|
|
286
|
+
method: "POST",
|
|
287
|
+
methodFqn: "com.wix.ecom.orders.payments_collector.v1.PaymentsCollector.CreatePaymentGatewayOrder",
|
|
288
|
+
packageName: PACKAGE_NAME,
|
|
289
|
+
url: resolveComWixEcomOrdersPaymentsCollectorV1PaymentsCollectorUrl({
|
|
290
|
+
protoPath: "/v1/payments-collector/orders/{ecomOrderId}/create-payment-gateway-order",
|
|
291
|
+
data: payload,
|
|
292
|
+
host
|
|
293
|
+
}),
|
|
294
|
+
data: payload
|
|
295
|
+
};
|
|
296
|
+
return metadata;
|
|
297
|
+
}
|
|
298
|
+
return __paymentCollectionCreatePaymentGatewayOrder;
|
|
299
|
+
}
|
|
300
|
+
function chargeMemberships(payload) {
|
|
301
|
+
function __chargeMemberships({ host }) {
|
|
173
302
|
const serializedData = transformPaths(payload, [
|
|
174
303
|
{
|
|
175
304
|
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
176
|
-
paths: [
|
|
177
|
-
{ path: "order.createdDate" },
|
|
178
|
-
{ path: "order.updatedDate" },
|
|
179
|
-
{ path: "order.purchasedDate" },
|
|
180
|
-
{ path: "order.lineItems.image.urlExpirationDate" },
|
|
181
|
-
{ path: "order.lineItems.digitalFile.expirationDate" },
|
|
182
|
-
{
|
|
183
|
-
path: "order.lineItems.subscriptionInfo.subscriptionSettings.startDate"
|
|
184
|
-
},
|
|
185
|
-
{ path: "order.shippingInfo.logistics.deliverByDate" },
|
|
186
|
-
{ path: "order.shippingInfo.logistics.deliveryTimeSlot.from" },
|
|
187
|
-
{ path: "order.shippingInfo.logistics.deliveryTimeSlot.to" },
|
|
188
|
-
{ path: "order.activities.createdDate" }
|
|
189
|
-
]
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
transformFn: transformSDKFloatToRESTFloat,
|
|
193
|
-
paths: [
|
|
194
|
-
{ path: "order.lineItems.image.focalPoint.x" },
|
|
195
|
-
{ path: "order.lineItems.image.focalPoint.y" },
|
|
196
|
-
{ path: "order.lineItems.physicalProperties.weight" },
|
|
197
|
-
{ path: "order.billingInfo.address.geocode.latitude" },
|
|
198
|
-
{ path: "order.billingInfo.address.geocode.longitude" },
|
|
199
|
-
{
|
|
200
|
-
path: "order.shippingInfo.logistics.shippingDestination.address.geocode.latitude"
|
|
201
|
-
},
|
|
202
|
-
{
|
|
203
|
-
path: "order.shippingInfo.logistics.shippingDestination.address.geocode.longitude"
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
path: "order.shippingInfo.logistics.pickupDetails.address.geocode.latitude"
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
path: "order.shippingInfo.logistics.pickupDetails.address.geocode.longitude"
|
|
210
|
-
},
|
|
211
|
-
{ path: "order.recipientInfo.address.geocode.latitude" },
|
|
212
|
-
{ path: "order.recipientInfo.address.geocode.longitude" }
|
|
213
|
-
]
|
|
305
|
+
paths: [{ path: "membershipCharges.serviceProperties.scheduledDate" }]
|
|
214
306
|
}
|
|
215
307
|
]);
|
|
216
308
|
const metadata = {
|
|
217
309
|
entityFqdn: "wix.ecom.v1.order",
|
|
218
310
|
method: "POST",
|
|
219
|
-
methodFqn: "com.wix.ecom.orders.v1.
|
|
311
|
+
methodFqn: "com.wix.ecom.orders.payments_collector.v1.PaymentsCollector.ChargeMemberships",
|
|
220
312
|
packageName: PACKAGE_NAME,
|
|
221
|
-
url:
|
|
222
|
-
protoPath: "/v1/orders",
|
|
313
|
+
url: resolveComWixEcomOrdersPaymentsCollectorV1PaymentsCollectorUrl({
|
|
314
|
+
protoPath: "/v1/payments-collector/orders/{ecomOrderId}/charge-membership",
|
|
223
315
|
data: serializedData,
|
|
224
316
|
host
|
|
225
317
|
}),
|
|
226
|
-
data: serializedData
|
|
318
|
+
data: serializedData
|
|
319
|
+
};
|
|
320
|
+
return metadata;
|
|
321
|
+
}
|
|
322
|
+
return __chargeMemberships;
|
|
323
|
+
}
|
|
324
|
+
function triggerRefund(payload) {
|
|
325
|
+
function __triggerRefund({ host }) {
|
|
326
|
+
const metadata = {
|
|
327
|
+
entityFqdn: "wix.ecom.v1.order",
|
|
328
|
+
method: "POST",
|
|
329
|
+
methodFqn: "com.wix.ecom.orders.payments_collector.v1.PaymentsCollector.TriggerRefund",
|
|
330
|
+
packageName: PACKAGE_NAME,
|
|
331
|
+
url: resolveComWixEcomOrdersPaymentsCollectorV1PaymentsCollectorUrl({
|
|
332
|
+
protoPath: "/v1/payments-collector/orders/{ecomOrderId}/trigger-refund",
|
|
333
|
+
data: payload,
|
|
334
|
+
host
|
|
335
|
+
}),
|
|
336
|
+
data: payload,
|
|
227
337
|
transformResponse: (payload2) => transformPaths(payload2, [
|
|
228
338
|
{
|
|
229
339
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
230
340
|
paths: [
|
|
231
|
-
{ path: "
|
|
232
|
-
{ path: "
|
|
233
|
-
{ path: "order.purchasedDate" },
|
|
234
|
-
{ path: "order.lineItems.image.urlExpirationDate" },
|
|
235
|
-
{ path: "order.lineItems.digitalFile.expirationDate" },
|
|
341
|
+
{ path: "orderTransactions.payments.createdDate" },
|
|
342
|
+
{ path: "orderTransactions.payments.updatedDate" },
|
|
236
343
|
{
|
|
237
|
-
path: "
|
|
344
|
+
path: "orderTransactions.payments.regularPaymentDetails.authorizationDetails.authorizedDate"
|
|
238
345
|
},
|
|
239
|
-
{
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
{
|
|
346
|
+
{
|
|
347
|
+
path: "orderTransactions.payments.regularPaymentDetails.authorizationDetails.captures.createdDate"
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
path: "orderTransactions.payments.regularPaymentDetails.authorizationDetails.void.voidedDate"
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
path: "orderTransactions.payments.regularPaymentDetails.authorizationDetails.scheduledAction.executionDate"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
path: "orderTransactions.payments.regularPaymentDetails.chargebacks.createdDate"
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
path: "orderTransactions.payments.regularPaymentDetails.chargebacks.updatedDate"
|
|
360
|
+
},
|
|
361
|
+
{ path: "orderTransactions.refunds.createdDate" }
|
|
243
362
|
]
|
|
244
|
-
}
|
|
363
|
+
}
|
|
364
|
+
])
|
|
365
|
+
};
|
|
366
|
+
return metadata;
|
|
367
|
+
}
|
|
368
|
+
return __triggerRefund;
|
|
369
|
+
}
|
|
370
|
+
function voidAuthorizedPayments(payload) {
|
|
371
|
+
function __voidAuthorizedPayments({ host }) {
|
|
372
|
+
const metadata = {
|
|
373
|
+
entityFqdn: "wix.ecom.v1.order",
|
|
374
|
+
method: "POST",
|
|
375
|
+
methodFqn: "com.wix.ecom.orders.payments_collector.v1.PaymentsCollector.VoidAuthorizedPayments",
|
|
376
|
+
packageName: PACKAGE_NAME,
|
|
377
|
+
url: resolveComWixEcomOrdersPaymentsCollectorV1PaymentsCollectorUrl({
|
|
378
|
+
protoPath: "/v1/payments-collector/orders/{ecomOrderId}/void-authorized-payments",
|
|
379
|
+
data: payload,
|
|
380
|
+
host
|
|
381
|
+
}),
|
|
382
|
+
data: payload,
|
|
383
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
245
384
|
{
|
|
246
|
-
transformFn:
|
|
385
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
247
386
|
paths: [
|
|
248
|
-
{ path: "
|
|
249
|
-
{ path: "
|
|
250
|
-
{ path: "order.lineItems.physicalProperties.weight" },
|
|
251
|
-
{ path: "order.billingInfo.address.geocode.latitude" },
|
|
252
|
-
{ path: "order.billingInfo.address.geocode.longitude" },
|
|
387
|
+
{ path: "orderTransactions.payments.createdDate" },
|
|
388
|
+
{ path: "orderTransactions.payments.updatedDate" },
|
|
253
389
|
{
|
|
254
|
-
path: "
|
|
390
|
+
path: "orderTransactions.payments.regularPaymentDetails.authorizationDetails.authorizedDate"
|
|
255
391
|
},
|
|
256
392
|
{
|
|
257
|
-
path: "
|
|
393
|
+
path: "orderTransactions.payments.regularPaymentDetails.authorizationDetails.captures.createdDate"
|
|
258
394
|
},
|
|
259
395
|
{
|
|
260
|
-
path: "
|
|
396
|
+
path: "orderTransactions.payments.regularPaymentDetails.authorizationDetails.void.voidedDate"
|
|
261
397
|
},
|
|
262
398
|
{
|
|
263
|
-
path: "
|
|
399
|
+
path: "orderTransactions.payments.regularPaymentDetails.authorizationDetails.scheduledAction.executionDate"
|
|
264
400
|
},
|
|
265
|
-
{
|
|
266
|
-
|
|
401
|
+
{
|
|
402
|
+
path: "orderTransactions.payments.regularPaymentDetails.chargebacks.createdDate"
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
path: "orderTransactions.payments.regularPaymentDetails.chargebacks.updatedDate"
|
|
406
|
+
},
|
|
407
|
+
{ path: "orderTransactions.refunds.createdDate" }
|
|
267
408
|
]
|
|
268
409
|
}
|
|
269
410
|
])
|
|
270
411
|
};
|
|
271
412
|
return metadata;
|
|
272
413
|
}
|
|
273
|
-
return
|
|
414
|
+
return __voidAuthorizedPayments;
|
|
274
415
|
}
|
|
275
|
-
function
|
|
276
|
-
function
|
|
277
|
-
const serializedData = transformPaths(payload, [
|
|
278
|
-
{
|
|
279
|
-
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
280
|
-
paths: [{ path: "fieldMask" }]
|
|
281
|
-
},
|
|
282
|
-
{
|
|
283
|
-
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
284
|
-
paths: [
|
|
285
|
-
{ path: "order.createdDate" },
|
|
286
|
-
{ path: "order.updatedDate" },
|
|
287
|
-
{ path: "order.purchasedDate" },
|
|
288
|
-
{ path: "order.lineItems.image.urlExpirationDate" },
|
|
289
|
-
{ path: "order.lineItems.digitalFile.expirationDate" },
|
|
290
|
-
{
|
|
291
|
-
path: "order.lineItems.subscriptionInfo.subscriptionSettings.startDate"
|
|
292
|
-
},
|
|
293
|
-
{ path: "order.shippingInfo.logistics.deliverByDate" },
|
|
294
|
-
{ path: "order.shippingInfo.logistics.deliveryTimeSlot.from" },
|
|
295
|
-
{ path: "order.shippingInfo.logistics.deliveryTimeSlot.to" },
|
|
296
|
-
{ path: "order.activities.createdDate" }
|
|
297
|
-
]
|
|
298
|
-
},
|
|
299
|
-
{
|
|
300
|
-
transformFn: transformSDKFloatToRESTFloat,
|
|
301
|
-
paths: [
|
|
302
|
-
{ path: "order.lineItems.image.focalPoint.x" },
|
|
303
|
-
{ path: "order.lineItems.image.focalPoint.y" },
|
|
304
|
-
{ path: "order.lineItems.physicalProperties.weight" },
|
|
305
|
-
{ path: "order.billingInfo.address.geocode.latitude" },
|
|
306
|
-
{ path: "order.billingInfo.address.geocode.longitude" },
|
|
307
|
-
{
|
|
308
|
-
path: "order.shippingInfo.logistics.shippingDestination.address.geocode.latitude"
|
|
309
|
-
},
|
|
310
|
-
{
|
|
311
|
-
path: "order.shippingInfo.logistics.shippingDestination.address.geocode.longitude"
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
path: "order.shippingInfo.logistics.pickupDetails.address.geocode.latitude"
|
|
315
|
-
},
|
|
316
|
-
{
|
|
317
|
-
path: "order.shippingInfo.logistics.pickupDetails.address.geocode.longitude"
|
|
318
|
-
},
|
|
319
|
-
{ path: "order.recipientInfo.address.geocode.latitude" },
|
|
320
|
-
{ path: "order.recipientInfo.address.geocode.longitude" }
|
|
321
|
-
]
|
|
322
|
-
}
|
|
323
|
-
]);
|
|
416
|
+
function captureAuthorizedPayments(payload) {
|
|
417
|
+
function __captureAuthorizedPayments({ host }) {
|
|
324
418
|
const metadata = {
|
|
325
419
|
entityFqdn: "wix.ecom.v1.order",
|
|
326
|
-
method: "
|
|
327
|
-
methodFqn: "com.wix.ecom.orders.v1.
|
|
420
|
+
method: "POST",
|
|
421
|
+
methodFqn: "com.wix.ecom.orders.payments_collector.v1.PaymentsCollector.CaptureAuthorizedPayments",
|
|
422
|
+
packageName: PACKAGE_NAME,
|
|
423
|
+
url: resolveComWixEcomOrdersPaymentsCollectorV1PaymentsCollectorUrl({
|
|
424
|
+
protoPath: "/v1/payments-collector/orders/{ecomOrderId}/capture-authorized-payments",
|
|
425
|
+
data: payload,
|
|
426
|
+
host
|
|
427
|
+
}),
|
|
428
|
+
data: payload,
|
|
429
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
430
|
+
{
|
|
431
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
432
|
+
paths: [
|
|
433
|
+
{ path: "orderTransactions.payments.createdDate" },
|
|
434
|
+
{ path: "orderTransactions.payments.updatedDate" },
|
|
435
|
+
{
|
|
436
|
+
path: "orderTransactions.payments.regularPaymentDetails.authorizationDetails.authorizedDate"
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
path: "orderTransactions.payments.regularPaymentDetails.authorizationDetails.captures.createdDate"
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
path: "orderTransactions.payments.regularPaymentDetails.authorizationDetails.void.voidedDate"
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
path: "orderTransactions.payments.regularPaymentDetails.authorizationDetails.scheduledAction.executionDate"
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
path: "orderTransactions.payments.regularPaymentDetails.chargebacks.createdDate"
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
path: "orderTransactions.payments.regularPaymentDetails.chargebacks.updatedDate"
|
|
452
|
+
},
|
|
453
|
+
{ path: "orderTransactions.refunds.createdDate" }
|
|
454
|
+
]
|
|
455
|
+
}
|
|
456
|
+
])
|
|
457
|
+
};
|
|
458
|
+
return metadata;
|
|
459
|
+
}
|
|
460
|
+
return __captureAuthorizedPayments;
|
|
461
|
+
}
|
|
462
|
+
function getOrder(payload) {
|
|
463
|
+
function __getOrder({ host }) {
|
|
464
|
+
const metadata = {
|
|
465
|
+
entityFqdn: "wix.ecom.v1.order",
|
|
466
|
+
method: "GET",
|
|
467
|
+
methodFqn: "com.wix.ecom.orders.v1.Orders.GetOrder",
|
|
328
468
|
packageName: PACKAGE_NAME,
|
|
329
469
|
url: resolveComWixEcomOrdersV1OrdersUrl({
|
|
330
|
-
protoPath: "/v1/orders/{
|
|
331
|
-
data:
|
|
470
|
+
protoPath: "/v1/orders/{id}",
|
|
471
|
+
data: payload,
|
|
332
472
|
host
|
|
333
473
|
}),
|
|
334
|
-
|
|
474
|
+
params: toURLSearchParams(payload),
|
|
335
475
|
transformResponse: (payload2) => transformPaths(payload2, [
|
|
336
476
|
{
|
|
337
477
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
@@ -378,170 +518,121 @@ function updateOrder(payload) {
|
|
|
378
518
|
};
|
|
379
519
|
return metadata;
|
|
380
520
|
}
|
|
381
|
-
return
|
|
521
|
+
return __getOrder;
|
|
382
522
|
}
|
|
383
|
-
function
|
|
384
|
-
function
|
|
385
|
-
const serializedData = transformPaths(payload, [
|
|
386
|
-
{
|
|
387
|
-
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
388
|
-
paths: [{ path: "orders.fieldMask" }]
|
|
389
|
-
},
|
|
390
|
-
{
|
|
391
|
-
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
392
|
-
paths: [
|
|
393
|
-
{ path: "orders.order.createdDate" },
|
|
394
|
-
{ path: "orders.order.updatedDate" },
|
|
395
|
-
{ path: "orders.order.purchasedDate" },
|
|
396
|
-
{ path: "orders.order.lineItems.image.urlExpirationDate" },
|
|
397
|
-
{ path: "orders.order.lineItems.digitalFile.expirationDate" },
|
|
398
|
-
{
|
|
399
|
-
path: "orders.order.lineItems.subscriptionInfo.subscriptionSettings.startDate"
|
|
400
|
-
},
|
|
401
|
-
{ path: "orders.order.shippingInfo.logistics.deliverByDate" },
|
|
402
|
-
{ path: "orders.order.shippingInfo.logistics.deliveryTimeSlot.from" },
|
|
403
|
-
{ path: "orders.order.shippingInfo.logistics.deliveryTimeSlot.to" },
|
|
404
|
-
{ path: "orders.order.activities.createdDate" }
|
|
405
|
-
]
|
|
406
|
-
},
|
|
407
|
-
{
|
|
408
|
-
transformFn: transformSDKFloatToRESTFloat,
|
|
409
|
-
paths: [
|
|
410
|
-
{ path: "orders.order.lineItems.image.focalPoint.x" },
|
|
411
|
-
{ path: "orders.order.lineItems.image.focalPoint.y" },
|
|
412
|
-
{ path: "orders.order.lineItems.physicalProperties.weight" },
|
|
413
|
-
{ path: "orders.order.billingInfo.address.geocode.latitude" },
|
|
414
|
-
{ path: "orders.order.billingInfo.address.geocode.longitude" },
|
|
415
|
-
{
|
|
416
|
-
path: "orders.order.shippingInfo.logistics.shippingDestination.address.geocode.latitude"
|
|
417
|
-
},
|
|
418
|
-
{
|
|
419
|
-
path: "orders.order.shippingInfo.logistics.shippingDestination.address.geocode.longitude"
|
|
420
|
-
},
|
|
421
|
-
{
|
|
422
|
-
path: "orders.order.shippingInfo.logistics.pickupDetails.address.geocode.latitude"
|
|
423
|
-
},
|
|
424
|
-
{
|
|
425
|
-
path: "orders.order.shippingInfo.logistics.pickupDetails.address.geocode.longitude"
|
|
426
|
-
},
|
|
427
|
-
{ path: "orders.order.recipientInfo.address.geocode.latitude" },
|
|
428
|
-
{ path: "orders.order.recipientInfo.address.geocode.longitude" }
|
|
429
|
-
]
|
|
430
|
-
}
|
|
431
|
-
]);
|
|
523
|
+
function searchOrders(payload) {
|
|
524
|
+
function __searchOrders({ host }) {
|
|
432
525
|
const metadata = {
|
|
433
526
|
entityFqdn: "wix.ecom.v1.order",
|
|
434
527
|
method: "POST",
|
|
435
|
-
methodFqn: "com.wix.ecom.orders.v1.Orders.
|
|
528
|
+
methodFqn: "com.wix.ecom.orders.v1.Orders.SearchOrders",
|
|
436
529
|
packageName: PACKAGE_NAME,
|
|
437
530
|
url: resolveComWixEcomOrdersV1OrdersUrl({
|
|
438
|
-
protoPath: "/v1/
|
|
439
|
-
data:
|
|
531
|
+
protoPath: "/v1/orders/search",
|
|
532
|
+
data: payload,
|
|
440
533
|
host
|
|
441
534
|
}),
|
|
442
|
-
data:
|
|
535
|
+
data: payload,
|
|
443
536
|
transformResponse: (payload2) => transformPaths(payload2, [
|
|
444
537
|
{
|
|
445
538
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
446
539
|
paths: [
|
|
447
|
-
{ path: "
|
|
448
|
-
{ path: "
|
|
449
|
-
{ path: "
|
|
450
|
-
{ path: "
|
|
451
|
-
{ path: "
|
|
452
|
-
{
|
|
453
|
-
path: "results.item.lineItems.subscriptionInfo.subscriptionSettings.startDate"
|
|
454
|
-
},
|
|
455
|
-
{ path: "results.item.shippingInfo.logistics.deliverByDate" },
|
|
456
|
-
{
|
|
457
|
-
path: "results.item.shippingInfo.logistics.deliveryTimeSlot.from"
|
|
458
|
-
},
|
|
540
|
+
{ path: "orders.createdDate" },
|
|
541
|
+
{ path: "orders.updatedDate" },
|
|
542
|
+
{ path: "orders.purchasedDate" },
|
|
543
|
+
{ path: "orders.lineItems.image.urlExpirationDate" },
|
|
544
|
+
{ path: "orders.lineItems.digitalFile.expirationDate" },
|
|
459
545
|
{
|
|
460
|
-
path: "
|
|
546
|
+
path: "orders.lineItems.subscriptionInfo.subscriptionSettings.startDate"
|
|
461
547
|
},
|
|
462
|
-
{ path: "
|
|
548
|
+
{ path: "orders.shippingInfo.logistics.deliverByDate" },
|
|
549
|
+
{ path: "orders.shippingInfo.logistics.deliveryTimeSlot.from" },
|
|
550
|
+
{ path: "orders.shippingInfo.logistics.deliveryTimeSlot.to" },
|
|
551
|
+
{ path: "orders.activities.createdDate" }
|
|
463
552
|
]
|
|
464
553
|
},
|
|
465
554
|
{
|
|
466
555
|
transformFn: transformRESTFloatToSDKFloat,
|
|
467
556
|
paths: [
|
|
468
|
-
{ path: "
|
|
469
|
-
{ path: "
|
|
470
|
-
{ path: "
|
|
471
|
-
{ path: "
|
|
472
|
-
{ path: "
|
|
557
|
+
{ path: "orders.lineItems.image.focalPoint.x" },
|
|
558
|
+
{ path: "orders.lineItems.image.focalPoint.y" },
|
|
559
|
+
{ path: "orders.lineItems.physicalProperties.weight" },
|
|
560
|
+
{ path: "orders.billingInfo.address.geocode.latitude" },
|
|
561
|
+
{ path: "orders.billingInfo.address.geocode.longitude" },
|
|
473
562
|
{
|
|
474
|
-
path: "
|
|
563
|
+
path: "orders.shippingInfo.logistics.shippingDestination.address.geocode.latitude"
|
|
475
564
|
},
|
|
476
565
|
{
|
|
477
|
-
path: "
|
|
566
|
+
path: "orders.shippingInfo.logistics.shippingDestination.address.geocode.longitude"
|
|
478
567
|
},
|
|
479
568
|
{
|
|
480
|
-
path: "
|
|
569
|
+
path: "orders.shippingInfo.logistics.pickupDetails.address.geocode.latitude"
|
|
481
570
|
},
|
|
482
571
|
{
|
|
483
|
-
path: "
|
|
572
|
+
path: "orders.shippingInfo.logistics.pickupDetails.address.geocode.longitude"
|
|
484
573
|
},
|
|
485
|
-
{ path: "
|
|
486
|
-
{ path: "
|
|
574
|
+
{ path: "orders.recipientInfo.address.geocode.latitude" },
|
|
575
|
+
{ path: "orders.recipientInfo.address.geocode.longitude" }
|
|
487
576
|
]
|
|
488
577
|
}
|
|
489
578
|
])
|
|
490
579
|
};
|
|
491
580
|
return metadata;
|
|
492
581
|
}
|
|
493
|
-
return
|
|
582
|
+
return __searchOrders;
|
|
494
583
|
}
|
|
495
|
-
function
|
|
496
|
-
function
|
|
584
|
+
function createOrder(payload) {
|
|
585
|
+
function __createOrder({ host }) {
|
|
497
586
|
const serializedData = transformPaths(payload, [
|
|
498
587
|
{
|
|
499
588
|
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
500
589
|
paths: [
|
|
501
|
-
{ path: "
|
|
590
|
+
{ path: "order.createdDate" },
|
|
591
|
+
{ path: "order.updatedDate" },
|
|
592
|
+
{ path: "order.purchasedDate" },
|
|
593
|
+
{ path: "order.lineItems.image.urlExpirationDate" },
|
|
594
|
+
{ path: "order.lineItems.digitalFile.expirationDate" },
|
|
502
595
|
{
|
|
503
|
-
path: "
|
|
596
|
+
path: "order.lineItems.subscriptionInfo.subscriptionSettings.startDate"
|
|
504
597
|
},
|
|
505
|
-
{ path: "
|
|
506
|
-
{ path: "
|
|
507
|
-
{ path: "
|
|
508
|
-
{
|
|
509
|
-
path: "changes.lineItems.lineItem.subscriptionInfo.subscriptionSettings.startDate"
|
|
510
|
-
}
|
|
598
|
+
{ path: "order.shippingInfo.logistics.deliverByDate" },
|
|
599
|
+
{ path: "order.shippingInfo.logistics.deliveryTimeSlot.from" },
|
|
600
|
+
{ path: "order.shippingInfo.logistics.deliveryTimeSlot.to" },
|
|
601
|
+
{ path: "order.activities.createdDate" }
|
|
511
602
|
]
|
|
512
603
|
},
|
|
513
604
|
{
|
|
514
605
|
transformFn: transformSDKFloatToRESTFloat,
|
|
515
606
|
paths: [
|
|
607
|
+
{ path: "order.lineItems.image.focalPoint.x" },
|
|
608
|
+
{ path: "order.lineItems.image.focalPoint.y" },
|
|
609
|
+
{ path: "order.lineItems.physicalProperties.weight" },
|
|
610
|
+
{ path: "order.billingInfo.address.geocode.latitude" },
|
|
611
|
+
{ path: "order.billingInfo.address.geocode.longitude" },
|
|
516
612
|
{
|
|
517
|
-
path: "
|
|
613
|
+
path: "order.shippingInfo.logistics.shippingDestination.address.geocode.latitude"
|
|
518
614
|
},
|
|
519
615
|
{
|
|
520
|
-
path: "
|
|
616
|
+
path: "order.shippingInfo.logistics.shippingDestination.address.geocode.longitude"
|
|
521
617
|
},
|
|
522
618
|
{
|
|
523
|
-
path: "
|
|
619
|
+
path: "order.shippingInfo.logistics.pickupDetails.address.geocode.latitude"
|
|
524
620
|
},
|
|
525
621
|
{
|
|
526
|
-
path: "
|
|
622
|
+
path: "order.shippingInfo.logistics.pickupDetails.address.geocode.longitude"
|
|
527
623
|
},
|
|
528
|
-
{ path: "
|
|
529
|
-
{ path: "
|
|
530
|
-
{ path: "changes.changedRecipientInfo.address.geocode.latitude" },
|
|
531
|
-
{ path: "changes.changedRecipientInfo.address.geocode.longitude" },
|
|
532
|
-
{ path: "changes.lineItems.lineItem.physicalProperties.weight" },
|
|
533
|
-
{ path: "changes.lineItems.lineItem.image.focalPoint.x" },
|
|
534
|
-
{ path: "changes.lineItems.lineItem.image.focalPoint.y" }
|
|
624
|
+
{ path: "order.recipientInfo.address.geocode.latitude" },
|
|
625
|
+
{ path: "order.recipientInfo.address.geocode.longitude" }
|
|
535
626
|
]
|
|
536
627
|
}
|
|
537
628
|
]);
|
|
538
629
|
const metadata = {
|
|
539
630
|
entityFqdn: "wix.ecom.v1.order",
|
|
540
631
|
method: "POST",
|
|
541
|
-
methodFqn: "com.wix.ecom.orders.v1.Orders.
|
|
632
|
+
methodFqn: "com.wix.ecom.orders.v1.Orders.CreateOrder",
|
|
542
633
|
packageName: PACKAGE_NAME,
|
|
543
634
|
url: resolveComWixEcomOrdersV1OrdersUrl({
|
|
544
|
-
protoPath: "/v1/orders
|
|
635
|
+
protoPath: "/v1/orders",
|
|
545
636
|
data: serializedData,
|
|
546
637
|
host
|
|
547
638
|
}),
|
|
@@ -592,10 +683,10 @@ function commitDeltas(payload) {
|
|
|
592
683
|
};
|
|
593
684
|
return metadata;
|
|
594
685
|
}
|
|
595
|
-
return
|
|
686
|
+
return __createOrder;
|
|
596
687
|
}
|
|
597
|
-
function
|
|
598
|
-
function
|
|
688
|
+
function updateOrder(payload) {
|
|
689
|
+
function __updateOrder({ host }) {
|
|
599
690
|
const serializedData = transformPaths(payload, [
|
|
600
691
|
{
|
|
601
692
|
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
@@ -604,27 +695,52 @@ function updateOrderLineItem(payload) {
|
|
|
604
695
|
{
|
|
605
696
|
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
606
697
|
paths: [
|
|
607
|
-
{ path: "
|
|
608
|
-
{ path: "
|
|
609
|
-
{ path: "
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
698
|
+
{ path: "order.createdDate" },
|
|
699
|
+
{ path: "order.updatedDate" },
|
|
700
|
+
{ path: "order.purchasedDate" },
|
|
701
|
+
{ path: "order.lineItems.image.urlExpirationDate" },
|
|
702
|
+
{ path: "order.lineItems.digitalFile.expirationDate" },
|
|
703
|
+
{
|
|
704
|
+
path: "order.lineItems.subscriptionInfo.subscriptionSettings.startDate"
|
|
705
|
+
},
|
|
706
|
+
{ path: "order.shippingInfo.logistics.deliverByDate" },
|
|
707
|
+
{ path: "order.shippingInfo.logistics.deliveryTimeSlot.from" },
|
|
708
|
+
{ path: "order.shippingInfo.logistics.deliveryTimeSlot.to" },
|
|
709
|
+
{ path: "order.activities.createdDate" }
|
|
710
|
+
]
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
614
714
|
paths: [
|
|
615
|
-
{ path: "
|
|
616
|
-
{ path: "
|
|
617
|
-
{ path: "
|
|
715
|
+
{ path: "order.lineItems.image.focalPoint.x" },
|
|
716
|
+
{ path: "order.lineItems.image.focalPoint.y" },
|
|
717
|
+
{ path: "order.lineItems.physicalProperties.weight" },
|
|
718
|
+
{ path: "order.billingInfo.address.geocode.latitude" },
|
|
719
|
+
{ path: "order.billingInfo.address.geocode.longitude" },
|
|
720
|
+
{
|
|
721
|
+
path: "order.shippingInfo.logistics.shippingDestination.address.geocode.latitude"
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
path: "order.shippingInfo.logistics.shippingDestination.address.geocode.longitude"
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
path: "order.shippingInfo.logistics.pickupDetails.address.geocode.latitude"
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
path: "order.shippingInfo.logistics.pickupDetails.address.geocode.longitude"
|
|
731
|
+
},
|
|
732
|
+
{ path: "order.recipientInfo.address.geocode.latitude" },
|
|
733
|
+
{ path: "order.recipientInfo.address.geocode.longitude" }
|
|
618
734
|
]
|
|
619
735
|
}
|
|
620
736
|
]);
|
|
621
737
|
const metadata = {
|
|
622
738
|
entityFqdn: "wix.ecom.v1.order",
|
|
623
739
|
method: "PATCH",
|
|
624
|
-
methodFqn: "com.wix.ecom.orders.v1.Orders.
|
|
740
|
+
methodFqn: "com.wix.ecom.orders.v1.Orders.UpdateOrder",
|
|
625
741
|
packageName: PACKAGE_NAME,
|
|
626
742
|
url: resolveComWixEcomOrdersV1OrdersUrl({
|
|
627
|
-
protoPath: "/v1/orders/{
|
|
743
|
+
protoPath: "/v1/orders/{order.id}",
|
|
628
744
|
data: serializedData,
|
|
629
745
|
host
|
|
630
746
|
}),
|
|
@@ -675,82 +791,174 @@ function updateOrderLineItem(payload) {
|
|
|
675
791
|
};
|
|
676
792
|
return metadata;
|
|
677
793
|
}
|
|
678
|
-
return
|
|
794
|
+
return __updateOrder;
|
|
679
795
|
}
|
|
680
|
-
function
|
|
681
|
-
function
|
|
796
|
+
function bulkUpdateOrders(payload) {
|
|
797
|
+
function __bulkUpdateOrders({ host }) {
|
|
798
|
+
const serializedData = transformPaths(payload, [
|
|
799
|
+
{
|
|
800
|
+
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
801
|
+
paths: [{ path: "orders.fieldMask" }]
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
805
|
+
paths: [
|
|
806
|
+
{ path: "orders.order.createdDate" },
|
|
807
|
+
{ path: "orders.order.updatedDate" },
|
|
808
|
+
{ path: "orders.order.purchasedDate" },
|
|
809
|
+
{ path: "orders.order.lineItems.image.urlExpirationDate" },
|
|
810
|
+
{ path: "orders.order.lineItems.digitalFile.expirationDate" },
|
|
811
|
+
{
|
|
812
|
+
path: "orders.order.lineItems.subscriptionInfo.subscriptionSettings.startDate"
|
|
813
|
+
},
|
|
814
|
+
{ path: "orders.order.shippingInfo.logistics.deliverByDate" },
|
|
815
|
+
{ path: "orders.order.shippingInfo.logistics.deliveryTimeSlot.from" },
|
|
816
|
+
{ path: "orders.order.shippingInfo.logistics.deliveryTimeSlot.to" },
|
|
817
|
+
{ path: "orders.order.activities.createdDate" }
|
|
818
|
+
]
|
|
819
|
+
},
|
|
820
|
+
{
|
|
821
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
822
|
+
paths: [
|
|
823
|
+
{ path: "orders.order.lineItems.image.focalPoint.x" },
|
|
824
|
+
{ path: "orders.order.lineItems.image.focalPoint.y" },
|
|
825
|
+
{ path: "orders.order.lineItems.physicalProperties.weight" },
|
|
826
|
+
{ path: "orders.order.billingInfo.address.geocode.latitude" },
|
|
827
|
+
{ path: "orders.order.billingInfo.address.geocode.longitude" },
|
|
828
|
+
{
|
|
829
|
+
path: "orders.order.shippingInfo.logistics.shippingDestination.address.geocode.latitude"
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
path: "orders.order.shippingInfo.logistics.shippingDestination.address.geocode.longitude"
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
path: "orders.order.shippingInfo.logistics.pickupDetails.address.geocode.latitude"
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
path: "orders.order.shippingInfo.logistics.pickupDetails.address.geocode.longitude"
|
|
839
|
+
},
|
|
840
|
+
{ path: "orders.order.recipientInfo.address.geocode.latitude" },
|
|
841
|
+
{ path: "orders.order.recipientInfo.address.geocode.longitude" }
|
|
842
|
+
]
|
|
843
|
+
}
|
|
844
|
+
]);
|
|
682
845
|
const metadata = {
|
|
683
846
|
entityFqdn: "wix.ecom.v1.order",
|
|
684
847
|
method: "POST",
|
|
685
|
-
methodFqn: "com.wix.ecom.orders.v1.Orders.
|
|
848
|
+
methodFqn: "com.wix.ecom.orders.v1.Orders.BulkUpdateOrders",
|
|
686
849
|
packageName: PACKAGE_NAME,
|
|
687
850
|
url: resolveComWixEcomOrdersV1OrdersUrl({
|
|
688
|
-
protoPath: "/v1/orders/
|
|
689
|
-
data:
|
|
851
|
+
protoPath: "/v1/bulk/orders/update",
|
|
852
|
+
data: serializedData,
|
|
690
853
|
host
|
|
691
854
|
}),
|
|
692
|
-
data:
|
|
855
|
+
data: serializedData,
|
|
693
856
|
transformResponse: (payload2) => transformPaths(payload2, [
|
|
694
857
|
{
|
|
695
858
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
696
859
|
paths: [
|
|
697
|
-
{ path: "
|
|
698
|
-
{ path: "
|
|
699
|
-
{ path: "
|
|
700
|
-
{ path: "
|
|
701
|
-
{ path: "
|
|
860
|
+
{ path: "results.item.createdDate" },
|
|
861
|
+
{ path: "results.item.updatedDate" },
|
|
862
|
+
{ path: "results.item.purchasedDate" },
|
|
863
|
+
{ path: "results.item.lineItems.image.urlExpirationDate" },
|
|
864
|
+
{ path: "results.item.lineItems.digitalFile.expirationDate" },
|
|
702
865
|
{
|
|
703
|
-
path: "
|
|
866
|
+
path: "results.item.lineItems.subscriptionInfo.subscriptionSettings.startDate"
|
|
704
867
|
},
|
|
705
|
-
{ path: "
|
|
706
|
-
{
|
|
707
|
-
|
|
708
|
-
|
|
868
|
+
{ path: "results.item.shippingInfo.logistics.deliverByDate" },
|
|
869
|
+
{
|
|
870
|
+
path: "results.item.shippingInfo.logistics.deliveryTimeSlot.from"
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
path: "results.item.shippingInfo.logistics.deliveryTimeSlot.to"
|
|
874
|
+
},
|
|
875
|
+
{ path: "results.item.activities.createdDate" }
|
|
709
876
|
]
|
|
710
877
|
},
|
|
711
878
|
{
|
|
712
879
|
transformFn: transformRESTFloatToSDKFloat,
|
|
713
880
|
paths: [
|
|
714
|
-
{ path: "
|
|
715
|
-
{ path: "
|
|
716
|
-
{ path: "
|
|
717
|
-
{ path: "
|
|
718
|
-
{ path: "
|
|
881
|
+
{ path: "results.item.lineItems.image.focalPoint.x" },
|
|
882
|
+
{ path: "results.item.lineItems.image.focalPoint.y" },
|
|
883
|
+
{ path: "results.item.lineItems.physicalProperties.weight" },
|
|
884
|
+
{ path: "results.item.billingInfo.address.geocode.latitude" },
|
|
885
|
+
{ path: "results.item.billingInfo.address.geocode.longitude" },
|
|
719
886
|
{
|
|
720
|
-
path: "
|
|
887
|
+
path: "results.item.shippingInfo.logistics.shippingDestination.address.geocode.latitude"
|
|
721
888
|
},
|
|
722
889
|
{
|
|
723
|
-
path: "
|
|
890
|
+
path: "results.item.shippingInfo.logistics.shippingDestination.address.geocode.longitude"
|
|
724
891
|
},
|
|
725
892
|
{
|
|
726
|
-
path: "
|
|
893
|
+
path: "results.item.shippingInfo.logistics.pickupDetails.address.geocode.latitude"
|
|
727
894
|
},
|
|
728
895
|
{
|
|
729
|
-
path: "
|
|
896
|
+
path: "results.item.shippingInfo.logistics.pickupDetails.address.geocode.longitude"
|
|
730
897
|
},
|
|
731
|
-
{ path: "
|
|
732
|
-
{ path: "
|
|
898
|
+
{ path: "results.item.recipientInfo.address.geocode.latitude" },
|
|
899
|
+
{ path: "results.item.recipientInfo.address.geocode.longitude" }
|
|
733
900
|
]
|
|
734
901
|
}
|
|
735
902
|
])
|
|
736
903
|
};
|
|
737
904
|
return metadata;
|
|
738
905
|
}
|
|
739
|
-
return
|
|
906
|
+
return __bulkUpdateOrders;
|
|
740
907
|
}
|
|
741
|
-
function
|
|
742
|
-
function
|
|
908
|
+
function commitDeltas(payload) {
|
|
909
|
+
function __commitDeltas({ host }) {
|
|
910
|
+
const serializedData = transformPaths(payload, [
|
|
911
|
+
{
|
|
912
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
913
|
+
paths: [
|
|
914
|
+
{ path: "changes.changedShippingInfo.logistics.deliverByDate" },
|
|
915
|
+
{
|
|
916
|
+
path: "changes.changedShippingInfo.logistics.deliveryTimeSlot.from"
|
|
917
|
+
},
|
|
918
|
+
{ path: "changes.changedShippingInfo.logistics.deliveryTimeSlot.to" },
|
|
919
|
+
{ path: "changes.lineItems.lineItem.image.urlExpirationDate" },
|
|
920
|
+
{ path: "changes.lineItems.lineItem.digitalFile.expirationDate" },
|
|
921
|
+
{
|
|
922
|
+
path: "changes.lineItems.lineItem.subscriptionInfo.subscriptionSettings.startDate"
|
|
923
|
+
}
|
|
924
|
+
]
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
928
|
+
paths: [
|
|
929
|
+
{
|
|
930
|
+
path: "changes.changedShippingInfo.logistics.shippingDestination.address.geocode.latitude"
|
|
931
|
+
},
|
|
932
|
+
{
|
|
933
|
+
path: "changes.changedShippingInfo.logistics.shippingDestination.address.geocode.longitude"
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
path: "changes.changedShippingInfo.logistics.pickupDetails.address.geocode.latitude"
|
|
937
|
+
},
|
|
938
|
+
{
|
|
939
|
+
path: "changes.changedShippingInfo.logistics.pickupDetails.address.geocode.longitude"
|
|
940
|
+
},
|
|
941
|
+
{ path: "changes.changedBillingInfo.address.geocode.latitude" },
|
|
942
|
+
{ path: "changes.changedBillingInfo.address.geocode.longitude" },
|
|
943
|
+
{ path: "changes.changedRecipientInfo.address.geocode.latitude" },
|
|
944
|
+
{ path: "changes.changedRecipientInfo.address.geocode.longitude" },
|
|
945
|
+
{ path: "changes.lineItems.lineItem.physicalProperties.weight" },
|
|
946
|
+
{ path: "changes.lineItems.lineItem.image.focalPoint.x" },
|
|
947
|
+
{ path: "changes.lineItems.lineItem.image.focalPoint.y" }
|
|
948
|
+
]
|
|
949
|
+
}
|
|
950
|
+
]);
|
|
743
951
|
const metadata = {
|
|
744
952
|
entityFqdn: "wix.ecom.v1.order",
|
|
745
|
-
method: "
|
|
746
|
-
methodFqn: "com.wix.ecom.orders.v1.Orders.
|
|
953
|
+
method: "POST",
|
|
954
|
+
methodFqn: "com.wix.ecom.orders.v1.Orders.CommitDeltas",
|
|
747
955
|
packageName: PACKAGE_NAME,
|
|
748
956
|
url: resolveComWixEcomOrdersV1OrdersUrl({
|
|
749
|
-
protoPath: "/v1/orders/{id}/
|
|
750
|
-
data:
|
|
957
|
+
protoPath: "/v1/orders/{id}/commit-deltas",
|
|
958
|
+
data: serializedData,
|
|
751
959
|
host
|
|
752
960
|
}),
|
|
753
|
-
data:
|
|
961
|
+
data: serializedData,
|
|
754
962
|
transformResponse: (payload2) => transformPaths(payload2, [
|
|
755
963
|
{
|
|
756
964
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
@@ -797,21 +1005,43 @@ function updateActivity(payload) {
|
|
|
797
1005
|
};
|
|
798
1006
|
return metadata;
|
|
799
1007
|
}
|
|
800
|
-
return
|
|
1008
|
+
return __commitDeltas;
|
|
801
1009
|
}
|
|
802
|
-
function
|
|
803
|
-
function
|
|
1010
|
+
function updateOrderLineItem(payload) {
|
|
1011
|
+
function __updateOrderLineItem({ host }) {
|
|
1012
|
+
const serializedData = transformPaths(payload, [
|
|
1013
|
+
{
|
|
1014
|
+
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
1015
|
+
paths: [{ path: "fieldMask" }]
|
|
1016
|
+
},
|
|
1017
|
+
{
|
|
1018
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
1019
|
+
paths: [
|
|
1020
|
+
{ path: "lineItem.image.urlExpirationDate" },
|
|
1021
|
+
{ path: "lineItem.digitalFile.expirationDate" },
|
|
1022
|
+
{ path: "lineItem.subscriptionInfo.subscriptionSettings.startDate" }
|
|
1023
|
+
]
|
|
1024
|
+
},
|
|
1025
|
+
{
|
|
1026
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
1027
|
+
paths: [
|
|
1028
|
+
{ path: "lineItem.image.focalPoint.x" },
|
|
1029
|
+
{ path: "lineItem.image.focalPoint.y" },
|
|
1030
|
+
{ path: "lineItem.physicalProperties.weight" }
|
|
1031
|
+
]
|
|
1032
|
+
}
|
|
1033
|
+
]);
|
|
804
1034
|
const metadata = {
|
|
805
1035
|
entityFqdn: "wix.ecom.v1.order",
|
|
806
|
-
method: "
|
|
807
|
-
methodFqn: "com.wix.ecom.orders.v1.Orders.
|
|
1036
|
+
method: "PATCH",
|
|
1037
|
+
methodFqn: "com.wix.ecom.orders.v1.Orders.UpdateOrderLineItem",
|
|
808
1038
|
packageName: PACKAGE_NAME,
|
|
809
1039
|
url: resolveComWixEcomOrdersV1OrdersUrl({
|
|
810
|
-
protoPath: "/v1/orders/{id}/
|
|
811
|
-
data:
|
|
1040
|
+
protoPath: "/v1/orders/{id}/line-item/{lineItem.id}",
|
|
1041
|
+
data: serializedData,
|
|
812
1042
|
host
|
|
813
1043
|
}),
|
|
814
|
-
|
|
1044
|
+
data: serializedData,
|
|
815
1045
|
transformResponse: (payload2) => transformPaths(payload2, [
|
|
816
1046
|
{
|
|
817
1047
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
@@ -858,17 +1088,17 @@ function deleteActivity(payload) {
|
|
|
858
1088
|
};
|
|
859
1089
|
return metadata;
|
|
860
1090
|
}
|
|
861
|
-
return
|
|
1091
|
+
return __updateOrderLineItem;
|
|
862
1092
|
}
|
|
863
|
-
function
|
|
864
|
-
function
|
|
1093
|
+
function addActivity(payload) {
|
|
1094
|
+
function __addActivity({ host }) {
|
|
865
1095
|
const metadata = {
|
|
866
1096
|
entityFqdn: "wix.ecom.v1.order",
|
|
867
1097
|
method: "POST",
|
|
868
|
-
methodFqn: "com.wix.ecom.orders.v1.Orders.
|
|
1098
|
+
methodFqn: "com.wix.ecom.orders.v1.Orders.AddActivity",
|
|
869
1099
|
packageName: PACKAGE_NAME,
|
|
870
1100
|
url: resolveComWixEcomOrdersV1OrdersUrl({
|
|
871
|
-
protoPath: "/v1/orders/{id}/
|
|
1101
|
+
protoPath: "/v1/orders/{id}/activities",
|
|
872
1102
|
data: payload,
|
|
873
1103
|
host
|
|
874
1104
|
}),
|
|
@@ -919,7 +1149,190 @@ function cancelOrder(payload) {
|
|
|
919
1149
|
};
|
|
920
1150
|
return metadata;
|
|
921
1151
|
}
|
|
922
|
-
return
|
|
1152
|
+
return __addActivity;
|
|
1153
|
+
}
|
|
1154
|
+
function updateActivity(payload) {
|
|
1155
|
+
function __updateActivity({ host }) {
|
|
1156
|
+
const metadata = {
|
|
1157
|
+
entityFqdn: "wix.ecom.v1.order",
|
|
1158
|
+
method: "PATCH",
|
|
1159
|
+
methodFqn: "com.wix.ecom.orders.v1.Orders.UpdateActivity",
|
|
1160
|
+
packageName: PACKAGE_NAME,
|
|
1161
|
+
url: resolveComWixEcomOrdersV1OrdersUrl({
|
|
1162
|
+
protoPath: "/v1/orders/{id}/activities/{activityId}",
|
|
1163
|
+
data: payload,
|
|
1164
|
+
host
|
|
1165
|
+
}),
|
|
1166
|
+
data: payload,
|
|
1167
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
1168
|
+
{
|
|
1169
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
1170
|
+
paths: [
|
|
1171
|
+
{ path: "order.createdDate" },
|
|
1172
|
+
{ path: "order.updatedDate" },
|
|
1173
|
+
{ path: "order.purchasedDate" },
|
|
1174
|
+
{ path: "order.lineItems.image.urlExpirationDate" },
|
|
1175
|
+
{ path: "order.lineItems.digitalFile.expirationDate" },
|
|
1176
|
+
{
|
|
1177
|
+
path: "order.lineItems.subscriptionInfo.subscriptionSettings.startDate"
|
|
1178
|
+
},
|
|
1179
|
+
{ path: "order.shippingInfo.logistics.deliverByDate" },
|
|
1180
|
+
{ path: "order.shippingInfo.logistics.deliveryTimeSlot.from" },
|
|
1181
|
+
{ path: "order.shippingInfo.logistics.deliveryTimeSlot.to" },
|
|
1182
|
+
{ path: "order.activities.createdDate" }
|
|
1183
|
+
]
|
|
1184
|
+
},
|
|
1185
|
+
{
|
|
1186
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
1187
|
+
paths: [
|
|
1188
|
+
{ path: "order.lineItems.image.focalPoint.x" },
|
|
1189
|
+
{ path: "order.lineItems.image.focalPoint.y" },
|
|
1190
|
+
{ path: "order.lineItems.physicalProperties.weight" },
|
|
1191
|
+
{ path: "order.billingInfo.address.geocode.latitude" },
|
|
1192
|
+
{ path: "order.billingInfo.address.geocode.longitude" },
|
|
1193
|
+
{
|
|
1194
|
+
path: "order.shippingInfo.logistics.shippingDestination.address.geocode.latitude"
|
|
1195
|
+
},
|
|
1196
|
+
{
|
|
1197
|
+
path: "order.shippingInfo.logistics.shippingDestination.address.geocode.longitude"
|
|
1198
|
+
},
|
|
1199
|
+
{
|
|
1200
|
+
path: "order.shippingInfo.logistics.pickupDetails.address.geocode.latitude"
|
|
1201
|
+
},
|
|
1202
|
+
{
|
|
1203
|
+
path: "order.shippingInfo.logistics.pickupDetails.address.geocode.longitude"
|
|
1204
|
+
},
|
|
1205
|
+
{ path: "order.recipientInfo.address.geocode.latitude" },
|
|
1206
|
+
{ path: "order.recipientInfo.address.geocode.longitude" }
|
|
1207
|
+
]
|
|
1208
|
+
}
|
|
1209
|
+
])
|
|
1210
|
+
};
|
|
1211
|
+
return metadata;
|
|
1212
|
+
}
|
|
1213
|
+
return __updateActivity;
|
|
1214
|
+
}
|
|
1215
|
+
function deleteActivity(payload) {
|
|
1216
|
+
function __deleteActivity({ host }) {
|
|
1217
|
+
const metadata = {
|
|
1218
|
+
entityFqdn: "wix.ecom.v1.order",
|
|
1219
|
+
method: "DELETE",
|
|
1220
|
+
methodFqn: "com.wix.ecom.orders.v1.Orders.DeleteActivity",
|
|
1221
|
+
packageName: PACKAGE_NAME,
|
|
1222
|
+
url: resolveComWixEcomOrdersV1OrdersUrl({
|
|
1223
|
+
protoPath: "/v1/orders/{id}/activities/{activityId}",
|
|
1224
|
+
data: payload,
|
|
1225
|
+
host
|
|
1226
|
+
}),
|
|
1227
|
+
params: toURLSearchParams(payload),
|
|
1228
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
1229
|
+
{
|
|
1230
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
1231
|
+
paths: [
|
|
1232
|
+
{ path: "order.createdDate" },
|
|
1233
|
+
{ path: "order.updatedDate" },
|
|
1234
|
+
{ path: "order.purchasedDate" },
|
|
1235
|
+
{ path: "order.lineItems.image.urlExpirationDate" },
|
|
1236
|
+
{ path: "order.lineItems.digitalFile.expirationDate" },
|
|
1237
|
+
{
|
|
1238
|
+
path: "order.lineItems.subscriptionInfo.subscriptionSettings.startDate"
|
|
1239
|
+
},
|
|
1240
|
+
{ path: "order.shippingInfo.logistics.deliverByDate" },
|
|
1241
|
+
{ path: "order.shippingInfo.logistics.deliveryTimeSlot.from" },
|
|
1242
|
+
{ path: "order.shippingInfo.logistics.deliveryTimeSlot.to" },
|
|
1243
|
+
{ path: "order.activities.createdDate" }
|
|
1244
|
+
]
|
|
1245
|
+
},
|
|
1246
|
+
{
|
|
1247
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
1248
|
+
paths: [
|
|
1249
|
+
{ path: "order.lineItems.image.focalPoint.x" },
|
|
1250
|
+
{ path: "order.lineItems.image.focalPoint.y" },
|
|
1251
|
+
{ path: "order.lineItems.physicalProperties.weight" },
|
|
1252
|
+
{ path: "order.billingInfo.address.geocode.latitude" },
|
|
1253
|
+
{ path: "order.billingInfo.address.geocode.longitude" },
|
|
1254
|
+
{
|
|
1255
|
+
path: "order.shippingInfo.logistics.shippingDestination.address.geocode.latitude"
|
|
1256
|
+
},
|
|
1257
|
+
{
|
|
1258
|
+
path: "order.shippingInfo.logistics.shippingDestination.address.geocode.longitude"
|
|
1259
|
+
},
|
|
1260
|
+
{
|
|
1261
|
+
path: "order.shippingInfo.logistics.pickupDetails.address.geocode.latitude"
|
|
1262
|
+
},
|
|
1263
|
+
{
|
|
1264
|
+
path: "order.shippingInfo.logistics.pickupDetails.address.geocode.longitude"
|
|
1265
|
+
},
|
|
1266
|
+
{ path: "order.recipientInfo.address.geocode.latitude" },
|
|
1267
|
+
{ path: "order.recipientInfo.address.geocode.longitude" }
|
|
1268
|
+
]
|
|
1269
|
+
}
|
|
1270
|
+
])
|
|
1271
|
+
};
|
|
1272
|
+
return metadata;
|
|
1273
|
+
}
|
|
1274
|
+
return __deleteActivity;
|
|
1275
|
+
}
|
|
1276
|
+
function cancelOrder(payload) {
|
|
1277
|
+
function __cancelOrder({ host }) {
|
|
1278
|
+
const metadata = {
|
|
1279
|
+
entityFqdn: "wix.ecom.v1.order",
|
|
1280
|
+
method: "POST",
|
|
1281
|
+
methodFqn: "com.wix.ecom.orders.v1.Orders.CancelOrder",
|
|
1282
|
+
packageName: PACKAGE_NAME,
|
|
1283
|
+
url: resolveComWixEcomOrdersV1OrdersUrl({
|
|
1284
|
+
protoPath: "/v1/orders/{id}/cancel",
|
|
1285
|
+
data: payload,
|
|
1286
|
+
host
|
|
1287
|
+
}),
|
|
1288
|
+
data: payload,
|
|
1289
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
1290
|
+
{
|
|
1291
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
1292
|
+
paths: [
|
|
1293
|
+
{ path: "order.createdDate" },
|
|
1294
|
+
{ path: "order.updatedDate" },
|
|
1295
|
+
{ path: "order.purchasedDate" },
|
|
1296
|
+
{ path: "order.lineItems.image.urlExpirationDate" },
|
|
1297
|
+
{ path: "order.lineItems.digitalFile.expirationDate" },
|
|
1298
|
+
{
|
|
1299
|
+
path: "order.lineItems.subscriptionInfo.subscriptionSettings.startDate"
|
|
1300
|
+
},
|
|
1301
|
+
{ path: "order.shippingInfo.logistics.deliverByDate" },
|
|
1302
|
+
{ path: "order.shippingInfo.logistics.deliveryTimeSlot.from" },
|
|
1303
|
+
{ path: "order.shippingInfo.logistics.deliveryTimeSlot.to" },
|
|
1304
|
+
{ path: "order.activities.createdDate" }
|
|
1305
|
+
]
|
|
1306
|
+
},
|
|
1307
|
+
{
|
|
1308
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
1309
|
+
paths: [
|
|
1310
|
+
{ path: "order.lineItems.image.focalPoint.x" },
|
|
1311
|
+
{ path: "order.lineItems.image.focalPoint.y" },
|
|
1312
|
+
{ path: "order.lineItems.physicalProperties.weight" },
|
|
1313
|
+
{ path: "order.billingInfo.address.geocode.latitude" },
|
|
1314
|
+
{ path: "order.billingInfo.address.geocode.longitude" },
|
|
1315
|
+
{
|
|
1316
|
+
path: "order.shippingInfo.logistics.shippingDestination.address.geocode.latitude"
|
|
1317
|
+
},
|
|
1318
|
+
{
|
|
1319
|
+
path: "order.shippingInfo.logistics.shippingDestination.address.geocode.longitude"
|
|
1320
|
+
},
|
|
1321
|
+
{
|
|
1322
|
+
path: "order.shippingInfo.logistics.pickupDetails.address.geocode.latitude"
|
|
1323
|
+
},
|
|
1324
|
+
{
|
|
1325
|
+
path: "order.shippingInfo.logistics.pickupDetails.address.geocode.longitude"
|
|
1326
|
+
},
|
|
1327
|
+
{ path: "order.recipientInfo.address.geocode.latitude" },
|
|
1328
|
+
{ path: "order.recipientInfo.address.geocode.longitude" }
|
|
1329
|
+
]
|
|
1330
|
+
}
|
|
1331
|
+
])
|
|
1332
|
+
};
|
|
1333
|
+
return metadata;
|
|
1334
|
+
}
|
|
1335
|
+
return __cancelOrder;
|
|
923
1336
|
}
|
|
924
1337
|
function updateOrderStatus(payload) {
|
|
925
1338
|
function __updateOrderStatus({ host }) {
|
|
@@ -1196,12 +1609,123 @@ var ChannelType = /* @__PURE__ */ ((ChannelType2) => {
|
|
|
1196
1609
|
ChannelType2["FAIRE_COM"] = "FAIRE_COM";
|
|
1197
1610
|
return ChannelType2;
|
|
1198
1611
|
})(ChannelType || {});
|
|
1199
|
-
var
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
return
|
|
1204
|
-
})(
|
|
1612
|
+
var ScheduledAction = /* @__PURE__ */ ((ScheduledAction2) => {
|
|
1613
|
+
ScheduledAction2["UNSPECIFIED"] = "UNSPECIFIED";
|
|
1614
|
+
ScheduledAction2["VOID"] = "VOID";
|
|
1615
|
+
ScheduledAction2["CAPTURE"] = "CAPTURE";
|
|
1616
|
+
return ScheduledAction2;
|
|
1617
|
+
})(ScheduledAction || {});
|
|
1618
|
+
var DurationUnit = /* @__PURE__ */ ((DurationUnit2) => {
|
|
1619
|
+
DurationUnit2["UNKNOWN_DURATION_UNIT"] = "UNKNOWN_DURATION_UNIT";
|
|
1620
|
+
DurationUnit2["MINUTES"] = "MINUTES";
|
|
1621
|
+
DurationUnit2["HOURS"] = "HOURS";
|
|
1622
|
+
DurationUnit2["DAYS"] = "DAYS";
|
|
1623
|
+
return DurationUnit2;
|
|
1624
|
+
})(DurationUnit || {});
|
|
1625
|
+
var PaymentCollectabilityStatus = /* @__PURE__ */ ((PaymentCollectabilityStatus2) => {
|
|
1626
|
+
PaymentCollectabilityStatus2["UNKNOWN"] = "UNKNOWN";
|
|
1627
|
+
PaymentCollectabilityStatus2["COLLECTABLE"] = "COLLECTABLE";
|
|
1628
|
+
PaymentCollectabilityStatus2["NONCOLLECTABLE_ORDER_IS_CANCELLED"] = "NONCOLLECTABLE_ORDER_IS_CANCELLED";
|
|
1629
|
+
PaymentCollectabilityStatus2["NONCOLLECTABLE_ORDER_IS_PAID"] = "NONCOLLECTABLE_ORDER_IS_PAID";
|
|
1630
|
+
PaymentCollectabilityStatus2["NONCOLLECTABLE_MISSING_PAYMENT_METHOD"] = "NONCOLLECTABLE_MISSING_PAYMENT_METHOD";
|
|
1631
|
+
PaymentCollectabilityStatus2["NONCOLLECTABLE_ORDER_IS_PENDING"] = "NONCOLLECTABLE_ORDER_IS_PENDING";
|
|
1632
|
+
PaymentCollectabilityStatus2["NONCOLLECTABLE_ORDER_IS_REJECTED"] = "NONCOLLECTABLE_ORDER_IS_REJECTED";
|
|
1633
|
+
PaymentCollectabilityStatus2["NONCOLLECTABLE_ORDER_HAS_SUBSCRIPTIONS"] = "NONCOLLECTABLE_ORDER_HAS_SUBSCRIPTIONS";
|
|
1634
|
+
return PaymentCollectabilityStatus2;
|
|
1635
|
+
})(PaymentCollectabilityStatus || {});
|
|
1636
|
+
var RefundableStatus = /* @__PURE__ */ ((RefundableStatus2) => {
|
|
1637
|
+
RefundableStatus2["NOT_REFUNDABLE"] = "NOT_REFUNDABLE";
|
|
1638
|
+
RefundableStatus2["MANUAL"] = "MANUAL";
|
|
1639
|
+
RefundableStatus2["REFUNDABLE"] = "REFUNDABLE";
|
|
1640
|
+
return RefundableStatus2;
|
|
1641
|
+
})(RefundableStatus || {});
|
|
1642
|
+
var NonRefundableReason = /* @__PURE__ */ ((NonRefundableReason2) => {
|
|
1643
|
+
NonRefundableReason2["NONE"] = "NONE";
|
|
1644
|
+
NonRefundableReason2["ALREADY_REFUNDED"] = "ALREADY_REFUNDED";
|
|
1645
|
+
NonRefundableReason2["PROVIDER_IS_DOWN"] = "PROVIDER_IS_DOWN";
|
|
1646
|
+
NonRefundableReason2["INTERNAL_ERROR"] = "INTERNAL_ERROR";
|
|
1647
|
+
NonRefundableReason2["NOT_PAID"] = "NOT_PAID";
|
|
1648
|
+
NonRefundableReason2["ACCESS_DENIED"] = "ACCESS_DENIED";
|
|
1649
|
+
NonRefundableReason2["ZERO_PRICE"] = "ZERO_PRICE";
|
|
1650
|
+
NonRefundableReason2["DISABLED_BY_PROVIDER"] = "DISABLED_BY_PROVIDER";
|
|
1651
|
+
NonRefundableReason2["PENDING_REFUND"] = "PENDING_REFUND";
|
|
1652
|
+
NonRefundableReason2["FORBIDDEN"] = "FORBIDDEN";
|
|
1653
|
+
NonRefundableReason2["TRANSACTION_NOT_FOUND"] = "TRANSACTION_NOT_FOUND";
|
|
1654
|
+
NonRefundableReason2["ORDER_IS_PENDING"] = "ORDER_IS_PENDING";
|
|
1655
|
+
NonRefundableReason2["ORDER_IS_REJECTED"] = "ORDER_IS_REJECTED";
|
|
1656
|
+
return NonRefundableReason2;
|
|
1657
|
+
})(NonRefundableReason || {});
|
|
1658
|
+
var ManuallyRefundableReason = /* @__PURE__ */ ((ManuallyRefundableReason2) => {
|
|
1659
|
+
ManuallyRefundableReason2["EXPIRED"] = "EXPIRED";
|
|
1660
|
+
ManuallyRefundableReason2["NOT_SUPPORTED"] = "NOT_SUPPORTED";
|
|
1661
|
+
ManuallyRefundableReason2["OFFLINE"] = "OFFLINE";
|
|
1662
|
+
ManuallyRefundableReason2["REQUIRES_CARD_READER"] = "REQUIRES_CARD_READER";
|
|
1663
|
+
return ManuallyRefundableReason2;
|
|
1664
|
+
})(ManuallyRefundableReason || {});
|
|
1665
|
+
var RestockType = /* @__PURE__ */ ((RestockType2) => {
|
|
1666
|
+
RestockType2["NO_ITEMS"] = "NO_ITEMS";
|
|
1667
|
+
RestockType2["ALL_ITEMS"] = "ALL_ITEMS";
|
|
1668
|
+
RestockType2["SOME_ITEMS"] = "SOME_ITEMS";
|
|
1669
|
+
return RestockType2;
|
|
1670
|
+
})(RestockType || {});
|
|
1671
|
+
var TransactionStatus = /* @__PURE__ */ ((TransactionStatus2) => {
|
|
1672
|
+
TransactionStatus2["UNDEFINED"] = "UNDEFINED";
|
|
1673
|
+
TransactionStatus2["APPROVED"] = "APPROVED";
|
|
1674
|
+
TransactionStatus2["PENDING"] = "PENDING";
|
|
1675
|
+
TransactionStatus2["PENDING_MERCHANT"] = "PENDING_MERCHANT";
|
|
1676
|
+
TransactionStatus2["CANCELED"] = "CANCELED";
|
|
1677
|
+
TransactionStatus2["DECLINED"] = "DECLINED";
|
|
1678
|
+
TransactionStatus2["REFUNDED"] = "REFUNDED";
|
|
1679
|
+
TransactionStatus2["PARTIALLY_REFUNDED"] = "PARTIALLY_REFUNDED";
|
|
1680
|
+
TransactionStatus2["AUTHORIZED"] = "AUTHORIZED";
|
|
1681
|
+
TransactionStatus2["VOIDED"] = "VOIDED";
|
|
1682
|
+
return TransactionStatus2;
|
|
1683
|
+
})(TransactionStatus || {});
|
|
1684
|
+
var AuthorizationCaptureStatus = /* @__PURE__ */ ((AuthorizationCaptureStatus2) => {
|
|
1685
|
+
AuthorizationCaptureStatus2["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
|
|
1686
|
+
AuthorizationCaptureStatus2["PENDING"] = "PENDING";
|
|
1687
|
+
AuthorizationCaptureStatus2["SUCCEEDED"] = "SUCCEEDED";
|
|
1688
|
+
AuthorizationCaptureStatus2["FAILED"] = "FAILED";
|
|
1689
|
+
return AuthorizationCaptureStatus2;
|
|
1690
|
+
})(AuthorizationCaptureStatus || {});
|
|
1691
|
+
var AuthorizationVoidStatus = /* @__PURE__ */ ((AuthorizationVoidStatus2) => {
|
|
1692
|
+
AuthorizationVoidStatus2["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
|
|
1693
|
+
AuthorizationVoidStatus2["PENDING"] = "PENDING";
|
|
1694
|
+
AuthorizationVoidStatus2["SUCCEEDED"] = "SUCCEEDED";
|
|
1695
|
+
AuthorizationVoidStatus2["FAILED"] = "FAILED";
|
|
1696
|
+
return AuthorizationVoidStatus2;
|
|
1697
|
+
})(AuthorizationVoidStatus || {});
|
|
1698
|
+
var Reason = /* @__PURE__ */ ((Reason2) => {
|
|
1699
|
+
Reason2["UNKNOWN_REASON"] = "UNKNOWN_REASON";
|
|
1700
|
+
Reason2["MANUAL"] = "MANUAL";
|
|
1701
|
+
Reason2["SCHEDULED"] = "SCHEDULED";
|
|
1702
|
+
return Reason2;
|
|
1703
|
+
})(Reason || {});
|
|
1704
|
+
var ActionType = /* @__PURE__ */ ((ActionType2) => {
|
|
1705
|
+
ActionType2["UNKNOWN_ACTION_TYPE"] = "UNKNOWN_ACTION_TYPE";
|
|
1706
|
+
ActionType2["VOID"] = "VOID";
|
|
1707
|
+
ActionType2["CAPTURE"] = "CAPTURE";
|
|
1708
|
+
return ActionType2;
|
|
1709
|
+
})(ActionType || {});
|
|
1710
|
+
var ChargebackStatus = /* @__PURE__ */ ((ChargebackStatus2) => {
|
|
1711
|
+
ChargebackStatus2["UNSPECIFIED"] = "UNSPECIFIED";
|
|
1712
|
+
ChargebackStatus2["APPROVED"] = "APPROVED";
|
|
1713
|
+
ChargebackStatus2["REVERSED"] = "REVERSED";
|
|
1714
|
+
return ChargebackStatus2;
|
|
1715
|
+
})(ChargebackStatus || {});
|
|
1716
|
+
var MembershipPaymentStatus = /* @__PURE__ */ ((MembershipPaymentStatus2) => {
|
|
1717
|
+
MembershipPaymentStatus2["CHARGED"] = "CHARGED";
|
|
1718
|
+
MembershipPaymentStatus2["CHARGE_FAILED"] = "CHARGE_FAILED";
|
|
1719
|
+
return MembershipPaymentStatus2;
|
|
1720
|
+
})(MembershipPaymentStatus || {});
|
|
1721
|
+
var RefundStatus = /* @__PURE__ */ ((RefundStatus2) => {
|
|
1722
|
+
RefundStatus2["PENDING"] = "PENDING";
|
|
1723
|
+
RefundStatus2["SUCCEEDED"] = "SUCCEEDED";
|
|
1724
|
+
RefundStatus2["FAILED"] = "FAILED";
|
|
1725
|
+
RefundStatus2["SCHEDULED"] = "SCHEDULED";
|
|
1726
|
+
RefundStatus2["STARTED"] = "STARTED";
|
|
1727
|
+
return RefundStatus2;
|
|
1728
|
+
})(RefundStatus || {});
|
|
1205
1729
|
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
1206
1730
|
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
1207
1731
|
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
@@ -1210,6 +1734,12 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
1210
1734
|
WebhookIdentityType2["APP"] = "APP";
|
|
1211
1735
|
return WebhookIdentityType2;
|
|
1212
1736
|
})(WebhookIdentityType || {});
|
|
1737
|
+
var VersioningMode = /* @__PURE__ */ ((VersioningMode2) => {
|
|
1738
|
+
VersioningMode2["DEFAULT"] = "DEFAULT";
|
|
1739
|
+
VersioningMode2["GREATER_THAN"] = "GREATER_THAN";
|
|
1740
|
+
VersioningMode2["GREATER_OR_EQUAL"] = "GREATER_OR_EQUAL";
|
|
1741
|
+
return VersioningMode2;
|
|
1742
|
+
})(VersioningMode || {});
|
|
1213
1743
|
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
1214
1744
|
SortOrder2["ASC"] = "ASC";
|
|
1215
1745
|
SortOrder2["DESC"] = "DESC";
|
|
@@ -1292,6 +1822,351 @@ var InvoiceStatus = /* @__PURE__ */ ((InvoiceStatus2) => {
|
|
|
1292
1822
|
InvoiceStatus2["PartialAndOverdue"] = "PartialAndOverdue";
|
|
1293
1823
|
return InvoiceStatus2;
|
|
1294
1824
|
})(InvoiceStatus || {});
|
|
1825
|
+
async function preparePaymentCollection2(ecomOrderId, amount, options) {
|
|
1826
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
1827
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1828
|
+
ecomOrderId,
|
|
1829
|
+
amount,
|
|
1830
|
+
paymentGatewayOrderId: options?.paymentGatewayOrderId,
|
|
1831
|
+
delayedCapture: options?.delayedCapture,
|
|
1832
|
+
delayedCaptureSettings: options?.delayedCaptureSettings
|
|
1833
|
+
});
|
|
1834
|
+
const reqOpts = preparePaymentCollection(payload);
|
|
1835
|
+
sideEffects?.onSiteCall?.();
|
|
1836
|
+
try {
|
|
1837
|
+
const result = await httpClient.request(reqOpts);
|
|
1838
|
+
sideEffects?.onSuccess?.(result);
|
|
1839
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1840
|
+
} catch (err) {
|
|
1841
|
+
const transformedError = sdkTransformError(
|
|
1842
|
+
err,
|
|
1843
|
+
{
|
|
1844
|
+
spreadPathsToArguments: {},
|
|
1845
|
+
explicitPathsToArguments: {
|
|
1846
|
+
ecomOrderId: "$[0]",
|
|
1847
|
+
amount: "$[1]",
|
|
1848
|
+
paymentGatewayOrderId: "$[2].paymentGatewayOrderId",
|
|
1849
|
+
delayedCapture: "$[2].delayedCapture",
|
|
1850
|
+
delayedCaptureSettings: "$[2].delayedCaptureSettings"
|
|
1851
|
+
},
|
|
1852
|
+
singleArgumentUnchanged: false
|
|
1853
|
+
},
|
|
1854
|
+
["ecomOrderId", "amount", "options"]
|
|
1855
|
+
);
|
|
1856
|
+
sideEffects?.onError?.(err);
|
|
1857
|
+
throw transformedError;
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1860
|
+
async function getPaymentCollectabilityStatus2(ecomOrderId) {
|
|
1861
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1862
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1863
|
+
ecomOrderId
|
|
1864
|
+
});
|
|
1865
|
+
const reqOpts = getPaymentCollectabilityStatus(payload);
|
|
1866
|
+
sideEffects?.onSiteCall?.();
|
|
1867
|
+
try {
|
|
1868
|
+
const result = await httpClient.request(reqOpts);
|
|
1869
|
+
sideEffects?.onSuccess?.(result);
|
|
1870
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1871
|
+
} catch (err) {
|
|
1872
|
+
const transformedError = sdkTransformError(
|
|
1873
|
+
err,
|
|
1874
|
+
{
|
|
1875
|
+
spreadPathsToArguments: {},
|
|
1876
|
+
explicitPathsToArguments: { ecomOrderId: "$[0]" },
|
|
1877
|
+
singleArgumentUnchanged: false
|
|
1878
|
+
},
|
|
1879
|
+
["ecomOrderId"]
|
|
1880
|
+
);
|
|
1881
|
+
sideEffects?.onError?.(err);
|
|
1882
|
+
throw transformedError;
|
|
1883
|
+
}
|
|
1884
|
+
}
|
|
1885
|
+
async function recordManuallyCollectedPayment2(orderId, amount) {
|
|
1886
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1887
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1888
|
+
orderId,
|
|
1889
|
+
amount
|
|
1890
|
+
});
|
|
1891
|
+
const reqOpts = recordManuallyCollectedPayment(payload);
|
|
1892
|
+
sideEffects?.onSiteCall?.();
|
|
1893
|
+
try {
|
|
1894
|
+
const result = await httpClient.request(reqOpts);
|
|
1895
|
+
sideEffects?.onSuccess?.(result);
|
|
1896
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1897
|
+
} catch (err) {
|
|
1898
|
+
const transformedError = sdkTransformError(
|
|
1899
|
+
err,
|
|
1900
|
+
{
|
|
1901
|
+
spreadPathsToArguments: {},
|
|
1902
|
+
explicitPathsToArguments: { orderId: "$[0]", amount: "$[1]" },
|
|
1903
|
+
singleArgumentUnchanged: false
|
|
1904
|
+
},
|
|
1905
|
+
["orderId", "amount"]
|
|
1906
|
+
);
|
|
1907
|
+
sideEffects?.onError?.(err);
|
|
1908
|
+
throw transformedError;
|
|
1909
|
+
}
|
|
1910
|
+
}
|
|
1911
|
+
async function paymentCollectionMarkOrderAsPaid2(ecomOrderId) {
|
|
1912
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1913
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1914
|
+
ecomOrderId
|
|
1915
|
+
});
|
|
1916
|
+
const reqOpts = paymentCollectionMarkOrderAsPaid(payload);
|
|
1917
|
+
sideEffects?.onSiteCall?.();
|
|
1918
|
+
try {
|
|
1919
|
+
const result = await httpClient.request(reqOpts);
|
|
1920
|
+
sideEffects?.onSuccess?.(result);
|
|
1921
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
1922
|
+
transformPaths2(result.data, [
|
|
1923
|
+
{
|
|
1924
|
+
transformFn: transformRESTImageToSDKImage,
|
|
1925
|
+
paths: [{ path: "order.lineItems.image" }]
|
|
1926
|
+
},
|
|
1927
|
+
{
|
|
1928
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
1929
|
+
paths: [
|
|
1930
|
+
{ path: "order.billingInfo.address" },
|
|
1931
|
+
{
|
|
1932
|
+
path: "order.shippingInfo.logistics.shippingDestination.address"
|
|
1933
|
+
},
|
|
1934
|
+
{ path: "order.shippingInfo.logistics.pickupDetails.address" },
|
|
1935
|
+
{ path: "order.recipientInfo.address" }
|
|
1936
|
+
]
|
|
1937
|
+
}
|
|
1938
|
+
])
|
|
1939
|
+
);
|
|
1940
|
+
} catch (err) {
|
|
1941
|
+
const transformedError = sdkTransformError(
|
|
1942
|
+
err,
|
|
1943
|
+
{
|
|
1944
|
+
spreadPathsToArguments: {},
|
|
1945
|
+
explicitPathsToArguments: { ecomOrderId: "$[0]" },
|
|
1946
|
+
singleArgumentUnchanged: false
|
|
1947
|
+
},
|
|
1948
|
+
["ecomOrderId"]
|
|
1949
|
+
);
|
|
1950
|
+
sideEffects?.onError?.(err);
|
|
1951
|
+
throw transformedError;
|
|
1952
|
+
}
|
|
1953
|
+
}
|
|
1954
|
+
async function paymentCollectionBulkMarkOrdersAsPaid2(ecomOrderIds) {
|
|
1955
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1956
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1957
|
+
ecomOrderIds
|
|
1958
|
+
});
|
|
1959
|
+
const reqOpts = paymentCollectionBulkMarkOrdersAsPaid(payload);
|
|
1960
|
+
sideEffects?.onSiteCall?.();
|
|
1961
|
+
try {
|
|
1962
|
+
const result = await httpClient.request(reqOpts);
|
|
1963
|
+
sideEffects?.onSuccess?.(result);
|
|
1964
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
1965
|
+
transformPaths2(result.data, [
|
|
1966
|
+
{
|
|
1967
|
+
transformFn: transformRESTImageToSDKImage,
|
|
1968
|
+
paths: [{ path: "results.item.lineItems.image" }]
|
|
1969
|
+
},
|
|
1970
|
+
{
|
|
1971
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
1972
|
+
paths: [
|
|
1973
|
+
{ path: "results.item.billingInfo.address" },
|
|
1974
|
+
{
|
|
1975
|
+
path: "results.item.shippingInfo.logistics.shippingDestination.address"
|
|
1976
|
+
},
|
|
1977
|
+
{
|
|
1978
|
+
path: "results.item.shippingInfo.logistics.pickupDetails.address"
|
|
1979
|
+
},
|
|
1980
|
+
{ path: "results.item.recipientInfo.address" }
|
|
1981
|
+
]
|
|
1982
|
+
}
|
|
1983
|
+
])
|
|
1984
|
+
);
|
|
1985
|
+
} catch (err) {
|
|
1986
|
+
const transformedError = sdkTransformError(
|
|
1987
|
+
err,
|
|
1988
|
+
{
|
|
1989
|
+
spreadPathsToArguments: {},
|
|
1990
|
+
explicitPathsToArguments: { ecomOrderIds: "$[0]" },
|
|
1991
|
+
singleArgumentUnchanged: false
|
|
1992
|
+
},
|
|
1993
|
+
["ecomOrderIds"]
|
|
1994
|
+
);
|
|
1995
|
+
sideEffects?.onError?.(err);
|
|
1996
|
+
throw transformedError;
|
|
1997
|
+
}
|
|
1998
|
+
}
|
|
1999
|
+
async function getRefundabilityStatus2(ecomOrderId) {
|
|
2000
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
2001
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2002
|
+
ecomOrderId
|
|
2003
|
+
});
|
|
2004
|
+
const reqOpts = getRefundabilityStatus(payload);
|
|
2005
|
+
sideEffects?.onSiteCall?.();
|
|
2006
|
+
try {
|
|
2007
|
+
const result = await httpClient.request(reqOpts);
|
|
2008
|
+
sideEffects?.onSuccess?.(result);
|
|
2009
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
2010
|
+
} catch (err) {
|
|
2011
|
+
const transformedError = sdkTransformError(
|
|
2012
|
+
err,
|
|
2013
|
+
{
|
|
2014
|
+
spreadPathsToArguments: {},
|
|
2015
|
+
explicitPathsToArguments: { ecomOrderId: "$[0]" },
|
|
2016
|
+
singleArgumentUnchanged: false
|
|
2017
|
+
},
|
|
2018
|
+
["ecomOrderId"]
|
|
2019
|
+
);
|
|
2020
|
+
sideEffects?.onError?.(err);
|
|
2021
|
+
throw transformedError;
|
|
2022
|
+
}
|
|
2023
|
+
}
|
|
2024
|
+
async function paymentCollectionCreatePaymentGatewayOrder2(ecomOrderId, options) {
|
|
2025
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2026
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2027
|
+
ecomOrderId,
|
|
2028
|
+
chargedBy: options?.chargedBy
|
|
2029
|
+
});
|
|
2030
|
+
const reqOpts = paymentCollectionCreatePaymentGatewayOrder(
|
|
2031
|
+
payload
|
|
2032
|
+
);
|
|
2033
|
+
sideEffects?.onSiteCall?.();
|
|
2034
|
+
try {
|
|
2035
|
+
const result = await httpClient.request(reqOpts);
|
|
2036
|
+
sideEffects?.onSuccess?.(result);
|
|
2037
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
2038
|
+
} catch (err) {
|
|
2039
|
+
const transformedError = sdkTransformError(
|
|
2040
|
+
err,
|
|
2041
|
+
{
|
|
2042
|
+
spreadPathsToArguments: {},
|
|
2043
|
+
explicitPathsToArguments: {
|
|
2044
|
+
ecomOrderId: "$[0]",
|
|
2045
|
+
chargedBy: "$[1].chargedBy"
|
|
2046
|
+
},
|
|
2047
|
+
singleArgumentUnchanged: false
|
|
2048
|
+
},
|
|
2049
|
+
["ecomOrderId", "options"]
|
|
2050
|
+
);
|
|
2051
|
+
sideEffects?.onError?.(err);
|
|
2052
|
+
throw transformedError;
|
|
2053
|
+
}
|
|
2054
|
+
}
|
|
2055
|
+
async function chargeMemberships2(ecomOrderId, memberId, options) {
|
|
2056
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
2057
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2058
|
+
ecomOrderId,
|
|
2059
|
+
memberId,
|
|
2060
|
+
membershipCharges: options?.membershipCharges
|
|
2061
|
+
});
|
|
2062
|
+
const reqOpts = chargeMemberships(payload);
|
|
2063
|
+
sideEffects?.onSiteCall?.();
|
|
2064
|
+
try {
|
|
2065
|
+
const result = await httpClient.request(reqOpts);
|
|
2066
|
+
sideEffects?.onSuccess?.(result);
|
|
2067
|
+
} catch (err) {
|
|
2068
|
+
const transformedError = sdkTransformError(
|
|
2069
|
+
err,
|
|
2070
|
+
{
|
|
2071
|
+
spreadPathsToArguments: {},
|
|
2072
|
+
explicitPathsToArguments: {
|
|
2073
|
+
ecomOrderId: "$[0]",
|
|
2074
|
+
memberId: "$[1]",
|
|
2075
|
+
membershipCharges: "$[2].membershipCharges"
|
|
2076
|
+
},
|
|
2077
|
+
singleArgumentUnchanged: false
|
|
2078
|
+
},
|
|
2079
|
+
["ecomOrderId", "memberId", "options"]
|
|
2080
|
+
);
|
|
2081
|
+
sideEffects?.onError?.(err);
|
|
2082
|
+
throw transformedError;
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
async function triggerRefund2(ecomOrderId, payments, options) {
|
|
2086
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
2087
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2088
|
+
ecomOrderId,
|
|
2089
|
+
payments,
|
|
2090
|
+
details: options?.details,
|
|
2091
|
+
sideEffects: options?.sideEffects
|
|
2092
|
+
});
|
|
2093
|
+
const reqOpts = triggerRefund(payload);
|
|
2094
|
+
sideEffects?.onSiteCall?.();
|
|
2095
|
+
try {
|
|
2096
|
+
const result = await httpClient.request(reqOpts);
|
|
2097
|
+
sideEffects?.onSuccess?.(result);
|
|
2098
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
2099
|
+
} catch (err) {
|
|
2100
|
+
const transformedError = sdkTransformError(
|
|
2101
|
+
err,
|
|
2102
|
+
{
|
|
2103
|
+
spreadPathsToArguments: {},
|
|
2104
|
+
explicitPathsToArguments: {
|
|
2105
|
+
ecomOrderId: "$[0]",
|
|
2106
|
+
payments: "$[1]",
|
|
2107
|
+
details: "$[2].details",
|
|
2108
|
+
sideEffects: "$[2].sideEffects"
|
|
2109
|
+
},
|
|
2110
|
+
singleArgumentUnchanged: false
|
|
2111
|
+
},
|
|
2112
|
+
["ecomOrderId", "payments", "options"]
|
|
2113
|
+
);
|
|
2114
|
+
sideEffects?.onError?.(err);
|
|
2115
|
+
throw transformedError;
|
|
2116
|
+
}
|
|
2117
|
+
}
|
|
2118
|
+
async function voidAuthorizedPayments2(ecomOrderId, paymentIds) {
|
|
2119
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2120
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2121
|
+
ecomOrderId,
|
|
2122
|
+
paymentIds
|
|
2123
|
+
});
|
|
2124
|
+
const reqOpts = voidAuthorizedPayments(payload);
|
|
2125
|
+
sideEffects?.onSiteCall?.();
|
|
2126
|
+
try {
|
|
2127
|
+
const result = await httpClient.request(reqOpts);
|
|
2128
|
+
sideEffects?.onSuccess?.(result);
|
|
2129
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
2130
|
+
} catch (err) {
|
|
2131
|
+
const transformedError = sdkTransformError(
|
|
2132
|
+
err,
|
|
2133
|
+
{
|
|
2134
|
+
spreadPathsToArguments: {},
|
|
2135
|
+
explicitPathsToArguments: { ecomOrderId: "$[0]", paymentIds: "$[1]" },
|
|
2136
|
+
singleArgumentUnchanged: false
|
|
2137
|
+
},
|
|
2138
|
+
["ecomOrderId", "paymentIds"]
|
|
2139
|
+
);
|
|
2140
|
+
sideEffects?.onError?.(err);
|
|
2141
|
+
throw transformedError;
|
|
2142
|
+
}
|
|
2143
|
+
}
|
|
2144
|
+
async function captureAuthorizedPayments2(ecomOrderId, payments) {
|
|
2145
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2146
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2147
|
+
ecomOrderId,
|
|
2148
|
+
payments
|
|
2149
|
+
});
|
|
2150
|
+
const reqOpts = captureAuthorizedPayments(payload);
|
|
2151
|
+
sideEffects?.onSiteCall?.();
|
|
2152
|
+
try {
|
|
2153
|
+
const result = await httpClient.request(reqOpts);
|
|
2154
|
+
sideEffects?.onSuccess?.(result);
|
|
2155
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
2156
|
+
} catch (err) {
|
|
2157
|
+
const transformedError = sdkTransformError(
|
|
2158
|
+
err,
|
|
2159
|
+
{
|
|
2160
|
+
spreadPathsToArguments: {},
|
|
2161
|
+
explicitPathsToArguments: { ecomOrderId: "$[0]", payments: "$[1]" },
|
|
2162
|
+
singleArgumentUnchanged: false
|
|
2163
|
+
},
|
|
2164
|
+
["ecomOrderId", "payments"]
|
|
2165
|
+
);
|
|
2166
|
+
sideEffects?.onError?.(err);
|
|
2167
|
+
throw transformedError;
|
|
2168
|
+
}
|
|
2169
|
+
}
|
|
1295
2170
|
async function getOrder2(_id) {
|
|
1296
2171
|
const { httpClient, sideEffects } = arguments[1];
|
|
1297
2172
|
const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
|
|
@@ -1988,33 +2863,48 @@ async function bulkUpdateOrderTags2(orderIds, options) {
|
|
|
1988
2863
|
}
|
|
1989
2864
|
}
|
|
1990
2865
|
export {
|
|
2866
|
+
ActionType,
|
|
1991
2867
|
ActivityType,
|
|
1992
2868
|
AdjustmentType,
|
|
1993
2869
|
AttributionSource,
|
|
2870
|
+
AuthorizationCaptureStatus,
|
|
2871
|
+
AuthorizationVoidStatus,
|
|
1994
2872
|
ChannelType,
|
|
2873
|
+
ChargebackStatus,
|
|
1995
2874
|
CustomFieldGroup,
|
|
1996
2875
|
DeltaPaymentOptionType,
|
|
1997
2876
|
DepositType,
|
|
1998
2877
|
DescriptionLineType,
|
|
1999
2878
|
DiscountReason,
|
|
2000
2879
|
DiscountType,
|
|
2880
|
+
DurationUnit,
|
|
2001
2881
|
FulfillmentStatus,
|
|
2002
2882
|
InventoryAction,
|
|
2003
2883
|
InvoiceStatus,
|
|
2004
2884
|
ItemTypeItemType,
|
|
2005
2885
|
JurisdictionType,
|
|
2006
2886
|
LineItemQuantityChangeType,
|
|
2887
|
+
ManuallyRefundableReason,
|
|
2888
|
+
MembershipPaymentStatus,
|
|
2889
|
+
NonRefundableReason,
|
|
2007
2890
|
OrderApprovalStrategy,
|
|
2008
2891
|
OrderStatus,
|
|
2892
|
+
PaymentCollectabilityStatus,
|
|
2009
2893
|
PaymentOptionType,
|
|
2010
2894
|
PaymentStatus,
|
|
2011
2895
|
PickupMethod,
|
|
2012
2896
|
Placement,
|
|
2897
|
+
Reason,
|
|
2898
|
+
RefundStatus,
|
|
2899
|
+
RefundableStatus,
|
|
2900
|
+
RestockType,
|
|
2901
|
+
ScheduledAction,
|
|
2013
2902
|
SortOrder,
|
|
2014
2903
|
SourceType,
|
|
2015
2904
|
SubdivisionType,
|
|
2016
2905
|
SubscriptionFrequency,
|
|
2017
2906
|
TaxableAddressType,
|
|
2907
|
+
TransactionStatus,
|
|
2018
2908
|
ValueType,
|
|
2019
2909
|
VatType,
|
|
2020
2910
|
VersioningMode,
|
|
@@ -2025,14 +2915,25 @@ export {
|
|
|
2025
2915
|
bulkUpdateOrderTags2 as bulkUpdateOrderTags,
|
|
2026
2916
|
bulkUpdateOrders2 as bulkUpdateOrders,
|
|
2027
2917
|
cancelOrder2 as cancelOrder,
|
|
2918
|
+
captureAuthorizedPayments2 as captureAuthorizedPayments,
|
|
2919
|
+
chargeMemberships2 as chargeMemberships,
|
|
2028
2920
|
commitDeltas2 as commitDeltas,
|
|
2029
2921
|
createOrder2 as createOrder,
|
|
2030
2922
|
deleteActivity2 as deleteActivity,
|
|
2031
2923
|
getOrder2 as getOrder,
|
|
2924
|
+
getPaymentCollectabilityStatus2 as getPaymentCollectabilityStatus,
|
|
2925
|
+
getRefundabilityStatus2 as getRefundabilityStatus,
|
|
2926
|
+
paymentCollectionBulkMarkOrdersAsPaid2 as paymentCollectionBulkMarkOrdersAsPaid,
|
|
2927
|
+
paymentCollectionCreatePaymentGatewayOrder2 as paymentCollectionCreatePaymentGatewayOrder,
|
|
2928
|
+
paymentCollectionMarkOrderAsPaid2 as paymentCollectionMarkOrderAsPaid,
|
|
2929
|
+
preparePaymentCollection2 as preparePaymentCollection,
|
|
2930
|
+
recordManuallyCollectedPayment2 as recordManuallyCollectedPayment,
|
|
2032
2931
|
searchOrders2 as searchOrders,
|
|
2932
|
+
triggerRefund2 as triggerRefund,
|
|
2033
2933
|
updateActivity2 as updateActivity,
|
|
2034
2934
|
updateOrder2 as updateOrder,
|
|
2035
2935
|
updateOrderLineItem2 as updateOrderLineItem,
|
|
2036
|
-
updateOrderStatus2 as updateOrderStatus
|
|
2936
|
+
updateOrderStatus2 as updateOrderStatus,
|
|
2937
|
+
voidAuthorizedPayments2 as voidAuthorizedPayments
|
|
2037
2938
|
};
|
|
2038
2939
|
//# sourceMappingURL=index.typings.mjs.map
|