@wix/auto_sdk_ecom_orders 1.0.69 → 1.0.70
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-BAE6DVkA.d.ts → cjs/ecom-v1-order-orders.universal-C73TYoI7.d.ts} +1857 -885
- package/build/cjs/index.d.ts +59 -6
- package/build/cjs/index.js +1118 -56
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +2 -2
- package/build/cjs/index.typings.js +1295 -333
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +1006 -38
- package/build/cjs/meta.js +665 -3
- package/build/cjs/meta.js.map +1 -1
- package/build/{internal/es/ecom-v1-order-orders.universal-BAE6DVkA.d.mts → es/ecom-v1-order-orders.universal-C73TYoI7.d.mts} +1857 -885
- package/build/es/index.d.mts +59 -6
- package/build/es/index.mjs +1090 -55
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +2 -2
- package/build/es/index.typings.mjs +1267 -332
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +1006 -38
- package/build/es/meta.mjs +653 -2
- package/build/es/meta.mjs.map +1 -1
- package/build/{cjs/ecom-v1-order-orders.universal-Br3Nippn.d.ts → internal/cjs/ecom-v1-order-orders.universal-KCtJReRk.d.ts} +2528 -365
- package/build/internal/cjs/index.d.ts +165 -6
- package/build/internal/cjs/index.js +1118 -56
- 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 +1295 -333
- 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 +665 -3
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/{es/ecom-v1-order-orders.universal-Br3Nippn.d.mts → internal/es/ecom-v1-order-orders.universal-KCtJReRk.d.mts} +2528 -365
- package/build/internal/es/index.d.mts +165 -6
- package/build/internal/es/index.mjs +1090 -55
- 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 +1267 -332
- 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 +653 -2
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -15,23 +15,139 @@ import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transform
|
|
|
15
15
|
import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
16
16
|
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
17
17
|
function resolveComWixEcomOrdersV1OrdersUrl(opts) {
|
|
18
|
-
const domainToMappings = {
|
|
18
|
+
const domainToMappings = {
|
|
19
|
+
_: [
|
|
20
|
+
{
|
|
21
|
+
srcPath: "/_api/ecom-orders",
|
|
22
|
+
destPath: ""
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
srcPath: "/_api/orders",
|
|
26
|
+
destPath: ""
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"manage._base_domain_": [
|
|
30
|
+
{
|
|
31
|
+
srcPath: "/_api/ecom-orders",
|
|
32
|
+
destPath: ""
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"www.wixapis.com": [
|
|
36
|
+
{
|
|
37
|
+
srcPath: "/ecom/v1/bulk/orders",
|
|
38
|
+
destPath: "/v1/bulk/orders"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
srcPath: "/ecom/v1/orders",
|
|
42
|
+
destPath: "/v1/orders"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
};
|
|
46
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
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
|
+
};
|
|
19
81
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
20
82
|
}
|
|
21
83
|
var PACKAGE_NAME = "@wix/auto_sdk_ecom_orders";
|
|
22
|
-
function
|
|
23
|
-
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 }) {
|
|
24
104
|
const metadata = {
|
|
25
105
|
entityFqdn: "wix.ecom.v1.order",
|
|
26
106
|
method: "GET",
|
|
27
|
-
methodFqn: "com.wix.ecom.orders.v1.
|
|
107
|
+
methodFqn: "com.wix.ecom.orders.payments_collector.v1.PaymentsCollector.GetPaymentCollectabilityStatus",
|
|
28
108
|
packageName: PACKAGE_NAME,
|
|
29
|
-
url:
|
|
30
|
-
protoPath: "/v1/orders/{
|
|
109
|
+
url: resolveComWixEcomOrdersPaymentsCollectorV1PaymentsCollectorUrl({
|
|
110
|
+
protoPath: "/v1/payments-collector/orders/{ecomOrderId}/payment-collectability-status",
|
|
31
111
|
data: payload,
|
|
32
112
|
host
|
|
33
113
|
}),
|
|
34
|
-
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,
|
|
35
151
|
transformResponse: (payload2) => transformPaths(payload2, [
|
|
36
152
|
{
|
|
37
153
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
@@ -78,17 +194,17 @@ function getOrder(payload) {
|
|
|
78
194
|
};
|
|
79
195
|
return metadata;
|
|
80
196
|
}
|
|
81
|
-
return
|
|
197
|
+
return __paymentCollectionMarkOrderAsPaid;
|
|
82
198
|
}
|
|
83
|
-
function
|
|
84
|
-
function
|
|
199
|
+
function paymentCollectionBulkMarkOrdersAsPaid(payload) {
|
|
200
|
+
function __paymentCollectionBulkMarkOrdersAsPaid({ host }) {
|
|
85
201
|
const metadata = {
|
|
86
202
|
entityFqdn: "wix.ecom.v1.order",
|
|
87
203
|
method: "POST",
|
|
88
|
-
methodFqn: "com.wix.ecom.orders.v1.
|
|
204
|
+
methodFqn: "com.wix.ecom.orders.payments_collector.v1.PaymentsCollector.BulkMarkOrdersAsPaid",
|
|
89
205
|
packageName: PACKAGE_NAME,
|
|
90
|
-
url:
|
|
91
|
-
protoPath: "/v1/
|
|
206
|
+
url: resolveComWixEcomOrdersPaymentsCollectorV1PaymentsCollectorUrl({
|
|
207
|
+
protoPath: "/v1/bulk/payments-collector/mark-as-paid",
|
|
92
208
|
data: payload,
|
|
93
209
|
host
|
|
94
210
|
}),
|
|
@@ -97,214 +213,265 @@ function searchOrders(payload) {
|
|
|
97
213
|
{
|
|
98
214
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
99
215
|
paths: [
|
|
100
|
-
{ path: "
|
|
101
|
-
{ path: "
|
|
102
|
-
{ path: "
|
|
103
|
-
{ path: "
|
|
104
|
-
{ 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" },
|
|
105
221
|
{
|
|
106
|
-
path: "
|
|
222
|
+
path: "results.item.lineItems.subscriptionInfo.subscriptionSettings.startDate"
|
|
107
223
|
},
|
|
108
|
-
{ path: "
|
|
109
|
-
{
|
|
110
|
-
|
|
111
|
-
|
|
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" }
|
|
112
232
|
]
|
|
113
233
|
},
|
|
114
234
|
{
|
|
115
235
|
transformFn: transformRESTFloatToSDKFloat,
|
|
116
236
|
paths: [
|
|
117
|
-
{ path: "
|
|
118
|
-
{ path: "
|
|
119
|
-
{ path: "
|
|
120
|
-
{ path: "
|
|
121
|
-
{ 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" },
|
|
122
242
|
{
|
|
123
|
-
path: "
|
|
243
|
+
path: "results.item.shippingInfo.logistics.shippingDestination.address.geocode.latitude"
|
|
124
244
|
},
|
|
125
245
|
{
|
|
126
|
-
path: "
|
|
246
|
+
path: "results.item.shippingInfo.logistics.shippingDestination.address.geocode.longitude"
|
|
127
247
|
},
|
|
128
248
|
{
|
|
129
|
-
path: "
|
|
249
|
+
path: "results.item.shippingInfo.logistics.pickupDetails.address.geocode.latitude"
|
|
130
250
|
},
|
|
131
251
|
{
|
|
132
|
-
path: "
|
|
252
|
+
path: "results.item.shippingInfo.logistics.pickupDetails.address.geocode.longitude"
|
|
133
253
|
},
|
|
134
|
-
{ path: "
|
|
135
|
-
{ path: "
|
|
254
|
+
{ path: "results.item.recipientInfo.address.geocode.latitude" },
|
|
255
|
+
{ path: "results.item.recipientInfo.address.geocode.longitude" }
|
|
136
256
|
]
|
|
137
257
|
}
|
|
138
258
|
])
|
|
139
259
|
};
|
|
140
260
|
return metadata;
|
|
141
261
|
}
|
|
142
|
-
return
|
|
262
|
+
return __paymentCollectionBulkMarkOrdersAsPaid;
|
|
143
263
|
}
|
|
144
|
-
function
|
|
145
|
-
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 }) {
|
|
146
302
|
const serializedData = transformPaths(payload, [
|
|
147
303
|
{
|
|
148
304
|
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
149
|
-
paths: [
|
|
150
|
-
{ path: "order.createdDate" },
|
|
151
|
-
{ path: "order.updatedDate" },
|
|
152
|
-
{ path: "order.purchasedDate" },
|
|
153
|
-
{ path: "order.lineItems.image.urlExpirationDate" },
|
|
154
|
-
{ path: "order.lineItems.digitalFile.expirationDate" },
|
|
155
|
-
{
|
|
156
|
-
path: "order.lineItems.subscriptionInfo.subscriptionSettings.startDate"
|
|
157
|
-
},
|
|
158
|
-
{ path: "order.shippingInfo.logistics.deliverByDate" },
|
|
159
|
-
{ path: "order.shippingInfo.logistics.deliveryTimeSlot.from" },
|
|
160
|
-
{ path: "order.shippingInfo.logistics.deliveryTimeSlot.to" },
|
|
161
|
-
{ path: "order.activities.createdDate" }
|
|
162
|
-
]
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
transformFn: transformSDKFloatToRESTFloat,
|
|
166
|
-
paths: [
|
|
167
|
-
{ path: "order.lineItems.image.focalPoint.x" },
|
|
168
|
-
{ path: "order.lineItems.image.focalPoint.y" },
|
|
169
|
-
{ path: "order.lineItems.physicalProperties.weight" },
|
|
170
|
-
{ path: "order.billingInfo.address.geocode.latitude" },
|
|
171
|
-
{ path: "order.billingInfo.address.geocode.longitude" },
|
|
172
|
-
{
|
|
173
|
-
path: "order.shippingInfo.logistics.shippingDestination.address.geocode.latitude"
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
path: "order.shippingInfo.logistics.shippingDestination.address.geocode.longitude"
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
path: "order.shippingInfo.logistics.pickupDetails.address.geocode.latitude"
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
path: "order.shippingInfo.logistics.pickupDetails.address.geocode.longitude"
|
|
183
|
-
},
|
|
184
|
-
{ path: "order.recipientInfo.address.geocode.latitude" },
|
|
185
|
-
{ path: "order.recipientInfo.address.geocode.longitude" }
|
|
186
|
-
]
|
|
305
|
+
paths: [{ path: "membershipCharges.serviceProperties.scheduledDate" }]
|
|
187
306
|
}
|
|
188
307
|
]);
|
|
189
308
|
const metadata = {
|
|
190
309
|
entityFqdn: "wix.ecom.v1.order",
|
|
191
310
|
method: "POST",
|
|
192
|
-
methodFqn: "com.wix.ecom.orders.v1.
|
|
311
|
+
methodFqn: "com.wix.ecom.orders.payments_collector.v1.PaymentsCollector.ChargeMemberships",
|
|
193
312
|
packageName: PACKAGE_NAME,
|
|
194
|
-
url:
|
|
195
|
-
protoPath: "/v1/orders",
|
|
313
|
+
url: resolveComWixEcomOrdersPaymentsCollectorV1PaymentsCollectorUrl({
|
|
314
|
+
protoPath: "/v1/payments-collector/orders/{ecomOrderId}/charge-membership",
|
|
196
315
|
data: serializedData,
|
|
197
316
|
host
|
|
198
317
|
}),
|
|
199
|
-
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,
|
|
200
337
|
transformResponse: (payload2) => transformPaths(payload2, [
|
|
201
338
|
{
|
|
202
339
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
203
340
|
paths: [
|
|
204
|
-
{ path: "
|
|
205
|
-
{ path: "
|
|
206
|
-
{ path: "order.purchasedDate" },
|
|
207
|
-
{ path: "order.lineItems.image.urlExpirationDate" },
|
|
208
|
-
{ path: "order.lineItems.digitalFile.expirationDate" },
|
|
341
|
+
{ path: "orderTransactions.payments.createdDate" },
|
|
342
|
+
{ path: "orderTransactions.payments.updatedDate" },
|
|
209
343
|
{
|
|
210
|
-
path: "
|
|
344
|
+
path: "orderTransactions.payments.regularPaymentDetails.authorizationDetails.authorizedDate"
|
|
211
345
|
},
|
|
212
|
-
{
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
{
|
|
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" }
|
|
216
362
|
]
|
|
217
|
-
}
|
|
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, [
|
|
218
384
|
{
|
|
219
|
-
transformFn:
|
|
385
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
220
386
|
paths: [
|
|
221
|
-
{ path: "
|
|
222
|
-
{ path: "
|
|
223
|
-
{ path: "order.lineItems.physicalProperties.weight" },
|
|
224
|
-
{ path: "order.billingInfo.address.geocode.latitude" },
|
|
225
|
-
{ path: "order.billingInfo.address.geocode.longitude" },
|
|
387
|
+
{ path: "orderTransactions.payments.createdDate" },
|
|
388
|
+
{ path: "orderTransactions.payments.updatedDate" },
|
|
226
389
|
{
|
|
227
|
-
path: "
|
|
390
|
+
path: "orderTransactions.payments.regularPaymentDetails.authorizationDetails.authorizedDate"
|
|
228
391
|
},
|
|
229
392
|
{
|
|
230
|
-
path: "
|
|
393
|
+
path: "orderTransactions.payments.regularPaymentDetails.authorizationDetails.captures.createdDate"
|
|
231
394
|
},
|
|
232
395
|
{
|
|
233
|
-
path: "
|
|
396
|
+
path: "orderTransactions.payments.regularPaymentDetails.authorizationDetails.void.voidedDate"
|
|
234
397
|
},
|
|
235
398
|
{
|
|
236
|
-
path: "
|
|
399
|
+
path: "orderTransactions.payments.regularPaymentDetails.authorizationDetails.scheduledAction.executionDate"
|
|
237
400
|
},
|
|
238
|
-
{
|
|
239
|
-
|
|
401
|
+
{
|
|
402
|
+
path: "orderTransactions.payments.regularPaymentDetails.chargebacks.createdDate"
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
path: "orderTransactions.payments.regularPaymentDetails.chargebacks.updatedDate"
|
|
406
|
+
},
|
|
407
|
+
{ path: "orderTransactions.refunds.createdDate" }
|
|
240
408
|
]
|
|
241
409
|
}
|
|
242
410
|
])
|
|
243
411
|
};
|
|
244
412
|
return metadata;
|
|
245
413
|
}
|
|
246
|
-
return
|
|
414
|
+
return __voidAuthorizedPayments;
|
|
247
415
|
}
|
|
248
|
-
function
|
|
249
|
-
function
|
|
250
|
-
const serializedData = transformPaths(payload, [
|
|
251
|
-
{
|
|
252
|
-
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
253
|
-
paths: [{ path: "fieldMask" }]
|
|
254
|
-
},
|
|
255
|
-
{
|
|
256
|
-
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
257
|
-
paths: [
|
|
258
|
-
{ path: "order.createdDate" },
|
|
259
|
-
{ path: "order.updatedDate" },
|
|
260
|
-
{ path: "order.purchasedDate" },
|
|
261
|
-
{ path: "order.lineItems.image.urlExpirationDate" },
|
|
262
|
-
{ path: "order.lineItems.digitalFile.expirationDate" },
|
|
263
|
-
{
|
|
264
|
-
path: "order.lineItems.subscriptionInfo.subscriptionSettings.startDate"
|
|
265
|
-
},
|
|
266
|
-
{ path: "order.shippingInfo.logistics.deliverByDate" },
|
|
267
|
-
{ path: "order.shippingInfo.logistics.deliveryTimeSlot.from" },
|
|
268
|
-
{ path: "order.shippingInfo.logistics.deliveryTimeSlot.to" },
|
|
269
|
-
{ path: "order.activities.createdDate" }
|
|
270
|
-
]
|
|
271
|
-
},
|
|
272
|
-
{
|
|
273
|
-
transformFn: transformSDKFloatToRESTFloat,
|
|
274
|
-
paths: [
|
|
275
|
-
{ path: "order.lineItems.image.focalPoint.x" },
|
|
276
|
-
{ path: "order.lineItems.image.focalPoint.y" },
|
|
277
|
-
{ path: "order.lineItems.physicalProperties.weight" },
|
|
278
|
-
{ path: "order.billingInfo.address.geocode.latitude" },
|
|
279
|
-
{ path: "order.billingInfo.address.geocode.longitude" },
|
|
280
|
-
{
|
|
281
|
-
path: "order.shippingInfo.logistics.shippingDestination.address.geocode.latitude"
|
|
282
|
-
},
|
|
283
|
-
{
|
|
284
|
-
path: "order.shippingInfo.logistics.shippingDestination.address.geocode.longitude"
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
path: "order.shippingInfo.logistics.pickupDetails.address.geocode.latitude"
|
|
288
|
-
},
|
|
289
|
-
{
|
|
290
|
-
path: "order.shippingInfo.logistics.pickupDetails.address.geocode.longitude"
|
|
291
|
-
},
|
|
292
|
-
{ path: "order.recipientInfo.address.geocode.latitude" },
|
|
293
|
-
{ path: "order.recipientInfo.address.geocode.longitude" }
|
|
294
|
-
]
|
|
295
|
-
}
|
|
296
|
-
]);
|
|
416
|
+
function captureAuthorizedPayments(payload) {
|
|
417
|
+
function __captureAuthorizedPayments({ host }) {
|
|
297
418
|
const metadata = {
|
|
298
419
|
entityFqdn: "wix.ecom.v1.order",
|
|
299
|
-
method: "
|
|
300
|
-
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",
|
|
301
468
|
packageName: PACKAGE_NAME,
|
|
302
469
|
url: resolveComWixEcomOrdersV1OrdersUrl({
|
|
303
|
-
protoPath: "/v1/orders/{
|
|
304
|
-
data:
|
|
470
|
+
protoPath: "/v1/orders/{id}",
|
|
471
|
+
data: payload,
|
|
305
472
|
host
|
|
306
473
|
}),
|
|
307
|
-
|
|
474
|
+
params: toURLSearchParams(payload),
|
|
308
475
|
transformResponse: (payload2) => transformPaths(payload2, [
|
|
309
476
|
{
|
|
310
477
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
@@ -351,170 +518,121 @@ function updateOrder(payload) {
|
|
|
351
518
|
};
|
|
352
519
|
return metadata;
|
|
353
520
|
}
|
|
354
|
-
return
|
|
521
|
+
return __getOrder;
|
|
355
522
|
}
|
|
356
|
-
function
|
|
357
|
-
function
|
|
358
|
-
const serializedData = transformPaths(payload, [
|
|
359
|
-
{
|
|
360
|
-
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
361
|
-
paths: [{ path: "orders.fieldMask" }]
|
|
362
|
-
},
|
|
363
|
-
{
|
|
364
|
-
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
365
|
-
paths: [
|
|
366
|
-
{ path: "orders.order.createdDate" },
|
|
367
|
-
{ path: "orders.order.updatedDate" },
|
|
368
|
-
{ path: "orders.order.purchasedDate" },
|
|
369
|
-
{ path: "orders.order.lineItems.image.urlExpirationDate" },
|
|
370
|
-
{ path: "orders.order.lineItems.digitalFile.expirationDate" },
|
|
371
|
-
{
|
|
372
|
-
path: "orders.order.lineItems.subscriptionInfo.subscriptionSettings.startDate"
|
|
373
|
-
},
|
|
374
|
-
{ path: "orders.order.shippingInfo.logistics.deliverByDate" },
|
|
375
|
-
{ path: "orders.order.shippingInfo.logistics.deliveryTimeSlot.from" },
|
|
376
|
-
{ path: "orders.order.shippingInfo.logistics.deliveryTimeSlot.to" },
|
|
377
|
-
{ path: "orders.order.activities.createdDate" }
|
|
378
|
-
]
|
|
379
|
-
},
|
|
380
|
-
{
|
|
381
|
-
transformFn: transformSDKFloatToRESTFloat,
|
|
382
|
-
paths: [
|
|
383
|
-
{ path: "orders.order.lineItems.image.focalPoint.x" },
|
|
384
|
-
{ path: "orders.order.lineItems.image.focalPoint.y" },
|
|
385
|
-
{ path: "orders.order.lineItems.physicalProperties.weight" },
|
|
386
|
-
{ path: "orders.order.billingInfo.address.geocode.latitude" },
|
|
387
|
-
{ path: "orders.order.billingInfo.address.geocode.longitude" },
|
|
388
|
-
{
|
|
389
|
-
path: "orders.order.shippingInfo.logistics.shippingDestination.address.geocode.latitude"
|
|
390
|
-
},
|
|
391
|
-
{
|
|
392
|
-
path: "orders.order.shippingInfo.logistics.shippingDestination.address.geocode.longitude"
|
|
393
|
-
},
|
|
394
|
-
{
|
|
395
|
-
path: "orders.order.shippingInfo.logistics.pickupDetails.address.geocode.latitude"
|
|
396
|
-
},
|
|
397
|
-
{
|
|
398
|
-
path: "orders.order.shippingInfo.logistics.pickupDetails.address.geocode.longitude"
|
|
399
|
-
},
|
|
400
|
-
{ path: "orders.order.recipientInfo.address.geocode.latitude" },
|
|
401
|
-
{ path: "orders.order.recipientInfo.address.geocode.longitude" }
|
|
402
|
-
]
|
|
403
|
-
}
|
|
404
|
-
]);
|
|
523
|
+
function searchOrders(payload) {
|
|
524
|
+
function __searchOrders({ host }) {
|
|
405
525
|
const metadata = {
|
|
406
526
|
entityFqdn: "wix.ecom.v1.order",
|
|
407
527
|
method: "POST",
|
|
408
|
-
methodFqn: "com.wix.ecom.orders.v1.Orders.
|
|
528
|
+
methodFqn: "com.wix.ecom.orders.v1.Orders.SearchOrders",
|
|
409
529
|
packageName: PACKAGE_NAME,
|
|
410
530
|
url: resolveComWixEcomOrdersV1OrdersUrl({
|
|
411
|
-
protoPath: "/v1/
|
|
412
|
-
data:
|
|
531
|
+
protoPath: "/v1/orders/search",
|
|
532
|
+
data: payload,
|
|
413
533
|
host
|
|
414
534
|
}),
|
|
415
|
-
data:
|
|
535
|
+
data: payload,
|
|
416
536
|
transformResponse: (payload2) => transformPaths(payload2, [
|
|
417
537
|
{
|
|
418
538
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
419
539
|
paths: [
|
|
420
|
-
{ path: "
|
|
421
|
-
{ path: "
|
|
422
|
-
{ path: "
|
|
423
|
-
{ path: "
|
|
424
|
-
{ path: "
|
|
425
|
-
{
|
|
426
|
-
path: "results.item.lineItems.subscriptionInfo.subscriptionSettings.startDate"
|
|
427
|
-
},
|
|
428
|
-
{ path: "results.item.shippingInfo.logistics.deliverByDate" },
|
|
429
|
-
{
|
|
430
|
-
path: "results.item.shippingInfo.logistics.deliveryTimeSlot.from"
|
|
431
|
-
},
|
|
540
|
+
{ path: "orders.createdDate" },
|
|
541
|
+
{ path: "orders.updatedDate" },
|
|
542
|
+
{ path: "orders.purchasedDate" },
|
|
543
|
+
{ path: "orders.lineItems.image.urlExpirationDate" },
|
|
544
|
+
{ path: "orders.lineItems.digitalFile.expirationDate" },
|
|
432
545
|
{
|
|
433
|
-
path: "
|
|
546
|
+
path: "orders.lineItems.subscriptionInfo.subscriptionSettings.startDate"
|
|
434
547
|
},
|
|
435
|
-
{ 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" }
|
|
436
552
|
]
|
|
437
553
|
},
|
|
438
554
|
{
|
|
439
555
|
transformFn: transformRESTFloatToSDKFloat,
|
|
440
556
|
paths: [
|
|
441
|
-
{ path: "
|
|
442
|
-
{ path: "
|
|
443
|
-
{ path: "
|
|
444
|
-
{ path: "
|
|
445
|
-
{ 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" },
|
|
446
562
|
{
|
|
447
|
-
path: "
|
|
563
|
+
path: "orders.shippingInfo.logistics.shippingDestination.address.geocode.latitude"
|
|
448
564
|
},
|
|
449
565
|
{
|
|
450
|
-
path: "
|
|
566
|
+
path: "orders.shippingInfo.logistics.shippingDestination.address.geocode.longitude"
|
|
451
567
|
},
|
|
452
568
|
{
|
|
453
|
-
path: "
|
|
569
|
+
path: "orders.shippingInfo.logistics.pickupDetails.address.geocode.latitude"
|
|
454
570
|
},
|
|
455
571
|
{
|
|
456
|
-
path: "
|
|
572
|
+
path: "orders.shippingInfo.logistics.pickupDetails.address.geocode.longitude"
|
|
457
573
|
},
|
|
458
|
-
{ path: "
|
|
459
|
-
{ path: "
|
|
574
|
+
{ path: "orders.recipientInfo.address.geocode.latitude" },
|
|
575
|
+
{ path: "orders.recipientInfo.address.geocode.longitude" }
|
|
460
576
|
]
|
|
461
577
|
}
|
|
462
578
|
])
|
|
463
579
|
};
|
|
464
580
|
return metadata;
|
|
465
581
|
}
|
|
466
|
-
return
|
|
582
|
+
return __searchOrders;
|
|
467
583
|
}
|
|
468
|
-
function
|
|
469
|
-
function
|
|
584
|
+
function createOrder(payload) {
|
|
585
|
+
function __createOrder({ host }) {
|
|
470
586
|
const serializedData = transformPaths(payload, [
|
|
471
587
|
{
|
|
472
588
|
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
473
589
|
paths: [
|
|
474
|
-
{ 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" },
|
|
475
595
|
{
|
|
476
|
-
path: "
|
|
596
|
+
path: "order.lineItems.subscriptionInfo.subscriptionSettings.startDate"
|
|
477
597
|
},
|
|
478
|
-
{ path: "
|
|
479
|
-
{ path: "
|
|
480
|
-
{ path: "
|
|
481
|
-
{
|
|
482
|
-
path: "changes.lineItems.lineItem.subscriptionInfo.subscriptionSettings.startDate"
|
|
483
|
-
}
|
|
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" }
|
|
484
602
|
]
|
|
485
603
|
},
|
|
486
604
|
{
|
|
487
605
|
transformFn: transformSDKFloatToRESTFloat,
|
|
488
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" },
|
|
489
612
|
{
|
|
490
|
-
path: "
|
|
613
|
+
path: "order.shippingInfo.logistics.shippingDestination.address.geocode.latitude"
|
|
491
614
|
},
|
|
492
615
|
{
|
|
493
|
-
path: "
|
|
616
|
+
path: "order.shippingInfo.logistics.shippingDestination.address.geocode.longitude"
|
|
494
617
|
},
|
|
495
618
|
{
|
|
496
|
-
path: "
|
|
619
|
+
path: "order.shippingInfo.logistics.pickupDetails.address.geocode.latitude"
|
|
497
620
|
},
|
|
498
621
|
{
|
|
499
|
-
path: "
|
|
622
|
+
path: "order.shippingInfo.logistics.pickupDetails.address.geocode.longitude"
|
|
500
623
|
},
|
|
501
|
-
{ path: "
|
|
502
|
-
{ path: "
|
|
503
|
-
{ path: "changes.changedRecipientInfo.address.geocode.latitude" },
|
|
504
|
-
{ path: "changes.changedRecipientInfo.address.geocode.longitude" },
|
|
505
|
-
{ path: "changes.lineItems.lineItem.physicalProperties.weight" },
|
|
506
|
-
{ path: "changes.lineItems.lineItem.image.focalPoint.x" },
|
|
507
|
-
{ path: "changes.lineItems.lineItem.image.focalPoint.y" }
|
|
624
|
+
{ path: "order.recipientInfo.address.geocode.latitude" },
|
|
625
|
+
{ path: "order.recipientInfo.address.geocode.longitude" }
|
|
508
626
|
]
|
|
509
627
|
}
|
|
510
628
|
]);
|
|
511
629
|
const metadata = {
|
|
512
630
|
entityFqdn: "wix.ecom.v1.order",
|
|
513
631
|
method: "POST",
|
|
514
|
-
methodFqn: "com.wix.ecom.orders.v1.Orders.
|
|
632
|
+
methodFqn: "com.wix.ecom.orders.v1.Orders.CreateOrder",
|
|
515
633
|
packageName: PACKAGE_NAME,
|
|
516
634
|
url: resolveComWixEcomOrdersV1OrdersUrl({
|
|
517
|
-
protoPath: "/v1/orders
|
|
635
|
+
protoPath: "/v1/orders",
|
|
518
636
|
data: serializedData,
|
|
519
637
|
host
|
|
520
638
|
}),
|
|
@@ -565,10 +683,10 @@ function commitDeltas(payload) {
|
|
|
565
683
|
};
|
|
566
684
|
return metadata;
|
|
567
685
|
}
|
|
568
|
-
return
|
|
686
|
+
return __createOrder;
|
|
569
687
|
}
|
|
570
|
-
function
|
|
571
|
-
function
|
|
688
|
+
function updateOrder(payload) {
|
|
689
|
+
function __updateOrder({ host }) {
|
|
572
690
|
const serializedData = transformPaths(payload, [
|
|
573
691
|
{
|
|
574
692
|
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
@@ -577,27 +695,52 @@ function updateOrderLineItem(payload) {
|
|
|
577
695
|
{
|
|
578
696
|
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
579
697
|
paths: [
|
|
580
|
-
{ path: "
|
|
581
|
-
{ path: "
|
|
582
|
-
{ path: "
|
|
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" }
|
|
583
710
|
]
|
|
584
711
|
},
|
|
585
712
|
{
|
|
586
713
|
transformFn: transformSDKFloatToRESTFloat,
|
|
587
714
|
paths: [
|
|
588
|
-
{ path: "
|
|
589
|
-
{ path: "
|
|
590
|
-
{ 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" }
|
|
591
734
|
]
|
|
592
735
|
}
|
|
593
736
|
]);
|
|
594
737
|
const metadata = {
|
|
595
738
|
entityFqdn: "wix.ecom.v1.order",
|
|
596
739
|
method: "PATCH",
|
|
597
|
-
methodFqn: "com.wix.ecom.orders.v1.Orders.
|
|
740
|
+
methodFqn: "com.wix.ecom.orders.v1.Orders.UpdateOrder",
|
|
598
741
|
packageName: PACKAGE_NAME,
|
|
599
742
|
url: resolveComWixEcomOrdersV1OrdersUrl({
|
|
600
|
-
protoPath: "/v1/orders/{
|
|
743
|
+
protoPath: "/v1/orders/{order.id}",
|
|
601
744
|
data: serializedData,
|
|
602
745
|
host
|
|
603
746
|
}),
|
|
@@ -648,82 +791,174 @@ function updateOrderLineItem(payload) {
|
|
|
648
791
|
};
|
|
649
792
|
return metadata;
|
|
650
793
|
}
|
|
651
|
-
return
|
|
794
|
+
return __updateOrder;
|
|
652
795
|
}
|
|
653
|
-
function
|
|
654
|
-
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
|
+
]);
|
|
655
845
|
const metadata = {
|
|
656
846
|
entityFqdn: "wix.ecom.v1.order",
|
|
657
847
|
method: "POST",
|
|
658
|
-
methodFqn: "com.wix.ecom.orders.v1.Orders.
|
|
848
|
+
methodFqn: "com.wix.ecom.orders.v1.Orders.BulkUpdateOrders",
|
|
659
849
|
packageName: PACKAGE_NAME,
|
|
660
850
|
url: resolveComWixEcomOrdersV1OrdersUrl({
|
|
661
|
-
protoPath: "/v1/orders/
|
|
662
|
-
data:
|
|
851
|
+
protoPath: "/v1/bulk/orders/update",
|
|
852
|
+
data: serializedData,
|
|
663
853
|
host
|
|
664
854
|
}),
|
|
665
|
-
data:
|
|
855
|
+
data: serializedData,
|
|
666
856
|
transformResponse: (payload2) => transformPaths(payload2, [
|
|
667
857
|
{
|
|
668
858
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
669
859
|
paths: [
|
|
670
|
-
{ path: "
|
|
671
|
-
{ path: "
|
|
672
|
-
{ path: "
|
|
673
|
-
{ path: "
|
|
674
|
-
{ 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" },
|
|
675
865
|
{
|
|
676
|
-
path: "
|
|
866
|
+
path: "results.item.lineItems.subscriptionInfo.subscriptionSettings.startDate"
|
|
677
867
|
},
|
|
678
|
-
{ path: "
|
|
679
|
-
{
|
|
680
|
-
|
|
681
|
-
|
|
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" }
|
|
682
876
|
]
|
|
683
877
|
},
|
|
684
878
|
{
|
|
685
879
|
transformFn: transformRESTFloatToSDKFloat,
|
|
686
880
|
paths: [
|
|
687
|
-
{ path: "
|
|
688
|
-
{ path: "
|
|
689
|
-
{ path: "
|
|
690
|
-
{ path: "
|
|
691
|
-
{ 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" },
|
|
692
886
|
{
|
|
693
|
-
path: "
|
|
887
|
+
path: "results.item.shippingInfo.logistics.shippingDestination.address.geocode.latitude"
|
|
694
888
|
},
|
|
695
889
|
{
|
|
696
|
-
path: "
|
|
890
|
+
path: "results.item.shippingInfo.logistics.shippingDestination.address.geocode.longitude"
|
|
697
891
|
},
|
|
698
892
|
{
|
|
699
|
-
path: "
|
|
893
|
+
path: "results.item.shippingInfo.logistics.pickupDetails.address.geocode.latitude"
|
|
700
894
|
},
|
|
701
895
|
{
|
|
702
|
-
path: "
|
|
896
|
+
path: "results.item.shippingInfo.logistics.pickupDetails.address.geocode.longitude"
|
|
703
897
|
},
|
|
704
|
-
{ path: "
|
|
705
|
-
{ path: "
|
|
898
|
+
{ path: "results.item.recipientInfo.address.geocode.latitude" },
|
|
899
|
+
{ path: "results.item.recipientInfo.address.geocode.longitude" }
|
|
706
900
|
]
|
|
707
901
|
}
|
|
708
902
|
])
|
|
709
903
|
};
|
|
710
904
|
return metadata;
|
|
711
905
|
}
|
|
712
|
-
return
|
|
906
|
+
return __bulkUpdateOrders;
|
|
713
907
|
}
|
|
714
|
-
function
|
|
715
|
-
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
|
+
]);
|
|
716
951
|
const metadata = {
|
|
717
952
|
entityFqdn: "wix.ecom.v1.order",
|
|
718
|
-
method: "
|
|
719
|
-
methodFqn: "com.wix.ecom.orders.v1.Orders.
|
|
953
|
+
method: "POST",
|
|
954
|
+
methodFqn: "com.wix.ecom.orders.v1.Orders.CommitDeltas",
|
|
720
955
|
packageName: PACKAGE_NAME,
|
|
721
956
|
url: resolveComWixEcomOrdersV1OrdersUrl({
|
|
722
|
-
protoPath: "/v1/orders/{id}/
|
|
723
|
-
data:
|
|
957
|
+
protoPath: "/v1/orders/{id}/commit-deltas",
|
|
958
|
+
data: serializedData,
|
|
724
959
|
host
|
|
725
960
|
}),
|
|
726
|
-
data:
|
|
961
|
+
data: serializedData,
|
|
727
962
|
transformResponse: (payload2) => transformPaths(payload2, [
|
|
728
963
|
{
|
|
729
964
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
@@ -770,21 +1005,43 @@ function updateActivity(payload) {
|
|
|
770
1005
|
};
|
|
771
1006
|
return metadata;
|
|
772
1007
|
}
|
|
773
|
-
return
|
|
1008
|
+
return __commitDeltas;
|
|
774
1009
|
}
|
|
775
|
-
function
|
|
776
|
-
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
|
+
]);
|
|
777
1034
|
const metadata = {
|
|
778
1035
|
entityFqdn: "wix.ecom.v1.order",
|
|
779
|
-
method: "
|
|
780
|
-
methodFqn: "com.wix.ecom.orders.v1.Orders.
|
|
1036
|
+
method: "PATCH",
|
|
1037
|
+
methodFqn: "com.wix.ecom.orders.v1.Orders.UpdateOrderLineItem",
|
|
781
1038
|
packageName: PACKAGE_NAME,
|
|
782
1039
|
url: resolveComWixEcomOrdersV1OrdersUrl({
|
|
783
|
-
protoPath: "/v1/orders/{id}/
|
|
784
|
-
data:
|
|
1040
|
+
protoPath: "/v1/orders/{id}/line-item/{lineItem.id}",
|
|
1041
|
+
data: serializedData,
|
|
785
1042
|
host
|
|
786
1043
|
}),
|
|
787
|
-
|
|
1044
|
+
data: serializedData,
|
|
788
1045
|
transformResponse: (payload2) => transformPaths(payload2, [
|
|
789
1046
|
{
|
|
790
1047
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
@@ -831,17 +1088,17 @@ function deleteActivity(payload) {
|
|
|
831
1088
|
};
|
|
832
1089
|
return metadata;
|
|
833
1090
|
}
|
|
834
|
-
return
|
|
1091
|
+
return __updateOrderLineItem;
|
|
835
1092
|
}
|
|
836
|
-
function
|
|
837
|
-
function
|
|
1093
|
+
function addActivity(payload) {
|
|
1094
|
+
function __addActivity({ host }) {
|
|
838
1095
|
const metadata = {
|
|
839
1096
|
entityFqdn: "wix.ecom.v1.order",
|
|
840
1097
|
method: "POST",
|
|
841
|
-
methodFqn: "com.wix.ecom.orders.v1.Orders.
|
|
1098
|
+
methodFqn: "com.wix.ecom.orders.v1.Orders.AddActivity",
|
|
842
1099
|
packageName: PACKAGE_NAME,
|
|
843
1100
|
url: resolveComWixEcomOrdersV1OrdersUrl({
|
|
844
|
-
protoPath: "/v1/orders/{id}/
|
|
1101
|
+
protoPath: "/v1/orders/{id}/activities",
|
|
845
1102
|
data: payload,
|
|
846
1103
|
host
|
|
847
1104
|
}),
|
|
@@ -892,10 +1149,193 @@ function cancelOrder(payload) {
|
|
|
892
1149
|
};
|
|
893
1150
|
return metadata;
|
|
894
1151
|
}
|
|
895
|
-
return
|
|
1152
|
+
return __addActivity;
|
|
896
1153
|
}
|
|
897
|
-
function
|
|
898
|
-
function
|
|
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;
|
|
1336
|
+
}
|
|
1337
|
+
function updateOrderStatus(payload) {
|
|
1338
|
+
function __updateOrderStatus({ host }) {
|
|
899
1339
|
const metadata = {
|
|
900
1340
|
entityFqdn: "wix.ecom.v1.order",
|
|
901
1341
|
method: "POST",
|
|
@@ -1169,6 +1609,137 @@ var ChannelType = /* @__PURE__ */ ((ChannelType2) => {
|
|
|
1169
1609
|
ChannelType2["FAIRE_COM"] = "FAIRE_COM";
|
|
1170
1610
|
return ChannelType2;
|
|
1171
1611
|
})(ChannelType || {});
|
|
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 || {});
|
|
1729
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
1730
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
1731
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
1732
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
1733
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
1734
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
1735
|
+
return WebhookIdentityType2;
|
|
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 || {});
|
|
1172
1743
|
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
1173
1744
|
SortOrder2["ASC"] = "ASC";
|
|
1174
1745
|
SortOrder2["DESC"] = "DESC";
|
|
@@ -1251,14 +1822,351 @@ var InvoiceStatus = /* @__PURE__ */ ((InvoiceStatus2) => {
|
|
|
1251
1822
|
InvoiceStatus2["PartialAndOverdue"] = "PartialAndOverdue";
|
|
1252
1823
|
return InvoiceStatus2;
|
|
1253
1824
|
})(InvoiceStatus || {});
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
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
|
+
}
|
|
1262
2170
|
async function getOrder2(_id) {
|
|
1263
2171
|
const { httpClient, sideEffects } = arguments[1];
|
|
1264
2172
|
const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
|
|
@@ -1955,35 +2863,51 @@ async function bulkUpdateOrderTags2(orderIds, options) {
|
|
|
1955
2863
|
}
|
|
1956
2864
|
}
|
|
1957
2865
|
export {
|
|
2866
|
+
ActionType,
|
|
1958
2867
|
ActivityType,
|
|
1959
2868
|
AdjustmentType,
|
|
1960
2869
|
AttributionSource,
|
|
2870
|
+
AuthorizationCaptureStatus,
|
|
2871
|
+
AuthorizationVoidStatus,
|
|
1961
2872
|
ChannelType,
|
|
2873
|
+
ChargebackStatus,
|
|
1962
2874
|
CustomFieldGroup,
|
|
1963
2875
|
DeltaPaymentOptionType,
|
|
1964
2876
|
DepositType,
|
|
1965
2877
|
DescriptionLineType,
|
|
1966
2878
|
DiscountReason,
|
|
1967
2879
|
DiscountType,
|
|
2880
|
+
DurationUnit,
|
|
1968
2881
|
FulfillmentStatus,
|
|
1969
2882
|
InventoryAction,
|
|
1970
2883
|
InvoiceStatus,
|
|
1971
2884
|
ItemTypeItemType,
|
|
1972
2885
|
JurisdictionType,
|
|
1973
2886
|
LineItemQuantityChangeType,
|
|
2887
|
+
ManuallyRefundableReason,
|
|
2888
|
+
MembershipPaymentStatus,
|
|
2889
|
+
NonRefundableReason,
|
|
1974
2890
|
OrderApprovalStrategy,
|
|
1975
2891
|
OrderStatus,
|
|
2892
|
+
PaymentCollectabilityStatus,
|
|
1976
2893
|
PaymentOptionType,
|
|
1977
2894
|
PaymentStatus,
|
|
1978
2895
|
PickupMethod,
|
|
1979
2896
|
Placement,
|
|
2897
|
+
Reason,
|
|
2898
|
+
RefundStatus,
|
|
2899
|
+
RefundableStatus,
|
|
2900
|
+
RestockType,
|
|
2901
|
+
ScheduledAction,
|
|
1980
2902
|
SortOrder,
|
|
1981
2903
|
SourceType,
|
|
1982
2904
|
SubdivisionType,
|
|
1983
2905
|
SubscriptionFrequency,
|
|
1984
2906
|
TaxableAddressType,
|
|
2907
|
+
TransactionStatus,
|
|
1985
2908
|
ValueType,
|
|
1986
2909
|
VatType,
|
|
2910
|
+
VersioningMode,
|
|
1987
2911
|
WebhookIdentityType,
|
|
1988
2912
|
WeightUnit,
|
|
1989
2913
|
addActivity2 as addActivity,
|
|
@@ -1991,14 +2915,25 @@ export {
|
|
|
1991
2915
|
bulkUpdateOrderTags2 as bulkUpdateOrderTags,
|
|
1992
2916
|
bulkUpdateOrders2 as bulkUpdateOrders,
|
|
1993
2917
|
cancelOrder2 as cancelOrder,
|
|
2918
|
+
captureAuthorizedPayments2 as captureAuthorizedPayments,
|
|
2919
|
+
chargeMemberships2 as chargeMemberships,
|
|
1994
2920
|
commitDeltas2 as commitDeltas,
|
|
1995
2921
|
createOrder2 as createOrder,
|
|
1996
2922
|
deleteActivity2 as deleteActivity,
|
|
1997
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,
|
|
1998
2931
|
searchOrders2 as searchOrders,
|
|
2932
|
+
triggerRefund2 as triggerRefund,
|
|
1999
2933
|
updateActivity2 as updateActivity,
|
|
2000
2934
|
updateOrder2 as updateOrder,
|
|
2001
2935
|
updateOrderLineItem2 as updateOrderLineItem,
|
|
2002
|
-
updateOrderStatus2 as updateOrderStatus
|
|
2936
|
+
updateOrderStatus2 as updateOrderStatus,
|
|
2937
|
+
voidAuthorizedPayments2 as voidAuthorizedPayments
|
|
2003
2938
|
};
|
|
2004
2939
|
//# sourceMappingURL=index.typings.mjs.map
|