lib-fints 1.4.0 → 1.4.2

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 (273) hide show
  1. package/dist/camtParser.js +18 -9
  2. package/dist/client.js +51 -35
  3. package/dist/config.js +10 -6
  4. package/dist/dataElements/AlphaNumeric.js +1 -1
  5. package/dist/dataElements/DataElement.js +2 -1
  6. package/dist/dataElements/Digits.js +1 -1
  7. package/dist/dataElements/Float.js +1 -1
  8. package/dist/dataElements/Numeric.js +2 -2
  9. package/dist/dataElements/Text.js +1 -1
  10. package/dist/dataGroups/Account.js +1 -1
  11. package/dist/dataGroups/Balance.js +2 -2
  12. package/dist/dataGroups/BankIdentification.js +1 -1
  13. package/dist/dataGroups/DataGroup.js +13 -6
  14. package/dist/dataGroups/InternationalAccount.js +1 -1
  15. package/dist/dataGroups/Money.js +1 -1
  16. package/dist/dataGroups/RefMessage.js +1 -1
  17. package/dist/dataGroups/SepaAccount.js +2 -2
  18. package/dist/dataGroups/SepaAccountParameters.js +2 -2
  19. package/dist/dataGroups/TimeStamp.js +1 -1
  20. package/dist/decoder.js +12 -6
  21. package/dist/dialog.js +33 -19
  22. package/dist/encoder.js +16 -4
  23. package/dist/format.js +2 -2
  24. package/dist/httpClient.js +4 -2
  25. package/dist/index.js +10 -10
  26. package/dist/interactions/balanceInteraction.js +2 -5
  27. package/dist/interactions/creditcardStatementInteraction.js +11 -11
  28. package/dist/interactions/customerInteraction.js +1 -1
  29. package/dist/interactions/endDialogInteraction.js +4 -4
  30. package/dist/interactions/initDialogInteraction.js +23 -20
  31. package/dist/interactions/portfolioInteraction.js +3 -3
  32. package/dist/interactions/sepaAccountInteraction.js +3 -3
  33. package/dist/interactions/statementInteractionCAMT.js +4 -4
  34. package/dist/interactions/statementInteractionMT940.js +4 -4
  35. package/dist/interactions/tanMediaInteraction.js +4 -4
  36. package/dist/message.js +51 -18
  37. package/dist/mt535parser.js +3 -5
  38. package/dist/mt940parser.js +18 -17
  39. package/dist/parser.js +1 -1
  40. package/dist/segment.js +12 -7
  41. package/dist/segmentDefinition.js +5 -2
  42. package/dist/segmentHeader.js +1 -1
  43. package/dist/segments/DIKKU.js +3 -3
  44. package/dist/segments/DKKKU.js +2 -2
  45. package/dist/segments/HIBPA.js +2 -2
  46. package/dist/segments/HICAZ.js +1 -1
  47. package/dist/segments/HICAZS.js +3 -3
  48. package/dist/segments/HIKAZS.js +7 -3
  49. package/dist/segments/HIKIM.js +1 -1
  50. package/dist/segments/HIKOM.js +1 -1
  51. package/dist/segments/HIPINS.js +3 -3
  52. package/dist/segments/HIRMG.js +1 -1
  53. package/dist/segments/HIRMS.js +1 -1
  54. package/dist/segments/HISAL.js +3 -3
  55. package/dist/segments/HISPAS.js +3 -4
  56. package/dist/segments/HISYN.js +1 -1
  57. package/dist/segments/HITAB.js +3 -3
  58. package/dist/segments/HITAN.js +3 -3
  59. package/dist/segments/HITANS.js +3 -3
  60. package/dist/segments/HIUPA.js +2 -2
  61. package/dist/segments/HIUPD.js +8 -4
  62. package/dist/segments/HKCAZ.js +3 -3
  63. package/dist/segments/HKIDN.js +1 -1
  64. package/dist/segments/HKKAZ.js +3 -3
  65. package/dist/segments/HKSAL.js +3 -3
  66. package/dist/segments/HKSPA.js +1 -1
  67. package/dist/segments/HKTAB.js +1 -1
  68. package/dist/segments/HKTAN.js +3 -3
  69. package/dist/segments/HKVVB.js +1 -1
  70. package/dist/segments/HKWPD.js +1 -1
  71. package/dist/segments/HNHBK.js +1 -1
  72. package/dist/segments/HNSHA.js +1 -1
  73. package/dist/segments/HNSHK.js +14 -6
  74. package/dist/segments/HNVSK.js +10 -6
  75. package/dist/segments/registry.js +31 -31
  76. package/dist/tests/HIBPA.test.js +3 -3
  77. package/dist/tests/HICAZS.test.js +2 -2
  78. package/dist/tests/HIPINS.test.js +2 -2
  79. package/dist/tests/HIRMG.test.js +2 -2
  80. package/dist/tests/HITAB.test.js +5 -5
  81. package/dist/tests/HITANS.test.js +2 -2
  82. package/dist/tests/HIUPA.test.js +2 -2
  83. package/dist/tests/HIUPD.test.js +2 -2
  84. package/dist/tests/HIWPD.test.js +2 -2
  85. package/dist/tests/HKCAZ.test.js +3 -3
  86. package/dist/tests/HKIDN.test.js +2 -2
  87. package/dist/tests/HKSAL.test.js +3 -3
  88. package/dist/tests/HKTAN.test.js +4 -4
  89. package/dist/tests/HKWPD.test.js +2 -2
  90. package/dist/tests/HNSHK.test.js +2 -2
  91. package/dist/tests/HNVSK.test.js +2 -2
  92. package/dist/tests/camtParser.test.js +3 -3
  93. package/dist/tests/client.test.js +636 -22
  94. package/dist/tests/datatypes.test.js +1 -1
  95. package/dist/tests/dialog.test.js +21 -14
  96. package/dist/tests/message.test.js +4 -4
  97. package/dist/tests/mt535parser.test.js +1 -3
  98. package/dist/types/accountBalance.d.ts.map +1 -1
  99. package/dist/types/bankAccount.d.ts +2 -2
  100. package/dist/types/bankAccount.d.ts.map +1 -1
  101. package/dist/types/bankAnswer.d.ts.map +1 -1
  102. package/dist/types/bankTransaction.d.ts.map +1 -1
  103. package/dist/types/bankingInformation.d.ts +2 -2
  104. package/dist/types/bankingInformation.d.ts.map +1 -1
  105. package/dist/types/bpd.d.ts +3 -3
  106. package/dist/types/bpd.d.ts.map +1 -1
  107. package/dist/types/camtParser.d.ts +1 -1
  108. package/dist/types/camtParser.d.ts.map +1 -1
  109. package/dist/types/client.d.ts +5 -5
  110. package/dist/types/client.d.ts.map +1 -1
  111. package/dist/types/config.d.ts +4 -4
  112. package/dist/types/config.d.ts.map +1 -1
  113. package/dist/types/creditCardStatement.d.ts.map +1 -1
  114. package/dist/types/dataElements/AlphaNumeric.d.ts.map +1 -1
  115. package/dist/types/dataElements/Amount.d.ts.map +1 -1
  116. package/dist/types/dataElements/Binary.d.ts.map +1 -1
  117. package/dist/types/dataElements/Country.d.ts.map +1 -1
  118. package/dist/types/dataElements/Currency.d.ts.map +1 -1
  119. package/dist/types/dataElements/Dat.d.ts.map +1 -1
  120. package/dist/types/dataElements/DataElement.d.ts +3 -3
  121. package/dist/types/dataElements/DataElement.d.ts.map +1 -1
  122. package/dist/types/dataElements/Digits.d.ts.map +1 -1
  123. package/dist/types/dataElements/Float.d.ts.map +1 -1
  124. package/dist/types/dataElements/Identification.d.ts.map +1 -1
  125. package/dist/types/dataElements/Numeric.d.ts.map +1 -1
  126. package/dist/types/dataElements/Text.d.ts.map +1 -1
  127. package/dist/types/dataElements/Time.d.ts.map +1 -1
  128. package/dist/types/dataElements/YesNo.d.ts.map +1 -1
  129. package/dist/types/dataGroups/Account.d.ts.map +1 -1
  130. package/dist/types/dataGroups/Balance.d.ts +1 -1
  131. package/dist/types/dataGroups/Balance.d.ts.map +1 -1
  132. package/dist/types/dataGroups/BankIdentification.d.ts.map +1 -1
  133. package/dist/types/dataGroups/DataGroup.d.ts +3 -3
  134. package/dist/types/dataGroups/DataGroup.d.ts.map +1 -1
  135. package/dist/types/dataGroups/InternationalAccount.d.ts +1 -1
  136. package/dist/types/dataGroups/InternationalAccount.d.ts.map +1 -1
  137. package/dist/types/dataGroups/Money.d.ts.map +1 -1
  138. package/dist/types/dataGroups/RefMessage.d.ts.map +1 -1
  139. package/dist/types/dataGroups/SepaAccount.d.ts +1 -1
  140. package/dist/types/dataGroups/SepaAccount.d.ts.map +1 -1
  141. package/dist/types/dataGroups/TimeStamp.d.ts.map +1 -1
  142. package/dist/types/decoder.d.ts +2 -2
  143. package/dist/types/decoder.d.ts.map +1 -1
  144. package/dist/types/dialog.d.ts +2 -2
  145. package/dist/types/dialog.d.ts.map +1 -1
  146. package/dist/types/encoder.d.ts +2 -2
  147. package/dist/types/encoder.d.ts.map +1 -1
  148. package/dist/types/httpClient.d.ts +1 -1
  149. package/dist/types/httpClient.d.ts.map +1 -1
  150. package/dist/types/index.d.ts +12 -13
  151. package/dist/types/index.d.ts.map +1 -1
  152. package/dist/types/interactions/balanceInteraction.d.ts +5 -5
  153. package/dist/types/interactions/balanceInteraction.d.ts.map +1 -1
  154. package/dist/types/interactions/creditcardStatementInteraction.d.ts +6 -6
  155. package/dist/types/interactions/creditcardStatementInteraction.d.ts.map +1 -1
  156. package/dist/types/interactions/customerInteraction.d.ts +6 -6
  157. package/dist/types/interactions/customerInteraction.d.ts.map +1 -1
  158. package/dist/types/interactions/endDialogInteraction.d.ts +6 -6
  159. package/dist/types/interactions/endDialogInteraction.d.ts.map +1 -1
  160. package/dist/types/interactions/initDialogInteraction.d.ts +5 -5
  161. package/dist/types/interactions/initDialogInteraction.d.ts.map +1 -1
  162. package/dist/types/interactions/portfolioInteraction.d.ts +5 -5
  163. package/dist/types/interactions/portfolioInteraction.d.ts.map +1 -1
  164. package/dist/types/interactions/sepaAccountInteraction.d.ts +5 -5
  165. package/dist/types/interactions/sepaAccountInteraction.d.ts.map +1 -1
  166. package/dist/types/interactions/statementInteractionCAMT.d.ts +4 -4
  167. package/dist/types/interactions/statementInteractionCAMT.d.ts.map +1 -1
  168. package/dist/types/interactions/statementInteractionMT940.d.ts +4 -4
  169. package/dist/types/interactions/statementInteractionMT940.d.ts.map +1 -1
  170. package/dist/types/interactions/tanMediaInteraction.d.ts +4 -4
  171. package/dist/types/interactions/tanMediaInteraction.d.ts.map +1 -1
  172. package/dist/types/message.d.ts +3 -3
  173. package/dist/types/message.d.ts.map +1 -1
  174. package/dist/types/mt535parser.d.ts +0 -1
  175. package/dist/types/mt535parser.d.ts.map +1 -1
  176. package/dist/types/mt940parser.d.ts +1 -2
  177. package/dist/types/mt940parser.d.ts.map +1 -1
  178. package/dist/types/partedSegment.d.ts +1 -1
  179. package/dist/types/partedSegment.d.ts.map +1 -1
  180. package/dist/types/segment.d.ts +1 -1
  181. package/dist/types/segment.d.ts.map +1 -1
  182. package/dist/types/segmentDefinition.d.ts +2 -2
  183. package/dist/types/segmentDefinition.d.ts.map +1 -1
  184. package/dist/types/segmentHeader.d.ts.map +1 -1
  185. package/dist/types/segments/DIKKU.d.ts +4 -4
  186. package/dist/types/segments/DIKKU.d.ts.map +1 -1
  187. package/dist/types/segments/DKKKU.d.ts +3 -3
  188. package/dist/types/segments/DKKKU.d.ts.map +1 -1
  189. package/dist/types/segments/HIBPA.d.ts +5 -5
  190. package/dist/types/segments/HIBPA.d.ts.map +1 -1
  191. package/dist/types/segments/HICAZ.d.ts +2 -2
  192. package/dist/types/segments/HICAZ.d.ts.map +1 -1
  193. package/dist/types/segments/HICAZS.d.ts +1 -1
  194. package/dist/types/segments/HICAZS.d.ts.map +1 -1
  195. package/dist/types/segments/HIKAZ.d.ts +1 -1
  196. package/dist/types/segments/HIKAZ.d.ts.map +1 -1
  197. package/dist/types/segments/HIKAZS.d.ts +1 -1
  198. package/dist/types/segments/HIKAZS.d.ts.map +1 -1
  199. package/dist/types/segments/HIKIM.d.ts +2 -2
  200. package/dist/types/segments/HIKIM.d.ts.map +1 -1
  201. package/dist/types/segments/HIKOM.d.ts +3 -3
  202. package/dist/types/segments/HIKOM.d.ts.map +1 -1
  203. package/dist/types/segments/HIPINS.d.ts +1 -1
  204. package/dist/types/segments/HIPINS.d.ts.map +1 -1
  205. package/dist/types/segments/HIRMG.d.ts +1 -1
  206. package/dist/types/segments/HIRMG.d.ts.map +1 -1
  207. package/dist/types/segments/HIRMS.d.ts +2 -2
  208. package/dist/types/segments/HIRMS.d.ts.map +1 -1
  209. package/dist/types/segments/HISAL.d.ts +7 -7
  210. package/dist/types/segments/HISAL.d.ts.map +1 -1
  211. package/dist/types/segments/HISPA.d.ts +2 -2
  212. package/dist/types/segments/HISPA.d.ts.map +1 -1
  213. package/dist/types/segments/HISPAS.d.ts +2 -2
  214. package/dist/types/segments/HISPAS.d.ts.map +1 -1
  215. package/dist/types/segments/HISYN.d.ts +2 -2
  216. package/dist/types/segments/HISYN.d.ts.map +1 -1
  217. package/dist/types/segments/HITAB.d.ts +4 -4
  218. package/dist/types/segments/HITAB.d.ts.map +1 -1
  219. package/dist/types/segments/HITAN.d.ts +5 -5
  220. package/dist/types/segments/HITAN.d.ts.map +1 -1
  221. package/dist/types/segments/HITANS.d.ts +2 -2
  222. package/dist/types/segments/HITANS.d.ts.map +1 -1
  223. package/dist/types/segments/HIUPA.d.ts +3 -3
  224. package/dist/types/segments/HIUPA.d.ts.map +1 -1
  225. package/dist/types/segments/HIUPD.d.ts +6 -6
  226. package/dist/types/segments/HIUPD.d.ts.map +1 -1
  227. package/dist/types/segments/HIWPD.d.ts +1 -1
  228. package/dist/types/segments/HIWPD.d.ts.map +1 -1
  229. package/dist/types/segments/HKCAZ.d.ts +5 -5
  230. package/dist/types/segments/HKCAZ.d.ts.map +1 -1
  231. package/dist/types/segments/HKEND.d.ts +1 -1
  232. package/dist/types/segments/HKEND.d.ts.map +1 -1
  233. package/dist/types/segments/HKIDN.d.ts +3 -3
  234. package/dist/types/segments/HKIDN.d.ts.map +1 -1
  235. package/dist/types/segments/HKKAZ.d.ts +5 -5
  236. package/dist/types/segments/HKKAZ.d.ts.map +1 -1
  237. package/dist/types/segments/HKSAL.d.ts +6 -6
  238. package/dist/types/segments/HKSAL.d.ts.map +1 -1
  239. package/dist/types/segments/HKSPA.d.ts +3 -3
  240. package/dist/types/segments/HKSPA.d.ts.map +1 -1
  241. package/dist/types/segments/HKSYN.d.ts +2 -2
  242. package/dist/types/segments/HKSYN.d.ts.map +1 -1
  243. package/dist/types/segments/HKTAB.d.ts +3 -3
  244. package/dist/types/segments/HKTAB.d.ts.map +1 -1
  245. package/dist/types/segments/HKTAN.d.ts +6 -6
  246. package/dist/types/segments/HKTAN.d.ts.map +1 -1
  247. package/dist/types/segments/HKVVB.d.ts +3 -3
  248. package/dist/types/segments/HKVVB.d.ts.map +1 -1
  249. package/dist/types/segments/HKWPD.d.ts +2 -2
  250. package/dist/types/segments/HKWPD.d.ts.map +1 -1
  251. package/dist/types/segments/HNHBK.d.ts +3 -3
  252. package/dist/types/segments/HNHBK.d.ts.map +1 -1
  253. package/dist/types/segments/HNHBS.d.ts +1 -1
  254. package/dist/types/segments/HNHBS.d.ts.map +1 -1
  255. package/dist/types/segments/HNSHA.d.ts +3 -3
  256. package/dist/types/segments/HNSHA.d.ts.map +1 -1
  257. package/dist/types/segments/HNSHK.d.ts +4 -4
  258. package/dist/types/segments/HNSHK.d.ts.map +1 -1
  259. package/dist/types/segments/HNVSD.d.ts +2 -2
  260. package/dist/types/segments/HNVSD.d.ts.map +1 -1
  261. package/dist/types/segments/HNVSK.d.ts +4 -4
  262. package/dist/types/segments/HNVSK.d.ts.map +1 -1
  263. package/dist/types/segments/businessTransactionParameter.d.ts +2 -2
  264. package/dist/types/segments/businessTransactionParameter.d.ts.map +1 -1
  265. package/dist/types/segments/registry.d.ts +1 -1
  266. package/dist/types/segments/registry.d.ts.map +1 -1
  267. package/dist/types/tanMethod.d.ts +1 -1
  268. package/dist/types/tanMethod.d.ts.map +1 -1
  269. package/dist/types/unknownSegment.d.ts +1 -1
  270. package/dist/types/unknownSegment.d.ts.map +1 -1
  271. package/dist/types/upd.d.ts +2 -2
  272. package/dist/types/upd.d.ts.map +1 -1
  273. package/package.json +48 -47
