@lucianpacurar/iso20022.js 0.2.13 → 0.2.15
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.ts +88 -1
- package/dist/index.js +1119 -641
- package/dist/index.mjs +1119 -642
- package/dist/src/camt/052/cash-management-account-report.d.ts +90 -0
- package/dist/src/camt/index.d.ts +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/parseUtils.d.ts +1 -1
- package/package.json +2 -2
|
@@ -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 CashManagementAccountReport instance.
|
|
6
|
+
*/
|
|
7
|
+
interface CashManagementAccountReportConfig {
|
|
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 account reports included in the report */
|
|
19
|
+
statements: Statement[];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Represents a Cash Management Account Report (CAMT.052.x).
|
|
23
|
+
* This class encapsulates the data and functionality related to processing
|
|
24
|
+
* and accessing information from a CAMT.052 XML file.
|
|
25
|
+
*/
|
|
26
|
+
export declare class CashManagementAccountReport implements GenericISO20022Message {
|
|
27
|
+
private _messageId;
|
|
28
|
+
private _creationDate;
|
|
29
|
+
private _recipient?;
|
|
30
|
+
private _statements;
|
|
31
|
+
constructor(config: CashManagementAccountReportConfig);
|
|
32
|
+
static supportedMessages(): ISO20022MessageTypeName[];
|
|
33
|
+
get data(): CashManagementAccountReportConfig;
|
|
34
|
+
static fromDocumentObject(obj: {
|
|
35
|
+
Document: any;
|
|
36
|
+
}): CashManagementAccountReport;
|
|
37
|
+
/**
|
|
38
|
+
* Creates a CashManagementAccountReport instance from a raw XML string.
|
|
39
|
+
*
|
|
40
|
+
* @param {string} rawXml - The raw XML string containing the CAMT.052 data.
|
|
41
|
+
* @returns {CashManagementAccountReport} A new instance of CashManagementAccountReport.
|
|
42
|
+
* @throws {Error} If the XML parsing fails or required data is missing.
|
|
43
|
+
*/
|
|
44
|
+
static fromXML(rawXml: string): CashManagementAccountReport;
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @param json - JSON string representing a CashManagementAccountReport
|
|
48
|
+
* @returns {CashManagementAccountReport} A new instance of CashManagementAccountReport
|
|
49
|
+
* @throws {Error} If the JSON parsing fails or required data is missing.
|
|
50
|
+
*/
|
|
51
|
+
static fromJSON(json: string): CashManagementAccountReport;
|
|
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 {};
|
package/dist/src/camt/index.d.ts
CHANGED
|
@@ -2,4 +2,5 @@ export * from './003/cash-management-get-account';
|
|
|
2
2
|
export * from './004/cash-management-return-account';
|
|
3
3
|
export * from './005/cash-management-get-transaction';
|
|
4
4
|
export * from './006/cash-management-return-transaction';
|
|
5
|
+
export * from './052/cash-management-account-report';
|
|
5
6
|
export * from './types';
|
package/dist/src/index.d.ts
CHANGED
|
@@ -59,6 +59,7 @@ export { PaymentStatusCode } from './pain/002/types';
|
|
|
59
59
|
export { PaymentStatusReport } from './pain/002/payment-status-report';
|
|
60
60
|
export type { SEPADirectDebitPaymentInitiationConfig, SEPADirectDebitPaymentInstructionGroup, } from './pain/008/sepa-direct-debit-payment-initiation';
|
|
61
61
|
export { SEPADirectDebitPaymentInitiation } from './pain/008/sepa-direct-debit-payment-initiation';
|
|
62
|
+
export { CashManagementAccountReport } from './camt/052/cash-management-account-report';
|
|
62
63
|
export type { Statement, Balance, Entry, Transaction, BalanceType, } from './camt/types';
|
|
63
64
|
export { BalanceTypeCode, BalanceTypeCodeDescriptionMap } from './camt/types';
|
|
64
65
|
export { CashManagementEndOfDayReport } from './camt/053/cash-management-end-of-day-report';
|
package/dist/src/parseUtils.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare const parseAccountIdentification: (accountId: any) => AccountIden
|
|
|
6
6
|
export declare const exportAccountIdentification: (accountId: AccountIdentification) => any;
|
|
7
7
|
export declare const parseAgent: (agent: any) => Agent;
|
|
8
8
|
export declare const exportAgent: (agent: Agent) => any;
|
|
9
|
-
export declare const parseAmountToMinorUnits: (rawAmount: number, currency?: Currency) => number;
|
|
9
|
+
export declare const parseAmountToMinorUnits: (rawAmount: number | string, currency?: Currency) => number;
|
|
10
10
|
export declare const exportAmountToString: (amount: number, currency?: Currency) => string;
|
|
11
11
|
export declare const parseDate: (dateElement: any) => Date;
|
|
12
12
|
export declare const parseParty: (party: any) => Party;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lucianpacurar/iso20022.js",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.15",
|
|
4
4
|
"readme": "README.md",
|
|
5
5
|
"description": "Library to create payment messages.",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"decimal.js": "^10.6.0",
|
|
78
78
|
"dinero.js": "^1.9.1",
|
|
79
|
-
"fast-xml-parser": "^
|
|
79
|
+
"fast-xml-parser": "^5.3.7",
|
|
80
80
|
"uuid": "^10.0.0"
|
|
81
81
|
}
|
|
82
82
|
}
|