@mbanq/core-sdk-js 0.1.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.
@@ -0,0 +1,209 @@
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 };
@@ -0,0 +1,209 @@
1
+ import { C as Command, G as GraphQLRequest } from './config.d-CyK6ZM6s.js';
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 };