lib-fints 1.4.2 → 1.4.4

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![Node.js CI with pnpm](https://github.com/robocode13/lib-fints/actions/workflows/build-test.yml/badge.svg?branch=main)](https://github.com/robocode13/lib-fints/actions/workflows/build-test.yml)
1
+ [![Node.js CI with pnpm](https://github.com/robocode13/lib-fints/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/robocode13/lib-fints/actions/workflows/ci.yml)
2
2
 
3
3
  # Lib-FinTS
4
4
 
@@ -215,6 +215,47 @@ For each account-specific transaction, the client provides corresponding `can*`
215
215
  | `canGetPortfolio(accountNumber?)` | Checks if portfolio information fetching is supported |
216
216
  | `canGetCreditCardStatements(accountNumber?)` | Checks if credit card statements fetching is supported |
217
217
 
218
+ ### Transaction Parameters
219
+
220
+ The configuration object provides methods to access transaction-specific parameters and capabilities provided by the bank:
221
+
222
+ #### `config.getTransactionParameters<T>(transId: string): T | undefined`
223
+
224
+ Returns the bank-specific parameters for a transaction type, if available. These parameters contain transaction limits, supported formats, and other bank-specific constraints.
225
+
226
+ ```typescript
227
+ // Get parameters for account statements (MT940)
228
+ const mt940Params = config.getTransactionParameters<HIKAZSParameter>('HKKAZ');
229
+
230
+ // Get parameters for account statements (CAMT)
231
+ const camtParams = config.getTransactionParameters<HICAZSParameter>('HKCAZ');
232
+
233
+ // Get parameters for SEPA transactions
234
+ const sepaParams = config.getTransactionParameters<HISPASParameter>('HKSPA');
235
+ ```
236
+
237
+ #### `config.isTransactionSupported(transId: string): boolean`
238
+
239
+ Checks whether a specific transaction type is supported by the bank.
240
+
241
+ ```typescript
242
+ if (config.isTransactionSupported('HKWPD')) {
243
+ console.log('Bank supports portfolio requests');
244
+ }
245
+ ```
246
+
247
+ #### `config.isAccountTransactionSupported(accountNumber: string, transId: string): boolean`
248
+
249
+ Checks whether a specific transaction type is supported for a particular account.
250
+
251
+ ```typescript
252
+ if (config.isAccountTransactionSupported('1234567890', 'HKWPD')) {
253
+ console.log('Account supports portfolio requests');
254
+ }
255
+ ```
256
+
257
+ **Note**: Transaction IDs correspond to the FinTS segment names (e.g., 'HKKAZ' for account statements, 'HKWPD' for portfolio, 'HKSAL' for balance).
258
+
218
259
  ### TAN Continuation Methods
219
260
 
220
261
  Every transaction that supports TAN authentication has a corresponding `*WithTan` method for continuing the transaction after TAN entry:
@@ -167,6 +167,9 @@ export class CamtParser {
167
167
  if (typeof current === 'string' || typeof current === 'number') {
168
168
  return String(current);
169
169
  }
170
+ if (Array.isArray(current)) {
171
+ return String(current.join(''));
172
+ }
170
173
  if (current && typeof current === 'object' && current !== null && '#text' in current) {
171
174
  return String(current['#text']);
172
175
  }
package/dist/config.js CHANGED
@@ -140,6 +140,15 @@ export class FinTSConfig {
140
140
  get selectedTanMethod() {
141
141
  return this.availableTanMethods.find((t) => t.id === this.tanMethodId);
142
142
  }
143
+ /**
144
+ * Gets the transaction parameters for a specific transaction ID
145
+ * @param transId The transaction ID
146
+ * @returns The transaction parameters or undefined if not available
147
+ */
148
+ getTransactionParameters(transId) {
149
+ const transaction = this.bankingInformation.bpd?.allowedTransactions.find((t) => t.transId === transId);
150
+ return transaction?.params;
151
+ }
143
152
  /**
144
153
  * Checks if a transaction is supported by the bank
145
154
  * @param transId The transaction ID
@@ -105,9 +105,15 @@ export class InitDialogInteraction extends CustomerInteraction {
105
105
  const paramSegId = `HI${transaction.transId.slice(2)}S`;
106
106
  const paramSegments = [
107
107
  ...response.findAllSegments(paramSegId),
108
- ...response.findAllUnknownSegments(paramSegId),
109
108
  ];
109
+ const unknownParamSegments = [...response.findAllUnknownSegments(paramSegId)];
110
110
  paramSegments.forEach((paramSegment) => {
111
+ if (paramSegment) {
112
+ transaction.versions.push(paramSegment.header.version);
113
+ transaction.params = paramSegment.params;
114
+ }
115
+ });
116
+ unknownParamSegments.forEach((paramSegment) => {
111
117
  if (paramSegment) {
112
118
  transaction.versions.push(paramSegment.header.version);
113
119
  }
@@ -37,7 +37,7 @@ export class SepaAccountInteraction extends CustomerOrderInteraction {
37
37
  });
38
38
  clientResponse.sepaAccounts.forEach((sepaAccount) => {
39
39
  const bankAccount = this.dialog?.config.getBankAccount(sepaAccount.accountNumber);
40
- if (bankAccount) {
40
+ if (bankAccount && !bankAccount.isSepaAccount) {
41
41
  bankAccount.isSepaAccount = sepaAccount.isSepaAccount;
42
42
  bankAccount.iban = sepaAccount.iban;
43
43
  bankAccount.bic = sepaAccount.bic;
@@ -6,7 +6,6 @@ export class StatementInteractionCAMT extends CustomerOrderInteraction {
6
6
  accountNumber;
7
7
  from;
8
8
  to;
9
- acceptedCamtFormats = ['urn:iso:std:iso:20022:tech:xsd:camt.052.001.08'];
10
9
  constructor(accountNumber, from, to) {
11
10
  super(HKCAZ.Id, HICAZ.Id);
12
11
  this.accountNumber = accountNumber;
@@ -19,10 +18,15 @@ export class StatementInteractionCAMT extends CustomerOrderInteraction {
19
18
  if (!version) {
20
19
  throw Error(`There is no supported version for business transaction '${HKCAZ.Id}'`);
21
20
  }
21
+ let acceptedCamtFormats = ['urn:iso:std:iso:20022:tech:xsd:camt.052.001.08'];
22
+ const params = init.getTransactionParameters(HKCAZ.Id);
23
+ if (params && params.supportedCamtFormats.length > 0) {
24
+ acceptedCamtFormats = params.supportedCamtFormats.filter((format) => format.startsWith('urn:iso:std:iso:20022:tech:xsd:camt.052.001.'));
25
+ }
22
26
  const hkcaz = {
23
27
  header: { segId: HKCAZ.Id, segNr: 0, version: version },
24
28
  account: bankAccount,
25
- acceptedCamtFormats: this.acceptedCamtFormats,
29
+ acceptedCamtFormats: acceptedCamtFormats,
26
30
  allAccounts: false,
27
31
  from: this.from,
28
32
  to: this.to,
@@ -1,4 +1,6 @@
1
- import { SepaAccountParametersGroup, } from '../dataGroups/SepaAccountParameters.js';
1
+ import { AlphaNumeric } from '../dataElements/AlphaNumeric.js';
2
+ import { Numeric } from '../dataElements/Numeric.js';
3
+ import { YesNo } from '../dataElements/YesNo.js';
2
4
  import { BusinessTransactionParameter, } from './businessTransactionParameter.js';
3
5
  /**
4
6
  * Parameters for HKSPA business transaction - SEPA account connection request
@@ -8,6 +10,13 @@ export class HISPAS extends BusinessTransactionParameter {
8
10
  static Id = 'HISPAS';
9
11
  version = 3;
10
12
  constructor() {
11
- super(HISPAS.Id, [new SepaAccountParametersGroup('sepaAccountParams', 1, 1)], 1);
13
+ super(HISPAS.Id, [
14
+ new YesNo('individualAccountRetrievalAllowed', 1, 1),
15
+ new YesNo('nationalAccountAllowed', 1, 1),
16
+ new YesNo('structuredPurposeAllowed', 1, 1),
17
+ new YesNo('maxEntriesAllowed', 1, 1, 2), // version 2+
18
+ new Numeric('reservedPurposePositions', 1, 1, 2, 3), // version 3+
19
+ new AlphaNumeric('supportedSepaFormats', 0, 99, 256), // optional, up to 99 entries
20
+ ], 1);
12
21
  }
13
22
  }
@@ -670,4 +670,189 @@ describe('CamtParser', () => {
670
670
  expect(transaction.purpose).toBe('Payment with party structure');
671
671
  expect(transaction.amount).toBe(200.0);
672
672
  });
673
+ it('should handle multiple entries in RmtInf (Ustrd)', () => {
674
+ const camtXml = `<?xml version="1.0" encoding="ISO-8859-1"?>
675
+ <Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.052.001.08"
676
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
677
+ xsi:schemaLocation="urn:iso:std:iso:20022:tech:xsd:camt.052.001.08 camt.052.001.08.xsd">
678
+ <BkToCstmrAcctRpt>
679
+ <GrpHdr>
680
+ <MsgId>52D20260106T1009246445830N000000000</MsgId>
681
+ <CreDtTm>2026-01-06T10:09:24.0+01:00</CreDtTm>
682
+ </GrpHdr>
683
+ <Rpt>
684
+ <Id>0752D522026010610092464000001000</Id>
685
+ <RptPgntn>
686
+ <PgNb>1</PgNb>
687
+ <LastPgInd>true</LastPgInd>
688
+ </RptPgntn>
689
+ <ElctrncSeqNb>000000000</ElctrncSeqNb>
690
+ <CreDtTm>2026-01-06T10:09:24.0+01:00</CreDtTm>
691
+ <Acct>
692
+ <Id>
693
+ <IBAN>DE06940594210000027227</IBAN>
694
+ </Id>
695
+ <Ccy>EUR</Ccy>
696
+ <Ownr>
697
+ <Nm>John Doe</Nm>
698
+ </Ownr>
699
+ <Svcr>
700
+ <FinInstnId>
701
+ <BICFI>BANKABC1XXX</BICFI>
702
+ <Nm>ABC Bank</Nm>
703
+ <Othr>
704
+ <Id>DE 123456789</Id>
705
+ <Issr>UmsStId</Issr>
706
+ </Othr>
707
+ </FinInstnId>
708
+ </Svcr>
709
+ </Acct>
710
+ <Bal>
711
+ <Tp>
712
+ <CdOrPrtry>
713
+ <Cd>OPBD</Cd>
714
+ </CdOrPrtry>
715
+ </Tp>
716
+ <Amt Ccy="EUR">27.31</Amt>
717
+ <CdtDbtInd>DBIT</CdtDbtInd>
718
+ <Dt>
719
+ <Dt>2026-01-05</Dt>
720
+ </Dt>
721
+ </Bal>
722
+ <Bal>
723
+ <Tp>
724
+ <CdOrPrtry>
725
+ <Cd>CLBD</Cd>
726
+ </CdOrPrtry>
727
+ </Tp>
728
+ <Amt Ccy="EUR">234.81</Amt>
729
+ <CdtDbtInd>DBIT</CdtDbtInd>
730
+ <Dt>
731
+ <Dt>2026-01-05</Dt>
732
+ </Dt>
733
+ </Bal>
734
+ <Ntry>
735
+ <Amt Ccy="EUR">179.46</Amt>
736
+ <CdtDbtInd>DBIT</CdtDbtInd>
737
+ <Sts>
738
+ <Cd>BOOK</Cd>
739
+ </Sts>
740
+ <BookgDt>
741
+ <Dt>2026-01-05</Dt>
742
+ </BookgDt>
743
+ <ValDt>
744
+ <Dt>2026-01-05</Dt>
745
+ </ValDt>
746
+ <AcctSvcrRef>TXN003</AcctSvcrRef>
747
+ <BkTxCd>
748
+ <Domn>
749
+ <Cd>PMNT</Cd>
750
+ <Fmly>
751
+ <Cd>ICDT</Cd>
752
+ <SubFmlyCd>ESCT</SubFmlyCd>
753
+ </Fmly>
754
+ </Domn>
755
+ <Prtry>
756
+ <Cd>NTRF+116+02089</Cd>
757
+ <Issr>DK</Issr>
758
+ </Prtry>
759
+ </BkTxCd>
760
+ <NtryDtls>
761
+ <TxDtls>
762
+ <Refs>
763
+ <MsgId>test msgid</MsgId>
764
+ <PmtInfId>VG 2025 QUARTAL IV 12345678</PmtInfId>
765
+ <EndToEndId>VG 2025 QUARTAL IV</EndToEndId>
766
+ </Refs>
767
+ <Amt Ccy="EUR">179.46</Amt>
768
+ <BkTxCd>
769
+ <Domn>
770
+ <Cd>PMNT</Cd>
771
+ <Fmly>
772
+ <Cd>ICDT</Cd>
773
+ <SubFmlyCd>ESCT</SubFmlyCd>
774
+ </Fmly>
775
+ </Domn>
776
+ <Prtry>
777
+ <Cd>NTRF+116+02189</Cd>
778
+ <Issr>DK</Issr>
779
+ </Prtry>
780
+ </BkTxCd>
781
+ <RltdPties>
782
+ <Dbtr>
783
+ <Pty>
784
+ <Nm>DOE</Nm>
785
+ </Pty>
786
+ </Dbtr>
787
+ <DbtrAcct>
788
+ <Id>
789
+ <IBAN>DE12345678901234567890</IBAN>
790
+ </Id>
791
+ </DbtrAcct>
792
+ <Cdtr>
793
+ <Pty>
794
+ <Nm>ABC Bank</Nm>
795
+ </Pty>
796
+ </Cdtr>
797
+ <CdtrAcct>
798
+ <Id>
799
+ <IBAN>DE12345678901234567891</IBAN>
800
+ </Id>
801
+ </CdtrAcct>
802
+ </RltdPties>
803
+ <RltdAgts>
804
+ <CdtrAgt>
805
+ <FinInstnId>
806
+ <BICFI>BANKABC1XXX</BICFI>
807
+ </FinInstnId>
808
+ </CdtrAgt>
809
+ </RltdAgts>
810
+ <RmtInf>
811
+ <Ustrd>28,65EUR EREF: VG 2025 QUARTAL IV IBAN</Ustrd>
812
+ <Ustrd>: DE12345678901234567891 BIC: BANKABC1XXX</Ustrd>
813
+ </RmtInf>
814
+ </TxDtls>
815
+ </NtryDtls>
816
+ <AddtlNtryInf>ENTGELT gem. Vereinbarung</AddtlNtryInf>
817
+ </Ntry>
818
+ </Rpt>
819
+ </BkToCstmrAcctRpt>
820
+ </Document>`;
821
+ const parser = new CamtParser(camtXml);
822
+ const statements = parser.parse();
823
+ expect(statements).toHaveLength(1);
824
+ const statement = statements[0];
825
+ expect(statement.transactions).toHaveLength(1);
826
+ const transaction = statement.transactions[0];
827
+ // Check all Transaction fields filled by the parser
828
+ expect(transaction.amount).toBe(-179.46);
829
+ expect(transaction.customerReference).toBe('VG 2025 QUARTAL IV');
830
+ expect(transaction.bankReference).toBe('TXN003');
831
+ expect(transaction.purpose).toBe('28,65EUR EREF: VG 2025 QUARTAL IV IBAN: DE12345678901234567891 BIC: BANKABC1XXX');
832
+ expect(transaction.remoteName).toBe('ABC Bank');
833
+ expect(transaction.remoteAccountNumber).toBe('DE12345678901234567891');
834
+ expect(transaction.remoteBankId).toBe('BANKABC1XXX');
835
+ expect(transaction.e2eReference).toBe('VG 2025 QUARTAL IV');
836
+ // Check date fields
837
+ expect(transaction.valueDate).toBeInstanceOf(Date);
838
+ expect(transaction.valueDate.getFullYear()).toBe(2026);
839
+ expect(transaction.valueDate.getMonth()).toBe(0); // November (0-based)
840
+ expect(transaction.valueDate.getDate()).toBe(5);
841
+ expect(transaction.entryDate).toBeInstanceOf(Date);
842
+ expect(transaction.entryDate.getFullYear()).toBe(2026);
843
+ expect(transaction.entryDate.getMonth()).toBe(0); // November (0-based)
844
+ expect(transaction.entryDate.getDate()).toBe(5);
845
+ // Check transaction type and code fields
846
+ expect(transaction.fundsCode).toBe('PMNT');
847
+ expect(transaction.transactionType).toBe('ICDT');
848
+ expect(transaction.transactionCode).toBe('ESCT');
849
+ // Check additional information fields
850
+ expect(transaction.additionalInformation).toBe('ENTGELT gem. Vereinbarung');
851
+ expect(transaction.bookingText).toBe('ENTGELT gem. Vereinbarung'); // Should match additionalInformation
852
+ // Verify optional fields not set in this test
853
+ expect(transaction.primeNotesNr).toBeUndefined();
854
+ expect(transaction.remoteIdentifier).toBeUndefined();
855
+ expect(transaction.client).toBeUndefined();
856
+ expect(transaction.textKeyExtension).toBeUndefined();
857
+ });
673
858
  });
@@ -1,6 +1,22 @@
1
+ import type { HICAZSParameter } from './segments/HICAZS.js';
2
+ import type { HIKAZSParameter } from './segments/HIKAZS.js';
3
+ import type { HISPASParameter } from './segments/HISPAS.js';
1
4
  export type BankTransaction = {
2
5
  transId: string;
3
6
  tanRequired: boolean;
4
7
  versions: number[];
8
+ params?: unknown;
9
+ };
10
+ export type SepaBankTransaction = BankTransaction & {
11
+ transId: 'HKSPA';
12
+ params: HISPASParameter;
13
+ };
14
+ export type StatementTransactionMT940 = BankTransaction & {
15
+ transId: 'HKKAZ';
16
+ params: HIKAZSParameter;
17
+ };
18
+ export type StatementTransactionCAMT = BankTransaction & {
19
+ transId: 'HKCAZ';
20
+ params: HICAZSParameter;
5
21
  };
6
22
  //# sourceMappingURL=bankTransaction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bankTransaction.d.ts","sourceRoot":"","sources":["../../src/bankTransaction.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC"}
1
+ {"version":3,"file":"bankTransaction.d.ts","sourceRoot":"","sources":["../../src/bankTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,MAAM,MAAM,eAAe,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,eAAe,GAAG;IACnD,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,eAAe,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,eAAe,GAAG;IACzD,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,eAAe,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,eAAe,GAAG;IACxD,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,eAAe,CAAC;CACxB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"camtParser.d.ts","sourceRoot":"","sources":["../../src/camtParser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAW,SAAS,EAAe,MAAM,gBAAgB,CAAC;AAsJtE,qBAAa,gBAAiB,SAAQ,KAAK;IAGlC,KAAK,CAAC;gBADb,OAAO,EAAE,MAAM,EACR,KAAK,CAAC,mBAAO;CAKrB;AAED,qBAAa,UAAU;IACtB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAAY;gBAEd,OAAO,EAAE,MAAM;IAoB3B,KAAK,IAAI,SAAS,EAAE;IA8CpB,OAAO,CAAC,iBAAiB;IAqBzB,OAAO,CAAC,UAAU;IAelB,OAAO,CAAC,WAAW;IAwEnB,OAAO,CAAC,gBAAgB;IAsBxB,OAAO,CAAC,aAAa;IAuFrB,OAAO,CAAC,iBAAiB;IA6BzB,OAAO,CAAC,gBAAgB;IA8ExB;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAwCxB;;;OAGG;IACH,OAAO,CAAC,aAAa;IA4BrB,OAAO,CAAC,SAAS;IAiBjB,OAAO,CAAC,wBAAwB;CAyBhC"}
1
+ {"version":3,"file":"camtParser.d.ts","sourceRoot":"","sources":["../../src/camtParser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAW,SAAS,EAAe,MAAM,gBAAgB,CAAC;AAsJtE,qBAAa,gBAAiB,SAAQ,KAAK;IAGlC,KAAK,CAAC;gBADb,OAAO,EAAE,MAAM,EACR,KAAK,CAAC,mBAAO;CAKrB;AAED,qBAAa,UAAU;IACtB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAAY;gBAEd,OAAO,EAAE,MAAM;IAoB3B,KAAK,IAAI,SAAS,EAAE;IA8CpB,OAAO,CAAC,iBAAiB;IAqBzB,OAAO,CAAC,UAAU;IAelB,OAAO,CAAC,WAAW;IAwEnB,OAAO,CAAC,gBAAgB;IAyBxB,OAAO,CAAC,aAAa;IAuFrB,OAAO,CAAC,iBAAiB;IA6BzB,OAAO,CAAC,gBAAgB;IA8ExB;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAwCxB;;;OAGG;IACH,OAAO,CAAC,aAAa;IA4BrB,OAAO,CAAC,SAAS;IAiBjB,OAAO,CAAC,wBAAwB;CAyBhC"}
@@ -75,6 +75,12 @@ export declare class FinTSConfig {
75
75
  * The currently selected TAN method for the user
76
76
  */
77
77
  get selectedTanMethod(): TanMethod | undefined;
78
+ /**
79
+ * Gets the transaction parameters for a specific transaction ID
80
+ * @param transId The transaction ID
81
+ * @returns The transaction parameters or undefined if not available
82
+ */
83
+ getTransactionParameters<T>(transId: string): T | undefined;
78
84
  /**
79
85
  * Checks if a transaction is supported by the bank
80
86
  * @param transId The transaction ID
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;GAEG;AACH,qBAAa,WAAW;IAKf,SAAS,EAAE,MAAM;IACjB,cAAc,EAAE,MAAM;IAC7B,OAAO,CAAC,GAAG,CAAC;IACZ,OAAO,CAAC,kBAA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MAAM,EACZ,WAAW,CAAC,EAAE,MAAM,EACpB,YAAY,CAAC,EAAE,MAAM,EACrB,UAAU,CAAC,EAAE,MAAM,EACnB,WAAW,GAAE,MAAY,GACvB,WAAW;IAgBd;;OAEG;IACH,IAAI,UAAU,IAAI,MAAM,CAEvB;IAED;;OAEG;IACH,IAAI,WAAW,IAAI,MAAM,CAExB;IAED;;OAEG;IACH,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED;;OAEG;IACH,IAAI,mBAAmB,IAAI,SAAS,EAAE,CAMrC;IAED;;;OAGG;IACH,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS;IAU/C;;;OAGG;IACH,cAAc,CAAC,YAAY,EAAE,MAAM;IAcnC;;OAEG;IACH,IAAI,iBAAiB,IAAI,SAAS,GAAG,SAAS,CAE7C;IAED;;;;OAIG;IACH,wBAAwB,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;IAO3D;;;OAGG;IACH,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAOhD;;;;OAIG;IACH,6BAA6B,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO;IAK9E;;;OAGG;IACH,iCAAiC,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAgBtE;;;OAGG;IACH,cAAc,CAAC,aAAa,EAAE,MAAM,GAAG,WAAW;CAWlD"}
@@ -1 +1 @@
1
- {"version":3,"file":"initDialogInteraction.d.ts","sourceRoot":"","sources":["../../../src/interactions/initDialogInteraction.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAe,MAAM,0BAA0B,CAAC;AAGhF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAe7C,OAAO,EAAE,KAAK,cAAc,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAIpF,MAAM,WAAW,YAAa,SAAQ,cAAc;IACnD,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACxC;AAED,qBAAa,qBAAsB,SAAQ,mBAAmB;IAErD,MAAM,EAAE,WAAW;IACnB,YAAY;gBADZ,MAAM,EAAE,WAAW,EACnB,YAAY,UAAQ;IAK5B,cAAc,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,EAAE;IAoC5C,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,YAAY;CAkK9D"}
1
+ {"version":3,"file":"initDialogInteraction.d.ts","sourceRoot":"","sources":["../../../src/interactions/initDialogInteraction.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAe,MAAM,0BAA0B,CAAC;AAGhF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAgB7C,OAAO,EAAE,KAAK,cAAc,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAIpF,MAAM,WAAW,YAAa,SAAQ,cAAc;IACnD,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACxC;AAED,qBAAa,qBAAsB,SAAQ,mBAAmB;IAErD,MAAM,EAAE,WAAW;IACnB,YAAY;gBADZ,MAAM,EAAE,WAAW,EACnB,YAAY,UAAQ;IAK5B,cAAc,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,EAAE;IAoC5C,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,YAAY;CA0K9D"}
@@ -6,7 +6,6 @@ export declare class StatementInteractionCAMT extends CustomerOrderInteraction {
6
6
  accountNumber: string;
7
7
  from?: Date | undefined;
8
8
  to?: Date | undefined;
9
- private acceptedCamtFormats;
10
9
  constructor(accountNumber: string, from?: Date | undefined, to?: Date | undefined);
11
10
  createSegments(init: FinTSConfig): Segment[];
12
11
  handleResponse(response: Message, clientResponse: StatementResponse): void;
@@ -1 +1 @@
1
- {"version":3,"file":"statementInteractionCAMT.d.ts","sourceRoot":"","sources":["../../../src/interactions/statementInteractionCAMT.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAI7C,OAAO,EAAE,wBAAwB,EAAE,KAAK,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE5F,qBAAa,wBAAyB,SAAQ,wBAAwB;IAI7D,aAAa,EAAE,MAAM;IACrB,IAAI,CAAC;IACL,EAAE,CAAC;IALX,OAAO,CAAC,mBAAmB,CAAgE;gBAGnF,aAAa,EAAE,MAAM,EACrB,IAAI,CAAC,kBAAM,EACX,EAAE,CAAC,kBAAM;IAKjB,cAAc,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,EAAE;IAmB5C,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,iBAAiB;CAoBnE"}
1
+ {"version":3,"file":"statementInteractionCAMT.d.ts","sourceRoot":"","sources":["../../../src/interactions/statementInteractionCAMT.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAK7C,OAAO,EAAE,wBAAwB,EAAE,KAAK,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE5F,qBAAa,wBAAyB,SAAQ,wBAAwB;IAE7D,aAAa,EAAE,MAAM;IACrB,IAAI,CAAC;IACL,EAAE,CAAC;gBAFH,aAAa,EAAE,MAAM,EACrB,IAAI,CAAC,kBAAM,EACX,EAAE,CAAC,kBAAM;IAKjB,cAAc,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,EAAE;IA6B5C,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,iBAAiB;CAoBnE"}
@@ -1,7 +1,13 @@
1
- import { type SepaAccountParameters } from '../dataGroups/SepaAccountParameters.js';
2
1
  import { BusinessTransactionParameter, type BusinessTransactionParameterSegment } from './businessTransactionParameter.js';
3
- export type HISPASSegment = BusinessTransactionParameterSegment<SepaAccountParameters>;
4
- export type HISPASParameter = SepaAccountParameters;
2
+ export type HISPASSegment = BusinessTransactionParameterSegment<HISPASParameter>;
3
+ export type HISPASParameter = {
4
+ individualAccountRetrievalAllowed: boolean;
5
+ nationalAccountAllowed: boolean;
6
+ structuredPurposeAllowed: boolean;
7
+ maxEntriesAllowed?: boolean;
8
+ reservedPurposePositions?: number;
9
+ supportedSepaFormats?: string[];
10
+ };
5
11
  /**
6
12
  * Parameters for HKSPA business transaction - SEPA account connection request
7
13
  * Version 3 supports all parameters including reserved purpose positions
@@ -1 +1 @@
1
- {"version":3,"file":"HISPAS.d.ts","sourceRoot":"","sources":["../../../src/segments/HISPAS.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,qBAAqB,EAE1B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACN,4BAA4B,EAC5B,KAAK,mCAAmC,EACxC,MAAM,mCAAmC,CAAC;AAE3C,MAAM,MAAM,aAAa,GAAG,mCAAmC,CAAC,qBAAqB,CAAC,CAAC;AAEvF,MAAM,MAAM,eAAe,GAAG,qBAAqB,CAAC;AAEpD;;;GAGG;AACH,qBAAa,MAAO,SAAQ,4BAA4B;IACvD,MAAM,CAAC,EAAE,SAAY;IACrB,OAAO,SAAK;;CASZ"}
1
+ {"version":3,"file":"HISPAS.d.ts","sourceRoot":"","sources":["../../../src/segments/HISPAS.ts"],"names":[],"mappings":"AAGA,OAAO,EACN,4BAA4B,EAC5B,KAAK,mCAAmC,EACxC,MAAM,mCAAmC,CAAC;AAE3C,MAAM,MAAM,aAAa,GAAG,mCAAmC,CAAC,eAAe,CAAC,CAAC;AAEjF,MAAM,MAAM,eAAe,GAAG;IAC7B,iCAAiC,EAAE,OAAO,CAAC;IAC3C,sBAAsB,EAAE,OAAO,CAAC;IAChC,wBAAwB,EAAE,OAAO,CAAC;IAClC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;CAChC,CAAC;AAEF;;;GAGG;AACH,qBAAa,MAAO,SAAQ,4BAA4B;IACvD,MAAM,CAAC,EAAE,SAAY;IACrB,OAAO,SAAK;;CAgBZ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lib-fints",
3
- "version": "1.4.2",
3
+ "version": "1.4.4",
4
4
  "description": "Typescript/Javascript client library for Online-Banking via the FinTS 3.0 protocol with PIN/TAN",
5
5
  "engines": {
6
6
  "node": ">=18.0.0"
@@ -1,16 +0,0 @@
1
- import { AlphaNumeric } from '../dataElements/AlphaNumeric.js';
2
- import { Numeric } from '../dataElements/Numeric.js';
3
- import { YesNo } from '../dataElements/YesNo.js';
4
- import { DataGroup } from './DataGroup.js';
5
- export class SepaAccountParametersGroup extends DataGroup {
6
- constructor(name, minCount = 1, maxCount = 1, minVersion, maxVersion) {
7
- super(name, [
8
- new YesNo('individualAccountRetrievalAllowed', 1, 1),
9
- new YesNo('nationalAccountAllowed', 1, 1),
10
- new YesNo('structuredPurposeAllowed', 1, 1),
11
- new YesNo('maxEntriesAllowed', 1, 1, 2), // version 2+
12
- new Numeric('reservedPurposePositions', 1, 1, 2, 3), // version 3+
13
- new AlphaNumeric('supportedSepaFormats', 0, 99, 256), // optional, up to 99 entries
14
- ], minCount, maxCount, minVersion, maxVersion);
15
- }
16
- }
@@ -1,13 +0,0 @@
1
- import { DataGroup } from './DataGroup.js';
2
- export type SepaAccountParameters = {
3
- individualAccountRetrievalAllowed: boolean;
4
- nationalAccountAllowed: boolean;
5
- structuredPurposeAllowed: boolean;
6
- maxEntriesAllowed?: boolean;
7
- reservedPurposePositions?: number;
8
- supportedSepaFormats?: string[];
9
- };
10
- export declare class SepaAccountParametersGroup extends DataGroup {
11
- constructor(name: string, minCount?: number, maxCount?: number, minVersion?: number, maxVersion?: number);
12
- }
13
- //# sourceMappingURL=SepaAccountParameters.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SepaAccountParameters.d.ts","sourceRoot":"","sources":["../../../src/dataGroups/SepaAccountParameters.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,MAAM,qBAAqB,GAAG;IACnC,iCAAiC,EAAE,OAAO,CAAC;IAC3C,sBAAsB,EAAE,OAAO,CAAC;IAChC,wBAAwB,EAAE,OAAO,CAAC;IAClC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;CAChC,CAAC;AAEF,qBAAa,0BAA2B,SAAQ,SAAS;gBAC5C,IAAI,EAAE,MAAM,EAAE,QAAQ,SAAI,EAAE,QAAQ,SAAI,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM;CAiB9F"}