fints-lib 0.6.0 → 0.7.0

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 (197) hide show
  1. package/README_advanced_usage.md +70 -0
  2. package/dist/client.d.ts +89 -0
  3. package/dist/client.js +473 -0
  4. package/dist/client.js.map +1 -0
  5. package/dist/constants.d.ts +15 -0
  6. package/dist/constants.js +19 -0
  7. package/dist/constants.js.map +1 -0
  8. package/dist/dialog.d.ts +111 -0
  9. package/dist/dialog.js +187 -0
  10. package/dist/dialog.js.map +1 -0
  11. package/dist/error-codes.d.ts +39 -0
  12. package/dist/error-codes.js +228 -0
  13. package/dist/error-codes.js.map +1 -0
  14. package/dist/errors/fints-error.d.ts +55 -0
  15. package/dist/errors/fints-error.js +131 -0
  16. package/dist/errors/fints-error.js.map +1 -0
  17. package/dist/errors/response-error.d.ts +6 -0
  18. package/dist/errors/response-error.js +20 -0
  19. package/dist/errors/response-error.js.map +1 -0
  20. package/dist/errors/tan-required-error.d.ts +40 -0
  21. package/dist/errors/tan-required-error.js +54 -0
  22. package/dist/errors/tan-required-error.js.map +1 -0
  23. package/dist/format.d.ts +81 -0
  24. package/dist/format.js +112 -0
  25. package/dist/format.js.map +1 -0
  26. package/dist/http-connection.d.ts +36 -0
  27. package/dist/http-connection.js +109 -0
  28. package/dist/http-connection.js.map +1 -0
  29. package/dist/index.d.ts +23 -0
  30. package/dist/index.js +40 -0
  31. package/dist/index.js.map +1 -0
  32. package/dist/logger.d.ts +4 -0
  33. package/dist/logger.js +13 -0
  34. package/dist/logger.js.map +1 -0
  35. package/dist/mt535.d.ts +19 -0
  36. package/dist/mt535.js +153 -0
  37. package/dist/mt535.js.map +1 -0
  38. package/dist/mt940-86-structured.d.ts +47 -0
  39. package/dist/mt940-86-structured.js +213 -0
  40. package/dist/mt940-86-structured.js.map +1 -0
  41. package/dist/pain-formats.d.ts +50 -0
  42. package/dist/pain-formats.js +7 -0
  43. package/dist/pain-formats.js.map +1 -0
  44. package/dist/pain.d.ts +21 -0
  45. package/dist/pain.js +315 -0
  46. package/dist/pain.js.map +1 -0
  47. package/dist/parse.d.ts +46 -0
  48. package/dist/parse.js +97 -0
  49. package/dist/parse.js.map +1 -0
  50. package/dist/pin-tan-client.d.ts +47 -0
  51. package/dist/pin-tan-client.js +35 -0
  52. package/dist/pin-tan-client.js.map +1 -0
  53. package/dist/request.d.ts +90 -0
  54. package/dist/request.js +102 -0
  55. package/dist/request.js.map +1 -0
  56. package/dist/response.d.ts +104 -0
  57. package/dist/response.js +197 -0
  58. package/dist/response.js.map +1 -0
  59. package/dist/return-value.d.ts +37 -0
  60. package/dist/return-value.js +31 -0
  61. package/dist/return-value.js.map +1 -0
  62. package/dist/segments/hibpa.d.ts +22 -0
  63. package/dist/segments/hibpa.js +36 -0
  64. package/dist/segments/hibpa.js.map +1 -0
  65. package/dist/segments/hiccs.d.ts +14 -0
  66. package/dist/segments/hiccs.js +28 -0
  67. package/dist/segments/hiccs.js.map +1 -0
  68. package/dist/segments/hiccss.d.ts +13 -0
  69. package/dist/segments/hiccss.js +24 -0
  70. package/dist/segments/hiccss.js.map +1 -0
  71. package/dist/segments/hicdb.d.ts +17 -0
  72. package/dist/segments/hicdb.js +62 -0
  73. package/dist/segments/hicdb.js.map +1 -0
  74. package/dist/segments/hicdbs.d.ts +16 -0
  75. package/dist/segments/hicdbs.js +28 -0
  76. package/dist/segments/hicdbs.js.map +1 -0
  77. package/dist/segments/hidse.d.ts +14 -0
  78. package/dist/segments/hidse.js +28 -0
  79. package/dist/segments/hidse.js.map +1 -0
  80. package/dist/segments/hidses.d.ts +13 -0
  81. package/dist/segments/hidses.js +24 -0
  82. package/dist/segments/hidses.js.map +1 -0
  83. package/dist/segments/hikaz.d.ts +16 -0
  84. package/dist/segments/hikaz.js +31 -0
  85. package/dist/segments/hikaz.js.map +1 -0
  86. package/dist/segments/hikazs.d.ts +16 -0
  87. package/dist/segments/hikazs.js +28 -0
  88. package/dist/segments/hikazs.js.map +1 -0
  89. package/dist/segments/hirmg.d.ts +17 -0
  90. package/dist/segments/hirmg.js +39 -0
  91. package/dist/segments/hirmg.js.map +1 -0
  92. package/dist/segments/hirms.d.ts +16 -0
  93. package/dist/segments/hirms.js +37 -0
  94. package/dist/segments/hirms.js.map +1 -0
  95. package/dist/segments/hisal.d.ts +22 -0
  96. package/dist/segments/hisal.js +33 -0
  97. package/dist/segments/hisal.js.map +1 -0
  98. package/dist/segments/hisals.d.ts +16 -0
  99. package/dist/segments/hisals.js +28 -0
  100. package/dist/segments/hisals.js.map +1 -0
  101. package/dist/segments/hispa.d.ts +16 -0
  102. package/dist/segments/hispa.js +31 -0
  103. package/dist/segments/hispa.js.map +1 -0
  104. package/dist/segments/hispas.d.ts +14 -0
  105. package/dist/segments/hispas.js +28 -0
  106. package/dist/segments/hispas.js.map +1 -0
  107. package/dist/segments/hisyn.d.ts +15 -0
  108. package/dist/segments/hisyn.js +26 -0
  109. package/dist/segments/hisyn.js.map +1 -0
  110. package/dist/segments/hitan.d.ts +18 -0
  111. package/dist/segments/hitan.js +66 -0
  112. package/dist/segments/hitan.js.map +1 -0
  113. package/dist/segments/hitans.d.ts +18 -0
  114. package/dist/segments/hitans.js +46 -0
  115. package/dist/segments/hitans.js.map +1 -0
  116. package/dist/segments/hiupd.d.ts +16 -0
  117. package/dist/segments/hiupd.js +34 -0
  118. package/dist/segments/hiupd.js.map +1 -0
  119. package/dist/segments/hiwpd.d.ts +15 -0
  120. package/dist/segments/hiwpd.js +26 -0
  121. package/dist/segments/hiwpd.js.map +1 -0
  122. package/dist/segments/hiwpds.d.ts +16 -0
  123. package/dist/segments/hiwpds.js +32 -0
  124. package/dist/segments/hiwpds.js.map +1 -0
  125. package/dist/segments/hkccs.d.ts +18 -0
  126. package/dist/segments/hkccs.js +32 -0
  127. package/dist/segments/hkccs.js.map +1 -0
  128. package/dist/segments/hkcdb.d.ts +19 -0
  129. package/dist/segments/hkcdb.js +30 -0
  130. package/dist/segments/hkcdb.js.map +1 -0
  131. package/dist/segments/hkdse.d.ts +18 -0
  132. package/dist/segments/hkdse.js +27 -0
  133. package/dist/segments/hkdse.js.map +1 -0
  134. package/dist/segments/hkend.d.ts +12 -0
  135. package/dist/segments/hkend.js +24 -0
  136. package/dist/segments/hkend.js.map +1 -0
  137. package/dist/segments/hkidn.d.ts +19 -0
  138. package/dist/segments/hkidn.js +33 -0
  139. package/dist/segments/hkidn.js.map +1 -0
  140. package/dist/segments/hkkaz.d.ts +20 -0
  141. package/dist/segments/hkkaz.js +42 -0
  142. package/dist/segments/hkkaz.js.map +1 -0
  143. package/dist/segments/hksal.d.ts +18 -0
  144. package/dist/segments/hksal.js +35 -0
  145. package/dist/segments/hksal.js.map +1 -0
  146. package/dist/segments/hkspa.d.ts +18 -0
  147. package/dist/segments/hkspa.js +31 -0
  148. package/dist/segments/hkspa.js.map +1 -0
  149. package/dist/segments/hksyn.d.ts +16 -0
  150. package/dist/segments/hksyn.js +31 -0
  151. package/dist/segments/hksyn.js.map +1 -0
  152. package/dist/segments/hktab.d.ts +17 -0
  153. package/dist/segments/hktab.js +31 -0
  154. package/dist/segments/hktab.js.map +1 -0
  155. package/dist/segments/hktan.d.ts +19 -0
  156. package/dist/segments/hktan.js +66 -0
  157. package/dist/segments/hktan.js.map +1 -0
  158. package/dist/segments/hkvvb.d.ts +17 -0
  159. package/dist/segments/hkvvb.js +39 -0
  160. package/dist/segments/hkvvb.js.map +1 -0
  161. package/dist/segments/hkwpd.d.ts +21 -0
  162. package/dist/segments/hkwpd.js +39 -0
  163. package/dist/segments/hkwpd.js.map +1 -0
  164. package/dist/segments/hnhbk.d.ts +22 -0
  165. package/dist/segments/hnhbk.js +54 -0
  166. package/dist/segments/hnhbk.js.map +1 -0
  167. package/dist/segments/hnhbs.d.ts +16 -0
  168. package/dist/segments/hnhbs.js +29 -0
  169. package/dist/segments/hnhbs.js.map +1 -0
  170. package/dist/segments/hnsha.d.ts +18 -0
  171. package/dist/segments/hnsha.js +30 -0
  172. package/dist/segments/hnsha.js.map +1 -0
  173. package/dist/segments/hnshk.d.ts +21 -0
  174. package/dist/segments/hnshk.js +44 -0
  175. package/dist/segments/hnshk.js.map +1 -0
  176. package/dist/segments/hnvsd.d.ts +25 -0
  177. package/dist/segments/hnvsd.js +31 -0
  178. package/dist/segments/hnvsd.js.map +1 -0
  179. package/dist/segments/hnvsk.d.ts +15 -0
  180. package/dist/segments/hnvsk.js +51 -0
  181. package/dist/segments/hnvsk.js.map +1 -0
  182. package/dist/segments/index.d.ts +40 -0
  183. package/dist/segments/index.js +57 -0
  184. package/dist/segments/index.js.map +1 -0
  185. package/dist/segments/segment.d.ts +60 -0
  186. package/dist/segments/segment.js +74 -0
  187. package/dist/segments/segment.js.map +1 -0
  188. package/dist/tan-method.d.ts +36 -0
  189. package/dist/tan-method.js +224 -0
  190. package/dist/tan-method.js.map +1 -0
  191. package/dist/types.d.ts +386 -0
  192. package/dist/types.js +3 -0
  193. package/dist/types.js.map +1 -0
  194. package/dist/utils.d.ts +55 -0
  195. package/dist/utils.js +178 -0
  196. package/dist/utils.js.map +1 -0
  197. package/package.json +1 -1
