@wix/auto_sdk_payments_payments 1.0.0

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.
Files changed (56) hide show
  1. package/build/cjs/index.d.ts +54 -0
  2. package/build/cjs/index.js +523 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +34 -0
  5. package/build/cjs/index.typings.js +401 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1424 -0
  8. package/build/cjs/meta.js +359 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/payments-platform-v1-payment-payments.universal-DeCl2FPc.d.ts +1650 -0
  11. package/build/cjs/schemas.d.ts +500 -0
  12. package/build/cjs/schemas.js +810 -0
  13. package/build/cjs/schemas.js.map +1 -0
  14. package/build/es/index.d.mts +54 -0
  15. package/build/es/index.mjs +480 -0
  16. package/build/es/index.mjs.map +1 -0
  17. package/build/es/index.typings.d.mts +34 -0
  18. package/build/es/index.typings.mjs +360 -0
  19. package/build/es/index.typings.mjs.map +1 -0
  20. package/build/es/meta.d.mts +1424 -0
  21. package/build/es/meta.mjs +316 -0
  22. package/build/es/meta.mjs.map +1 -0
  23. package/build/es/package.json +3 -0
  24. package/build/es/payments-platform-v1-payment-payments.universal-DeCl2FPc.d.mts +1650 -0
  25. package/build/es/schemas.d.mts +500 -0
  26. package/build/es/schemas.mjs +770 -0
  27. package/build/es/schemas.mjs.map +1 -0
  28. package/build/internal/cjs/index.d.ts +54 -0
  29. package/build/internal/cjs/index.js +523 -0
  30. package/build/internal/cjs/index.js.map +1 -0
  31. package/build/internal/cjs/index.typings.d.ts +34 -0
  32. package/build/internal/cjs/index.typings.js +401 -0
  33. package/build/internal/cjs/index.typings.js.map +1 -0
  34. package/build/internal/cjs/meta.d.ts +1521 -0
  35. package/build/internal/cjs/meta.js +359 -0
  36. package/build/internal/cjs/meta.js.map +1 -0
  37. package/build/internal/cjs/payments-platform-v1-payment-payments.universal-C5s3nmb-.d.ts +1705 -0
  38. package/build/internal/cjs/schemas.d.ts +500 -0
  39. package/build/internal/cjs/schemas.js +810 -0
  40. package/build/internal/cjs/schemas.js.map +1 -0
  41. package/build/internal/es/index.d.mts +54 -0
  42. package/build/internal/es/index.mjs +480 -0
  43. package/build/internal/es/index.mjs.map +1 -0
  44. package/build/internal/es/index.typings.d.mts +34 -0
  45. package/build/internal/es/index.typings.mjs +360 -0
  46. package/build/internal/es/index.typings.mjs.map +1 -0
  47. package/build/internal/es/meta.d.mts +1521 -0
  48. package/build/internal/es/meta.mjs +316 -0
  49. package/build/internal/es/meta.mjs.map +1 -0
  50. package/build/internal/es/payments-platform-v1-payment-payments.universal-C5s3nmb-.d.mts +1705 -0
  51. package/build/internal/es/schemas.d.mts +500 -0
  52. package/build/internal/es/schemas.mjs +770 -0
  53. package/build/internal/es/schemas.mjs.map +1 -0
  54. package/meta/package.json +3 -0
  55. package/package.json +61 -0
  56. package/schemas/package.json +3 -0
