@lucianpacurar/iso20022.js 0.2.7
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/LICENSE +21 -0
- package/README.md +212 -0
- package/dist/index.d.ts +1896 -0
- package/dist/index.js +10039 -0
- package/dist/index.mjs +10023 -0
- package/dist/src/camt/003/cash-management-get-account.d.ts +26 -0
- package/dist/src/camt/004/cash-management-return-account.d.ts +30 -0
- package/dist/src/camt/005/cash-management-get-transaction.d.ts +26 -0
- package/dist/src/camt/006/cash-management-return-transaction.d.ts +43 -0
- package/dist/src/camt/053/cash-management-end-of-day-report.d.ts +90 -0
- package/dist/src/camt/index.d.ts +5 -0
- package/dist/src/camt/types.d.ts +191 -0
- package/dist/src/camt/utils.d.ts +12 -0
- package/dist/src/errors.d.ts +24 -0
- package/dist/src/index.d.ts +61 -0
- package/dist/src/iso20022.d.ts +375 -0
- package/dist/src/lib/countries.d.ts +254 -0
- package/dist/src/lib/currencies.d.ts +1 -0
- package/dist/src/lib/index.d.ts +4 -0
- package/dist/src/lib/interfaces.d.ts +30 -0
- package/dist/src/lib/types.d.ts +376 -0
- package/dist/src/pain/001/ach-credit-payment-initiation.d.ts +159 -0
- package/dist/src/pain/001/payment-initiation.d.ts +105 -0
- package/dist/src/pain/001/rtp-credit-payment-initiation.d.ts +118 -0
- package/dist/src/pain/001/sepa-credit-payment-initiation.d.ts +126 -0
- package/dist/src/pain/001/swift-credit-payment-initiation.d.ts +72 -0
- package/dist/src/pain/002/payment-status-report.d.ts +75 -0
- package/dist/src/pain/002/types.d.ts +73 -0
- package/dist/src/pain/002/utils.d.ts +4 -0
- package/dist/src/parseUtils.d.ts +21 -0
- package/dist/src/utils/format.d.ts +1 -0
- package/dist/test/camt/003/cash-management-get-account.test.d.ts +1 -0
- package/dist/test/camt/004/cash-management-return-account.test.d.ts +1 -0
- package/dist/test/camt/005/cash-management-get-transaction.test.d.ts +1 -0
- package/dist/test/camt/006/cash-management-return-transaction.test.d.ts +1 -0
- package/dist/test/camt/053/cash-management-end-of-day-report.test.d.ts +1 -0
- package/dist/test/pain/001/ach-credit-payment-initiation.test.d.ts +1 -0
- package/dist/test/pain/001/rtp-credit-payment-initiation.test.d.ts +1 -0
- package/dist/test/pain/001/sepa-credit-payment-initiation.test.d.ts +1 -0
- package/dist/test/pain/001/swift-credit-payment-initiation.test.d.ts +1 -0
- package/dist/test/pain/002/payment-status-report.test.d.ts +1 -0
- package/dist/test/parseUtils.test.d.ts +1 -0
- package/package.json +82 -0
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
import { Party, SWIFTCreditPaymentInstruction, SEPACreditPaymentInstruction, RTPCreditPaymentInstruction, ACHCreditPaymentInstruction } from './lib/types.js';
|
|
2
|
+
import { SWIFTCreditPaymentInitiation } from './pain/001/swift-credit-payment-initiation';
|
|
3
|
+
import { SEPACreditPaymentInitiation } from './pain/001/sepa-credit-payment-initiation';
|
|
4
|
+
import { RTPCreditPaymentInitiation } from './pain/001/rtp-credit-payment-initiation';
|
|
5
|
+
import { ACHCreditPaymentInitiation } from './pain/001/ach-credit-payment-initiation';
|
|
6
|
+
import { GenericISO20022Message, ISO20022MessageTypeName } from './lib/interfaces';
|
|
7
|
+
export * from './camt';
|
|
8
|
+
export * from './lib';
|
|
9
|
+
type AtLeastOne<T> = [T, ...T[]];
|
|
10
|
+
/**
|
|
11
|
+
* Configuration interface for the ISO20022 class.
|
|
12
|
+
* @interface ISO20022Config
|
|
13
|
+
* @example
|
|
14
|
+
* const config: ISO20022Config = {
|
|
15
|
+
* initiatingParty: {
|
|
16
|
+
* name: 'Example Corp',
|
|
17
|
+
* id: 'EXAMPLECORP',
|
|
18
|
+
* account: {
|
|
19
|
+
* accountNumber: '123456789',
|
|
20
|
+
* },
|
|
21
|
+
* agent: {
|
|
22
|
+
* bic: 'CHASUS33',
|
|
23
|
+
* bankAddress: {
|
|
24
|
+
* country: 'US',
|
|
25
|
+
* },
|
|
26
|
+
* },
|
|
27
|
+
* },
|
|
28
|
+
* };
|
|
29
|
+
*/
|
|
30
|
+
export interface ISO20022Config {
|
|
31
|
+
/**
|
|
32
|
+
* The party initiating the ISO20022 messages.
|
|
33
|
+
* This party is typically the sender of the messages or the entity responsible for the transaction.
|
|
34
|
+
* @type {Party}
|
|
35
|
+
*/
|
|
36
|
+
initiatingParty: Party;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Configuration interface for SWIFT Credit Payment Initiation.
|
|
40
|
+
* @interface SWIFTCreditPaymentInitiationConfig
|
|
41
|
+
* @example
|
|
42
|
+
* const config: SWIFTCreditPaymentInitiationConfig = {
|
|
43
|
+
* paymentInstructions: [
|
|
44
|
+
* {
|
|
45
|
+
* type: 'swift',
|
|
46
|
+
* direction: 'credit',
|
|
47
|
+
* amount: 1000,
|
|
48
|
+
* currency: 'USD',
|
|
49
|
+
* creditor: {
|
|
50
|
+
* name: 'Hans Schneider',
|
|
51
|
+
* account: {
|
|
52
|
+
* iban: 'DE1234567890123456',
|
|
53
|
+
* },
|
|
54
|
+
* agent: {
|
|
55
|
+
* bic: 'DEUTDEFF',
|
|
56
|
+
* bankAddress: {
|
|
57
|
+
* country: 'DE',
|
|
58
|
+
* },
|
|
59
|
+
* },
|
|
60
|
+
* address: {
|
|
61
|
+
* streetName: 'Hauptstraße',
|
|
62
|
+
* buildingNumber: '42',
|
|
63
|
+
* postalCode: '10115',
|
|
64
|
+
* townName: 'Berlin',
|
|
65
|
+
* country: 'DE',
|
|
66
|
+
* },
|
|
67
|
+
* },
|
|
68
|
+
* remittanceInformation: 'Invoice payment #123',
|
|
69
|
+
* },
|
|
70
|
+
* ],
|
|
71
|
+
* messageId: 'MSGID123', // Optional
|
|
72
|
+
* creationDate: new Date(), // Optional
|
|
73
|
+
* };
|
|
74
|
+
*/
|
|
75
|
+
export interface SWIFTCreditPaymentInitiationConfig {
|
|
76
|
+
/**
|
|
77
|
+
* An array of payment instructions.
|
|
78
|
+
* @type {AtLeastOne<SWIFTCreditPaymentInstruction>}
|
|
79
|
+
*/
|
|
80
|
+
paymentInstructions: AtLeastOne<SWIFTCreditPaymentInstruction>;
|
|
81
|
+
/**
|
|
82
|
+
* Optional unique identifier for the message. If not provided, a UUID will be generated.
|
|
83
|
+
* @type {string}
|
|
84
|
+
*/
|
|
85
|
+
messageId?: string;
|
|
86
|
+
/**
|
|
87
|
+
* Optional creation date for the message. If not provided, current date will be used.
|
|
88
|
+
* @type {Date}
|
|
89
|
+
*/
|
|
90
|
+
creationDate?: Date;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Configuration interface for SEPA Credit Payment Initiation.
|
|
94
|
+
* @interface SEPACreditPaymentInitiationConfig
|
|
95
|
+
* @example
|
|
96
|
+
* const config: SEPACreditPaymentInitiationConfig = {
|
|
97
|
+
* paymentInstructions: [
|
|
98
|
+
* {
|
|
99
|
+
* type: 'sepa',
|
|
100
|
+
* direction: 'credit',
|
|
101
|
+
* amount: 1000, // €10.00 Euros
|
|
102
|
+
* currency: 'EUR',
|
|
103
|
+
* creditor: {
|
|
104
|
+
* name: 'Hans Schneider',
|
|
105
|
+
* account: {
|
|
106
|
+
* iban: 'DE1234567890123456',
|
|
107
|
+
* },
|
|
108
|
+
* },
|
|
109
|
+
* remittanceInformation: 'Invoice payment #123',
|
|
110
|
+
* },
|
|
111
|
+
* ],
|
|
112
|
+
* messageId: 'MSGID123', // Optional
|
|
113
|
+
* creationDate: new Date(), // Optional
|
|
114
|
+
* };
|
|
115
|
+
*/
|
|
116
|
+
export interface SEPACreditPaymentInitiationConfig {
|
|
117
|
+
/**
|
|
118
|
+
* An array of payment instructions.
|
|
119
|
+
* @type {AtLeastOne<SEPACreditPaymentInstruction>}
|
|
120
|
+
*/
|
|
121
|
+
paymentInstructions: AtLeastOne<SEPACreditPaymentInstruction>;
|
|
122
|
+
/**
|
|
123
|
+
* Optional unique identifier for the message. If not provided, a UUID will be generated.
|
|
124
|
+
* @type {string}
|
|
125
|
+
*/
|
|
126
|
+
messageId?: string;
|
|
127
|
+
/**
|
|
128
|
+
* Optional creation date for the message. If not provided, current date will be used.
|
|
129
|
+
* @type {Date}
|
|
130
|
+
*/
|
|
131
|
+
creationDate?: Date;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Configuration interface for RTP Credit Payment Initiation.
|
|
135
|
+
* @interface RTPCreditPaymentInitiationConfig
|
|
136
|
+
* @example
|
|
137
|
+
* const config: RTPCreditPaymentInitiationConfig = {
|
|
138
|
+
* paymentInstructions: [
|
|
139
|
+
* {
|
|
140
|
+
* type: 'rtp',
|
|
141
|
+
* direction: 'credit',
|
|
142
|
+
* amount: 100000, // $1000.00
|
|
143
|
+
* currency: 'USD',
|
|
144
|
+
* creditor: {
|
|
145
|
+
* name: 'All-American Dogs Co.',
|
|
146
|
+
* account: {
|
|
147
|
+
* accountNumber: '123456789012',
|
|
148
|
+
* },
|
|
149
|
+
* agent: {
|
|
150
|
+
* abaRoutingNumber: '37714568112',
|
|
151
|
+
* },
|
|
152
|
+
* },
|
|
153
|
+
* remittanceInformation: '1000 Hot Dogs Feb26',
|
|
154
|
+
* },
|
|
155
|
+
* ],
|
|
156
|
+
* messageId: 'MSGID123', // Optional
|
|
157
|
+
* creationDate: new Date(), // Optional
|
|
158
|
+
* };
|
|
159
|
+
*/
|
|
160
|
+
export interface RTPCreditPaymentInitiationConfig {
|
|
161
|
+
/**
|
|
162
|
+
* An array of payment instructions.
|
|
163
|
+
* @type {AtLeastOne<RTPCreditPaymentInstruction>}
|
|
164
|
+
*/
|
|
165
|
+
paymentInstructions: AtLeastOne<RTPCreditPaymentInstruction>;
|
|
166
|
+
/**
|
|
167
|
+
* Optional unique identifier for the message. If not provided, a UUID will be generated.
|
|
168
|
+
* @type {string}
|
|
169
|
+
*/
|
|
170
|
+
messageId?: string;
|
|
171
|
+
/**
|
|
172
|
+
* Optional creation date for the message. If not provided, current date will be used.
|
|
173
|
+
* @type {Date}
|
|
174
|
+
*/
|
|
175
|
+
creationDate?: Date;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Configuration interface for ACH Credit Payment Initiation.
|
|
179
|
+
* @interface ACHCreditPaymentInitiationConfig
|
|
180
|
+
* @example
|
|
181
|
+
* const config: ACHCreditPaymentInitiationConfig = {
|
|
182
|
+
* paymentInstructions: [
|
|
183
|
+
* {
|
|
184
|
+
* type: 'ach',
|
|
185
|
+
* direction: 'credit',
|
|
186
|
+
* amount: 100000, // $1000.00
|
|
187
|
+
* currency: 'USD',
|
|
188
|
+
* creditor: {
|
|
189
|
+
* name: 'John Doe Funding LLC',
|
|
190
|
+
* account: {
|
|
191
|
+
* accountNumber: '123456789012',
|
|
192
|
+
* },
|
|
193
|
+
* agent: {
|
|
194
|
+
* abaRoutingNumber: '123456789',
|
|
195
|
+
* },
|
|
196
|
+
* },
|
|
197
|
+
* remittanceInformation: 'Invoice #12345',
|
|
198
|
+
* },
|
|
199
|
+
* ],
|
|
200
|
+
* messageId: 'MSGID123', // Optional
|
|
201
|
+
* creationDate: new Date(), // Optional
|
|
202
|
+
* };
|
|
203
|
+
*/
|
|
204
|
+
export interface ACHCreditPaymentInitiationConfig {
|
|
205
|
+
/**
|
|
206
|
+
* An array of payment instructions.
|
|
207
|
+
* @type {AtLeastOne<ACHCreditPaymentInstruction>}
|
|
208
|
+
*/
|
|
209
|
+
paymentInstructions: AtLeastOne<ACHCreditPaymentInstruction>;
|
|
210
|
+
/**
|
|
211
|
+
* Optional unique identifier for the message. If not provided, a UUID will be generated.
|
|
212
|
+
* @type {string}
|
|
213
|
+
*/
|
|
214
|
+
messageId?: string;
|
|
215
|
+
/**
|
|
216
|
+
* Optional creation date for the message. If not provided, current date will be used.
|
|
217
|
+
* @type {Date}
|
|
218
|
+
*/
|
|
219
|
+
creationDate?: Date;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Represents an ISO20022 core message creator.
|
|
223
|
+
* This class provides methods to create various basic ISO20022 compliant messages.
|
|
224
|
+
*
|
|
225
|
+
* @example
|
|
226
|
+
* const iso20022 = new ISO20022({
|
|
227
|
+
* initiatingParty: {
|
|
228
|
+
* name: 'Example Corp',
|
|
229
|
+
* id: 'EXAMPLECORP',
|
|
230
|
+
* account: {
|
|
231
|
+
* accountNumber: '123456789',
|
|
232
|
+
* },
|
|
233
|
+
* agent: {
|
|
234
|
+
* bic: 'CHASUS33',
|
|
235
|
+
* bankAddress: {
|
|
236
|
+
* country: 'US',
|
|
237
|
+
* },
|
|
238
|
+
* },
|
|
239
|
+
* },
|
|
240
|
+
* });
|
|
241
|
+
*/
|
|
242
|
+
declare class ISO20022 {
|
|
243
|
+
private initiatingParty;
|
|
244
|
+
/**
|
|
245
|
+
* Creates an instance of ISO20022.
|
|
246
|
+
* @param {ISO20022Config} config - The configuration object for ISO20022.
|
|
247
|
+
*/
|
|
248
|
+
constructor(config: ISO20022Config);
|
|
249
|
+
/**
|
|
250
|
+
* Creates a SWIFT Credit Payment Initiation message.
|
|
251
|
+
* @param {SWIFTCreditPaymentInitiationConfig} config - Configuration containing payment instructions and optional parameters.
|
|
252
|
+
* @example
|
|
253
|
+
* const payment = iso20022.createSWIFTCreditPaymentInitiation({
|
|
254
|
+
* paymentInstructions: [
|
|
255
|
+
* {
|
|
256
|
+
* type: 'swift',
|
|
257
|
+
* direction: 'credit',
|
|
258
|
+
* amount: 1000,
|
|
259
|
+
* currency: 'USD',
|
|
260
|
+
* creditor: {
|
|
261
|
+
* name: 'Hans Schneider',
|
|
262
|
+
* account: {
|
|
263
|
+
* iban: 'DE1234567890123456',
|
|
264
|
+
* },
|
|
265
|
+
* agent: {
|
|
266
|
+
* bic: 'DEUTDEFF',
|
|
267
|
+
* bankAddress: {
|
|
268
|
+
* country: 'DE',
|
|
269
|
+
* },
|
|
270
|
+
* },
|
|
271
|
+
* address: {
|
|
272
|
+
* streetName: 'Hauptstraße',
|
|
273
|
+
* buildingNumber: '42',
|
|
274
|
+
* postalCode: '10115',
|
|
275
|
+
* townName: 'Berlin',
|
|
276
|
+
* country: 'DE',
|
|
277
|
+
* },
|
|
278
|
+
* },
|
|
279
|
+
* remittanceInformation: 'Invoice payment #123',
|
|
280
|
+
* },
|
|
281
|
+
* ],
|
|
282
|
+
* messageId: 'SWIFT-MSG-001', // Optional
|
|
283
|
+
* creationDate: new Date('2025-03-01'), // Optional
|
|
284
|
+
* });
|
|
285
|
+
* @returns {SWIFTCreditPaymentInitiation} A new SWIFT Credit Payment Initiation object.
|
|
286
|
+
*/
|
|
287
|
+
createSWIFTCreditPaymentInitiation(config: SWIFTCreditPaymentInitiationConfig): SWIFTCreditPaymentInitiation;
|
|
288
|
+
/**
|
|
289
|
+
* Creates a SEPA Credit Payment Initiation message.
|
|
290
|
+
* @param {SEPACreditPaymentInitiationConfig} config - Configuration containing payment instructions and optional parameters.
|
|
291
|
+
* @example
|
|
292
|
+
* const payment = iso20022.createSEPACreditPaymentInitiation({
|
|
293
|
+
* paymentInstructions: [
|
|
294
|
+
* {
|
|
295
|
+
* type: 'sepa',
|
|
296
|
+
* direction: 'credit',
|
|
297
|
+
* amount: 1000, // €10.00 Euros
|
|
298
|
+
* currency: 'EUR',
|
|
299
|
+
* creditor: {
|
|
300
|
+
* name: 'Hans Schneider',
|
|
301
|
+
* account: {
|
|
302
|
+
* iban: 'DE1234567890123456',
|
|
303
|
+
* },
|
|
304
|
+
* },
|
|
305
|
+
* remittanceInformation: 'Invoice payment #123',
|
|
306
|
+
* },
|
|
307
|
+
* ],
|
|
308
|
+
* messageId: 'SEPA-MSG-001', // Optional
|
|
309
|
+
* creationDate: new Date('2025-03-01'), // Optional
|
|
310
|
+
* });
|
|
311
|
+
* @returns {SEPACreditPaymentInitiation} A new SEPA Credit Payment Initiation object.
|
|
312
|
+
*/
|
|
313
|
+
createSEPACreditPaymentInitiation(config: SEPACreditPaymentInitiationConfig): SEPACreditPaymentInitiation;
|
|
314
|
+
/**
|
|
315
|
+
* Creates a RTP Credit Payment Initiation message.
|
|
316
|
+
* @param {RTPCreditPaymentInitiationConfig} config - Configuration containing payment instructions and optional parameters.
|
|
317
|
+
* @example
|
|
318
|
+
* const payment = iso20022.createRTPCreditPaymentInitiation({
|
|
319
|
+
* paymentInstructions: [
|
|
320
|
+
* {
|
|
321
|
+
* type: 'rtp',
|
|
322
|
+
* direction: 'credit',
|
|
323
|
+
* amount: 100000, // $1000.00
|
|
324
|
+
* currency: 'USD',
|
|
325
|
+
* creditor: {
|
|
326
|
+
* name: 'All-American Dogs Co.',
|
|
327
|
+
* account: {
|
|
328
|
+
* accountNumber: '123456789012',
|
|
329
|
+
* },
|
|
330
|
+
* agent: {
|
|
331
|
+
* abaRoutingNumber: '37714568112',
|
|
332
|
+
* },
|
|
333
|
+
* },
|
|
334
|
+
* remittanceInformation: '1000 Hot Dogs Feb26',
|
|
335
|
+
* },
|
|
336
|
+
* ],
|
|
337
|
+
* messageId: 'RTP-MSG-001', // Optional
|
|
338
|
+
* creationDate: new Date('2025-03-01'), // Optional
|
|
339
|
+
* });
|
|
340
|
+
* @returns {RTPCreditPaymentInitiation} A new RTP Credit Payment Initiation object.
|
|
341
|
+
*/
|
|
342
|
+
createRTPCreditPaymentInitiation(config: RTPCreditPaymentInitiationConfig): RTPCreditPaymentInitiation;
|
|
343
|
+
/**
|
|
344
|
+
* Creates an ACH Credit Payment Initiation message.
|
|
345
|
+
* @param {ACHCreditPaymentInitiationConfig} config - Configuration containing payment instructions and optional parameters.
|
|
346
|
+
* @example
|
|
347
|
+
* const payment = iso20022.createACHCreditPaymentInitiation({
|
|
348
|
+
* paymentInstructions: [
|
|
349
|
+
* {
|
|
350
|
+
* type: 'ach',
|
|
351
|
+
* direction: 'credit',
|
|
352
|
+
* amount: 100000, // $1000.00
|
|
353
|
+
* currency: 'USD',
|
|
354
|
+
* creditor: {
|
|
355
|
+
* name: 'John Doe Funding LLC',
|
|
356
|
+
* account: {
|
|
357
|
+
* accountNumber: '123456789012',
|
|
358
|
+
* },
|
|
359
|
+
* agent: {
|
|
360
|
+
* abaRoutingNumber: '123456789',
|
|
361
|
+
* },
|
|
362
|
+
* },
|
|
363
|
+
* remittanceInformation: 'Invoice #12345',
|
|
364
|
+
* },
|
|
365
|
+
* ],
|
|
366
|
+
* messageId: 'ACH-MSG-001', // Optional
|
|
367
|
+
* creationDate: new Date('2025-03-01'), // Optional
|
|
368
|
+
* });
|
|
369
|
+
* @returns {ACHCreditPaymentInitiation} A new ACH Credit Payment Initiation object.
|
|
370
|
+
*/
|
|
371
|
+
createACHCreditPaymentInitiation(config: ACHCreditPaymentInitiationConfig): ACHCreditPaymentInitiation;
|
|
372
|
+
/** Create a message CAMT or other */
|
|
373
|
+
createMessage(type: ISO20022MessageTypeName, config: any): GenericISO20022Message;
|
|
374
|
+
}
|
|
375
|
+
export default ISO20022;
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
declare const Alpha2CountryCode: {
|
|
2
|
+
readonly AF: "AF";
|
|
3
|
+
readonly AL: "AL";
|
|
4
|
+
readonly DZ: "DZ";
|
|
5
|
+
readonly AS: "AS";
|
|
6
|
+
readonly AD: "AD";
|
|
7
|
+
readonly AO: "AO";
|
|
8
|
+
readonly AI: "AI";
|
|
9
|
+
readonly AQ: "AQ";
|
|
10
|
+
readonly AG: "AG";
|
|
11
|
+
readonly AR: "AR";
|
|
12
|
+
readonly AM: "AM";
|
|
13
|
+
readonly AW: "AW";
|
|
14
|
+
readonly AU: "AU";
|
|
15
|
+
readonly AT: "AT";
|
|
16
|
+
readonly AZ: "AZ";
|
|
17
|
+
readonly BS: "BS";
|
|
18
|
+
readonly BH: "BH";
|
|
19
|
+
readonly BD: "BD";
|
|
20
|
+
readonly BB: "BB";
|
|
21
|
+
readonly BY: "BY";
|
|
22
|
+
readonly BE: "BE";
|
|
23
|
+
readonly BZ: "BZ";
|
|
24
|
+
readonly BJ: "BJ";
|
|
25
|
+
readonly BM: "BM";
|
|
26
|
+
readonly BT: "BT";
|
|
27
|
+
readonly BO: "BO";
|
|
28
|
+
readonly BA: "BA";
|
|
29
|
+
readonly BW: "BW";
|
|
30
|
+
readonly BV: "BV";
|
|
31
|
+
readonly BR: "BR";
|
|
32
|
+
readonly IO: "IO";
|
|
33
|
+
readonly BN: "BN";
|
|
34
|
+
readonly BG: "BG";
|
|
35
|
+
readonly BF: "BF";
|
|
36
|
+
readonly BI: "BI";
|
|
37
|
+
readonly KH: "KH";
|
|
38
|
+
readonly CM: "CM";
|
|
39
|
+
readonly CA: "CA";
|
|
40
|
+
readonly CV: "CV";
|
|
41
|
+
readonly KY: "KY";
|
|
42
|
+
readonly CF: "CF";
|
|
43
|
+
readonly TD: "TD";
|
|
44
|
+
readonly CL: "CL";
|
|
45
|
+
readonly CN: "CN";
|
|
46
|
+
readonly CX: "CX";
|
|
47
|
+
readonly CC: "CC";
|
|
48
|
+
readonly CO: "CO";
|
|
49
|
+
readonly KM: "KM";
|
|
50
|
+
readonly CG: "CG";
|
|
51
|
+
readonly CD: "CD";
|
|
52
|
+
readonly CK: "CK";
|
|
53
|
+
readonly CR: "CR";
|
|
54
|
+
readonly CI: "CI";
|
|
55
|
+
readonly HR: "HR";
|
|
56
|
+
readonly CU: "CU";
|
|
57
|
+
readonly CY: "CY";
|
|
58
|
+
readonly CZ: "CZ";
|
|
59
|
+
readonly DK: "DK";
|
|
60
|
+
readonly DJ: "DJ";
|
|
61
|
+
readonly DM: "DM";
|
|
62
|
+
readonly DO: "DO";
|
|
63
|
+
readonly EC: "EC";
|
|
64
|
+
readonly EG: "EG";
|
|
65
|
+
readonly SV: "SV";
|
|
66
|
+
readonly GQ: "GQ";
|
|
67
|
+
readonly ER: "ER";
|
|
68
|
+
readonly EE: "EE";
|
|
69
|
+
readonly ET: "ET";
|
|
70
|
+
readonly FK: "FK";
|
|
71
|
+
readonly FO: "FO";
|
|
72
|
+
readonly FJ: "FJ";
|
|
73
|
+
readonly FI: "FI";
|
|
74
|
+
readonly FR: "FR";
|
|
75
|
+
readonly GF: "GF";
|
|
76
|
+
readonly PF: "PF";
|
|
77
|
+
readonly TF: "TF";
|
|
78
|
+
readonly GA: "GA";
|
|
79
|
+
readonly GM: "GM";
|
|
80
|
+
readonly GE: "GE";
|
|
81
|
+
readonly DE: "DE";
|
|
82
|
+
readonly GH: "GH";
|
|
83
|
+
readonly GI: "GI";
|
|
84
|
+
readonly GR: "GR";
|
|
85
|
+
readonly GL: "GL";
|
|
86
|
+
readonly GD: "GD";
|
|
87
|
+
readonly GP: "GP";
|
|
88
|
+
readonly GU: "GU";
|
|
89
|
+
readonly GT: "GT";
|
|
90
|
+
readonly GN: "GN";
|
|
91
|
+
readonly GW: "GW";
|
|
92
|
+
readonly GY: "GY";
|
|
93
|
+
readonly HT: "HT";
|
|
94
|
+
readonly HM: "HM";
|
|
95
|
+
readonly VA: "VA";
|
|
96
|
+
readonly HN: "HN";
|
|
97
|
+
readonly HK: "HK";
|
|
98
|
+
readonly HU: "HU";
|
|
99
|
+
readonly IS: "IS";
|
|
100
|
+
readonly IN: "IN";
|
|
101
|
+
readonly ID: "ID";
|
|
102
|
+
readonly IR: "IR";
|
|
103
|
+
readonly IQ: "IQ";
|
|
104
|
+
readonly IE: "IE";
|
|
105
|
+
readonly IL: "IL";
|
|
106
|
+
readonly IT: "IT";
|
|
107
|
+
readonly JM: "JM";
|
|
108
|
+
readonly JP: "JP";
|
|
109
|
+
readonly JO: "JO";
|
|
110
|
+
readonly KZ: "KZ";
|
|
111
|
+
readonly KE: "KE";
|
|
112
|
+
readonly KI: "KI";
|
|
113
|
+
readonly KP: "KP";
|
|
114
|
+
readonly KR: "KR";
|
|
115
|
+
readonly KW: "KW";
|
|
116
|
+
readonly KG: "KG";
|
|
117
|
+
readonly LA: "LA";
|
|
118
|
+
readonly LV: "LV";
|
|
119
|
+
readonly LB: "LB";
|
|
120
|
+
readonly LS: "LS";
|
|
121
|
+
readonly LR: "LR";
|
|
122
|
+
readonly LY: "LY";
|
|
123
|
+
readonly LI: "LI";
|
|
124
|
+
readonly LT: "LT";
|
|
125
|
+
readonly LU: "LU";
|
|
126
|
+
readonly MO: "MO";
|
|
127
|
+
readonly MG: "MG";
|
|
128
|
+
readonly MW: "MW";
|
|
129
|
+
readonly MY: "MY";
|
|
130
|
+
readonly MV: "MV";
|
|
131
|
+
readonly ML: "ML";
|
|
132
|
+
readonly MT: "MT";
|
|
133
|
+
readonly MH: "MH";
|
|
134
|
+
readonly MQ: "MQ";
|
|
135
|
+
readonly MR: "MR";
|
|
136
|
+
readonly MU: "MU";
|
|
137
|
+
readonly YT: "YT";
|
|
138
|
+
readonly MX: "MX";
|
|
139
|
+
readonly FM: "FM";
|
|
140
|
+
readonly MD: "MD";
|
|
141
|
+
readonly MC: "MC";
|
|
142
|
+
readonly MN: "MN";
|
|
143
|
+
readonly MS: "MS";
|
|
144
|
+
readonly MA: "MA";
|
|
145
|
+
readonly MZ: "MZ";
|
|
146
|
+
readonly MM: "MM";
|
|
147
|
+
readonly NA: "NA";
|
|
148
|
+
readonly NR: "NR";
|
|
149
|
+
readonly NP: "NP";
|
|
150
|
+
readonly NL: "NL";
|
|
151
|
+
readonly NC: "NC";
|
|
152
|
+
readonly NZ: "NZ";
|
|
153
|
+
readonly NI: "NI";
|
|
154
|
+
readonly NE: "NE";
|
|
155
|
+
readonly NG: "NG";
|
|
156
|
+
readonly NU: "NU";
|
|
157
|
+
readonly NF: "NF";
|
|
158
|
+
readonly MK: "MK";
|
|
159
|
+
readonly MP: "MP";
|
|
160
|
+
readonly NO: "NO";
|
|
161
|
+
readonly OM: "OM";
|
|
162
|
+
readonly PK: "PK";
|
|
163
|
+
readonly PW: "PW";
|
|
164
|
+
readonly PS: "PS";
|
|
165
|
+
readonly PA: "PA";
|
|
166
|
+
readonly PG: "PG";
|
|
167
|
+
readonly PY: "PY";
|
|
168
|
+
readonly PE: "PE";
|
|
169
|
+
readonly PH: "PH";
|
|
170
|
+
readonly PN: "PN";
|
|
171
|
+
readonly PL: "PL";
|
|
172
|
+
readonly PT: "PT";
|
|
173
|
+
readonly PR: "PR";
|
|
174
|
+
readonly QA: "QA";
|
|
175
|
+
readonly RE: "RE";
|
|
176
|
+
readonly RO: "RO";
|
|
177
|
+
readonly RU: "RU";
|
|
178
|
+
readonly RW: "RW";
|
|
179
|
+
readonly SH: "SH";
|
|
180
|
+
readonly KN: "KN";
|
|
181
|
+
readonly LC: "LC";
|
|
182
|
+
readonly PM: "PM";
|
|
183
|
+
readonly VC: "VC";
|
|
184
|
+
readonly WS: "WS";
|
|
185
|
+
readonly SM: "SM";
|
|
186
|
+
readonly ST: "ST";
|
|
187
|
+
readonly SA: "SA";
|
|
188
|
+
readonly SN: "SN";
|
|
189
|
+
readonly SC: "SC";
|
|
190
|
+
readonly SL: "SL";
|
|
191
|
+
readonly SG: "SG";
|
|
192
|
+
readonly SK: "SK";
|
|
193
|
+
readonly SI: "SI";
|
|
194
|
+
readonly SB: "SB";
|
|
195
|
+
readonly SO: "SO";
|
|
196
|
+
readonly ZA: "ZA";
|
|
197
|
+
readonly GS: "GS";
|
|
198
|
+
readonly ES: "ES";
|
|
199
|
+
readonly LK: "LK";
|
|
200
|
+
readonly SD: "SD";
|
|
201
|
+
readonly SR: "SR";
|
|
202
|
+
readonly SJ: "SJ";
|
|
203
|
+
readonly SZ: "SZ";
|
|
204
|
+
readonly SE: "SE";
|
|
205
|
+
readonly CH: "CH";
|
|
206
|
+
readonly SY: "SY";
|
|
207
|
+
readonly TW: "TW";
|
|
208
|
+
readonly TJ: "TJ";
|
|
209
|
+
readonly TZ: "TZ";
|
|
210
|
+
readonly TH: "TH";
|
|
211
|
+
readonly TL: "TL";
|
|
212
|
+
readonly TG: "TG";
|
|
213
|
+
readonly TK: "TK";
|
|
214
|
+
readonly TO: "TO";
|
|
215
|
+
readonly TT: "TT";
|
|
216
|
+
readonly TN: "TN";
|
|
217
|
+
readonly TR: "TR";
|
|
218
|
+
readonly TM: "TM";
|
|
219
|
+
readonly TC: "TC";
|
|
220
|
+
readonly TV: "TV";
|
|
221
|
+
readonly UG: "UG";
|
|
222
|
+
readonly UA: "UA";
|
|
223
|
+
readonly AE: "AE";
|
|
224
|
+
readonly GB: "GB";
|
|
225
|
+
readonly US: "US";
|
|
226
|
+
readonly UM: "UM";
|
|
227
|
+
readonly UY: "UY";
|
|
228
|
+
readonly UZ: "UZ";
|
|
229
|
+
readonly VU: "VU";
|
|
230
|
+
readonly VE: "VE";
|
|
231
|
+
readonly VN: "VN";
|
|
232
|
+
readonly VG: "VG";
|
|
233
|
+
readonly VI: "VI";
|
|
234
|
+
readonly WF: "WF";
|
|
235
|
+
readonly EH: "EH";
|
|
236
|
+
readonly YE: "YE";
|
|
237
|
+
readonly ZM: "ZM";
|
|
238
|
+
readonly ZW: "ZW";
|
|
239
|
+
readonly AX: "AX";
|
|
240
|
+
readonly BQ: "BQ";
|
|
241
|
+
readonly CW: "CW";
|
|
242
|
+
readonly GG: "GG";
|
|
243
|
+
readonly IM: "IM";
|
|
244
|
+
readonly JE: "JE";
|
|
245
|
+
readonly ME: "ME";
|
|
246
|
+
readonly BL: "BL";
|
|
247
|
+
readonly MF: "MF";
|
|
248
|
+
readonly RS: "RS";
|
|
249
|
+
readonly SX: "SX";
|
|
250
|
+
readonly SS: "SS";
|
|
251
|
+
readonly XK: "XK";
|
|
252
|
+
};
|
|
253
|
+
export type Alpha2Country = (typeof Alpha2CountryCode)[keyof typeof Alpha2CountryCode];
|
|
254
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getCurrencyPrecision(currency: string): number;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { XMLBuilder, XMLParser } from 'fast-xml-parser';
|
|
2
|
+
export type ISO20022MessageTypeName = `${string}.${string}`;
|
|
3
|
+
export declare const ISO20022Messages: {
|
|
4
|
+
[msg: string]: ISO20022MessageTypeName;
|
|
5
|
+
};
|
|
6
|
+
export interface GenericISO20022Message {
|
|
7
|
+
/** serialize to XML string */
|
|
8
|
+
serialize(): string;
|
|
9
|
+
/** export to a json object that can then be serialized */
|
|
10
|
+
toJSON(): any;
|
|
11
|
+
readonly data: any;
|
|
12
|
+
}
|
|
13
|
+
export interface GenericISO20022MessageFactory<T extends GenericISO20022Message> {
|
|
14
|
+
/** tells what messages are supported */
|
|
15
|
+
supportedMessages(): ISO20022MessageTypeName[];
|
|
16
|
+
fromXML(xml: string): T;
|
|
17
|
+
fromJSON(json: string): T;
|
|
18
|
+
new (data: any): T;
|
|
19
|
+
}
|
|
20
|
+
export declare function registerISO20022Implementation(cl: GenericISO20022MessageFactory<GenericISO20022Message>): void;
|
|
21
|
+
export declare function getISO20022Implementation(type: ISO20022MessageTypeName): GenericISO20022MessageFactory<GenericISO20022Message> | undefined;
|
|
22
|
+
export declare class XML {
|
|
23
|
+
/**
|
|
24
|
+
* Creates and configures the XML Parser
|
|
25
|
+
*
|
|
26
|
+
* @returns {XMLParser} A configured instance of XMLParser
|
|
27
|
+
*/
|
|
28
|
+
static getParser(): XMLParser;
|
|
29
|
+
static getBuilder(): XMLBuilder;
|
|
30
|
+
}
|