@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 CHANGED
@@ -1681,6 +1681,93 @@ declare const BalanceTypeCodeDescriptionMap: {
1681
1681
  };
1682
1682
  type BalanceType = (typeof BalanceTypeCode)[keyof typeof BalanceTypeCode];
1683
1683
 
1684
+ /**
1685
+ * Configuration interface for creating a CashManagementAccountReport instance.
1686
+ */
1687
+ interface CashManagementAccountReportConfig {
1688
+ /** Unique identifier for the message */
1689
+ messageId: string;
1690
+ /** Date and time when the report was created */
1691
+ creationDate: Date;
1692
+ /** Recipient (party without bank and institution) receiving the report */
1693
+ recipient?: {
1694
+ id?: string;
1695
+ name?: string;
1696
+ address?: StructuredAddress;
1697
+ };
1698
+ /** Array of bank account reports included in the report */
1699
+ statements: Statement[];
1700
+ }
1701
+ /**
1702
+ * Represents a Cash Management Account Report (CAMT.052.x).
1703
+ * This class encapsulates the data and functionality related to processing
1704
+ * and accessing information from a CAMT.052 XML file.
1705
+ */
1706
+ declare class CashManagementAccountReport implements GenericISO20022Message {
1707
+ private _messageId;
1708
+ private _creationDate;
1709
+ private _recipient?;
1710
+ private _statements;
1711
+ constructor(config: CashManagementAccountReportConfig);
1712
+ static supportedMessages(): ISO20022MessageTypeName[];
1713
+ get data(): CashManagementAccountReportConfig;
1714
+ static fromDocumentObject(obj: {
1715
+ Document: any;
1716
+ }): CashManagementAccountReport;
1717
+ /**
1718
+ * Creates a CashManagementAccountReport instance from a raw XML string.
1719
+ *
1720
+ * @param {string} rawXml - The raw XML string containing the CAMT.052 data.
1721
+ * @returns {CashManagementAccountReport} A new instance of CashManagementAccountReport.
1722
+ * @throws {Error} If the XML parsing fails or required data is missing.
1723
+ */
1724
+ static fromXML(rawXml: string): CashManagementAccountReport;
1725
+ /**
1726
+ *
1727
+ * @param json - JSON string representing a CashManagementAccountReport
1728
+ * @returns {CashManagementAccountReport} A new instance of CashManagementAccountReport
1729
+ * @throws {Error} If the JSON parsing fails or required data is missing.
1730
+ */
1731
+ static fromJSON(json: string): CashManagementAccountReport;
1732
+ toJSON(): any;
1733
+ serialize(): string;
1734
+ /**
1735
+ * Retrieves all balances from all statements in the report.
1736
+ * @returns {Balance[]} An array of all balances across all statements.
1737
+ */
1738
+ get balances(): Balance[];
1739
+ /**
1740
+ * Retrieves all transactions from all statements in the report.
1741
+ * @returns {Transaction[]} An array of all transactions across all statements.
1742
+ */
1743
+ get transactions(): Transaction[];
1744
+ /**
1745
+ * Retrieves all entries from all statements in the report.
1746
+ * @returns {Entry[]} An array of all entries across all statements.
1747
+ */
1748
+ get entries(): Entry[];
1749
+ /**
1750
+ * Gets the unique identifier for the message.
1751
+ * @returns {string} The message ID.
1752
+ */
1753
+ get messageId(): string;
1754
+ /**
1755
+ * Gets the party receiving the report.
1756
+ * @returns {Party | undefined} The recipient party information, or undefined if no recipient is set.
1757
+ */
1758
+ get recipient(): Party | undefined;
1759
+ /**
1760
+ * Gets the date and time when the report was created.
1761
+ * @returns {Date} The creation date of the report.
1762
+ */
1763
+ get creationDate(): Date;
1764
+ /**
1765
+ * Gets all statements included in the report.
1766
+ * @returns {Statement[]} An array of all statements in the report.
1767
+ */
1768
+ get statements(): Statement[];
1769
+ }
1770
+
1684
1771
  type AtLeastOne<T> = [T, ...T[]];
