lib-fints 1.4.1 → 1.4.3
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 +1 -1
- package/dist/camtParser.js +21 -9
- package/dist/client.js +31 -20
- package/dist/config.js +10 -6
- package/dist/dataElements/AlphaNumeric.js +1 -1
- package/dist/dataElements/DataElement.js +2 -1
- package/dist/dataElements/Digits.js +1 -1
- package/dist/dataElements/Float.js +1 -1
- package/dist/dataElements/Numeric.js +2 -2
- package/dist/dataElements/Text.js +1 -1
- package/dist/dataGroups/Account.js +1 -1
- package/dist/dataGroups/Balance.js +2 -2
- package/dist/dataGroups/BankIdentification.js +1 -1
- package/dist/dataGroups/DataGroup.js +13 -6
- package/dist/dataGroups/InternationalAccount.js +1 -1
- package/dist/dataGroups/Money.js +1 -1
- package/dist/dataGroups/RefMessage.js +1 -1
- package/dist/dataGroups/SepaAccount.js +2 -2
- package/dist/dataGroups/SepaAccountParameters.js +2 -2
- package/dist/dataGroups/TimeStamp.js +1 -1
- package/dist/decoder.js +12 -6
- package/dist/dialog.js +33 -19
- package/dist/encoder.js +16 -4
- package/dist/format.js +2 -2
- package/dist/httpClient.js +4 -2
- package/dist/index.js +10 -10
- package/dist/interactions/balanceInteraction.js +2 -5
- package/dist/interactions/creditcardStatementInteraction.js +11 -11
- package/dist/interactions/customerInteraction.js +1 -1
- package/dist/interactions/endDialogInteraction.js +4 -4
- package/dist/interactions/initDialogInteraction.js +23 -20
- package/dist/interactions/portfolioInteraction.js +3 -3
- package/dist/interactions/sepaAccountInteraction.js +3 -3
- package/dist/interactions/statementInteractionCAMT.js +4 -4
- package/dist/interactions/statementInteractionMT940.js +4 -4
- package/dist/interactions/tanMediaInteraction.js +4 -4
- package/dist/message.js +51 -18
- package/dist/mt535parser.js +3 -5
- package/dist/mt940parser.js +18 -17
- package/dist/parser.js +1 -1
- package/dist/segment.js +12 -7
- package/dist/segmentDefinition.js +5 -2
- package/dist/segmentHeader.js +1 -1
- package/dist/segments/DIKKU.js +3 -3
- package/dist/segments/DKKKU.js +2 -2
- package/dist/segments/HIBPA.js +2 -2
- package/dist/segments/HICAZ.js +1 -1
- package/dist/segments/HICAZS.js +3 -3
- package/dist/segments/HIKAZS.js +7 -3
- package/dist/segments/HIKIM.js +1 -1
- package/dist/segments/HIKOM.js +1 -1
- package/dist/segments/HIPINS.js +3 -3
- package/dist/segments/HIRMG.js +1 -1
- package/dist/segments/HIRMS.js +1 -1
- package/dist/segments/HISAL.js +3 -3
- package/dist/segments/HISPAS.js +3 -4
- package/dist/segments/HISYN.js +1 -1
- package/dist/segments/HITAB.js +3 -3
- package/dist/segments/HITAN.js +3 -3
- package/dist/segments/HITANS.js +3 -3
- package/dist/segments/HIUPA.js +2 -2
- package/dist/segments/HIUPD.js +8 -4
- package/dist/segments/HKCAZ.js +3 -3
- package/dist/segments/HKIDN.js +1 -1
- package/dist/segments/HKKAZ.js +3 -3
- package/dist/segments/HKSAL.js +3 -3
- package/dist/segments/HKSPA.js +1 -1
- package/dist/segments/HKTAB.js +1 -1
- package/dist/segments/HKTAN.js +3 -3
- package/dist/segments/HKVVB.js +1 -1
- package/dist/segments/HKWPD.js +1 -1
- package/dist/segments/HNHBK.js +1 -1
- package/dist/segments/HNSHA.js +1 -1
- package/dist/segments/HNSHK.js +14 -6
- package/dist/segments/HNVSK.js +10 -6
- package/dist/segments/registry.js +31 -31
- package/dist/tests/HIBPA.test.js +3 -3
- package/dist/tests/HICAZS.test.js +2 -2
- package/dist/tests/HIPINS.test.js +2 -2
- package/dist/tests/HIRMG.test.js +2 -2
- package/dist/tests/HITAB.test.js +5 -5
- package/dist/tests/HITANS.test.js +2 -2
- package/dist/tests/HIUPA.test.js +2 -2
- package/dist/tests/HIUPD.test.js +2 -2
- package/dist/tests/HIWPD.test.js +2 -2
- package/dist/tests/HKCAZ.test.js +3 -3
- package/dist/tests/HKIDN.test.js +2 -2
- package/dist/tests/HKSAL.test.js +3 -3
- package/dist/tests/HKTAN.test.js +4 -4
- package/dist/tests/HKWPD.test.js +2 -2
- package/dist/tests/HNSHK.test.js +2 -2
- package/dist/tests/HNVSK.test.js +2 -2
- package/dist/tests/camtParser.test.js +188 -3
- package/dist/tests/client.test.js +15 -15
- package/dist/tests/datatypes.test.js +1 -1
- package/dist/tests/dialog.test.js +21 -14
- package/dist/tests/message.test.js +4 -4
- package/dist/tests/mt535parser.test.js +1 -3
- package/dist/types/accountBalance.d.ts.map +1 -1
- package/dist/types/bankAccount.d.ts +2 -2
- package/dist/types/bankAccount.d.ts.map +1 -1
- package/dist/types/bankAnswer.d.ts.map +1 -1
- package/dist/types/bankTransaction.d.ts.map +1 -1
- package/dist/types/bankingInformation.d.ts +2 -2
- package/dist/types/bankingInformation.d.ts.map +1 -1
- package/dist/types/bpd.d.ts +3 -3
- package/dist/types/bpd.d.ts.map +1 -1
- package/dist/types/camtParser.d.ts +1 -1
- package/dist/types/camtParser.d.ts.map +1 -1
- package/dist/types/client.d.ts +11 -11
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/config.d.ts +4 -4
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/creditCardStatement.d.ts.map +1 -1
- package/dist/types/dataElements/AlphaNumeric.d.ts.map +1 -1
- package/dist/types/dataElements/Amount.d.ts.map +1 -1
- package/dist/types/dataElements/Binary.d.ts.map +1 -1
- package/dist/types/dataElements/Country.d.ts.map +1 -1
- package/dist/types/dataElements/Currency.d.ts.map +1 -1
- package/dist/types/dataElements/Dat.d.ts.map +1 -1
- package/dist/types/dataElements/DataElement.d.ts +3 -3
- package/dist/types/dataElements/DataElement.d.ts.map +1 -1
- package/dist/types/dataElements/Digits.d.ts.map +1 -1
- package/dist/types/dataElements/Float.d.ts.map +1 -1
- package/dist/types/dataElements/Identification.d.ts.map +1 -1
- package/dist/types/dataElements/Numeric.d.ts.map +1 -1
- package/dist/types/dataElements/Text.d.ts.map +1 -1
- package/dist/types/dataElements/Time.d.ts.map +1 -1
- package/dist/types/dataElements/YesNo.d.ts.map +1 -1
- package/dist/types/dataGroups/Account.d.ts.map +1 -1
- package/dist/types/dataGroups/Balance.d.ts +1 -1
- package/dist/types/dataGroups/Balance.d.ts.map +1 -1
- package/dist/types/dataGroups/BankIdentification.d.ts.map +1 -1
- package/dist/types/dataGroups/DataGroup.d.ts +3 -3
- package/dist/types/dataGroups/DataGroup.d.ts.map +1 -1
- package/dist/types/dataGroups/InternationalAccount.d.ts +1 -1
- package/dist/types/dataGroups/InternationalAccount.d.ts.map +1 -1
- package/dist/types/dataGroups/Money.d.ts.map +1 -1
- package/dist/types/dataGroups/RefMessage.d.ts.map +1 -1
- package/dist/types/dataGroups/SepaAccount.d.ts +1 -1
- package/dist/types/dataGroups/SepaAccount.d.ts.map +1 -1
- package/dist/types/dataGroups/TimeStamp.d.ts.map +1 -1
- package/dist/types/decoder.d.ts +2 -2
- package/dist/types/decoder.d.ts.map +1 -1
- package/dist/types/dialog.d.ts +2 -2
- package/dist/types/dialog.d.ts.map +1 -1
- package/dist/types/encoder.d.ts +2 -2
- package/dist/types/encoder.d.ts.map +1 -1
- package/dist/types/httpClient.d.ts +1 -1
- package/dist/types/httpClient.d.ts.map +1 -1
- package/dist/types/index.d.ts +12 -13
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/interactions/balanceInteraction.d.ts +5 -5
- package/dist/types/interactions/balanceInteraction.d.ts.map +1 -1
- package/dist/types/interactions/creditcardStatementInteraction.d.ts +6 -6
- package/dist/types/interactions/creditcardStatementInteraction.d.ts.map +1 -1
- package/dist/types/interactions/customerInteraction.d.ts +6 -6
- package/dist/types/interactions/customerInteraction.d.ts.map +1 -1
- package/dist/types/interactions/endDialogInteraction.d.ts +6 -6
- package/dist/types/interactions/endDialogInteraction.d.ts.map +1 -1
- package/dist/types/interactions/initDialogInteraction.d.ts +5 -5
- package/dist/types/interactions/initDialogInteraction.d.ts.map +1 -1
- package/dist/types/interactions/portfolioInteraction.d.ts +5 -5
- package/dist/types/interactions/portfolioInteraction.d.ts.map +1 -1
- package/dist/types/interactions/sepaAccountInteraction.d.ts +5 -5
- package/dist/types/interactions/sepaAccountInteraction.d.ts.map +1 -1
- package/dist/types/interactions/statementInteractionCAMT.d.ts +4 -4
- package/dist/types/interactions/statementInteractionCAMT.d.ts.map +1 -1
- package/dist/types/interactions/statementInteractionMT940.d.ts +4 -4
- package/dist/types/interactions/statementInteractionMT940.d.ts.map +1 -1
- package/dist/types/interactions/tanMediaInteraction.d.ts +4 -4
- package/dist/types/interactions/tanMediaInteraction.d.ts.map +1 -1
- package/dist/types/message.d.ts +3 -3
- package/dist/types/message.d.ts.map +1 -1
- package/dist/types/mt535parser.d.ts +0 -1
- package/dist/types/mt535parser.d.ts.map +1 -1
- package/dist/types/mt940parser.d.ts +1 -2
- package/dist/types/mt940parser.d.ts.map +1 -1
- package/dist/types/partedSegment.d.ts +1 -1
- package/dist/types/partedSegment.d.ts.map +1 -1
- package/dist/types/segment.d.ts +1 -1
- package/dist/types/segment.d.ts.map +1 -1
- package/dist/types/segmentDefinition.d.ts +2 -2
- package/dist/types/segmentDefinition.d.ts.map +1 -1
- package/dist/types/segmentHeader.d.ts.map +1 -1
- package/dist/types/segments/DIKKU.d.ts +4 -4
- package/dist/types/segments/DIKKU.d.ts.map +1 -1
- package/dist/types/segments/DKKKU.d.ts +3 -3
- package/dist/types/segments/DKKKU.d.ts.map +1 -1
- package/dist/types/segments/HIBPA.d.ts +5 -5
- package/dist/types/segments/HIBPA.d.ts.map +1 -1
- package/dist/types/segments/HICAZ.d.ts +2 -2
- package/dist/types/segments/HICAZ.d.ts.map +1 -1
- package/dist/types/segments/HICAZS.d.ts +1 -1
- package/dist/types/segments/HICAZS.d.ts.map +1 -1
- package/dist/types/segments/HIKAZ.d.ts +1 -1
- package/dist/types/segments/HIKAZ.d.ts.map +1 -1
- package/dist/types/segments/HIKAZS.d.ts +1 -1
- package/dist/types/segments/HIKAZS.d.ts.map +1 -1
- package/dist/types/segments/HIKIM.d.ts +2 -2
- package/dist/types/segments/HIKIM.d.ts.map +1 -1
- package/dist/types/segments/HIKOM.d.ts +3 -3
- package/dist/types/segments/HIKOM.d.ts.map +1 -1
- package/dist/types/segments/HIPINS.d.ts +1 -1
- package/dist/types/segments/HIPINS.d.ts.map +1 -1
- package/dist/types/segments/HIRMG.d.ts +1 -1
- package/dist/types/segments/HIRMG.d.ts.map +1 -1
- package/dist/types/segments/HIRMS.d.ts +2 -2
- package/dist/types/segments/HIRMS.d.ts.map +1 -1
- package/dist/types/segments/HISAL.d.ts +7 -7
- package/dist/types/segments/HISAL.d.ts.map +1 -1
- package/dist/types/segments/HISPA.d.ts +2 -2
- package/dist/types/segments/HISPA.d.ts.map +1 -1
- package/dist/types/segments/HISPAS.d.ts +2 -2
- package/dist/types/segments/HISPAS.d.ts.map +1 -1
- package/dist/types/segments/HISYN.d.ts +2 -2
- package/dist/types/segments/HISYN.d.ts.map +1 -1
- package/dist/types/segments/HITAB.d.ts +4 -4
- package/dist/types/segments/HITAB.d.ts.map +1 -1
- package/dist/types/segments/HITAN.d.ts +5 -5
- package/dist/types/segments/HITAN.d.ts.map +1 -1
- package/dist/types/segments/HITANS.d.ts +2 -2
- package/dist/types/segments/HITANS.d.ts.map +1 -1
- package/dist/types/segments/HIUPA.d.ts +3 -3
- package/dist/types/segments/HIUPA.d.ts.map +1 -1
- package/dist/types/segments/HIUPD.d.ts +6 -6
- package/dist/types/segments/HIUPD.d.ts.map +1 -1
- package/dist/types/segments/HIWPD.d.ts +1 -1
- package/dist/types/segments/HIWPD.d.ts.map +1 -1
- package/dist/types/segments/HKCAZ.d.ts +5 -5
- package/dist/types/segments/HKCAZ.d.ts.map +1 -1
- package/dist/types/segments/HKEND.d.ts +1 -1
- package/dist/types/segments/HKEND.d.ts.map +1 -1
- package/dist/types/segments/HKIDN.d.ts +3 -3
- package/dist/types/segments/HKIDN.d.ts.map +1 -1
- package/dist/types/segments/HKKAZ.d.ts +5 -5
- package/dist/types/segments/HKKAZ.d.ts.map +1 -1
- package/dist/types/segments/HKSAL.d.ts +6 -6
- package/dist/types/segments/HKSAL.d.ts.map +1 -1
- package/dist/types/segments/HKSPA.d.ts +3 -3
- package/dist/types/segments/HKSPA.d.ts.map +1 -1
- package/dist/types/segments/HKSYN.d.ts +2 -2
- package/dist/types/segments/HKSYN.d.ts.map +1 -1
- package/dist/types/segments/HKTAB.d.ts +3 -3
- package/dist/types/segments/HKTAB.d.ts.map +1 -1
- package/dist/types/segments/HKTAN.d.ts +6 -6
- package/dist/types/segments/HKTAN.d.ts.map +1 -1
- package/dist/types/segments/HKVVB.d.ts +3 -3
- package/dist/types/segments/HKVVB.d.ts.map +1 -1
- package/dist/types/segments/HKWPD.d.ts +2 -2
- package/dist/types/segments/HKWPD.d.ts.map +1 -1
- package/dist/types/segments/HNHBK.d.ts +3 -3
- package/dist/types/segments/HNHBK.d.ts.map +1 -1
- package/dist/types/segments/HNHBS.d.ts +1 -1
- package/dist/types/segments/HNHBS.d.ts.map +1 -1
- package/dist/types/segments/HNSHA.d.ts +3 -3
- package/dist/types/segments/HNSHA.d.ts.map +1 -1
- package/dist/types/segments/HNSHK.d.ts +4 -4
- package/dist/types/segments/HNSHK.d.ts.map +1 -1
- package/dist/types/segments/HNVSD.d.ts +2 -2
- package/dist/types/segments/HNVSD.d.ts.map +1 -1
- package/dist/types/segments/HNVSK.d.ts +4 -4
- package/dist/types/segments/HNVSK.d.ts.map +1 -1
- package/dist/types/segments/businessTransactionParameter.d.ts +2 -2
- package/dist/types/segments/businessTransactionParameter.d.ts.map +1 -1
- package/dist/types/segments/registry.d.ts +1 -1
- package/dist/types/segments/registry.d.ts.map +1 -1
- package/dist/types/tanMethod.d.ts +1 -1
- package/dist/types/tanMethod.d.ts.map +1 -1
- package/dist/types/unknownSegment.d.ts +1 -1
- package/dist/types/unknownSegment.d.ts.map +1 -1
- package/dist/types/upd.d.ts +2 -2
- package/dist/types/upd.d.ts.map +1 -1
- package/package.json +48 -47
package/dist/mt940parser.js
CHANGED
|
@@ -26,7 +26,7 @@ const tokens = {
|
|
|
26
26
|
PurposeTag: /^[A-Z]{4}\+/,
|
|
27
27
|
SingleAlpha: /^[A-Z]/,
|
|
28
28
|
StatementNumber: /^\d+\/?\d*/,
|
|
29
|
-
CustomerReference: /^[
|
|
29
|
+
CustomerReference: /^[^/\r\n]+/,
|
|
30
30
|
BankReference: /^\/\/([^\r\n]+)/,
|
|
31
31
|
CreditDebit: /^C|D|RC|RD/,
|
|
32
32
|
Date: /^\d{6}/,
|
|
@@ -34,7 +34,7 @@ const tokens = {
|
|
|
34
34
|
Decimal: /^\d+,\d*/,
|
|
35
35
|
Currency: /^[A-Z]{3}/,
|
|
36
36
|
TextToEndOfLine: /^[^\r\n]+/,
|
|
37
|
-
TextToNextSubTag: /^[
|
|
37
|
+
TextToNextSubTag: /^[^?]+/,
|
|
38
38
|
TextToNextPurposeTag: /^(.*?)(?=\s[A-Z]{4}\+|$)/,
|
|
39
39
|
NextNonTagLine: /^\r\n([^:][^\r\n]*)/,
|
|
40
40
|
TransactionType: /^[A-Z][0-9A-Z]{3}/,
|
|
@@ -42,7 +42,6 @@ const tokens = {
|
|
|
42
42
|
WhiteSpace: /^\s+/,
|
|
43
43
|
};
|
|
44
44
|
export class Mt940Parser {
|
|
45
|
-
input;
|
|
46
45
|
tokenizer;
|
|
47
46
|
statements = [];
|
|
48
47
|
currentStatement = {
|
|
@@ -50,7 +49,6 @@ export class Mt940Parser {
|
|
|
50
49
|
};
|
|
51
50
|
currentTransaction;
|
|
52
51
|
constructor(input) {
|
|
53
|
-
this.input = input;
|
|
54
52
|
this.tokenizer = new Mt940Tokenizer(input);
|
|
55
53
|
}
|
|
56
54
|
parse() {
|
|
@@ -58,7 +56,7 @@ export class Mt940Parser {
|
|
|
58
56
|
if (this.tokenizer.parseNextToken(TokenType.WhiteSpace, false)) {
|
|
59
57
|
continue;
|
|
60
58
|
}
|
|
61
|
-
|
|
59
|
+
const tag = this.tokenizer.parseNextToken(TokenType.Tag, false);
|
|
62
60
|
if (tag) {
|
|
63
61
|
switch (tag) {
|
|
64
62
|
case ':20:':
|
|
@@ -92,15 +90,15 @@ export class Mt940Parser {
|
|
|
92
90
|
}
|
|
93
91
|
this.currentStatement.forwardBalances.push(this.parseBalance());
|
|
94
92
|
break;
|
|
95
|
-
case ':61:':
|
|
93
|
+
case ':61:': {
|
|
96
94
|
const valueDate = this.parseDate(true);
|
|
97
95
|
let entryDate = valueDate;
|
|
98
|
-
|
|
96
|
+
const entryDateString = this.tokenizer.parseNextToken(TokenType.ShortDate, false);
|
|
99
97
|
if (entryDateString) {
|
|
100
98
|
const valueYear = valueDate.getFullYear();
|
|
101
99
|
const valueMonth = valueDate.getMonth() + 1;
|
|
102
|
-
const entryMonth = parseInt(entryDateString.substring(0, 2));
|
|
103
|
-
const entryDay = parseInt(entryDateString.substring(2, 4));
|
|
100
|
+
const entryMonth = parseInt(entryDateString.substring(0, 2), 10);
|
|
101
|
+
const entryDay = parseInt(entryDateString.substring(2, 4), 10);
|
|
104
102
|
const entryYear = entryMonth <= valueMonth ? valueYear : valueYear - 1;
|
|
105
103
|
entryDate = new Date(entryYear, entryMonth - 1, entryDay);
|
|
106
104
|
}
|
|
@@ -124,9 +122,10 @@ export class Mt940Parser {
|
|
|
124
122
|
bankReference: bankReference,
|
|
125
123
|
additionalInformation: additionalInformation,
|
|
126
124
|
};
|
|
127
|
-
this.currentStatement.transactions
|
|
125
|
+
this.currentStatement.transactions?.push(this.currentTransaction);
|
|
128
126
|
break;
|
|
129
|
-
|
|
127
|
+
}
|
|
128
|
+
case ':86:': {
|
|
130
129
|
let infoToAccountOwner = this.tokenizer.parseNextToken(TokenType.TextToEndOfLine, true);
|
|
131
130
|
let nextLine;
|
|
132
131
|
do {
|
|
@@ -137,6 +136,7 @@ export class Mt940Parser {
|
|
|
137
136
|
} while (nextLine);
|
|
138
137
|
this.parseInfoToAccountOwner(infoToAccountOwner);
|
|
139
138
|
break;
|
|
139
|
+
}
|
|
140
140
|
default:
|
|
141
141
|
this.tokenizer.parseNextToken(TokenType.TextToEndOfLine, false);
|
|
142
142
|
break;
|
|
@@ -178,7 +178,7 @@ export class Mt940Parser {
|
|
|
178
178
|
case '?60':
|
|
179
179
|
case '?61':
|
|
180
180
|
case '?62':
|
|
181
|
-
case '?63':
|
|
181
|
+
case '?63': {
|
|
182
182
|
if (!this.currentTransaction.purpose) {
|
|
183
183
|
this.currentTransaction.purpose = '';
|
|
184
184
|
}
|
|
@@ -191,6 +191,7 @@ export class Mt940Parser {
|
|
|
191
191
|
}
|
|
192
192
|
this.currentTransaction.purpose += subFieldTokenizer.parseNextToken(TokenType.TextToNextSubTag, true);
|
|
193
193
|
break;
|
|
194
|
+
}
|
|
194
195
|
case '?30':
|
|
195
196
|
this.currentTransaction.remoteBankId = subFieldTokenizer.parseNextToken(TokenType.TextToNextSubTag, true);
|
|
196
197
|
break;
|
|
@@ -269,14 +270,14 @@ export class Mt940Parser {
|
|
|
269
270
|
}
|
|
270
271
|
parseDate(isMandatory = true) {
|
|
271
272
|
const date = this.tokenizer.parseNextToken(TokenType.Date, isMandatory);
|
|
272
|
-
const year = parseInt(date.substring(0, 2)) + 2000;
|
|
273
|
-
const month = parseInt(date.substring(2, 4));
|
|
274
|
-
const day = parseInt(date.substring(4, 6));
|
|
273
|
+
const year = parseInt(date.substring(0, 2), 10) + 2000;
|
|
274
|
+
const month = parseInt(date.substring(2, 4), 10);
|
|
275
|
+
const day = parseInt(date.substring(4, 6), 10);
|
|
275
276
|
return new Date(year, month - 1, day);
|
|
276
277
|
}
|
|
277
278
|
parseAmount(creditDebit, isMandatory = true) {
|
|
278
279
|
const amount = this.tokenizer.parseNextToken(TokenType.Decimal, isMandatory);
|
|
279
|
-
return parseFloat(amount.replace(',', '.')) * (creditDebit === 'D' || creditDebit
|
|
280
|
+
return (parseFloat(amount.replace(',', '.')) * (creditDebit === 'D' || creditDebit === 'RC' ? -1 : 1));
|
|
280
281
|
}
|
|
281
282
|
}
|
|
282
283
|
export class Mt940Tokenizer {
|
|
@@ -287,7 +288,7 @@ export class Mt940Tokenizer {
|
|
|
287
288
|
this.input = input;
|
|
288
289
|
}
|
|
289
290
|
parseNextToken(type, isMandatory) {
|
|
290
|
-
|
|
291
|
+
const matched = this.match(tokens[type]);
|
|
291
292
|
if (matched) {
|
|
292
293
|
this.position += matched[0].length;
|
|
293
294
|
this.lastToken = matched.length > 1 ? matched[1] : matched[0];
|
package/dist/parser.js
CHANGED
|
@@ -5,7 +5,7 @@ export function splitBySeparator(text, separator) {
|
|
|
5
5
|
const char = text[index];
|
|
6
6
|
if (char === '@' && !isEscaped(text, index)) {
|
|
7
7
|
const next = text.indexOf('@', index + 1);
|
|
8
|
-
const size = Number.parseInt(text.slice(index + 1, next));
|
|
8
|
+
const size = Number.parseInt(text.slice(index + 1, next), 10);
|
|
9
9
|
if (size) {
|
|
10
10
|
index = next + size;
|
|
11
11
|
}
|
package/dist/segment.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { decodeElements } from './decoder.js';
|
|
2
|
-
import { UnkownId } from './unknownSegment.js';
|
|
3
|
-
import { getSegmentDefinition } from './segments/registry.js';
|
|
4
2
|
import { SegmentDefinition } from './segmentDefinition.js';
|
|
3
|
+
import { getSegmentDefinition } from './segments/registry.js';
|
|
4
|
+
import { UnkownId } from './unknownSegment.js';
|
|
5
5
|
export function decode(text) {
|
|
6
6
|
const endMarkerIndex = text.lastIndexOf("'");
|
|
7
7
|
if (endMarkerIndex === text.length - 1) {
|
|
@@ -19,12 +19,12 @@ export function decode(text) {
|
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
21
|
let data = decodeElements(contentText, definition.elements, '+', header.version, header.segId);
|
|
22
|
+
data.header = header;
|
|
22
23
|
if (Array.isArray(data)) {
|
|
23
|
-
const object = {};
|
|
24
|
+
const object = { header: header };
|
|
24
25
|
object[definition.elements[0].name] = data;
|
|
25
26
|
data = object;
|
|
26
27
|
}
|
|
27
|
-
data.header = header;
|
|
28
28
|
return data;
|
|
29
29
|
}
|
|
30
30
|
export function encode(data) {
|
|
@@ -37,13 +37,18 @@ export function encode(data) {
|
|
|
37
37
|
export function segmentToString(segment) {
|
|
38
38
|
const keyedSegment = segment;
|
|
39
39
|
const number = segment.header.segNr?.toString() ?? '?';
|
|
40
|
-
const segId = segment.header.segId === UnkownId
|
|
40
|
+
const segId = segment.header.segId === UnkownId
|
|
41
|
+
? segment.originalId
|
|
42
|
+
: segment.header.segId;
|
|
41
43
|
let text = `${number.padStart(4, ' ')}. ${segId} v${segment.header.version}`;
|
|
42
44
|
if (segment.header.refSegNr) {
|
|
43
45
|
text += ` RefSeg: ${segment.header.refSegNr}`;
|
|
44
46
|
}
|
|
45
47
|
const segmentDefinition = getSegmentDefinition(segment.header.segId);
|
|
46
|
-
|
|
48
|
+
if (!segmentDefinition) {
|
|
49
|
+
return `${text} (unknown segment)`;
|
|
50
|
+
}
|
|
51
|
+
const texts = segmentDefinition.getElementsForVersion(segment.header.version).map((element) => {
|
|
47
52
|
if (element.maxCount > 1) {
|
|
48
53
|
const array = keyedSegment[element.name] ?? [];
|
|
49
54
|
const texts = array.map((value) => element.toString(value));
|
|
@@ -53,6 +58,6 @@ export function segmentToString(segment) {
|
|
|
53
58
|
return element.toString(keyedSegment[element.name]);
|
|
54
59
|
}
|
|
55
60
|
});
|
|
56
|
-
text +=
|
|
61
|
+
text += `; ${texts.filter((text) => !!text).join('; ')}`;
|
|
57
62
|
return text;
|
|
58
63
|
}
|
|
@@ -7,11 +7,14 @@ export class SegmentDefinition {
|
|
|
7
7
|
}
|
|
8
8
|
static header = new SegmentHeaderGroup();
|
|
9
9
|
getElementsForVersion(version) {
|
|
10
|
-
return this.elements.filter((element) => version >= (element.minVersion ?? 0) &&
|
|
10
|
+
return this.elements.filter((element) => version >= (element.minVersion ?? 0) &&
|
|
11
|
+
version <= (element.maxVersion ?? Number.MAX_SAFE_INTEGER));
|
|
11
12
|
}
|
|
12
13
|
encode(data) {
|
|
13
14
|
const headerText = SegmentDefinition.header.encode(data.header, [data.header.segId], data.header.version);
|
|
14
|
-
const elementsText = encodeElements(data, this.elements, '+', data.header.version, [
|
|
15
|
+
const elementsText = encodeElements(data, this.elements, '+', data.header.version, [
|
|
16
|
+
data.header.segId,
|
|
17
|
+
]);
|
|
15
18
|
return `${headerText}+${elementsText}'`;
|
|
16
19
|
}
|
|
17
20
|
}
|
package/dist/segmentHeader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Numeric } from './dataElements/Numeric.js';
|
|
2
1
|
import { AlphaNumeric } from './dataElements/AlphaNumeric.js';
|
|
2
|
+
import { Numeric } from './dataElements/Numeric.js';
|
|
3
3
|
import { DataGroup } from './dataGroups/DataGroup.js';
|
|
4
4
|
export class SegmentHeaderGroup extends DataGroup {
|
|
5
5
|
constructor() {
|
package/dist/segments/DIKKU.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Binary } from '../dataElements/Binary.js';
|
|
2
|
+
import { Identification } from '../dataElements/Identification.js';
|
|
3
|
+
import { Text } from '../dataElements/Text.js';
|
|
4
|
+
import { BalanceGroup } from '../dataGroups/Balance.js';
|
|
2
5
|
import { SegmentDefinition } from '../segmentDefinition.js';
|
|
3
|
-
import { Identification } from "../dataElements/Identification.js";
|
|
4
|
-
import { Text } from "../dataElements/Text.js";
|
|
5
|
-
import { BalanceGroup } from "../dataGroups/Balance.js";
|
|
6
6
|
/**
|
|
7
7
|
* Credit card transactions within period response
|
|
8
8
|
*/
|
package/dist/segments/DKKKU.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { AlphaNumeric } from '../dataElements/AlphaNumeric.js';
|
|
1
2
|
import { Dat } from '../dataElements/Dat.js';
|
|
3
|
+
import { Identification } from '../dataElements/Identification.js';
|
|
2
4
|
import { Numeric } from '../dataElements/Numeric.js';
|
|
3
|
-
import { AlphaNumeric } from '../dataElements/AlphaNumeric.js';
|
|
4
5
|
import { AccountGroup } from '../dataGroups/Account.js';
|
|
5
6
|
import { SegmentDefinition } from '../segmentDefinition.js';
|
|
6
|
-
import { Identification } from "../dataElements/Identification.js";
|
|
7
7
|
/**
|
|
8
8
|
* Request credit card transactions in a given period
|
|
9
9
|
*/
|
package/dist/segments/HIBPA.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Numeric } from '../dataElements/Numeric.js';
|
|
2
1
|
import { AlphaNumeric } from '../dataElements/AlphaNumeric.js';
|
|
2
|
+
import { Numeric } from '../dataElements/Numeric.js';
|
|
3
|
+
import { BankIdentification } from '../dataGroups/BankIdentification.js';
|
|
3
4
|
import { DataGroup } from '../dataGroups/DataGroup.js';
|
|
4
5
|
import { SegmentDefinition } from '../segmentDefinition.js';
|
|
5
|
-
import { BankIdentification } from '../dataGroups/BankIdentification.js';
|
|
6
6
|
/**
|
|
7
7
|
* General bank parameters
|
|
8
8
|
*/
|
package/dist/segments/HICAZ.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Binary } from '../dataElements/Binary.js';
|
|
2
2
|
import { Text } from '../dataElements/Text.js';
|
|
3
|
-
import { InternationalAccountGroup } from '../dataGroups/InternationalAccount.js';
|
|
4
3
|
import { DataGroup } from '../dataGroups/DataGroup.js';
|
|
4
|
+
import { InternationalAccountGroup, } from '../dataGroups/InternationalAccount.js';
|
|
5
5
|
import { SegmentDefinition } from '../segmentDefinition.js';
|
|
6
6
|
/**
|
|
7
7
|
* Account transactions within period response (CAMT format)
|
package/dist/segments/HICAZS.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { YesNo } from '../dataElements/YesNo.js';
|
|
2
|
-
import { Numeric } from '../dataElements/Numeric.js';
|
|
3
|
-
import { BusinessTransactionParameter } from './businessTransactionParameter.js';
|
|
4
1
|
import { AlphaNumeric } from '../dataElements/AlphaNumeric.js';
|
|
2
|
+
import { Numeric } from '../dataElements/Numeric.js';
|
|
3
|
+
import { YesNo } from '../dataElements/YesNo.js';
|
|
4
|
+
import { BusinessTransactionParameter, } from './businessTransactionParameter.js';
|
|
5
5
|
/**
|
|
6
6
|
* Parameters for HKCAZ business transaction (CAMT format statement retrieval)
|
|
7
7
|
*/
|
package/dist/segments/HIKAZS.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { YesNo } from '../dataElements/YesNo.js';
|
|
2
1
|
import { Numeric } from '../dataElements/Numeric.js';
|
|
3
|
-
import {
|
|
2
|
+
import { YesNo } from '../dataElements/YesNo.js';
|
|
3
|
+
import { BusinessTransactionParameter, } from './businessTransactionParameter.js';
|
|
4
4
|
/**
|
|
5
5
|
* Parameters for HKKAZ business transaction
|
|
6
6
|
*/
|
|
@@ -8,6 +8,10 @@ export class HIKAZS extends BusinessTransactionParameter {
|
|
|
8
8
|
static Id = 'HIKAZS';
|
|
9
9
|
version = 7;
|
|
10
10
|
constructor() {
|
|
11
|
-
super(HIKAZS.Id, [
|
|
11
|
+
super(HIKAZS.Id, [
|
|
12
|
+
new Numeric('maxDays', 1, 1, 4),
|
|
13
|
+
new YesNo('entryCountAllowed', 1, 1),
|
|
14
|
+
new YesNo('allAccountsAllowed', 1, 1, 5),
|
|
15
|
+
], 6);
|
|
12
16
|
}
|
|
13
17
|
}
|
package/dist/segments/HIKIM.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Text } from '../dataElements/Text.js';
|
|
2
1
|
import { AlphaNumeric } from '../dataElements/AlphaNumeric.js';
|
|
2
|
+
import { Text } from '../dataElements/Text.js';
|
|
3
3
|
import { SegmentDefinition } from '../segmentDefinition.js';
|
|
4
4
|
/**
|
|
5
5
|
* Information to the customer of the bank
|
package/dist/segments/HIKOM.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Numeric } from '../dataElements/Numeric.js';
|
|
2
1
|
import { AlphaNumeric } from '../dataElements/AlphaNumeric.js';
|
|
2
|
+
import { Numeric } from '../dataElements/Numeric.js';
|
|
3
3
|
import { BankIdentification } from '../dataGroups/BankIdentification.js';
|
|
4
4
|
import { DataGroup } from '../dataGroups/DataGroup.js';
|
|
5
5
|
import { SegmentDefinition } from '../segmentDefinition.js';
|
package/dist/segments/HIPINS.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { YesNo } from '../dataElements/YesNo.js';
|
|
2
|
-
import { Numeric } from '../dataElements/Numeric.js';
|
|
3
1
|
import { AlphaNumeric } from '../dataElements/AlphaNumeric.js';
|
|
2
|
+
import { Numeric } from '../dataElements/Numeric.js';
|
|
3
|
+
import { YesNo } from '../dataElements/YesNo.js';
|
|
4
4
|
import { DataGroup } from '../dataGroups/DataGroup.js';
|
|
5
|
-
import { BusinessTransactionParameter } from './businessTransactionParameter.js';
|
|
5
|
+
import { BusinessTransactionParameter, } from './businessTransactionParameter.js';
|
|
6
6
|
/**
|
|
7
7
|
* Parameters for PIN/TAN method
|
|
8
8
|
*/
|
package/dist/segments/HIRMG.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Digits } from '../dataElements/Digits.js';
|
|
2
1
|
import { AlphaNumeric } from '../dataElements/AlphaNumeric.js';
|
|
2
|
+
import { Digits } from '../dataElements/Digits.js';
|
|
3
3
|
import { DataGroup } from '../dataGroups/DataGroup.js';
|
|
4
4
|
import { SegmentDefinition } from '../segmentDefinition.js';
|
|
5
5
|
/**
|
package/dist/segments/HIRMS.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Digits } from '../dataElements/Digits.js';
|
|
2
1
|
import { AlphaNumeric } from '../dataElements/AlphaNumeric.js';
|
|
2
|
+
import { Digits } from '../dataElements/Digits.js';
|
|
3
3
|
import { DataGroup } from '../dataGroups/DataGroup.js';
|
|
4
4
|
import { SegmentDefinition } from '../segmentDefinition.js';
|
|
5
5
|
/**
|
package/dist/segments/HISAL.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Dat } from '../dataElements/Dat.js';
|
|
2
1
|
import { AlphaNumeric } from '../dataElements/AlphaNumeric.js';
|
|
3
|
-
import {
|
|
2
|
+
import { Currency } from '../dataElements/Currency.js';
|
|
3
|
+
import { Dat } from '../dataElements/Dat.js';
|
|
4
4
|
import { AccountGroup } from '../dataGroups/Account.js';
|
|
5
5
|
import { BalanceGroup } from '../dataGroups/Balance.js';
|
|
6
|
+
import { InternationalAccountGroup } from '../dataGroups/InternationalAccount.js';
|
|
6
7
|
import { MoneyGroup } from '../dataGroups/Money.js';
|
|
7
|
-
import { Currency } from '../dataElements/Currency.js';
|
|
8
8
|
import { TimeStampGroup } from '../dataGroups/TimeStamp.js';
|
|
9
9
|
import { SegmentDefinition } from '../segmentDefinition.js';
|
|
10
10
|
/**
|
package/dist/segments/HISPAS.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { SepaAccountParametersGroup, } from '../dataGroups/SepaAccountParameters.js';
|
|
2
|
+
import { BusinessTransactionParameter, } from './businessTransactionParameter.js';
|
|
3
3
|
/**
|
|
4
4
|
* Parameters for HKSPA business transaction - SEPA account connection request
|
|
5
5
|
* Version 3 supports all parameters including reserved purpose positions
|
|
@@ -8,7 +8,6 @@ export class HISPAS extends BusinessTransactionParameter {
|
|
|
8
8
|
static Id = 'HISPAS';
|
|
9
9
|
version = 3;
|
|
10
10
|
constructor() {
|
|
11
|
-
super(HISPAS.Id, [new SepaAccountParametersGroup('sepaAccountParams', 1, 1)], 1
|
|
12
|
-
);
|
|
11
|
+
super(HISPAS.Id, [new SepaAccountParametersGroup('sepaAccountParams', 1, 1)], 1);
|
|
13
12
|
}
|
|
14
13
|
}
|
package/dist/segments/HISYN.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Numeric } from '../dataElements/Numeric.js';
|
|
2
1
|
import { Identification } from '../dataElements/Identification.js';
|
|
2
|
+
import { Numeric } from '../dataElements/Numeric.js';
|
|
3
3
|
import { SegmentDefinition } from '../segmentDefinition.js';
|
|
4
4
|
/**
|
|
5
5
|
* Synchonisation response
|
package/dist/segments/HITAB.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { AlphaNumeric } from '../dataElements/AlphaNumeric.js';
|
|
1
2
|
import { Dat } from '../dataElements/Dat.js';
|
|
3
|
+
import { Identification } from '../dataElements/Identification.js';
|
|
2
4
|
import { Numeric } from '../dataElements/Numeric.js';
|
|
3
|
-
import { AlphaNumeric } from '../dataElements/AlphaNumeric.js';
|
|
4
|
-
import { InternationalAccountGroup } from '../dataGroups/InternationalAccount.js';
|
|
5
5
|
import { AccountGroup } from '../dataGroups/Account.js';
|
|
6
|
-
import { Identification } from '../dataElements/Identification.js';
|
|
7
6
|
import { DataGroup } from '../dataGroups/DataGroup.js';
|
|
7
|
+
import { InternationalAccountGroup, } from '../dataGroups/InternationalAccount.js';
|
|
8
8
|
import { SegmentDefinition } from '../segmentDefinition.js';
|
|
9
9
|
/**
|
|
10
10
|
* TAN media response
|
package/dist/segments/HITAN.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Time } from '../dataElements/Time.js';
|
|
2
|
-
import { Dat } from '../dataElements/Dat.js';
|
|
3
|
-
import { Binary } from '../dataElements/Binary.js';
|
|
4
1
|
import { AlphaNumeric } from '../dataElements/AlphaNumeric.js';
|
|
2
|
+
import { Binary } from '../dataElements/Binary.js';
|
|
3
|
+
import { Dat } from '../dataElements/Dat.js';
|
|
4
|
+
import { Time } from '../dataElements/Time.js';
|
|
5
5
|
import { DataGroup } from '../dataGroups/DataGroup.js';
|
|
6
6
|
import { SegmentDefinition } from '../segmentDefinition.js';
|
|
7
7
|
/**
|
package/dist/segments/HITANS.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { YesNo } from '../dataElements/YesNo.js';
|
|
2
|
-
import { Numeric } from '../dataElements/Numeric.js';
|
|
3
1
|
import { AlphaNumeric } from '../dataElements/AlphaNumeric.js';
|
|
4
2
|
import { Identification } from '../dataElements/Identification.js';
|
|
3
|
+
import { Numeric } from '../dataElements/Numeric.js';
|
|
4
|
+
import { YesNo } from '../dataElements/YesNo.js';
|
|
5
5
|
import { DataGroup } from '../dataGroups/DataGroup.js';
|
|
6
|
-
import { BusinessTransactionParameter } from './businessTransactionParameter.js';
|
|
6
|
+
import { BusinessTransactionParameter, } from './businessTransactionParameter.js';
|
|
7
7
|
/**
|
|
8
8
|
* Parameters for two-step TAN methods
|
|
9
9
|
*/
|
package/dist/segments/HIUPA.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Numeric } from '../dataElements/Numeric.js';
|
|
2
1
|
import { AlphaNumeric } from '../dataElements/AlphaNumeric.js';
|
|
3
|
-
import { SegmentDefinition } from '../segmentDefinition.js';
|
|
4
2
|
import { Identification } from '../dataElements/Identification.js';
|
|
3
|
+
import { Numeric } from '../dataElements/Numeric.js';
|
|
4
|
+
import { SegmentDefinition } from '../segmentDefinition.js';
|
|
5
5
|
/**
|
|
6
6
|
* User parameters general
|
|
7
7
|
*/
|
package/dist/segments/HIUPD.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Numeric } from '../dataElements/Numeric.js';
|
|
2
1
|
import { AlphaNumeric } from '../dataElements/AlphaNumeric.js';
|
|
3
|
-
import { AccountGroup } from '../dataGroups/Account.js';
|
|
4
|
-
import { MoneyGroup } from '../dataGroups/Money.js';
|
|
5
2
|
import { Currency } from '../dataElements/Currency.js';
|
|
6
3
|
import { Identification } from '../dataElements/Identification.js';
|
|
4
|
+
import { Numeric } from '../dataElements/Numeric.js';
|
|
5
|
+
import { AccountGroup } from '../dataGroups/Account.js';
|
|
7
6
|
import { DataGroup } from '../dataGroups/DataGroup.js';
|
|
7
|
+
import { MoneyGroup } from '../dataGroups/Money.js';
|
|
8
8
|
import { SegmentDefinition } from '../segmentDefinition.js';
|
|
9
9
|
/**
|
|
10
10
|
* User parameters account information
|
|
@@ -24,7 +24,11 @@ export class HIUPD extends SegmentDefinition {
|
|
|
24
24
|
new AlphaNumeric('accountHolder1', 1, 1, 27),
|
|
25
25
|
new AlphaNumeric('accountHolder2', 0, 1, 27),
|
|
26
26
|
new AlphaNumeric('accountProduct', 0, 1, 30),
|
|
27
|
-
new DataGroup('accountLimit', [
|
|
27
|
+
new DataGroup('accountLimit', [
|
|
28
|
+
new AlphaNumeric('limitType', 1, 1, 1),
|
|
29
|
+
new MoneyGroup('limitAmount', 0, 1),
|
|
30
|
+
new Numeric('limitDays', 0, 1, 3),
|
|
31
|
+
], 0, 1),
|
|
28
32
|
new DataGroup('allowedTransactions', [
|
|
29
33
|
new AlphaNumeric('transId', 1, 1, 6),
|
|
30
34
|
new Numeric('numSignatures', 1, 1, 2),
|
package/dist/segments/HKCAZ.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { AlphaNumeric } from '../dataElements/AlphaNumeric.js';
|
|
1
2
|
import { Dat } from '../dataElements/Dat.js';
|
|
2
|
-
import { YesNo } from '../dataElements/YesNo.js';
|
|
3
3
|
import { Numeric } from '../dataElements/Numeric.js';
|
|
4
|
-
import { AlphaNumeric } from '../dataElements/AlphaNumeric.js';
|
|
5
4
|
import { Text } from '../dataElements/Text.js';
|
|
6
|
-
import {
|
|
5
|
+
import { YesNo } from '../dataElements/YesNo.js';
|
|
7
6
|
import { DataGroup } from '../dataGroups/DataGroup.js';
|
|
7
|
+
import { InternationalAccountGroup, } from '../dataGroups/InternationalAccount.js';
|
|
8
8
|
import { SegmentDefinition } from '../segmentDefinition.js';
|
|
9
9
|
/**
|
|
10
10
|
* Request account transactions in a given period (CAMT format)
|
package/dist/segments/HKIDN.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { Identification } from '../dataElements/Identification.js';
|
|
1
2
|
import { Numeric } from '../dataElements/Numeric.js';
|
|
2
3
|
import { BankIdentification } from '../dataGroups/BankIdentification.js';
|
|
3
|
-
import { Identification } from '../dataElements/Identification.js';
|
|
4
4
|
import { SegmentDefinition } from '../segmentDefinition.js';
|
|
5
5
|
/**
|
|
6
6
|
* Identification
|
package/dist/segments/HKKAZ.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { AlphaNumeric } from '../dataElements/AlphaNumeric.js';
|
|
1
2
|
import { Dat } from '../dataElements/Dat.js';
|
|
2
|
-
import { YesNo } from '../dataElements/YesNo.js';
|
|
3
3
|
import { Numeric } from '../dataElements/Numeric.js';
|
|
4
|
-
import {
|
|
5
|
-
import { InternationalAccountGroup } from '../dataGroups/InternationalAccount.js';
|
|
4
|
+
import { YesNo } from '../dataElements/YesNo.js';
|
|
6
5
|
import { AccountGroup } from '../dataGroups/Account.js';
|
|
6
|
+
import { InternationalAccountGroup } from '../dataGroups/InternationalAccount.js';
|
|
7
7
|
import { SegmentDefinition } from '../segmentDefinition.js';
|
|
8
8
|
/**
|
|
9
9
|
* Request account transactions in a given period
|
package/dist/segments/HKSAL.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { YesNo } from '../dataElements/YesNo.js';
|
|
2
|
-
import { Numeric } from '../dataElements/Numeric.js';
|
|
3
1
|
import { AlphaNumeric } from '../dataElements/AlphaNumeric.js';
|
|
4
|
-
import {
|
|
2
|
+
import { Numeric } from '../dataElements/Numeric.js';
|
|
3
|
+
import { YesNo } from '../dataElements/YesNo.js';
|
|
5
4
|
import { AccountGroup } from '../dataGroups/Account.js';
|
|
5
|
+
import { InternationalAccountGroup, } from '../dataGroups/InternationalAccount.js';
|
|
6
6
|
import { SegmentDefinition } from '../segmentDefinition.js';
|
|
7
7
|
/**
|
|
8
8
|
* Request Account balances
|
package/dist/segments/HKSPA.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Numeric } from '../dataElements/Numeric.js';
|
|
2
1
|
import { AlphaNumeric } from '../dataElements/AlphaNumeric.js';
|
|
2
|
+
import { Numeric } from '../dataElements/Numeric.js';
|
|
3
3
|
import { AccountGroup } from '../dataGroups/Account.js';
|
|
4
4
|
import { SegmentDefinition } from '../segmentDefinition.js';
|
|
5
5
|
/**
|
package/dist/segments/HKTAB.js
CHANGED
package/dist/segments/HKTAN.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AlphaNumeric } from '../dataElements/AlphaNumeric.js';
|
|
2
2
|
import { Binary } from '../dataElements/Binary.js';
|
|
3
3
|
import { Numeric } from '../dataElements/Numeric.js';
|
|
4
|
-
import {
|
|
5
|
-
import { InternationalAccountGroup } from '../dataGroups/InternationalAccount.js';
|
|
4
|
+
import { YesNo } from '../dataElements/YesNo.js';
|
|
6
5
|
import { DataGroup } from '../dataGroups/DataGroup.js';
|
|
6
|
+
import { InternationalAccountGroup, } from '../dataGroups/InternationalAccount.js';
|
|
7
7
|
import { SegmentDefinition } from '../segmentDefinition.js';
|
|
8
8
|
/**
|
|
9
9
|
* Two-Step TAN
|
package/dist/segments/HKVVB.js
CHANGED
package/dist/segments/HKWPD.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AccountGroup } from '../dataGroups/Account.js';
|
|
2
1
|
import { AlphaNumeric } from '../dataElements/AlphaNumeric.js';
|
|
3
2
|
import { Numeric } from '../dataElements/Numeric.js';
|
|
3
|
+
import { AccountGroup } from '../dataGroups/Account.js';
|
|
4
4
|
import { SegmentDefinition } from '../segmentDefinition.js';
|
|
5
5
|
/**
|
|
6
6
|
* Geschäftsvorfälle: C.4.3.1 Depotaufstellung
|
package/dist/segments/HNHBK.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Digits } from '../dataElements/Digits.js';
|
|
2
|
+
import { Identification } from '../dataElements/Identification.js';
|
|
2
3
|
import { Numeric } from '../dataElements/Numeric.js';
|
|
3
4
|
import { RefMessageGroup } from '../dataGroups/RefMessage.js';
|
|
4
|
-
import { Identification } from '../dataElements/Identification.js';
|
|
5
5
|
import { SegmentDefinition } from '../segmentDefinition.js';
|
|
6
6
|
/**
|
|
7
7
|
* Message header
|
package/dist/segments/HNSHA.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Binary } from '../dataElements/Binary.js';
|
|
2
1
|
import { AlphaNumeric } from '../dataElements/AlphaNumeric.js';
|
|
2
|
+
import { Binary } from '../dataElements/Binary.js';
|
|
3
3
|
import { DataGroup } from '../dataGroups/DataGroup.js';
|
|
4
4
|
import { SegmentDefinition } from '../segmentDefinition.js';
|
|
5
5
|
/**
|
package/dist/segments/HNSHK.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Dat } from '../dataElements/Dat.js';
|
|
1
|
+
import { AlphaNumeric } from '../dataElements/AlphaNumeric.js';
|
|
3
2
|
import { Binary } from '../dataElements/Binary.js';
|
|
3
|
+
import { Dat } from '../dataElements/Dat.js';
|
|
4
|
+
import { Identification } from '../dataElements/Identification.js';
|
|
4
5
|
import { Numeric } from '../dataElements/Numeric.js';
|
|
5
6
|
import { Text } from '../dataElements/Text.js';
|
|
6
|
-
import {
|
|
7
|
+
import { Time } from '../dataElements/Time.js';
|
|
7
8
|
import { BankIdentification } from '../dataGroups/BankIdentification.js';
|
|
8
|
-
import { Identification } from '../dataElements/Identification.js';
|
|
9
9
|
import { DataGroup } from '../dataGroups/DataGroup.js';
|
|
10
10
|
import { SegmentDefinition } from '../segmentDefinition.js';
|
|
11
11
|
/**
|
|
@@ -24,7 +24,11 @@ export class HNSHK extends SegmentDefinition {
|
|
|
24
24
|
new AlphaNumeric('secControlRef', 1, 1, 14),
|
|
25
25
|
new Numeric('secArea', 1, 1, 3),
|
|
26
26
|
new Numeric('secRole', 1, 1, 3),
|
|
27
|
-
new DataGroup('secId', [
|
|
27
|
+
new DataGroup('secId', [
|
|
28
|
+
new Numeric('partyType', 1, 1, 3),
|
|
29
|
+
new Binary('cid', 0, 1, 256),
|
|
30
|
+
new Identification('partyId', 0, 1),
|
|
31
|
+
], 1, 1),
|
|
28
32
|
new Numeric('secRefNum', 1, 1, 16),
|
|
29
33
|
new DataGroup('dateTime', [new Numeric('type', 1, 1, 3), new Dat('date', 0, 1), new Time('time', 0, 1)], 1, 1),
|
|
30
34
|
new DataGroup('hash', [
|
|
@@ -33,7 +37,11 @@ export class HNSHK extends SegmentDefinition {
|
|
|
33
37
|
new Numeric('paramName', 1, 1, 3),
|
|
34
38
|
new Binary('paramValue', 0, 1, 512),
|
|
35
39
|
], 1, 1),
|
|
36
|
-
new DataGroup('signature', [
|
|
40
|
+
new DataGroup('signature', [
|
|
41
|
+
new Numeric('use', 1, 1, 3),
|
|
42
|
+
new Numeric('algorithm', 1, 1, 3),
|
|
43
|
+
new Numeric('mode', 1, 1, 3),
|
|
44
|
+
], 1, 1),
|
|
37
45
|
new DataGroup('key', [
|
|
38
46
|
new BankIdentification('bank', 1, 1),
|
|
39
47
|
new Identification('userId', 1, 1),
|