@mbanq/core-sdk-js 1.0.0-alpha.8 → 1.0.0-alpha.9

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.
@@ -1,434 +0,0 @@
1
- import { a as Config, C as Command } from './config.d-CyK6ZM6s.mjs';
2
- import { z } from 'zod';
3
-
4
- declare const PaymentFilterKeySchema: z.ZodEnum<{
5
- originatorName: "originatorName";
6
- originatorAccount: "originatorAccount";
7
- originatorBankRoutingCode: "originatorBankRoutingCode";
8
- recipientName: "recipientName";
9
- recipientAccount: "recipientAccount";
10
- recipientBankRoutingCode: "recipientBankRoutingCode";
11
- reference: "reference";
12
- traceNumber: "traceNumber";
13
- externalId: "externalId";
14
- clientId: "clientId";
15
- dateFormat: "dateFormat";
16
- locale: "locale";
17
- originatedBy: "originatedBy";
18
- paymentRail: "paymentRail";
19
- paymentType: "paymentType";
20
- fromValueDate: "fromValueDate";
21
- toValueDate: "toValueDate";
22
- fromExecuteDate: "fromExecuteDate";
23
- toExecuteDate: "toExecuteDate";
24
- status: "status";
25
- fromReturnDate: "fromReturnDate";
26
- toReturnDate: "toReturnDate";
27
- isSettlement: "isSettlement";
28
- orderBy: "orderBy";
29
- sortOrder: "sortOrder";
30
- }>;
31
- declare const PaymentStatusSchema: z.ZodEnum<{
32
- DRAFT: "DRAFT";
33
- AML_SCREENING: "AML_SCREENING";
34
- AML_REJECTED: "AML_REJECTED";
35
- EXECUTION_SCHEDULED: "EXECUTION_SCHEDULED";
36
- EXECUTION_PROCESSING: "EXECUTION_PROCESSING";
37
- EXECUTION_SUCCESS: "EXECUTION_SUCCESS";
38
- EXECUTION_FAILURE: "EXECUTION_FAILURE";
39
- RETURNED: "RETURNED";
40
- CANCELLED: "CANCELLED";
41
- COMPLIANCE_FAILURE: "COMPLIANCE_FAILURE";
42
- DELETED: "DELETED";
43
- UNKNOWN: "UNKNOWN";
44
- }>;
45
- declare const PaymentRailSchema: z.ZodEnum<{
46
- ACH: "ACH";
47
- SAMEDAYACH: "SAMEDAYACH";
48
- WIRE: "WIRE";
49
- SWIFT: "SWIFT";
50
- INTERNAL: "INTERNAL";
51
- FXPAY: "FXPAY";
52
- CARD: "CARD";
53
- }>;
54
- declare const PaymentTypeSchema: z.ZodEnum<{
55
- CREDIT: "CREDIT";
56
- DEBIT: "DEBIT";
57
- }>;
58
- declare const SortOrderSchema: z.ZodEnum<{
59
- ASC: "ASC";
60
- DESC: "DESC";
61
- }>;
62
- type PaymentStatus = z.infer<typeof PaymentStatusSchema>;
63
- type PaymentRailType = z.infer<typeof PaymentRailSchema>;
64
- type PaymentType = z.infer<typeof PaymentTypeSchema>;
65
- declare const PaymentSchema: z.ZodObject<{
66
- id: z.ZodString;
67
- amount: z.ZodNumber;
68
- clientId: z.ZodString;
69
- currency: z.ZodString;
70
- status: z.ZodOptional<z.ZodEnum<{
71
- DRAFT: "DRAFT";
72
- AML_SCREENING: "AML_SCREENING";
73
- AML_REJECTED: "AML_REJECTED";
74
- EXECUTION_SCHEDULED: "EXECUTION_SCHEDULED";
75
- EXECUTION_PROCESSING: "EXECUTION_PROCESSING";
76
- EXECUTION_SUCCESS: "EXECUTION_SUCCESS";
77
- EXECUTION_FAILURE: "EXECUTION_FAILURE";
78
- RETURNED: "RETURNED";
79
- CANCELLED: "CANCELLED";
80
- COMPLIANCE_FAILURE: "COMPLIANCE_FAILURE";
81
- DELETED: "DELETED";
82
- UNKNOWN: "UNKNOWN";
83
- }>>;
84
- createdAt: z.ZodOptional<z.ZodString>;
85
- updatedAt: z.ZodOptional<z.ZodString>;
86
- }, z.core.$catchall<z.ZodAny>>;
87
- declare const CreatePaymentInputSchema: z.ZodObject<{
88
- amount: z.ZodNumber;
89
- currency: z.ZodString;
90
- paymentRail: z.ZodEnum<{
91
- ACH: "ACH";
92
- SAMEDAYACH: "SAMEDAYACH";
93
- WIRE: "WIRE";
94
- SWIFT: "SWIFT";
95
- INTERNAL: "INTERNAL";
96
- FXPAY: "FXPAY";
97
- CARD: "CARD";
98
- }>;
99
- paymentType: z.ZodEnum<{
100
- CREDIT: "CREDIT";
101
- DEBIT: "DEBIT";
102
- }>;
103
- debtor: z.ZodObject<{
104
- name: z.ZodString;
105
- identifier: z.ZodString;
106
- accountType: z.ZodOptional<z.ZodEnum<{
107
- CHECKING: "CHECKING";
108
- SAVINGS: "SAVINGS";
109
- }>>;
110
- address: z.ZodOptional<z.ZodObject<{
111
- streetAddress: z.ZodOptional<z.ZodString>;
112
- city: z.ZodOptional<z.ZodString>;
113
- state: z.ZodOptional<z.ZodString>;
114
- country: z.ZodOptional<z.ZodString>;
115
- postalCode: z.ZodOptional<z.ZodString>;
116
- }, z.core.$strip>>;
117
- agent: z.ZodOptional<z.ZodObject<{
118
- name: z.ZodOptional<z.ZodString>;
119
- identifier: z.ZodOptional<z.ZodString>;
120
- address: z.ZodOptional<z.ZodObject<{
121
- streetAddress: z.ZodOptional<z.ZodString>;
122
- city: z.ZodOptional<z.ZodString>;
123
- state: z.ZodOptional<z.ZodString>;
124
- country: z.ZodOptional<z.ZodString>;
125
- postalCode: z.ZodOptional<z.ZodString>;
126
- }, z.core.$strip>>;
127
- }, z.core.$strip>>;
128
- }, z.core.$strip>;
129
- creditor: z.ZodObject<{
130
- name: z.ZodString;
131
- identifier: z.ZodString;
132
- accountType: z.ZodOptional<z.ZodEnum<{
133
- CHECKING: "CHECKING";
134
- SAVINGS: "SAVINGS";
135
- }>>;
136
- address: z.ZodOptional<z.ZodObject<{
137
- streetAddress: z.ZodOptional<z.ZodString>;
138
- city: z.ZodOptional<z.ZodString>;
139
- state: z.ZodOptional<z.ZodString>;
140
- country: z.ZodOptional<z.ZodString>;
141
- postalCode: z.ZodOptional<z.ZodString>;
142
- }, z.core.$strip>>;
143
- agent: z.ZodOptional<z.ZodObject<{
144
- name: z.ZodOptional<z.ZodString>;
145
- identifier: z.ZodOptional<z.ZodString>;
146
- address: z.ZodOptional<z.ZodObject<{
147
- streetAddress: z.ZodOptional<z.ZodString>;
148
- city: z.ZodOptional<z.ZodString>;
149
- state: z.ZodOptional<z.ZodString>;
150
- country: z.ZodOptional<z.ZodString>;
151
- postalCode: z.ZodOptional<z.ZodString>;
152
- }, z.core.$strip>>;
153
- }, z.core.$strip>>;
154
- }, z.core.$strip>;
155
- clientId: z.ZodOptional<z.ZodString>;
156
- correspondent: z.ZodOptional<z.ZodObject<{
157
- name: z.ZodString;
158
- identifier: z.ZodString;
159
- accountType: z.ZodOptional<z.ZodEnum<{
160
- CHECKING: "CHECKING";
161
- SAVINGS: "SAVINGS";
162
- }>>;
163
- address: z.ZodOptional<z.ZodObject<{
164
- streetAddress: z.ZodOptional<z.ZodString>;
165
- city: z.ZodOptional<z.ZodString>;
166
- state: z.ZodOptional<z.ZodString>;
167
- country: z.ZodOptional<z.ZodString>;
168
- postalCode: z.ZodOptional<z.ZodString>;
169
- }, z.core.$strip>>;
170
- agent: z.ZodOptional<z.ZodObject<{
171
- name: z.ZodOptional<z.ZodString>;
172
- identifier: z.ZodOptional<z.ZodString>;
173
- address: z.ZodOptional<z.ZodObject<{
174
- streetAddress: z.ZodOptional<z.ZodString>;
175
- city: z.ZodOptional<z.ZodString>;
176
- state: z.ZodOptional<z.ZodString>;
177
- country: z.ZodOptional<z.ZodString>;
178
- postalCode: z.ZodOptional<z.ZodString>;
179
- }, z.core.$strip>>;
180
- }, z.core.$strip>>;
181
- }, z.core.$strip>>;
182
- exchangeRate: z.ZodOptional<z.ZodNumber>;
183
- externalId: z.ZodOptional<z.ZodString>;
184
- reference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
185
- paymentRailMetaData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
186
- chargeBearer: z.ZodOptional<z.ZodEnum<{
187
- OUR: "OUR";
188
- BEN: "BEN";
189
- SHA: "SHA";
190
- }>>;
191
- purposeCode: z.ZodOptional<z.ZodString>;
192
- valueDate: z.ZodOptional<z.ZodString>;
193
- executionDate: z.ZodOptional<z.ZodString>;
194
- }, z.core.$catchall<z.ZodAny>>;
195
- declare const UpdatePaymentInputSchema: z.ZodObject<{
196
- amount: z.ZodOptional<z.ZodNumber>;
197
- correspondent: z.ZodOptional<z.ZodObject<{
198
- name: z.ZodOptional<z.ZodString>;
199
- identifier: z.ZodOptional<z.ZodString>;
200
- accountType: z.ZodOptional<z.ZodString>;
201
- }, z.core.$strip>>;
202
- creditor: z.ZodOptional<z.ZodObject<{
203
- name: z.ZodOptional<z.ZodString>;
204
- identifier: z.ZodOptional<z.ZodString>;
205
- accountType: z.ZodOptional<z.ZodString>;
206
- agent: z.ZodOptional<z.ZodObject<{
207
- name: z.ZodOptional<z.ZodString>;
208
- identifier: z.ZodOptional<z.ZodString>;
209
- }, z.core.$strip>>;
210
- }, z.core.$strip>>;
211
- debtor: z.ZodOptional<z.ZodObject<{
212
- name: z.ZodOptional<z.ZodString>;
213
- identifier: z.ZodOptional<z.ZodString>;
214
- accountType: z.ZodOptional<z.ZodString>;
215
- agent: z.ZodOptional<z.ZodObject<{
216
- name: z.ZodOptional<z.ZodString>;
217
- identifier: z.ZodOptional<z.ZodString>;
218
- }, z.core.$strip>>;
219
- }, z.core.$strip>>;
220
- exchangeRate: z.ZodOptional<z.ZodNumber>;
221
- externalId: z.ZodOptional<z.ZodString>;
222
- errorCode: z.ZodOptional<z.ZodString>;
223
- errorMessage: z.ZodOptional<z.ZodString>;
224
- reference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
225
- paymentRailMetaData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
226
- status: z.ZodOptional<z.ZodEnum<{
227
- DRAFT: "DRAFT";
228
- AML_SCREENING: "AML_SCREENING";
229
- AML_REJECTED: "AML_REJECTED";
230
- EXECUTION_SCHEDULED: "EXECUTION_SCHEDULED";
231
- EXECUTION_PROCESSING: "EXECUTION_PROCESSING";
232
- EXECUTION_SUCCESS: "EXECUTION_SUCCESS";
233
- EXECUTION_FAILURE: "EXECUTION_FAILURE";
234
- RETURNED: "RETURNED";
235
- CANCELLED: "CANCELLED";
236
- COMPLIANCE_FAILURE: "COMPLIANCE_FAILURE";
237
- DELETED: "DELETED";
238
- UNKNOWN: "UNKNOWN";
239
- }>>;
240
- }, z.core.$catchall<z.ZodAny>>;
241
- declare const PaymentResponseSchema: z.ZodObject<{
242
- totalFilteredRecords: z.ZodNumber;
243
- pageItems: z.ZodArray<z.ZodObject<{
244
- id: z.ZodString;
245
- amount: z.ZodNumber;
246
- clientId: z.ZodString;
247
- currency: z.ZodString;
248
- status: z.ZodOptional<z.ZodEnum<{
249
- DRAFT: "DRAFT";
250
- AML_SCREENING: "AML_SCREENING";
251
- AML_REJECTED: "AML_REJECTED";
252
- EXECUTION_SCHEDULED: "EXECUTION_SCHEDULED";
253
- EXECUTION_PROCESSING: "EXECUTION_PROCESSING";
254
- EXECUTION_SUCCESS: "EXECUTION_SUCCESS";
255
- EXECUTION_FAILURE: "EXECUTION_FAILURE";
256
- RETURNED: "RETURNED";
257
- CANCELLED: "CANCELLED";
258
- COMPLIANCE_FAILURE: "COMPLIANCE_FAILURE";
259
- DELETED: "DELETED";
260
- UNKNOWN: "UNKNOWN";
261
- }>>;
262
- createdAt: z.ZodOptional<z.ZodString>;
263
- updatedAt: z.ZodOptional<z.ZodString>;
264
- }, z.core.$catchall<z.ZodAny>>>;
265
- }, z.core.$strip>;
266
- type Payment = z.infer<typeof PaymentSchema>;
267
- type CreatePaymentInput = z.infer<typeof CreatePaymentInputSchema>;
268
- type UpdatePaymentInput = z.infer<typeof UpdatePaymentInputSchema>;
269
- type PaymentResponse = z.infer<typeof PaymentResponseSchema>;
270
-
271
- declare const createClient: (initialConfig: Config) => {
272
- payment: {
273
- create: (data: CreatePaymentInput) => Promise<{
274
- execute: () => Promise<{
275
- [x: string]: any;
276
- id: string;
277
- amount: number;
278
- clientId: string;
279
- currency: string;
280
- status?: "DRAFT" | "AML_SCREENING" | "AML_REJECTED" | "EXECUTION_SCHEDULED" | "EXECUTION_PROCESSING" | "EXECUTION_SUCCESS" | "EXECUTION_FAILURE" | "RETURNED" | "CANCELLED" | "COMPLIANCE_FAILURE" | "DELETED" | "UNKNOWN" | undefined;
281
- createdAt?: string | undefined;
282
- updatedAt?: string | undefined;
283
- } | undefined>;
284
- }>;
285
- get: (id: string) => Promise<{
286
- execute: () => Promise<{
287
- [x: string]: any;
288
- id: string;
289
- amount: number;
290
- clientId: string;
291
- currency: string;
292
- status?: "DRAFT" | "AML_SCREENING" | "AML_REJECTED" | "EXECUTION_SCHEDULED" | "EXECUTION_PROCESSING" | "EXECUTION_SUCCESS" | "EXECUTION_FAILURE" | "RETURNED" | "CANCELLED" | "COMPLIANCE_FAILURE" | "DELETED" | "UNKNOWN" | undefined;
293
- createdAt?: string | undefined;
294
- updatedAt?: string | undefined;
295
- } | undefined>;
296
- }>;
297
- update: (id: string, data: UpdatePaymentInput) => Promise<{
298
- execute: () => Promise<{
299
- [x: string]: any;
300
- id: string;
301
- amount: number;
302
- clientId: string;
303
- currency: string;
304
- status?: "DRAFT" | "AML_SCREENING" | "AML_REJECTED" | "EXECUTION_SCHEDULED" | "EXECUTION_PROCESSING" | "EXECUTION_SUCCESS" | "EXECUTION_FAILURE" | "RETURNED" | "CANCELLED" | "COMPLIANCE_FAILURE" | "DELETED" | "UNKNOWN" | undefined;
305
- createdAt?: string | undefined;
306
- updatedAt?: string | undefined;
307
- } | undefined>;
308
- }>;
309
- delete: (id: string) => Promise<{
310
- execute: () => Promise<void | undefined>;
311
- }>;
312
- list: () => {
313
- where: (field: string) => {
314
- eq: (value: any) => {
315
- where: /*elided*/ any;
316
- limit: (value: number) => /*elided*/ any;
317
- offset: (value: number) => /*elided*/ any;
318
- execute: () => Command<any, Array<Payment>>;
319
- };
320
- };
321
- limit: (value: number) => {
322
- where: (field: string) => {
323
- eq: (value: any) => /*elided*/ any;
324
- };
325
- limit: /*elided*/ any;
326
- offset: (value: number) => /*elided*/ any;
327
- execute: () => Command<any, Array<Payment>>;
328
- };
329
- offset: (value: number) => {
330
- where: (field: string) => {
331
- eq: (value: any) => /*elided*/ any;
332
- };
333
- limit: (value: number) => /*elided*/ any;
334
- offset: /*elided*/ any;
335
- execute: () => Command<any, Array<Payment>>;
336
- };
337
- execute: () => Promise<{
338
- [x: string]: any;
339
- id: string;
340
- amount: number;
341
- clientId: string;
342
- currency: string;
343
- status?: "DRAFT" | "AML_SCREENING" | "AML_REJECTED" | "EXECUTION_SCHEDULED" | "EXECUTION_PROCESSING" | "EXECUTION_SUCCESS" | "EXECUTION_FAILURE" | "RETURNED" | "CANCELLED" | "COMPLIANCE_FAILURE" | "DELETED" | "UNKNOWN" | undefined;
344
- createdAt?: string | undefined;
345
- updatedAt?: string | undefined;
346
- }[] | undefined>;
347
- };
348
- };
349
- setConfig: (config: Config) => void;
350
- updateConfig: (config: Partial<Config>) => void;
351
- resetConfig: () => void;
352
- request: <TOutput>(command: Command<any, TOutput>) => Promise<TOutput | undefined>;
353
- tenant: (tenantId: string) => {
354
- payment: {
355
- create: (data: CreatePaymentInput) => Promise<{
356
- execute: () => Promise<{
357
- [x: string]: any;
358
- id: string;
359
- amount: number;
360
- clientId: string;
361
- currency: string;
362
- status?: "DRAFT" | "AML_SCREENING" | "AML_REJECTED" | "EXECUTION_SCHEDULED" | "EXECUTION_PROCESSING" | "EXECUTION_SUCCESS" | "EXECUTION_FAILURE" | "RETURNED" | "CANCELLED" | "COMPLIANCE_FAILURE" | "DELETED" | "UNKNOWN" | undefined;
363
- createdAt?: string | undefined;
364
- updatedAt?: string | undefined;
365
- } | undefined>;
366
- }>;
367
- get: (id: string) => Promise<{
368
- execute: () => Promise<{
369
- [x: string]: any;
370
- id: string;
371
- amount: number;
372
- clientId: string;
373
- currency: string;
374
- status?: "DRAFT" | "AML_SCREENING" | "AML_REJECTED" | "EXECUTION_SCHEDULED" | "EXECUTION_PROCESSING" | "EXECUTION_SUCCESS" | "EXECUTION_FAILURE" | "RETURNED" | "CANCELLED" | "COMPLIANCE_FAILURE" | "DELETED" | "UNKNOWN" | undefined;
375
- createdAt?: string | undefined;
376
- updatedAt?: string | undefined;
377
- } | undefined>;
378
- }>;
379
- update: (id: string, data: UpdatePaymentInput) => Promise<{
380
- execute: () => Promise<{
381
- [x: string]: any;
382
- id: string;
383
- amount: number;
384
- clientId: string;
385
- currency: string;
386
- status?: "DRAFT" | "AML_SCREENING" | "AML_REJECTED" | "EXECUTION_SCHEDULED" | "EXECUTION_PROCESSING" | "EXECUTION_SUCCESS" | "EXECUTION_FAILURE" | "RETURNED" | "CANCELLED" | "COMPLIANCE_FAILURE" | "DELETED" | "UNKNOWN" | undefined;
387
- createdAt?: string | undefined;
388
- updatedAt?: string | undefined;
389
- } | undefined>;
390
- }>;
391
- delete: (id: string) => Promise<{
392
- execute: () => Promise<void | undefined>;
393
- }>;
394
- list: () => {
395
- where: (field: string) => {
396
- eq: (value: any) => {
397
- where: /*elided*/ any;
398
- limit: (value: number) => /*elided*/ any;
399
- offset: (value: number) => /*elided*/ any;
400
- execute: () => Command<any, Array<Payment>>;
401
- };
402
- };
403
- limit: (value: number) => {
404
- where: (field: string) => {
405
- eq: (value: any) => /*elided*/ any;
406
- };
407
- limit: /*elided*/ any;
408
- offset: (value: number) => /*elided*/ any;
409
- execute: () => Command<any, Array<Payment>>;
410
- };
411
- offset: (value: number) => {
412
- where: (field: string) => {
413
- eq: (value: any) => /*elided*/ any;
414
- };
415
- limit: (value: number) => /*elided*/ any;
416
- offset: /*elided*/ any;
417
- execute: () => Command<any, Array<Payment>>;
418
- };
419
- execute: () => Promise<{
420
- [x: string]: any;
421
- id: string;
422
- amount: number;
423
- clientId: string;
424
- currency: string;
425
- status?: "DRAFT" | "AML_SCREENING" | "AML_REJECTED" | "EXECUTION_SCHEDULED" | "EXECUTION_PROCESSING" | "EXECUTION_SUCCESS" | "EXECUTION_FAILURE" | "RETURNED" | "CANCELLED" | "COMPLIANCE_FAILURE" | "DELETED" | "UNKNOWN" | undefined;
426
- createdAt?: string | undefined;
427
- updatedAt?: string | undefined;
428
- }[] | undefined>;
429
- };
430
- };
431
- };
432
- };
433
-
434
- export { type CreatePaymentInput as C, type Payment as P, SortOrderSchema as S, type UpdatePaymentInput as U, type PaymentResponse as a, type PaymentStatus as b, createClient as c, type PaymentRailType as d, type PaymentType as e, PaymentStatusSchema as f, PaymentFilterKeySchema as g, PaymentRailSchema as h, PaymentTypeSchema as i, CreatePaymentInputSchema as j, UpdatePaymentInputSchema as k, PaymentResponseSchema as l };