@@ -24,16 +24,14 @@ const tokens535 = {
24
24
  [TokenType535.TimeString]: /^.{14}(\d{2})(\d{2})(\d{2})/ms,
25
25
  };
26
26
  export class Mt535Parser {
27
- rawData;
28
27
  cleanedRawData;
29
28
  constructor(rawData) {
30
- this.rawData = rawData;
31
29
  // The divider can be either \r\n or @@
32
30
  const crlfCount = (rawData.match(/\r\n-/g) || []).length;
33
31
  const atAtCount = (rawData.match(/@@-/g) || []).length;
34
32
  const divider = crlfCount > atAtCount ? '\r\n' : '@@';
35
33
  // Remove dividers that are not followed by a colon (tag indicator)
36
- const regex = new RegExp(divider + '([^:])', 'gms');
34
+ const regex = new RegExp(`${divider}([^:])`, 'gms');
37
35
  this.cleanedRawData = rawData.replace(regex, '$1');
38
36
  }
39
37
  parse() {
@@ -170,7 +168,7 @@ export class Mt535Parser {
170
168
  // :98C: has a time component HHMMSS starting at character 14
171
169
  const timeMatch = content.match(tokens535[TokenType535.TimeString]);
172
170
  if (timeMatch) {
173
- parsedDate.setHours(parseInt(timeMatch[1]), parseInt(timeMatch[2]), parseInt(timeMatch[3]));
171
+ parsedDate.setHours(parseInt(timeMatch[1], 10), parseInt(timeMatch[2], 10), parseInt(timeMatch[3], 10));
174
172
  }
175
173
  }
176
174
  else {
@@ -187,7 +185,7 @@ export class Mt535Parser {
187
185
  throw new Error(`Invalid date format: ${dateString}`);
188
186
  }
189
187
  try {
190
- return new Date(parseInt(match[1]), parseInt(match[2]) - 1, parseInt(match[3]));
188
+ return new Date(parseInt(match[1], 10), parseInt(match[2], 10) - 1, parseInt(match[3], 10));
191
189
  }
192
190
  catch (error) {
193
191
  throw new Error(`Invalid date: ${dateString}`, { cause: error });
@@ -26,7 +26,7 @@ const tokens = {
26
26
  PurposeTag: /^[A-Z]{4}\+/,
27
27
  SingleAlpha: /^[A-Z]/,
28
28
  StatementNumber: /^\d+\/?\d*/,
29
- CustomerReference: /^[^\/\r\n]+/,
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
- let tag = this.tokenizer.parseNextToken(TokenType.Tag, false);
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
- let entryDateString = this.tokenizer.parseNextToken(TokenType.ShortDate, false);
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.push(this.currentTransaction);
125
+ this.currentStatement.transactions?.push(this.currentTransaction);
128
126
  break;
129
- case ':86:':
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 == 'RC' ? -1 : 1);
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
- let matched = this.match(tokens[type]);
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 ? segment.originalId : segment.header.segId;
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
- let texts = segmentDefinition.getElementsForVersion(segment.header.version).map((element) => {
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 += '; ' + texts.filter((text) => !!text).join('; ');
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) && version <= (element.maxVersion ?? Number.MAX_SAFE_INTEGER));
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, [data.header.segId]);
15
+ const elementsText = encodeElements(data, this.elements, '+', data.header.version, [
16
+ data.header.segId,
17
+ ]);
15
18
  return `${headerText}+${elementsText}'`;
16
19
  }
17
20
  }
@@ -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() {
@@ -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
  */
@@ -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
  */
@@ -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
  */
@@ -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)
@@ -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
  */
@@ -1,6 +1,6 @@
1
- import { YesNo } from '../dataElements/YesNo.js';
2
1
  import { Numeric } from '../dataElements/Numeric.js';
3
- import { BusinessTransactionParameter } from './businessTransactionParameter.js';
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, [new Numeric('maxDays', 1, 1, 4), new YesNo('entryCountAllowed', 1, 1), new YesNo('allAccountsAllowed', 1, 1, 5)], 6);
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
  }