@@ -0,0 +1,131 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InvalidSystemIdError = exports.StrongAuthenticationRequiredError = exports.PinError = exports.MessageStructureError = exports.DialogAbortedError = exports.OrderRejectedError = exports.AuthenticationError = exports.FinTSError = void 0;
4
+ exports.createFinTSError = createFinTSError;
5
+ const error_codes_1 = require("../error-codes");
6
+ /**
7
+ * Base class for FinTS-specific errors with enhanced error information
8
+ */
9
+ class FinTSError extends Error {
10
+ constructor(message, code, returnValue) {
11
+ super(message);
12
+ this.name = "FinTSError";
13
+ this.code = code || "UNKNOWN";
14
+ this.returnValue = returnValue;
15
+ // Maintains proper stack trace for where our error was thrown (only available on V8)
16
+ if (Error.captureStackTrace) {
17
+ Error.captureStackTrace(this, FinTSError);
18
+ }
19
+ }
20
+ }
21
+ exports.FinTSError = FinTSError;
22
+ /**
23
+ * Error thrown when customer authentication fails
24
+ */
25
+ class AuthenticationError extends FinTSError {
26
+ constructor(message, code, returnValue) {
27
+ super(message, code, returnValue);
28
+ this.name = "AuthenticationError";
29
+ }
30
+ }
31
+ exports.AuthenticationError = AuthenticationError;
32
+ /**
33
+ * Error thrown when an order/transaction is rejected
34
+ */
35
+ class OrderRejectedError extends FinTSError {
36
+ constructor(message, code, returnValue) {
37
+ super(message, code, returnValue);
38
+ this.name = "OrderRejectedError";
39
+ }
40
+ }
41
+ exports.OrderRejectedError = OrderRejectedError;
42
+ /**
43
+ * Error thrown when the dialog is aborted by the server
44
+ */
45
+ class DialogAbortedError extends FinTSError {
46
+ constructor(message, code, returnValue) {
47
+ super(message, code, returnValue);
48
+ this.name = "DialogAbortedError";
49
+ }
50
+ }
51
+ exports.DialogAbortedError = DialogAbortedError;
52
+ /**
53
+ * Error thrown when a message has structural errors
54
+ */
55
+ class MessageStructureError extends FinTSError {
56
+ constructor(message, code, returnValue) {
57
+ super(message, code, returnValue);
58
+ this.name = "MessageStructureError";
59
+ }
60
+ }
61
+ exports.MessageStructureError = MessageStructureError;
62
+ /**
63
+ * Error thrown when a PIN is incorrect
64
+ */
65
+ class PinError extends FinTSError {
66
+ constructor(message, code, returnValue) {
67
+ super(message, code, returnValue);
68
+ this.name = "PinError";
69
+ }
70
+ }
71
+ exports.PinError = PinError;
72
+ /**
73
+ * Error thrown when strong customer authentication is required (PSD2)
74
+ */
75
+ class StrongAuthenticationRequiredError extends FinTSError {
76
+ constructor(message, code, returnValue) {
77
+ super(message, code, returnValue);
78
+ this.name = "StrongAuthenticationRequiredError";
79
+ }
80
+ }
81
+ exports.StrongAuthenticationRequiredError = StrongAuthenticationRequiredError;
82
+ /**
83
+ * Error thrown when system/customer ID is invalid
84
+ */
85
+ class InvalidSystemIdError extends FinTSError {
86
+ constructor(message, code, returnValue) {
87
+ super(message, code, returnValue);
88
+ this.name = "InvalidSystemIdError";
89
+ }
90
+ }
91
+ exports.InvalidSystemIdError = InvalidSystemIdError;
92
+ /**
93
+ * Mapping of error codes to error class constructors
94
+ */
95
+ const ERROR_CODE_MAPPINGS = {
96
+ // PIN errors
97
+ 9942: PinError,
98
+ // Authentication errors
99
+ 9110: AuthenticationError,
100
+ // Strong authentication required (PSD2)
101
+ 3076: StrongAuthenticationRequiredError,
102
+ 3956: StrongAuthenticationRequiredError,
103
+ // Order/transaction errors
104
+ 9120: OrderRejectedError,
105
+ 9140: OrderRejectedError,
106
+ 9340: OrderRejectedError,
107
+ // Dialog errors
108
+ 9380: DialogAbortedError,
109
+ 9800: DialogAbortedError,
110
+ // Message structure errors
111
+ 9010: MessageStructureError,
112
+ 9030: MessageStructureError,
113
+ 9040: MessageStructureError,
114
+ // System ID errors
115
+ 9931: InvalidSystemIdError,
116
+ 9070: InvalidSystemIdError,
117
+ };
118
+ /**
119
+ * Factory function to create appropriate error based on error code
120
+ */
121
+ function createFinTSError(code, message, returnValue) {
122
+ const formattedMessage = (0, error_codes_1.formatErrorCode)(code, message);
123
+ // Look up the appropriate error class based on error code
124
+ const ErrorClass = ERROR_CODE_MAPPINGS[code];
125
+ if (ErrorClass) {
126
+ return new ErrorClass(formattedMessage, code, returnValue);
127
+ }
128
+ // Generic FinTS error for unmapped codes
129
+ return new FinTSError(formattedMessage, code, returnValue);
130
+ }
131
+ //# sourceMappingURL=fints-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fints-error.js","sourceRoot":"","sources":["../../src/errors/fints-error.ts"],"names":[],"mappings":";;;AAgIA,4CAWC;AA1ID,gDAAiD;AAEjD;;GAEG;AACH,MAAa,UAAW,SAAQ,KAAK;IAIjC,YAAY,OAAe,EAAE,IAAa,EAAE,WAAyB;QACjE,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;QACzB,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,SAAS,CAAC;QAC9B,IAAI,CAAC,WAAW,GAAG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AC,IAAI,CAAC,CAAC;IAC7C,IAAI,UAAU,EAAE,CAAC;QACb,OAAO,IAAI,UAAU,CAAC,gBAAgB,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;IAC/D,CAAC;IAED,yCAAyC;IACzC,OAAO,IAAI,UAAU,CAAC,gBAAgB,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;AAC/D,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { Response } from "../response";
2
+ export declare class ResponseError extends Error {
3
+ response: Response;
4
+ errors: string[];
5
+ constructor(response: Response);
6
+ }
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ResponseError = void 0;
4
+ const error_codes_1 = require("../error-codes");
5
+ class ResponseError extends Error {
6
+ constructor(response) {
7
+ const errors = Array.from(response.returnValues().values())
8
+ .filter((value) => value.error)
9
+ .map((value) => (0, error_codes_1.formatErrorCode)(value.code, value.message));
10
+ super(`Error(s) in dialog: ${errors.join(", ")}.`);
11
+ this.response = response;
12
+ this.errors = errors;
13
+ // Maintains proper stack trace for where our error was thrown (only available on V8)
14
+ if (Error.captureStackTrace) {
15
+ Error.captureStackTrace(this, ResponseError);
16
+ }
17
+ }
18
+ }
19
+ exports.ResponseError = ResponseError;
20
+ //# sourceMappingURL=response-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response-error.js","sourceRoot":"","sources":["../../src/errors/response-error.ts"],"names":[],"mappings":";;;AACA,gDAAiD;AAEjD,MAAa,aAAc,SAAQ,KAAK;IAIpC,YAAY,QAAkB;QAC1B,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,MAAM,EAAE,CAAC;aACtD,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC;aAC9B,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,6BAAe,EAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAEhE,KAAK,CAAC,uBAAuB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACnD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,qFAAqF;QACrF,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC;YAC1B,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;QACjD,CAAC;IACL,CAAC;CACJ;AAlBD,sCAkBC"}
@@ -0,0 +1,40 @@
1
+ import { Dialog } from "../dialog";
2
+ import { DirectDebitSubmission, CreditTransferSubmission } from "../types";
3
+ /**
4
+ * TAN process steps for multi-step flows
5
+ */
6
+ export declare enum TanProcessStep {
7
+ INITIAL = "initial",
8
+ CHALLENGE_SENT = "challenge_sent",
9
+ CHALLENGE_RESPONSE_NEEDED = "challenge_response_needed",
10
+ COMPLETED = "completed"
11
+ }
12
+ export declare class TanRequiredError extends Error {
13
+ transactionReference: string;
14
+ challengeText: string;
15
+ challengeMedia: Buffer;
16
+ dialog: Dialog;
17
+ directDebitSubmission?: DirectDebitSubmission;
18
+ creditTransferSubmission?: CreditTransferSubmission;
19
+ /**
20
+ * Current step in the TAN process flow
21
+ */
22
+ processStep: TanProcessStep;
23
+ /**
24
+ * Segment that triggered the TAN requirement
25
+ */
26
+ triggeringSegment?: string;
27
+ /**
28
+ * Additional context information for debugging
29
+ */
30
+ context?: Record<string, any>;
31
+ constructor(message: string, transactionReference: string, challengeText: string, challengeMedia: Buffer, dialog: Dialog, processStep?: TanProcessStep, triggeringSegment?: string, context?: Record<string, any>);
32
+ /**
33
+ * Helper to check if this is a multi-step TAN flow
34
+ */
35
+ isMultiStep(): boolean;
36
+ /**
37
+ * Get a user-friendly description of the current step
38
+ */
39
+ getStepDescription(): string;
40
+ }
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TanRequiredError = exports.TanProcessStep = void 0;
4
+ /**
5
+ * TAN process steps for multi-step flows
6
+ */
7
+ var TanProcessStep;
8
+ (function (TanProcessStep) {
9
+ TanProcessStep["INITIAL"] = "initial";
10
+ TanProcessStep["CHALLENGE_SENT"] = "challenge_sent";
11
+ TanProcessStep["CHALLENGE_RESPONSE_NEEDED"] = "challenge_response_needed";
12
+ TanProcessStep["COMPLETED"] = "completed";
13
+ })(TanProcessStep || (exports.TanProcessStep = TanProcessStep = {}));
14
+ class TanRequiredError extends Error {
15
+ constructor(message, transactionReference, challengeText, challengeMedia, dialog, processStep = TanProcessStep.CHALLENGE_RESPONSE_NEEDED, triggeringSegment, context) {
16
+ super(message);
17
+ this.transactionReference = transactionReference;
18
+ this.challengeText = challengeText;
19
+ this.challengeMedia = challengeMedia;
20
+ this.dialog = dialog;
21
+ this.processStep = processStep;
22
+ this.triggeringSegment = triggeringSegment;
23
+ this.context = context;
24
+ // Maintains proper stack trace for where our error was thrown (only available on V8)
25
+ if (Error.captureStackTrace) {
26
+ Error.captureStackTrace(this, TanRequiredError);
27
+ }
28
+ }
29
+ /**
30
+ * Helper to check if this is a multi-step TAN flow
31
+ */
32
+ isMultiStep() {
33
+ return this.processStep !== TanProcessStep.COMPLETED;
34
+ }
35
+ /**
36
+ * Get a user-friendly description of the current step
37
+ */
38
+ getStepDescription() {
39
+ switch (this.processStep) {
40
+ case TanProcessStep.INITIAL:
41
+ return "TAN process initiated";
42
+ case TanProcessStep.CHALLENGE_SENT:
43
+ return "TAN challenge has been sent";
44
+ case TanProcessStep.CHALLENGE_RESPONSE_NEEDED:
45
+ return "TAN response required";
46
+ case TanProcessStep.COMPLETED:
47
+ return "TAN process completed";
48
+ default:
49
+ return "Unknown TAN process step";
50
+ }
51
+ }
52
+ }
53
+ exports.TanRequiredError = TanRequiredError;
54
+ //# sourceMappingURL=tan-required-error.js.map
@@ -0,0 +1 @@
1
+ {"version":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uB,CAAC;YACnC,KAAK,cAAc,CAAC,SAAS;gBACzB,OAAO,uBAAuB,CAAC;YACnC;gBACI,OAAO,0BAA0B,CAAC;QAC1C,CAAC;IACL,CAAC;CACJ;AArED,4CAqEC"}
@@ -0,0 +1,81 @@
1
+ /**
2
+ * A set of utilities for formatting data into the fints data formats.
3
+ */
4
+ export declare const Format: {
5
+ /**
6
+ * Format a date. The time part is ignored.
7
+ *
8
+ * @param date The date to format.
9
+ *
10
+ * @return The formatted string.
11
+ */
12
+ date(date?: Date): string;
13
+ /**
14
+ * Format a binary string with a length specification.
15
+ *
16
+ * @param str The string to format.
17
+ *
18
+ * @return The formatted string.
19
+ */
20
+ stringWithLength(str: string): string;
21
+ /**
22
+ * Format a boolean with no `false` representation.
23
+ *
24
+ * @param value The boolean to format.
25
+ *
26
+ * @return The formatted string.
27
+ */
28
+ bool(value: boolean): "J" | "";
29
+ /**
30
+ * Return the SEPA identification descriptor.
31
+ *
32
+ * @return The SEPA identification descriptor.
33
+ */
34
+ sepaDescriptor(): string;
35
+ /**
36
+ * Format a number.
37
+ *
38
+ * @param num The number to format.
39
+ *
40
+ * @return The formatted string.
41
+ */
42
+ num(num: number): string;
43
+ /**
44
+ * Format a normal string, escaping all control characters.
45
+ *
46
+ * @param str The string to format.
47
+ *
48
+ * @return The formatted string.
49
+ */
50
+ stringEscaped(str: string): string;
51
+ /**
52
+ * Format a set of digits.
53
+ *
54
+ * @param num The number to format.
55
+ *
56
+ * @return The formatted string.
57
+ */
58
+ dig(num: number): string;
59
+ /**
60
+ * Format a time. The date part is ignored.
61
+ *
62
+ * @param date The date to format.
63
+ *
64
+ * @return The formatted string.
65
+ */
66
+ time(date?: Date): string;
67
+ /**
68
+ * Return an empty string.
69
+ *
70
+ * @return An empty string.
71
+ */
72
+ empty(): string;
73
+ /**
74
+ * Format a boolean with an explicit `false` representation (named "JN" in the official documentation).
75
+ *
76
+ * @param value The boolean to format.
77
+ *
78
+ * @return The formatted string.
79
+ */
80
+ jn(bool: boolean): "J" | "N";
81
+ };
package/dist/format.js ADDED
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Format = void 0;
4
+ const date_fns_1 = require("date-fns");
5
+ const utils_1 = require("./utils");
6
+ /**
7
+ * A set of utilities for formatting data into the fints data formats.
8
+ */
9
+ exports.Format = {
10
+ /**
11
+ * Format a date. The time part is ignored.
12
+ *
13
+ * @param date The date to format.
14
+ *
15
+ * @return The formatted string.
16
+ */
17
+ date(date) {
18
+ const dateToFormat = date ? date : new Date();
19
+ return (0, date_fns_1.format)(dateToFormat, "yyyMMdd");
20
+ },
21
+ /**
22
+ * Format a binary string with a length specification.
23
+ *
24
+ * @param str The string to format.
25
+ *
26
+ * @return The formatted string.
27
+ */
28
+ stringWithLength(str) {
29
+ return `@${str.length}@${str}`;
30
+ },
31
+ /**
32
+ * Format a boolean with no `false` representation.
33
+ *
34
+ * @param value The boolean to format.
35
+ *
36
+ * @return The formatted string.
37
+ */
38
+ bool(value) {
39
+ return value ? "J" : "";
40
+ },
41
+ /**
42
+ * Return the SEPA identification descriptor.
43
+ *
44
+ * @return The SEPA identification descriptor.
45
+ */
46
+ sepaDescriptor() {
47
+ return "urn?:iso?:std?:iso?:20022?:tech?:xsd?:pain.001.001.03";
48
+ },
49
+ /**
50
+ * Format a number.
51
+ *
52
+ * @param num The number to format.
53
+ *
54
+ * @return The formatted string.
55
+ */
56
+ num(num) {
57
+ return `${num}`.replace(/\./, ",");
58
+ },
59
+ /**
60
+ * Format a normal string, escaping all control characters.
61
+ *
62
+ * @param str The string to format.
63
+ *
64
+ * @return The formatted string.
65
+ */
66
+ stringEscaped(str) {
67
+ if (!str) {
68
+ return "";
69
+ }
70
+ return (0, utils_1.escapeFinTS)(str);
71
+ },
72
+ /**
73
+ * Format a set of digits.
74
+ *
75
+ * @param num The number to format.
76
+ *
77
+ * @return The formatted string.
78
+ */
79
+ dig(num) {
80
+ return (0, utils_1.leftPad)(String(num), 12);
81
+ },
82
+ /**
83
+ * Format a time. The date part is ignored.
84
+ *
85
+ * @param date The date to format.
86
+ *
87
+ * @return The formatted string.
88
+ */
89
+ time(date) {
90
+ const dateToFormat = date ? date : new Date();
91
+ return (0, date_fns_1.format)(dateToFormat, "HHMMss");
92
+ },
93
+ /**
94
+ * Return an empty string.
95
+ *
96
+ * @return An empty string.
97
+ */
98
+ empty() {
99
+ return "";
100
+ },
101
+ /**
102
+ * Format a boolean with an explicit `false` representation (named "JN" in the official documentation).
103
+ *
104
+ * @param value The boolean to format.
105
+ *
106
+ * @return The formatted string.
107
+ */
108
+ jn(bool) {
109
+ return bool ? "J" : "N";
110
+ },
111
+ };
112
+ //# sourceMappingURL=format.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format.js","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":";;;AAAA,uCAAkC;AAClC,mCAA+C;AAE/C;;GAEG;AACU,QAAA,MAAM,GAAG;IAClB;;;;;;OAMG;IACH,IAAI,CAAC,IAAW;QACZ,MAAM,YAAY,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC;QAC9C,OAAO,IAAA,iBAAM,EAAC,YAAY,EAAE,SAAS,CAAC,CAAC;IAC3C,CAAC;IACD;;;;;;OAMG;IACH,gBAAgB,CAAC,GAAW;QACxB,OAAO,IAAI,GAAG,CAAC,MAAM,IAAI,GAAG,EAAE,CAAC;IACnC,CAAC;IACD;;;;;;OAMG;IACH,IAAI,CAAC,KAAc;QACf,OAAO,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5B,CAAC;IACD;;;;OAIG;IACH,cAAc;QACV,OAAO,uDAAuD,CAAC;IACnE,CAAC;IACD;;;;;;OAMG;IACH,GAAG,CAAC,GAAW;QACX,OAAO,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACvC,CAAC;IACD;;;;;;OAMG;IACH,aAAa,CAAC,GAAW;QACrB,IAAI,CAAC,GAAG,EAAE,CAAC;YACP,OAAO,EAAE,CAAC;QACd,CAAC;QACD,OAAO,IAAA,mBAAW,EAAC,GAAG,CAAC,CAAC;IAC5B,CAAC;IACD;;;;;;OAMG;IACH,GAAG,CAAC,GAAW;QACX,OAAO,IAAA,eAAO,EAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;IACpC,CAAC;IACD;;;;;;OAMG;IACH,IAAI,CAAC,IAAW;QACZ,MAAM,YAAY,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC;QAC9C,OAAO,IAAA,iBAAM,EAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IAC1C,CAAC;IACD;;;;OAIG;IACH,KAAK;QACD,OAAO,EAAE,CAAC;IACd,CAAC;IACD;;;;;;OAMG;IACH,EAAE,CAAC,IAAa;QACZ,OAAO,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;IAC5B,CAAC;CACJ,CAAC"}
@@ -0,0 +1,36 @@
1
+ import "isomorphic-fetch";
2
+ import { Request } from "./request";
3
+ import { Response } from "./response";
4
+ import { Connection } from "./types";
5
+ /**
6
+ * Configuration specifying how to reach the fints server.
7
+ */
8
+ export declare class ConnectionConfig {
9
+ /**
10
+ * The URL to reach the server at.
11
+ */
12
+ url: string;
13
+ /**
14
+ * If set to `true`, will log all requests performed and responses received.
15
+ */
16
+ debug: boolean;
17
+ /**
18
+ * Timeout in milliseconds for HTTP requests. Default: 30000 (30 seconds)
19
+ */
20
+ timeout: number;
21
+ /**
22
+ * Maximum number of retry attempts for failed requests. Default: 3
23
+ */
24
+ maxRetries: number;
25
+ /**
26
+ * Base delay in milliseconds for exponential backoff. Default: 1000 (1 second)
27
+ */
28
+ retryDelay: number;
29
+ }
30
+ /**
31
+ * A connection used by clients to reach the fints server.
32
+ */
33
+ export declare class HttpConnection extends ConnectionConfig implements Connection {
34
+ constructor(config: ConnectionConfig);
35
+ send(request: Request): Promise<Response>;
36
+ }
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.HttpConnection = exports.ConnectionConfig = void 0;
13
+ require("isomorphic-fetch");
14
+ const logger_1 = require("./logger");
15
+ const utils_1 = require("./utils");
16
+ const response_1 = require("./response");
17
+ /**
18
+ * Configuration specifying how to reach the fints server.
19
+ */
20
+ class ConnectionConfig {
21
+ constructor() {
22
+ /**
23
+ * If set to `true`, will log all requests performed and responses received.
24
+ */
25
+ this.debug = false;
26
+ /**
27
+ * Timeout in milliseconds for HTTP requests. Default: 30000 (30 seconds)
28
+ */
29
+ this.timeout = 30000;
30
+ /**
31
+ * Maximum number of retry attempts for failed requests. Default: 3
32
+ */
33
+ this.maxRetries = 3;
34
+ /**
35
+ * Base delay in milliseconds for exponential backoff. Default: 1000 (1 second)
36
+ */
37
+ this.retryDelay = 1000;
38
+ }
39
+ }
40
+ exports.ConnectionConfig = ConnectionConfig;
41
+ /**
42
+ * A connection used by clients to reach the fints server.
43
+ */
44
+ class HttpConnection extends ConnectionConfig {
45
+ constructor(config) {
46
+ super();
47
+ Object.assign(this, config);
48
+ }
49
+ send(request) {
50
+ return __awaiter(this, void 0, void 0, function* () {
51
+ const { url } = this;
52
+ (0, logger_1.verbose)(`Sending Request: ${request}`);
53
+ if (this.debug) {
54
+ (0, logger_1.verbose)(`Parsed Request:\n${request.debugString}`);
55
+ }
56
+ let lastError = null;
57
+ let attempt = 0;
58
+ while (attempt <= this.maxRetries) {
59
+ try {
60
+ const controller = new AbortController();
61
+ const timeoutId = setTimeout(() => controller.abort(), this.timeout);
62
+ try {
63
+ const httpRequest = yield fetch(url, {
64
+ method: "POST",
65
+ body: (0, utils_1.encodeBase64)(String(request)),
66
+ signal: controller.signal,
67
+ });
68
+ if (!httpRequest.ok) {
69
+ throw new Error(`Received bad status code ${httpRequest.status} from FinTS endpoint.`);
70
+ }
71
+ const responseString = (0, utils_1.decodeBase64)(yield httpRequest.text());
72
+ (0, logger_1.verbose)(`Received Response: ${responseString}`);
73
+ const response = new response_1.Response(responseString);
74
+ if (this.debug) {
75
+ (0, logger_1.verbose)(`Parsed Response:\n${response.debugString}`);
76
+ }
77
+ return response;
78
+ }
79
+ finally {
80
+ clearTimeout(timeoutId);
81
+ }
82
+ }
83
+ catch (error) {
84
+ lastError = error;
85
+ attempt++;
86
+ // Check if error is due to timeout (AbortError is thrown when fetch is aborted)
87
+ const isTimeout = error.name === "AbortError";
88
+ if (attempt <= this.maxRetries) {
89
+ // Calculate exponential backoff delay
90
+ const delay = this.retryDelay * Math.pow(2, attempt - 1);
91
+ (0, logger_1.verbose)(`Request failed (attempt ${attempt}/${this.maxRetries + 1}), retrying in ${delay}ms: ${error.message}`);
92
+ yield new Promise((resolve) => setTimeout(resolve, delay));
93
+ }
94
+ else {
95
+ // Max retries reached
96
+ if (isTimeout) {
97
+ throw new Error(`FinTS request timed out after ${this.maxRetries + 1} attempts (timeout: ${this.timeout}ms)`);
98
+ }
99
+ throw new Error(`FinTS request failed after ${this.maxRetries + 1} attempts: ${lastError.message}`);
100
+ }
101
+ }
102
+ }
103
+ // This should never be reached, but TypeScript needs it
104
+ throw lastError || new Error("Unknown error during FinTS request");
105
+ });
106
+ }
107
+ }
108
+ exports.HttpConnection = HttpConnection;
109
+ //# sourceMappingURL=http-connection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-connection.js","sourceRoot":"","sources":["../src/http-connection.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4BAA0B;AAC1B,qCAAmC;AACnC,mCAAqD;AAErD,yCAAsC;AAGtC;;GAEG;AACH,MAAa,gBAAgB;IAA7B;QAKI;;WAEG;QACI,UAAK,GAAG,KAAK,CAAC;QACrB;;WAEG;QACI,YAAO,GAAG,KAAK,CAAC;QACvB;;WAEG;QACI,eAAU,GAAG,CAAC,CAAC;QACtB;;WAEG;QACI,eAAU,GAAG,IAAI,CAAC;IAC7B,CAAC;CAAA;AArBD,4CAqBC;AAED;;GAEG;AACH,MAAa,cAAe,SAAQ,gBAAgB;IAChD,YAAY,MAAwB;QAChC,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAChC,CAAC;IAEY,IAAI,CAAC,OAAgB;;YAC9B,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;YACrB,IAAA,gBAAO,EAAC,oBAAoB,OAAO,EAAE,CAAC,CAAC;YACvC,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;gBACb,IAAA,gBAAO,EAAC,oBAAoB,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;YACvD,CAAC;YAED,IAAI,SAAS,GAAiB,IAAI,CAAC;YACnC,IAAI,OAAO,GAAG,CAAC,CAAC;YAEhB,OAAO,OAAO,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;gBAChC,IAAI,CAAC;oBACD,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;oBACzC,MAAM,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;oBAErE,IAAI,CAAC;wBACD,MAAM,WAAW,GAAG,MAAM,KAAK,CAAC,GAAG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,CAAC;wBACF,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;oBAC/D,CAAC;yBAAM,CAAC;wBACJ,sBAAsB;wBACtB,IAAI,SAAS,EAAE,CAAC;4BACZ,MAAM,IAAI,KAAK,CACX,iCAAiC,IAAI,CAAC,UAAU,GAAG,CAAC,uBAAuB,IAAI,CAAC,OAAO,KAAK,CAC/F,CAAC;wBACN,CAAC;wBACD,MAAM,IAAI,KAAK,CAAC,8BAA8B,IAAI,CAAC,UAAU,GAAG,CAAC,cAAc,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC;oBACxG,CAAC;gBACL,CAAC;YACL,CAAC;YAED,wDAAwD;YACxD,MAAM,SAAS,IAAI,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;QACvE,CAAC;KAAA;CACJ;AAvED,wCAuEC"}
@@ -0,0 +1,23 @@
1
+ export * from "./client";
2
+ export * from "./constants";
3
+ export * from "./dialog";
4
+ export * from "./error-codes";
5
+ export * from "./format";
6
+ export * from "./http-connection";
7
+ export * from "./logger";
8
+ export * from "./mt940-86-structured";
9
+ export * from "./mt535";
10
+ export * from "./pain";
11
+ export * from "./pain-formats";
12
+ export * from "./parse";
13
+ export * from "./pin-tan-client";
14
+ export * from "./request";
15
+ export * from "./response";
16
+ export * from "./return-value";
17
+ export * from "./segments";
18
+ export * from "./tan-method";
19
+ export * from "./types";
20
+ export * from "./utils";
21
+ export * from "./errors/response-error";
22
+ export * from "./errors/tan-required-error";
23
+ export * from "./errors/fints-error";