@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,571 @@
1
+ /**
2
+ * Credentials accepted by every component action. The host app passes these in
3
+ * from its own environment (see `EPayco` client wrapper). `apiKey` is the
4
+ * ePayco PUBLIC_KEY and `privateKey` is the PRIVATE_KEY.
5
+ */
6
+ export declare const epaycoCredentialsValidator: import("convex/values").VObject<{
7
+ testMode?: boolean | undefined;
8
+ lang?: string | undefined;
9
+ apiKey: string;
10
+ privateKey: string;
11
+ }, {
12
+ apiKey: import("convex/values").VString<string, "required">;
13
+ privateKey: import("convex/values").VString<string, "required">;
14
+ testMode: import("convex/values").VBoolean<boolean | undefined, "optional">;
15
+ lang: import("convex/values").VString<string | undefined, "optional">;
16
+ }, "required", "apiKey" | "privateKey" | "testMode" | "lang">;
17
+ export type EPaycoCredentials = {
18
+ apiKey: string;
19
+ privateKey: string;
20
+ testMode?: boolean;
21
+ lang?: string;
22
+ };
23
+ /** A split-payment receiver (used by charge / PSE / cash dispersion). */
24
+ export declare const splitReceiverValidator: import("convex/values").VObject<{
25
+ fee?: string | undefined;
26
+ id: string;
27
+ total: string;
28
+ iva: string;
29
+ base_iva: string;
30
+ }, {
31
+ id: import("convex/values").VString<string, "required">;
32
+ total: import("convex/values").VString<string, "required">;
33
+ iva: import("convex/values").VString<string, "required">;
34
+ base_iva: import("convex/values").VString<string, "required">;
35
+ fee: import("convex/values").VString<string | undefined, "optional">;
36
+ }, "required", "id" | "total" | "iva" | "base_iva" | "fee">;
37
+ /** Optional split-payment configuration shared by charge / PSE / cash. */
38
+ export declare const splitPaymentValidator: import("convex/values").VObject<{
39
+ splitType?: string | undefined;
40
+ splitAppId?: string | undefined;
41
+ splitMerchantId?: string | undefined;
42
+ splitPrimaryReceiver?: string | undefined;
43
+ splitPrimaryReceiverFee?: string | undefined;
44
+ splitRule?: string | undefined;
45
+ splitReceivers?: {
46
+ fee?: string | undefined;
47
+ id: string;
48
+ total: string;
49
+ iva: string;
50
+ base_iva: string;
51
+ }[] | undefined;
52
+ }, {
53
+ splitType: import("convex/values").VString<string | undefined, "optional">;
54
+ splitAppId: import("convex/values").VString<string | undefined, "optional">;
55
+ splitMerchantId: import("convex/values").VString<string | undefined, "optional">;
56
+ splitPrimaryReceiver: import("convex/values").VString<string | undefined, "optional">;
57
+ splitPrimaryReceiverFee: import("convex/values").VString<string | undefined, "optional">;
58
+ splitRule: import("convex/values").VString<string | undefined, "optional">;
59
+ splitReceivers: import("convex/values").VArray<{
60
+ fee?: string | undefined;
61
+ id: string;
62
+ total: string;
63
+ iva: string;
64
+ base_iva: string;
65
+ }[] | undefined, import("convex/values").VObject<{
66
+ fee?: string | undefined;
67
+ id: string;
68
+ total: string;
69
+ iva: string;
70
+ base_iva: string;
71
+ }, {
72
+ id: import("convex/values").VString<string, "required">;
73
+ total: import("convex/values").VString<string, "required">;
74
+ iva: import("convex/values").VString<string, "required">;
75
+ base_iva: import("convex/values").VString<string, "required">;
76
+ fee: import("convex/values").VString<string | undefined, "optional">;
77
+ }, "required", "id" | "total" | "iva" | "base_iva" | "fee">, "optional">;
78
+ }, "required", "splitType" | "splitAppId" | "splitMerchantId" | "splitPrimaryReceiver" | "splitPrimaryReceiverFee" | "splitRule" | "splitReceivers">;
79
+ export declare const customerInfoValidator: import("convex/values").VObject<{
80
+ address?: string | undefined;
81
+ cellPhone?: string | undefined;
82
+ city?: string | undefined;
83
+ lastName?: string | undefined;
84
+ phone?: string | undefined;
85
+ docNumber?: string | undefined;
86
+ docType?: string | undefined;
87
+ isDefault?: boolean | undefined;
88
+ tokenCard: string;
89
+ email: string;
90
+ name: string;
91
+ }, {
92
+ tokenCard: import("convex/values").VString<string, "required">;
93
+ name: import("convex/values").VString<string, "required">;
94
+ lastName: import("convex/values").VString<string | undefined, "optional">;
95
+ email: import("convex/values").VString<string, "required">;
96
+ phone: import("convex/values").VString<string | undefined, "optional">;
97
+ cellPhone: import("convex/values").VString<string | undefined, "optional">;
98
+ docType: import("convex/values").VString<string | undefined, "optional">;
99
+ docNumber: import("convex/values").VString<string | undefined, "optional">;
100
+ isDefault: import("convex/values").VBoolean<boolean | undefined, "optional">;
101
+ city: import("convex/values").VString<string | undefined, "optional">;
102
+ address: import("convex/values").VString<string | undefined, "optional">;
103
+ }, "required", "tokenCard" | "address" | "cellPhone" | "city" | "email" | "lastName" | "name" | "phone" | "docNumber" | "docType" | "isDefault">;
104
+ export declare const tokenInfoValidator: import("convex/values").VObject<{
105
+ hasCvv?: boolean | undefined;
106
+ cardNumber: string;
107
+ expYear: string;
108
+ expMonth: string;
109
+ cvc: string;
110
+ }, {
111
+ cardNumber: import("convex/values").VString<string, "required">;
112
+ expYear: import("convex/values").VString<string, "required">;
113
+ expMonth: import("convex/values").VString<string, "required">;
114
+ cvc: import("convex/values").VString<string, "required">;
115
+ hasCvv: import("convex/values").VBoolean<boolean | undefined, "optional">;
116
+ }, "required", "cardNumber" | "expYear" | "expMonth" | "cvc" | "hasCvv">;
117
+ export declare const chargeInfoValidator: import("convex/values").VObject<{
118
+ address?: string | undefined;
119
+ cellPhone?: string | undefined;
120
+ city?: string | undefined;
121
+ phone?: string | undefined;
122
+ currency?: string | undefined;
123
+ ip?: string | undefined;
124
+ dues?: number | undefined;
125
+ urlResponse?: string | undefined;
126
+ urlConfirmation?: string | undefined;
127
+ methodConfirmation?: string | undefined;
128
+ useDefaultCardCustomer?: boolean | undefined;
129
+ extra1?: string | undefined;
130
+ extra2?: string | undefined;
131
+ extra3?: string | undefined;
132
+ split?: {
133
+ splitType?: string | undefined;
134
+ splitAppId?: string | undefined;
135
+ splitMerchantId?: string | undefined;
136
+ splitPrimaryReceiver?: string | undefined;
137
+ splitPrimaryReceiverFee?: string | undefined;
138
+ splitRule?: string | undefined;
139
+ splitReceivers?: {
140
+ fee?: string | undefined;
141
+ id: string;
142
+ total: string;
143
+ iva: string;
144
+ base_iva: string;
145
+ }[] | undefined;
146
+ } | undefined;
147
+ customerId: string;
148
+ tokenCard: string;
149
+ email: string;
150
+ lastName: string;
151
+ name: string;
152
+ description: string;
153
+ docNumber: string;
154
+ docType: string;
155
+ bill: string;
156
+ value: number;
157
+ tax: number;
158
+ taxBase: number;
159
+ }, {
160
+ tokenCard: import("convex/values").VString<string, "required">;
161
+ customerId: import("convex/values").VString<string, "required">;
162
+ docType: import("convex/values").VString<string, "required">;
163
+ docNumber: import("convex/values").VString<string, "required">;
164
+ name: import("convex/values").VString<string, "required">;
165
+ lastName: import("convex/values").VString<string, "required">;
166
+ email: import("convex/values").VString<string, "required">;
167
+ city: import("convex/values").VString<string | undefined, "optional">;
168
+ address: import("convex/values").VString<string | undefined, "optional">;
169
+ phone: import("convex/values").VString<string | undefined, "optional">;
170
+ cellPhone: import("convex/values").VString<string | undefined, "optional">;
171
+ bill: import("convex/values").VString<string, "required">;
172
+ description: import("convex/values").VString<string, "required">;
173
+ value: import("convex/values").VFloat64<number, "required">;
174
+ tax: import("convex/values").VFloat64<number, "required">;
175
+ taxBase: import("convex/values").VFloat64<number, "required">;
176
+ currency: import("convex/values").VString<string | undefined, "optional">;
177
+ dues: import("convex/values").VFloat64<number | undefined, "optional">;
178
+ ip: import("convex/values").VString<string | undefined, "optional">;
179
+ urlResponse: import("convex/values").VString<string | undefined, "optional">;
180
+ urlConfirmation: import("convex/values").VString<string | undefined, "optional">;
181
+ methodConfirmation: import("convex/values").VString<string | undefined, "optional">;
182
+ useDefaultCardCustomer: import("convex/values").VBoolean<boolean | undefined, "optional">;
183
+ extra1: import("convex/values").VString<string | undefined, "optional">;
184
+ extra2: import("convex/values").VString<string | undefined, "optional">;
185
+ extra3: import("convex/values").VString<string | undefined, "optional">;
186
+ split: import("convex/values").VObject<{
187
+ splitType?: string | undefined;
188
+ splitAppId?: string | undefined;
189
+ splitMerchantId?: string | undefined;
190
+ splitPrimaryReceiver?: string | undefined;
191
+ splitPrimaryReceiverFee?: string | undefined;
192
+ splitRule?: string | undefined;
193
+ splitReceivers?: {
194
+ fee?: string | undefined;
195
+ id: string;
196
+ total: string;
197
+ iva: string;
198
+ base_iva: string;
199
+ }[] | undefined;
200
+ } | undefined, {
201
+ splitType: import("convex/values").VString<string | undefined, "optional">;
202
+ splitAppId: import("convex/values").VString<string | undefined, "optional">;
203
+ splitMerchantId: import("convex/values").VString<string | undefined, "optional">;
204
+ splitPrimaryReceiver: import("convex/values").VString<string | undefined, "optional">;
205
+ splitPrimaryReceiverFee: import("convex/values").VString<string | undefined, "optional">;
206
+ splitRule: import("convex/values").VString<string | undefined, "optional">;
207
+ splitReceivers: import("convex/values").VArray<{
208
+ fee?: string | undefined;
209
+ id: string;
210
+ total: string;
211
+ iva: string;
212
+ base_iva: string;
213
+ }[] | undefined, import("convex/values").VObject<{
214
+ fee?: string | undefined;
215
+ id: string;
216
+ total: string;
217
+ iva: string;
218
+ base_iva: string;
219
+ }, {
220
+ id: import("convex/values").VString<string, "required">;
221
+ total: import("convex/values").VString<string, "required">;
222
+ iva: import("convex/values").VString<string, "required">;
223
+ base_iva: import("convex/values").VString<string, "required">;
224
+ fee: import("convex/values").VString<string | undefined, "optional">;
225
+ }, "required", "id" | "total" | "iva" | "base_iva" | "fee">, "optional">;
226
+ }, "optional", "splitType" | "splitAppId" | "splitMerchantId" | "splitPrimaryReceiver" | "splitPrimaryReceiverFee" | "splitRule" | "splitReceivers">;
227
+ }, "required", "customerId" | "tokenCard" | "address" | "cellPhone" | "city" | "email" | "lastName" | "name" | "phone" | "currency" | "description" | "docNumber" | "docType" | "ip" | "bill" | "value" | "tax" | "taxBase" | "dues" | "urlResponse" | "urlConfirmation" | "methodConfirmation" | "useDefaultCardCustomer" | "extra1" | "extra2" | "extra3" | "split" | "split.splitType" | "split.splitAppId" | "split.splitMerchantId" | "split.splitPrimaryReceiver" | "split.splitPrimaryReceiverFee" | "split.splitRule" | "split.splitReceivers">;
228
+ export declare const pseInfoValidator: import("convex/values").VObject<{
229
+ currency?: string | undefined;
230
+ ip?: string | undefined;
231
+ urlResponse?: string | undefined;
232
+ urlConfirmation?: string | undefined;
233
+ extra1?: string | undefined;
234
+ extra2?: string | undefined;
235
+ extra3?: string | undefined;
236
+ split?: {
237
+ splitType?: string | undefined;
238
+ splitAppId?: string | undefined;
239
+ splitMerchantId?: string | undefined;
240
+ splitPrimaryReceiver?: string | undefined;
241
+ splitPrimaryReceiverFee?: string | undefined;
242
+ splitRule?: string | undefined;
243
+ splitReceivers?: {
244
+ fee?: string | undefined;
245
+ id: string;
246
+ total: string;
247
+ iva: string;
248
+ base_iva: string;
249
+ }[] | undefined;
250
+ } | undefined;
251
+ country?: string | undefined;
252
+ cellPhone: string;
253
+ email: string;
254
+ lastName: string;
255
+ name: string;
256
+ description: string;
257
+ docNumber: string;
258
+ docType: string;
259
+ bill: string;
260
+ value: number;
261
+ tax: number;
262
+ taxBase: number;
263
+ bank: string;
264
+ typePerson: "0" | "1";
265
+ }, {
266
+ bank: import("convex/values").VString<string, "required">;
267
+ typePerson: import("convex/values").VUnion<"0" | "1", [import("convex/values").VLiteral<"0", "required">, import("convex/values").VLiteral<"1", "required">], "required", never>;
268
+ docType: import("convex/values").VString<string, "required">;
269
+ docNumber: import("convex/values").VString<string, "required">;
270
+ name: import("convex/values").VString<string, "required">;
271
+ lastName: import("convex/values").VString<string, "required">;
272
+ email: import("convex/values").VString<string, "required">;
273
+ cellPhone: import("convex/values").VString<string, "required">;
274
+ country: import("convex/values").VString<string | undefined, "optional">;
275
+ bill: import("convex/values").VString<string, "required">;
276
+ description: import("convex/values").VString<string, "required">;
277
+ value: import("convex/values").VFloat64<number, "required">;
278
+ tax: import("convex/values").VFloat64<number, "required">;
279
+ taxBase: import("convex/values").VFloat64<number, "required">;
280
+ currency: import("convex/values").VString<string | undefined, "optional">;
281
+ ip: import("convex/values").VString<string | undefined, "optional">;
282
+ urlResponse: import("convex/values").VString<string | undefined, "optional">;
283
+ urlConfirmation: import("convex/values").VString<string | undefined, "optional">;
284
+ extra1: import("convex/values").VString<string | undefined, "optional">;
285
+ extra2: import("convex/values").VString<string | undefined, "optional">;
286
+ extra3: import("convex/values").VString<string | undefined, "optional">;
287
+ split: import("convex/values").VObject<{
288
+ splitType?: string | undefined;
289
+ splitAppId?: string | undefined;
290
+ splitMerchantId?: string | undefined;
291
+ splitPrimaryReceiver?: string | undefined;
292
+ splitPrimaryReceiverFee?: string | undefined;
293
+ splitRule?: string | undefined;
294
+ splitReceivers?: {
295
+ fee?: string | undefined;
296
+ id: string;
297
+ total: string;
298
+ iva: string;
299
+ base_iva: string;
300
+ }[] | undefined;
301
+ } | undefined, {
302
+ splitType: import("convex/values").VString<string | undefined, "optional">;
303
+ splitAppId: import("convex/values").VString<string | undefined, "optional">;
304
+ splitMerchantId: import("convex/values").VString<string | undefined, "optional">;
305
+ splitPrimaryReceiver: import("convex/values").VString<string | undefined, "optional">;
306
+ splitPrimaryReceiverFee: import("convex/values").VString<string | undefined, "optional">;
307
+ splitRule: import("convex/values").VString<string | undefined, "optional">;
308
+ splitReceivers: import("convex/values").VArray<{
309
+ fee?: string | undefined;
310
+ id: string;
311
+ total: string;
312
+ iva: string;
313
+ base_iva: string;
314
+ }[] | undefined, import("convex/values").VObject<{
315
+ fee?: string | undefined;
316
+ id: string;
317
+ total: string;
318
+ iva: string;
319
+ base_iva: string;
320
+ }, {
321
+ id: import("convex/values").VString<string, "required">;
322
+ total: import("convex/values").VString<string, "required">;
323
+ iva: import("convex/values").VString<string, "required">;
324
+ base_iva: import("convex/values").VString<string, "required">;
325
+ fee: import("convex/values").VString<string | undefined, "optional">;
326
+ }, "required", "id" | "total" | "iva" | "base_iva" | "fee">, "optional">;
327
+ }, "optional", "splitType" | "splitAppId" | "splitMerchantId" | "splitPrimaryReceiver" | "splitPrimaryReceiverFee" | "splitRule" | "splitReceivers">;
328
+ }, "required", "cellPhone" | "email" | "lastName" | "name" | "currency" | "description" | "docNumber" | "docType" | "ip" | "bill" | "value" | "tax" | "taxBase" | "urlResponse" | "urlConfirmation" | "extra1" | "extra2" | "extra3" | "split" | "split.splitType" | "split.splitAppId" | "split.splitMerchantId" | "split.splitPrimaryReceiver" | "split.splitPrimaryReceiverFee" | "split.splitRule" | "split.splitReceivers" | "bank" | "typePerson" | "country">;
329
+ export declare const cashProviderValidator: import("convex/values").VUnion<"efecty" | "baloto" | "gana" | "redservi" | "puntored" | "sured", [import("convex/values").VLiteral<"efecty", "required">, import("convex/values").VLiteral<"baloto", "required">, import("convex/values").VLiteral<"gana", "required">, import("convex/values").VLiteral<"redservi", "required">, import("convex/values").VLiteral<"puntored", "required">, import("convex/values").VLiteral<"sured", "required">], "required", never>;
330
+ export declare const cashInfoValidator: import("convex/values").VObject<{
331
+ currency?: string | undefined;
332
+ ip?: string | undefined;
333
+ urlResponse?: string | undefined;
334
+ urlConfirmation?: string | undefined;
335
+ extra1?: string | undefined;
336
+ extra2?: string | undefined;
337
+ extra3?: string | undefined;
338
+ split?: {
339
+ splitType?: string | undefined;
340
+ splitAppId?: string | undefined;
341
+ splitMerchantId?: string | undefined;
342
+ splitPrimaryReceiver?: string | undefined;
343
+ splitPrimaryReceiverFee?: string | undefined;
344
+ splitRule?: string | undefined;
345
+ splitReceivers?: {
346
+ fee?: string | undefined;
347
+ id: string;
348
+ total: string;
349
+ iva: string;
350
+ base_iva: string;
351
+ }[] | undefined;
352
+ } | undefined;
353
+ typePerson?: "0" | "1" | undefined;
354
+ endDate?: string | undefined;
355
+ cellPhone: string;
356
+ email: string;
357
+ lastName: string;
358
+ name: string;
359
+ description: string;
360
+ docNumber: string;
361
+ docType: string;
362
+ bill: string;
363
+ value: number;
364
+ tax: number;
365
+ taxBase: number;
366
+ }, {
367
+ docType: import("convex/values").VString<string, "required">;
368
+ docNumber: import("convex/values").VString<string, "required">;
369
+ typePerson: import("convex/values").VUnion<"0" | "1" | undefined, [import("convex/values").VLiteral<"0", "required">, import("convex/values").VLiteral<"1", "required">], "optional", never>;
370
+ name: import("convex/values").VString<string, "required">;
371
+ lastName: import("convex/values").VString<string, "required">;
372
+ email: import("convex/values").VString<string, "required">;
373
+ cellPhone: import("convex/values").VString<string, "required">;
374
+ bill: import("convex/values").VString<string, "required">;
375
+ description: import("convex/values").VString<string, "required">;
376
+ value: import("convex/values").VFloat64<number, "required">;
377
+ tax: import("convex/values").VFloat64<number, "required">;
378
+ taxBase: import("convex/values").VFloat64<number, "required">;
379
+ currency: import("convex/values").VString<string | undefined, "optional">;
380
+ ip: import("convex/values").VString<string | undefined, "optional">;
381
+ urlResponse: import("convex/values").VString<string | undefined, "optional">;
382
+ urlConfirmation: import("convex/values").VString<string | undefined, "optional">;
383
+ endDate: import("convex/values").VString<string | undefined, "optional">;
384
+ extra1: import("convex/values").VString<string | undefined, "optional">;
385
+ extra2: import("convex/values").VString<string | undefined, "optional">;
386
+ extra3: import("convex/values").VString<string | undefined, "optional">;
387
+ split: import("convex/values").VObject<{
388
+ splitType?: string | undefined;
389
+ splitAppId?: string | undefined;
390
+ splitMerchantId?: string | undefined;
391
+ splitPrimaryReceiver?: string | undefined;
392
+ splitPrimaryReceiverFee?: string | undefined;
393
+ splitRule?: string | undefined;
394
+ splitReceivers?: {
395
+ fee?: string | undefined;
396
+ id: string;
397
+ total: string;
398
+ iva: string;
399
+ base_iva: string;
400
+ }[] | undefined;
401
+ } | undefined, {
402
+ splitType: import("convex/values").VString<string | undefined, "optional">;
403
+ splitAppId: import("convex/values").VString<string | undefined, "optional">;
404
+ splitMerchantId: import("convex/values").VString<string | undefined, "optional">;
405
+ splitPrimaryReceiver: import("convex/values").VString<string | undefined, "optional">;
406
+ splitPrimaryReceiverFee: import("convex/values").VString<string | undefined, "optional">;
407
+ splitRule: import("convex/values").VString<string | undefined, "optional">;
408
+ splitReceivers: import("convex/values").VArray<{
409
+ fee?: string | undefined;
410
+ id: string;
411
+ total: string;
412
+ iva: string;
413
+ base_iva: string;
414
+ }[] | undefined, import("convex/values").VObject<{
415
+ fee?: string | undefined;
416
+ id: string;
417
+ total: string;
418
+ iva: string;
419
+ base_iva: string;
420
+ }, {
421
+ id: import("convex/values").VString<string, "required">;
422
+ total: import("convex/values").VString<string, "required">;
423
+ iva: import("convex/values").VString<string, "required">;
424
+ base_iva: import("convex/values").VString<string, "required">;
425
+ fee: import("convex/values").VString<string | undefined, "optional">;
426
+ }, "required", "id" | "total" | "iva" | "base_iva" | "fee">, "optional">;
427
+ }, "optional", "splitType" | "splitAppId" | "splitMerchantId" | "splitPrimaryReceiver" | "splitPrimaryReceiverFee" | "splitRule" | "splitReceivers">;
428
+ }, "required", "cellPhone" | "email" | "lastName" | "name" | "currency" | "description" | "docNumber" | "docType" | "ip" | "bill" | "value" | "tax" | "taxBase" | "urlResponse" | "urlConfirmation" | "extra1" | "extra2" | "extra3" | "split" | "split.splitType" | "split.splitAppId" | "split.splitMerchantId" | "split.splitPrimaryReceiver" | "split.splitPrimaryReceiverFee" | "split.splitRule" | "split.splitReceivers" | "typePerson" | "endDate">;
429
+ export declare const daviplataInfoValidator: import("convex/values").VObject<{
430
+ address?: string | undefined;
431
+ city?: string | undefined;
432
+ currency?: string | undefined;
433
+ ip?: string | undefined;
434
+ urlConfirmation?: string | undefined;
435
+ methodConfirmation?: string | undefined;
436
+ country?: string | undefined;
437
+ indCountry?: string | undefined;
438
+ email: string;
439
+ lastName: string;
440
+ name: string;
441
+ phone: string;
442
+ description: string;
443
+ docNumber: string;
444
+ docType: string;
445
+ value: number;
446
+ tax: number;
447
+ taxBase: number;
448
+ }, {
449
+ docType: import("convex/values").VString<string, "required">;
450
+ docNumber: import("convex/values").VString<string, "required">;
451
+ name: import("convex/values").VString<string, "required">;
452
+ lastName: import("convex/values").VString<string, "required">;
453
+ email: import("convex/values").VString<string, "required">;
454
+ indCountry: import("convex/values").VString<string | undefined, "optional">;
455
+ phone: import("convex/values").VString<string, "required">;
456
+ country: import("convex/values").VString<string | undefined, "optional">;
457
+ city: import("convex/values").VString<string | undefined, "optional">;
458
+ address: import("convex/values").VString<string | undefined, "optional">;
459
+ ip: import("convex/values").VString<string | undefined, "optional">;
460
+ description: import("convex/values").VString<string, "required">;
461
+ value: import("convex/values").VFloat64<number, "required">;
462
+ tax: import("convex/values").VFloat64<number, "required">;
463
+ taxBase: import("convex/values").VFloat64<number, "required">;
464
+ currency: import("convex/values").VString<string | undefined, "optional">;
465
+ methodConfirmation: import("convex/values").VString<string | undefined, "optional">;
466
+ urlConfirmation: import("convex/values").VString<string | undefined, "optional">;
467
+ }, "required", "address" | "city" | "email" | "lastName" | "name" | "phone" | "currency" | "description" | "docNumber" | "docType" | "ip" | "value" | "tax" | "taxBase" | "urlConfirmation" | "methodConfirmation" | "country" | "indCountry">;
468
+ export declare const safetypayInfoValidator: import("convex/values").VObject<{
469
+ address?: string | undefined;
470
+ city?: string | undefined;
471
+ currency?: string | undefined;
472
+ ip?: string | undefined;
473
+ urlConfirmation?: string | undefined;
474
+ methodConfirmation?: string | undefined;
475
+ country?: string | undefined;
476
+ endDate?: string | undefined;
477
+ indCountry?: string | undefined;
478
+ invoice?: string | undefined;
479
+ ico?: number | undefined;
480
+ email: string;
481
+ lastName: string;
482
+ name: string;
483
+ phone: string;
484
+ description: string;
485
+ docNumber: string;
486
+ docType: string;
487
+ cash: "1" | "2";
488
+ value: number;
489
+ tax: number;
490
+ taxBase: number;
491
+ }, {
492
+ cash: import("convex/values").VUnion<"1" | "2", [import("convex/values").VLiteral<"1", "required">, import("convex/values").VLiteral<"2", "required">], "required", never>;
493
+ endDate: import("convex/values").VString<string | undefined, "optional">;
494
+ docType: import("convex/values").VString<string, "required">;
495
+ docNumber: import("convex/values").VString<string, "required">;
496
+ name: import("convex/values").VString<string, "required">;
497
+ lastName: import("convex/values").VString<string, "required">;
498
+ email: import("convex/values").VString<string, "required">;
499
+ indCountry: import("convex/values").VString<string | undefined, "optional">;
500
+ phone: import("convex/values").VString<string, "required">;
501
+ country: import("convex/values").VString<string | undefined, "optional">;
502
+ city: import("convex/values").VString<string | undefined, "optional">;
503
+ address: import("convex/values").VString<string | undefined, "optional">;
504
+ invoice: import("convex/values").VString<string | undefined, "optional">;
505
+ ip: import("convex/values").VString<string | undefined, "optional">;
506
+ description: import("convex/values").VString<string, "required">;
507
+ value: import("convex/values").VFloat64<number, "required">;
508
+ tax: import("convex/values").VFloat64<number, "required">;
509
+ ico: import("convex/values").VFloat64<number | undefined, "optional">;
510
+ taxBase: import("convex/values").VFloat64<number, "required">;
511
+ currency: import("convex/values").VString<string | undefined, "optional">;
512
+ methodConfirmation: import("convex/values").VString<string | undefined, "optional">;
513
+ urlConfirmation: import("convex/values").VString<string | undefined, "optional">;
514
+ }, "required", "address" | "city" | "email" | "lastName" | "name" | "phone" | "currency" | "description" | "docNumber" | "docType" | "ip" | "cash" | "value" | "tax" | "taxBase" | "urlConfirmation" | "methodConfirmation" | "country" | "endDate" | "indCountry" | "invoice" | "ico">;
515
+ export declare const planInfoValidator: import("convex/values").VObject<{
516
+ iva?: number | undefined;
517
+ ico?: number | undefined;
518
+ name: string;
519
+ amount: number;
520
+ currency: string;
521
+ description: string;
522
+ interval: string;
523
+ intervalCount: number;
524
+ trialDays: number;
525
+ idPlan: string;
526
+ }, {
527
+ idPlan: import("convex/values").VString<string, "required">;
528
+ name: import("convex/values").VString<string, "required">;
529
+ description: import("convex/values").VString<string, "required">;
530
+ amount: import("convex/values").VFloat64<number, "required">;
531
+ currency: import("convex/values").VString<string, "required">;
532
+ interval: import("convex/values").VString<string, "required">;
533
+ intervalCount: import("convex/values").VFloat64<number, "required">;
534
+ trialDays: import("convex/values").VFloat64<number, "required">;
535
+ iva: import("convex/values").VFloat64<number | undefined, "optional">;
536
+ ico: import("convex/values").VFloat64<number | undefined, "optional">;
537
+ }, "required", "name" | "amount" | "currency" | "description" | "interval" | "intervalCount" | "trialDays" | "idPlan" | "iva" | "ico">;
538
+ export declare const subscriptionInfoValidator: import("convex/values").VObject<{
539
+ urlConfirmation?: string | undefined;
540
+ methodConfirmation?: string | undefined;
541
+ tokenCard: string;
542
+ customer: string;
543
+ docNumber: string;
544
+ docType: string;
545
+ idPlan: string;
546
+ }, {
547
+ idPlan: import("convex/values").VString<string, "required">;
548
+ customer: import("convex/values").VString<string, "required">;
549
+ tokenCard: import("convex/values").VString<string, "required">;
550
+ docType: import("convex/values").VString<string, "required">;
551
+ docNumber: import("convex/values").VString<string, "required">;
552
+ urlConfirmation: import("convex/values").VString<string | undefined, "optional">;
553
+ methodConfirmation: import("convex/values").VString<string | undefined, "optional">;
554
+ }, "required", "tokenCard" | "customer" | "docNumber" | "docType" | "idPlan" | "urlConfirmation" | "methodConfirmation">;
555
+ export declare const paymentMethodValidator: import("convex/values").VUnion<"credit_card" | "pse" | "cash" | "daviplata" | "safetypay", [import("convex/values").VLiteral<"credit_card", "required">, import("convex/values").VLiteral<"pse", "required">, import("convex/values").VLiteral<"cash", "required">, import("convex/values").VLiteral<"daviplata", "required">, import("convex/values").VLiteral<"safetypay", "required">], "required", never>;
556
+ export declare const transactionStatusValidator: import("convex/values").VUnion<"pending" | "approved" | "rejected" | "failed" | "expired" | "reversed", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"approved", "required">, import("convex/values").VLiteral<"rejected", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"expired", "required">, import("convex/values").VLiteral<"reversed", "required">], "required", never>;
557
+ /** Split receivers persisted on a transaction (numeric form for local use). */
558
+ export declare const storedSplitReceiverValidator: import("convex/values").VObject<{
559
+ fee?: number | undefined;
560
+ id: string;
561
+ total: number;
562
+ iva: number;
563
+ base_iva: number;
564
+ }, {
565
+ id: import("convex/values").VString<string, "required">;
566
+ total: import("convex/values").VFloat64<number, "required">;
567
+ iva: import("convex/values").VFloat64<number, "required">;
568
+ base_iva: import("convex/values").VFloat64<number, "required">;
569
+ fee: import("convex/values").VFloat64<number | undefined, "optional">;
570
+ }, "required", "id" | "total" | "iva" | "base_iva" | "fee">;
571
+ //# sourceMappingURL=validators.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../src/component/validators.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;6DAKrC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,yEAAyE;AACzE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;2DAMjC,CAAC;AAEH,0EAA0E;AAC1E,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oJAQhC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;gJAYhC,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;wEAM7B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uhBA4B9B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ocAuB3B,CAAC;AAEH,eAAO,MAAM,qBAAqB,wcAOjC,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2bAsB5B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8OAmBjC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uRAuBjC,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;sIAW5B,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;wHAQpC,CAAC;AAEH,eAAO,MAAM,sBAAsB,+YAMlC,CAAC;AAEF,eAAO,MAAM,0BAA0B,sdAOtC,CAAC;AAEF,+EAA+E;AAC/E,eAAO,MAAM,4BAA4B;;;;;;;;;;;;2DAMvC,CAAC"}