@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.
Files changed (43) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +212 -0
  3. package/dist/index.d.ts +1896 -0
  4. package/dist/index.js +10039 -0
  5. package/dist/index.mjs +10023 -0
  6. package/dist/src/camt/003/cash-management-get-account.d.ts +26 -0
  7. package/dist/src/camt/004/cash-management-return-account.d.ts +30 -0
  8. package/dist/src/camt/005/cash-management-get-transaction.d.ts +26 -0
  9. package/dist/src/camt/006/cash-management-return-transaction.d.ts +43 -0
  10. package/dist/src/camt/053/cash-management-end-of-day-report.d.ts +90 -0
  11. package/dist/src/camt/index.d.ts +5 -0
  12. package/dist/src/camt/types.d.ts +191 -0
  13. package/dist/src/camt/utils.d.ts +12 -0
  14. package/dist/src/errors.d.ts +24 -0
  15. package/dist/src/index.d.ts +61 -0
  16. package/dist/src/iso20022.d.ts +375 -0
  17. package/dist/src/lib/countries.d.ts +254 -0
  18. package/dist/src/lib/currencies.d.ts +1 -0
  19. package/dist/src/lib/index.d.ts +4 -0
  20. package/dist/src/lib/interfaces.d.ts +30 -0
  21. package/dist/src/lib/types.d.ts +376 -0
  22. package/dist/src/pain/001/ach-credit-payment-initiation.d.ts +159 -0
  23. package/dist/src/pain/001/payment-initiation.d.ts +105 -0
  24. package/dist/src/pain/001/rtp-credit-payment-initiation.d.ts +118 -0
  25. package/dist/src/pain/001/sepa-credit-payment-initiation.d.ts +126 -0
  26. package/dist/src/pain/001/swift-credit-payment-initiation.d.ts +72 -0
  27. package/dist/src/pain/002/payment-status-report.d.ts +75 -0
  28. package/dist/src/pain/002/types.d.ts +73 -0
  29. package/dist/src/pain/002/utils.d.ts +4 -0
  30. package/dist/src/parseUtils.d.ts +21 -0
  31. package/dist/src/utils/format.d.ts +1 -0
  32. package/dist/test/camt/003/cash-management-get-account.test.d.ts +1 -0
  33. package/dist/test/camt/004/cash-management-return-account.test.d.ts +1 -0
  34. package/dist/test/camt/005/cash-management-get-transaction.test.d.ts +1 -0
  35. package/dist/test/camt/006/cash-management-return-transaction.test.d.ts +1 -0
  36. package/dist/test/camt/053/cash-management-end-of-day-report.test.d.ts +1 -0
  37. package/dist/test/pain/001/ach-credit-payment-initiation.test.d.ts +1 -0
  38. package/dist/test/pain/001/rtp-credit-payment-initiation.test.d.ts +1 -0
  39. package/dist/test/pain/001/sepa-credit-payment-initiation.test.d.ts +1 -0
  40. package/dist/test/pain/001/swift-credit-payment-initiation.test.d.ts +1 -0
  41. package/dist/test/pain/002/payment-status-report.test.d.ts +1 -0
  42. package/dist/test/parseUtils.test.d.ts +1 -0
  43. package/package.json +82 -0