@@ -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
@@ -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';
@@ -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
  */
@@ -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
  /**
@@ -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
  /**
@@ -1,10 +1,10 @@
1
- import { Dat } from '../dataElements/Dat.js';
2
1
  import { AlphaNumeric } from '../dataElements/AlphaNumeric.js';
3
- import { InternationalAccountGroup } from '../dataGroups/InternationalAccount.js';
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
  /**
@@ -1,5 +1,5 @@
1
- import { BusinessTransactionParameter } from './businessTransactionParameter.js';
2
- import { SepaAccountParametersGroup } from '../dataGroups/SepaAccountParameters.js';
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 // secClassMinVersion
12
- );
11
+ super(HISPAS.Id, [new SepaAccountParametersGroup('sepaAccountParams', 1, 1)], 1);
13
12
  }
14
13
  }
@@ -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
@@ -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
@@ -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
  /**
@@ -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
  */
@@ -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
  */
@@ -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', [new AlphaNumeric('limitType', 1, 1, 1), new MoneyGroup('limitAmount', 0, 1), new Numeric('limitDays', 0, 1, 3)], 0, 1),
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),
@@ -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 { InternationalAccountGroup } from '../dataGroups/InternationalAccount.js';
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)
@@ -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
@@ -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 { AlphaNumeric } from '../dataElements/AlphaNumeric.js';
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
@@ -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 { InternationalAccountGroup } from '../dataGroups/InternationalAccount.js';
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
@@ -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
  /**
@@ -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 { SegmentDefinition } from '../segmentDefinition.js';
4
4
  /**
5
5
  * Request TAN media
@@ -1,9 +1,9 @@
1
- import { YesNo } from '../dataElements/YesNo.js';
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 { AlphaNumeric } from '../dataElements/AlphaNumeric.js';
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
@@ -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 { SegmentDefinition } from '../segmentDefinition.js';
4
4
  /**
5
5
  * Identification
@@ -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
@@ -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
@@ -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
  /**