@wix/auto_sdk_payments_payments 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.js +121 -119
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +62 -64
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js +52 -56
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs +121 -119
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.mjs +62 -64
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.mjs +52 -56
- package/build/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/es/index.mjs
CHANGED
|
@@ -18,6 +18,54 @@ import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/f
|
|
|
18
18
|
import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
19
19
|
import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
20
20
|
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
21
|
+
var TRANSFORM_PATHS_0 = [
|
|
22
|
+
{ path: "payment.createdDate" },
|
|
23
|
+
{ path: "payment.updatedDate" },
|
|
24
|
+
{ path: "payment.charge.createdDate" },
|
|
25
|
+
{ path: "payment.charge.updatedDate" },
|
|
26
|
+
{ path: "payment.refunds.createdDate" },
|
|
27
|
+
{ path: "payment.refunds.updatedDate" },
|
|
28
|
+
{ path: "payment.disputes.dueDate" },
|
|
29
|
+
{ path: "payment.disputes.defendedDate" },
|
|
30
|
+
{ path: "payment.disputes.acceptedDate" },
|
|
31
|
+
{ path: "payment.disputes.createdDate" },
|
|
32
|
+
{ path: "payment.disputes.updatedDate" },
|
|
33
|
+
{ path: "payment.disputes.actions.dueDate" },
|
|
34
|
+
{ path: "payment.notificationOfFraud.createdDate" }
|
|
35
|
+
];
|
|
36
|
+
var TRANSFORM_PATHS_1 = [
|
|
37
|
+
{ path: "payment.charge.billingInfo.address.geocode.latitude" },
|
|
38
|
+
{ path: "payment.charge.billingInfo.address.geocode.longitude" },
|
|
39
|
+
{ path: "payment.charge.shippingInfo.address.geocode.latitude" },
|
|
40
|
+
{ path: "payment.charge.shippingInfo.address.geocode.longitude" }
|
|
41
|
+
];
|
|
42
|
+
var TRANSFORM_PATHS_2 = [
|
|
43
|
+
{ path: "payments.createdDate" },
|
|
44
|
+
{ path: "payments.updatedDate" },
|
|
45
|
+
{ path: "payments.charge.createdDate" },
|
|
46
|
+
{ path: "payments.charge.updatedDate" },
|
|
47
|
+
{ path: "payments.refunds.createdDate" },
|
|
48
|
+
{ path: "payments.refunds.updatedDate" },
|
|
49
|
+
{ path: "payments.disputes.dueDate" },
|
|
50
|
+
{ path: "payments.disputes.defendedDate" },
|
|
51
|
+
{ path: "payments.disputes.acceptedDate" },
|
|
52
|
+
{ path: "payments.disputes.createdDate" },
|
|
53
|
+
{ path: "payments.disputes.updatedDate" },
|
|
54
|
+
{ path: "payments.disputes.actions.dueDate" },
|
|
55
|
+
{ path: "payments.notificationOfFraud.createdDate" }
|
|
56
|
+
];
|
|
57
|
+
var TRANSFORM_PATHS_3 = [
|
|
58
|
+
{ path: "payments.charge.billingInfo.address.geocode.latitude" },
|
|
59
|
+
{ path: "payments.charge.billingInfo.address.geocode.longitude" },
|
|
60
|
+
{ path: "payments.charge.shippingInfo.address.geocode.latitude" },
|
|
61
|
+
{ path: "payments.charge.shippingInfo.address.geocode.longitude" },
|
|
62
|
+
{ path: "aggregationData.results.ranges.results.from" },
|
|
63
|
+
{ path: "aggregationData.results.ranges.results.to" },
|
|
64
|
+
{ path: "aggregationData.results.nested.results.results.*.range.from" },
|
|
65
|
+
{ path: "aggregationData.results.nested.results.results.*.range.to" },
|
|
66
|
+
{ path: "aggregationData.results.scalar.value" },
|
|
67
|
+
{ path: "aggregationData.results.nested.results.results.*.scalar.value" }
|
|
68
|
+
];
|
|
21
69
|
function resolveWixPaymentsPlatformV1PaymentsUrl(opts) {
|
|
22
70
|
const domainToMappings = {
|
|
23
71
|
"api._api_base_domain_": [
|
|
@@ -55,30 +103,11 @@ function getPayment(payload) {
|
|
|
55
103
|
transformResponse: (payload2) => transformPaths(payload2, [
|
|
56
104
|
{
|
|
57
105
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
58
|
-
paths:
|
|
59
|
-
{ path: "payment.createdDate" },
|
|
60
|
-
{ path: "payment.updatedDate" },
|
|
61
|
-
{ path: "payment.charge.createdDate" },
|
|
62
|
-
{ path: "payment.charge.updatedDate" },
|
|
63
|
-
{ path: "payment.refunds.createdDate" },
|
|
64
|
-
{ path: "payment.refunds.updatedDate" },
|
|
65
|
-
{ path: "payment.disputes.dueDate" },
|
|
66
|
-
{ path: "payment.disputes.defendedDate" },
|
|
67
|
-
{ path: "payment.disputes.acceptedDate" },
|
|
68
|
-
{ path: "payment.disputes.createdDate" },
|
|
69
|
-
{ path: "payment.disputes.updatedDate" },
|
|
70
|
-
{ path: "payment.disputes.actions.dueDate" },
|
|
71
|
-
{ path: "payment.notificationOfFraud.createdDate" }
|
|
72
|
-
]
|
|
106
|
+
paths: TRANSFORM_PATHS_0
|
|
73
107
|
},
|
|
74
108
|
{
|
|
75
109
|
transformFn: transformRESTFloatToSDKFloat,
|
|
76
|
-
paths:
|
|
77
|
-
{ path: "payment.charge.billingInfo.address.geocode.latitude" },
|
|
78
|
-
{ path: "payment.charge.billingInfo.address.geocode.longitude" },
|
|
79
|
-
{ path: "payment.charge.shippingInfo.address.geocode.latitude" },
|
|
80
|
-
{ path: "payment.charge.shippingInfo.address.geocode.longitude" }
|
|
81
|
-
]
|
|
110
|
+
paths: TRANSFORM_PATHS_1
|
|
82
111
|
}
|
|
83
112
|
])
|
|
84
113
|
};
|
|
@@ -105,44 +134,11 @@ function searchPayments(payload) {
|
|
|
105
134
|
transformResponse: (payload2) => transformPaths(payload2, [
|
|
106
135
|
{
|
|
107
136
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
108
|
-
paths:
|
|
109
|
-
{ path: "payments.createdDate" },
|
|
110
|
-
{ path: "payments.updatedDate" },
|
|
111
|
-
{ path: "payments.charge.createdDate" },
|
|
112
|
-
{ path: "payments.charge.updatedDate" },
|
|
113
|
-
{ path: "payments.refunds.createdDate" },
|
|
114
|
-
{ path: "payments.refunds.updatedDate" },
|
|
115
|
-
{ path: "payments.disputes.dueDate" },
|
|
116
|
-
{ path: "payments.disputes.defendedDate" },
|
|
117
|
-
{ path: "payments.disputes.acceptedDate" },
|
|
118
|
-
{ path: "payments.disputes.createdDate" },
|
|
119
|
-
{ path: "payments.disputes.updatedDate" },
|
|
120
|
-
{ path: "payments.disputes.actions.dueDate" },
|
|
121
|
-
{ path: "payments.notificationOfFraud.createdDate" }
|
|
122
|
-
]
|
|
137
|
+
paths: TRANSFORM_PATHS_2
|
|
123
138
|
},
|
|
124
139
|
{
|
|
125
140
|
transformFn: transformRESTFloatToSDKFloat,
|
|
126
|
-
paths:
|
|
127
|
-
{ path: "payments.charge.billingInfo.address.geocode.latitude" },
|
|
128
|
-
{ path: "payments.charge.billingInfo.address.geocode.longitude" },
|
|
129
|
-
{ path: "payments.charge.shippingInfo.address.geocode.latitude" },
|
|
130
|
-
{
|
|
131
|
-
path: "payments.charge.shippingInfo.address.geocode.longitude"
|
|
132
|
-
},
|
|
133
|
-
{ path: "aggregationData.results.ranges.results.from" },
|
|
134
|
-
{ path: "aggregationData.results.ranges.results.to" },
|
|
135
|
-
{
|
|
136
|
-
path: "aggregationData.results.nested.results.results.*.range.from"
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
path: "aggregationData.results.nested.results.results.*.range.to"
|
|
140
|
-
},
|
|
141
|
-
{ path: "aggregationData.results.scalar.value" },
|
|
142
|
-
{
|
|
143
|
-
path: "aggregationData.results.nested.results.results.*.scalar.value"
|
|
144
|
-
}
|
|
145
|
-
]
|
|
141
|
+
paths: TRANSFORM_PATHS_3
|
|
146
142
|
}
|
|
147
143
|
])
|
|
148
144
|
};
|
|
@@ -155,6 +151,14 @@ function searchPayments(payload) {
|
|
|
155
151
|
import { transformRESTAddressToSDKAddress } from "@wix/sdk-runtime/transformations/address";
|
|
156
152
|
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
157
153
|
import { createSearchUtils } from "@wix/sdk-runtime/search-builder-utils";
|
|
154
|
+
var TRANSFORM_PATHS_02 = [
|
|
155
|
+
{ path: "payment.charge.billingInfo.address" },
|
|
156
|
+
{ path: "payment.charge.shippingInfo.address" }
|
|
157
|
+
];
|
|
158
|
+
var TRANSFORM_PATHS_12 = [
|
|
159
|
+
{ path: "payments.charge.billingInfo.address" },
|
|
160
|
+
{ path: "payments.charge.shippingInfo.address" }
|
|
161
|
+
];
|
|
158
162
|
var VatType = /* @__PURE__ */ ((VatType2) => {
|
|
159
163
|
VatType2["UNSPECIFIED"] = "UNSPECIFIED";
|
|
160
164
|
VatType2["CPF"] = "CPF";
|
|
@@ -287,10 +291,7 @@ async function getPayment2(paymentId) {
|
|
|
287
291
|
transformPaths2(result.data, [
|
|
288
292
|
{
|
|
289
293
|
transformFn: transformRESTAddressToSDKAddress,
|
|
290
|
-
paths:
|
|
291
|
-
{ path: "payment.charge.billingInfo.address" },
|
|
292
|
-
{ path: "payment.charge.shippingInfo.address" }
|
|
293
|
-
]
|
|
294
|
+
paths: TRANSFORM_PATHS_02
|
|
294
295
|
}
|
|
295
296
|
])
|
|
296
297
|
)?.payment;
|
|
@@ -320,10 +321,7 @@ async function searchPayments2(search) {
|
|
|
320
321
|
transformPaths2(result.data, [
|
|
321
322
|
{
|
|
322
323
|
transformFn: transformRESTAddressToSDKAddress,
|
|
323
|
-
paths:
|
|
324
|
-
{ path: "payments.charge.billingInfo.address" },
|
|
325
|
-
{ path: "payments.charge.shippingInfo.address" }
|
|
326
|
-
]
|
|
324
|
+
paths: TRANSFORM_PATHS_12
|
|
327
325
|
}
|
|
328
326
|
])
|
|
329
327
|
);
|
|
@@ -346,6 +344,61 @@ var utils = {
|
|
|
346
344
|
};
|
|
347
345
|
|
|
348
346
|
// src/payments-platform-v1-payment-payments.public.ts
|
|
347
|
+
var TRANSFORM_PATHS_03 = [
|
|
348
|
+
{ path: "entity.createdDate" },
|
|
349
|
+
{ path: "entity.updatedDate" },
|
|
350
|
+
{ path: "entity.charge.createdDate" },
|
|
351
|
+
{ path: "entity.charge.updatedDate" },
|
|
352
|
+
{ path: "entity.refunds.createdDate" },
|
|
353
|
+
{ path: "entity.refunds.updatedDate" },
|
|
354
|
+
{ path: "entity.disputes.dueDate" },
|
|
355
|
+
{ path: "entity.disputes.defendedDate" },
|
|
356
|
+
{ path: "entity.disputes.acceptedDate" },
|
|
357
|
+
{ path: "entity.disputes.createdDate" },
|
|
358
|
+
{ path: "entity.disputes.updatedDate" },
|
|
359
|
+
{ path: "entity.disputes.actions.dueDate" },
|
|
360
|
+
{ path: "entity.notificationOfFraud.createdDate" },
|
|
361
|
+
{ path: "metadata.eventTime" }
|
|
362
|
+
];
|
|
363
|
+
var TRANSFORM_PATHS_13 = [
|
|
364
|
+
{ path: "entity.charge.billingInfo.address" },
|
|
365
|
+
{ path: "entity.charge.shippingInfo.address" }
|
|
366
|
+
];
|
|
367
|
+
var TRANSFORM_PATHS_22 = [
|
|
368
|
+
{ path: "entity.createdDate" },
|
|
369
|
+
{ path: "entity.updatedDate" },
|
|
370
|
+
{ path: "entity.charge.createdDate" },
|
|
371
|
+
{ path: "entity.charge.updatedDate" },
|
|
372
|
+
{ path: "entity.refunds.createdDate" },
|
|
373
|
+
{ path: "entity.refunds.updatedDate" },
|
|
374
|
+
{ path: "entity.disputes.dueDate" },
|
|
375
|
+
{ path: "entity.disputes.defendedDate" },
|
|
376
|
+
{ path: "entity.disputes.acceptedDate" },
|
|
377
|
+
{ path: "entity.disputes.createdDate" },
|
|
378
|
+
{ path: "entity.disputes.updatedDate" },
|
|
379
|
+
{ path: "entity.disputes.actions.dueDate" },
|
|
380
|
+
{ path: "entity.notificationOfFraud.createdDate" },
|
|
381
|
+
{ path: "metadata.eventTime" },
|
|
382
|
+
{ path: "modifiedFields.createdDate" },
|
|
383
|
+
{ path: "modifiedFields.updatedDate" },
|
|
384
|
+
{ path: "modifiedFields.charge.createdDate" },
|
|
385
|
+
{ path: "modifiedFields.charge.updatedDate" },
|
|
386
|
+
{ path: "modifiedFields.refunds.createdDate" },
|
|
387
|
+
{ path: "modifiedFields.refunds.updatedDate" },
|
|
388
|
+
{ path: "modifiedFields.disputes.dueDate" },
|
|
389
|
+
{ path: "modifiedFields.disputes.defendedDate" },
|
|
390
|
+
{ path: "modifiedFields.disputes.acceptedDate" },
|
|
391
|
+
{ path: "modifiedFields.disputes.createdDate" },
|
|
392
|
+
{ path: "modifiedFields.disputes.updatedDate" },
|
|
393
|
+
{ path: "modifiedFields.disputes.actions.dueDate" },
|
|
394
|
+
{ path: "modifiedFields.notificationOfFraud.createdDate" }
|
|
395
|
+
];
|
|
396
|
+
var TRANSFORM_PATHS_32 = [
|
|
397
|
+
{ path: "entity.charge.billingInfo.address" },
|
|
398
|
+
{ path: "entity.charge.shippingInfo.address" },
|
|
399
|
+
{ path: "modifiedFields.charge.billingInfo.address" },
|
|
400
|
+
{ path: "modifiedFields.charge.shippingInfo.address" }
|
|
401
|
+
];
|
|
349
402
|
function getPayment3(httpClient) {
|
|
350
403
|
return (paymentId) => getPayment2(
|
|
351
404
|
paymentId,
|
|
@@ -367,29 +420,11 @@ var onPaymentCreated = /* @__PURE__ */ EventDefinition(
|
|
|
367
420
|
transformPaths3(event, [
|
|
368
421
|
{
|
|
369
422
|
transformFn: transformRESTTimestampToSDKTimestamp2,
|
|
370
|
-
paths:
|
|
371
|
-
{ path: "entity.createdDate" },
|
|
372
|
-
{ path: "entity.updatedDate" },
|
|
373
|
-
{ path: "entity.charge.createdDate" },
|
|
374
|
-
{ path: "entity.charge.updatedDate" },
|
|
375
|
-
{ path: "entity.refunds.createdDate" },
|
|
376
|
-
{ path: "entity.refunds.updatedDate" },
|
|
377
|
-
{ path: "entity.disputes.dueDate" },
|
|
378
|
-
{ path: "entity.disputes.defendedDate" },
|
|
379
|
-
{ path: "entity.disputes.acceptedDate" },
|
|
380
|
-
{ path: "entity.disputes.createdDate" },
|
|
381
|
-
{ path: "entity.disputes.updatedDate" },
|
|
382
|
-
{ path: "entity.disputes.actions.dueDate" },
|
|
383
|
-
{ path: "entity.notificationOfFraud.createdDate" },
|
|
384
|
-
{ path: "metadata.eventTime" }
|
|
385
|
-
]
|
|
423
|
+
paths: TRANSFORM_PATHS_03
|
|
386
424
|
},
|
|
387
425
|
{
|
|
388
426
|
transformFn: transformRESTAddressToSDKAddress2,
|
|
389
|
-
paths:
|
|
390
|
-
{ path: "entity.charge.billingInfo.address" },
|
|
391
|
-
{ path: "entity.charge.shippingInfo.address" }
|
|
392
|
-
]
|
|
427
|
+
paths: TRANSFORM_PATHS_13
|
|
393
428
|
}
|
|
394
429
|
])
|
|
395
430
|
)
|
|
@@ -401,44 +436,11 @@ var onPaymentUpdated = /* @__PURE__ */ EventDefinition(
|
|
|
401
436
|
transformPaths3(event, [
|
|
402
437
|
{
|
|
403
438
|
transformFn: transformRESTTimestampToSDKTimestamp2,
|
|
404
|
-
paths:
|
|
405
|
-
{ path: "entity.createdDate" },
|
|
406
|
-
{ path: "entity.updatedDate" },
|
|
407
|
-
{ path: "entity.charge.createdDate" },
|
|
408
|
-
{ path: "entity.charge.updatedDate" },
|
|
409
|
-
{ path: "entity.refunds.createdDate" },
|
|
410
|
-
{ path: "entity.refunds.updatedDate" },
|
|
411
|
-
{ path: "entity.disputes.dueDate" },
|
|
412
|
-
{ path: "entity.disputes.defendedDate" },
|
|
413
|
-
{ path: "entity.disputes.acceptedDate" },
|
|
414
|
-
{ path: "entity.disputes.createdDate" },
|
|
415
|
-
{ path: "entity.disputes.updatedDate" },
|
|
416
|
-
{ path: "entity.disputes.actions.dueDate" },
|
|
417
|
-
{ path: "entity.notificationOfFraud.createdDate" },
|
|
418
|
-
{ path: "metadata.eventTime" },
|
|
419
|
-
{ path: "modifiedFields.createdDate" },
|
|
420
|
-
{ path: "modifiedFields.updatedDate" },
|
|
421
|
-
{ path: "modifiedFields.charge.createdDate" },
|
|
422
|
-
{ path: "modifiedFields.charge.updatedDate" },
|
|
423
|
-
{ path: "modifiedFields.refunds.createdDate" },
|
|
424
|
-
{ path: "modifiedFields.refunds.updatedDate" },
|
|
425
|
-
{ path: "modifiedFields.disputes.dueDate" },
|
|
426
|
-
{ path: "modifiedFields.disputes.defendedDate" },
|
|
427
|
-
{ path: "modifiedFields.disputes.acceptedDate" },
|
|
428
|
-
{ path: "modifiedFields.disputes.createdDate" },
|
|
429
|
-
{ path: "modifiedFields.disputes.updatedDate" },
|
|
430
|
-
{ path: "modifiedFields.disputes.actions.dueDate" },
|
|
431
|
-
{ path: "modifiedFields.notificationOfFraud.createdDate" }
|
|
432
|
-
]
|
|
439
|
+
paths: TRANSFORM_PATHS_22
|
|
433
440
|
},
|
|
434
441
|
{
|
|
435
442
|
transformFn: transformRESTAddressToSDKAddress2,
|
|
436
|
-
paths:
|
|
437
|
-
{ path: "entity.charge.billingInfo.address" },
|
|
438
|
-
{ path: "entity.charge.shippingInfo.address" },
|
|
439
|
-
{ path: "modifiedFields.charge.billingInfo.address" },
|
|
440
|
-
{ path: "modifiedFields.charge.shippingInfo.address" }
|
|
441
|
-
]
|
|
443
|
+
paths: TRANSFORM_PATHS_32
|
|
442
444
|
}
|
|
443
445
|
])
|
|
444
446
|
)
|