@mbanq/core-sdk-js 0.1.1 → 0.2.1

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/index.d.mts CHANGED
@@ -1,8 +1,8 @@
1
- import { C as CreatePaymentInput, P as Payment, U as UpdatePaymentInput, a as PaymentFilters, b as PaymentResponse } from './index-DvE2ddFU.mjs';
2
- export { q as CreatePaymentInputShape, k as CreatePaymentInputZod, h as PaymentFilterKeyZod, o as PaymentFilterShape, n as PaymentFiltersZod, e as PaymentRailType, i as PaymentRailZod, m as PaymentResponseZod, p as PaymentShape, d as PaymentStatus, g as PaymentStatusZod, f as PaymentType, j as PaymentTypeZod, S as SortOrderZod, r as UpdatePaymentInputShape, l as UpdatePaymentInputZod, c as createClient } from './index-DvE2ddFU.mjs';
3
- import { M as Middleware, C as Command } from './config.d-CyK6ZM6s.mjs';
4
- export { a as Config } from './config.d-CyK6ZM6s.mjs';
5
- export { G as GetClientData, c as GraphQL, S as SendAuthorizationToCore, U as UpdateCardID, a as UpdateClient, b as UpdateClientIdentifier } from './index-5Sj83ZJ4.mjs';
1
+ import { C as CreatePaymentInput, P as Payment, U as UpdatePaymentInput, a as PaymentFilters, b as PaymentResponse } from './index-BC3pkS--.mjs';
2
+ export { q as CreatePaymentInputShape, k as CreatePaymentInputZod, h as PaymentFilterKeyZod, o as PaymentFilterShape, n as PaymentFiltersZod, e as PaymentRailType, i as PaymentRailZod, m as PaymentResponseZod, p as PaymentShape, d as PaymentStatus, g as PaymentStatusZod, f as PaymentType, j as PaymentTypeZod, S as SortOrderZod, r as UpdatePaymentInputShape, l as UpdatePaymentInputZod, c as createClient } from './index-BC3pkS--.mjs';
3
+ import { M as Middleware, C as Command } from './client-DhU5QMWd.mjs';
4
+ export { a as Config } from './client-DhU5QMWd.mjs';
5
+ export { C as CreateClient, D as DeleteClient, G as GetClient, c as GetClients, d as GraphQL, S as SendAuthorizationToCore, U as UpdateCardID, a as UpdateClient, b as UpdateClientIdentifier } from './index-BHzajnME.mjs';
6
6
  import 'zod';
7
7
  import 'graphql';
8
8
  import 'axios';
@@ -21,6 +21,15 @@ interface Logger {
21
21
  }
22
22
  declare const createLoggingMiddleware: (logger?: Logger) => Middleware;
23
23
 
