@pulgueta/epayco-convex 0.1.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 (169) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +945 -0
  3. package/dist/client/_generated/_ignore.d.ts +1 -0
  4. package/dist/client/_generated/_ignore.d.ts.map +1 -0
  5. package/dist/client/_generated/_ignore.js +3 -0
  6. package/dist/client/_generated/_ignore.js.map +1 -0
  7. package/dist/client/index.d.ts +222 -0
  8. package/dist/client/index.d.ts.map +1 -0
  9. package/dist/client/index.js +355 -0
  10. package/dist/client/index.js.map +1 -0
  11. package/dist/component/_generated/api.d.ts +78 -0
  12. package/dist/component/_generated/api.d.ts.map +1 -0
  13. package/dist/component/_generated/api.js +31 -0
  14. package/dist/component/_generated/api.js.map +1 -0
  15. package/dist/component/_generated/component.d.ts +580 -0
  16. package/dist/component/_generated/component.d.ts.map +1 -0
  17. package/dist/component/_generated/component.js +11 -0
  18. package/dist/component/_generated/component.js.map +1 -0
  19. package/dist/component/_generated/dataModel.d.ts +46 -0
  20. package/dist/component/_generated/dataModel.d.ts.map +1 -0
  21. package/dist/component/_generated/dataModel.js +11 -0
  22. package/dist/component/_generated/dataModel.js.map +1 -0
  23. package/dist/component/_generated/server.d.ts +121 -0
  24. package/dist/component/_generated/server.d.ts.map +1 -0
  25. package/dist/component/_generated/server.js +78 -0
  26. package/dist/component/_generated/server.js.map +1 -0
  27. package/dist/component/banks.d.ts +14 -0
  28. package/dist/component/banks.d.ts.map +1 -0
  29. package/dist/component/banks.js +37 -0
  30. package/dist/component/banks.js.map +1 -0
  31. package/dist/component/cashApi.d.ts +59 -0
  32. package/dist/component/cashApi.d.ts.map +1 -0
  33. package/dist/component/cashApi.js +88 -0
  34. package/dist/component/cashApi.js.map +1 -0
  35. package/dist/component/chargesApi.d.ts +64 -0
  36. package/dist/component/chargesApi.d.ts.map +1 -0
  37. package/dist/component/chargesApi.js +106 -0
  38. package/dist/component/chargesApi.js.map +1 -0
  39. package/dist/component/convex.config.d.ts +3 -0
  40. package/dist/component/convex.config.d.ts.map +1 -0
  41. package/dist/component/convex.config.js +6 -0
  42. package/dist/component/convex.config.js.map +1 -0
  43. package/dist/component/customers.d.ts +67 -0
  44. package/dist/component/customers.d.ts.map +1 -0
  45. package/dist/component/customers.js +103 -0
  46. package/dist/component/customers.js.map +1 -0
  47. package/dist/component/customersApi.d.ts +99 -0
  48. package/dist/component/customersApi.d.ts.map +1 -0
  49. package/dist/component/customersApi.js +176 -0
  50. package/dist/component/customersApi.js.map +1 -0
  51. package/dist/component/daviplataApi.d.ts +43 -0
  52. package/dist/component/daviplataApi.d.ts.map +1 -0
  53. package/dist/component/daviplataApi.js +103 -0
  54. package/dist/component/daviplataApi.js.map +1 -0
  55. package/dist/component/epaycoClient.d.ts +84 -0
  56. package/dist/component/epaycoClient.d.ts.map +1 -0
  57. package/dist/component/epaycoClient.js +422 -0
  58. package/dist/component/epaycoClient.js.map +1 -0
  59. package/dist/component/payloads.d.ts +34 -0
  60. package/dist/component/payloads.d.ts.map +1 -0
  61. package/dist/component/payloads.js +45 -0
  62. package/dist/component/payloads.js.map +1 -0
  63. package/dist/component/plans.d.ts +47 -0
  64. package/dist/component/plans.d.ts.map +1 -0
  65. package/dist/component/plans.js +83 -0
  66. package/dist/component/plans.js.map +1 -0
  67. package/dist/component/plansApi.d.ts +64 -0
  68. package/dist/component/plansApi.d.ts.map +1 -0
  69. package/dist/component/plansApi.js +121 -0
  70. package/dist/component/plansApi.js.map +1 -0
  71. package/dist/component/pseApi.d.ts +68 -0
  72. package/dist/component/pseApi.d.ts.map +1 -0
  73. package/dist/component/pseApi.js +113 -0
  74. package/dist/component/pseApi.js.map +1 -0
  75. package/dist/component/rateLimits.d.ts +69 -0
  76. package/dist/component/rateLimits.d.ts.map +1 -0
  77. package/dist/component/rateLimits.js +67 -0
  78. package/dist/component/rateLimits.js.map +1 -0
  79. package/dist/component/safetypayApi.d.ts +35 -0
  80. package/dist/component/safetypayApi.d.ts.map +1 -0
  81. package/dist/component/safetypayApi.js +68 -0
  82. package/dist/component/safetypayApi.js.map +1 -0
  83. package/dist/component/schema.d.ts +200 -0
  84. package/dist/component/schema.d.ts.map +1 -0
  85. package/dist/component/schema.js +104 -0
  86. package/dist/component/schema.js.map +1 -0
  87. package/dist/component/signature.d.ts +11 -0
  88. package/dist/component/signature.d.ts.map +1 -0
  89. package/dist/component/signature.js +28 -0
  90. package/dist/component/signature.js.map +1 -0
  91. package/dist/component/status.d.ts +12 -0
  92. package/dist/component/status.d.ts.map +1 -0
  93. package/dist/component/status.js +55 -0
  94. package/dist/component/status.js.map +1 -0
  95. package/dist/component/subscriptions.d.ts +69 -0
  96. package/dist/component/subscriptions.d.ts.map +1 -0
  97. package/dist/component/subscriptions.js +114 -0
  98. package/dist/component/subscriptions.js.map +1 -0
  99. package/dist/component/subscriptionsApi.d.ts +62 -0
  100. package/dist/component/subscriptionsApi.d.ts.map +1 -0
  101. package/dist/component/subscriptionsApi.js +147 -0
  102. package/dist/component/subscriptionsApi.js.map +1 -0
  103. package/dist/component/tokens.d.ts +31 -0
  104. package/dist/component/tokens.d.ts.map +1 -0
  105. package/dist/component/tokens.js +79 -0
  106. package/dist/component/tokens.js.map +1 -0
  107. package/dist/component/tokensApi.d.ts +18 -0
  108. package/dist/component/tokensApi.d.ts.map +1 -0
  109. package/dist/component/tokensApi.js +53 -0
  110. package/dist/component/tokensApi.js.map +1 -0
  111. package/dist/component/transactions.d.ts +103 -0
  112. package/dist/component/transactions.d.ts.map +1 -0
  113. package/dist/component/transactions.js +177 -0
  114. package/dist/component/transactions.js.map +1 -0
  115. package/dist/component/validators.d.ts +571 -0
  116. package/dist/component/validators.d.ts.map +1 -0
  117. package/dist/component/validators.js +203 -0
  118. package/dist/component/validators.js.map +1 -0
  119. package/dist/component/webhooks.d.ts +55 -0
  120. package/dist/component/webhooks.d.ts.map +1 -0
  121. package/dist/component/webhooks.js +172 -0
  122. package/dist/component/webhooks.js.map +1 -0
  123. package/dist/react/index.d.ts +16 -0
  124. package/dist/react/index.d.ts.map +1 -0
  125. package/dist/react/index.js +43 -0
  126. package/dist/react/index.js.map +1 -0
  127. package/package.json +106 -0
  128. package/src/client/_generated/_ignore.ts +1 -0
  129. package/src/client/index.test.ts +66 -0
  130. package/src/client/index.ts +633 -0
  131. package/src/client/setup.test.ts +26 -0
  132. package/src/component/_generated/api.ts +94 -0
  133. package/src/component/_generated/component.ts +809 -0
  134. package/src/component/_generated/dataModel.ts +60 -0
  135. package/src/component/_generated/server.ts +156 -0
  136. package/src/component/banks.ts +41 -0
  137. package/src/component/cashApi.ts +100 -0
  138. package/src/component/chargesApi.ts +119 -0
  139. package/src/component/convex.config.ts +7 -0
  140. package/src/component/customers.test.ts +122 -0
  141. package/src/component/customers.ts +116 -0
  142. package/src/component/customersApi.ts +206 -0
  143. package/src/component/daviplataApi.ts +119 -0
  144. package/src/component/epaycoApi.test.ts +110 -0
  145. package/src/component/epaycoClient.ts +578 -0
  146. package/src/component/payloads.ts +67 -0
  147. package/src/component/plans.test.ts +129 -0
  148. package/src/component/plans.ts +86 -0
  149. package/src/component/plansApi.ts +135 -0
  150. package/src/component/pseApi.ts +125 -0
  151. package/src/component/rateLimits.ts +67 -0
  152. package/src/component/safetypayApi.ts +78 -0
  153. package/src/component/schema.ts +124 -0
  154. package/src/component/setup.test.helper.ts +10 -0
  155. package/src/component/setup.test.ts +22 -0
  156. package/src/component/signature.ts +38 -0
  157. package/src/component/status.ts +71 -0
  158. package/src/component/subscriptions.test.ts +117 -0
  159. package/src/component/subscriptions.ts +128 -0
  160. package/src/component/subscriptionsApi.ts +172 -0
  161. package/src/component/tokens.ts +89 -0
  162. package/src/component/tokensApi.ts +63 -0
  163. package/src/component/transactions.test.ts +227 -0
  164. package/src/component/transactions.ts +200 -0
  165. package/src/component/validators.ts +245 -0
  166. package/src/component/webhooks.test.ts +137 -0
  167. package/src/component/webhooks.ts +229 -0
  168. package/src/react/index.ts +71 -0
  169. package/src/test.ts +13 -0
