@mbanq/core-sdk-js 1.0.0-alpha.7 → 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.
- package/dist/chunk-PE5GKPHF.js +1 -0
- package/dist/{chunk-I3DNDGQO.mjs → chunk-RKHBWABU.mjs} +1 -1
- package/dist/client/index.d.mts +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/index.mjs +1 -1
- package/dist/index-B12VXV9k.d.mts +2237 -0
- package/dist/index-DOr1ruyx.d.ts +2237 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-VLCBT53A.js +0 -1
- package/dist/index-CS61O2LI.d.ts +0 -403
- package/dist/index-DGLz0zv-.d.mts +0 -403
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CreatePaymentInput, P as Payment, U as UpdatePaymentInput } from './index-
|
|
2
|
-
export { d as PaymentRailType, a as PaymentResponse, b as PaymentStatus, e as PaymentType, c as createClient } from './index-
|
|
1
|
+
import { C as CreatePaymentInput, P as Payment, U as UpdatePaymentInput } from './index-B12VXV9k.mjs';
|
|
2
|
+
export { j as CreatePaymentInputZod, g as PaymentFilterKeyZod, d as PaymentRailType, h as PaymentRailZod, a as PaymentResponse, l as PaymentResponseZod, b as PaymentStatus, f as PaymentStatusZod, e as PaymentType, i as PaymentTypeZod, S as SortOrderZod, k as UpdatePaymentInputZod, c as createClient } from './index-B12VXV9k.mjs';
|
|
3
3
|
import { M as Middleware, C as Command } from './config.d-CyK6ZM6s.mjs';
|
|
4
4
|
export { a as Config } from './config.d-CyK6ZM6s.mjs';
|
|
5
5
|
export { G as GetClientData, c as GraphQL, S as SendAuthorizationToCore, U as UpdateCardID, a as UpdateClient, b as UpdateClientIdentifier } from './index-5Sj83ZJ4.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CreatePaymentInput, P as Payment, U as UpdatePaymentInput } from './index-
|
|
2
|
-
export { d as PaymentRailType, a as PaymentResponse, b as PaymentStatus, e as PaymentType, c as createClient } from './index-
|
|
1
|
+
import { C as CreatePaymentInput, P as Payment, U as UpdatePaymentInput } from './index-DOr1ruyx.js';
|
|
2
|
+
export { j as CreatePaymentInputZod, g as PaymentFilterKeyZod, d as PaymentRailType, h as PaymentRailZod, a as PaymentResponse, l as PaymentResponseZod, b as PaymentStatus, f as PaymentStatusZod, e as PaymentType, i as PaymentTypeZod, S as SortOrderZod, k as UpdatePaymentInputZod, c as createClient } from './index-DOr1ruyx.js';
|
|
3
3
|
import { M as Middleware, C as Command } from './config.d-CyK6ZM6s.js';
|
|
4
4
|
export { a as Config } from './config.d-CyK6ZM6s.js';
|
|
5
5
|
export { G as GetClientData, c as GraphQL, S as SendAuthorizationToCore, U as UpdateCardID, a as UpdateClient, b as UpdateClientIdentifier } from './index-DXK5OdKW.js';
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkPE5GKPHFjs = require('./chunk-PE5GKPHF.js');var _chunkBDI3SHA2js = require('./chunk-BDI3SHA2.js');var _chunkOGW7GTJPjs = require('./chunk-OGW7GTJP.js');var h=(t=console)=>({before:async e=>{t.info(`Executing ${e.metadata.commandName}`,{input:e.input,metadata:e.metadata})},after:async(e,a)=>{t.info(`Completed ${e.metadata.commandName}`,{response:a,metadata:e.metadata})},onError:async(e,a)=>{t.error(`Error in ${e.metadata.commandName}`,{error:a,input:e.input,metadata:e.metadata})}});var E=t=>({before:async e=>{t.incrementCounter(`${e.metadata.commandName}_started`)},after:async e=>{t.incrementCounter(`${e.metadata.commandName}_completed`)},onError:async(e,a)=>{t.incrementCounter(`${e.metadata.commandName}_error`),t.recordError&&typeof t.recordError=="function"&&t.recordError(a)}});exports.CreatePayment = _chunkPE5GKPHFjs.i; exports.CreatePaymentInputZod = _chunkPE5GKPHFjs.f; exports.GetClientData = _chunkBDI3SHA2js.c; exports.GetPayment = _chunkPE5GKPHFjs.j; exports.GetPayments = _chunkPE5GKPHFjs.l; exports.GraphQL = _chunkBDI3SHA2js.f; exports.PaymentFilterKeyZod = _chunkPE5GKPHFjs.a; exports.PaymentRailZod = _chunkPE5GKPHFjs.c; exports.PaymentResponseZod = _chunkPE5GKPHFjs.h; exports.PaymentStatusZod = _chunkPE5GKPHFjs.b; exports.PaymentTypeZod = _chunkPE5GKPHFjs.d; exports.SendAuthorizationToCore = _chunkBDI3SHA2js.a; exports.SortOrderZod = _chunkPE5GKPHFjs.e; exports.UpdateCardID = _chunkBDI3SHA2js.b; exports.UpdateClient = _chunkBDI3SHA2js.d; exports.UpdateClientIdentifier = _chunkBDI3SHA2js.e; exports.UpdatePayment = _chunkPE5GKPHFjs.k; exports.UpdatePaymentInputZod = _chunkPE5GKPHFjs.g; exports.createClient = _chunkPE5GKPHFjs.m; exports.createLoggingMiddleware = h; exports.createMetricsMiddleware = E; exports.isCommandError = _chunkOGW7GTJPjs.b;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o,b as n,c as m,d,e as i}from"./chunk-
|
|
1
|
+
import{a as o,b as n,c as m,d,e as i,f as p,g as s,h as y,i as c,j as f,k as u,l as P,m as g}from"./chunk-RKHBWABU.mjs";import{a as l,b as x,c as C,d as w,e as M,f as S}from"./chunk-5PEETHWV.mjs";import{b as r}from"./chunk-RX3BFHHX.mjs";var h=(t=console)=>({before:async e=>{t.info(`Executing ${e.metadata.commandName}`,{input:e.input,metadata:e.metadata})},after:async(e,a)=>{t.info(`Completed ${e.metadata.commandName}`,{response:a,metadata:e.metadata})},onError:async(e,a)=>{t.error(`Error in ${e.metadata.commandName}`,{error:a,input:e.input,metadata:e.metadata})}});var E=t=>({before:async e=>{t.incrementCounter(`${e.metadata.commandName}_started`)},after:async e=>{t.incrementCounter(`${e.metadata.commandName}_completed`)},onError:async(e,a)=>{t.incrementCounter(`${e.metadata.commandName}_error`),t.recordError&&typeof t.recordError=="function"&&t.recordError(a)}});export{c as CreatePayment,p as CreatePaymentInputZod,C as GetClientData,f as GetPayment,P as GetPayments,S as GraphQL,o as PaymentFilterKeyZod,m as PaymentRailZod,y as PaymentResponseZod,n as PaymentStatusZod,d as PaymentTypeZod,l as SendAuthorizationToCore,i as SortOrderZod,x as UpdateCardID,w as UpdateClient,M as UpdateClientIdentifier,u as UpdatePayment,s as UpdatePaymentInputZod,g as createClient,h as createLoggingMiddleware,E as createMetricsMiddleware,r as isCommandError};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mbanq/core-sdk-js",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.9",
|
|
4
4
|
"description": "A comprehensive JavaScript SDK for interacting with the Mbanq payment API. Features type-safe payment operations, multi-tenant support, and Zod validation.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -88,6 +88,6 @@
|
|
|
88
88
|
"jsonwebtoken": "^9.0.2",
|
|
89
89
|
"moment-timezone": "^0.6.0",
|
|
90
90
|
"uuid": "^11.1.0",
|
|
91
|
-
"zod": "^
|
|
91
|
+
"zod": "^3.25.76"
|
|
92
92
|
}
|
|
93
93
|
}
|
package/dist/chunk-VLCBT53A.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkOGW7GTJPjs = require('./chunk-OGW7GTJP.js');var x=e=>{let a=[];if(!e.baseUrl)a.push("baseUrl is required");else if(typeof e.baseUrl!="string")a.push("baseUrl must be a string");else try{new URL(e.baseUrl)}catch (e2){a.push("baseUrl must be a valid URL")}return _optionalChain([e, 'access', _2 => _2.axiosConfig, 'optionalAccess', _3 => _3.timeout])!==void 0&&(typeof e.axiosConfig.timeout!="number"||e.axiosConfig.timeout<0)&&a.push("timeout must be a positive number"),a};var _zod = require('zod');var v=_zod.z.enum(["originatorName","originatorAccount","originatorBankRoutingCode","recipientName","recipientAccount","recipientBankRoutingCode","reference","traceNumber","externalId","clientId","dateFormat","locale","originatedBy","paymentRail","paymentType","fromValueDate","toValueDate","fromExecuteDate","toExecuteDate","status","fromReturnDate","toReturnDate","isSettlement","orderBy","sortOrder"]),l=_zod.z.enum(["DRAFT","AML_SCREENING","AML_REJECTED","EXECUTION_SCHEDULED","EXECUTION_PROCESSING","EXECUTION_SUCCESS","EXECUTION_FAILURE","RETURNED","CANCELLED","COMPLIANCE_FAILURE","DELETED","UNKNOWN"]),E=_zod.z.enum(["ACH","SAMEDAYACH","WIRE","SWIFT","INTERNAL","FXPAY","CARD"]),S=_zod.z.enum(["CREDIT","DEBIT"]),R=_zod.z.enum(["ASC","DESC"]),H=v.options,Y=l.options,W=E.options,X=S.options,J=R.options,b=e=>v.parse(e),T=e=>l.parse(e),w=e=>E.parse(e),A=e=>S.parse(e),U=e=>R.parse(e),D=_zod.z.object({id:_zod.z.string(),amount:_zod.z.number().positive(),clientId:_zod.z.string(),currency:_zod.z.string().min(3).max(3),status:l.optional(),createdAt:_zod.z.string().optional(),updatedAt:_zod.z.string().optional()}).catchall(_zod.z.any()),_=_zod.z.object({streetAddress:_zod.z.string().optional(),city:_zod.z.string().optional(),state:_zod.z.string().optional(),country:_zod.z.string().optional(),postalCode:_zod.z.string().optional()}).optional(),V=_zod.z.object({name:_zod.z.string().optional(),identifier:_zod.z.string().optional(),address:_}).optional(),h=_zod.z.object({name:_zod.z.string(),identifier:_zod.z.string(),accountType:_zod.z.enum(["CHECKING","SAVINGS"]).optional(),address:_,agent:V}),G=_zod.z.object({amount:_zod.z.number().positive(),currency:_zod.z.string().min(3).max(3),paymentRail:E,paymentType:S,debtor:h,creditor:h,clientId:_zod.z.string().optional(),correspondent:h.optional(),exchangeRate:_zod.z.number().positive().optional(),externalId:_zod.z.string().optional(),reference:_zod.z.union([_zod.z.string(),_zod.z.array(_zod.z.string())]).optional(),paymentRailMetaData:_zod.z.record(_zod.z.string(),_zod.z.any()).optional(),chargeBearer:_zod.z.enum(["OUR","BEN","SHA"]).optional(),purposeCode:_zod.z.string().optional(),valueDate:_zod.z.string().optional(),executionDate:_zod.z.string().optional()}).catchall(_zod.z.any()).refine(e=>(e.paymentRail==="WIRE"||e.paymentRail==="SWIFT")&&e.creditor?e.creditor.address&&e.creditor.address.state&&e.creditor.address.country:!0,{message:"For WIRE transfers, recipient address with state and country is mandatory"}),q=_zod.z.object({amount:_zod.z.number().positive().optional(),correspondent:_zod.z.object({name:_zod.z.string().optional(),identifier:_zod.z.string().optional(),accountType:_zod.z.string().optional()}).optional(),creditor:_zod.z.object({name:_zod.z.string().optional(),identifier:_zod.z.string().optional(),accountType:_zod.z.string().optional(),agent:_zod.z.object({name:_zod.z.string().optional(),identifier:_zod.z.string().optional()}).optional()}).optional(),debtor:_zod.z.object({name:_zod.z.string().optional(),identifier:_zod.z.string().optional(),accountType:_zod.z.string().optional(),agent:_zod.z.object({name:_zod.z.string().optional(),identifier:_zod.z.string().optional()}).optional()}).optional(),exchangeRate:_zod.z.number().positive().optional(),externalId:_zod.z.string().optional(),errorCode:_zod.z.string().optional(),errorMessage:_zod.z.string().optional(),reference:_zod.z.union([_zod.z.string(),_zod.z.array(_zod.z.string())]).optional(),paymentRailMetaData:_zod.z.record(_zod.z.string(),_zod.z.any()).optional(),status:l.optional()}).catchall(_zod.z.any()),Q=_zod.z.object({totalFilteredRecords:_zod.z.number(),pageItems:_zod.z.array(D)}),g=e=>D.parse(e),N=e=>G.parse(e),L=e=>q.parse(e);var k=e=>{try{b(e)}catch(a){throw a instanceof _zod.ZodError?_chunkOGW7GTJPjs.a.call(void 0, {message:`Invalid filter key: '${e}'. ${a.message}`,code:"invalid_filter_key"}):a}},z=(e,a)=>{try{switch(e){case"status":T(a);break;case"paymentRail":w(a);break;case"paymentType":A(a);break;case"sortOrder":U(a);break;default:break}}catch(o){throw o instanceof _zod.ZodError?_chunkOGW7GTJPjs.a.call(void 0, {message:`Invalid value for '${e}': '${a}'. ${o.message}`,code:`invalid_${e}_value`}):o}},O= exports.a =e=>({input:e,metadata:{commandName:"CreatePayment",path:"/v1/transfers",method:"POST"},execute:async a=>{try{N(e.payment)}catch(n){throw n instanceof _zod.ZodError?_chunkOGW7GTJPjs.a.call(void 0, {message:`Invalid payment data: ${n.message}`,code:"invalid_payment_input"}):n}e.tenantId&&(a.tenantId=e.tenantId);let o=await _chunkOGW7GTJPjs.d.call(void 0, a);try{let n=await o.post("/v1/transfers",e.payment);return g(n.data)}catch(n){_chunkOGW7GTJPjs.c.call(void 0, n)}}}),F= exports.b =e=>({input:e,metadata:{commandName:"GetPayment",path:`/v1/transfers/${e.id}`,method:"GET"},execute:async a=>{e.tenantId&&(a.tenantId=e.tenantId);let o=await _chunkOGW7GTJPjs.d.call(void 0, a);try{let n=await o.get(`/v1/transfers/${e.id}`);return g(n.data)}catch(n){_chunkOGW7GTJPjs.c.call(void 0, n)}}}),$= exports.c =e=>({input:e,metadata:{commandName:"UpdatePayment",path:`/v1/transfers/${e.id}`,method:"PUT"},execute:async a=>{try{L(e.payment)}catch(n){throw n instanceof _zod.ZodError?_chunkOGW7GTJPjs.a.call(void 0, {message:`Invalid payment update data: ${n.message}`,code:"invalid_payment_update_input"}):n}e.tenantId&&(a.tenantId=e.tenantId);let o=await _chunkOGW7GTJPjs.d.call(void 0, a);try{let n=await o.put(`/v1/transfers/${e.id}`,e.payment);return g(n.data)}catch(n){_chunkOGW7GTJPjs.c.call(void 0, n)}}}),f=(e,a,o,n)=>({where:m=>(k(m),{eq:r=>(z(m,r),f({...e,[m]:r},a,o,n))}),limit:m=>f(e,m,o,n),offset:m=>f(e,a,m,n),execute:()=>{let m={...e,limit:a||200,offset:o||0};return{input:{filters:e,limit:a,offset:o,tenantId:n},metadata:{commandName:"GetPayments",path:"/v1/transfers",method:"GET"},execute:async r=>{n&&(r.tenantId=n);let i=await _chunkOGW7GTJPjs.d.call(void 0, r);try{return(await i.get("/v1/transfers",{params:m})).data.pageItems}catch(p){_chunkOGW7GTJPjs.c.call(void 0, p)}}}}}),j= exports.d =e=>({list:()=>f({},void 0,void 0,_optionalChain([e, 'optionalAccess', _4 => _4.tenantId]))}),M=e=>({input:e,metadata:{commandName:"DeletePayment",path:`/v1/transfers/${e.id}`,method:"DELETE"},execute:async a=>{e.tenantId&&(a.tenantId=e.tenantId);let o=await _chunkOGW7GTJPjs.d.call(void 0, a);try{await o.delete(`/v1/transfers/${e.id}`)}catch(n){_chunkOGW7GTJPjs.c.call(void 0, n)}}});var pt=e=>{let a=x(e);if(a.length>0)throw _chunkOGW7GTJPjs.a.call(void 0, {message:`Invalid configuration: ${a.join(", ")}`,code:"invalid_config"});let o=async(r,i,p)=>{if(e.middlewares)for(let s of e.middlewares)r==="before"&&s.before?await s.before(i):r==="after"&&s.after?await s.after(i,p):r==="onError"&&s.onError&&await s.onError(i,p)},n={...e},d=async r=>{try{await o("before",r);let i=await r.execute(n);return await o("after",r,i),i}catch(i){throw await o("onError",r,i),i}},I=r=>{let i=r||n.tenantId;return{payment:{create:async p=>{let s=O({payment:p,tenantId:i});return{execute:async()=>d(s)}},get:async p=>{let s=F({id:p,tenantId:i});return{execute:async()=>d(s)}},update:async(p,s)=>{let C=$({id:p,payment:s,tenantId:i});return{execute:async()=>d(C)}},delete:async p=>{let s=M({id:p,tenantId:i});return{execute:async()=>d(s)}},list:()=>{let s=j({tenantId:i}).list();return{where:s.where,limit:s.limit,offset:s.offset,execute:async()=>{let C=s.execute();return d(C)}}}}}};return{setConfig:r=>{n=r},updateConfig:r=>{let i={...n,...r,axiosConfig:{...n.axiosConfig,...r.axiosConfig,headers:{..._optionalChain([n, 'access', _5 => _5.axiosConfig, 'optionalAccess', _6 => _6.headers]),..._optionalChain([r, 'access', _7 => _7.axiosConfig, 'optionalAccess', _8 => _8.headers])}}},p=x(i);if(p.length>0)throw _chunkOGW7GTJPjs.a.call(void 0, {message:`Invalid configuration: ${p.join(", ")}`,code:"invalid_config"});n=i},resetConfig:()=>{n=e},request:d,tenant:r=>I(r),...I()}};exports.a = O; exports.b = F; exports.c = $; exports.d = j; exports.e = pt;
|
package/dist/index-CS61O2LI.d.ts
DELETED
|
@@ -1,403 +0,0 @@
|
|
|
1
|
-
import { a as Config, C as Command } from './config.d-CyK6ZM6s.js';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
|
|
4
|
-
declare const PaymentStatusSchema: z.ZodEnum<{
|
|
5
|
-
DRAFT: "DRAFT";
|
|
6
|
-
AML_SCREENING: "AML_SCREENING";
|
|
7
|
-
AML_REJECTED: "AML_REJECTED";
|
|
8
|
-
EXECUTION_SCHEDULED: "EXECUTION_SCHEDULED";
|
|
9
|
-
EXECUTION_PROCESSING: "EXECUTION_PROCESSING";
|
|
10
|
-
EXECUTION_SUCCESS: "EXECUTION_SUCCESS";
|
|
11
|
-
EXECUTION_FAILURE: "EXECUTION_FAILURE";
|
|
12
|
-
RETURNED: "RETURNED";
|
|
13
|
-
CANCELLED: "CANCELLED";
|
|
14
|
-
COMPLIANCE_FAILURE: "COMPLIANCE_FAILURE";
|
|
15
|
-
DELETED: "DELETED";
|
|
16
|
-
UNKNOWN: "UNKNOWN";
|
|
17
|
-
}>;
|
|
18
|
-
declare const PaymentRailSchema: z.ZodEnum<{
|
|
19
|
-
ACH: "ACH";
|
|
20
|
-
SAMEDAYACH: "SAMEDAYACH";
|
|
21
|
-
WIRE: "WIRE";
|
|
22
|
-
SWIFT: "SWIFT";
|
|
23
|
-
INTERNAL: "INTERNAL";
|
|
24
|
-
FXPAY: "FXPAY";
|
|
25
|
-
CARD: "CARD";
|
|
26
|
-
}>;
|
|
27
|
-
declare const PaymentTypeSchema: z.ZodEnum<{
|
|
28
|
-
CREDIT: "CREDIT";
|
|
29
|
-
DEBIT: "DEBIT";
|
|
30
|
-
}>;
|
|
31
|
-
type PaymentStatus = z.infer<typeof PaymentStatusSchema>;
|
|
32
|
-
type PaymentRailType = z.infer<typeof PaymentRailSchema>;
|
|
33
|
-
type PaymentType = z.infer<typeof PaymentTypeSchema>;
|
|
34
|
-
declare const PaymentSchema: z.ZodObject<{
|
|
35
|
-
id: z.ZodString;
|
|
36
|
-
amount: z.ZodNumber;
|
|
37
|
-
clientId: z.ZodString;
|
|
38
|
-
currency: z.ZodString;
|
|
39
|
-
status: z.ZodOptional<z.ZodEnum<{
|
|
40
|
-
DRAFT: "DRAFT";
|
|
41
|
-
AML_SCREENING: "AML_SCREENING";
|
|
42
|
-
AML_REJECTED: "AML_REJECTED";
|
|
43
|
-
EXECUTION_SCHEDULED: "EXECUTION_SCHEDULED";
|
|
44
|
-
EXECUTION_PROCESSING: "EXECUTION_PROCESSING";
|
|
45
|
-
EXECUTION_SUCCESS: "EXECUTION_SUCCESS";
|
|
46
|
-
EXECUTION_FAILURE: "EXECUTION_FAILURE";
|
|
47
|
-
RETURNED: "RETURNED";
|
|
48
|
-
CANCELLED: "CANCELLED";
|
|
49
|
-
COMPLIANCE_FAILURE: "COMPLIANCE_FAILURE";
|
|
50
|
-
DELETED: "DELETED";
|
|
51
|
-
UNKNOWN: "UNKNOWN";
|
|
52
|
-
}>>;
|
|
53
|
-
createdAt: z.ZodOptional<z.ZodString>;
|
|
54
|
-
updatedAt: z.ZodOptional<z.ZodString>;
|
|
55
|
-
}, z.core.$catchall<z.ZodAny>>;
|
|
56
|
-
declare const CreatePaymentInputSchema: z.ZodObject<{
|
|
57
|
-
amount: z.ZodNumber;
|
|
58
|
-
currency: z.ZodString;
|
|
59
|
-
paymentRail: z.ZodEnum<{
|
|
60
|
-
ACH: "ACH";
|
|
61
|
-
SAMEDAYACH: "SAMEDAYACH";
|
|
62
|
-
WIRE: "WIRE";
|
|
63
|
-
SWIFT: "SWIFT";
|
|
64
|
-
INTERNAL: "INTERNAL";
|
|
65
|
-
FXPAY: "FXPAY";
|
|
66
|
-
CARD: "CARD";
|
|
67
|
-
}>;
|
|
68
|
-
paymentType: z.ZodEnum<{
|
|
69
|
-
CREDIT: "CREDIT";
|
|
70
|
-
DEBIT: "DEBIT";
|
|
71
|
-
}>;
|
|
72
|
-
debtor: z.ZodObject<{
|
|
73
|
-
name: z.ZodString;
|
|
74
|
-
identifier: z.ZodString;
|
|
75
|
-
accountType: z.ZodOptional<z.ZodEnum<{
|
|
76
|
-
CHECKING: "CHECKING";
|
|
77
|
-
SAVINGS: "SAVINGS";
|
|
78
|
-
}>>;
|
|
79
|
-
address: z.ZodOptional<z.ZodObject<{
|
|
80
|
-
streetAddress: z.ZodOptional<z.ZodString>;
|
|
81
|
-
city: z.ZodOptional<z.ZodString>;
|
|
82
|
-
state: z.ZodOptional<z.ZodString>;
|
|
83
|
-
country: z.ZodOptional<z.ZodString>;
|
|
84
|
-
postalCode: z.ZodOptional<z.ZodString>;
|
|
85
|
-
}, z.core.$strip>>;
|
|
86
|
-
agent: z.ZodOptional<z.ZodObject<{
|
|
87
|
-
name: z.ZodOptional<z.ZodString>;
|
|
88
|
-
identifier: z.ZodOptional<z.ZodString>;
|
|
89
|
-
address: z.ZodOptional<z.ZodObject<{
|
|
90
|
-
streetAddress: z.ZodOptional<z.ZodString>;
|
|
91
|
-
city: z.ZodOptional<z.ZodString>;
|
|
92
|
-
state: z.ZodOptional<z.ZodString>;
|
|
93
|
-
country: z.ZodOptional<z.ZodString>;
|
|
94
|
-
postalCode: z.ZodOptional<z.ZodString>;
|
|
95
|
-
}, z.core.$strip>>;
|
|
96
|
-
}, z.core.$strip>>;
|
|
97
|
-
}, z.core.$strip>;
|
|
98
|
-
creditor: z.ZodObject<{
|
|
99
|
-
name: z.ZodString;
|
|
100
|
-
identifier: z.ZodString;
|
|
101
|
-
accountType: z.ZodOptional<z.ZodEnum<{
|
|
102
|
-
CHECKING: "CHECKING";
|
|
103
|
-
SAVINGS: "SAVINGS";
|
|
104
|
-
}>>;
|
|
105
|
-
address: z.ZodOptional<z.ZodObject<{
|
|
106
|
-
streetAddress: z.ZodOptional<z.ZodString>;
|
|
107
|
-
city: z.ZodOptional<z.ZodString>;
|
|
108
|
-
state: z.ZodOptional<z.ZodString>;
|
|
109
|
-
country: z.ZodOptional<z.ZodString>;
|
|
110
|
-
postalCode: z.ZodOptional<z.ZodString>;
|
|
111
|
-
}, z.core.$strip>>;
|
|
112
|
-
agent: z.ZodOptional<z.ZodObject<{
|
|
113
|
-
name: z.ZodOptional<z.ZodString>;
|
|
114
|
-
identifier: z.ZodOptional<z.ZodString>;
|
|
115
|
-
address: z.ZodOptional<z.ZodObject<{
|
|
116
|
-
streetAddress: z.ZodOptional<z.ZodString>;
|
|
117
|
-
city: z.ZodOptional<z.ZodString>;
|
|
118
|
-
state: z.ZodOptional<z.ZodString>;
|
|
119
|
-
country: z.ZodOptional<z.ZodString>;
|
|
120
|
-
postalCode: z.ZodOptional<z.ZodString>;
|
|
121
|
-
}, z.core.$strip>>;
|
|
122
|
-
}, z.core.$strip>>;
|
|
123
|
-
}, z.core.$strip>;
|
|
124
|
-
clientId: z.ZodOptional<z.ZodString>;
|
|
125
|
-
correspondent: z.ZodOptional<z.ZodObject<{
|
|
126
|
-
name: z.ZodString;
|
|
127
|
-
identifier: z.ZodString;
|
|
128
|
-
accountType: z.ZodOptional<z.ZodEnum<{
|
|
129
|
-
CHECKING: "CHECKING";
|
|
130
|
-
SAVINGS: "SAVINGS";
|
|
131
|
-
}>>;
|
|
132
|
-
address: z.ZodOptional<z.ZodObject<{
|
|
133
|
-
streetAddress: z.ZodOptional<z.ZodString>;
|
|
134
|
-
city: z.ZodOptional<z.ZodString>;
|
|
135
|
-
state: z.ZodOptional<z.ZodString>;
|
|
136
|
-
country: z.ZodOptional<z.ZodString>;
|
|
137
|
-
postalCode: z.ZodOptional<z.ZodString>;
|
|
138
|
-
}, z.core.$strip>>;
|
|
139
|
-
agent: z.ZodOptional<z.ZodObject<{
|
|
140
|
-
name: z.ZodOptional<z.ZodString>;
|
|
141
|
-
identifier: z.ZodOptional<z.ZodString>;
|
|
142
|
-
address: z.ZodOptional<z.ZodObject<{
|
|
143
|
-
streetAddress: z.ZodOptional<z.ZodString>;
|
|
144
|
-
city: z.ZodOptional<z.ZodString>;
|
|
145
|
-
state: z.ZodOptional<z.ZodString>;
|
|
146
|
-
country: z.ZodOptional<z.ZodString>;
|
|
147
|
-
postalCode: z.ZodOptional<z.ZodString>;
|
|
148
|
-
}, z.core.$strip>>;
|
|
149
|
-
}, z.core.$strip>>;
|
|
150
|
-
}, z.core.$strip>>;
|
|
151
|
-
exchangeRate: z.ZodOptional<z.ZodNumber>;
|
|
152
|
-
externalId: z.ZodOptional<z.ZodString>;
|
|
153
|
-
reference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
154
|
-
paymentRailMetaData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
155
|
-
chargeBearer: z.ZodOptional<z.ZodEnum<{
|
|
156
|
-
OUR: "OUR";
|
|
157
|
-
BEN: "BEN";
|
|
158
|
-
SHA: "SHA";
|
|
159
|
-
}>>;
|
|
160
|
-
purposeCode: z.ZodOptional<z.ZodString>;
|
|
161
|
-
valueDate: z.ZodOptional<z.ZodString>;
|
|
162
|
-
executionDate: z.ZodOptional<z.ZodString>;
|
|
163
|
-
}, z.core.$catchall<z.ZodAny>>;
|
|
164
|
-
declare const UpdatePaymentInputSchema: z.ZodObject<{
|
|
165
|
-
amount: z.ZodOptional<z.ZodNumber>;
|
|
166
|
-
correspondent: z.ZodOptional<z.ZodObject<{
|
|
167
|
-
name: z.ZodOptional<z.ZodString>;
|
|
168
|
-
identifier: z.ZodOptional<z.ZodString>;
|
|
169
|
-
accountType: z.ZodOptional<z.ZodString>;
|
|
170
|
-
}, z.core.$strip>>;
|
|
171
|
-
creditor: z.ZodOptional<z.ZodObject<{
|
|
172
|
-
name: z.ZodOptional<z.ZodString>;
|
|
173
|
-
identifier: z.ZodOptional<z.ZodString>;
|
|
174
|
-
accountType: z.ZodOptional<z.ZodString>;
|
|
175
|
-
agent: z.ZodOptional<z.ZodObject<{
|
|
176
|
-
name: z.ZodOptional<z.ZodString>;
|
|
177
|
-
identifier: z.ZodOptional<z.ZodString>;
|
|
178
|
-
}, z.core.$strip>>;
|
|
179
|
-
}, z.core.$strip>>;
|
|
180
|
-
debtor: z.ZodOptional<z.ZodObject<{
|
|
181
|
-
name: z.ZodOptional<z.ZodString>;
|
|
182
|
-
identifier: z.ZodOptional<z.ZodString>;
|
|
183
|
-
accountType: z.ZodOptional<z.ZodString>;
|
|
184
|
-
agent: z.ZodOptional<z.ZodObject<{
|
|
185
|
-
name: z.ZodOptional<z.ZodString>;
|
|
186
|
-
identifier: z.ZodOptional<z.ZodString>;
|
|
187
|
-
}, z.core.$strip>>;
|
|
188
|
-
}, z.core.$strip>>;
|
|
189
|
-
exchangeRate: z.ZodOptional<z.ZodNumber>;
|
|
190
|
-
externalId: z.ZodOptional<z.ZodString>;
|
|
191
|
-
errorCode: z.ZodOptional<z.ZodString>;
|
|
192
|
-
errorMessage: z.ZodOptional<z.ZodString>;
|
|
193
|
-
reference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
194
|
-
paymentRailMetaData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
195
|
-
status: z.ZodOptional<z.ZodEnum<{
|
|
196
|
-
DRAFT: "DRAFT";
|
|
197
|
-
AML_SCREENING: "AML_SCREENING";
|
|
198
|
-
AML_REJECTED: "AML_REJECTED";
|
|
199
|
-
EXECUTION_SCHEDULED: "EXECUTION_SCHEDULED";
|
|
200
|
-
EXECUTION_PROCESSING: "EXECUTION_PROCESSING";
|
|
201
|
-
EXECUTION_SUCCESS: "EXECUTION_SUCCESS";
|
|
202
|
-
EXECUTION_FAILURE: "EXECUTION_FAILURE";
|
|
203
|
-
RETURNED: "RETURNED";
|
|
204
|
-
CANCELLED: "CANCELLED";
|
|
205
|
-
COMPLIANCE_FAILURE: "COMPLIANCE_FAILURE";
|
|
206
|
-
DELETED: "DELETED";
|
|
207
|
-
UNKNOWN: "UNKNOWN";
|
|
208
|
-
}>>;
|
|
209
|
-
}, z.core.$catchall<z.ZodAny>>;
|
|
210
|
-
declare const PaymentResponseSchema: z.ZodObject<{
|
|
211
|
-
totalFilteredRecords: z.ZodNumber;
|
|
212
|
-
pageItems: z.ZodArray<z.ZodObject<{
|
|
213
|
-
id: z.ZodString;
|
|
214
|
-
amount: z.ZodNumber;
|
|
215
|
-
clientId: z.ZodString;
|
|
216
|
-
currency: z.ZodString;
|
|
217
|
-
status: z.ZodOptional<z.ZodEnum<{
|
|
218
|
-
DRAFT: "DRAFT";
|
|
219
|
-
AML_SCREENING: "AML_SCREENING";
|
|
220
|
-
AML_REJECTED: "AML_REJECTED";
|
|
221
|
-
EXECUTION_SCHEDULED: "EXECUTION_SCHEDULED";
|
|
222
|
-
EXECUTION_PROCESSING: "EXECUTION_PROCESSING";
|
|
223
|
-
EXECUTION_SUCCESS: "EXECUTION_SUCCESS";
|
|
224
|
-
EXECUTION_FAILURE: "EXECUTION_FAILURE";
|
|
225
|
-
RETURNED: "RETURNED";
|
|
226
|
-
CANCELLED: "CANCELLED";
|
|
227
|
-
COMPLIANCE_FAILURE: "COMPLIANCE_FAILURE";
|
|
228
|
-
DELETED: "DELETED";
|
|
229
|
-
UNKNOWN: "UNKNOWN";
|
|
230
|
-
}>>;
|
|
231
|
-
createdAt: z.ZodOptional<z.ZodString>;
|
|
232
|
-
updatedAt: z.ZodOptional<z.ZodString>;
|
|
233
|
-
}, z.core.$catchall<z.ZodAny>>>;
|
|
234
|
-
}, z.core.$strip>;
|
|
235
|
-
type Payment = z.infer<typeof PaymentSchema>;
|
|
236
|
-
type CreatePaymentInput = z.infer<typeof CreatePaymentInputSchema>;
|
|
237
|
-
type UpdatePaymentInput = z.infer<typeof UpdatePaymentInputSchema>;
|
|
238
|
-
type PaymentResponse = z.infer<typeof PaymentResponseSchema>;
|
|
239
|
-
|
|
240
|
-
declare const createClient: (initialConfig: Config) => {
|
|
241
|
-
payment: {
|
|
242
|
-
create: (data: CreatePaymentInput) => Promise<{
|
|
243
|
-
execute: () => Promise<{
|
|
244
|
-
[x: string]: any;
|
|
245
|
-
id: string;
|
|
246
|
-
amount: number;
|
|
247
|
-
clientId: string;
|
|
248
|
-
currency: string;
|
|
249
|
-
status?: "DRAFT" | "AML_SCREENING" | "AML_REJECTED" | "EXECUTION_SCHEDULED" | "EXECUTION_PROCESSING" | "EXECUTION_SUCCESS" | "EXECUTION_FAILURE" | "RETURNED" | "CANCELLED" | "COMPLIANCE_FAILURE" | "DELETED" | "UNKNOWN" | undefined;
|
|
250
|
-
createdAt?: string | undefined;
|
|
251
|
-
updatedAt?: string | undefined;
|
|
252
|
-
} | undefined>;
|
|
253
|
-
}>;
|
|
254
|
-
get: (id: string) => Promise<{
|
|
255
|
-
execute: () => Promise<{
|
|
256
|
-
[x: string]: any;
|
|
257
|
-
id: string;
|
|
258
|
-
amount: number;
|
|
259
|
-
clientId: string;
|
|
260
|
-
currency: string;
|
|
261
|
-
status?: "DRAFT" | "AML_SCREENING" | "AML_REJECTED" | "EXECUTION_SCHEDULED" | "EXECUTION_PROCESSING" | "EXECUTION_SUCCESS" | "EXECUTION_FAILURE" | "RETURNED" | "CANCELLED" | "COMPLIANCE_FAILURE" | "DELETED" | "UNKNOWN" | undefined;
|
|
262
|
-
createdAt?: string | undefined;
|
|
263
|
-
updatedAt?: string | undefined;
|
|
264
|
-
} | undefined>;
|
|
265
|
-
}>;
|
|
266
|
-
update: (id: string, data: UpdatePaymentInput) => Promise<{
|
|
267
|
-
execute: () => Promise<{
|
|
268
|
-
[x: string]: any;
|
|
269
|
-
id: string;
|
|
270
|
-
amount: number;
|
|
271
|
-
clientId: string;
|
|
272
|
-
currency: string;
|
|
273
|
-
status?: "DRAFT" | "AML_SCREENING" | "AML_REJECTED" | "EXECUTION_SCHEDULED" | "EXECUTION_PROCESSING" | "EXECUTION_SUCCESS" | "EXECUTION_FAILURE" | "RETURNED" | "CANCELLED" | "COMPLIANCE_FAILURE" | "DELETED" | "UNKNOWN" | undefined;
|
|
274
|
-
createdAt?: string | undefined;
|
|
275
|
-
updatedAt?: string | undefined;
|
|
276
|
-
} | undefined>;
|
|
277
|
-
}>;
|
|
278
|
-
delete: (id: string) => Promise<{
|
|
279
|
-
execute: () => Promise<void | undefined>;
|
|
280
|
-
}>;
|
|
281
|
-
list: () => {
|
|
282
|
-
where: (field: string) => {
|
|
283
|
-
eq: (value: any) => {
|
|
284
|
-
where: /*elided*/ any;
|
|
285
|
-
limit: (value: number) => /*elided*/ any;
|
|
286
|
-
offset: (value: number) => /*elided*/ any;
|
|
287
|
-
execute: () => Command<any, Array<Payment>>;
|
|
288
|
-
};
|
|
289
|
-
};
|
|
290
|
-
limit: (value: number) => {
|
|
291
|
-
where: (field: string) => {
|
|
292
|
-
eq: (value: any) => /*elided*/ any;
|
|
293
|
-
};
|
|
294
|
-
limit: /*elided*/ any;
|
|
295
|
-
offset: (value: number) => /*elided*/ any;
|
|
296
|
-
execute: () => Command<any, Array<Payment>>;
|
|
297
|
-
};
|
|
298
|
-
offset: (value: number) => {
|
|
299
|
-
where: (field: string) => {
|
|
300
|
-
eq: (value: any) => /*elided*/ any;
|
|
301
|
-
};
|
|
302
|
-
limit: (value: number) => /*elided*/ any;
|
|
303
|
-
offset: /*elided*/ any;
|
|
304
|
-
execute: () => Command<any, Array<Payment>>;
|
|
305
|
-
};
|
|
306
|
-
execute: () => Promise<{
|
|
307
|
-
[x: string]: any;
|
|
308
|
-
id: string;
|
|
309
|
-
amount: number;
|
|
310
|
-
clientId: string;
|
|
311
|
-
currency: string;
|
|
312
|
-
status?: "DRAFT" | "AML_SCREENING" | "AML_REJECTED" | "EXECUTION_SCHEDULED" | "EXECUTION_PROCESSING" | "EXECUTION_SUCCESS" | "EXECUTION_FAILURE" | "RETURNED" | "CANCELLED" | "COMPLIANCE_FAILURE" | "DELETED" | "UNKNOWN" | undefined;
|
|
313
|
-
createdAt?: string | undefined;
|
|
314
|
-
updatedAt?: string | undefined;
|
|
315
|
-
}[] | undefined>;
|
|
316
|
-
};
|
|
317
|
-
};
|
|
318
|
-
setConfig: (config: Config) => void;
|
|
319
|
-
updateConfig: (config: Partial<Config>) => void;
|
|
320
|
-
resetConfig: () => void;
|
|
321
|
-
request: <TOutput>(command: Command<any, TOutput>) => Promise<TOutput | undefined>;
|
|
322
|
-
tenant: (tenantId: string) => {
|
|
323
|
-
payment: {
|
|
324
|
-
create: (data: CreatePaymentInput) => Promise<{
|
|
325
|
-
execute: () => Promise<{
|
|
326
|
-
[x: string]: any;
|
|
327
|
-
id: string;
|
|
328
|
-
amount: number;
|
|
329
|
-
clientId: string;
|
|
330
|
-
currency: string;
|
|
331
|
-
status?: "DRAFT" | "AML_SCREENING" | "AML_REJECTED" | "EXECUTION_SCHEDULED" | "EXECUTION_PROCESSING" | "EXECUTION_SUCCESS" | "EXECUTION_FAILURE" | "RETURNED" | "CANCELLED" | "COMPLIANCE_FAILURE" | "DELETED" | "UNKNOWN" | undefined;
|
|
332
|
-
createdAt?: string | undefined;
|
|
333
|
-
updatedAt?: string | undefined;
|
|
334
|
-
} | undefined>;
|
|
335
|
-
}>;
|
|
336
|
-
get: (id: string) => Promise<{
|
|
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
|
-
update: (id: string, data: UpdatePaymentInput) => Promise<{
|
|
349
|
-
execute: () => Promise<{
|
|
350
|
-
[x: string]: any;
|
|
351
|
-
id: string;
|
|
352
|
-
amount: number;
|
|
353
|
-
clientId: string;
|
|
354
|
-
currency: string;
|
|
355
|
-
status?: "DRAFT" | "AML_SCREENING" | "AML_REJECTED" | "EXECUTION_SCHEDULED" | "EXECUTION_PROCESSING" | "EXECUTION_SUCCESS" | "EXECUTION_FAILURE" | "RETURNED" | "CANCELLED" | "COMPLIANCE_FAILURE" | "DELETED" | "UNKNOWN" | undefined;
|
|
356
|
-
createdAt?: string | undefined;
|
|
357
|
-
updatedAt?: string | undefined;
|
|
358
|
-
} | undefined>;
|
|
359
|
-
}>;
|
|
360
|
-
delete: (id: string) => Promise<{
|
|
361
|
-
execute: () => Promise<void | undefined>;
|
|
362
|
-
}>;
|
|
363
|
-
list: () => {
|
|
364
|
-
where: (field: string) => {
|
|
365
|
-
eq: (value: any) => {
|
|
366
|
-
where: /*elided*/ any;
|
|
367
|
-
limit: (value: number) => /*elided*/ any;
|
|
368
|
-
offset: (value: number) => /*elided*/ any;
|
|
369
|
-
execute: () => Command<any, Array<Payment>>;
|
|
370
|
-
};
|
|
371
|
-
};
|
|
372
|
-
limit: (value: number) => {
|
|
373
|
-
where: (field: string) => {
|
|
374
|
-
eq: (value: any) => /*elided*/ any;
|
|
375
|
-
};
|
|
376
|
-
limit: /*elided*/ any;
|
|
377
|
-
offset: (value: number) => /*elided*/ any;
|
|
378
|
-
execute: () => Command<any, Array<Payment>>;
|
|
379
|
-
};
|
|
380
|
-
offset: (value: number) => {
|
|
381
|
-
where: (field: string) => {
|
|
382
|
-
eq: (value: any) => /*elided*/ any;
|
|
383
|
-
};
|
|
384
|
-
limit: (value: number) => /*elided*/ any;
|
|
385
|
-
offset: /*elided*/ any;
|
|
386
|
-
execute: () => Command<any, Array<Payment>>;
|
|
387
|
-
};
|
|
388
|
-
execute: () => Promise<{
|
|
389
|
-
[x: string]: any;
|
|
390
|
-
id: string;
|
|
391
|
-
amount: number;
|
|
392
|
-
clientId: string;
|
|
393
|
-
currency: string;
|
|
394
|
-
status?: "DRAFT" | "AML_SCREENING" | "AML_REJECTED" | "EXECUTION_SCHEDULED" | "EXECUTION_PROCESSING" | "EXECUTION_SUCCESS" | "EXECUTION_FAILURE" | "RETURNED" | "CANCELLED" | "COMPLIANCE_FAILURE" | "DELETED" | "UNKNOWN" | undefined;
|
|
395
|
-
createdAt?: string | undefined;
|
|
396
|
-
updatedAt?: string | undefined;
|
|
397
|
-
}[] | undefined>;
|
|
398
|
-
};
|
|
399
|
-
};
|
|
400
|
-
};
|
|
401
|
-
};
|
|
402
|
-
|
|
403
|
-
export { type CreatePaymentInput as C, type Payment as P, type UpdatePaymentInput as U, type PaymentResponse as a, type PaymentStatus as b, createClient as c, type PaymentRailType as d, type PaymentType as e };
|