1685
1772
  /**
1686
1773
  * Configuration interface for the ISO20022 class.
@@ -2500,4 +2587,4 @@ declare class InvalidXmlNamespaceError extends Iso20022JsError {
2500
2587
  constructor(message: string);
2501
2588
  }
2502
2589
 
2503
- export { type ABAAgent, ACHCreditPaymentInitiation, type ACHCreditPaymentInitiationConfig$1 as ACHCreditPaymentInitiationConfig, type ACHCreditPaymentInstruction, type ACHLocalInstrument, ACHLocalInstrumentCode, ACHLocalInstrumentCodeDescriptionMap, type Account, type Agent, type BICAgent, type Balance, type BalanceType, BalanceTypeCode, BalanceTypeCodeDescriptionMap, type BaseAccount, type BaseStatusInformation as BaseStatus, CashManagementEndOfDayReport, type Entry, type GroupStatusInformation as GroupStatus, type IBANAccount, ISO20022, InvalidXmlError, InvalidXmlNamespaceError, Iso20022JsError, type MandateAmendmentInformation, type MandateInformation, type OriginalGroupInformation, type Party, type PaymentStatusInformation as PaymentStatus, PaymentStatusCode, PaymentStatusReport, RTPCreditPaymentInitiation, type RTPCreditPaymentInitiationConfig$1 as RTPCreditPaymentInitiationConfig, type RTPCreditPaymentInstruction, SEPACreditPaymentInitiation, type SEPACreditPaymentInitiationConfig$1 as SEPACreditPaymentInitiationConfig, type SEPACreditPaymentInstruction, SEPADirectDebitPaymentInitiation, type SEPADirectDebitPaymentInitiationConfig$1 as SEPADirectDebitPaymentInitiationConfig, type SEPADirectDebitPaymentInstruction, type SEPADirectDebitPaymentInstructionGroup, type SEPALocalInstrument, SEPAMultiCreditPaymentInitiation, type SEPAMultiCreditPaymentInitiationConfig$1 as SEPAMultiCreditPaymentInitiationConfig, type SEPAMultiCreditPaymentInstructionGroup, type SEPASequenceType, SWIFTCreditPaymentInitiation, type SWIFTCreditPaymentInitiationConfig$1 as SWIFTCreditPaymentInitiationConfig, type SWIFTCreditPaymentInstruction, type Statement, type PaymentStatus as Status, type StatusInformation, type StatusType, type StructuredAddress, type Transaction, type TransactionStatusInformation as TransactionStatus };
2590
+ export { type ABAAgent, ACHCreditPaymentInitiation, type ACHCreditPaymentInitiationConfig$1 as ACHCreditPaymentInitiationConfig, type ACHCreditPaymentInstruction, type ACHLocalInstrument, ACHLocalInstrumentCode, ACHLocalInstrumentCodeDescriptionMap, type Account, type Agent, type BICAgent, type Balance, type BalanceType, BalanceTypeCode, BalanceTypeCodeDescriptionMap, type BaseAccount, type BaseStatusInformation as BaseStatus, CashManagementAccountReport, CashManagementEndOfDayReport, type Entry, type GroupStatusInformation as GroupStatus, type IBANAccount, ISO20022, InvalidXmlError, InvalidXmlNamespaceError, Iso20022JsError, type MandateAmendmentInformation, type MandateInformation, type OriginalGroupInformation, type Party, type PaymentStatusInformation as PaymentStatus, PaymentStatusCode, PaymentStatusReport, RTPCreditPaymentInitiation, type RTPCreditPaymentInitiationConfig$1 as RTPCreditPaymentInitiationConfig, type RTPCreditPaymentInstruction, SEPACreditPaymentInitiation, type SEPACreditPaymentInitiationConfig$1 as SEPACreditPaymentInitiationConfig, type SEPACreditPaymentInstruction, SEPADirectDebitPaymentInitiation, type SEPADirectDebitPaymentInitiationConfig$1 as SEPADirectDebitPaymentInitiationConfig, type SEPADirectDebitPaymentInstruction, type SEPADirectDebitPaymentInstructionGroup, type SEPALocalInstrument, SEPAMultiCreditPaymentInitiation, type SEPAMultiCreditPaymentInitiationConfig$1 as SEPAMultiCreditPaymentInitiationConfig, type SEPAMultiCreditPaymentInstructionGroup, type SEPASequenceType, SWIFTCreditPaymentInitiation, type SWIFTCreditPaymentInitiationConfig$1 as SWIFTCreditPaymentInitiationConfig, type SWIFTCreditPaymentInstruction, type Statement, type PaymentStatus as Status, type StatusInformation, type StatusType, type StructuredAddress, type Transaction, type TransactionStatusInformation as TransactionStatus };