lib-fints 1.0.3 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -32
- package/dist/client.js +3 -3
- package/dist/codes.js +8 -0
- package/dist/config.js +2 -2
- package/dist/dialog.js +9 -6
- package/dist/interactions/customerInteraction.js +13 -5
- package/dist/interactions/initDialogInteraction.js +32 -6
- package/dist/interactions/tanMediaInteraction.js +3 -1
- package/dist/segment.js +6 -5
- package/dist/segmentDefinition.js +3 -0
- package/dist/segments/HITAN.js +2 -3
- package/dist/segments/HITANS.js +8 -3
- package/dist/segments/HKTAN.js +2 -2
- package/dist/tests/HITAB.test.js +8 -1
- package/dist/tests/HKTAN.test.js +2 -1
- package/dist/types/client.d.ts +6 -6
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/codes.d.ts +7 -0
- package/dist/types/codes.d.ts.map +1 -1
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/dialog.d.ts +1 -1
- package/dist/types/dialog.d.ts.map +1 -1
- package/dist/types/interactions/customerInteraction.d.ts +1 -1
- package/dist/types/interactions/customerInteraction.d.ts.map +1 -1
- package/dist/types/interactions/initDialogInteraction.d.ts.map +1 -1
- package/dist/types/interactions/tanMediaInteraction.d.ts.map +1 -1
- package/dist/types/segment.d.ts.map +1 -1
- package/dist/types/segmentDefinition.d.ts +1 -0
- package/dist/types/segmentDefinition.d.ts.map +1 -1
- package/dist/types/segments/HITAB.d.ts +1 -1
- package/dist/types/segments/HITAB.d.ts.map +1 -1
- package/dist/types/segments/HITAN.d.ts +3 -3
- package/dist/types/segments/HITAN.d.ts.map +1 -1
- package/dist/types/segments/HITANS.d.ts +9 -4
- package/dist/types/segments/HITANS.d.ts.map +1 -1
- package/dist/types/segments/HKTAN.d.ts +2 -1
- package/dist/types/segments/HKTAN.d.ts.map +1 -1
- package/dist/types/tanMethod.d.ts +21 -0
- package/dist/types/tanMethod.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Lib-FinTS
|
|
2
2
|
|
|
3
|
-
A Typescript/Javascript client library for Online-Banking via the FinTS 3.0 protocol with PIN/TAN. The library has no dependencies on other libraries
|
|
3
|
+
A Typescript/Javascript client library for Online-Banking via the FinTS 3.0 protocol with PIN/TAN, supporting PSD2 and decoupled TAN methods. The library has no dependencies on other libraries
|
|
4
4
|
|
|
5
5
|
## Getting Started
|
|
6
6
|
|
|
@@ -15,14 +15,14 @@ In order to communicate with banks via the FinTS protocol you have to register a
|
|
|
15
15
|
> In order to fulfill the PSD2 requirements regarding transparency about the software used by customers, the German Banking Industry has established a process for registering FinTS products in order to be able to provide customers with information regarding FinTS usage.
|
|
16
16
|
> FinTS product registration is currently offered free of charge by the German Banking Industry.
|
|
17
17
|
|
|
18
|
-
[ZKA Registration Website](https://www.
|
|
18
|
+
[ZKA Registration Website](https://www.fints.org/de/hersteller/produktregistrierung)
|
|
19
19
|
|
|
20
20
|
### Runtime Environment
|
|
21
21
|
|
|
22
22
|
The library is written in Typescript and compiled to the ES2022 Javascript language standard which means a minimum Node version of 18 is required.
|
|
23
23
|
|
|
24
24
|
**A note about Browsers:**
|
|
25
|
-
|
|
25
|
+
In theory the library is compatible with a browser environment, but communicating directly from the front-end with a bank server will, apart from security considerations, most likely fail because of the imposed CORS restrictions from web browsers and the lack of corresponding CORS headers in bank server responses.
|
|
26
26
|
|
|
27
27
|
### Installing
|
|
28
28
|
|
|
@@ -34,7 +34,7 @@ npm i lib-fints
|
|
|
34
34
|
|
|
35
35
|
### Sample Usage
|
|
36
36
|
|
|
37
|
-
The main public API of this library is the `FinTSClient` class and `FinTSConfig` class. In order to instantiate the client you need to provide a
|
|
37
|
+
The main public API of this library is the `FinTSClient` class and `FinTSConfig` class. In order to instantiate the client you need to provide a configuration instance. There are basically two ways to initialize a configuration object, one is when you communicate with a bank for the first time and the other when you already have banking information from a prevous session available (more on that later).
|
|
38
38
|
|
|
39
39
|
If you don't have any previous banking information available you can use the static `forFirstTimeUse()` factory method like this:
|
|
40
40
|
|
|
@@ -57,16 +57,16 @@ If the call is successfull the response will contain a `bankingInformation` obje
|
|
|
57
57
|
|
|
58
58
|
```typescript
|
|
59
59
|
export type BankingInformation = {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
systemId: string;
|
|
61
|
+
bpd?: BPD;
|
|
62
|
+
upd?: UPD;
|
|
63
|
+
bankMessages: BankMessage[];
|
|
64
64
|
};
|
|
65
65
|
```
|
|
66
66
|
|
|
67
67
|
The BPD object (_BankParameterDaten_) contains general information (e.g. available TAN methods and allowed transactions) and the UPD object (_UserParameterDaten_) user-specific information which is mainly the list of the user's bank accounts.
|
|
68
68
|
|
|
69
|
-
Unfortunately with this first synchronization call most banks will
|
|
69
|
+
Unfortunately with this first synchronization call most banks will likely only return the BPA information but no UPD (accounts) information, which is needed to fetch balances or statements. The reason for this is that you need to specify a TAN method before making the synchronization call, but you can only know which TAN methods are available from the BPA? This is why you need to make a second synchronization call with a TAN method selected from the `availableTanMethodIds`in the BPA, returned from the first synchronization call:
|
|
70
70
|
|
|
71
71
|
```typescript
|
|
72
72
|
// for simplicity, we just select the first available TAN method
|
|
@@ -88,7 +88,7 @@ const balanceResponse = await client.getAccountBalance(account.accountNumber);
|
|
|
88
88
|
const statementResponse = await client.getAccountStatements(account.accountNumber);
|
|
89
89
|
```
|
|
90
90
|
|
|
91
|
-
These are only the most basic steps needed to retrieve information from the bank.
|
|
91
|
+
These are only the most basic steps needed to retrieve information from the bank. There are still some unanswered questions like "how to handle TANs" or "how to avoid synchronizations every time you start a new session". These are explained in the corresponding sections below.
|
|
92
92
|
|
|
93
93
|
## More detailed API Description
|
|
94
94
|
|
|
@@ -99,27 +99,35 @@ Most transactions may require authorization with a two step TAN process. As ment
|
|
|
99
99
|
```typescript
|
|
100
100
|
// we use the node readline interface later to ask the user for a TAN
|
|
101
101
|
const rl = readline.createInterface({
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
input: process.stdin,
|
|
103
|
+
output: process.stdout,
|
|
104
104
|
});
|
|
105
105
|
|
|
106
106
|
let response = await client.getAccountStatements(account.accountNumber);
|
|
107
107
|
|
|
108
108
|
if (!response.success) {
|
|
109
|
-
|
|
109
|
+
return;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
// need to check if a TAN is required to continue the transaction
|
|
113
113
|
if (response.requiresTan) {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
114
|
+
// asking the user for the TAN, using the tanChallenge property
|
|
115
|
+
const tan = await rl.question(response.tanChallenge + ': ');
|
|
116
|
+
// continue the transaction by providing the tanReference from the response and the entered TAN
|
|
117
|
+
response = await client.getAccountStatementsWithTan(response.tanReference!, tan);
|
|
118
118
|
}
|
|
119
119
|
```
|
|
120
120
|
|
|
121
121
|
The `FinTSClient`contains for every transaction method like `synchronize()` or `getAccountStatements()` a corresponding `...WithTan()` method which needs to be called to continue the transaction with the given `tanReference` returned in the first response. The response object of this second call should now contain all transaction related data, assuming `success=true`.
|
|
122
122
|
|
|
123
|
+
**Decoupled TAN methods**
|
|
124
|
+
|
|
125
|
+
The library now also supports decoupled TAN methods where you don't actually have to provide a TAN entered by a user, but the approval is done "decoupled" on another device (e.g. mobile phone via banking app). The procedure explained above is still very similar, `requiresTan` will signal a required approval and you can continue with one of the `...WithTan()` methods where you can ommit the last `tan` parameter.
|
|
126
|
+
|
|
127
|
+
You could ask the user to confirm that the approval was given and then continue with the call or periodically call the method until it returns the transaction result (`requiresTan=false` and `success=true`). The continuation methods will keep returning `requiresTan=true` as long as the user hasn't approved the transaction.
|
|
128
|
+
|
|
129
|
+
see also the `decoupled` property on the `TanMethod` object for related parameters given by the bank.
|
|
130
|
+
|
|
123
131
|
### Starting a session from saved banking information
|
|
124
132
|
|
|
125
133
|
As mentioned earlier there is a second way to initialize the `FinTSClient` with a `FinTSConfig` when you already performed a synchronization in a previous session and this is by providing the `bankingInformation` object received from previous uses. This `bankingInformation` object, which contains the general bank (BPD) and accounts information (UPD), should be persisted after a session and reloaded in the next session.
|
|
@@ -127,13 +135,13 @@ This not only saves you from making the same synchronization requests every time
|
|
|
127
135
|
|
|
128
136
|
```typescript
|
|
129
137
|
const config = FinTSConfig.fromBankingInformation(
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
138
|
+
productId,
|
|
139
|
+
productVersion,
|
|
140
|
+
bankingInformation,
|
|
141
|
+
userId,
|
|
142
|
+
pin,
|
|
143
|
+
tanMethodId,
|
|
144
|
+
tanMediaName // when also needed (see below)
|
|
137
145
|
);
|
|
138
146
|
const client = new FinTSClient(config);
|
|
139
147
|
```
|
|
@@ -148,12 +156,12 @@ You can get a list of all available TAN methods from the `config.availableTanMet
|
|
|
148
156
|
|
|
149
157
|
```typescript
|
|
150
158
|
export type TanMethod = {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
159
|
+
id: number;
|
|
160
|
+
name: string;
|
|
161
|
+
version: number;
|
|
162
|
+
activeTanMediaCount: number;
|
|
163
|
+
activeTanMedia: string[];
|
|
164
|
+
tanMediaRequirement: TanMediaRequirement;
|
|
157
165
|
};
|
|
158
166
|
```
|
|
159
167
|
|
|
@@ -163,7 +171,7 @@ The property `activeTanMedia` contains a list of the TAN media names you can use
|
|
|
163
171
|
|
|
164
172
|
#### Banking Information may be updated any time
|
|
165
173
|
|
|
166
|
-
The `bankingInformation` is primarily obtained
|
|
174
|
+
The `bankingInformation` is primarily obtained through the `synchronize()` calls as demonstrated above. However, it is possible that the banking information may have changed since the last synchronization call. To address this, the BPD and UPD are versioned, and with every transaction made, not just synchronizations, the currently used versions are provided to the bank. If any changes have occurred, the bank will send back new versions of the BPD and UPD respectively. This process is managed by the client, but it is essential to check the `bankingInformationUpdated` property, which is available in every response. This property indicates if there have been any changes, and it is important to persist the new version for future sessions. The most up-to-date version of the `bankingInformation` object can always be retrieved using `config.bankingInformation`.
|
|
167
175
|
|
|
168
176
|
### Debugging
|
|
169
177
|
|
|
@@ -178,7 +186,7 @@ This will print out all sent messages and received responses to the console in a
|
|
|
178
186
|
## Limitations
|
|
179
187
|
|
|
180
188
|
- Only FinTS 3.0 is supported (older versions may not work)
|
|
181
|
-
- Only PIN/TAN security is supported
|
|
189
|
+
- Only PIN/TAN security is supported (inluding decoupled TAN methods)
|
|
182
190
|
- Currently only the following transactions are supported:
|
|
183
191
|
- Synchronize bank and account information
|
|
184
192
|
- Fetching account balances
|
package/dist/client.js
CHANGED
|
@@ -66,7 +66,7 @@ export class FinTSClient {
|
|
|
66
66
|
/**
|
|
67
67
|
* Continues the synchronization transaction when a TAN is required
|
|
68
68
|
* @param tanReference The TAN reference provided in the first call's response
|
|
69
|
-
* @param tan The TAN entered by the user
|
|
69
|
+
* @param tan The TAN entered by the user, can be omitted if a decoupled TAN method is used
|
|
70
70
|
* @returns the synchronization response
|
|
71
71
|
*/
|
|
72
72
|
async synchronizeWithTan(tanReference, tan) {
|
|
@@ -93,7 +93,7 @@ export class FinTSClient {
|
|
|
93
93
|
/**
|
|
94
94
|
* Continues the account balance fetching when a TAN is required
|
|
95
95
|
* @param tanReference The TAN reference provided in the first call's response
|
|
96
|
-
* @param tan The TAN entered by the user
|
|
96
|
+
* @param tan The TAN entered by the user, can be omitted if a decoupled TAN method is used
|
|
97
97
|
* @returns the account balance response
|
|
98
98
|
*/
|
|
99
99
|
async getAccountBalanceWithTan(tanReference, tan) {
|
|
@@ -122,7 +122,7 @@ export class FinTSClient {
|
|
|
122
122
|
/**
|
|
123
123
|
* Continues the account statements fetching when a TAN is required
|
|
124
124
|
* @param tanReference The TAN reference provided in the first call's response
|
|
125
|
-
* @param tan The TAN entered by the user
|
|
125
|
+
* @param tan The TAN entered by the user, can be omitted if a decoupled TAN method is used
|
|
126
126
|
* @returns an account statements response containing an array of statements
|
|
127
127
|
*/
|
|
128
128
|
async getAccountStatementsWithTan(tanReference, tan) {
|
package/dist/codes.js
CHANGED
|
@@ -77,3 +77,11 @@ export var TanUsage;
|
|
|
77
77
|
TanUsage[TanUsage["Single"] = 1] = "Single";
|
|
78
78
|
TanUsage[TanUsage["MobileAndGenerator"] = 2] = "MobileAndGenerator";
|
|
79
79
|
})(TanUsage || (TanUsage = {}));
|
|
80
|
+
export var TanProcess;
|
|
81
|
+
(function (TanProcess) {
|
|
82
|
+
TanProcess["Process1"] = "1";
|
|
83
|
+
TanProcess["Process2"] = "2";
|
|
84
|
+
TanProcess["Process3"] = "3";
|
|
85
|
+
TanProcess["Process4"] = "4";
|
|
86
|
+
TanProcess["Status"] = "S";
|
|
87
|
+
})(TanProcess || (TanProcess = {}));
|
package/dist/config.js
CHANGED
|
@@ -114,8 +114,8 @@ export class FinTSConfig {
|
|
|
114
114
|
* @param tanMethodId The ID of the TAN method to select, corresponding to an ID in availableTanMethods
|
|
115
115
|
*/
|
|
116
116
|
selectTanMethod(tanMethodId) {
|
|
117
|
-
if (!this.
|
|
118
|
-
throw new Error(`TAN Method '${tanMethodId}' not
|
|
117
|
+
if (!this.availableTanMethods.find((method) => method.id === tanMethodId)) {
|
|
118
|
+
throw new Error(`TAN Method '${tanMethodId}' is not supported`);
|
|
119
119
|
}
|
|
120
120
|
this.tanMethodId = tanMethodId;
|
|
121
121
|
}
|
package/dist/dialog.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TanMediaRequirement } from './codes.js';
|
|
1
|
+
import { TanMediaRequirement, TanProcess } from './codes.js';
|
|
2
2
|
import { HttpClient } from './httpClient.js';
|
|
3
3
|
import { CustomerMessage, CustomerOrderMessage } from './message.js';
|
|
4
4
|
import { HKEND } from './segments/HKEND.js';
|
|
@@ -45,7 +45,7 @@ export class Dialog {
|
|
|
45
45
|
if (this.config.userId && this.config.pin && isScaSupported) {
|
|
46
46
|
const hktan = {
|
|
47
47
|
header: { segId: HKTAN.Id, segNr: 0, version: tanMethod.version },
|
|
48
|
-
tanProcess:
|
|
48
|
+
tanProcess: TanProcess.Process4,
|
|
49
49
|
segId: HKIDN.Id,
|
|
50
50
|
};
|
|
51
51
|
message.addSegment(hktan);
|
|
@@ -107,7 +107,7 @@ export class Dialog {
|
|
|
107
107
|
if (this.config.userId && this.config.pin && this.config.tanMethodId) {
|
|
108
108
|
const hktan = {
|
|
109
109
|
header: { segId: HKTAN.Id, segNr: 0, version: this.config.selectedTanMethod.version },
|
|
110
|
-
tanProcess:
|
|
110
|
+
tanProcess: TanProcess.Process4,
|
|
111
111
|
segId: interaction.segId,
|
|
112
112
|
tanMedia: this.config.tanMediaName,
|
|
113
113
|
};
|
|
@@ -142,8 +142,11 @@ export class Dialog {
|
|
|
142
142
|
return interaction.getClientResponse(responseMessage);
|
|
143
143
|
}
|
|
144
144
|
async sendTanMessage(refSegId, tanOrderReference, tan) {
|
|
145
|
-
if (!refSegId || !tanOrderReference
|
|
146
|
-
throw Error('refSegId
|
|
145
|
+
if (!refSegId || !tanOrderReference) {
|
|
146
|
+
throw Error('refSegId and tanOrderReference must be provided to send a TAN message');
|
|
147
|
+
}
|
|
148
|
+
if (!this.config.selectedTanMethod?.isDecoupled && !tan) {
|
|
149
|
+
throw Error('TAN must be provided for non-decoupled TAN methods');
|
|
147
150
|
}
|
|
148
151
|
if (!this.isInitialized) {
|
|
149
152
|
throw Error('dialog must be initialized before sending a TAN message');
|
|
@@ -159,7 +162,7 @@ export class Dialog {
|
|
|
159
162
|
if (this.config.userId && this.config.pin && this.config.tanMethodId) {
|
|
160
163
|
const hktan = {
|
|
161
164
|
header: { segId: HKTAN.Id, segNr: 0, version: this.config.selectedTanMethod.version },
|
|
162
|
-
tanProcess:
|
|
165
|
+
tanProcess: this.config.selectedTanMethod?.isDecoupled ? TanProcess.Status : TanProcess.Process2,
|
|
163
166
|
segId: refSegId,
|
|
164
167
|
orderRef: tanOrderReference,
|
|
165
168
|
nextTan: false,
|
|
@@ -19,29 +19,37 @@ export class CustomerInteraction {
|
|
|
19
19
|
handleBaseResponse(response) {
|
|
20
20
|
const hnhbk = response.findSegment(HNHBK.Id);
|
|
21
21
|
const dialogId = hnhbk?.dialogId ?? '';
|
|
22
|
-
|
|
22
|
+
const bankAnswers = response.getBankAnswers();
|
|
23
|
+
if (response.hasReturnCode(30) ||
|
|
24
|
+
response.hasReturnCode(3955) ||
|
|
25
|
+
response.hasReturnCode(3956) ||
|
|
26
|
+
response.hasReturnCode(3957)) {
|
|
23
27
|
const hitan = response.findSegment(HITAN.Id);
|
|
24
28
|
if (hitan) {
|
|
25
29
|
return {
|
|
26
30
|
dialogId,
|
|
27
31
|
success: true,
|
|
28
32
|
bankingInformationUpdated: false,
|
|
29
|
-
bankAnswers:
|
|
33
|
+
bankAnswers: bankAnswers,
|
|
30
34
|
requiresTan: true,
|
|
31
35
|
tanReference: hitan.orderReference,
|
|
32
|
-
tanChallenge: hitan.challenge
|
|
36
|
+
tanChallenge: hitan.challenge ??
|
|
37
|
+
bankAnswers.find((answer) => answer.code === 3955)?.text ??
|
|
38
|
+
bankAnswers.find((answer) => answer.code === 3956)?.text ??
|
|
39
|
+
bankAnswers.find((answer) => answer.code === 3957)?.text ??
|
|
40
|
+
'',
|
|
33
41
|
tanMediaName: hitan.tanMedia,
|
|
34
42
|
};
|
|
35
43
|
}
|
|
36
44
|
else {
|
|
37
|
-
throw new Error('HITAN segment not found in response, despite return code
|
|
45
|
+
throw new Error('HITAN segment not found in response, despite return code indicating security approval');
|
|
38
46
|
}
|
|
39
47
|
}
|
|
40
48
|
return {
|
|
41
49
|
dialogId,
|
|
42
50
|
success: response.getHighestReturnCode() < 9000,
|
|
43
51
|
bankingInformationUpdated: false,
|
|
44
|
-
bankAnswers:
|
|
52
|
+
bankAnswers: bankAnswers,
|
|
45
53
|
requiresTan: false,
|
|
46
54
|
};
|
|
47
55
|
}
|
|
@@ -60,16 +60,29 @@ export class InitDialogInteraction extends CustomerInteraction {
|
|
|
60
60
|
const hibpa = response.findSegment(HIBPA.Id);
|
|
61
61
|
if (hibpa) {
|
|
62
62
|
const hitansSegments = response.findAllSegments(HITANS.Id);
|
|
63
|
+
hitansSegments.sort((a, b) => b.header.version - a.header.version);
|
|
63
64
|
const supportedTanMethods = [];
|
|
64
65
|
hitansSegments.forEach((hitans) => {
|
|
65
|
-
supportedTanMethods.push(...(hitans?.params.tanMethods
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
supportedTanMethods.push(...(hitans?.params.tanMethods
|
|
67
|
+
.map((method) => ({
|
|
68
|
+
id: method.secFunc,
|
|
69
|
+
name: method.methodName,
|
|
68
70
|
version: hitans.header.version,
|
|
69
|
-
|
|
71
|
+
isDecoupled: isDecoupledTanMethod(method),
|
|
72
|
+
activeTanMediaCount: method.activeTanMedia,
|
|
70
73
|
activeTanMedia: [],
|
|
71
|
-
tanMediaRequirement:
|
|
72
|
-
|
|
74
|
+
tanMediaRequirement: method.tanMediaRequired,
|
|
75
|
+
decoupled: isDecoupledTanMethod(method)
|
|
76
|
+
? {
|
|
77
|
+
maxStatusRequests: method.decoupledMaxStatusRequests,
|
|
78
|
+
waitingSecondsBeforeFirstStatusRequest: method.decoupledWaitBeforeFirstStatusRequest,
|
|
79
|
+
waitingSecondsBetweenStatusRequests: method.decoupledWaitBetweenStatusRequests,
|
|
80
|
+
manualConfirmationAllowed: method.decoupledManualConfirmationAllowed ?? false,
|
|
81
|
+
autoConfirmationAllowed: method.decoupledAutoConfirmationAllowed ?? false,
|
|
82
|
+
}
|
|
83
|
+
: undefined,
|
|
84
|
+
}))
|
|
85
|
+
.filter((method) => !supportedTanMethods.some((existing) => existing.id === method.id)) ?? []));
|
|
73
86
|
});
|
|
74
87
|
let bankingUrl = this.config.bankingUrl;
|
|
75
88
|
const hikom = response.findSegment(HIKOM.Id);
|
|
@@ -155,3 +168,16 @@ export class InitDialogInteraction extends CustomerInteraction {
|
|
|
155
168
|
currentBankingInformationSnapshot !== JSON.stringify(this.config.bankingInformation);
|
|
156
169
|
}
|
|
157
170
|
}
|
|
171
|
+
function isDecoupledTanMethod(tanMethod) {
|
|
172
|
+
if (tanMethod.zkaMethod === 'Decoupled' || tanMethod.zkaMethod === 'DecoupledPush') {
|
|
173
|
+
return true;
|
|
174
|
+
}
|
|
175
|
+
if (tanMethod.decoupledMaxStatusRequests !== undefined ||
|
|
176
|
+
tanMethod.decoupledWaitBeforeFirstStatusRequest !== undefined ||
|
|
177
|
+
tanMethod.decoupledWaitBetweenStatusRequests !== undefined ||
|
|
178
|
+
tanMethod.decoupledManualConfirmationAllowed !== undefined ||
|
|
179
|
+
tanMethod.decoupledAutoConfirmationAllowed !== undefined) {
|
|
180
|
+
return true;
|
|
181
|
+
}
|
|
182
|
+
return false;
|
|
183
|
+
}
|
|
@@ -21,7 +21,9 @@ export class TanMediaInteraction extends CustomerOrderInteraction {
|
|
|
21
21
|
handleResponse(response, clientResponse) {
|
|
22
22
|
const hitab = response.findSegment(HITAB.Id);
|
|
23
23
|
if (hitab) {
|
|
24
|
-
clientResponse.tanMediaList = hitab.mediaList
|
|
24
|
+
clientResponse.tanMediaList = (hitab.mediaList ?? [])
|
|
25
|
+
.map((media) => media.name)
|
|
26
|
+
.filter((name) => name);
|
|
25
27
|
}
|
|
26
28
|
}
|
|
27
29
|
}
|
package/dist/segment.js
CHANGED
|
@@ -43,12 +43,13 @@ export function segmentToString(segment) {
|
|
|
43
43
|
text += ` RefSeg: ${segment.header.refSegNr}`;
|
|
44
44
|
}
|
|
45
45
|
const segmentDefinition = getSegmentDefinition(segment.header.segId);
|
|
46
|
-
let texts = segmentDefinition.
|
|
46
|
+
let texts = segmentDefinition.getElementsForVersion(segment.header.version).map((element) => {
|
|
47
47
|
if (element.maxCount > 1) {
|
|
48
|
-
return keyedSegment[element.name]
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
return (keyedSegment[element.name] ??
|
|
49
|
+
[]
|
|
50
|
+
.map((value) => element.toString(value))
|
|
51
|
+
.filter((text) => !!text)
|
|
52
|
+
.join('; '));
|
|
52
53
|
}
|
|
53
54
|
else {
|
|
54
55
|
return element.toString(keyedSegment[element.name]);
|
|
@@ -3,6 +3,9 @@ import { SegmentHeaderGroup } from './segmentHeader.js';
|
|
|
3
3
|
export class SegmentDefinition {
|
|
4
4
|
id = this.constructor.name;
|
|
5
5
|
static header = new SegmentHeaderGroup();
|
|
6
|
+
getElementsForVersion(version) {
|
|
7
|
+
return this.elements.filter((element) => version >= (element.minVersion ?? 0) && version <= (element.maxVersion ?? Number.MAX_SAFE_INTEGER));
|
|
8
|
+
}
|
|
6
9
|
encode(data) {
|
|
7
10
|
const headerText = SegmentDefinition.header.encode(data.header, [data.header.segId], data.header.version);
|
|
8
11
|
const elementsText = encodeElements(data, this.elements, '+', data.header.version, [data.header.segId]);
|
package/dist/segments/HITAN.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Time } from '../dataElements/Time.js';
|
|
2
2
|
import { Dat } from '../dataElements/Dat.js';
|
|
3
3
|
import { Binary } from '../dataElements/Binary.js';
|
|
4
|
-
import { Numeric } from '../dataElements/Numeric.js';
|
|
5
4
|
import { AlphaNumeric } from '../dataElements/AlphaNumeric.js';
|
|
6
5
|
import { DataGroup } from '../dataGroups/DataGroup.js';
|
|
7
6
|
import { SegmentDefinition } from '../segmentDefinition.js';
|
|
@@ -10,9 +9,9 @@ import { SegmentDefinition } from '../segmentDefinition.js';
|
|
|
10
9
|
*/
|
|
11
10
|
export class HITAN extends SegmentDefinition {
|
|
12
11
|
static Id = this.name;
|
|
13
|
-
version =
|
|
12
|
+
version = 7;
|
|
14
13
|
elements = [
|
|
15
|
-
new
|
|
14
|
+
new AlphaNumeric('tanProcess', 1, 1, 1),
|
|
16
15
|
new Binary('orderHash', 0, 1, 256),
|
|
17
16
|
new AlphaNumeric('orderReference', 0, 1, 35),
|
|
18
17
|
new AlphaNumeric('challenge', 0, 1, 2048),
|
package/dist/segments/HITANS.js
CHANGED
|
@@ -9,7 +9,7 @@ import { BusinessTransactionParameter } from './businessTransactionParameter.js'
|
|
|
9
9
|
*/
|
|
10
10
|
export class HITANS extends BusinessTransactionParameter {
|
|
11
11
|
static Id = this.name;
|
|
12
|
-
version =
|
|
12
|
+
version = 7;
|
|
13
13
|
constructor() {
|
|
14
14
|
super([
|
|
15
15
|
new YesNo('oneStepAllowed', 1, 1),
|
|
@@ -23,8 +23,8 @@ export class HITANS extends BusinessTransactionParameter {
|
|
|
23
23
|
new AlphaNumeric('zkaMethod', 0, 1, 32, 4),
|
|
24
24
|
new AlphaNumeric('zkaVersion', 0, 1, 10, 4),
|
|
25
25
|
new AlphaNumeric('methodName', 1, 1, 30, 1),
|
|
26
|
-
new Numeric('tanMaxLen',
|
|
27
|
-
new Numeric('format',
|
|
26
|
+
new Numeric('tanMaxLen', 0, 1, 2, 1),
|
|
27
|
+
new Numeric('format', 0, 1, 1, 1),
|
|
28
28
|
new AlphaNumeric('challengeText', 1, 1, 30, 1),
|
|
29
29
|
new Numeric('maxChallengeLen', 1, 1, 4, 1),
|
|
30
30
|
new Numeric('supportedActiveTanLists', 0, 1, 1, 1, 5),
|
|
@@ -42,6 +42,11 @@ export class HITANS extends BusinessTransactionParameter {
|
|
|
42
42
|
new Numeric('tanMediaRequired', 1, 1, 1, 3),
|
|
43
43
|
new YesNo('hdducRequired', 1, 1, 6),
|
|
44
44
|
new Numeric('activeTanMedia', 0, 1, 1, 3),
|
|
45
|
+
new Numeric('decoupledMaxStatusRequests', 0, 1, 3, 7),
|
|
46
|
+
new Numeric('decoupledWaitBeforeFirstStatusRequest', 0, 1, 3, 7),
|
|
47
|
+
new Numeric('decoupledWaitBetweenStatusRequests', 0, 1, 3, 7),
|
|
48
|
+
new YesNo('decoupledManualConfirmationAllowed', 0, 1, 7),
|
|
49
|
+
new YesNo('decoupledAutoConfirmationAllowed', 0, 1, 7),
|
|
45
50
|
], 1, 98),
|
|
46
51
|
]);
|
|
47
52
|
}
|
package/dist/segments/HKTAN.js
CHANGED
|
@@ -10,10 +10,10 @@ import { SegmentDefinition } from '../segmentDefinition.js';
|
|
|
10
10
|
*/
|
|
11
11
|
export class HKTAN extends SegmentDefinition {
|
|
12
12
|
static Id = this.name;
|
|
13
|
-
static Version =
|
|
13
|
+
static Version = 7;
|
|
14
14
|
version = HKTAN.Version;
|
|
15
15
|
elements = [
|
|
16
|
-
new
|
|
16
|
+
new AlphaNumeric('tanProcess', 1, 1, 1),
|
|
17
17
|
new AlphaNumeric('segId', 0, 1, 6),
|
|
18
18
|
new InternationalAccountGroup('customerAccount', 0, 1),
|
|
19
19
|
new Binary('orderHash', 0, 1, 256),
|
package/dist/tests/HITAB.test.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { describe, it, expect } from 'vitest';
|
|
2
2
|
import { registerSegments } from '../segments/registry.js';
|
|
3
3
|
import { HITAB } from '../segments/HITAB.js';
|
|
4
|
-
import { decode, encode } from '../segment.js';
|
|
4
|
+
import { decode, encode, segmentToString } from '../segment.js';
|
|
5
5
|
registerSegments();
|
|
6
6
|
describe('HITAB', () => {
|
|
7
7
|
it('decodes correctly', () => {
|
|
8
8
|
const text = "HITAB:5:4:3+0+A:1:::::::::::Media1::::::::+A:1:::::::::::Media2::::::::'";
|
|
9
9
|
const segment = decode(text);
|
|
10
|
+
expect(segment.mediaList).toBeDefined();
|
|
10
11
|
expect(segment.mediaList.length).toBe(2);
|
|
11
12
|
expect(segment.mediaList[0].name).toBe('Media1');
|
|
12
13
|
});
|
|
@@ -16,4 +17,10 @@ describe('HITAB', () => {
|
|
|
16
17
|
const segment = decode(text);
|
|
17
18
|
expect(encode(segment)).toBe(text);
|
|
18
19
|
});
|
|
20
|
+
it('decodes and stringifies when list is empty', () => {
|
|
21
|
+
HITAB.Id;
|
|
22
|
+
const text = 'HITAB:4:5:3+0';
|
|
23
|
+
const segment = decode(text);
|
|
24
|
+
expect(segmentToString(segment)).toBe(' 4. HITAB v5 RefSeg: 3; tanUsage: 0');
|
|
25
|
+
});
|
|
19
26
|
});
|
package/dist/tests/HKTAN.test.js
CHANGED
|
@@ -2,13 +2,14 @@ import { describe, it, expect } from 'vitest';
|
|
|
2
2
|
import { registerSegments } from '../segments/registry.js';
|
|
3
3
|
import { HKTAN } from '../segments/HKTAN.js';
|
|
4
4
|
import { decode, encode } from '../segment.js';
|
|
5
|
+
import { TanProcess } from '../codes.js';
|
|
5
6
|
registerSegments();
|
|
6
7
|
describe('HKTAN', () => {
|
|
7
8
|
it('encode', () => {
|
|
8
9
|
const segment = {
|
|
9
10
|
header: { segId: HKTAN.Id, segNr: 1, version: 6 },
|
|
10
11
|
segId: 'HKKAZ',
|
|
11
|
-
tanProcess:
|
|
12
|
+
tanProcess: TanProcess.Process4,
|
|
12
13
|
tanMedia: 'Media1',
|
|
13
14
|
};
|
|
14
15
|
expect(encode(segment)).toBe("HKTAN:1:6+4+HKKAZ+++++++++Media1'");
|
package/dist/types/client.d.ts
CHANGED
|
@@ -35,10 +35,10 @@ export declare class FinTSClient {
|
|
|
35
35
|
/**
|
|
36
36
|
* Continues the synchronization transaction when a TAN is required
|
|
37
37
|
* @param tanReference The TAN reference provided in the first call's response
|
|
38
|
-
* @param tan The TAN entered by the user
|
|
38
|
+
* @param tan The TAN entered by the user, can be omitted if a decoupled TAN method is used
|
|
39
39
|
* @returns the synchronization response
|
|
40
40
|
*/
|
|
41
|
-
synchronizeWithTan(tanReference: string, tan
|
|
41
|
+
synchronizeWithTan(tanReference: string, tan?: string): Promise<SynchronizeResponse>;
|
|
42
42
|
/**
|
|
43
43
|
* Checks if the bank supports fetching an account balance in general or for the given account number when provided
|
|
44
44
|
* @param accountNumber when the account number is provided, checks if the account supports fetching the balance
|
|
@@ -54,10 +54,10 @@ export declare class FinTSClient {
|
|
|
54
54
|
/**
|
|
55
55
|
* Continues the account balance fetching when a TAN is required
|
|
56
56
|
* @param tanReference The TAN reference provided in the first call's response
|
|
57
|
-
* @param tan The TAN entered by the user
|
|
57
|
+
* @param tan The TAN entered by the user, can be omitted if a decoupled TAN method is used
|
|
58
58
|
* @returns the account balance response
|
|
59
59
|
*/
|
|
60
|
-
getAccountBalanceWithTan(tanReference: string, tan
|
|
60
|
+
getAccountBalanceWithTan(tanReference: string, tan?: string): Promise<AccountBalanceResponse>;
|
|
61
61
|
/**
|
|
62
62
|
* Checks if the bank supports fetching account statements in general or for the given account number when provided
|
|
63
63
|
* @param accountNumber when the account number is provided, checks if the account supports fetching of statements
|
|
@@ -75,10 +75,10 @@ export declare class FinTSClient {
|
|
|
75
75
|
/**
|
|
76
76
|
* Continues the account statements fetching when a TAN is required
|
|
77
77
|
* @param tanReference The TAN reference provided in the first call's response
|
|
78
|
-
* @param tan The TAN entered by the user
|
|
78
|
+
* @param tan The TAN entered by the user, can be omitted if a decoupled TAN method is used
|
|
79
79
|
* @returns an account statements response containing an array of statements
|
|
80
80
|
*/
|
|
81
|
-
getAccountStatementsWithTan(tanReference: string, tan
|
|
81
|
+
getAccountStatementsWithTan(tanReference: string, tan?: string): Promise<StatementResponse>;
|
|
82
82
|
private startCustomerOrderInteraction;
|
|
83
83
|
private continueCustomerInteractionWithTan;
|
|
84
84
|
private initDialog;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAwB,MAAM,wCAAwC,CAAC;AACjG,OAAO,EAAE,sBAAsB,EAAsB,MAAM,sCAAsC,CAAC;AAClG,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAG3C,OAAO,EAAyB,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAE9F,MAAM,WAAW,mBAAoB,SAAQ,YAAY;CAAG;AAE5D;;GAEG;AACH,qBAAa,WAAW;IAOJ,MAAM,EAAE,WAAW;IANtC,OAAO,CAAC,wBAAwB,CAA0C;IA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rD;;;;OAIG;IACG,iBAAiB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAI/E;;;;;OAKG;IACG,wBAAwB,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAInG;;;;OAIG;IACH,uBAAuB,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO;IAMxD;;;;;;OAMG;IACG,oBAAoB,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,IAAI,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAIrG;;;;;OAKG;IACG,2BAA2B,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;YAInF,6BAA6B;YAqB7B,kCAAkC;YA0ClC,UAAU;CAcxB"}
|
package/dist/types/codes.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codes.d.ts","sourceRoot":"","sources":["../../src/codes.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;
|
|
1
|
+
{"version":3,"file":"codes.d.ts","sourceRoot":"","sources":["../../src/codes.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IACnB,OAAO,IAAI;IACX,MAAM,IAAI;IACV,OAAO,IAAI;IACX,MAAM,IAAI;CACV;AAED,oBAAY,OAAO;IAClB,OAAO,IAAI;IACX,KAAK,IAAI;IACT,KAAK,IAAI;CACT;AAED,oBAAY,aAAa;IACxB,IAAI,IAAI;IACR,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,UAAU,IAAI;CACd;AAED,oBAAY,QAAQ;IACnB,WAAW,IAAI;IACf,kBAAkB,IAAI;IACtB,WAAW,IAAI;CACf;AAED,oBAAY,SAAS;IACpB,WAAW,MAAM;IACjB,GAAG,MAAM;IACT,IAAI,MAAM;IACV,KAAK,MAAM;IACX,IAAI,MAAM;CACV;AAED,oBAAY,QAAQ;IACnB,iBAAiB,IAAI;IACrB,cAAc,IAAI;CAClB;AAED,oBAAY,WAAW;IACtB,MAAM,MAAM;IACZ,KAAK,MAAM;CACX;AAED,oBAAY,YAAY;IACvB,GAAG,IAAI;IACP,MAAM,IAAI;IACV,SAAS,IAAI;CACb;AAED,oBAAY,aAAa;IACxB,GAAG,MAAM;IACT,IAAI,MAAM;IACV,YAAY,MAAM;IAClB,MAAM,MAAM;IACZ,OAAO,MAAM;IACb,SAAS,MAAM;CACf;AAED,oBAAY,mBAAmB;IAC9B,UAAU,IAAI;IACd,QAAQ,IAAI;IACZ,QAAQ,IAAI;CACZ;AAED,oBAAY,SAAS;IACpB,MAAM,IAAI;IACV,SAAS,IAAI;IACb,kBAAkB,IAAI;IACtB,qBAAqB,IAAI;CACzB;AAED,oBAAY,QAAQ;IACnB,GAAG,IAAI;IACP,MAAM,IAAI;IACV,kBAAkB,IAAI;CACtB;AAED,oBAAY,UAAU;IACrB,QAAQ,MAAM;IACd,QAAQ,MAAM;IACd,QAAQ,MAAM;IACd,QAAQ,MAAM;IACd,MAAM,MAAM;CACZ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D;;GAEG;AACH,qBAAa,WAAW;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D;;GAEG;AACH,qBAAa,WAAW;IAKf,SAAS,EAAE,MAAM;IACjB,cAAc,E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C,OAAO,EAAE,MAAM,GAAG,OAAO;IAIhD;;;;OAIG;IACH,6BAA6B,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO;IAK9E;;;OAGG;IACH,iCAAiC,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAetE;;;OAGG;IACH,cAAc,CAAC,aAAa,EAAE,MAAM;CASpC"}
|
package/dist/types/dialog.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export declare class Dialog {
|
|
|
14
14
|
initialize(interaction: InitDialogInteraction): Promise<InitResponse>;
|
|
15
15
|
end(): Promise<boolean>;
|
|
16
16
|
startCustomerOrderInteraction<TClientResponse extends ClientResponse>(interaction: CustomerOrderInteraction): Promise<TClientResponse>;
|
|
17
|
-
sendTanMessage(refSegId: string, tanOrderReference: string, tan
|
|
17
|
+
sendTanMessage(refSegId: string, tanOrderReference: string, tan?: string): Promise<Message>;
|
|
18
18
|
private checkEnded;
|
|
19
19
|
private getHttpClient;
|
|
20
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAyC,OAAO,EAAE,MAAM,cAAc,CAAC;AAQ9E,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AAEjG,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAE9F,qBAAa,MAAM;IAOC,MAAM,EAAE,WAAW;IANtC,QAAQ,EAAE,MAAM,CAAO;IACvB,iBAAiB,SAAK;IACtB,aAAa,UAAS;IACtB,QAAQ,UAAS;IACjB,UAAU,EAAE,UAAU,CAAC;gBAEJ,MAAM,EAAE,WAAW;IAQhC,UAAU,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AAU;IAMlB,OAAO,CAAC,aAAa;CAOrB"}
|
|
@@ -9,7 +9,7 @@ import { Segment } from '../segment.js';
|
|
|
9
9
|
* @property success Whether the interaction was successful
|
|
10
10
|
* @property bankingInformationUpdated Whether the banking information were updated
|
|
11
11
|
* @property bankAnswers The answers from the bank
|
|
12
|
-
* @property requiresTan Whether
|
|
12
|
+
* @property requiresTan Whether security approval is required to continue the transaction (a user entered TAN or decoupled approval)
|
|
13
13
|
* @property tanReference A reference for the TAN which needs to be provided in the continuation method
|
|
14
14
|
* @property tanChallenge A prompt provided by the bank which should be displayed to the user to enter the TAN
|
|
15
15
|
* @property tanMediaName The name of the TAN media to use for the TAN input
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customerInteraction.d.ts","sourceRoot":"","sources":["../../../src/interactions/customerInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAIxC;;;;;;;;;;GAUG;AACH,MAAM,WAAW,cAAc;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,yBAAyB,EAAE,OAAO,CAAC;IACnC,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,8BAAsB,mBAAmB;IAGrB,KAAK,EAAE,MAAM;IAFhC,MAAM,CAAC,EAAE,MAAM,CAAC;gBAEG,KAAK,EAAE,MAAM;IAEhC,WAAW,CAAC,I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S,CAAC,QAAQ,CAAC,cAAc,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,EAAE;IAC/D,SAAS,CAAC,QAAQ,CAAC,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,GAAG,IAAI;IAE1F,OAAO,CAAC,kBAAkB;CAyC1B;AAED,8BAAsB,wBAAyB,SAAQ,mBAAmB;IACvC,aAAa,EAAE,MAAM;gBAA3C,KAAK,EAAE,MAAM,EAAS,aAAa,EAAE,MAAM;CAGvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initDialogInteraction.d.ts","sourceRoot":"","sources":["../../../src/interactions/initDialogInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACzG,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAe,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAiB3E,MAAM,WAAW,YAAa,SAAQ,cAAc;IACnD,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACxC;AAED,qBAAa,qBAAsB,SAAQ,mBAAmB;IAErD,MAAM,EAAE,WAAW;IACnB,YAAY;IACZ,mBAAmB,CAAC;gBAFpB,MAAM,EAAE,WAAW,EACnB,YAAY,UAAQ,EACpB,mBAAmB,CAAC,sCAA0B;IAKtD,cAAc,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,EAAE;IAoC5C,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,YAAY;
|
|
1
|
+
{"version":3,"file":"initDialogInteraction.d.ts","sourceRoot":"","sources":["../../../src/interactions/initDialogInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACzG,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAe,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAiB3E,MAAM,WAAW,YAAa,SAAQ,cAAc;IACnD,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACxC;AAED,qBAAa,qBAAsB,SAAQ,mBAAmB;IAErD,MAAM,EAAE,WAAW;IACnB,YAAY;IACZ,mBAAmB,CAAC;gBAFpB,MAAM,EAAE,WAAW,EACnB,YAAY,UAAQ,EACpB,mBAAmB,CAAC,sCAA0B;IAKtD,cAAc,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,EAAE;IAoC5C,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,YAAY;CA2I9D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tanMediaInteraction.d.ts","sourceRoot":"","sources":["../../../src/interactions/tanMediaInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAuB,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACzG,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAK3C,MAAM,WAAW,gBAAiB,SAAQ,cAAc;
|
|
1
|
+
{"version":3,"file":"tanMediaInteraction.d.ts","sourceRoot":"","sources":["../../../src/interactions/tanMediaInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAuB,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACzG,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAK3C,MAAM,WAAW,gBAAiB,SAAQ,cAAc;IACvD,YAAY,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,qBAAa,mBAAoB,SAAQ,wBAAwB;;IAKhE,cAAc,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,EAAE;IAgB5C,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,gBAAgB;CAQlE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segment.d.ts","sourceRoot":"","sources":["../../src/segment.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,MAAM,OAAO,GAAG;
|
|
1
|
+
{"version":3,"file":"segment.d.ts","sourceRoot":"","sources":["../../src/segment.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,MAAM,OAAO,GAAG;IACrB,MAAM,EAAE,aAAa,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,OAAO,GAAG;IACnD,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CA6B5C;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAQ5C;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CA6BxD"}
|
|
@@ -6,6 +6,7 @@ export declare abstract class SegmentDefinition {
|
|
|
6
6
|
abstract version: number;
|
|
7
7
|
static header: SegmentHeaderGroup;
|
|
8
8
|
abstract elements: DataElement[];
|
|
9
|
+
getElementsForVersion(version: number): DataElement[];
|
|
9
10
|
encode(data: Segment): string;
|
|
10
11
|
}
|
|
11
12
|
//# sourceMappingURL=segmentDefinition.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segmentDefinition.d.ts","sourceRoot":"","sources":["../../src/segmentDefinition.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,8BAAsB,iBAAiB;
|
|
1
|
+
{"version":3,"file":"segmentDefinition.d.ts","sourceRoot":"","sources":["../../src/segmentDefinition.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,8BAAsB,iBAAiB;IACtC,EAAE,SAAyB;IAE3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,MAAM,qBAA4B;IACzC,QAAQ,CAAC,QAAQ,EAAE,WAAW,EAAE,CAAC;IAEjC,qBAAqB,CAAC,OAAO,EAAE,MAAM;IAMrC,MAAM,CAAC,IAAI,EAAE,OAAO;CAKpB"}
|
|
@@ -7,7 +7,7 @@ import { Segment } from '../segment.js';
|
|
|
7
7
|
import { SegmentDefinition } from '../segmentDefinition.js';
|
|
8
8
|
export type HITABSegment = Segment & {
|
|
9
9
|
tanUsage: TanUsage;
|
|
10
|
-
mediaList
|
|
10
|
+
mediaList?: TanMedia[];
|
|
11
11
|
};
|
|
12
12
|
export type TanMedia = {
|
|
13
13
|
class: TanMediaClass;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HITAB.d.ts","sourceRoot":"","sources":["../../../src/segments/HITAB.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE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B,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,cAAc,CAAC,EAAE,IAAI,CAAC;CACtB,CAAC;AAEF;;GAEG;AACH,qBAAa,KAAM,SAAQ,iBAAiB;IAC3C,MAAM,CAAC,EAAE,SAAa;IACtB,OAAO,SAAK;IACZ,QAAQ,0BA0BN;CACF"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Binary } from '../dataElements/Binary.js';
|
|
2
|
-
import { Numeric } from '../dataElements/Numeric.js';
|
|
3
2
|
import { AlphaNumeric } from '../dataElements/AlphaNumeric.js';
|
|
4
3
|
import { TimeStamp } from '../dataGroups/TimeStamp.js';
|
|
5
4
|
import { DataGroup } from '../dataGroups/DataGroup.js';
|
|
6
5
|
import { Segment } from '../segment.js';
|
|
7
6
|
import { SegmentDefinition } from '../segmentDefinition.js';
|
|
7
|
+
import { TanProcess } from '../codes.js';
|
|
8
8
|
export type HITANSegment = Segment & {
|
|
9
|
-
tanProcess:
|
|
9
|
+
tanProcess: TanProcess;
|
|
10
10
|
orderHash?: string;
|
|
11
11
|
orderReference?: string;
|
|
12
12
|
challenge?: string;
|
|
@@ -20,6 +20,6 @@ export type HITANSegment = Segment & {
|
|
|
20
20
|
export declare class HITAN extends SegmentDefinition {
|
|
21
21
|
static Id: string;
|
|
22
22
|
version: number;
|
|
23
|
-
elements: (DataGroup | AlphaNumeric |
|
|
23
|
+
elements: (DataGroup | AlphaNumeric | Binary)[];
|
|
24
24
|
}
|
|
25
25
|
//# sourceMappingURL=HITAN.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HITAN.d.ts","sourceRoot":"","sources":["../../../src/segments/HITAN.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"HITAN.d.ts","sourceRoot":"","sources":["../../../src/segments/HITAN.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG;IACpC,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE,SAAS,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,qBAAa,KAAM,SAAQ,iBAAiB;IAC3C,MAAM,CAAC,EAAE,SAAa;IACtB,OAAO,SAAK;IACZ,QAAQ,wCAQN;CACF"}
|
|
@@ -11,11 +11,11 @@ export type HitansTanMethod = {
|
|
|
11
11
|
secFunc: number;
|
|
12
12
|
tanProcess: number;
|
|
13
13
|
methodId: string;
|
|
14
|
-
zkaMethod
|
|
15
|
-
zkaVersion
|
|
14
|
+
zkaMethod?: string;
|
|
15
|
+
zkaVersion?: string;
|
|
16
16
|
methodName: string;
|
|
17
|
-
tanMaxLen
|
|
18
|
-
format
|
|
17
|
+
tanMaxLen?: number;
|
|
18
|
+
format?: number;
|
|
19
19
|
challengeText: string;
|
|
20
20
|
maxChallengeLen: number;
|
|
21
21
|
multipleTans: boolean;
|
|
@@ -29,6 +29,11 @@ export type HitansTanMethod = {
|
|
|
29
29
|
tanMediaRequired: TanMediaRequirement;
|
|
30
30
|
hdducRequired: boolean;
|
|
31
31
|
activeTanMedia: number;
|
|
32
|
+
decoupledMaxStatusRequests?: number;
|
|
33
|
+
decoupledWaitBeforeFirstStatusRequest?: number;
|
|
34
|
+
decoupledWaitBetweenStatusRequests?: number;
|
|
35
|
+
decoupledManualConfirmationAllowed?: boolean;
|
|
36
|
+
decoupledAutoConfirmationAllowed?: boolean;
|
|
32
37
|
};
|
|
33
38
|
/**
|
|
34
39
|
* Parameters for two-step TAN methods
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HITANS.d.ts","sourceRoot":"","sources":["../../../src/segments/HITANS.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAMlD,OAAO,EAAE,4BAA4B,EAAE,mCAAmC,EAAE,MAAM,mCAAmC,CAAC;AAEtH,MAAM,MAAM,aAAa,GAAG,mCAAmC,CAAC,eAAe,CAAC,CAAC;AAEjF,MAAM,MAAM,eAAe,GAAG;
|
|
1
|
+
{"version":3,"file":"HITANS.d.ts","sourceRoot":"","sources":["../../../src/segments/HITANS.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAMlD,OAAO,EAAE,4BAA4B,EAAE,mCAAmC,EAAE,MAAM,mCAAmC,CAAC;AAEtH,MAAM,MAAM,aAAa,GAAG,mCAAmC,CAAC,eAAe,CAAC,CAAC;AAEjF,MAAM,MAAM,eAAe,GAAG;IAC7B,cAAc,EAAE,OAA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dataGroups/DataGroup.js';
|
|
7
7
|
import { Segment } from '../segment.js';
|
|
8
8
|
import { SegmentDefinition } from '../segmentDefinition.js';
|
|
9
|
+
import { TanProcess } from '../codes.js';
|
|
9
10
|
export type HKTANSegment = Segment & {
|
|
10
|
-
tanProcess:
|
|
11
|
+
tanProcess: TanProcess;
|
|
11
12
|
segId: string;
|
|
12
13
|
customerAccount?: InternationalAccount;
|
|
13
14
|
orderHash?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HKTAN.d.ts","sourceRoot":"","sources":["../../../src/segments/HKTAN.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAA6B,MAAM,uCAAuC,CAAC;AACxG,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"HKTAN.d.ts","sourceRoot":"","sources":["../../../src/segments/HKTAN.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAA6B,MAAM,uCAAuC,CAAC;AACxG,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG;IACpC,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,oBAAoB,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;GAEG;AACH,qBAAa,KAAM,SAAQ,iBAAiB;IAC3C,MAAM,CAAC,EAAE,SAAa;IACtB,MAAM,CAAC,OAAO,SAAK;IACnB,OAAO,SAAiB;IACxB,QAAQ,0DAwBN;CACF"}
|
|
@@ -1,10 +1,31 @@
|
|
|
1
1
|
import { TanMediaRequirement } from './codes.js';
|
|
2
|
+
/**
|
|
3
|
+
* Represents a TAN (Transaction Authentication Number) method used to approve transactions.
|
|
4
|
+
*
|
|
5
|
+
* @property {number} id - The unique identifier for the TAN method.
|
|
6
|
+
* @property {string} name - The name of the TAN method.
|
|
7
|
+
* @property {number} version - The version of the TAN method.
|
|
8
|
+
* @property {boolean} isDecoupled - Indicates if the TAN method is decoupled, in which case no real TAN needs to be provided.
|
|
9
|
+
* @property {number} activeTanMediaCount - The number of active TAN media available for approval.
|
|
10
|
+
* @property {string[]} activeTanMedia - The names of active TAN media.
|
|
11
|
+
* @property {TanMediaRequirement} tanMediaRequirement - A value indicating wether a TAN media is required.
|
|
12
|
+
* @property {DecoupledParams} [decoupled] - Optional parameters for decoupled TAN methods, is only set when isDecoupled is also true.
|
|
13
|
+
*/
|
|
2
14
|
export type TanMethod = {
|
|
3
15
|
id: number;
|
|
4
16
|
name: string;
|
|
5
17
|
version: number;
|
|
18
|
+
isDecoupled: boolean;
|
|
6
19
|
activeTanMediaCount: number;
|
|
7
20
|
activeTanMedia: string[];
|
|
8
21
|
tanMediaRequirement: TanMediaRequirement;
|
|
22
|
+
decoupled?: DecoupledParams;
|
|
23
|
+
};
|
|
24
|
+
export type DecoupledParams = {
|
|
25
|
+
maxStatusRequests: number;
|
|
26
|
+
waitingSecondsBeforeFirstStatusRequest: number;
|
|
27
|
+
waitingSecondsBetweenStatusRequests: number;
|
|
28
|
+
manualConfirmationAllowed: boolean;
|
|
29
|
+
autoConfirmationAllowed: boolean;
|
|
9
30
|
};
|
|
10
31
|
//# sourceMappingURL=tanMethod.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tanMethod.d.ts","sourceRoot":"","sources":["../../src/tanMethod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjD,MAAM,MAAM,SAAS,GAAG;
|
|
1
|
+
{"version":3,"file":"tanMethod.d.ts","sourceRoot":"","sources":["../../src/tanMethod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,SAAS,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,SAAS,CAAC,EAAE,eAAe,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC7B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,sCAAsC,EAAE,MAAM,CAAC;IAC/C,mCAAmC,EAAE,MAAM,CAAC;IAC5C,yBAAyB,EAAE,OAAO,CAAC;IACnC,uBAAuB,EAAE,OAAO,CAAC;CACjC,CAAC"}
|