@coderoftime/fints 0.1.0 → 0.3.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.
- package/CHANGELOG.md +519 -1
- package/README.md +138 -40
- package/dist/client.d.ts +49 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +242 -0
- package/dist/client.js.map +1 -0
- package/dist/core/account.d.ts +46 -7
- package/dist/core/account.d.ts.map +1 -1
- package/dist/core/account.js +143 -24
- package/dist/core/account.js.map +1 -1
- package/dist/core/amount.d.ts +15 -4
- package/dist/core/amount.d.ts.map +1 -1
- package/dist/core/amount.js +46 -9
- package/dist/core/amount.js.map +1 -1
- package/dist/core/balance.d.ts +4 -0
- package/dist/core/balance.d.ts.map +1 -1
- package/dist/core/balance.js +11 -5
- package/dist/core/balance.js.map +1 -1
- package/dist/core/bank-info.d.ts +21 -4
- package/dist/core/bank-info.d.ts.map +1 -1
- package/dist/core/bank-info.js +26 -5
- package/dist/core/bank-info.js.map +1 -1
- package/dist/core/client.d.ts +81 -19
- package/dist/core/client.d.ts.map +1 -1
- package/dist/core/config.d.ts +40 -20
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +85 -30
- package/dist/core/config.js.map +1 -1
- package/dist/core/errors.d.ts +100 -26
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/errors.js +136 -53
- package/dist/core/errors.js.map +1 -1
- package/dist/core/feedback.d.ts +11 -1
- package/dist/core/feedback.d.ts.map +1 -1
- package/dist/core/feedback.js +14 -2
- package/dist/core/feedback.js.map +1 -1
- package/dist/core/transaction.d.ts +11 -1
- package/dist/core/transaction.d.ts.map +1 -1
- package/dist/core/transaction.js +21 -4
- package/dist/core/transaction.js.map +1 -1
- package/dist/core/transport.d.ts +48 -6
- package/dist/core/transport.d.ts.map +1 -1
- package/dist/core/transport.js +126 -29
- package/dist/core/transport.js.map +1 -1
- package/dist/formats/camt.d.ts +28 -5
- package/dist/formats/camt.d.ts.map +1 -1
- package/dist/formats/camt.js +132 -50
- package/dist/formats/camt.js.map +1 -1
- package/dist/formats/mt940.d.ts +29 -5
- package/dist/formats/mt940.d.ts.map +1 -1
- package/dist/formats/mt940.js +209 -113
- package/dist/formats/mt940.js.map +1 -1
- package/dist/formats/readers.d.ts +6 -2
- package/dist/formats/readers.d.ts.map +1 -1
- package/dist/formats/readers.js +28 -29
- package/dist/formats/readers.js.map +1 -1
- package/dist/formats/record-budget.d.ts +7 -0
- package/dist/formats/record-budget.d.ts.map +1 -0
- package/dist/formats/record-budget.js +17 -0
- package/dist/formats/record-budget.js.map +1 -0
- package/dist/formats/sepa-purpose.d.ts +9 -0
- package/dist/formats/sepa-purpose.d.ts.map +1 -1
- package/dist/formats/sepa-purpose.js +32 -2
- package/dist/formats/sepa-purpose.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/session/app-approval.d.ts +11 -5
- package/dist/session/app-approval.d.ts.map +1 -1
- package/dist/session/app-approval.js +23 -12
- package/dist/session/app-approval.js.map +1 -1
- package/dist/session/dialog-runner.d.ts +11 -11
- package/dist/session/dialog-runner.d.ts.map +1 -1
- package/dist/session/dialog-runner.js +34 -19
- package/dist/session/dialog-runner.js.map +1 -1
- package/dist/session/login-guard.d.ts +54 -49
- package/dist/session/login-guard.d.ts.map +1 -1
- package/dist/session/login-guard.js +170 -83
- package/dist/session/login-guard.js.map +1 -1
- package/dist/session/sepa-accounts.d.ts +20 -14
- package/dist/session/sepa-accounts.d.ts.map +1 -1
- package/dist/session/sepa-accounts.js +62 -46
- package/dist/session/sepa-accounts.js.map +1 -1
- package/dist/session/session-setup.d.ts +41 -24
- package/dist/session/session-setup.d.ts.map +1 -1
- package/dist/session/session-setup.js +106 -63
- package/dist/session/session-setup.js.map +1 -1
- package/dist/session/session-state.d.ts +10 -6
- package/dist/session/session-state.d.ts.map +1 -1
- package/dist/session/session-state.js +72 -18
- package/dist/session/session-state.js.map +1 -1
- package/dist/session/signed-dialog.d.ts +83 -0
- package/dist/session/signed-dialog.d.ts.map +1 -0
- package/dist/session/signed-dialog.js +185 -0
- package/dist/session/signed-dialog.js.map +1 -0
- package/dist/session/tan-selection.d.ts +26 -18
- package/dist/session/tan-selection.d.ts.map +1 -1
- package/dist/session/tan-selection.js +44 -33
- package/dist/session/tan-selection.js.map +1 -1
- package/dist/session/user-prompts.d.ts +14 -5
- package/dist/session/user-prompts.d.ts.map +1 -1
- package/dist/session/user-prompts.js +53 -18
- package/dist/session/user-prompts.js.map +1 -1
- package/dist/tan/challenge.d.ts +47 -24
- package/dist/tan/challenge.d.ts.map +1 -1
- package/dist/tan/challenge.js +56 -51
- package/dist/tan/challenge.js.map +1 -1
- package/dist/tan/flicker.d.ts +11 -1
- package/dist/tan/flicker.d.ts.map +1 -1
- package/dist/tan/flicker.js +70 -24
- package/dist/tan/flicker.js.map +1 -1
- package/dist/tan/tan-image.d.ts +6 -2
- package/dist/tan/tan-image.d.ts.map +1 -1
- package/dist/tan/tan-image.js +14 -6
- package/dist/tan/tan-image.js.map +1 -1
- package/dist/tan/tan-models.d.ts +14 -2
- package/dist/tan/tan-models.d.ts.map +1 -1
- package/dist/tan/tan-models.js +24 -7
- package/dist/tan/tan-models.js.map +1 -1
- package/dist/util/arguments.d.ts +13 -0
- package/dist/util/arguments.d.ts.map +1 -0
- package/dist/util/arguments.js +40 -0
- package/dist/util/arguments.js.map +1 -0
- package/dist/util/async.d.ts +4 -3
- package/dist/util/async.d.ts.map +1 -1
- package/dist/util/async.js +6 -7
- package/dist/util/async.js.map +1 -1
- package/dist/util/bytes.d.ts +3 -4
- package/dist/util/bytes.d.ts.map +1 -1
- package/dist/util/bytes.js +13 -21
- package/dist/util/bytes.js.map +1 -1
- package/dist/util/call-context.d.ts.map +1 -1
- package/dist/util/call-context.js +3 -2
- package/dist/util/call-context.js.map +1 -1
- package/dist/util/dates.d.ts +6 -20
- package/dist/util/dates.d.ts.map +1 -1
- package/dist/util/dates.js +58 -28
- package/dist/util/dates.js.map +1 -1
- package/dist/util/errors.d.ts +13 -3
- package/dist/util/errors.d.ts.map +1 -1
- package/dist/util/errors.js +19 -6
- package/dist/util/errors.js.map +1 -1
- package/dist/util/immutable-map.d.ts +5 -2
- package/dist/util/immutable-map.d.ts.map +1 -1
- package/dist/util/immutable-map.js +15 -12
- package/dist/util/immutable-map.js.map +1 -1
- package/dist/util/inspect.d.ts +11 -0
- package/dist/util/inspect.d.ts.map +1 -0
- package/dist/util/inspect.js +14 -0
- package/dist/util/inspect.js.map +1 -0
- package/dist/util/json.d.ts +4 -0
- package/dist/util/json.d.ts.map +1 -1
- package/dist/util/json.js +18 -0
- package/dist/util/json.js.map +1 -1
- package/dist/util/text.d.ts +38 -5
- package/dist/util/text.d.ts.map +1 -1
- package/dist/util/text.js +90 -16
- package/dist/util/text.js.map +1 -1
- package/dist/util/xml.d.ts +9 -6
- package/dist/util/xml.d.ts.map +1 -1
- package/dist/util/xml.js +129 -56
- package/dist/util/xml.js.map +1 -1
- package/dist/v3/account-extension.d.ts.map +1 -1
- package/dist/v3/account-extension.js +7 -10
- package/dist/v3/account-extension.js.map +1 -1
- package/dist/v3/bank-connection.d.ts +54 -0
- package/dist/v3/bank-connection.d.ts.map +1 -0
- package/dist/v3/bank-connection.js +118 -0
- package/dist/v3/bank-connection.js.map +1 -0
- package/dist/v3/dialog.d.ts +84 -46
- package/dist/v3/dialog.d.ts.map +1 -1
- package/dist/v3/dialog.js +174 -60
- package/dist/v3/dialog.js.map +1 -1
- package/dist/v3/message.d.ts +32 -11
- package/dist/v3/message.d.ts.map +1 -1
- package/dist/v3/message.js +144 -83
- package/dist/v3/message.js.map +1 -1
- package/dist/v3/parameter-store.d.ts +111 -0
- package/dist/v3/parameter-store.d.ts.map +1 -0
- package/dist/v3/parameter-store.js +197 -0
- package/dist/v3/parameter-store.js.map +1 -0
- package/dist/v3/parameters.d.ts +44 -17
- package/dist/v3/parameters.d.ts.map +1 -1
- package/dist/v3/parameters.js +136 -60
- package/dist/v3/parameters.js.map +1 -1
- package/dist/v3/protocol.d.ts +50 -50
- package/dist/v3/protocol.d.ts.map +1 -1
- package/dist/v3/protocol.js +91 -210
- package/dist/v3/protocol.js.map +1 -1
- package/dist/v3/queries.d.ts +51 -0
- package/dist/v3/queries.d.ts.map +1 -0
- package/dist/v3/queries.js +128 -0
- package/dist/v3/queries.js.map +1 -0
- package/dist/v3/segments.d.ts +43 -19
- package/dist/v3/segments.d.ts.map +1 -1
- package/dist/v3/segments.js +84 -33
- package/dist/v3/segments.js.map +1 -1
- package/dist/v3/syntax.d.ts +68 -13
- package/dist/v3/syntax.d.ts.map +1 -1
- package/dist/v3/syntax.js +183 -102
- package/dist/v3/syntax.js.map +1 -1
- package/package.json +10 -6
- package/src/client.ts +293 -0
- package/src/core/account.ts +153 -24
- package/src/core/amount.ts +45 -10
- package/src/core/balance.ts +12 -5
- package/src/core/bank-info.ts +29 -5
- package/src/core/client.ts +83 -19
- package/src/core/config.ts +95 -35
- package/src/core/errors.ts +148 -54
- package/src/core/feedback.ts +16 -2
- package/src/core/transaction.ts +22 -4
- package/src/core/transport.ts +153 -32
- package/src/formats/camt.ts +153 -45
- package/src/formats/mt940.ts +244 -122
- package/src/formats/readers.ts +28 -31
- package/src/formats/record-budget.ts +18 -0
- package/src/formats/sepa-purpose.ts +29 -2
- package/src/index.ts +4 -2
- package/src/session/app-approval.ts +51 -38
- package/src/session/dialog-runner.ts +61 -31
- package/src/session/login-guard.ts +189 -87
- package/src/session/sepa-accounts.ts +63 -45
- package/src/session/session-setup.ts +105 -68
- package/src/session/session-state.ts +74 -23
- package/src/session/signed-dialog.ts +222 -0
- package/src/session/tan-selection.ts +50 -39
- package/src/session/user-prompts.ts +62 -18
- package/src/tan/challenge.ts +87 -64
- package/src/tan/flicker.ts +72 -23
- package/src/tan/tan-image.ts +15 -6
- package/src/tan/tan-models.ts +26 -7
- package/src/util/arguments.ts +40 -0
- package/src/util/async.ts +10 -9
- package/src/util/bytes.ts +14 -20
- package/src/util/call-context.ts +3 -2
- package/src/util/dates.ts +64 -33
- package/src/util/errors.ts +22 -6
- package/src/util/immutable-map.ts +15 -12
- package/src/util/inspect.ts +14 -0
- package/src/util/json.ts +16 -0
- package/src/util/text.ts +87 -15
- package/src/util/xml.ts +130 -52
- package/src/v3/account-extension.ts +7 -12
- package/src/v3/bank-connection.ts +126 -0
- package/src/v3/dialog.ts +186 -92
- package/src/v3/message.ts +140 -79
- package/src/v3/parameter-store.ts +226 -0
- package/src/v3/parameters.ts +166 -66
- package/src/v3/protocol.ts +103 -253
- package/src/v3/queries.ts +198 -0
- package/src/v3/segments.ts +86 -31
- package/src/v3/syntax.ts +172 -93
- package/dist/session/bank-connection.d.ts +0 -28
- package/dist/session/bank-connection.d.ts.map +0 -1
- package/dist/session/bank-connection.js +0 -48
- package/dist/session/bank-connection.js.map +0 -1
- package/dist/session/parameter-data.d.ts +0 -83
- package/dist/session/parameter-data.d.ts.map +0 -1
- package/dist/session/parameter-data.js +0 -68
- package/dist/session/parameter-data.js.map +0 -1
- package/dist/session/pin-tan-client.d.ts +0 -54
- package/dist/session/pin-tan-client.d.ts.map +0 -1
- package/dist/session/pin-tan-client.js +0 -153
- package/dist/session/pin-tan-client.js.map +0 -1
- package/dist/session/pin-tan-dialog.d.ts +0 -71
- package/dist/session/pin-tan-dialog.d.ts.map +0 -1
- package/dist/session/pin-tan-dialog.js +0 -124
- package/dist/session/pin-tan-dialog.js.map +0 -1
- package/dist/session/protocol.d.ts +0 -209
- package/dist/session/protocol.d.ts.map +0 -1
- package/dist/session/protocol.js +0 -75
- package/dist/session/protocol.js.map +0 -1
- package/dist/session/response-handler.d.ts +0 -48
- package/dist/session/response-handler.d.ts.map +0 -1
- package/dist/session/response-handler.js +0 -121
- package/dist/session/response-handler.js.map +0 -1
- package/dist/v3/client.d.ts +0 -24
- package/dist/v3/client.d.ts.map +0 -1
- package/dist/v3/client.js +0 -16
- package/dist/v3/client.js.map +0 -1
- package/src/session/bank-connection.ts +0 -51
- package/src/session/parameter-data.ts +0 -137
- package/src/session/pin-tan-client.ts +0 -186
- package/src/session/pin-tan-dialog.ts +0 -160
- package/src/session/protocol.ts +0 -311
- package/src/session/response-handler.ts +0 -130
- package/src/v3/client.ts +0 -29
package/dist/v3/dialog.d.ts
CHANGED
|
@@ -1,59 +1,69 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { Approval, StartWithOrder } from '../session/protocol.js';
|
|
1
|
+
import { TanChallenge } from '../tan/challenge.js';
|
|
3
2
|
import { TanMethod } from '../tan/tan-models.js';
|
|
4
3
|
import { IncomingMessage3 } from './message.js';
|
|
5
|
-
import type {
|
|
4
|
+
import type { FinTs3Protocol } from './protocol.js';
|
|
6
5
|
import type { SegmentSpec } from './syntax.js';
|
|
7
|
-
/**
|
|
8
|
-
export interface
|
|
9
|
-
|
|
10
|
-
readonly
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
*/
|
|
16
|
-
export interface FinTs3DialogHost {
|
|
17
|
-
/** The bank parameter data received so far, if any. */
|
|
18
|
-
readonly bankParameters: Bpd3 | undefined;
|
|
19
|
-
/** The customer system ID the bank assigned; `undefined` before the synchronization. */
|
|
20
|
-
readonly systemId: string | undefined;
|
|
21
|
-
/** Identification (HKIDN) and processing preparation (HKVVB), which open every dialog. */
|
|
22
|
-
initSegments(systemId: string, anonymous?: boolean): SegmentSpec[];
|
|
6
|
+
/** The bank's request to approve a message with a TAN or in a banking app; `R` is the bank's answer. */
|
|
7
|
+
export interface Approval<R> {
|
|
8
|
+
/** What the user is asked. */
|
|
9
|
+
readonly challenge: TanChallenge;
|
|
10
|
+
/** Sends the TAN the user entered. */
|
|
11
|
+
readonly submitTan: (tan: string) => Promise<R>;
|
|
12
|
+
/** Asks the bank whether the user has approved in the banking app. */
|
|
13
|
+
readonly checkStatus: () => Promise<R>;
|
|
23
14
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* With `signing` the message is signed with the PIN and the `tan`, after `LoginGuard.check`; without, it goes out
|
|
27
|
-
* unsigned, as in an anonymous dialog.
|
|
15
|
+
* Whether the bank announces a push message for once the user has approved (return code 3957), before which the
|
|
16
|
+
* status must not be asked. The client has no push channel, so the user reports the approval instead.
|
|
28
17
|
*/
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
segments: readonly SegmentSpec[];
|
|
33
|
-
signing: Signing3 | undefined;
|
|
34
|
-
tan: string | undefined;
|
|
35
|
-
}): Promise<Uint8Array>;
|
|
18
|
+
readonly waitForPush: boolean;
|
|
19
|
+
/** The new instructions a status answer gives the user (return code 3956); `undefined` where it gives none. */
|
|
20
|
+
readonly instructionsIn: (response: R) => string | undefined;
|
|
36
21
|
}
|
|
37
|
-
/**
|
|
38
|
-
|
|
39
|
-
|
|
22
|
+
/**
|
|
23
|
+
* One FinTS 3.0 dialog: numbered messages under the dialog ID the bank assigns in its first answer, signed with a TAN
|
|
24
|
+
* method and medium, and the approvals the bank asks for. The `FinTs3Protocol` builds the messages and signs them.
|
|
25
|
+
*/
|
|
26
|
+
export declare class FinTs3Dialog {
|
|
27
|
+
private readonly protocol;
|
|
28
|
+
readonly method: TanMethod;
|
|
29
|
+
/** The TAN medium the messages name, where the method takes one. */
|
|
30
|
+
readonly tanMedium: string | undefined;
|
|
40
31
|
private readonly anonymous;
|
|
41
32
|
private systemId;
|
|
42
33
|
private id;
|
|
34
|
+
private messageNumber;
|
|
35
|
+
private ended;
|
|
36
|
+
/** When the bank last answered without rejecting the whole message, which shows it still knows the dialog. */
|
|
37
|
+
private lastAnswer;
|
|
43
38
|
private constructor();
|
|
44
|
-
static signed(
|
|
39
|
+
static signed(protocol: FinTs3Protocol, method: TanMethod, tanMedium?: string): FinTs3Dialog;
|
|
45
40
|
/** A dialog without login, which only delivers the bank parameter data. */
|
|
46
|
-
static anonymous(
|
|
47
|
-
|
|
41
|
+
static anonymous(protocol: FinTs3Protocol): FinTs3Dialog;
|
|
42
|
+
/** Whether the bank knows this dialog and it has not ended. */
|
|
48
43
|
get isActive(): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Whether the dialog has ended, on either side.
|
|
46
|
+
*
|
|
47
|
+
* The bank ends a dialog idle for longer than its maximum timeout (HIBPA, Formals C.9), or five minutes where it
|
|
48
|
+
* states none. Such a dialog is neither used nor ended again: the bank would refuse any message in it.
|
|
49
|
+
*/
|
|
50
|
+
private get hasEnded();
|
|
51
|
+
private get idleTooLong();
|
|
52
|
+
/** Whether the messages are signed with a two-step TAN method, so that the bank may ask for approvals. */
|
|
53
|
+
private get isTwoStep();
|
|
49
54
|
/** The version of the HKTAN segments: that of the HITANS segment the bank describes the method in. */
|
|
50
55
|
private get tanVersion();
|
|
56
|
+
/** Opens the dialog; with `synchronize` the bank also assigns a customer system ID. */
|
|
51
57
|
start(synchronize?: boolean): Promise<IncomingMessage3>;
|
|
52
58
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
59
|
+
* The messages that open the dialog and send `order` while no TAN medium is chosen yet, as for listing the media:
|
|
60
|
+
* `login` opens the dialog, asking strong authentication for `order` with a two-step method, and `order` sends the
|
|
61
|
+
* order in a message of its own.
|
|
55
62
|
*/
|
|
56
|
-
startWith(order: SegmentSpec):
|
|
63
|
+
startWith(order: SegmentSpec): {
|
|
64
|
+
readonly login: () => Promise<IncomingMessage3>;
|
|
65
|
+
readonly order: () => Promise<IncomingMessage3>;
|
|
66
|
+
};
|
|
57
67
|
/**
|
|
58
68
|
* Opens the anonymous dialog; the answer carries the bank parameter data.
|
|
59
69
|
*
|
|
@@ -61,18 +71,46 @@ export declare class FinTs3Dialog extends PinTanDialog<IncomingMessage3, Segment
|
|
|
61
71
|
* tells the bank so, whereupon the bank may send parameter data suited to it (PIN/TAN, B.4.3.1).
|
|
62
72
|
*/
|
|
63
73
|
requestBankParameters(announceSca?: boolean): Promise<IncomingMessage3>;
|
|
74
|
+
/** Sends `order`, asking for strong customer authentication where the bank requires it. */
|
|
64
75
|
send(order: SegmentSpec): Promise<IncomingMessage3>;
|
|
65
|
-
|
|
76
|
+
/**
|
|
77
|
+
* Ends the dialog at the bank and returns the answer; `undefined` if the dialog is not active or the end failed.
|
|
78
|
+
*
|
|
79
|
+
* Bank and connection errors are ignored, since the bank may have ended the dialog on its side already.
|
|
80
|
+
*/
|
|
81
|
+
end(): Promise<IncomingMessage3 | undefined>;
|
|
82
|
+
/** Forgets the dialog without contacting the bank, for example after the bank rejected the PIN. */
|
|
83
|
+
discard(): void;
|
|
84
|
+
/**
|
|
85
|
+
* The approval `response`, the dialog's latest answer, asks for with return code 0030 (TAN) or 3955 (banking app):
|
|
86
|
+
* HITAN of process 4, answered with HKTAN process 2 (TAN) or S (status); `undefined` if it asks for none, or carries
|
|
87
|
+
* only the dummy challenge of a message the bank exempts from strong authentication.
|
|
88
|
+
*
|
|
89
|
+
* The bank has not executed the message then, so a request without a challenge is a `FinTsProtocolError`: read as
|
|
90
|
+
* done, it would report an empty result. So is an app approval with a method of HITANS #6: the status request
|
|
91
|
+
* (process S) came with version 7, along with app approvals (PIN/TAN B.5.2).
|
|
92
|
+
*/
|
|
93
|
+
approvalAskedIn(response: IncomingMessage3): Approval<IncomingMessage3> | undefined;
|
|
66
94
|
private tanRequest;
|
|
67
95
|
/**
|
|
68
|
-
*
|
|
96
|
+
* Sends `segments`, with `tan` where they complete an approval, as the next message, and reads the bank's answer. The
|
|
97
|
+
* message counts once the bank has answered, whatever it answered.
|
|
98
|
+
*
|
|
99
|
+
* The bank assigns the dialog ID in its answer to the first message, so the answer to another user's first message
|
|
100
|
+
* passes for it (`ParameterStore.reportedUpdVersion`). Any other answer to another message fails with
|
|
101
|
+
* `FinTsProtocolError` before anything of it is kept: a relay or proxy that mixes up answers would hand the client
|
|
102
|
+
* another user's data, or a page of another query. Only the bank's dialog abort message may name the dialog or the
|
|
103
|
+
* message as unknown instead (`IncomingMessage3.aborts`), so that its text reaches the user.
|
|
104
|
+
*
|
|
105
|
+
* The dialog ends on the client's side, without a dialog end, where it is over for the bank: after a return code that
|
|
106
|
+
* ends it, such as 9800, a dialog abort message, a rejected opening message (Formals C.1.2), or a broken connection
|
|
107
|
+
* (C.6). A request that fails while the client is closing, as one it aborts (`FinTs3Protocol.beginClose`), leaves the
|
|
108
|
+
* dialog active instead, since the bank may have received it: its end follows under the next number. Not so where
|
|
109
|
+
* the request opened the dialog, whose ID only the answer tells.
|
|
69
110
|
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
111
|
+
* Only an answer that does not reject the whole message starts the idle time anew (`hasEnded`): a rejection may come
|
|
112
|
+
* from a bank that has ended the dialog without saying so.
|
|
72
113
|
*/
|
|
73
|
-
protected approvalIn(response: IncomingMessage3): Approval<IncomingMessage3> | undefined;
|
|
74
114
|
private sendSegments;
|
|
75
|
-
/** The bank assigns the dialog ID in its answer to the first message. */
|
|
76
|
-
protected readDialogData(response: IncomingMessage3): void;
|
|
77
115
|
}
|
|
78
116
|
//# sourceMappingURL=dialog.d.ts.map
|
package/dist/v3/dialog.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/v3/dialog.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/v3/dialog.ts"],"names":[],"mappings":"AAIA,OAAO,EAAiB,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAiB/C,wGAAwG;AACxG,MAAM,WAAW,QAAQ,CAAC,CAAC;IACzB,8BAA8B;IAC9B,QAAQ,CAAC,SAAS,EAAE,YAAY,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CAAC,gBAAgB,CAAC;IASrD;;;;OAIG;IACH,SAAS,CAAC,KAAK,EAAE,WAAW,GAAG;QAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,OAAO,CAAC,gBAAgB,CAAC,CAAC;QAChD,QAAQ,CAAC,KAAK,EAAE,MAAM,OAAO,CAAC,gBAAgB,CAAC,CAAC;KACjD;IAWD;;;;;OAKG;IACH,qBAAqB,CAAC,WAAW,UAAQ,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAOrE,2FAA2F;IAC3F,IAAI,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAMnD;;;;OAIG;IACG,GAAG,IAAI,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC;IAWlD,mGAAmG;IACnG,OAAO,IAAI,IAAI;IAIf;;;;;;;;OAQG;IACH,eAAe,CAAC,QAAQ,EAAE,gBAAgB,GAAG,QAAQ,CAAC,gBAAgB,CAAC,GAAG,SAAS;IAgCnF,OAAO,CAAC,UAAU;IASlB;;;;;;;;;;;;;;;;;;OAkBG;YACW,YAAY;CAgC3B"}
|
package/dist/v3/dialog.js
CHANGED
|
@@ -1,63 +1,100 @@
|
|
|
1
1
|
// Internal to the package, and named after the FinTS specification. Documentation is where the meaning is not evident.
|
|
2
|
-
import { FinTsProtocolError } from '../core/errors.js';
|
|
3
|
-
import { FeedbackCodes, hasCode } from '../core/feedback.js';
|
|
4
|
-
import {
|
|
5
|
-
import { PinTanDialog } from '../session/pin-tan-dialog.js';
|
|
2
|
+
import { FinTsError, FinTsProtocolError, FinTsTransportError, parseBankData } from '../core/errors.js';
|
|
3
|
+
import { endsDialog, FeedbackCodes, hasCode, hasErrors } from '../core/feedback.js';
|
|
4
|
+
import { challengeText, TanChallenge } from '../tan/challenge.js';
|
|
6
5
|
import { TanMethod } from '../tan/tan-models.js';
|
|
7
6
|
import { IncomingMessage3 } from './message.js';
|
|
8
|
-
import {
|
|
7
|
+
import { requireBankParameters } from './parameters.js';
|
|
8
|
+
import { noReference, Segments, TanResponse } from './segments.js';
|
|
9
9
|
/** Dialog ID of a dialog the bank has not answered yet, and customer system ID before synchronization. */
|
|
10
10
|
const unassigned = '0';
|
|
11
11
|
/** The first version of HKTAN that supports strong customer authentication. */
|
|
12
12
|
const firstScaVersion = 6;
|
|
13
13
|
/** The first version of HKTAN that supports app approvals, with the status request (process S). */
|
|
14
14
|
const firstDecoupledVersion = 7;
|
|
15
|
-
/**
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
/**
|
|
16
|
+
* How long a dialog may stay idle where the bank states no timeout: on the safe side, since a dialog given up too early
|
|
17
|
+
* only costs a new login, while one kept too long fails the next call.
|
|
18
|
+
*/
|
|
19
|
+
const defaultIdleLimitMs = 5 * 60_000;
|
|
20
|
+
/**
|
|
21
|
+
* One FinTS 3.0 dialog: numbered messages under the dialog ID the bank assigns in its first answer, signed with a TAN
|
|
22
|
+
* method and medium, and the approvals the bank asks for. The `FinTs3Protocol` builds the messages and signs them.
|
|
23
|
+
*/
|
|
24
|
+
export class FinTs3Dialog {
|
|
25
|
+
protocol;
|
|
26
|
+
method;
|
|
27
|
+
tanMedium;
|
|
18
28
|
anonymous;
|
|
19
29
|
systemId;
|
|
20
30
|
id = unassigned;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
31
|
+
messageNumber = 1;
|
|
32
|
+
ended = false;
|
|
33
|
+
/** When the bank last answered without rejecting the whole message, which shows it still knows the dialog. */
|
|
34
|
+
lastAnswer;
|
|
35
|
+
constructor(protocol, method,
|
|
36
|
+
/** The TAN medium the messages name, where the method takes one. */
|
|
37
|
+
tanMedium, anonymous) {
|
|
38
|
+
this.protocol = protocol;
|
|
39
|
+
this.method = method;
|
|
40
|
+
this.tanMedium = tanMedium;
|
|
24
41
|
this.anonymous = anonymous;
|
|
25
|
-
this.systemId = anonymous ? unassigned : (
|
|
42
|
+
this.systemId = anonymous ? unassigned : (protocol.parameters.systemId ?? unassigned);
|
|
26
43
|
}
|
|
27
|
-
static signed(
|
|
28
|
-
return new FinTs3Dialog(
|
|
44
|
+
static signed(protocol, method, tanMedium) {
|
|
45
|
+
return new FinTs3Dialog(protocol, method, tanMedium, false);
|
|
29
46
|
}
|
|
30
47
|
/** A dialog without login, which only delivers the bank parameter data. */
|
|
31
|
-
static anonymous(
|
|
32
|
-
return new FinTs3Dialog(
|
|
33
|
-
}
|
|
34
|
-
get bankParameters() {
|
|
35
|
-
return this.host.bankParameters;
|
|
48
|
+
static anonymous(protocol) {
|
|
49
|
+
return new FinTs3Dialog(protocol, TanMethod.oneStep, undefined, true);
|
|
36
50
|
}
|
|
51
|
+
/** Whether the bank knows this dialog and it has not ended. */
|
|
37
52
|
get isActive() {
|
|
38
53
|
return this.id !== unassigned && !this.hasEnded;
|
|
39
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Whether the dialog has ended, on either side.
|
|
57
|
+
*
|
|
58
|
+
* The bank ends a dialog idle for longer than its maximum timeout (HIBPA, Formals C.9), or five minutes where it
|
|
59
|
+
* states none. Such a dialog is neither used nor ended again: the bank would refuse any message in it.
|
|
60
|
+
*/
|
|
61
|
+
get hasEnded() {
|
|
62
|
+
return this.ended || this.idleTooLong;
|
|
63
|
+
}
|
|
64
|
+
get idleTooLong() {
|
|
65
|
+
const last = this.lastAnswer;
|
|
66
|
+
const timeout = this.protocol.parameters.bankParameters?.bankInfo.maxTimeout;
|
|
67
|
+
// A timeout of 0 or below: the bank keeps idle dialogs without limit.
|
|
68
|
+
const limit = timeout === undefined ? defaultIdleLimitMs : timeout <= 0 ? undefined : timeout * 1000;
|
|
69
|
+
return last !== undefined && limit !== undefined && Date.now() - last > limit;
|
|
70
|
+
}
|
|
71
|
+
/** Whether the messages are signed with a two-step TAN method, so that the bank may ask for approvals. */
|
|
72
|
+
get isTwoStep() {
|
|
73
|
+
return !this.method.isOneStep;
|
|
74
|
+
}
|
|
40
75
|
/** The version of the HKTAN segments: that of the HITANS segment the bank describes the method in. */
|
|
41
76
|
get tanVersion() {
|
|
42
|
-
return this.bankParameters?.tanVersion(this.method) ?? firstScaVersion;
|
|
77
|
+
return this.protocol.parameters.bankParameters?.tanVersion(this.method) ?? firstScaVersion;
|
|
43
78
|
}
|
|
79
|
+
/** Opens the dialog; with `synchronize` the bank also assigns a customer system ID. */
|
|
44
80
|
start(synchronize = false) {
|
|
45
81
|
if (synchronize)
|
|
46
82
|
this.systemId = unassigned;
|
|
47
83
|
return this.sendSegments([
|
|
48
|
-
...this.
|
|
84
|
+
...this.protocol.initSegments(this.systemId),
|
|
49
85
|
...(this.isTwoStep ? [this.tanRequest('HKIDN')] : []),
|
|
50
86
|
...(synchronize ? [Segments.synchronization()] : []),
|
|
51
87
|
]);
|
|
52
88
|
}
|
|
53
89
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
90
|
+
* The messages that open the dialog and send `order` while no TAN medium is chosen yet, as for listing the media:
|
|
91
|
+
* `login` opens the dialog, asking strong authentication for `order` with a two-step method, and `order` sends the
|
|
92
|
+
* order in a message of its own.
|
|
56
93
|
*/
|
|
57
94
|
startWith(order) {
|
|
58
95
|
return {
|
|
59
96
|
login: () => this.sendSegments([
|
|
60
|
-
...this.
|
|
97
|
+
...this.protocol.initSegments(this.systemId),
|
|
61
98
|
...(this.isTwoStep ? [this.tanRequest(order.type)] : []),
|
|
62
99
|
]),
|
|
63
100
|
order: () => this.sendSegments([order]),
|
|
@@ -71,61 +108,138 @@ export class FinTs3Dialog extends PinTanDialog {
|
|
|
71
108
|
*/
|
|
72
109
|
requestBankParameters(announceSca = false) {
|
|
73
110
|
return this.sendSegments([
|
|
74
|
-
...this.
|
|
111
|
+
...this.protocol.initSegments(unassigned, true),
|
|
75
112
|
...(announceSca ? [Segments.tanProcess4(firstScaVersion, 'HKIDN')] : []),
|
|
76
113
|
]);
|
|
77
114
|
}
|
|
115
|
+
/** Sends `order`, asking for strong customer authentication where the bank requires it. */
|
|
78
116
|
send(order) {
|
|
79
|
-
const needsTan = this.isTwoStep && requireBankParameters(this.bankParameters).pinTan.requiresTan(order.type);
|
|
117
|
+
const needsTan = this.isTwoStep && requireBankParameters(this.protocol.parameters.bankParameters).pinTan.requiresTan(order.type);
|
|
80
118
|
return this.sendSegments([order, ...(needsTan ? [this.tanRequest(order.type)] : [])]);
|
|
81
119
|
}
|
|
82
|
-
|
|
83
|
-
|
|
120
|
+
/**
|
|
121
|
+
* Ends the dialog at the bank and returns the answer; `undefined` if the dialog is not active or the end failed.
|
|
122
|
+
*
|
|
123
|
+
* Bank and connection errors are ignored, since the bank may have ended the dialog on its side already.
|
|
124
|
+
*/
|
|
125
|
+
async end() {
|
|
126
|
+
if (!this.isActive)
|
|
127
|
+
return undefined;
|
|
128
|
+
this.ended = true;
|
|
129
|
+
try {
|
|
130
|
+
return await this.sendSegments([Segments.dialogEnd(this.id)]);
|
|
131
|
+
}
|
|
132
|
+
catch (error) {
|
|
133
|
+
if (!(error instanceof FinTsError))
|
|
134
|
+
throw error;
|
|
135
|
+
return undefined;
|
|
136
|
+
}
|
|
84
137
|
}
|
|
85
|
-
|
|
86
|
-
|
|
138
|
+
/** Forgets the dialog without contacting the bank, for example after the bank rejected the PIN. */
|
|
139
|
+
discard() {
|
|
140
|
+
this.ended = true;
|
|
87
141
|
}
|
|
88
142
|
/**
|
|
89
|
-
* The approval
|
|
143
|
+
* The approval `response`, the dialog's latest answer, asks for with return code 0030 (TAN) or 3955 (banking app):
|
|
144
|
+
* HITAN of process 4, answered with HKTAN process 2 (TAN) or S (status); `undefined` if it asks for none, or carries
|
|
145
|
+
* only the dummy challenge of a message the bank exempts from strong authentication.
|
|
90
146
|
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
147
|
+
* The bank has not executed the message then, so a request without a challenge is a `FinTsProtocolError`: read as
|
|
148
|
+
* done, it would report an empty result. So is an app approval with a method of HITANS #6: the status request
|
|
149
|
+
* (process S) came with version 7, along with app approvals (PIN/TAN B.5.2).
|
|
93
150
|
*/
|
|
94
|
-
|
|
95
|
-
const
|
|
96
|
-
|
|
151
|
+
approvalAskedIn(response) {
|
|
152
|
+
const feedback = response.feedback;
|
|
153
|
+
const decoupled = hasCode(feedback, FeedbackCodes.decoupledPending);
|
|
154
|
+
if (hasErrors(feedback) || !(hasCode(feedback, FeedbackCodes.tanRequired) || decoupled))
|
|
97
155
|
return undefined;
|
|
98
|
-
|
|
156
|
+
const tan = tanResponseOf(response, '4');
|
|
157
|
+
if (tan === undefined || tan.isDummy) {
|
|
158
|
+
throw new FinTsProtocolError('The bank asks for an approval, but sends no challenge');
|
|
159
|
+
}
|
|
160
|
+
if (decoupled && this.tanVersion < firstDecoupledVersion) {
|
|
99
161
|
throw new FinTsProtocolError('The bank asks for an app approval, which needs HKTAN version 7');
|
|
100
162
|
}
|
|
101
163
|
const reference = tan.reference;
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
164
|
+
// The placeholder the dialog that looks up the TAN media sends, and the bank may echo, is no medium.
|
|
165
|
+
const medium = tan.mediumName ?? this.tanMedium;
|
|
166
|
+
return {
|
|
167
|
+
challenge: TanChallenge.create({
|
|
168
|
+
method: this.method,
|
|
169
|
+
reference,
|
|
170
|
+
message: tan.challenge,
|
|
171
|
+
hhdUc: tan.hhdUc,
|
|
172
|
+
isDecoupled: decoupled || this.method.decoupled,
|
|
173
|
+
validUntil: tan.validUntil,
|
|
174
|
+
tanMediumName: medium === noReference ? undefined : medium,
|
|
175
|
+
}),
|
|
108
176
|
submitTan: (value) => this.sendSegments([Segments.tanProcess2(this.tanVersion, reference)], value),
|
|
109
177
|
checkStatus: () => this.sendSegments([Segments.tanProcessStatus(this.tanVersion, reference)]),
|
|
178
|
+
waitForPush: hasCode(feedback, FeedbackCodes.decoupledWaitForPush),
|
|
110
179
|
// A status answer that the approval is still pending may carry new instructions (PIN/TAN B.4.2.2.1, step 2b).
|
|
111
|
-
instructionsIn: (status) => tanResponseOf(status, 'S')?.challenge,
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
180
|
+
instructionsIn: (status) => challengeText(tanResponseOf(status, 'S')?.challenge),
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
tanRequest(segmentType) {
|
|
184
|
+
const medium = this.method.mediumRequirement === 'notAllowed' ? undefined : this.tanMedium;
|
|
185
|
+
return Segments.tanProcess4(this.tanVersion, segmentType, medium === undefined ? undefined : this.protocol.parameters.tanMediumToSend(medium));
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Sends `segments`, with `tan` where they complete an approval, as the next message, and reads the bank's answer. The
|
|
189
|
+
* message counts once the bank has answered, whatever it answered.
|
|
190
|
+
*
|
|
191
|
+
* The bank assigns the dialog ID in its answer to the first message, so the answer to another user's first message
|
|
192
|
+
* passes for it (`ParameterStore.reportedUpdVersion`). Any other answer to another message fails with
|
|
193
|
+
* `FinTsProtocolError` before anything of it is kept: a relay or proxy that mixes up answers would hand the client
|
|
194
|
+
* another user's data, or a page of another query. Only the bank's dialog abort message may name the dialog or the
|
|
195
|
+
* message as unknown instead (`IncomingMessage3.aborts`), so that its text reaches the user.
|
|
196
|
+
*
|
|
197
|
+
* The dialog ends on the client's side, without a dialog end, where it is over for the bank: after a return code that
|
|
198
|
+
* ends it, such as 9800, a dialog abort message, a rejected opening message (Formals C.1.2), or a broken connection
|
|
199
|
+
* (C.6). A request that fails while the client is closing, as one it aborts (`FinTs3Protocol.beginClose`), leaves the
|
|
200
|
+
* dialog active instead, since the bank may have received it: its end follows under the next number. Not so where
|
|
201
|
+
* the request opened the dialog, whose ID only the answer tells.
|
|
202
|
+
*
|
|
203
|
+
* Only an answer that does not reject the whole message starts the idle time anew (`hasEnded`): a rejection may come
|
|
204
|
+
* from a bank that has ended the dialog without saying so.
|
|
205
|
+
*/
|
|
206
|
+
async sendSegments(segments, tan) {
|
|
207
|
+
const number = this.messageNumber;
|
|
208
|
+
let answer;
|
|
209
|
+
try {
|
|
210
|
+
answer = await this.protocol.post({
|
|
211
|
+
dialogId: this.id,
|
|
212
|
+
number,
|
|
213
|
+
segments,
|
|
214
|
+
signing: this.anonymous
|
|
215
|
+
? undefined
|
|
216
|
+
: { securityFunction: this.method.securityFunction, systemId: this.systemId },
|
|
217
|
+
tan,
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
catch (error) {
|
|
221
|
+
if (error instanceof FinTsTransportError) {
|
|
222
|
+
if (this.protocol.isClosing && this.id !== unassigned)
|
|
223
|
+
this.messageNumber++;
|
|
224
|
+
else
|
|
225
|
+
this.discard();
|
|
226
|
+
}
|
|
227
|
+
throw error;
|
|
228
|
+
}
|
|
229
|
+
this.messageNumber++;
|
|
230
|
+
const response = parseBankData(() => IncomingMessage3.parse(answer));
|
|
231
|
+
const assigned = this.id === unassigned ? undefined : this.id;
|
|
232
|
+
const aborted = response.aborts(number, assigned);
|
|
233
|
+
if (!aborted && !response.answers(number, assigned)) {
|
|
234
|
+
throw new FinTsProtocolError('The answer belongs to another message than the one sent');
|
|
235
|
+
}
|
|
236
|
+
if (assigned === undefined)
|
|
128
237
|
this.id = response.dialogId ?? unassigned;
|
|
238
|
+
if (!response.messageRejected)
|
|
239
|
+
this.lastAnswer = Date.now();
|
|
240
|
+
if (aborted || endsDialog(response.feedback) || (number === 1 && response.messageRejected))
|
|
241
|
+
this.discard();
|
|
242
|
+
return response;
|
|
129
243
|
}
|
|
130
244
|
}
|
|
131
245
|
/** The TAN part of `response` that answers TAN `process`. */
|
package/dist/v3/dialog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../src/v3/dialog.ts"],"names":[],"mappings":"AAAA,uHAAuH;AAEvH,OAAO,EAAE,kBAAkB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AAO,QAAQ,CAAC;IAClB,CAAC;CACF;AAED,6DAA6D;AAC7D,SAAS,aAAa,CAAC,QAA0B,EAAE,OAAe;IAChE,OAAO,QAAQ;SACZ,OAAO,CAAC,OAAO,CAAC;SAChB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SAChC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC;AACxC,CAAC"}
|
package/dist/v3/message.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { BankMessage } from '../core/bank-info.js';
|
|
2
2
|
import { FinTsFeedback } from '../core/feedback.js';
|
|
3
|
-
import type { BankResponse } from '../session/protocol.js';
|
|
4
3
|
import { type Segment, SegmentSpec } from './syntax.js';
|
|
5
4
|
/** Signature data of a PIN/TAN message. */
|
|
6
5
|
export interface PinTanCredentials {
|
|
@@ -14,12 +13,12 @@ export interface PinTanCredentials {
|
|
|
14
13
|
/** A message to send, and the same message with PIN and TAN masked for logging. */
|
|
15
14
|
export declare class OutgoingMessage {
|
|
16
15
|
readonly bytes: Uint8Array;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
private readonly buildMasked;
|
|
17
|
+
constructor(bytes: Uint8Array, buildMasked: () => Uint8Array);
|
|
18
|
+
/**
|
|
19
|
+
* The message with PIN and TAN masked; built only when a logger asks for it. It is decoded as a whole, as the bank's
|
|
20
|
+
* text is, so a message that mixes ISO 8859-1 text with UTF-8 text (`encodeText`) shows all of it as ISO 8859-1.
|
|
21
|
+
*/
|
|
23
22
|
get masked(): string;
|
|
24
23
|
}
|
|
25
24
|
/**
|
|
@@ -28,7 +27,8 @@ export declare class OutgoingMessage {
|
|
|
28
27
|
* With `security` the segments are signed with PIN and optional `tan` (HNSHK … HNSHA) and wrapped in the encryption
|
|
29
28
|
* envelope (HNVSK, HNVSD) that PIN/TAN uses without actual encryption.
|
|
30
29
|
*
|
|
31
|
-
* The masked message
|
|
30
|
+
* The masked message is built as the message is, from the same time stamp and security control reference, with `***`
|
|
31
|
+
* for PIN and TAN, so that the log does not tell how long they are.
|
|
32
32
|
*/
|
|
33
33
|
export declare function buildMessage(parts: {
|
|
34
34
|
dialogId: string;
|
|
@@ -39,8 +39,9 @@ export declare function buildMessage(parts: {
|
|
|
39
39
|
now?: Date;
|
|
40
40
|
}): OutgoingMessage;
|
|
41
41
|
/** A received message, with the segments of the encryption envelope unpacked. */
|
|
42
|
-
export declare class IncomingMessage3
|
|
42
|
+
export declare class IncomingMessage3 {
|
|
43
43
|
readonly segments: readonly Segment[];
|
|
44
|
+
/** The memory the message holds, in bytes: its length, and what its parts take beyond that. */
|
|
44
45
|
readonly size: number;
|
|
45
46
|
/**
|
|
46
47
|
* Return codes for the whole message (HIRMG), then for single request segments (HIRMS).
|
|
@@ -49,16 +50,36 @@ export declare class IncomingMessage3 implements BankResponse {
|
|
|
49
50
|
* approval reports on the order of an earlier message (PIN/TAN B.4.2.1).
|
|
50
51
|
*/
|
|
51
52
|
readonly feedback: readonly FinTsFeedback[];
|
|
53
|
+
/** Whether the bank rejected the message as a whole (an error in HIRMG), rather than single orders in it. */
|
|
52
54
|
readonly messageRejected: boolean;
|
|
53
55
|
private constructor();
|
|
54
56
|
/**
|
|
55
|
-
* Parses a message; throws `FormatError` if `data` is not
|
|
56
|
-
* maintenance notice
|
|
57
|
+
* Parses a message; throws `FormatError` if `data` is not one complete FinTS message, such as the HTML page of a
|
|
58
|
+
* proxy, a maintenance notice, a message cut short, which lacks the message trailer (HNHBS) at its end, or two
|
|
59
|
+
* messages run together, whose second would pass for part of the first. It does as well for more than one encrypted
|
|
60
|
+
* part (HNVSD), each of which `parseSegments` would allow as many data elements as the whole message.
|
|
61
|
+
*
|
|
62
|
+
* Its `size` counts the memory of the data elements it keeps along with its bytes, since a message of many short
|
|
63
|
+
* elements takes far more memory than bytes.
|
|
57
64
|
*/
|
|
58
65
|
static parse(data: Uint8Array): IncomingMessage3;
|
|
59
66
|
static combine(first: IncomingMessage3, second: IncomingMessage3): IncomingMessage3;
|
|
67
|
+
/** Free-text messages the bank addresses to the user. */
|
|
60
68
|
get bankMessages(): BankMessage[];
|
|
69
|
+
/** The dialog ID the bank assigned, as `Segment.verbatim` reads it, to send back byte for byte. */
|
|
61
70
|
get dialogId(): string | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* Whether the message answers message `number` of the dialog `dialogId`: header and trailer carry that number, and the
|
|
73
|
+
* header names that message where it names the message it refers to (Bezugsnachricht). The dialog ID counts only once
|
|
74
|
+
* the bank has assigned one; before, `dialogId` is `undefined`, since every first message goes out under the same.
|
|
75
|
+
*/
|
|
76
|
+
answers(number: number, dialogId: string | undefined): boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Whether the message is the bank's dialog abort message (Formals B.7.6) for message `number` of the dialog
|
|
79
|
+
* `dialogId`: unencrypted, with nothing but the header, an error for the whole message (HIRMG) and the trailer. Its
|
|
80
|
+
* header names the dialog ID and the message number where the bank knows them, and `unbekannt` and 9999 where not.
|
|
81
|
+
*/
|
|
82
|
+
aborts(number: number, dialogId: string | undefined): boolean;
|
|
62
83
|
find(type: string): Segment | undefined;
|
|
63
84
|
findAll(type: string): Segment[];
|
|
64
85
|
}
|
package/dist/v3/message.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../src/v3/message.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../src/v3/message.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EA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