@@ -0,0 +1,26 @@
1
+ import { GenericISO20022Message, ISO20022MessageTypeName } from "../../lib/interfaces";
2
+ import { AccountIdentification, MessageHeader } from "../../lib/types";
3
+ export interface CashManagementGetAccountCriterium {
4
+ accountRegExp?: string;
5
+ accountEqualTo?: AccountIdentification;
6
+ currencyEqualTo?: string;
7
+ balanceAsOfDateEqualTo?: Date;
8
+ }
9
+ export interface CashManagementGetAccountData {
10
+ header: MessageHeader;
11
+ newCriteria: {
12
+ name: string;
13
+ searchCriteria: CashManagementGetAccountCriterium[];
14
+ };
15
+ }
16
+ export declare class CashManagementGetAccount implements GenericISO20022Message {
17
+ private _data;
18
+ constructor(data: CashManagementGetAccountData);
19
+ get data(): CashManagementGetAccountData;
20
+ static supportedMessages(): ISO20022MessageTypeName[];
21
+ static fromDocumentOject(doc: any): CashManagementGetAccount;
22
+ static fromXML(xml: string): CashManagementGetAccount;
23
+ static fromJSON(json: string): CashManagementGetAccount;
24
+ serialize(): string;
25
+ toJSON(): any;
26
+ }
@@ -0,0 +1,30 @@
1
+ import { BalanceInReport, BusinessError } from "../types";
2
+ import { GenericISO20022Message, ISO20022MessageTypeName } from "../../lib/interfaces";
3
+ import { AccountIdentification, CashAccountType, MessageHeader } from "../../lib/types";
4
+ import { Currency } from "dinero.js";
5
+ export interface AccountReport {
6
+ currency: Currency;
7
+ name?: string;
8
+ type?: CashAccountType | string;
9
+ balances: BalanceInReport[];
10
+ }
11
+ export interface AccountReportOrError {
12
+ accountId: AccountIdentification;
13
+ report?: AccountReport;
14
+ error?: BusinessError;
15
+ }
16
+ export interface CashManagementReturnAccountData {
17
+ header: MessageHeader;
18
+ reports: AccountReportOrError[];
19
+ }
20
+ export declare class CashManagementReturnAccount implements GenericISO20022Message {
21
+ private _data;
22
+ constructor(data: CashManagementReturnAccountData);
23
+ get data(): CashManagementReturnAccountData;
24
+ static supportedMessages(): ISO20022MessageTypeName[];
25
+ static fromDocumentOject(doc: any): CashManagementReturnAccount;
26
+ static fromXML(xml: string): CashManagementReturnAccount;
27
+ static fromJSON(json: string): CashManagementReturnAccount;
28
+ serialize(): string;
29
+ toJSON(): any;
30
+ }
@@ -0,0 +1,26 @@
1
+ import { GenericISO20022Message, ISO20022MessageTypeName } from "../../lib/interfaces";
2
+ import { MessageHeader } from "../../lib/types";
3
+ export interface CashManagementGetTransactionCriterium {
4
+ type: string;
5
+ msgIdsEqualTo?: string[];
6
+ dateEqualTo?: Date;
7
+ endToEndIdEqualTo?: string[];
8
+ }
9
+ export interface CashManagementGetTransactionData {
10
+ header: MessageHeader;
11
+ newCriteria?: {
12
+ name?: string;
13
+ searchCriteria: CashManagementGetTransactionCriterium[];
14
+ };
15
+ }
16
+ export declare class CashManagementGetTransaction implements GenericISO20022Message {
17
+ private _data;
18
+ constructor(data: CashManagementGetTransactionData);
19
+ get data(): CashManagementGetTransactionData;
20
+ static supportedMessages(): ISO20022MessageTypeName[];
21
+ static fromDocumentOject(doc: any): CashManagementGetTransaction;
22
+ static fromXML(xml: string): CashManagementGetTransaction;
23
+ static fromJSON(json: string): CashManagementGetTransaction;
24
+ serialize(): string;
25
+ toJSON(): any;
26
+ }
@@ -0,0 +1,43 @@
1
+ import { BusinessError } from "../types";
2
+ import { GenericISO20022Message, ISO20022MessageTypeName } from "../../lib/interfaces";
3
+ import { Agent, MessageHeader, Party } from "../../lib/types";
4
+ import { Currency } from "dinero.js";
5
+ export interface TransactionReport {
6
+ msgId?: string;
7
+ reqExecutionDate?: Date;
8
+ status?: {
9
+ code: string;
10
+ reason?: string;
11
+ };
12
+ debtor: Party;
13
+ debtorAgent: Agent;
14
+ creditor: Party;
15
+ creditorAgent: Agent;
16
+ }
17
+ export interface PaymentIdentification {
18
+ currency: Currency;
19
+ amount: number;
20
+ endToEndId: string;
21
+ transactionId?: string;
22
+ uetr?: string;
23
+ }
24
+ export interface TransactionReportOrError {
25
+ paymentId: PaymentIdentification;
26
+ report?: TransactionReport;
27
+ error?: BusinessError;
28
+ }
29
+ export interface CashManagementReturnTransactionData {
30
+ header: MessageHeader;
31
+ reports: TransactionReportOrError[];
32
+ }
33
+ export declare class CashManagementReturnTransaction implements GenericISO20022Message {
34
+ private _data;
35
+ constructor(data: CashManagementReturnTransactionData);
36
+ get data(): CashManagementReturnTransactionData;
37
+ static supportedMessages(): ISO20022MessageTypeName[];
38
+ static fromDocumentOject(doc: any): CashManagementReturnTransaction;
39
+ static fromXML(xml: string): CashManagementReturnTransaction;
40
+ static fromJSON(json: string): CashManagementReturnTransaction;
41
+ serialize(): string;
42
+ toJSON(): any;
43
+ }
@@ -0,0 +1,90 @@
1
+ import { Balance, Entry, Statement, Transaction } from '../types';
2
+ import { Party, StructuredAddress } from '../../lib/types';
3
+ import { GenericISO20022Message, ISO20022MessageTypeName } from '../../lib/interfaces';
4
+ /**
5
+ * Configuration interface for creating a CashManagementEndOfDayReport instance.
6
+ */
7
+ interface CashManagementEndOfDayReportConfig {
8
+ /** Unique identifier for the message */
9
+ messageId: string;
10
+ /** Date and time when the report was created */
11
+ creationDate: Date;
12
+ /** Recipient (party without bank and institution) receiving the report */
13
+ recipient?: {
14
+ id?: string;
15
+ name?: string;
16
+ address?: StructuredAddress;
17
+ };
18
+ /** Array of bank statements included in the report */
19
+ statements: Statement[];
20
+ }
21
+ /**
22
+ * Represents a Cash Management End of Day Report (CAMT.053.x).
23
+ * This class encapsulates the data and functionality related to processing
24
+ * and accessing information from a CAMT.053 XML file.
25
+ */
26
+ export declare class CashManagementEndOfDayReport implements GenericISO20022Message {
27
+ private _messageId;
28
+ private _creationDate;
29
+ private _recipient?;
30
+ private _statements;
31
+ constructor(config: CashManagementEndOfDayReportConfig);
32
+ static supportedMessages(): ISO20022MessageTypeName[];
33
+ get data(): CashManagementEndOfDayReportConfig;
34
+ static fromDocumentObject(obj: {
35
+ Document: any;
36
+ }): CashManagementEndOfDayReport;
37
+ /**
38
+ * Creates a CashManagementEndOfDayReport instance from a raw XML string.
39
+ *
40
+ * @param {string} rawXml - The raw XML string containing the CAMT.053 data.
41
+ * @returns {CashManagementEndOfDayReport} A new instance of CashManagementEndOfDayReport.
42
+ * @throws {Error} If the XML parsing fails or required data is missing.
43
+ */
44
+ static fromXML(rawXml: string): CashManagementEndOfDayReport;
45
+ /**
46
+ *
47
+ * @param json - JSON string representing a CashManagementEndOfDayReport
48
+ * @returns {CashManagementEndOfDayReport} A new instance of CashManagementEndOfDayReport
49
+ * @throws {Error} If the JSON parsing fails or required data is missing.
50
+ */
51
+ static fromJSON(json: string): CashManagementEndOfDayReport;
52
+ toJSON(): any;
53
+ serialize(): string;
54
+ /**
55
+ * Retrieves all balances from all statements in the report.
56
+ * @returns {Balance[]} An array of all balances across all statements.
57
+ */
58
+ get balances(): Balance[];
59
+ /**
60
+ * Retrieves all transactions from all statements in the report.
61
+ * @returns {Transaction[]} An array of all transactions across all statements.
62
+ */
63
+ get transactions(): Transaction[];
64
+ /**
65
+ * Retrieves all entries from all statements in the report.
66
+ * @returns {Entry[]} An array of all entries across all statements.
67
+ */
68
+ get entries(): Entry[];
69
+ /**
70
+ * Gets the unique identifier for the message.
71
+ * @returns {string} The message ID.
72
+ */
73
+ get messageId(): string;
74
+ /**
75
+ * Gets the party receiving the report.
76
+ * @returns {Party | undefined} The recipient party information, or undefined if no recipient is set.
77
+ */
78
+ get recipient(): Party | undefined;
79
+ /**
80
+ * Gets the date and time when the report was created.
81
+ * @returns {Date} The creation date of the report.
82
+ */
83
+ get creationDate(): Date;
84
+ /**
85
+ * Gets all statements included in the report.
86
+ * @returns {Statement[]} An array of all statements in the report.
87
+ */
88
+ get statements(): Statement[];
89
+ }
90
+ export {};
@@ -0,0 +1,5 @@
1
+ export * from "./003/cash-management-get-account";
2
+ export * from "./004/cash-management-return-account";
3
+ export * from "./005/cash-management-get-transaction";
4
+ export * from "./006/cash-management-return-transaction";
5
+ export * from "./types";
@@ -0,0 +1,191 @@
1
+ import { Currency } from 'dinero.js';
2
+ import { Account, Agent, Party } from '../lib/types';
3
+ /**
4
+ * Represents a bank statement in the CAMT.053 format.
5
+ */
6
+ export interface Statement {
7
+ /** Unique identifier for the statement. */
8
+ id: string;
9
+ /** Electronic sequence number of the statement. */
10
+ electronicSequenceNumber?: number;
11
+ /** Legal sequence number of the statement. */
12
+ legalSequenceNumber?: number;
13
+ /** Date and time when the statement was created. */
14
+ creationDate: Date;
15
+ /** Start date of the statement period. */
16
+ fromDate?: Date;
17
+ /** End date of the statement period. */
18
+ toDate?: Date;
19
+ /** Account details for which the statement is generated. */
20
+ account: Account;
21
+ /** Financial institution details. */
22
+ agent: Agent;
23
+ /** Total number of entries in the statement. */
24
+ numOfEntries?: number;
25
+ /** Sum of all entries in the statement. */
26
+ sumOfEntries?: number;
27
+ /** Net amount of all entries in the statement. */
28
+ netAmountOfEntries?: number;
29
+ /** Number of credit entries in the statement. */
30
+ numOfCreditEntries?: number;
31
+ /** Sum of all credit entries in the statement. */
32
+ sumOfCreditEntries?: number;
33
+ /** Number of debit entries in the statement. */
34
+ numOfDebitEntries?: number;
35
+ /** Sum of all debit entries in the statement. */
36
+ sumOfDebitEntries?: number;
37
+ /** Array of balance information. */
38
+ balances: Balance[];
39
+ /** Array of transaction entries. */
40
+ entries: Entry[];
41
+ }
42
+ /**
43
+ * Represents a balance in the statement, delinated by date and type.
44
+ */
45
+ export interface Balance {
46
+ /** Date of the balance. */
47
+ date: Date;
48
+ /** Type of the balance. */
49
+ type: BalanceType;
50
+ /** Amount of the balance. */
51
+ amount: number;
52
+ /** Indicates whether the balance is credit (positive) or debit (negative). */
53
+ creditDebitIndicator: 'credit' | 'debit';
54
+ /** Currency of the balance. */
55
+ currency: Currency;
56
+ }
57
+ /**
58
+ * Represents a balance in the CAMT.004 report message.
59
+ * Currency is not in the balance object but in the parent Report object.
60
+ */
61
+ export interface BalanceInReport {
62
+ /** Amount of the balance. */
63
+ amount: number;
64
+ /** Indicates whether the balance is credit (positive) or debit (negative). */
65
+ creditDebitIndicator: 'credit' | 'debit';
66
+ /** Type of the balance. */
67
+ type?: BalanceType;
68
+ valueDate?: Date;
69
+ processingDate?: Date;
70
+ }
71
+ /**
72
+ * Represents a transaction entry in the statement.
73
+ */
74
+ export interface Entry {
75
+ /** Unique reference ID for the entry, if included in the statement. */
76
+ referenceId?: string;
77
+ /** Indicates whether the entry is a credit or debit. */
78
+ creditDebitIndicator: 'credit' | 'debit';
79
+ /** Indicates if the entry is a reversal. */
80
+ reversal: boolean;
81
+ /** Date when the entry was booked. */
82
+ bookingDate: Date;
83
+ /** Amount of the entry. */
84
+ amount: number;
85
+ /** Currency of the entry. */
86
+ currency: Currency;
87
+ /** Proprietary code associated with the entry. */
88
+ proprietaryCode: string;
89
+ /** Array of individual transactions within this entry. */
90
+ transactions: Transaction[];
91
+ /** Additional entry information */
92
+ additionalInformation?: string;
93
+ /** Reference ID assigned by the account servicer. */
94
+ accountServicerReferenceId?: string;
95
+ /** Details about the type of transaction */
96
+ bankTransactionCode: BankTransactionCode;
97
+ }
98
+ /**
99
+ * Represents an individual transaction within an entry.
100
+ */
101
+ export interface Transaction {
102
+ /** Unique message ID for the transaction. */
103
+ messageId?: string;
104
+ /** Reference ID assigned by the account servicer. */
105
+ accountServicerReferenceId?: string;
106
+ /** ID of the payment information. */
107
+ paymentInformationId?: string;
108
+ /** Instruction ID for the transaction. */
109
+ instructionId?: string;
110
+ /** Unique transaction ID. */
111
+ transactionId?: string;
112
+ /** Instructed amount for the transaction. */
113
+ instructedAmount?: number;
114
+ /** Currency of the instructed amount. */
115
+ instructedCurrency?: Currency;
116
+ /** Proprietary purpose code for the transaction. */
117
+ proprietaryPurpose?: string;
118
+ /** Details of the debtor party. */
119
+ debtor?: Party;
120
+ /** Details of the creditor party. */
121
+ creditor?: Party;
122
+ /** Additional information about the remittance. */
123
+ remittanceInformation?: string;
124
+ /** Reason for return, if applicable. */
125
+ returnReason?: string;
126
+ /** Additional information about the return. */
127
+ returnAdditionalInformation?: string;
128
+ /** End-to-end ID for the entry. */
129
+ endToEndId?: string;
130
+ }
131
+ export interface BankTransactionCode {
132
+ /** Specifies the business area of the underlying transaction. */
133
+ domainCode?: string;
134
+ /** Specifies the family within the domain of the underlying transaction. */
135
+ domainFamilyCode?: string;
136
+ /** Specifies the sub-product family within a specific family of the underlying transaction. */
137
+ domainSubFamilyCode?: string;
138
+ /** Bank transaction code in a proprietary form, as defined by the issuer. */
139
+ proprietaryCode?: string;
140
+ /** Identification of the issuer of the proprietary bank transaction code. */
141
+ proprietaryCodeIssuer?: string;
142
+ }
143
+ /**
144
+ * Balance types as defined in ISO 20022.
145
+ * @see {@link https://www.iso20022.org/sites/default/files/2022-03/externalcodesets_4q2021_v2_1.xlsx}
146
+ */
147
+ export declare const BalanceTypeCode: {
148
+ /** Closing balance of amount of money that is at the disposal of the account owner on the date specified. */
149
+ readonly ClosingAvailable: "CLAV";
150
+ /** Balance of the account at the end of the pre-agreed account reporting period. It is the sum of the opening booked balance at the beginning of the period and all entries booked to the account during the pre-agreed account reporting period. */
151
+ readonly ClosingBooked: "CLBD";
152
+ /** Forward available balance of money that is at the disposal of the account owner on the date specified. */
153
+ readonly ForwardAvailable: "FWAV";
154
+ /** Balance for informational purposes. */
155
+ readonly Information: "INFO";
156
+ /** Available balance calculated in the course of the account servicer's business day, at the time specified, and subject to further changes during the business day. The interim balance is calculated on the basis of booked credit and debit items during the calculation time/period specified. */
157
+ readonly InterimAvailable: "ITAV";
158
+ /** Balance calculated in the course of the account servicer's business day, at the time specified, and subject to further changes during the business day. The interim balance is calculated on the basis of booked credit and debit items during the calculation time/period specified. */
159
+ readonly InterimBooked: "ITBD";
160
+ /** Opening balance of amount of money that is at the disposal of the account owner on the date specified. */
161
+ readonly OpeningAvailable: "OPAV";
162
+ /** Book balance of the account at the beginning of the account reporting period. It always equals the closing book balance from the previous report. */
163
+ readonly OpeningBooked: "OPBD";
164
+ /** Balance of the account at the previously closed account reporting period. The opening booked balance for the new period has to be equal to this balance. Usage: the previously booked closing balance should equal (inclusive date) the booked closing balance of the date it references and equal the actual booked opening balance of the current date. */
165
+ readonly PreviouslyClosedBooked: "PRCD";
166
+ /** Balance, composed of booked entries and pending items known at the time of calculation, which projects the end of day balance if everything is booked on the account and no other entry is posted. */
167
+ readonly Expected: "XPCD";
168
+ /** The difference between the excess/(deficit) investable balance and the excess/(deficit) collected balance due to the reserve requirement. This balance is not used if the account's Earnings Credit Rate is net of reserves. This may be used when the earnings allowance rate is not adjusted for reserves. It may be that reserves have been subtracted from the collected balance to determine the investable balance. Therefore, they must be added back to the excess/(deficit) investable balance to determine the collected balance position. The presentation of this calculation is optional. AFP code=00 04 21 */
169
+ readonly AdditionalBalReserveRequirement: "ABRR";
170
+ };
171
+ /**
172
+ * Description mapping of BalanceTypeCode values to their names.
173
+ */
174
+ export declare const BalanceTypeCodeDescriptionMap: {
175
+ readonly CLAV: "Closing Available";
176
+ readonly CLBD: "Closing Booked";
177
+ readonly FWAV: "Forward Available";
178
+ readonly INFO: "Information";
179
+ readonly ITAV: "Interim Available";
180
+ readonly ITBD: "Interim Booked";
181
+ readonly OPAV: "Opening Available";
182
+ readonly OPBD: "Opening Booked";
183
+ readonly PRCD: "Previously Closed Booked";
184
+ readonly XPCD: "Expected";
185
+ readonly ABRR: "Additional Balance Reserve Requirement";
186
+ };
187
+ export type BalanceType = (typeof BalanceTypeCode)[keyof typeof BalanceTypeCode];
188
+ export interface BusinessError {
189
+ code: string;
190
+ description?: string;
191
+ }
@@ -0,0 +1,12 @@
1
+ import { Balance, BalanceInReport, BusinessError, Entry, Statement } from 'camt/types';
2
+ import { Currency } from 'dinero.js';
3
+ export declare const parseStatement: (stmt: any) => Statement;
4
+ export declare const exportStatement: (stmt: Statement) => any;
5
+ export declare const parseBalance: (balance: any) => Balance;
6
+ export declare const exportBalance: (balance: Balance) => any;
7
+ export declare const parseBalanceReport: (currency: Currency, balance: any) => BalanceInReport;
8
+ export declare const exportBalanceReport: (currency: Currency, balance: BalanceInReport) => any;
9
+ export declare const parseEntry: (entry: any) => Entry;
10
+ export declare const exportEntry: (entry: Entry) => any;
11
+ export declare const parseBusinessError: (bizErr: any) => BusinessError;
12
+ export declare const exportBusinessError: (bizErr: BusinessError) => any;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Base error class for all ISO 20022 related errors in the library.
3
+ * Extends the native Error class with proper stack trace capture.
4
+ */
5
+ export declare class Iso20022JsError extends Error {
6
+ constructor(message: string);
7
+ }
8
+ /**
9
+ * Error thrown when XML parsing or validation fails.
10
+ * This error indicates that the provided XML is malformed or does not conform to expected structure.
11
+ */
12
+ export declare class InvalidXmlError extends Iso20022JsError {
13
+ constructor(message: string);
14
+ }
15
+ /**
16
+ * Error thrown when XML namespace validation fails.
17
+ * This error indicates that the XML document contains invalid or missing required ISO 20022 namespaces.
18
+ */
19
+ export declare class InvalidXmlNamespaceError extends Iso20022JsError {
20
+ constructor(message: string);
21
+ }
22
+ export declare class InvalidStructureError extends Iso20022JsError {
23
+ constructor(message: string);
24
+ }
@@ -0,0 +1,61 @@
1
+ /**
2
+ * @module iso20022.js · The Open Source Bank Transfer library, build for fiatwebservices.com
3
+ * @author svapnil <iso20022js@woodside.sh>
4
+ * @copyright 2025 Woodside Labs
5
+ * @license MIT
6
+ * @description
7
+ * This library allows you to create payment messages in ISO20022.
8
+ *
9
+ * Either use an iso20022 object, which represents your acccount,
10
+ * or create directly from the PaymentInitiation class.
11
+ *
12
+ * Current Supported Payment Types:
13
+ * - SWIFTCreditPaymentInstruction
14
+ * - SEPACreditPaymentInstruction
15
+ * - RTPCreditPaymentInstruction
16
+ * @example
17
+ * ```typescript
18
+ * import { ISO20022 } from 'iso20022.js';
19
+ * const checking = new ISO20022({
20
+ * initiatingParty: ...
21
+ * })
22
+ * const rtp = checking.createRTPCreditPaymentInitiation([{
23
+ * type: 'rtp',
24
+ * direction: 'credit',
25
+ * amount: 100000, // $1000.00
26
+ * currency: 'USD',
27
+ * creditor: {
28
+ * name: 'All-American Dogs Co.',
29
+ * account: {
30
+ * accountNumber: '123456789012',
31
+ * },
32
+ * agent: {
33
+ * abaRoutingNumber: '37714568112',
34
+ * },
35
+ * },
36
+ * remittanceInformation: '1000 Hot Dogs Feb26',
37
+ * },
38
+ * ]);
39
+ * // Using fiatwebservices.com
40
+ * client.paymentTransfers.create(rtp);
41
+ * ```
42
+ * @see {@link https://iso20022js.com} for more information.
43
+ */
44
+ export { default as ISO20022 } from './iso20022';
45
+ export type { Party, Account, Agent, SWIFTCreditPaymentInstruction, SEPACreditPaymentInstruction, RTPCreditPaymentInstruction, ACHCreditPaymentInstruction, StructuredAddress, IBANAccount, BaseAccount, BICAgent, ABAAgent, ACHLocalInstrument, } from './lib/types';
46
+ export { ACHLocalInstrumentCode, ACHLocalInstrumentCodeDescriptionMap } from './lib/types';
47
+ export type { SWIFTCreditPaymentInitiationConfig } from './pain/001/swift-credit-payment-initiation';
48
+ export { SWIFTCreditPaymentInitiation } from './pain/001/swift-credit-payment-initiation';
49
+ export type { SEPACreditPaymentInitiationConfig } from './pain/001/sepa-credit-payment-initiation';
50
+ export { SEPACreditPaymentInitiation } from './pain/001/sepa-credit-payment-initiation';
51
+ export type { RTPCreditPaymentInitiationConfig } from './pain/001/rtp-credit-payment-initiation';
52
+ export { RTPCreditPaymentInitiation } from './pain/001/rtp-credit-payment-initiation';
53
+ export type { ACHCreditPaymentInitiationConfig } from './pain/001/ach-credit-payment-initiation';
54
+ export { ACHCreditPaymentInitiation } from './pain/001/ach-credit-payment-initiation';
55
+ export type { OriginalGroupInformation, StatusType, PaymentStatus as Status, BaseStatusInformation as BaseStatus, GroupStatusInformation as GroupStatus, PaymentStatusInformation as PaymentStatus, TransactionStatusInformation as TransactionStatus, StatusInformation, } from './pain/002/types';
56
+ export { PaymentStatusCode } from './pain/002/types';
57
+ export { PaymentStatusReport } from './pain/002/payment-status-report';
58
+ export type { Statement, Balance, Entry, Transaction, BalanceType, } from './camt/types';
59
+ export { BalanceTypeCode, BalanceTypeCodeDescriptionMap } from './camt/types';
60
+ export { CashManagementEndOfDayReport } from './camt/053/cash-management-end-of-day-report';
61
+ export { Iso20022JsError, InvalidXmlError, InvalidXmlNamespaceError, } from './errors';