@@ -0,0 +1,809 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * Generated `ComponentApi` utility.
4
+ *
5
+ * THIS CODE IS AUTOMATICALLY GENERATED.
6
+ *
7
+ * To regenerate, run `npx convex dev`.
8
+ * @module
9
+ */
10
+
11
+ import type { FunctionReference } from "convex/server";
12
+
13
+ /**
14
+ * A utility for referencing a Convex component's exposed API.
15
+ *
16
+ * Useful when expecting a parameter like `components.myComponent`.
17
+ * Usage:
18
+ * ```ts
19
+ * async function myFunction(ctx: QueryCtx, component: ComponentApi) {
20
+ * return ctx.runQuery(component.someFile.someQuery, { ...args });
21
+ * }
22
+ * ```
23
+ */
24
+ export type ComponentApi<Name extends string | undefined = string | undefined> =
25
+ {
26
+ banks: {
27
+ listLocalBanks: FunctionReference<"query", "internal", {}, any, Name>;
28
+ };
29
+ cashApi: {
30
+ createCashPayment: FunctionReference<
31
+ "action",
32
+ "internal",
33
+ {
34
+ cashInfo: {
35
+ bill: string;
36
+ cellPhone: string;
37
+ currency?: string;
38
+ description: string;
39
+ docNumber: string;
40
+ docType: string;
41
+ email: string;
42
+ endDate?: string;
43
+ extra1?: string;
44
+ extra2?: string;
45
+ extra3?: string;
46
+ ip?: string;
47
+ lastName: string;
48
+ name: string;
49
+ split?: {
50
+ splitAppId?: string;
51
+ splitMerchantId?: string;
52
+ splitPrimaryReceiver?: string;
53
+ splitPrimaryReceiverFee?: string;
54
+ splitReceivers?: Array<{
55
+ base_iva: string;
56
+ fee?: string;
57
+ id: string;
58
+ iva: string;
59
+ total: string;
60
+ }>;
61
+ splitRule?: string;
62
+ splitType?: string;
63
+ };
64
+ tax: number;
65
+ taxBase: number;
66
+ typePerson?: "0" | "1";
67
+ urlConfirmation?: string;
68
+ urlResponse?: string;
69
+ value: number;
70
+ };
71
+ credentials: {
72
+ apiKey: string;
73
+ lang?: string;
74
+ privateKey: string;
75
+ testMode?: boolean;
76
+ };
77
+ provider:
78
+ | "efecty"
79
+ | "baloto"
80
+ | "gana"
81
+ | "redservi"
82
+ | "puntored"
83
+ | "sured";
84
+ userId: string;
85
+ },
86
+ any,
87
+ Name
88
+ >;
89
+ getCashPayment: FunctionReference<
90
+ "action",
91
+ "internal",
92
+ {
93
+ credentials: {
94
+ apiKey: string;
95
+ lang?: string;
96
+ privateKey: string;
97
+ testMode?: boolean;
98
+ };
99
+ epaycoRef: string;
100
+ },
101
+ any,
102
+ Name
103
+ >;
104
+ };
105
+ chargesApi: {
106
+ createCharge: FunctionReference<
107
+ "action",
108
+ "internal",
109
+ {
110
+ chargeInfo: {
111
+ address?: string;
112
+ bill: string;
113
+ cellPhone?: string;
114
+ city?: string;
115
+ currency?: string;
116
+ customerId: string;
117
+ description: string;
118
+ docNumber: string;
119
+ docType: string;
120
+ dues?: number;
121
+ email: string;
122
+ extra1?: string;
123
+ extra2?: string;
124
+ extra3?: string;
125
+ ip?: string;
126
+ lastName: string;
127
+ methodConfirmation?: string;
128
+ name: string;
129
+ phone?: string;
130
+ split?: {
131
+ splitAppId?: string;
132
+ splitMerchantId?: string;
133
+ splitPrimaryReceiver?: string;
134
+ splitPrimaryReceiverFee?: string;
135
+ splitReceivers?: Array<{
136
+ base_iva: string;
137
+ fee?: string;
138
+ id: string;
139
+ iva: string;
140
+ total: string;
141
+ }>;
142
+ splitRule?: string;
143
+ splitType?: string;
144
+ };
145
+ tax: number;
146
+ taxBase: number;
147
+ tokenCard: string;
148
+ urlConfirmation?: string;
149
+ urlResponse?: string;
150
+ useDefaultCardCustomer?: boolean;
151
+ value: number;
152
+ };
153
+ credentials: {
154
+ apiKey: string;
155
+ lang?: string;
156
+ privateKey: string;
157
+ testMode?: boolean;
158
+ };
159
+ userId: string;
160
+ },
161
+ any,
162
+ Name
163
+ >;
164
+ getCharge: FunctionReference<
165
+ "action",
166
+ "internal",
167
+ {
168
+ credentials: {
169
+ apiKey: string;
170
+ lang?: string;
171
+ privateKey: string;
172
+ testMode?: boolean;
173
+ };
174
+ epaycoRef: string;
175
+ },
176
+ any,
177
+ Name
178
+ >;
179
+ };
180
+ customers: {
181
+ getLocalCustomer: FunctionReference<
182
+ "query",
183
+ "internal",
184
+ { userId: string },
185
+ any,
186
+ Name
187
+ >;
188
+ getLocalCustomerByEpaycoId: FunctionReference<
189
+ "query",
190
+ "internal",
191
+ { epaycoCustomerId: string },
192
+ any,
193
+ Name
194
+ >;
195
+ listLocalCustomers: FunctionReference<
196
+ "query",
197
+ "internal",
198
+ { limit?: number },
199
+ any,
200
+ Name
201
+ >;
202
+ };
203
+ customersApi: {
204
+ addDefaultCard: FunctionReference<
205
+ "action",
206
+ "internal",
207
+ {
208
+ credentials: {
209
+ apiKey: string;
210
+ lang?: string;
211
+ privateKey: string;
212
+ testMode?: boolean;
213
+ };
214
+ customerId: string;
215
+ franchise: string;
216
+ mask: string;
217
+ token: string;
218
+ },
219
+ any,
220
+ Name
221
+ >;
222
+ addNewToken: FunctionReference<
223
+ "action",
224
+ "internal",
225
+ {
226
+ credentials: {
227
+ apiKey: string;
228
+ lang?: string;
229
+ privateKey: string;
230
+ testMode?: boolean;
231
+ };
232
+ customerId: string;
233
+ tokenCard: string;
234
+ },
235
+ any,
236
+ Name
237
+ >;
238
+ createCustomer: FunctionReference<
239
+ "action",
240
+ "internal",
241
+ {
242
+ credentials: {
243
+ apiKey: string;
244
+ lang?: string;
245
+ privateKey: string;
246
+ testMode?: boolean;
247
+ };
248
+ customerInfo: {
249
+ address?: string;
250
+ cellPhone?: string;
251
+ city?: string;
252
+ docNumber?: string;
253
+ docType?: string;
254
+ email: string;
255
+ isDefault?: boolean;
256
+ lastName?: string;
257
+ name: string;
258
+ phone?: string;
259
+ tokenCard: string;
260
+ };
261
+ userId: string;
262
+ },
263
+ any,
264
+ Name
265
+ >;
266
+ deleteCustomerCard: FunctionReference<
267
+ "action",
268
+ "internal",
269
+ {
270
+ credentials: {
271
+ apiKey: string;
272
+ lang?: string;
273
+ privateKey: string;
274
+ testMode?: boolean;
275
+ };
276
+ customerId: string;
277
+ franchise: string;
278
+ mask: string;
279
+ },
280
+ any,
281
+ Name
282
+ >;
283
+ getCustomer: FunctionReference<
284
+ "action",
285
+ "internal",
286
+ {
287
+ credentials: {
288
+ apiKey: string;
289
+ lang?: string;
290
+ privateKey: string;
291
+ testMode?: boolean;
292
+ };
293
+ epaycoCustomerId: string;
294
+ },
295
+ any,
296
+ Name
297
+ >;
298
+ listCustomers: FunctionReference<
299
+ "action",
300
+ "internal",
301
+ {
302
+ credentials: {
303
+ apiKey: string;
304
+ lang?: string;
305
+ privateKey: string;
306
+ testMode?: boolean;
307
+ };
308
+ page?: number;
309
+ perPage?: number;
310
+ },
311
+ any,
312
+ Name
313
+ >;
314
+ updateCustomer: FunctionReference<
315
+ "action",
316
+ "internal",
317
+ {
318
+ address?: string;
319
+ cellPhone?: string;
320
+ city?: string;
321
+ credentials: {
322
+ apiKey: string;
323
+ lang?: string;
324
+ privateKey: string;
325
+ testMode?: boolean;
326
+ };
327
+ email?: string;
328
+ epaycoCustomerId: string;
329
+ lastName?: string;
330
+ name?: string;
331
+ phone?: string;
332
+ userId: string;
333
+ },
334
+ any,
335
+ Name
336
+ >;
337
+ };
338
+ daviplataApi: {
339
+ confirmDaviplataPayment: FunctionReference<
340
+ "action",
341
+ "internal",
342
+ {
343
+ credentials: {
344
+ apiKey: string;
345
+ lang?: string;
346
+ privateKey: string;
347
+ testMode?: boolean;
348
+ };
349
+ idSessionToken: string;
350
+ otp: string;
351
+ refPayco: string;
352
+ },
353
+ any,
354
+ Name
355
+ >;
356
+ createDaviplataPayment: FunctionReference<
357
+ "action",
358
+ "internal",
359
+ {
360
+ credentials: {
361
+ apiKey: string;
362
+ lang?: string;
363
+ privateKey: string;
364
+ testMode?: boolean;
365
+ };
366
+ daviplataInfo: {
367
+ address?: string;
368
+ city?: string;
369
+ country?: string;
370
+ currency?: string;
371
+ description: string;
372
+ docNumber: string;
373
+ docType: string;
374
+ email: string;
375
+ indCountry?: string;
376
+ ip?: string;
377
+ lastName: string;
378
+ methodConfirmation?: string;
379
+ name: string;
380
+ phone: string;
381
+ tax: number;
382
+ taxBase: number;
383
+ urlConfirmation?: string;
384
+ value: number;
385
+ };
386
+ userId: string;
387
+ },
388
+ any,
389
+ Name
390
+ >;
391
+ };
392
+ plans: {
393
+ getLocalPlan: FunctionReference<
394
+ "query",
395
+ "internal",
396
+ { epaycoPlanId: string },
397
+ any,
398
+ Name
399
+ >;
400
+ listLocalPlans: FunctionReference<
401
+ "query",
402
+ "internal",
403
+ { limit?: number; status?: string },
404
+ any,
405
+ Name
406
+ >;
407
+ };
408
+ plansApi: {
409
+ createPlan: FunctionReference<
410
+ "action",
411
+ "internal",
412
+ {
413
+ credentials: {
414
+ apiKey: string;
415
+ lang?: string;
416
+ privateKey: string;
417
+ testMode?: boolean;
418
+ };
419
+ planInfo: {
420
+ amount: number;
421
+ currency: string;
422
+ description: string;
423
+ ico?: number;
424
+ idPlan: string;
425
+ interval: string;
426
+ intervalCount: number;
427
+ iva?: number;
428
+ name: string;
429
+ trialDays: number;
430
+ };
431
+ },
432
+ any,
433
+ Name
434
+ >;
435
+ deletePlan: FunctionReference<
436
+ "action",
437
+ "internal",
438
+ {
439
+ credentials: {
440
+ apiKey: string;
441
+ lang?: string;
442
+ privateKey: string;
443
+ testMode?: boolean;
444
+ };
445
+ epaycoPlanId: string;
446
+ },
447
+ any,
448
+ Name
449
+ >;
450
+ getPlan: FunctionReference<
451
+ "action",
452
+ "internal",
453
+ {
454
+ credentials: {
455
+ apiKey: string;
456
+ lang?: string;
457
+ privateKey: string;
458
+ testMode?: boolean;
459
+ };
460
+ epaycoPlanId: string;
461
+ },
462
+ any,
463
+ Name
464
+ >;
465
+ listPlans: FunctionReference<
466
+ "action",
467
+ "internal",
468
+ {
469
+ credentials: {
470
+ apiKey: string;
471
+ lang?: string;
472
+ privateKey: string;
473
+ testMode?: boolean;
474
+ };
475
+ },
476
+ any,
477
+ Name
478
+ >;
479
+ updatePlan: FunctionReference<
480
+ "action",
481
+ "internal",
482
+ {
483
+ amount?: number;
484
+ credentials: {
485
+ apiKey: string;
486
+ lang?: string;
487
+ privateKey: string;
488
+ testMode?: boolean;
489
+ };
490
+ currency?: string;
491
+ description?: string;
492
+ epaycoPlanId: string;
493
+ interval?: string;
494
+ intervalCount?: number;
495
+ name?: string;
496
+ trialDays?: number;
497
+ },
498
+ any,
499
+ Name
500
+ >;
501
+ };
502
+ pseApi: {
503
+ createPseTransaction: FunctionReference<
504
+ "action",
505
+ "internal",
506
+ {
507
+ credentials: {
508
+ apiKey: string;
509
+ lang?: string;
510
+ privateKey: string;
511
+ testMode?: boolean;
512
+ };
513
+ pseInfo: {
514
+ bank: string;
515
+ bill: string;
516
+ cellPhone: string;
517
+ country?: string;
518
+ currency?: string;
519
+ description: string;
520
+ docNumber: string;
521
+ docType: string;
522
+ email: string;
523
+ extra1?: string;
524
+ extra2?: string;
525
+ extra3?: string;
526
+ ip?: string;
527
+ lastName: string;
528
+ name: string;
529
+ split?: {
530
+ splitAppId?: string;
531
+ splitMerchantId?: string;
532
+ splitPrimaryReceiver?: string;
533
+ splitPrimaryReceiverFee?: string;
534
+ splitReceivers?: Array<{
535
+ base_iva: string;
536
+ fee?: string;
537
+ id: string;
538
+ iva: string;
539
+ total: string;
540
+ }>;
541
+ splitRule?: string;
542
+ splitType?: string;
543
+ };
544
+ tax: number;
545
+ taxBase: number;
546
+ typePerson: "0" | "1";
547
+ urlConfirmation?: string;
548
+ urlResponse?: string;
549
+ value: number;
550
+ };
551
+ userId: string;
552
+ },
553
+ any,
554
+ Name
555
+ >;
556
+ getBanks: FunctionReference<
557
+ "action",
558
+ "internal",
559
+ {
560
+ credentials: {
561
+ apiKey: string;
562
+ lang?: string;
563
+ privateKey: string;
564
+ testMode?: boolean;
565
+ };
566
+ },
567
+ any,
568
+ Name
569
+ >;
570
+ getPseTransaction: FunctionReference<
571
+ "action",
572
+ "internal",
573
+ {
574
+ credentials: {
575
+ apiKey: string;
576
+ lang?: string;
577
+ privateKey: string;
578
+ testMode?: boolean;
579
+ };
580
+ ticketId: string;
581
+ },
582
+ any,
583
+ Name
584
+ >;
585
+ };
586
+ safetypayApi: {
587
+ createSafetyPayPayment: FunctionReference<
588
+ "action",
589
+ "internal",
590
+ {
591
+ credentials: {
592
+ apiKey: string;
593
+ lang?: string;
594
+ privateKey: string;
595
+ testMode?: boolean;
596
+ };
597
+ safetypayInfo: {
598
+ address?: string;
599
+ cash: "1" | "2";
600
+ city?: string;
601
+ country?: string;
602
+ currency?: string;
603
+ description: string;
604
+ docNumber: string;
605
+ docType: string;
606
+ email: string;
607
+ endDate?: string;
608
+ ico?: number;
609
+ indCountry?: string;
610
+ invoice?: string;
611
+ ip?: string;
612
+ lastName: string;
613
+ methodConfirmation?: string;
614
+ name: string;
615
+ phone: string;
616
+ tax: number;
617
+ taxBase: number;
618
+ urlConfirmation?: string;
619
+ value: number;
620
+ };
621
+ userId: string;
622
+ },
623
+ any,
624
+ Name
625
+ >;
626
+ };
627
+ subscriptions: {
628
+ getActiveSubscription: FunctionReference<
629
+ "query",
630
+ "internal",
631
+ { userId: string },
632
+ any,
633
+ Name
634
+ >;
635
+ getLocalSubscription: FunctionReference<
636
+ "query",
637
+ "internal",
638
+ { epaycoSubscriptionId: string },
639
+ any,
640
+ Name
641
+ >;
642
+ listLocalSubscriptionsByUser: FunctionReference<
643
+ "query",
644
+ "internal",
645
+ { userId: string },
646
+ any,
647
+ Name
648
+ >;
649
+ };
650
+ subscriptionsApi: {
651
+ cancelSubscription: FunctionReference<
652
+ "action",
653
+ "internal",
654
+ {
655
+ credentials: {
656
+ apiKey: string;
657
+ lang?: string;
658
+ privateKey: string;
659
+ testMode?: boolean;
660
+ };
661
+ epaycoSubscriptionId: string;
662
+ },
663
+ any,
664
+ Name
665
+ >;
666
+ chargeSubscription: FunctionReference<
667
+ "action",
668
+ "internal",
669
+ {
670
+ credentials: {
671
+ apiKey: string;
672
+ lang?: string;
673
+ privateKey: string;
674
+ testMode?: boolean;
675
+ };
676
+ customer: string;
677
+ docNumber: string;
678
+ docType: string;
679
+ idPlan: string;
680
+ ip?: string;
681
+ tokenCard: string;
682
+ userId: string;
683
+ },
684
+ any,
685
+ Name
686
+ >;
687
+ createSubscription: FunctionReference<
688
+ "action",
689
+ "internal",
690
+ {
691
+ credentials: {
692
+ apiKey: string;
693
+ lang?: string;
694
+ privateKey: string;
695
+ testMode?: boolean;
696
+ };
697
+ subscriptionInfo: {
698
+ customer: string;
699
+ docNumber: string;
700
+ docType: string;
701
+ idPlan: string;
702
+ methodConfirmation?: string;
703
+ tokenCard: string;
704
+ urlConfirmation?: string;
705
+ };
706
+ userId: string;
707
+ },
708
+ any,
709
+ Name
710
+ >;
711
+ getSubscription: FunctionReference<
712
+ "action",
713
+ "internal",
714
+ {
715
+ credentials: {
716
+ apiKey: string;
717
+ lang?: string;
718
+ privateKey: string;
719
+ testMode?: boolean;
720
+ };
721
+ epaycoSubscriptionId: string;
722
+ },
723
+ any,
724
+ Name
725
+ >;
726
+ listSubscriptions: FunctionReference<
727
+ "action",
728
+ "internal",
729
+ {
730
+ credentials: {
731
+ apiKey: string;
732
+ lang?: string;
733
+ privateKey: string;
734
+ testMode?: boolean;
735
+ };
736
+ },
737
+ any,
738
+ Name
739
+ >;
740
+ };
741
+ tokens: {
742
+ getLocalTokens: FunctionReference<
743
+ "query",
744
+ "internal",
745
+ { userId: string },
746
+ any,
747
+ Name
748
+ >;
749
+ };
750
+ tokensApi: {
751
+ createToken: FunctionReference<
752
+ "action",
753
+ "internal",
754
+ {
755
+ credentials: {
756
+ apiKey: string;
757
+ lang?: string;
758
+ privateKey: string;
759
+ testMode?: boolean;
760
+ };
761
+ tokenInfo: {
762
+ cardNumber: string;
763
+ cvc: string;
764
+ expMonth: string;
765
+ expYear: string;
766
+ hasCvv?: boolean;
767
+ };
768
+ userId: string;
769
+ },
770
+ any,
771
+ Name
772
+ >;
773
+ };
774
+ transactions: {
775
+ getLocalTransaction: FunctionReference<
776
+ "query",
777
+ "internal",
778
+ { epaycoRef: string },
779
+ any,
780
+ Name
781
+ >;
782
+ listLocalTransactions: FunctionReference<
783
+ "query",
784
+ "internal",
785
+ {
786
+ limit?: number;
787
+ paymentMethod?:
788
+ | "credit_card"
789
+ | "pse"
790
+ | "cash"
791
+ | "daviplata"
792
+ | "safetypay";
793
+ status?: string;
794
+ userId: string;
795
+ },
796
+ any,
797
+ Name
798
+ >;
799
+ };
800
+ webhooks: {
801
+ processConfirmation: FunctionReference<
802
+ "action",
803
+ "internal",
804
+ { custIdCliente: string; pKey: string; payload: any },
805
+ any,
806
+ Name
807
+ >;
808
+ };
809
+ };