@@ -0,0 +1,523 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ AggregationType: () => AggregationType,
24
+ DisputeActionType: () => DisputeActionType,
25
+ DisputeChannel: () => DisputeChannel,
26
+ DisputeReason: () => DisputeReason,
27
+ DisputeStage: () => DisputeStage,
28
+ DisputeStatus: () => DisputeStatus,
29
+ Mode: () => Mode,
30
+ Reason: () => Reason,
31
+ RefundStatus: () => RefundStatus,
32
+ ScalarType: () => ScalarType,
33
+ SellerProtection: () => SellerProtection,
34
+ SortOrder: () => SortOrder,
35
+ Status: () => Status,
36
+ VatType: () => VatType,
37
+ WebhookIdentityType: () => WebhookIdentityType,
38
+ getPayment: () => getPayment4,
39
+ onPaymentCreated: () => onPaymentCreated2,
40
+ onPaymentUpdated: () => onPaymentUpdated2,
41
+ searchPayments: () => searchPayments4,
42
+ utils: () => utils
43
+ });
44
+ module.exports = __toCommonJS(index_exports);
45
+
46
+ // src/payments-platform-v1-payment-payments.public.ts
47
+ var import_rename_all_nested_keys2 = require("@wix/sdk-runtime/rename-all-nested-keys");
48
+ var import_address2 = require("@wix/sdk-runtime/transformations/address");
49
+ var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
50
+ var import_transform_paths3 = require("@wix/sdk-runtime/transformations/transform-paths");
51
+ var import_sdk_types = require("@wix/sdk-types");
52
+
53
+ // src/payments-platform-v1-payment-payments.universal.ts
54
+ var import_transform_error = require("@wix/sdk-runtime/transform-error");
55
+ var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
56
+
57
+ // src/payments-platform-v1-payment-payments.http.ts
58
+ var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
59
+ var import_float = require("@wix/sdk-runtime/transformations/float");
60
+ var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
61
+ var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
62
+ var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
63
+ function resolveWixPaymentsPlatformV1PaymentsUrl(opts) {
64
+ const domainToMappings = {
65
+ "api._api_base_domain_": [
66
+ {
67
+ srcPath: "/payments",
68
+ destPath: ""
69
+ }
70
+ ],
71
+ "www.wixapis.com": [
72
+ {
73
+ srcPath: "/payments/platform/v1/payments",
74
+ destPath: "/v1/payments"
75
+ }
76
+ ]
77
+ };
78
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
79
+ }
80
+ var PACKAGE_NAME = "@wix/auto_sdk_payments_payments";
81
+ function getPayment(payload) {
82
+ function __getPayment({ host }) {
83
+ const metadata = {
84
+ entityFqdn: "wix.payments.platform.v1.payment",
85
+ method: "GET",
86
+ methodFqn: "wix.payments.platform.v1.Payments.GetPayment",
87
+ packageName: PACKAGE_NAME,
88
+ migrationOptions: {
89
+ optInTransformResponse: true
90
+ },
91
+ url: resolveWixPaymentsPlatformV1PaymentsUrl({
92
+ protoPath: "/v1/payments/{paymentId}",
93
+ data: payload,
94
+ host
95
+ }),
96
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
97
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
98
+ {
99
+ 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
+ ]
115
+ },
116
+ {
117
+ 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
+ ]
124
+ }
125
+ ])
126
+ };
127
+ return metadata;
128
+ }
129
+ return __getPayment;
130
+ }
131
+ function searchPayments(payload) {
132
+ function __searchPayments({ host }) {
133
+ const metadata = {
134
+ entityFqdn: "wix.payments.platform.v1.payment",
135
+ method: "POST",
136
+ methodFqn: "wix.payments.platform.v1.Payments.SearchPayments",
137
+ packageName: PACKAGE_NAME,
138
+ migrationOptions: {
139
+ optInTransformResponse: true
140
+ },
141
+ url: resolveWixPaymentsPlatformV1PaymentsUrl({
142
+ protoPath: "/v1/payments/search",
143
+ data: payload,
144
+ host
145
+ }),
146
+ data: payload,
147
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
148
+ {
149
+ 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
+ ]
165
+ },
166
+ {
167
+ 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
+ ]
188
+ }
189
+ ])
190
+ };
191
+ return metadata;
192
+ }
193
+ return __searchPayments;
194
+ }
195
+
196
+ // src/payments-platform-v1-payment-payments.universal.ts
197
+ var import_address = require("@wix/sdk-runtime/transformations/address");
198
+ var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
199
+ var import_search_builder_utils = require("@wix/sdk-runtime/search-builder-utils");
200
+ var VatType = /* @__PURE__ */ ((VatType2) => {
201
+ VatType2["UNSPECIFIED"] = "UNSPECIFIED";
202
+ VatType2["CPF"] = "CPF";
203
+ VatType2["CNPJ"] = "CNPJ";
204
+ return VatType2;
205
+ })(VatType || {});
206
+ var Status = /* @__PURE__ */ ((Status2) => {
207
+ Status2["INITIATED"] = "INITIATED";
208
+ Status2["ACTION_REQUIRED"] = "ACTION_REQUIRED";
209
+ Status2["PENDING"] = "PENDING";
210
+ Status2["AUTHORIZED"] = "AUTHORIZED";
211
+ Status2["CAPTURED"] = "CAPTURED";
212
+ Status2["VOIDED"] = "VOIDED";
213
+ Status2["FAILED"] = "FAILED";
214
+ return Status2;
215
+ })(Status || {});
216
+ var RefundStatus = /* @__PURE__ */ ((RefundStatus2) => {
217
+ RefundStatus2["PENDING"] = "PENDING";
218
+ RefundStatus2["SUCCEEDED"] = "SUCCEEDED";
219
+ RefundStatus2["FAILED"] = "FAILED";
220
+ RefundStatus2["REVERSED"] = "REVERSED";
221
+ return RefundStatus2;
222
+ })(RefundStatus || {});
223
+ var DisputeStage = /* @__PURE__ */ ((DisputeStage2) => {
224
+ DisputeStage2["CHARGEBACK"] = "CHARGEBACK";
225
+ DisputeStage2["INQUIRY"] = "INQUIRY";
226
+ return DisputeStage2;
227
+ })(DisputeStage || {});
228
+ var DisputeReason = /* @__PURE__ */ ((DisputeReason2) => {
229
+ DisputeReason2["FRAUD_CARD_PRESENT"] = "FRAUD_CARD_PRESENT";
230
+ DisputeReason2["FRAUD_CARD_ABSENT"] = "FRAUD_CARD_ABSENT";
231
+ DisputeReason2["DUPLICATE_PROCESSING"] = "DUPLICATE_PROCESSING";
232
+ DisputeReason2["SERVICES_NOT_PROVIDED"] = "SERVICES_NOT_PROVIDED";
233
+ DisputeReason2["CANCELED_RECURRING"] = "CANCELED_RECURRING";
234
+ DisputeReason2["NOT_AS_DESCRIBED"] = "NOT_AS_DESCRIBED";
235
+ DisputeReason2["COUNTERFEIT"] = "COUNTERFEIT";
236
+ DisputeReason2["MISREPRESENTATION"] = "MISREPRESENTATION";
237
+ DisputeReason2["CANCELED"] = "CANCELED";
238
+ DisputeReason2["OTHER"] = "OTHER";
239
+ return DisputeReason2;
240
+ })(DisputeReason || {});
241
+ var DisputeStatus = /* @__PURE__ */ ((DisputeStatus2) => {
242
+ DisputeStatus2["WAITING_MERCHANT"] = "WAITING_MERCHANT";
243
+ DisputeStatus2["UNDER_REVIEW"] = "UNDER_REVIEW";
244
+ DisputeStatus2["WAITING_BUYER"] = "WAITING_BUYER";
245
+ DisputeStatus2["WON"] = "WON";
246
+ DisputeStatus2["LOST"] = "LOST";
247
+ return DisputeStatus2;
248
+ })(DisputeStatus || {});
249
+ var SellerProtection = /* @__PURE__ */ ((SellerProtection2) => {
250
+ SellerProtection2["NOT_ELIGIBLE"] = "NOT_ELIGIBLE";
251
+ SellerProtection2["ELIGIBLE"] = "ELIGIBLE";
252
+ SellerProtection2["EXTENDED"] = "EXTENDED";
253
+ return SellerProtection2;
254
+ })(SellerProtection || {});
255
+ var DisputeChannel = /* @__PURE__ */ ((DisputeChannel2) => {
256
+ DisputeChannel2["INTERNAL"] = "INTERNAL";
257
+ DisputeChannel2["EXTERNAL"] = "EXTERNAL";
258
+ return DisputeChannel2;
259
+ })(DisputeChannel || {});
260
+ var DisputeActionType = /* @__PURE__ */ ((DisputeActionType2) => {
261
+ DisputeActionType2["ACCEPT"] = "ACCEPT";
262
+ DisputeActionType2["DEFEND"] = "DEFEND";
263
+ return DisputeActionType2;
264
+ })(DisputeActionType || {});
265
+ var Reason = /* @__PURE__ */ ((Reason2) => {
266
+ Reason2["CARD_NEVER_RECEIVED"] = "CARD_NEVER_RECEIVED";
267
+ Reason2["FRAUDULENT_CARD_APPLICATION"] = "FRAUDULENT_CARD_APPLICATION";
268
+ Reason2["MADE_WITH_COUNTERFEIT_CARD"] = "MADE_WITH_COUNTERFEIT_CARD";
269
+ Reason2["MADE_WITH_LOST_CARD"] = "MADE_WITH_LOST_CARD";
270
+ Reason2["MADE_WITH_STOLEN_CARD"] = "MADE_WITH_STOLEN_CARD";
271
+ Reason2["MISCELLANEOUS"] = "MISCELLANEOUS";
272
+ Reason2["UNAUTHORIZED_USE_OF_CARD"] = "UNAUTHORIZED_USE_OF_CARD";
273
+ Reason2["FRAUD"] = "FRAUD";
274
+ Reason2["ACCOUNT_TAKEOVER_FRAUD"] = "ACCOUNT_TAKEOVER_FRAUD";
275
+ Reason2["CARD_NOT_PRESENT_FRAUD"] = "CARD_NOT_PRESENT_FRAUD";
276
+ Reason2["MULTIPLE_IMPRINT_FRAUD"] = "MULTIPLE_IMPRINT_FRAUD";
277
+ Reason2["BUST_OUT_COLLUSIVE_MERCHANT"] = "BUST_OUT_COLLUSIVE_MERCHANT";
278
+ Reason2["FRAUDULENT_USE_OF_ACCOUNT_NUMBER"] = "FRAUDULENT_USE_OF_ACCOUNT_NUMBER";
279
+ Reason2["INCORRECT_PROCESSING"] = "INCORRECT_PROCESSING";
280
+ Reason2["MERCHANT_MISREPRESENTATION"] = "MERCHANT_MISREPRESENTATION";
281
+ Reason2["ACQUIRER_REPORTED_COUNTERFEIT"] = "ACQUIRER_REPORTED_COUNTERFEIT";
282
+ return Reason2;
283
+ })(Reason || {});
284
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
285
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
286
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
287
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
288
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
289
+ WebhookIdentityType2["APP"] = "APP";
290
+ return WebhookIdentityType2;
291
+ })(WebhookIdentityType || {});
292
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
293
+ SortOrder2["ASC"] = "ASC";
294
+ SortOrder2["DESC"] = "DESC";
295
+ return SortOrder2;
296
+ })(SortOrder || {});
297
+ var Mode = /* @__PURE__ */ ((Mode2) => {
298
+ Mode2["OR"] = "OR";
299
+ Mode2["AND"] = "AND";
300
+ return Mode2;
301
+ })(Mode || {});
302
+ var ScalarType = /* @__PURE__ */ ((ScalarType2) => {
303
+ ScalarType2["COUNT_DISTINCT"] = "COUNT_DISTINCT";
304
+ ScalarType2["MIN"] = "MIN";
305
+ ScalarType2["MAX"] = "MAX";
306
+ ScalarType2["SUM"] = "SUM";
307
+ ScalarType2["AVG"] = "AVG";
308
+ return ScalarType2;
309
+ })(ScalarType || {});
310
+ var AggregationType = /* @__PURE__ */ ((AggregationType2) => {
311
+ AggregationType2["VALUE"] = "VALUE";
312
+ AggregationType2["RANGE"] = "RANGE";
313
+ AggregationType2["SCALAR"] = "SCALAR";
314
+ AggregationType2["DATE_HISTOGRAM"] = "DATE_HISTOGRAM";
315
+ AggregationType2["NESTED"] = "NESTED";
316
+ return AggregationType2;
317
+ })(AggregationType || {});
318
+ async function getPayment2(paymentId) {
319
+ const { httpClient, sideEffects } = arguments[1];
320
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
321
+ paymentId
322
+ });
323
+ const reqOpts = getPayment(payload);
324
+ sideEffects?.onSiteCall?.();
325
+ try {
326
+ const result = await httpClient.request(reqOpts);
327
+ sideEffects?.onSuccess?.(result);
328
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
329
+ (0, import_transform_paths2.transformPaths)(result.data, [
330
+ {
331
+ transformFn: import_address.transformRESTAddressToSDKAddress,
332
+ paths: [
333
+ { path: "payment.charge.billingInfo.address" },
334
+ { path: "payment.charge.shippingInfo.address" }
335
+ ]
336
+ }
337
+ ])
338
+ )?.payment;
339
+ } catch (err) {
340
+ const transformedError = (0, import_transform_error.transformError)(
341
+ err,
342
+ {
343
+ spreadPathsToArguments: {},
344
+ explicitPathsToArguments: { paymentId: "$[0]" },
345
+ singleArgumentUnchanged: false
346
+ },
347
+ ["paymentId"]
348
+ );
349
+ sideEffects?.onError?.(err);
350
+ throw transformedError;
351
+ }
352
+ }
353
+ async function searchPayments2(search) {
354
+ const { httpClient, sideEffects } = arguments[1];
355
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ search });
356
+ const reqOpts = searchPayments(payload);
357
+ sideEffects?.onSiteCall?.();
358
+ try {
359
+ const result = await httpClient.request(reqOpts);
360
+ sideEffects?.onSuccess?.(result);
361
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
362
+ (0, import_transform_paths2.transformPaths)(result.data, [
363
+ {
364
+ transformFn: import_address.transformRESTAddressToSDKAddress,
365
+ paths: [
366
+ { path: "payments.charge.billingInfo.address" },
367
+ { path: "payments.charge.shippingInfo.address" }
368
+ ]
369
+ }
370
+ ])
371
+ );
372
+ } catch (err) {
373
+ const transformedError = (0, import_transform_error.transformError)(
374
+ err,
375
+ {
376
+ spreadPathsToArguments: {},
377
+ explicitPathsToArguments: { search: "$[0]" },
378
+ singleArgumentUnchanged: false
379
+ },
380
+ ["search"]
381
+ );
382
+ sideEffects?.onError?.(err);
383
+ throw transformedError;
384
+ }
385
+ }
386
+ var utils = {
387
+ search: /* @__PURE__ */ (0, import_search_builder_utils.createSearchUtils)()
388
+ };
389
+
390
+ // src/payments-platform-v1-payment-payments.public.ts
391
+ function getPayment3(httpClient) {
392
+ return (paymentId) => getPayment2(
393
+ paymentId,
394
+ // @ts-ignore
395
+ { httpClient }
396
+ );
397
+ }
398
+ function searchPayments3(httpClient) {
399
+ return (search) => searchPayments2(
400
+ search,
401
+ // @ts-ignore
402
+ { httpClient }
403
+ );
404
+ }
405
+ var onPaymentCreated = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
406
+ "wix.payments.platform.v1.payment_created",
407
+ true,
408
+ (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
409
+ (0, import_transform_paths3.transformPaths)(event, [
410
+ {
411
+ 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
+ ]
428
+ },
429
+ {
430
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
431
+ paths: [
432
+ { path: "entity.charge.billingInfo.address" },
433
+ { path: "entity.charge.shippingInfo.address" }
434
+ ]
435
+ }
436
+ ])
437
+ )
438
+ )();
439
+ var onPaymentUpdated = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
440
+ "wix.payments.platform.v1.payment_updated",
441
+ true,
442
+ (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
443
+ (0, import_transform_paths3.transformPaths)(event, [
444
+ {
445
+ 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
+ ]
475
+ },
476
+ {
477
+ 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
+ ]
484
+ }
485
+ ])
486
+ )
487
+ )();
488
+
489
+ // src/payments-platform-v1-payment-payments.context.ts
490
+ var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
491
+ var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
492
+ var getPayment4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getPayment3);
493
+ var searchPayments4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(searchPayments3);
494
+ var onPaymentCreated2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(
495
+ onPaymentCreated
496
+ );
497
+ var onPaymentUpdated2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(
498
+ onPaymentUpdated
499
+ );
500
+ // Annotate the CommonJS export names for ESM import in node:
501
+ 0 && (module.exports = {
502
+ AggregationType,
503
+ DisputeActionType,
504
+ DisputeChannel,
505
+ DisputeReason,
506
+ DisputeStage,
507
+ DisputeStatus,
508
+ Mode,
509
+ Reason,
510
+ RefundStatus,
511
+ ScalarType,
512
+ SellerProtection,
513
+ SortOrder,
514
+ Status,
515
+ VatType,
516
+ WebhookIdentityType,
517
+ getPayment,
518
+ onPaymentCreated,
519
+ onPaymentUpdated,
520
+ searchPayments,
521
+ utils
522
+ });
523
+ //# sourceMappingURL=index.js.map