24
+ interface ApiError {
25
+ name: string;
26
+ message: string;
27
+ statusCode?: number;
28
+ code?: string;
29
+ requestId?: string;
30
+ originalError?: Error;
31
+ }
32
+
24
33
  declare const CreatePayment: (params: {
25
34
  payment: CreatePaymentInput;
26
35
  tenantId?: string;
@@ -53,15 +62,7 @@ declare const GetPayments: (params: PaymentFilters, configuration: {
53
62
  };
54
63
  }, PaymentResponse>;
55
64
 
56
- interface ApiError {
57
- name: string;
58
- message: string;
59
- statusCode?: number;
60
- code?: string;
61
- requestId?: string;
62
- originalError?: Error;
63
- }
64
-
65
+ declare const createCommandError: ({ message, statusCode, code, requestId, originalError }: Omit<ApiError, "name">) => ApiError;
65
66
  declare const isCommandError: (error: unknown) => error is ApiError;
66
67
 
67
- export { Command, CreatePayment, CreatePaymentInput, GetPayment, GetPayments, type Logger, type MetricsClient, Middleware, Payment, PaymentFilters, PaymentResponse, UpdatePayment, UpdatePaymentInput, createLoggingMiddleware, createMetricsMiddleware, isCommandError };
68
+ export { type ApiError, Command, CreatePayment, CreatePaymentInput, GetPayment, GetPayments, type Logger, type MetricsClient, Middleware, Payment, PaymentFilters, PaymentResponse, UpdatePayment, UpdatePaymentInput, createCommandError, createLoggingMiddleware, createMetricsMiddleware, isCommandError };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { C as CreatePaymentInput, P as Payment, U as UpdatePaymentInput, a as PaymentFilters, b as PaymentResponse } from './index-vaBvDmsq.js';
2
- export { q as CreatePaymentInputShape, k as CreatePaymentInputZod, h as PaymentFilterKeyZod, o as PaymentFilterShape, n as PaymentFiltersZod, e as PaymentRailType, i as PaymentRailZod, m as PaymentResponseZod, p as PaymentShape, d as PaymentStatus, g as PaymentStatusZod, f as PaymentType, j as PaymentTypeZod, S as SortOrderZod, r as UpdatePaymentInputShape, l as UpdatePaymentInputZod, c as createClient } from './index-vaBvDmsq.js';
3
- import { M as Middleware, C as Command } from './config.d-CyK6ZM6s.js';
4
- export { a as Config } from './config.d-CyK6ZM6s.js';
5
- export { G as GetClientData, c as GraphQL, S as SendAuthorizationToCore, U as UpdateCardID, a as UpdateClient, b as UpdateClientIdentifier } from './index-DXK5OdKW.js';
1
+ import { C as CreatePaymentInput, P as Payment, U as UpdatePaymentInput, a as PaymentFilters, b as PaymentResponse } from './index-UyJmi0Vg.js';
2
+ export { q as CreatePaymentInputShape, k as CreatePaymentInputZod, h as PaymentFilterKeyZod, o as PaymentFilterShape, n as PaymentFiltersZod, e as PaymentRailType, i as PaymentRailZod, m as PaymentResponseZod, p as PaymentShape, d as PaymentStatus, g as PaymentStatusZod, f as PaymentType, j as PaymentTypeZod, S as SortOrderZod, r as UpdatePaymentInputShape, l as UpdatePaymentInputZod, c as createClient } from './index-UyJmi0Vg.js';
3
+ import { M as Middleware, C as Command } from './client-DhU5QMWd.js';
4
+ export { a as Config } from './client-DhU5QMWd.js';
5
+ export { C as CreateClient, D as DeleteClient, G as GetClient, c as GetClients, d as GraphQL, S as SendAuthorizationToCore, U as UpdateCardID, a as UpdateClient, b as UpdateClientIdentifier } from './index-CQe-0gwX.js';
6
6
  import 'zod';
7
7
  import 'graphql';
8
8
  import 'axios';
@@ -21,6 +21,15 @@ interface Logger {
21
21
  }
22
22
  declare const createLoggingMiddleware: (logger?: Logger) => Middleware;
23
23
 
24
+ interface ApiError {
25
+ name: string;
26
+ message: string;
27
+ statusCode?: number;
28
+ code?: string;
29
+ requestId?: string;
30
+ originalError?: Error;
31
+ }
32
+
24
33
  declare const CreatePayment: (params: {
25
34
  payment: CreatePaymentInput;
26
35
  tenantId?: string;
@@ -53,15 +62,7 @@ declare const GetPayments: (params: PaymentFilters, configuration: {
53
62
  };
54
63
  }, PaymentResponse>;
55
64
 
56
- interface ApiError {
57
- name: string;
58
- message: string;
59
- statusCode?: number;
60
- code?: string;
61
- requestId?: string;
62
- originalError?: Error;
63
- }
64
-
65
+ declare const createCommandError: ({ message, statusCode, code, requestId, originalError }: Omit<ApiError, "name">) => ApiError;
65
66
  declare const isCommandError: (error: unknown) => error is ApiError;
66
67
 
67
- export { Command, CreatePayment, CreatePaymentInput, GetPayment, GetPayments, type Logger, type MetricsClient, Middleware, Payment, PaymentFilters, PaymentResponse, UpdatePayment, UpdatePaymentInput, createLoggingMiddleware, createMetricsMiddleware, isCommandError };
68
+ export { type ApiError, Command, CreatePayment, CreatePaymentInput, GetPayment, GetPayments, type Logger, type MetricsClient, Middleware, Payment, PaymentFilters, PaymentResponse, UpdatePayment, UpdatePaymentInput, createCommandError, createLoggingMiddleware, createMetricsMiddleware, isCommandError };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkRA5GVN3Gjs = require('./chunk-RA5GVN3G.js');var _chunkBDI3SHA2js = require('./chunk-BDI3SHA2.js');var _chunkOGW7GTJPjs = require('./chunk-OGW7GTJP.js');var N=(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 v=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 = _chunkRA5GVN3Gjs.n; exports.CreatePaymentInputShape = _chunkRA5GVN3Gjs.i; exports.CreatePaymentInputZod = _chunkRA5GVN3Gjs.j; exports.GetClientData = _chunkBDI3SHA2js.c; exports.GetPayment = _chunkRA5GVN3Gjs.o; exports.GetPayments = _chunkRA5GVN3Gjs.q; exports.GraphQL = _chunkBDI3SHA2js.f; exports.PaymentFilterKeyZod = _chunkRA5GVN3Gjs.a; exports.PaymentFilterShape = _chunkRA5GVN3Gjs.f; exports.PaymentFiltersZod = _chunkRA5GVN3Gjs.g; exports.PaymentRailZod = _chunkRA5GVN3Gjs.c; exports.PaymentResponseZod = _chunkRA5GVN3Gjs.m; exports.PaymentShape = _chunkRA5GVN3Gjs.h; exports.PaymentStatusZod = _chunkRA5GVN3Gjs.b; exports.PaymentTypeZod = _chunkRA5GVN3Gjs.d; exports.SendAuthorizationToCore = _chunkBDI3SHA2js.a; exports.SortOrderZod = _chunkRA5GVN3Gjs.e; exports.UpdateCardID = _chunkBDI3SHA2js.b; exports.UpdateClient = _chunkBDI3SHA2js.d; exports.UpdateClientIdentifier = _chunkBDI3SHA2js.e; exports.UpdatePayment = _chunkRA5GVN3Gjs.p; exports.UpdatePaymentInputShape = _chunkRA5GVN3Gjs.k; exports.UpdatePaymentInputZod = _chunkRA5GVN3Gjs.l; exports.createClient = _chunkRA5GVN3Gjs.r; exports.createLoggingMiddleware = N; exports.createMetricsMiddleware = v; exports.isCommandError = _chunkOGW7GTJPjs.b;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkYSKKRBQDjs = require('./chunk-YSKKRBQD.js');var _chunkS3G3HESYjs = require('./chunk-S3G3HESY.js');var _chunkUD2TOWHPjs = require('./chunk-UD2TOWHP.js');var R=(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 $=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.CreateClient = _chunkUD2TOWHPjs.h; exports.CreatePayment = _chunkYSKKRBQDjs.n; exports.CreatePaymentInputShape = _chunkYSKKRBQDjs.i; exports.CreatePaymentInputZod = _chunkYSKKRBQDjs.j; exports.DeleteClient = _chunkUD2TOWHPjs.k; exports.GetClient = _chunkUD2TOWHPjs.e; exports.GetClients = _chunkUD2TOWHPjs.j; exports.GetPayment = _chunkYSKKRBQDjs.o; exports.GetPayments = _chunkYSKKRBQDjs.q; exports.GraphQL = _chunkS3G3HESYjs.c; exports.PaymentFilterKeyZod = _chunkYSKKRBQDjs.a; exports.PaymentFilterShape = _chunkYSKKRBQDjs.f; exports.PaymentFiltersZod = _chunkYSKKRBQDjs.g; exports.PaymentRailZod = _chunkYSKKRBQDjs.c; exports.PaymentResponseZod = _chunkYSKKRBQDjs.m; exports.PaymentShape = _chunkYSKKRBQDjs.h; exports.PaymentStatusZod = _chunkYSKKRBQDjs.b; exports.PaymentTypeZod = _chunkYSKKRBQDjs.d; exports.SendAuthorizationToCore = _chunkS3G3HESYjs.a; exports.SortOrderZod = _chunkYSKKRBQDjs.e; exports.UpdateCardID = _chunkS3G3HESYjs.b; exports.UpdateClient = _chunkUD2TOWHPjs.f; exports.UpdateClientIdentifier = _chunkUD2TOWHPjs.g; exports.UpdatePayment = _chunkYSKKRBQDjs.p; exports.UpdatePaymentInputShape = _chunkYSKKRBQDjs.k; exports.UpdatePaymentInputZod = _chunkYSKKRBQDjs.l; exports.createClient = _chunkYSKKRBQDjs.r; exports.createCommandError = _chunkUD2TOWHPjs.a; exports.createLoggingMiddleware = R; exports.createMetricsMiddleware = $; exports.isCommandError = _chunkUD2TOWHPjs.b;
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{a as n,b as o,c as m,d,e as p,f as i,g as s,h as y,i as c,j as P,k as f,l as u,m as g,n as l,o as S,p as C,q as x,r as h}from"./chunk-5NRQMAHH.mjs";import{a as w,b as M,c as E,d as I,e as Z,f as U}from"./chunk-5PEETHWV.mjs";import{b as r}from"./chunk-RX3BFHHX.mjs";var N=(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 v=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{l as CreatePayment,c as CreatePaymentInputShape,P as CreatePaymentInputZod,E as GetClientData,S as GetPayment,x as GetPayments,U as GraphQL,n as PaymentFilterKeyZod,i as PaymentFilterShape,s as PaymentFiltersZod,m as PaymentRailZod,g as PaymentResponseZod,y as PaymentShape,o as PaymentStatusZod,d as PaymentTypeZod,w as SendAuthorizationToCore,p as SortOrderZod,M as UpdateCardID,I as UpdateClient,Z as UpdateClientIdentifier,C as UpdatePayment,f as UpdatePaymentInputShape,u as UpdatePaymentInputZod,h as createClient,N as createLoggingMiddleware,v as createMetricsMiddleware,r as isCommandError};
1
+ import{a as o,b as m,c as d,d as p,e as i,f as s,g as y,h as c,i as P,j as f,k as u,l,m as g,n as C,o as S,p as x,q as h,r as N}from"./chunk-VHSZ6TM7.mjs";import{a as v,b as F,c as L}from"./chunk-MNWURBTP.mjs";import{a as r,b as n,e as w,f as M,g as E,h as I,j as Z,k as U}from"./chunk-SQZ4PAOL.mjs";var R=(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 $=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{I as CreateClient,C as CreatePayment,P as CreatePaymentInputShape,f as CreatePaymentInputZod,U as DeleteClient,w as GetClient,Z as GetClients,S as GetPayment,h as GetPayments,L as GraphQL,o as PaymentFilterKeyZod,s as PaymentFilterShape,y as PaymentFiltersZod,d as PaymentRailZod,g as PaymentResponseZod,c as PaymentShape,m as PaymentStatusZod,p as PaymentTypeZod,v as SendAuthorizationToCore,i as SortOrderZod,F as UpdateCardID,M as UpdateClient,E as UpdateClientIdentifier,x as UpdatePayment,u as UpdatePaymentInputShape,l as UpdatePaymentInputZod,N as createClient,r as createCommandError,R as createLoggingMiddleware,$ as createMetricsMiddleware,n as isCommandError};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mbanq/core-sdk-js",
3
- "version": "0.1.1",
3
+ "version": "0.2.1",
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": {
@@ -1 +0,0 @@
1
- import{a as l,c as f,d as x}from"./chunk-RX3BFHHX.mjs";var E=t=>{let n=[];if(!t.baseUrl)n.push("baseUrl is required");else if(typeof t.baseUrl!="string")n.push("baseUrl must be a string");else try{new URL(t.baseUrl)}catch{n.push("baseUrl must be a valid URL")}return t.axiosConfig?.timeout!==void 0&&(typeof t.axiosConfig.timeout!="number"||t.axiosConfig.timeout<0)&&n.push("timeout must be a positive number"),n};import{z as e}from"zod";var N=e.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"]),h=e.enum(["DRAFT","AML_SCREENING","AML_REJECTED","EXECUTION_SCHEDULED","EXECUTION_PROCESSING","EXECUTION_SUCCESS","EXECUTION_FAILURE","RETURNED","CANCELLED","COMPLIANCE_FAILURE","DELETED","UNKNOWN"]),P=e.enum(["ACH","SAMEDAYACH","WIRE","SWIFT","INTERNAL","FXPAY","CARD"]),C=e.enum(["CREDIT","DEBIT"]),w=e.enum(["ASC","DESC"]),ze=N.options,Ve=h.options,je=P.options,Me=C.options,$e=w.options,B=t=>N.parse(t),F=t=>h.parse(t),k=t=>P.parse(t),U=t=>C.parse(t),L=t=>w.parse(t),_=e.string().min(1),z=e.string().min(1),V=e.string().min(1),j=e.string().min(1),M=e.string().min(1),$=e.string().min(1),G=e.string().min(1),K=e.string().min(1),q=e.string().min(1),H=e.union([e.string(),e.number()]),Y=e.string(),W=e.string(),X=e.string(),O=e.string(),A=e.string(),T=e.string(),J=e.boolean(),Q=e.string(),Z=t=>_.parse(t),ee=t=>z.parse(t),te=t=>V.parse(t),ne=t=>j.parse(t),ae=t=>M.parse(t),re=t=>$.parse(t),oe=t=>G.parse(t),ie=t=>K.parse(t),se=t=>q.parse(t),ce=t=>H.parse(t),pe=t=>Y.parse(t),me=t=>W.parse(t),de=t=>X.parse(t),ye=t=>O.parse(t),ue=t=>A.parse(t),le=t=>T.parse(t),ge=t=>J.parse(t),fe=t=>Q.parse(t),Oe={originatorName:_.optional(),originatorAccount:z.optional(),originatorBankRoutingCode:V.optional(),recipientName:j.optional(),recipientAccount:M.optional(),recipientBankRoutingCode:$.optional(),reference:G.optional(),traceNumber:K.optional(),externalId:q.optional(),clientId:H.optional(),dateFormat:Y.optional(),locale:W.optional(),originatedBy:X.optional(),paymentRail:P.optional(),paymentType:C.optional(),fromValueDate:O.optional(),toValueDate:O.optional(),fromExecuteDate:A.optional(),toExecuteDate:A.optional(),status:h.optional(),fromReturnDate:T.optional(),toReturnDate:T.optional(),isSettlement:J.optional(),orderBy:Q.optional(),sortOrder:w.optional(),limit:e.number().positive().optional().describe("Maximum number of records to return. Defaults to 20 if not specified. Set to 0 to return all records."),offset:e.number().min(0).optional()},Ge=e.object(Oe).partial();var Ae={id:e.number(),clientId:e.number(),amount:e.number().positive(),correlationId:e.string(),paymentType:C,paymentRail:P,recipient:e.object({cardId:e.string().optional(),recipientType:e.string(),address:e.object({line1:e.string().optional(),line2:e.string().optional(),stateCode:e.string().optional(),countryCode:e.string(),postalCode:e.string().optional()}),name:e.string()}),originator:e.object({accountId:e.string().optional(),recipientType:e.string(),address:e.object({line1:e.string().optional(),line2:e.string().optional(),stateCode:e.string().optional(),countryCode:e.string(),postalCode:e.string().optional()}),name:e.string()}),executedAt:e.string(),createdAt:e.string(),externalId:e.string(),status:h,paymentRailMetaData:e.record(e.string(),e.any()).optional(),currencyData:e.object({code:e.string(),name:e.string(),decimalPlaces:e.number(),displaySymbol:e.string(),nameCode:e.string(),currencyCodeInDigit:e.number(),isBaseCurrency:e.boolean()}),currency:e.string().min(3).max(3)},xe=e.object(Ae).catchall(e.any()),Ie=e.object({streetAddress:e.string().optional(),city:e.string().optional(),state:e.string().optional(),country:e.string().optional(),postalCode:e.string().optional()}).optional(),Te=e.object({name:e.string().optional(),identifier:e.string().optional(),address:Ie}).optional(),v=e.object({name:e.string(),identifier:e.string(),accountType:e.enum(["CHECKING","SAVINGS"]).optional(),address:Ie,agent:Te}),we={amount:e.number().positive(),currency:e.string().min(3).max(3),paymentRail:P,paymentType:C,debtor:v,creditor:v,clientId:e.string().optional(),correspondent:v.optional(),exchangeRate:e.number().positive().optional(),externalId:e.string().optional(),reference:e.union([e.string(),e.array(e.string())]).optional(),paymentRailMetaData:e.record(e.string(),e.any()).optional(),chargeBearer:e.enum(["OUR","BEN","SHA"]).optional(),purposeCode:e.string().optional(),valueDate:e.string().optional(),executionDate:e.string().optional()},Ne=e.object(we).catchall(e.any()).refine(t=>(t.paymentRail==="WIRE"||t.paymentRail==="SWIFT")&&t.creditor?t.creditor.address&&t.creditor.address.state&&t.creditor.address.country:!0,{message:"For WIRE transfers, recipient address with state and country is mandatory"}),Be={amount:e.number().positive().optional(),correspondent:e.object({name:e.string().optional(),identifier:e.string().optional(),accountType:e.string().optional()}).optional(),creditor:e.object({name:e.string().optional(),identifier:e.string().optional(),accountType:e.string().optional(),agent:e.object({name:e.string().optional(),identifier:e.string().optional()}).optional()}).optional(),debtor:e.object({name:e.string().optional(),identifier:e.string().optional(),accountType:e.string().optional(),agent:e.object({name:e.string().optional(),identifier:e.string().optional()}).optional()}).optional(),exchangeRate:e.number().positive().optional(),externalId:e.string().optional(),errorCode:e.string().optional(),errorMessage:e.string().optional(),reference:e.union([e.string(),e.array(e.string())]).optional(),paymentRailMetaData:e.record(e.string(),e.any()).optional(),status:h.optional()},Fe=e.object(Be).catchall(e.any()),Ke=e.object({totalFilteredRecords:e.number(),pageItems:e.array(xe)}),S=t=>xe.parse(t),he=t=>Ne.parse(t),Pe=t=>Fe.parse(t);var qe=e.object({id:e.string(),clientId:e.number(),resourceId:e.number(),resourceIdentifier:e.string()});import{ZodError as b}from"zod";var ke=t=>{try{B(t)}catch(n){throw n instanceof b?l({message:`Invalid filter key: '${t}'. ${n.message}`,code:"invalid_filter_key"}):n}},Ue=(t,n)=>{try{switch(t){case"status":F(n);break;case"paymentRail":k(n);break;case"paymentType":U(n);break;case"sortOrder":L(n);break;case"originatorName":Z(n);break;case"originatorAccount":ee(n);break;case"originatorBankRoutingCode":te(n);break;case"recipientName":ne(n);break;case"recipientAccount":ae(n);break;case"recipientBankRoutingCode":re(n);break;case"reference":oe(n);break;case"traceNumber":ie(n);break;case"externalId":se(n);break;case"clientId":ce(n);break;case"dateFormat":pe(n);break;case"locale":me(n);break;case"originatedBy":de(n);break;case"fromValueDate":case"toValueDate":ye(n);break;case"fromExecuteDate":case"toExecuteDate":ue(n);break;case"fromReturnDate":case"toReturnDate":le(n);break;case"isSettlement":ge(n);break;case"orderBy":fe(n);break;default:break}}catch(r){throw r instanceof b?l({message:`Invalid value for '${t}': '${n}'. ${r.message}`,code:`invalid_${t}_value`}):r}},Ce=t=>({input:t,metadata:{commandName:"CreatePayment",path:"/v1/payments",method:"POST"},execute:async n=>{try{he(t.payment)}catch(a){throw a instanceof b?l({message:`Invalid payment data: ${a.message}`,code:"invalid_payment_input"}):a}t.tenantId&&(n.tenantId=t.tenantId);let r=await x(n);try{let a=await r.post("/v1/payments",t.payment);return S(a.data)}catch(a){f(a)}}}),Re=t=>({input:t,metadata:{commandName:"GetPayment",path:`/v1/payments/${t.id}`,method:"GET"},execute:async n=>{t.tenantId&&(n.tenantId=t.tenantId);let r=await x(n);try{let a=await r.get(`/v1/payments/${t.id}`);return S(a.data)}catch(a){f(a)}}}),Se=t=>({input:t,metadata:{commandName:"UpdatePayment",path:`/v1/payments/${t.id}`,method:"PUT"},execute:async n=>{try{Pe(t.payment)}catch(a){throw a instanceof b?l({message:`Invalid payment update data: ${a.message}`,code:"invalid_payment_update_input"}):a}t.tenantId&&(n.tenantId=t.tenantId);let r=await x(n);try{let a=await r.put(`/v1/payments/${t.id}`,t.payment);return S(a.data)}catch(a){f(a)}}}),R=(t,n,r,a)=>{if(n!==void 0&&n!==0&&n<=0)throw l({message:`Invalid limit: ${n}. Limit must be positive or 0 for fetching all records.`,code:"invalid_limit"});if(r!==void 0&&r<0)throw l({message:`Invalid offset: ${r}. Offset must be non-negative.`,code:"invalid_offset"});return{where:p=>(ke(p),{eq:o=>(Ue(p,o),R({...t,[p]:o},n,r,a))}),limit:p=>R(t,p,r,a),offset:p=>R(t,n,p,a),all:()=>R(t,0,r,a),execute:()=>{let p={locale:"en",originatedBy:"us",orderBy:"id",sortOrder:"DESC"},o={...p,...t,limit:n||200,offset:r||0};return{input:{filters:t,limit:n,offset:r,tenantId:a},metadata:{commandName:"ListPayments",path:"/v1/payments",method:"GET"},execute:async s=>{a&&(s.tenantId=a);let c=await x(s);try{if(n===0){let i=[],y=r||0,d=0;do{let g={...p,...t,limit:200,offset:y},D=await c.get("/v1/payments",{params:g}),{totalFilteredRecords:Ee,pageItems:ve}=D.data;i.push(...ve),d=Ee,y+=200}while(y<d);return{totalFilteredRecords:d,pageItems:i}}else return(await c.get("/v1/payments",{params:o})).data}catch(i){f(i)}}}}}},be=t=>({list:()=>R({},void 0,void 0,t?.tenantId)}),Qe=(t,n)=>({input:{params:t,configuration:n},metadata:{commandName:"GetPayments",path:"/v1/payments",method:"GET"},execute:async r=>{n.tenantId&&(r.tenantId=n.tenantId);let a=await x(r),u=[],I=t.limit||20,p=t.offset||0,o=0,i={...{locale:"en",originatedBy:"us",orderBy:"id",sortOrder:"DESC"},...(m=>{let d=["fromValueDate","toValueDate","fromExecuteDate","toExecuteDate","fromReturnDate","toReturnDate"].some(D=>m[D]!==void 0),g={...m};return d&&g.dateFormat===void 0&&(g.dateFormat="yyyy-MM-dd"),g})(t),limit:I,offset:p};try{if(t.limit===0){do{let m=await a.get("/v1/payments",{params:i}),{totalFilteredRecords:y,pageItems:d}=m.data;u.push(...d),o=y,p+=I}while(p<o);return{totalFilteredRecords:o,pageItems:u}}else return(await a.get("/v1/payments",{params:i})).data}catch(m){f(m)}}}),De=t=>({input:t,metadata:{commandName:"DeletePayment",path:`/v1/payments/${t.id}`,method:"DELETE"},execute:async n=>{t.tenantId&&(n.tenantId=t.tenantId);let r=await x(n);try{await r.delete(`/v1/payments/${t.id}`)}catch(a){f(a)}}});var at=t=>{let n=E(t);if(n.length>0)throw l({message:`Invalid configuration: ${n.join(", ")}`,code:"invalid_config"});let r=async(o,s,c)=>{if(t.middlewares)for(let i of t.middlewares)o==="before"&&i.before?await i.before(s):o==="after"&&i.after?await i.after(s,c):o==="onError"&&i.onError&&await i.onError(s,c)},a={...t},u=async o=>{try{await r("before",o);let s=await o.execute(a);return await r("after",o,s),s}catch(s){throw await r("onError",o,s),s}},I=o=>{let s=o||a.tenantId;return{payment:{create:c=>{let i=Ce({payment:c,tenantId:s});return{execute:async()=>u(i)}},get:c=>{let i=Re({id:c,tenantId:s});return{execute:async()=>u(i)}},update:(c,i)=>{let m=Se({id:c,payment:i,tenantId:s});return{execute:async()=>u(m)}},delete:c=>{let i=De({id:c,tenantId:s});return{execute:async()=>u(i)}},list:()=>{let i=be({tenantId:s}).list(),m=y=>({where:y.where,limit:d=>{let g=y.limit(d);return m(g)},offset:d=>{let g=y.offset(d);return m(g)},all:()=>{let d=y.all();return m(d)},execute:async()=>{let d=y.execute();return u(d)}});return m(i)}}}};return{setConfig:o=>{a=o},updateConfig:o=>{let s={...a,...o,axiosConfig:{...a.axiosConfig,...o.axiosConfig,headers:{...a.axiosConfig?.headers,...o.axiosConfig?.headers}}},c=E(s);if(c.length>0)throw l({message:`Invalid configuration: ${c.join(", ")}`,code:"invalid_config"});a=s},resetConfig:()=>{a=t},request:u,tenant:o=>I(o),...I()}};export{N as a,h as b,P as c,C as d,w as e,Oe as f,Ge as g,Ae as h,we as i,Ne as j,Be as k,Fe as l,Ke as m,Ce as n,Re as o,Se as p,Qe as q,at as r};
@@ -1 +0,0 @@
1
- import{a as s,c as d,d as r}from"./chunk-RX3BFHHX.mjs";var I=t=>{let e=t.skipNotification&&"?skipNotification=true"||"",i=t.card.cardType==="CREDIT"?"creditcards":"cards",n={...t.payload,query:e,flag:t.flag};return{input:t,metadata:{commandName:"SendAuthorizationToCore",path:`/${i}/${t.card.internalCardId}/authorization${e}`,method:"POST"},execute:async a=>{t.tenantId&&(a.tenantId=t.tenantId);let o=await r(a);try{return await o.post(`/${i}/${t.card.internalCardId}/authorization${e}`,n)}catch(c){d(c)}}}},p=t=>({input:t,metadata:{commandName:"UpdateCardID",path:`/clients/${t.clientId}`,method:"PUT"},execute:async e=>{t.tenantId&&(e.tenantId=t.tenantId);let i=await r(e);try{await i.put(`/clients/${t.clientId}`,{businessCardIDURL:t.businessCardIDURL,businessCardIDQRCode:t.businessCardIDQRCode})}catch(n){d(n)}}});var h=t=>({input:t,metadata:{commandName:"GetClientData",path:`/v1/clients/${t.clientId}`,method:"GET"},execute:async e=>{t.tenantId&&(e.tenantId=t.tenantId);let i=await r(e),n={clientData:void 0,riskRatingData:void 0,clientAddressData:void 0,clientIdentifierData:void 0};try{return n.clientData=await i.get(`/v1/clients/${t.clientId}`),t.riskRating&&(n.riskRatingData=await i.get(`/v1/clients/${t.clientId}/riskrating`)),t.clientAddress&&(n.clientAddressData=await i.get(`/v1/client/${t.clientId}/addresses`)),t.clientIdentifier&&(n.clientIdentifierData=await i.get(`/v1/clients/${t.clientId}/identifiers?unmaskValue=true`)),n}catch(a){d(a)}}}),b=t=>({input:t,metadata:{commandName:"UpdateClient",path:`/v1/clients/${t.clientId}`,method:"PUT"},execute:async e=>{t.tenantId&&(e.tenantId=t.tenantId);let i=await r(e);try{return(await i.put(`/v1/clients/${t.clientId}`,{...t.updates})).data}catch(n){d(n)}}}),y=t=>({input:t,metadata:{commandName:"UpdateClientIdentifier",path:`/v1/clients/${t.clientId}/identifiers/${t.identifierId}`,method:"PUT"},execute:async e=>{t.tenantId&&(e.tenantId=t.tenantId);let i=await r(e);try{return(await i.put(`/v1/clients/${t.clientId}/identifiers/${t.identifierId}`,{...t.updates})).data}catch(n){d(n)}}});import{print as l}from"graphql";var $=t=>({input:t,metadata:{commandName:t.operationName||"GraphQL",path:"/graphql",method:"POST"},execute:async e=>{t.tenantId&&(e.tenantId=t.tenantId);let i=await r(e),n=e.graphqlPath||"/graphql";try{let a=typeof t.command=="string"?t.command:l(t.command),{data:o}=await i.post(n,{query:a,variables:t.variables,operationName:t.operationName});if(o.errors?.length)throw s({message:o.errors[0].message,code:"graphql_error",originalError:o.errors[0]});if(!o.data)throw s({message:"No data returned from GraphQL query",code:"graphql_no_data"});return o.data}catch(a){throw a.name==="CommandError"?a:s({message:a.message,code:"graphql_request_failed",originalError:a})}}});export{I as a,p as b,h as c,b as d,y as e,$ as f};
@@ -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 I=t=>{let e=t.skipNotification&&"?skipNotification=true"||"",i=t.card.cardType==="CREDIT"?"creditcards":"cards",n={...t.payload,query:e,flag:t.flag};return{input:t,metadata:{commandName:"SendAuthorizationToCore",path:`/${i}/${t.card.internalCardId}/authorization${e}`,method:"POST"},execute:async a=>{t.tenantId&&(a.tenantId=t.tenantId);let o=await _chunkOGW7GTJPjs.d.call(void 0, a);try{return await o.post(`/${i}/${t.card.internalCardId}/authorization${e}`,n)}catch(c){_chunkOGW7GTJPjs.c.call(void 0, c)}}}},p= exports.b =t=>({input:t,metadata:{commandName:"UpdateCardID",path:`/clients/${t.clientId}`,method:"PUT"},execute:async e=>{t.tenantId&&(e.tenantId=t.tenantId);let i=await _chunkOGW7GTJPjs.d.call(void 0, e);try{await i.put(`/clients/${t.clientId}`,{businessCardIDURL:t.businessCardIDURL,businessCardIDQRCode:t.businessCardIDQRCode})}catch(n){_chunkOGW7GTJPjs.c.call(void 0, n)}}});var h=t=>({input:t,metadata:{commandName:"GetClientData",path:`/v1/clients/${t.clientId}`,method:"GET"},execute:async e=>{t.tenantId&&(e.tenantId=t.tenantId);let i=await _chunkOGW7GTJPjs.d.call(void 0, e),n={clientData:void 0,riskRatingData:void 0,clientAddressData:void 0,clientIdentifierData:void 0};try{return n.clientData=await i.get(`/v1/clients/${t.clientId}`),t.riskRating&&(n.riskRatingData=await i.get(`/v1/clients/${t.clientId}/riskrating`)),t.clientAddress&&(n.clientAddressData=await i.get(`/v1/client/${t.clientId}/addresses`)),t.clientIdentifier&&(n.clientIdentifierData=await i.get(`/v1/clients/${t.clientId}/identifiers?unmaskValue=true`)),n}catch(a){_chunkOGW7GTJPjs.c.call(void 0, a)}}}),b= exports.d =t=>({input:t,metadata:{commandName:"UpdateClient",path:`/v1/clients/${t.clientId}`,method:"PUT"},execute:async e=>{t.tenantId&&(e.tenantId=t.tenantId);let i=await _chunkOGW7GTJPjs.d.call(void 0, e);try{return(await i.put(`/v1/clients/${t.clientId}`,{...t.updates})).data}catch(n){_chunkOGW7GTJPjs.c.call(void 0, n)}}}),y= exports.e =t=>({input:t,metadata:{commandName:"UpdateClientIdentifier",path:`/v1/clients/${t.clientId}/identifiers/${t.identifierId}`,method:"PUT"},execute:async e=>{t.tenantId&&(e.tenantId=t.tenantId);let i=await _chunkOGW7GTJPjs.d.call(void 0, e);try{return(await i.put(`/v1/clients/${t.clientId}/identifiers/${t.identifierId}`,{...t.updates})).data}catch(n){_chunkOGW7GTJPjs.c.call(void 0, n)}}});var _graphql = require('graphql');var $=t=>({input:t,metadata:{commandName:t.operationName||"GraphQL",path:"/graphql",method:"POST"},execute:async e=>{t.tenantId&&(e.tenantId=t.tenantId);let i=await _chunkOGW7GTJPjs.d.call(void 0, e),n=e.graphqlPath||"/graphql";try{let a=typeof t.command=="string"?t.command:_graphql.print.call(void 0, t.command),{data:o}=await i.post(n,{query:a,variables:t.variables,operationName:t.operationName});if(_optionalChain([o, 'access', _ => _.errors, 'optionalAccess', _2 => _2.length]))throw _chunkOGW7GTJPjs.a.call(void 0, {message:o.errors[0].message,code:"graphql_error",originalError:o.errors[0]});if(!o.data)throw _chunkOGW7GTJPjs.a.call(void 0, {message:"No data returned from GraphQL query",code:"graphql_no_data"});return o.data}catch(a){throw a.name==="CommandError"?a:_chunkOGW7GTJPjs.a.call(void 0, {message:a.message,code:"graphql_request_failed",originalError:a})}}});exports.a = I; exports.b = p; exports.c = h; exports.d = b; exports.e = y; exports.f = $;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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 _axios = require('axios'); var _axios2 = _interopRequireDefault(_axios);var m=({message:e,statusCode:t,code:r,requestId:s,originalError:n})=>({name:"CommandError",message:e,statusCode:t,code:r,requestId:s,originalError:n}),E= exports.b =e=>typeof e=="object"&&e!==null&&"name"in e&&e.name==="CommandError",u=e=>{if(!e||typeof e!="object")return e;let t={...e};if(t.config&&typeof t.config=="object"){let r=t.config;if(r.httpsAgent&&typeof r.httpsAgent=="object"){let s=r.httpsAgent;delete s.sockets,delete s.freeSockets,delete s._sessionCache}}return t},w= exports.c =e=>{if(_axios2.default.isAxiosError(e)){let t=_optionalChain([e, 'access', _ => _.response, 'optionalAccess', _2 => _2.data, 'optionalAccess', _3 => _3.message]),r=_optionalChain([e, 'access', _4 => _4.response, 'optionalAccess', _5 => _5.status])?`Request failed with status code ${e.response.status}`:e.message||"Request failed";throw m({message:t||r,statusCode:_optionalChain([e, 'access', _6 => _6.response, 'optionalAccess', _7 => _7.status]),code:e.code,requestId:_optionalChain([e, 'access', _8 => _8.response, 'optionalAccess', _9 => _9.headers, 'optionalAccess', _10 => _10["x-request-id"]]),originalError:u(e)})}throw e};var _uuid = require('uuid');var _https = require('https'); var p = _interopRequireWildcard(_https);var _jsonwebtoken = require('jsonwebtoken'); var _jsonwebtoken2 = _interopRequireDefault(_jsonwebtoken);var o=(e,t)=>{if(!e)throw new Error("Missing JWT secret");return _jsonwebtoken2.default.sign({signee:t},e,{algorithm:"HS512",expiresIn:"1d"})||""},a=async(e,t,r,s)=>{let n={method:"POST",url:`${t}/oauth/token`,headers:{"Content-Type":"application/x-www-form-urlencoded",tenantId:r},data:s},{data:{access_token:d}}=await _axios2.default.request(n);return e=d,e};var i={token:""},A=e=>e&&(e.startsWith("Bearer ")?e:`Bearer ${e}`),R= exports.d =async e=>{let r=_axios2.default.create({timeout:_optionalChain([e, 'access', _11 => _11.axiosConfig, 'optionalAccess', _12 => _12.timeout])||29e3,baseURL:e.baseUrl,headers:{"Content-Type":"application/json; charset=utf-8","JWT-Token":_optionalChain([e, 'optionalAccess', _13 => _13.secret])?`${o(_optionalChain([e, 'optionalAccess', _14 => _14.secret]),_optionalChain([e, 'optionalAccess', _15 => _15.signee])||"")}`:void 0,Authorization:e.bearerToken!==void 0?A(e.bearerToken):e.credential?`Bearer ${i.token||await a(i.token,e.baseUrl,e.tenantId,e.credential)}`:void 0,"trace-id":e.traceId||`RequestUUID=${_uuid.v4.call(void 0, )}`,tenantId:e.tenantId},httpsAgent:new p.Agent({rejectUnauthorized:!0,keepAlive:_optionalChain([e, 'access', _16 => _16.axiosConfig, 'optionalAccess', _17 => _17.keepAlive])})});return e.logger&&e.logger(r),r};exports.a = m; exports.b = E; exports.c = w; exports.d = R;
@@ -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 E=t=>{let n=[];if(!t.baseUrl)n.push("baseUrl is required");else if(typeof t.baseUrl!="string")n.push("baseUrl must be a string");else try{new URL(t.baseUrl)}catch (e2){n.push("baseUrl must be a valid URL")}return _optionalChain([t, 'access', _2 => _2.axiosConfig, 'optionalAccess', _3 => _3.timeout])!==void 0&&(typeof t.axiosConfig.timeout!="number"||t.axiosConfig.timeout<0)&&n.push("timeout must be a positive number"),n};var _zod = require('zod');var N=_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"]),h= exports.b =_zod.z.enum(["DRAFT","AML_SCREENING","AML_REJECTED","EXECUTION_SCHEDULED","EXECUTION_PROCESSING","EXECUTION_SUCCESS","EXECUTION_FAILURE","RETURNED","CANCELLED","COMPLIANCE_FAILURE","DELETED","UNKNOWN"]),P= exports.c =_zod.z.enum(["ACH","SAMEDAYACH","WIRE","SWIFT","INTERNAL","FXPAY","CARD"]),C= exports.d =_zod.z.enum(["CREDIT","DEBIT"]),w= exports.e =_zod.z.enum(["ASC","DESC"]),ze=N.options,Ve=h.options,je=P.options,Me=C.options,$e=w.options,B=t=>N.parse(t),F=t=>h.parse(t),k=t=>P.parse(t),U=t=>C.parse(t),L=t=>w.parse(t),_=_zod.z.string().min(1),z=_zod.z.string().min(1),V=_zod.z.string().min(1),j=_zod.z.string().min(1),M=_zod.z.string().min(1),$=_zod.z.string().min(1),G=_zod.z.string().min(1),K=_zod.z.string().min(1),q=_zod.z.string().min(1),H=_zod.z.union([_zod.z.string(),_zod.z.number()]),Y=_zod.z.string(),W=_zod.z.string(),X=_zod.z.string(),O=_zod.z.string(),A=_zod.z.string(),T=_zod.z.string(),J=_zod.z.boolean(),Q=_zod.z.string(),Z=t=>_.parse(t),ee=t=>z.parse(t),te=t=>V.parse(t),ne=t=>j.parse(t),ae=t=>M.parse(t),re=t=>$.parse(t),oe=t=>G.parse(t),ie=t=>K.parse(t),se=t=>q.parse(t),ce=t=>H.parse(t),pe=t=>Y.parse(t),me=t=>W.parse(t),de=t=>X.parse(t),ye=t=>O.parse(t),ue=t=>A.parse(t),le=t=>T.parse(t),ge=t=>J.parse(t),fe=t=>Q.parse(t),Oe= exports.f ={originatorName:_.optional(),originatorAccount:z.optional(),originatorBankRoutingCode:V.optional(),recipientName:j.optional(),recipientAccount:M.optional(),recipientBankRoutingCode:$.optional(),reference:G.optional(),traceNumber:K.optional(),externalId:q.optional(),clientId:H.optional(),dateFormat:Y.optional(),locale:W.optional(),originatedBy:X.optional(),paymentRail:P.optional(),paymentType:C.optional(),fromValueDate:O.optional(),toValueDate:O.optional(),fromExecuteDate:A.optional(),toExecuteDate:A.optional(),status:h.optional(),fromReturnDate:T.optional(),toReturnDate:T.optional(),isSettlement:J.optional(),orderBy:Q.optional(),sortOrder:w.optional(),limit:_zod.z.number().positive().optional().describe("Maximum number of records to return. Defaults to 20 if not specified. Set to 0 to return all records."),offset:_zod.z.number().min(0).optional()},Ge= exports.g =_zod.z.object(Oe).partial();var Ae={id:_zod.z.number(),clientId:_zod.z.number(),amount:_zod.z.number().positive(),correlationId:_zod.z.string(),paymentType:C,paymentRail:P,recipient:_zod.z.object({cardId:_zod.z.string().optional(),recipientType:_zod.z.string(),address:_zod.z.object({line1:_zod.z.string().optional(),line2:_zod.z.string().optional(),stateCode:_zod.z.string().optional(),countryCode:_zod.z.string(),postalCode:_zod.z.string().optional()}),name:_zod.z.string()}),originator:_zod.z.object({accountId:_zod.z.string().optional(),recipientType:_zod.z.string(),address:_zod.z.object({line1:_zod.z.string().optional(),line2:_zod.z.string().optional(),stateCode:_zod.z.string().optional(),countryCode:_zod.z.string(),postalCode:_zod.z.string().optional()}),name:_zod.z.string()}),executedAt:_zod.z.string(),createdAt:_zod.z.string(),externalId:_zod.z.string(),status:h,paymentRailMetaData:_zod.z.record(_zod.z.string(),_zod.z.any()).optional(),currencyData:_zod.z.object({code:_zod.z.string(),name:_zod.z.string(),decimalPlaces:_zod.z.number(),displaySymbol:_zod.z.string(),nameCode:_zod.z.string(),currencyCodeInDigit:_zod.z.number(),isBaseCurrency:_zod.z.boolean()}),currency:_zod.z.string().min(3).max(3)},xe=_zod.z.object(Ae).catchall(_zod.z.any()),Ie=_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(),Te=_zod.z.object({name:_zod.z.string().optional(),identifier:_zod.z.string().optional(),address:Ie}).optional(),v=_zod.z.object({name:_zod.z.string(),identifier:_zod.z.string(),accountType:_zod.z.enum(["CHECKING","SAVINGS"]).optional(),address:Ie,agent:Te}),we= exports.i ={amount:_zod.z.number().positive(),currency:_zod.z.string().min(3).max(3),paymentRail:P,paymentType:C,debtor:v,creditor:v,clientId:_zod.z.string().optional(),correspondent:v.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()},Ne= exports.j =_zod.z.object(we).catchall(_zod.z.any()).refine(t=>(t.paymentRail==="WIRE"||t.paymentRail==="SWIFT")&&t.creditor?t.creditor.address&&t.creditor.address.state&&t.creditor.address.country:!0,{message:"For WIRE transfers, recipient address with state and country is mandatory"}),Be= exports.k ={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:h.optional()},Fe= exports.l =_zod.z.object(Be).catchall(_zod.z.any()),Ke= exports.m =_zod.z.object({totalFilteredRecords:_zod.z.number(),pageItems:_zod.z.array(xe)}),S=t=>xe.parse(t),he=t=>Ne.parse(t),Pe=t=>Fe.parse(t);var qe=_zod.z.object({id:_zod.z.string(),clientId:_zod.z.number(),resourceId:_zod.z.number(),resourceIdentifier:_zod.z.string()});var ke=t=>{try{B(t)}catch(n){throw n instanceof _zod.ZodError?_chunkOGW7GTJPjs.a.call(void 0, {message:`Invalid filter key: '${t}'. ${n.message}`,code:"invalid_filter_key"}):n}},Ue=(t,n)=>{try{switch(t){case"status":F(n);break;case"paymentRail":k(n);break;case"paymentType":U(n);break;case"sortOrder":L(n);break;case"originatorName":Z(n);break;case"originatorAccount":ee(n);break;case"originatorBankRoutingCode":te(n);break;case"recipientName":ne(n);break;case"recipientAccount":ae(n);break;case"recipientBankRoutingCode":re(n);break;case"reference":oe(n);break;case"traceNumber":ie(n);break;case"externalId":se(n);break;case"clientId":ce(n);break;case"dateFormat":pe(n);break;case"locale":me(n);break;case"originatedBy":de(n);break;case"fromValueDate":case"toValueDate":ye(n);break;case"fromExecuteDate":case"toExecuteDate":ue(n);break;case"fromReturnDate":case"toReturnDate":le(n);break;case"isSettlement":ge(n);break;case"orderBy":fe(n);break;default:break}}catch(r){throw r instanceof _zod.ZodError?_chunkOGW7GTJPjs.a.call(void 0, {message:`Invalid value for '${t}': '${n}'. ${r.message}`,code:`invalid_${t}_value`}):r}},Ce= exports.n =t=>({input:t,metadata:{commandName:"CreatePayment",path:"/v1/payments",method:"POST"},execute:async n=>{try{he(t.payment)}catch(a){throw a instanceof _zod.ZodError?_chunkOGW7GTJPjs.a.call(void 0, {message:`Invalid payment data: ${a.message}`,code:"invalid_payment_input"}):a}t.tenantId&&(n.tenantId=t.tenantId);let r=await _chunkOGW7GTJPjs.d.call(void 0, n);try{let a=await r.post("/v1/payments",t.payment);return S(a.data)}catch(a){_chunkOGW7GTJPjs.c.call(void 0, a)}}}),Re= exports.o =t=>({input:t,metadata:{commandName:"GetPayment",path:`/v1/payments/${t.id}`,method:"GET"},execute:async n=>{t.tenantId&&(n.tenantId=t.tenantId);let r=await _chunkOGW7GTJPjs.d.call(void 0, n);try{let a=await r.get(`/v1/payments/${t.id}`);return S(a.data)}catch(a){_chunkOGW7GTJPjs.c.call(void 0, a)}}}),Se= exports.p =t=>({input:t,metadata:{commandName:"UpdatePayment",path:`/v1/payments/${t.id}`,method:"PUT"},execute:async n=>{try{Pe(t.payment)}catch(a){throw a instanceof _zod.ZodError?_chunkOGW7GTJPjs.a.call(void 0, {message:`Invalid payment update data: ${a.message}`,code:"invalid_payment_update_input"}):a}t.tenantId&&(n.tenantId=t.tenantId);let r=await _chunkOGW7GTJPjs.d.call(void 0, n);try{let a=await r.put(`/v1/payments/${t.id}`,t.payment);return S(a.data)}catch(a){_chunkOGW7GTJPjs.c.call(void 0, a)}}}),R=(t,n,r,a)=>{if(n!==void 0&&n!==0&&n<=0)throw _chunkOGW7GTJPjs.a.call(void 0, {message:`Invalid limit: ${n}. Limit must be positive or 0 for fetching all records.`,code:"invalid_limit"});if(r!==void 0&&r<0)throw _chunkOGW7GTJPjs.a.call(void 0, {message:`Invalid offset: ${r}. Offset must be non-negative.`,code:"invalid_offset"});return{where:p=>(ke(p),{eq:o=>(Ue(p,o),R({...t,[p]:o},n,r,a))}),limit:p=>R(t,p,r,a),offset:p=>R(t,n,p,a),all:()=>R(t,0,r,a),execute:()=>{let p={locale:"en",originatedBy:"us",orderBy:"id",sortOrder:"DESC"},o={...p,...t,limit:n||200,offset:r||0};return{input:{filters:t,limit:n,offset:r,tenantId:a},metadata:{commandName:"ListPayments",path:"/v1/payments",method:"GET"},execute:async s=>{a&&(s.tenantId=a);let c=await _chunkOGW7GTJPjs.d.call(void 0, s);try{if(n===0){let i=[],y=r||0,d=0;do{let g={...p,...t,limit:200,offset:y},D=await c.get("/v1/payments",{params:g}),{totalFilteredRecords:Ee,pageItems:ve}=D.data;i.push(...ve),d=Ee,y+=200}while(y<d);return{totalFilteredRecords:d,pageItems:i}}else return(await c.get("/v1/payments",{params:o})).data}catch(i){_chunkOGW7GTJPjs.c.call(void 0, i)}}}}}},be=t=>({list:()=>R({},void 0,void 0,_optionalChain([t, 'optionalAccess', _4 => _4.tenantId]))}),Qe= exports.q =(t,n)=>({input:{params:t,configuration:n},metadata:{commandName:"GetPayments",path:"/v1/payments",method:"GET"},execute:async r=>{n.tenantId&&(r.tenantId=n.tenantId);let a=await _chunkOGW7GTJPjs.d.call(void 0, r),u=[],I=t.limit||20,p=t.offset||0,o=0,i={...{locale:"en",originatedBy:"us",orderBy:"id",sortOrder:"DESC"},...(m=>{let d=["fromValueDate","toValueDate","fromExecuteDate","toExecuteDate","fromReturnDate","toReturnDate"].some(D=>m[D]!==void 0),g={...m};return d&&g.dateFormat===void 0&&(g.dateFormat="yyyy-MM-dd"),g})(t),limit:I,offset:p};try{if(t.limit===0){do{let m=await a.get("/v1/payments",{params:i}),{totalFilteredRecords:y,pageItems:d}=m.data;u.push(...d),o=y,p+=I}while(p<o);return{totalFilteredRecords:o,pageItems:u}}else return(await a.get("/v1/payments",{params:i})).data}catch(m){_chunkOGW7GTJPjs.c.call(void 0, m)}}}),De=t=>({input:t,metadata:{commandName:"DeletePayment",path:`/v1/payments/${t.id}`,method:"DELETE"},execute:async n=>{t.tenantId&&(n.tenantId=t.tenantId);let r=await _chunkOGW7GTJPjs.d.call(void 0, n);try{await r.delete(`/v1/payments/${t.id}`)}catch(a){_chunkOGW7GTJPjs.c.call(void 0, a)}}});var at=t=>{let n=E(t);if(n.length>0)throw _chunkOGW7GTJPjs.a.call(void 0, {message:`Invalid configuration: ${n.join(", ")}`,code:"invalid_config"});let r=async(o,s,c)=>{if(t.middlewares)for(let i of t.middlewares)o==="before"&&i.before?await i.before(s):o==="after"&&i.after?await i.after(s,c):o==="onError"&&i.onError&&await i.onError(s,c)},a={...t},u=async o=>{try{await r("before",o);let s=await o.execute(a);return await r("after",o,s),s}catch(s){throw await r("onError",o,s),s}},I=o=>{let s=o||a.tenantId;return{payment:{create:c=>{let i=Ce({payment:c,tenantId:s});return{execute:async()=>u(i)}},get:c=>{let i=Re({id:c,tenantId:s});return{execute:async()=>u(i)}},update:(c,i)=>{let m=Se({id:c,payment:i,tenantId:s});return{execute:async()=>u(m)}},delete:c=>{let i=De({id:c,tenantId:s});return{execute:async()=>u(i)}},list:()=>{let i=be({tenantId:s}).list(),m=y=>({where:y.where,limit:d=>{let g=y.limit(d);return m(g)},offset:d=>{let g=y.offset(d);return m(g)},all:()=>{let d=y.all();return m(d)},execute:async()=>{let d=y.execute();return u(d)}});return m(i)}}}};return{setConfig:o=>{a=o},updateConfig:o=>{let s={...a,...o,axiosConfig:{...a.axiosConfig,...o.axiosConfig,headers:{..._optionalChain([a, 'access', _5 => _5.axiosConfig, 'optionalAccess', _6 => _6.headers]),..._optionalChain([o, 'access', _7 => _7.axiosConfig, 'optionalAccess', _8 => _8.headers])}}},c=E(s);if(c.length>0)throw _chunkOGW7GTJPjs.a.call(void 0, {message:`Invalid configuration: ${c.join(", ")}`,code:"invalid_config"});a=s},resetConfig:()=>{a=t},request:u,tenant:o=>I(o),...I()}};exports.a = N; exports.b = h; exports.c = P; exports.d = C; exports.e = w; exports.f = Oe; exports.g = Ge; exports.h = Ae; exports.i = we; exports.j = Ne; exports.k = Be; exports.l = Fe; exports.m = Ke; exports.n = Ce; exports.o = Re; exports.p = Se; exports.q = Qe; exports.r = at;
@@ -1 +0,0 @@
1
- import c from"axios";var m=({message:e,statusCode:t,code:r,requestId:s,originalError:n})=>({name:"CommandError",message:e,statusCode:t,code:r,requestId:s,originalError:n}),E=e=>typeof e=="object"&&e!==null&&"name"in e&&e.name==="CommandError",u=e=>{if(!e||typeof e!="object")return e;let t={...e};if(t.config&&typeof t.config=="object"){let r=t.config;if(r.httpsAgent&&typeof r.httpsAgent=="object"){let s=r.httpsAgent;delete s.sockets,delete s.freeSockets,delete s._sessionCache}}return t},w=e=>{if(c.isAxiosError(e)){let t=e.response?.data?.message,r=e.response?.status?`Request failed with status code ${e.response.status}`:e.message||"Request failed";throw m({message:t||r,statusCode:e.response?.status,code:e.code,requestId:e.response?.headers?.["x-request-id"],originalError:u(e)})}throw e};import f from"axios";import{v4 as h}from"uuid";import*as p from"https";import l from"axios";import g from"jsonwebtoken";var o=(e,t)=>{if(!e)throw new Error("Missing JWT secret");return g.sign({signee:t},e,{algorithm:"HS512",expiresIn:"1d"})||""},a=async(e,t,r,s)=>{let n={method:"POST",url:`${t}/oauth/token`,headers:{"Content-Type":"application/x-www-form-urlencoded",tenantId:r},data:s},{data:{access_token:d}}=await l.request(n);return e=d,e};var i={token:""},A=e=>e&&(e.startsWith("Bearer ")?e:`Bearer ${e}`),R=async e=>{let r=f.create({timeout:e.axiosConfig?.timeout||29e3,baseURL:e.baseUrl,headers:{"Content-Type":"application/json; charset=utf-8","JWT-Token":e?.secret?`${o(e?.secret,e?.signee||"")}`:void 0,Authorization:e.bearerToken!==void 0?A(e.bearerToken):e.credential?`Bearer ${i.token||await a(i.token,e.baseUrl,e.tenantId,e.credential)}`:void 0,"trace-id":e.traceId||`RequestUUID=${h()}`,tenantId:e.tenantId},httpsAgent:new p.Agent({rejectUnauthorized:!0,keepAlive:e.axiosConfig?.keepAlive})});return e.logger&&e.logger(r),r};export{m as a,E as b,w as c,R as d};
@@ -1,53 +0,0 @@
1
- import { DocumentNode } from 'graphql';
2
- import { AxiosInstance } from 'axios';
3
-
4
- interface Config {
5
- credential?: Credential;
6
- secret?: string;
7
- baseUrl: string;
8
- tenantId: string;
9
- signee?: string;
10
- bearerToken?: string;
11
- graphqlPath?: string;
12
- middlewares?: Middleware[];
13
- logger?: (instance: AxiosInstance) => void;
14
- traceId?: string;
15
- axiosConfig?: {
16
- timeout?: number;
17
- headers?: Record<string, string>;
18
- keepAlive?: boolean;
19
- };
20
- }
21
-
22
- interface Credential {
23
- client_secret: string,
24
- grant_type: string,
25
- client_id: string,
26
- username: string,
27
- password: string
28
- }
29
-
30
- interface Middleware {
31
- before?: (command: Command<any, any>) => Promise<void>;
32
- after?: (command: Command<any, any>, response: any) => Promise<void>;
33
- onError?: (command: Command<any, any>, error: Error) => Promise<void>;
34
- }
35
-
36
- interface Command<TInput, TOutput> {
37
- input: TInput;
38
- metadata: {
39
- commandName: string;
40
- path: string;
41
- method: 'GET' | 'POST' | 'PUT' | 'DELETE';
42
- };
43
- execute: (config: Config) => Promise<TOutput | undefined>;
44
- }
45
-
46
- interface GraphQLRequest {
47
- command: string | DocumentNode;
48
- tenantId?: string;
49
- variables?: any;
50
- operationName?: string;
51
- }
52
-
53
- export type { Command as C, GraphQLRequest as G, Middleware as M, Config as a };
@@ -1,53 +0,0 @@
1
- import { DocumentNode } from 'graphql';
2
- import { AxiosInstance } from 'axios';
3
-
4
- interface Config {
5
- credential?: Credential;
6
- secret?: string;
7
- baseUrl: string;
8
- tenantId: string;
9
- signee?: string;
10
- bearerToken?: string;
11
- graphqlPath?: string;
12
- middlewares?: Middleware[];
13
- logger?: (instance: AxiosInstance) => void;
14
- traceId?: string;
15
- axiosConfig?: {
16
- timeout?: number;
17
- headers?: Record<string, string>;
18
- keepAlive?: boolean;
19
- };
20
- }
21
-
22
- interface Credential {
23
- client_secret: string,
24
- grant_type: string,
25
- client_id: string,
26
- username: string,
27
- password: string
28
- }
29
-
30
- interface Middleware {
31
- before?: (command: Command<any, any>) => Promise<void>;
32
- after?: (command: Command<any, any>, response: any) => Promise<void>;
33
- onError?: (command: Command<any, any>, error: Error) => Promise<void>;
34
- }
35
-
36
- interface Command<TInput, TOutput> {
37
- input: TInput;
38
- metadata: {
39
- commandName: string;
40
- path: string;
41
- method: 'GET' | 'POST' | 'PUT' | 'DELETE';
42
- };
43
- execute: (config: Config) => Promise<TOutput | undefined>;
44
- }
45
-
46
- interface GraphQLRequest {
47
- command: string | DocumentNode;
48
- tenantId?: string;
49
- variables?: any;
50
- operationName?: string;
51
- }
52
-
53
- export type { Command as C, GraphQLRequest as G, Middleware as M, Config as a };
@@ -1,209 +0,0 @@
1
- import { C as Command, G as GraphQLRequest } from './config.d-CyK6ZM6s.mjs';
2
-
3
- type PaymentRail = 'ACH' | 'SAMEDAYACH';
4
- type PaymentType = 'CREDIT' | 'DEBIT';
5
- type AccountType = 'CHECKING' | 'SAVINGS';
6
-
7
- interface RawPaymentDetails {
8
- [key: string]: string | number | boolean;
9
- }
10
-
11
- interface ClientIdentifier {
12
- type: string;
13
- value: string;
14
- }
15
-
16
- interface Transfer {
17
- type: string;
18
- paymentType: PaymentRail;
19
- paymentSubType?: string;
20
- currency: string;
21
- fileUrl?: string;
22
- amount: number;
23
- externalId: string;
24
- reference: Array<string>;
25
- rawPaymentDetails?: RawPaymentDetails;
26
- statementDescription?: string;
27
- settlementDate?: string;
28
- errorCode?: string;
29
- errorMessage?: string;
30
- createdAt?: string;
31
- client?: {
32
- id: number,
33
- accountNo: string,
34
- displayName: string,
35
- legalForm: {
36
- code: string,
37
- value: string
38
- },
39
- identifiers: Array<ClientIdentifier>,
40
- ofLoanCycle: number,
41
- ofLoanActive: number,
42
- activeDepositAccount: number
43
- }
44
- }
45
-
46
- interface GetTransferInput {
47
- transferStatus?: string;
48
- executedAt: string;
49
- queryLimit?: number;
50
- paymentType: PaymentRail;
51
- tenantId?: string;
52
- accountType?: string;
53
- }
54
-
55
- type CreateTransferInput = {
56
- type: PaymentType;
57
- fileUrl: string;
58
- paymentType: PaymentRail;
59
- currency: 'USD';
60
- amount: number;
61
- debtor: {
62
- identifier: string;
63
- name: string;
64
- accountType: AccountType;
65
- };
66
- creditor: {
67
- identifier: string;
68
- name: string;
69
- accountType: AccountType;
70
- agent: {
71
- name: string;
72
- identifier: string;
73
- };
74
- };
75
- reference: string[];
76
- };
77
-
78
- interface MarkAsReturnInput {
79
- paymentType: PaymentRail;
80
- externalId: string,
81
- returnFileUrl: string,
82
- errorCode: string,
83
- errorMessage: string,
84
- returnDate?: string,
85
- traceNumbers?: {
86
- incomingReturnFile?: string;
87
- outgoingReturnFile?: string;
88
- },
89
- rawReturnDetails?: RawPaymentDetails;
90
- tenantId?: string;
91
- }
92
-
93
- interface UpdateTraceNumbersInput {
94
- externalId: string;
95
- traceNumbers: {
96
- traceMapping: string,
97
- CoreFileKey?: string,
98
- CoreBatch?: number,
99
- CoreSeq?: number,
100
- },
101
- tenantId?: string
102
- }
103
-
104
- interface ProcessOutput {
105
- id: string;
106
- clientId: number;
107
- resourceId: number;
108
- resourceIdentifier: string;
109
- }
110
-
111
- interface CreateTransferOutput extends ProcessOutput {
112
- data: { amount: number }
113
- }
114
-
115
- interface SimpleCard {
116
- internalCardId: string,
117
- cardType?: string,
118
- tenantIdentifier?: string,
119
- status?: string
120
- }
121
-
122
- interface AuthorizationRequest {
123
- card: SimpleCard,
124
- payload: any,
125
- tenantId?: string,
126
- skipNotification?: boolean,
127
- flag?: string
128
- }
129
-
130
- interface CardUpdate {
131
- clientId: number,
132
- businessCardIDURL: string,
133
- businessCardIDQRCode: string
134
- tenantId?: string
135
- }
136
-
137
- declare const SendAuthorizationToCore: (params: AuthorizationRequest) => Command<AuthorizationRequest, any>;
138
- declare const UpdateCardID: (params: CardUpdate) => Command<CardUpdate, void>;
139
-
140
- interface ClientData {
141
- id: number;
142
- accountNo: string;
143
- displayName: string;
144
- legalForm: {
145
- code: string;
146
- value: string;
147
- };
148
- [key: string]: string | number | boolean | object;
149
- }
150
- interface RiskRatingData {
151
- riskScore: number;
152
- rating: string;
153
- [key: string]: string | number | boolean;
154
- }
155
- interface ClientAddressData {
156
- street: string;
157
- city: string;
158
- state: string;
159
- zipCode: string;
160
- [key: string]: string | number | boolean;
161
- }
162
- interface ClientIdentifierData {
163
- type: string;
164
- value: string;
165
- [key: string]: string | number | boolean;
166
- }
167
- interface ClientResponse {
168
- clientData?: ClientData;
169
- riskRatingData?: RiskRatingData;
170
- clientAddressData?: ClientAddressData;
171
- clientIdentifierData?: ClientIdentifierData;
172
- }
173
- declare const GetClientData: (params: {
174
- clientId: number;
175
- tenantId?: string;
176
- riskRating?: boolean;
177
- clientAddress?: boolean;
178
- clientIdentifier?: boolean;
179
- }) => Command<{
180
- clientId: number;
181
- tenantId?: string;
182
- riskRating?: boolean;
183
- clientAddress?: boolean;
184
- clientIdentifier?: boolean;
185
- }, ClientResponse>;
186
- declare const UpdateClient: (params: {
187
- tenantId?: string;
188
- clientId: number;
189
- updates: object;
190
- }) => Command<{
191
- tenantId?: string;
192
- clientId: number;
193
- updates: object;
194
- }, ProcessOutput>;
195
- declare const UpdateClientIdentifier: (params: {
196
- tenantId?: string;
197
- clientId: number;
198
- identifierId: string;
199
- updates: object;
200
- }) => Command<{
201
- tenantId?: string;
202
- clientId: number;
203
- identifierId: string;
204
- updates: object;
205
- }, ProcessOutput>;
206
-
207
- declare const GraphQL: (request: GraphQLRequest) => Command<GraphQLRequest, any>;
208
-
209
- export { type CreateTransferInput as C, GetClientData as G, type MarkAsReturnInput as M, type PaymentRail as P, SendAuthorizationToCore as S, type Transfer as T, UpdateCardID as U, UpdateClient as a, UpdateClientIdentifier as b, GraphQL as c, type ProcessOutput as d, type GetTransferInput as e, type UpdateTraceNumbersInput as f, type CreateTransferOutput as g };