@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/cjs/index.js
CHANGED
|
@@ -60,6 +60,54 @@ var import_float = require("@wix/sdk-runtime/transformations/float");
|
|
|
60
60
|
var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
61
61
|
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
62
62
|
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
63
|
+
var TRANSFORM_PATHS_0 = [
|
|
64
|
+
{ path: "payment.createdDate" },
|
|
65
|
+
{ path: "payment.updatedDate" },
|
|
66
|
+
{ path: "payment.charge.createdDate" },
|
|
67
|
+
{ path: "payment.charge.updatedDate" },
|
|
68
|
+
{ path: "payment.refunds.createdDate" },
|
|
69
|
+
{ path: "payment.refunds.updatedDate" },
|
|
70
|
+
{ path: "payment.disputes.dueDate" },
|
|
71
|
+
{ path: "payment.disputes.defendedDate" },
|
|
72
|
+
{ path: "payment.disputes.acceptedDate" },
|
|
73
|
+
{ path: "payment.disputes.createdDate" },
|
|
74
|
+
{ path: "payment.disputes.updatedDate" },
|
|
75
|
+
{ path: "payment.disputes.actions.dueDate" },
|
|
76
|
+
{ path: "payment.notificationOfFraud.createdDate" }
|
|
77
|
+
];
|
|
78
|
+
var TRANSFORM_PATHS_1 = [
|
|
79
|
+
{ path: "payment.charge.billingInfo.address.geocode.latitude" },
|
|
80
|
+
{ path: "payment.charge.billingInfo.address.geocode.longitude" },
|
|
81
|
+
{ path: "payment.charge.shippingInfo.address.geocode.latitude" },
|
|
82
|
+
{ path: "payment.charge.shippingInfo.address.geocode.longitude" }
|
|
83
|
+
];
|
|
84
|
+
var TRANSFORM_PATHS_2 = [
|
|
85
|
+
{ path: "payments.createdDate" },
|
|
86
|
+
{ path: "payments.updatedDate" },
|
|
87
|
+
{ path: "payments.charge.createdDate" },
|
|
88
|
+
{ path: "payments.charge.updatedDate" },
|
|
89
|
+
{ path: "payments.refunds.createdDate" },
|
|
90
|
+
{ path: "payments.refunds.updatedDate" },
|
|
91
|
+
{ path: "payments.disputes.dueDate" },
|
|
92
|
+
{ path: "payments.disputes.defendedDate" },
|
|
93
|
+
{ path: "payments.disputes.acceptedDate" },
|
|
94
|
+
{ path: "payments.disputes.createdDate" },
|
|
95
|
+
{ path: "payments.disputes.updatedDate" },
|
|
96
|
+
{ path: "payments.disputes.actions.dueDate" },
|
|
97
|
+
{ path: "payments.notificationOfFraud.createdDate" }
|
|
98
|
+
];
|
|
99
|
+
var TRANSFORM_PATHS_3 = [
|
|
100
|
+
{ path: "payments.charge.billingInfo.address.geocode.latitude" },
|
|
101
|
+
{ path: "payments.charge.billingInfo.address.geocode.longitude" },
|
|
102
|
+
{ path: "payments.charge.shippingInfo.address.geocode.latitude" },
|
|
103
|
+
{ path: "payments.charge.shippingInfo.address.geocode.longitude" },
|
|
104
|
+
{ path: "aggregationData.results.ranges.results.from" },
|
|
105
|
+
{ path: "aggregationData.results.ranges.results.to" },
|
|
106
|
+
{ path: "aggregationData.results.nested.results.results.*.range.from" },
|
|
107
|
+
{ path: "aggregationData.results.nested.results.results.*.range.to" },
|
|
108
|
+
{ path: "aggregationData.results.scalar.value" },
|
|
109
|
+
{ path: "aggregationData.results.nested.results.results.*.scalar.value" }
|
|
110
|
+
];
|
|
63
111
|
function resolveWixPaymentsPlatformV1PaymentsUrl(opts) {
|
|
64
112
|
const domainToMappings = {
|
|
65
113
|
"api._api_base_domain_": [
|
|
@@ -97,30 +145,11 @@ function getPayment(payload) {
|
|
|
97
145
|
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
98
146
|
{
|
|
99
147
|
transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
|
|
100
|
-
paths:
|
|
101
|
-
{ path: "payment.createdDate" },
|
|
102
|
-
{ path: "payment.updatedDate" },
|
|
103
|
-
{ path: "payment.charge.createdDate" },
|
|
104
|
-
{ path: "payment.charge.updatedDate" },
|
|
105
|
-
{ path: "payment.refunds.createdDate" },
|
|
106
|
-
{ path: "payment.refunds.updatedDate" },
|
|
107
|
-
{ path: "payment.disputes.dueDate" },
|
|
108
|
-
{ path: "payment.disputes.defendedDate" },
|
|
109
|
-
{ path: "payment.disputes.acceptedDate" },
|
|
110
|
-
{ path: "payment.disputes.createdDate" },
|
|
111
|
-
{ path: "payment.disputes.updatedDate" },
|
|
112
|
-
{ path: "payment.disputes.actions.dueDate" },
|
|
113
|
-
{ path: "payment.notificationOfFraud.createdDate" }
|
|
114
|
-
]
|
|
148
|
+
paths: TRANSFORM_PATHS_0
|
|
115
149
|
},
|
|
116
150
|
{
|
|
117
151
|
transformFn: import_float.transformRESTFloatToSDKFloat,
|
|
118
|
-
paths:
|
|
119
|
-
{ path: "payment.charge.billingInfo.address.geocode.latitude" },
|
|
120
|
-
{ path: "payment.charge.billingInfo.address.geocode.longitude" },
|
|
121
|
-
{ path: "payment.charge.shippingInfo.address.geocode.latitude" },
|
|
122
|
-
{ path: "payment.charge.shippingInfo.address.geocode.longitude" }
|
|
123
|
-
]
|
|
152
|
+
paths: TRANSFORM_PATHS_1
|
|
124
153
|
}
|
|
125
154
|
])
|
|
126
155
|
};
|
|
@@ -147,44 +176,11 @@ function searchPayments(payload) {
|
|
|
147
176
|
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
148
177
|
{
|
|
149
178
|
transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
|
|
150
|
-
paths:
|
|
151
|
-
{ path: "payments.createdDate" },
|
|
152
|
-
{ path: "payments.updatedDate" },
|
|
153
|
-
{ path: "payments.charge.createdDate" },
|
|
154
|
-
{ path: "payments.charge.updatedDate" },
|
|
155
|
-
{ path: "payments.refunds.createdDate" },
|
|
156
|
-
{ path: "payments.refunds.updatedDate" },
|
|
157
|
-
{ path: "payments.disputes.dueDate" },
|
|
158
|
-
{ path: "payments.disputes.defendedDate" },
|
|
159
|
-
{ path: "payments.disputes.acceptedDate" },
|
|
160
|
-
{ path: "payments.disputes.createdDate" },
|
|
161
|
-
{ path: "payments.disputes.updatedDate" },
|
|
162
|
-
{ path: "payments.disputes.actions.dueDate" },
|
|
163
|
-
{ path: "payments.notificationOfFraud.createdDate" }
|
|
164
|
-
]
|
|
179
|
+
paths: TRANSFORM_PATHS_2
|
|
165
180
|
},
|
|
166
181
|
{
|
|
167
182
|
transformFn: import_float.transformRESTFloatToSDKFloat,
|
|
168
|
-
paths:
|
|
169
|
-
{ path: "payments.charge.billingInfo.address.geocode.latitude" },
|
|
170
|
-
{ path: "payments.charge.billingInfo.address.geocode.longitude" },
|
|
171
|
-
{ path: "payments.charge.shippingInfo.address.geocode.latitude" },
|
|
172
|
-
{
|
|
173
|
-
path: "payments.charge.shippingInfo.address.geocode.longitude"
|
|
174
|
-
},
|
|
175
|
-
{ path: "aggregationData.results.ranges.results.from" },
|
|
176
|
-
{ path: "aggregationData.results.ranges.results.to" },
|
|
177
|
-
{
|
|
178
|
-
path: "aggregationData.results.nested.results.results.*.range.from"
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
path: "aggregationData.results.nested.results.results.*.range.to"
|
|
182
|
-
},
|
|
183
|
-
{ path: "aggregationData.results.scalar.value" },
|
|
184
|
-
{
|
|
185
|
-
path: "aggregationData.results.nested.results.results.*.scalar.value"
|
|
186
|
-
}
|
|
187
|
-
]
|
|
183
|
+
paths: TRANSFORM_PATHS_3
|
|
188
184
|
}
|
|
189
185
|
])
|
|
190
186
|
};
|
|
@@ -197,6 +193,14 @@ function searchPayments(payload) {
|
|
|
197
193
|
var import_address = require("@wix/sdk-runtime/transformations/address");
|
|
198
194
|
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
199
195
|
var import_search_builder_utils = require("@wix/sdk-runtime/search-builder-utils");
|
|
196
|
+
var TRANSFORM_PATHS_02 = [
|
|
197
|
+
{ path: "payment.charge.billingInfo.address" },
|
|
198
|
+
{ path: "payment.charge.shippingInfo.address" }
|
|
199
|
+
];
|
|
200
|
+
var TRANSFORM_PATHS_12 = [
|
|
201
|
+
{ path: "payments.charge.billingInfo.address" },
|
|
202
|
+
{ path: "payments.charge.shippingInfo.address" }
|
|
203
|
+
];
|
|
200
204
|
var VatType = /* @__PURE__ */ ((VatType2) => {
|
|
201
205
|
VatType2["UNSPECIFIED"] = "UNSPECIFIED";
|
|
202
206
|
VatType2["CPF"] = "CPF";
|
|
@@ -329,10 +333,7 @@ async function getPayment2(paymentId) {
|
|
|
329
333
|
(0, import_transform_paths2.transformPaths)(result.data, [
|
|
330
334
|
{
|
|
331
335
|
transformFn: import_address.transformRESTAddressToSDKAddress,
|
|
332
|
-
paths:
|
|
333
|
-
{ path: "payment.charge.billingInfo.address" },
|
|
334
|
-
{ path: "payment.charge.shippingInfo.address" }
|
|
335
|
-
]
|
|
336
|
+
paths: TRANSFORM_PATHS_02
|
|
336
337
|
}
|
|
337
338
|
])
|
|
338
339
|
)?.payment;
|
|
@@ -362,10 +363,7 @@ async function searchPayments2(search) {
|
|
|
362
363
|
(0, import_transform_paths2.transformPaths)(result.data, [
|
|
363
364
|
{
|
|
364
365
|
transformFn: import_address.transformRESTAddressToSDKAddress,
|
|
365
|
-
paths:
|
|
366
|
-
{ path: "payments.charge.billingInfo.address" },
|
|
367
|
-
{ path: "payments.charge.shippingInfo.address" }
|
|
368
|
-
]
|
|
366
|
+
paths: TRANSFORM_PATHS_12
|
|
369
367
|
}
|
|
370
368
|
])
|
|
371
369
|
);
|
|
@@ -388,6 +386,61 @@ var utils = {
|
|
|
388
386
|
};
|
|
389
387
|
|
|
390
388
|
// src/payments-platform-v1-payment-payments.public.ts
|
|
389
|
+
var TRANSFORM_PATHS_03 = [
|
|
390
|
+
{ path: "entity.createdDate" },
|
|
391
|
+
{ path: "entity.updatedDate" },
|
|
392
|
+
{ path: "entity.charge.createdDate" },
|
|
393
|
+
{ path: "entity.charge.updatedDate" },
|
|
394
|
+
{ path: "entity.refunds.createdDate" },
|
|
395
|
+
{ path: "entity.refunds.updatedDate" },
|
|
396
|
+
{ path: "entity.disputes.dueDate" },
|
|
397
|
+
{ path: "entity.disputes.defendedDate" },
|
|
398
|
+
{ path: "entity.disputes.acceptedDate" },
|
|
399
|
+
{ path: "entity.disputes.createdDate" },
|
|
400
|
+
{ path: "entity.disputes.updatedDate" },
|
|
401
|
+
{ path: "entity.disputes.actions.dueDate" },
|
|
402
|
+
{ path: "entity.notificationOfFraud.createdDate" },
|
|
403
|
+
{ path: "metadata.eventTime" }
|
|
404
|
+
];
|
|
405
|
+
var TRANSFORM_PATHS_13 = [
|
|
406
|
+
{ path: "entity.charge.billingInfo.address" },
|
|
407
|
+
{ path: "entity.charge.shippingInfo.address" }
|
|
408
|
+
];
|
|
409
|
+
var TRANSFORM_PATHS_22 = [
|
|
410
|
+
{ path: "entity.createdDate" },
|
|
411
|
+
{ path: "entity.updatedDate" },
|
|
412
|
+
{ path: "entity.charge.createdDate" },
|
|
413
|
+
{ path: "entity.charge.updatedDate" },
|
|
414
|
+
{ path: "entity.refunds.createdDate" },
|
|
415
|
+
{ path: "entity.refunds.updatedDate" },
|
|
416
|
+
{ path: "entity.disputes.dueDate" },
|
|
417
|
+
{ path: "entity.disputes.defendedDate" },
|
|
418
|
+
{ path: "entity.disputes.acceptedDate" },
|
|
419
|
+
{ path: "entity.disputes.createdDate" },
|
|
420
|
+
{ path: "entity.disputes.updatedDate" },
|
|
421
|
+
{ path: "entity.disputes.actions.dueDate" },
|
|
422
|
+
{ path: "entity.notificationOfFraud.createdDate" },
|
|
423
|
+
{ path: "metadata.eventTime" },
|
|
424
|
+
{ path: "modifiedFields.createdDate" },
|
|
425
|
+
{ path: "modifiedFields.updatedDate" },
|
|
426
|
+
{ path: "modifiedFields.charge.createdDate" },
|
|
427
|
+
{ path: "modifiedFields.charge.updatedDate" },
|
|
428
|
+
{ path: "modifiedFields.refunds.createdDate" },
|
|
429
|
+
{ path: "modifiedFields.refunds.updatedDate" },
|
|
430
|
+
{ path: "modifiedFields.disputes.dueDate" },
|
|
431
|
+
{ path: "modifiedFields.disputes.defendedDate" },
|
|
432
|
+
{ path: "modifiedFields.disputes.acceptedDate" },
|
|
433
|
+
{ path: "modifiedFields.disputes.createdDate" },
|
|
434
|
+
{ path: "modifiedFields.disputes.updatedDate" },
|
|
435
|
+
{ path: "modifiedFields.disputes.actions.dueDate" },
|
|
436
|
+
{ path: "modifiedFields.notificationOfFraud.createdDate" }
|
|
437
|
+
];
|
|
438
|
+
var TRANSFORM_PATHS_32 = [
|
|
439
|
+
{ path: "entity.charge.billingInfo.address" },
|
|
440
|
+
{ path: "entity.charge.shippingInfo.address" },
|
|
441
|
+
{ path: "modifiedFields.charge.billingInfo.address" },
|
|
442
|
+
{ path: "modifiedFields.charge.shippingInfo.address" }
|
|
443
|
+
];
|
|
391
444
|
function getPayment3(httpClient) {
|
|
392
445
|
return (paymentId) => getPayment2(
|
|
393
446
|
paymentId,
|
|
@@ -409,29 +462,11 @@ var onPaymentCreated = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
|
|
|
409
462
|
(0, import_transform_paths3.transformPaths)(event, [
|
|
410
463
|
{
|
|
411
464
|
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
412
|
-
paths:
|
|
413
|
-
{ path: "entity.createdDate" },
|
|
414
|
-
{ path: "entity.updatedDate" },
|
|
415
|
-
{ path: "entity.charge.createdDate" },
|
|
416
|
-
{ path: "entity.charge.updatedDate" },
|
|
417
|
-
{ path: "entity.refunds.createdDate" },
|
|
418
|
-
{ path: "entity.refunds.updatedDate" },
|
|
419
|
-
{ path: "entity.disputes.dueDate" },
|
|
420
|
-
{ path: "entity.disputes.defendedDate" },
|
|
421
|
-
{ path: "entity.disputes.acceptedDate" },
|
|
422
|
-
{ path: "entity.disputes.createdDate" },
|
|
423
|
-
{ path: "entity.disputes.updatedDate" },
|
|
424
|
-
{ path: "entity.disputes.actions.dueDate" },
|
|
425
|
-
{ path: "entity.notificationOfFraud.createdDate" },
|
|
426
|
-
{ path: "metadata.eventTime" }
|
|
427
|
-
]
|
|
465
|
+
paths: TRANSFORM_PATHS_03
|
|
428
466
|
},
|
|
429
467
|
{
|
|
430
468
|
transformFn: import_address2.transformRESTAddressToSDKAddress,
|
|
431
|
-
paths:
|
|
432
|
-
{ path: "entity.charge.billingInfo.address" },
|
|
433
|
-
{ path: "entity.charge.shippingInfo.address" }
|
|
434
|
-
]
|
|
469
|
+
paths: TRANSFORM_PATHS_13
|
|
435
470
|
}
|
|
436
471
|
])
|
|
437
472
|
)
|
|
@@ -443,44 +478,11 @@ var onPaymentUpdated = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
|
|
|
443
478
|
(0, import_transform_paths3.transformPaths)(event, [
|
|
444
479
|
{
|
|
445
480
|
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
446
|
-
paths:
|
|
447
|
-
{ path: "entity.createdDate" },
|
|
448
|
-
{ path: "entity.updatedDate" },
|
|
449
|
-
{ path: "entity.charge.createdDate" },
|
|
450
|
-
{ path: "entity.charge.updatedDate" },
|
|
451
|
-
{ path: "entity.refunds.createdDate" },
|
|
452
|
-
{ path: "entity.refunds.updatedDate" },
|
|
453
|
-
{ path: "entity.disputes.dueDate" },
|
|
454
|
-
{ path: "entity.disputes.defendedDate" },
|
|
455
|
-
{ path: "entity.disputes.acceptedDate" },
|
|
456
|
-
{ path: "entity.disputes.createdDate" },
|
|
457
|
-
{ path: "entity.disputes.updatedDate" },
|
|
458
|
-
{ path: "entity.disputes.actions.dueDate" },
|
|
459
|
-
{ path: "entity.notificationOfFraud.createdDate" },
|
|
460
|
-
{ path: "metadata.eventTime" },
|
|
461
|
-
{ path: "modifiedFields.createdDate" },
|
|
462
|
-
{ path: "modifiedFields.updatedDate" },
|
|
463
|
-
{ path: "modifiedFields.charge.createdDate" },
|
|
464
|
-
{ path: "modifiedFields.charge.updatedDate" },
|
|
465
|
-
{ path: "modifiedFields.refunds.createdDate" },
|
|
466
|
-
{ path: "modifiedFields.refunds.updatedDate" },
|
|
467
|
-
{ path: "modifiedFields.disputes.dueDate" },
|
|
468
|
-
{ path: "modifiedFields.disputes.defendedDate" },
|
|
469
|
-
{ path: "modifiedFields.disputes.acceptedDate" },
|
|
470
|
-
{ path: "modifiedFields.disputes.createdDate" },
|
|
471
|
-
{ path: "modifiedFields.disputes.updatedDate" },
|
|
472
|
-
{ path: "modifiedFields.disputes.actions.dueDate" },
|
|
473
|
-
{ path: "modifiedFields.notificationOfFraud.createdDate" }
|
|
474
|
-
]
|
|
481
|
+
paths: TRANSFORM_PATHS_22
|
|
475
482
|
},
|
|
476
483
|
{
|
|
477
484
|
transformFn: import_address2.transformRESTAddressToSDKAddress,
|
|
478
|
-
paths:
|
|
479
|
-
{ path: "entity.charge.billingInfo.address" },
|
|
480
|
-
{ path: "entity.charge.shippingInfo.address" },
|
|
481
|
-
{ path: "modifiedFields.charge.billingInfo.address" },
|
|
482
|
-
{ path: "modifiedFields.charge.shippingInfo.address" }
|
|
483
|
-
]
|
|
485
|
+
paths: TRANSFORM_PATHS_32
|
|
484
486
|
}
|
|
485
487
|
])
|
|
486
488
|
)
|