routex-client 0.4.6 → 0.4.8
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 +13 -0
- package/client.d.ts +11 -1
- package/index.js +16 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,6 +4,19 @@ A client for [YAXI](https://yaxi.tech/)'s Open Banking services.
|
|
|
4
4
|
|
|
5
5
|
## Changelog
|
|
6
6
|
|
|
7
|
+
### [0.4.8] - 2026-02-04
|
|
8
|
+
|
|
9
|
+
#### Added
|
|
10
|
+
|
|
11
|
+
- `ConnectionInfo.password`
|
|
12
|
+
|
|
13
|
+
### [0.4.7] - 2026-01-12
|
|
14
|
+
|
|
15
|
+
#### Added
|
|
16
|
+
|
|
17
|
+
- `encryptedIban` `SearchFilter`
|
|
18
|
+
- `encryptedIban` in `collectPayment`'s `account` accepts a Base64-encoded string as alternative to the `Uint8Array`
|
|
19
|
+
|
|
7
20
|
### [0.4.6] - 2025-12-08
|
|
8
21
|
|
|
9
22
|
#### Fixed
|
package/client.d.ts
CHANGED
|
@@ -96,6 +96,10 @@ export interface ConnectionInfo {
|
|
|
96
96
|
* Human-friendly label for the user identifier if relevant.
|
|
97
97
|
*/
|
|
98
98
|
userId?: string;
|
|
99
|
+
/**
|
|
100
|
+
* Human-friendly label for the PIN / password if relevant.
|
|
101
|
+
*/
|
|
102
|
+
password?: string;
|
|
99
103
|
/**
|
|
100
104
|
* Advice for the credentials to be displayed.
|
|
101
105
|
*/
|
|
@@ -130,7 +134,7 @@ export interface BalancesOptions extends ServiceOptions {
|
|
|
130
134
|
export type TransactionsOptions = ServiceOptions;
|
|
131
135
|
export interface CollectPaymentOptions extends ServiceOptions {
|
|
132
136
|
account?: AccountReference | {
|
|
133
|
-
encryptedIban: Uint8Array;
|
|
137
|
+
encryptedIban: Uint8Array | string;
|
|
134
138
|
currency?: string;
|
|
135
139
|
};
|
|
136
140
|
}
|
|
@@ -179,6 +183,12 @@ export type SearchFilter =
|
|
|
179
183
|
*/
|
|
180
184
|
| {
|
|
181
185
|
term: string;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Filter by encrypted IBAN (provided from a backend) in binary or Base64 string form.
|
|
189
|
+
*/
|
|
190
|
+
| {
|
|
191
|
+
encryptedIban: Uint8Array | string;
|
|
182
192
|
};
|
|
183
193
|
/**
|
|
184
194
|
* Response from YAXI Open Banking services.
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { chacha20poly1305 } from '@noble/ciphers/chacha.js';
|
|
2
|
-
import {
|
|
2
|
+
import { bytesToUtf8 as bytesToUtf8$1, managedNonce, utf8ToBytes as utf8ToBytes$1 } from '@noble/ciphers/utils.js';
|
|
3
3
|
import { KeySettlement, binaryStringToBytes, bytesToBinaryString } from 'routex-settlement';
|
|
4
4
|
import { jwtDecode } from 'jwt-decode';
|
|
5
5
|
|
|
@@ -41,7 +41,7 @@ function bytesToUtf8(bytes) {
|
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
var version = "0.4.
|
|
44
|
+
var version = "0.4.8";
|
|
45
45
|
|
|
46
46
|
var AccountField;
|
|
47
47
|
(function (AccountField) {
|
|
@@ -549,7 +549,14 @@ class RoutexClient {
|
|
|
549
549
|
search(_a) {
|
|
550
550
|
return __awaiter(this, arguments, void 0, function* ({ ticket, filters, ibanDetection, limit, }) {
|
|
551
551
|
const response = yield this._request(ticket, "search", {
|
|
552
|
-
filters
|
|
552
|
+
filters: filters === null || filters === void 0 ? void 0 : filters.map((f) => {
|
|
553
|
+
if ("encryptedIban" in f) {
|
|
554
|
+
return { encryptedIban: base64Encode(f["encryptedIban"]) };
|
|
555
|
+
}
|
|
556
|
+
else {
|
|
557
|
+
return f;
|
|
558
|
+
}
|
|
559
|
+
}),
|
|
553
560
|
ibanDetection,
|
|
554
561
|
limit,
|
|
555
562
|
});
|
|
@@ -1106,7 +1113,12 @@ function base64Decode(base64) {
|
|
|
1106
1113
|
return binaryStringToBytes(atob(base64));
|
|
1107
1114
|
}
|
|
1108
1115
|
function base64Encode(bytes) {
|
|
1109
|
-
|
|
1116
|
+
if (typeof bytes === "string") {
|
|
1117
|
+
return bytes;
|
|
1118
|
+
}
|
|
1119
|
+
else {
|
|
1120
|
+
return btoa(bytesToBinaryString(bytes));
|
|
1121
|
+
}
|
|
1110
1122
|
}
|
|
1111
1123
|
function base64UrlEncode(bytes) {
|
|
1112
1124
|
return base64Encode(bytes)
|