routex-client 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,125 @@
1
1
  # routex-client
2
2
 
3
3
  A client for [YAXI](https://yaxi.tech/)'s Open Banking services.
4
+
5
+ ## Changelog
6
+
7
+ ### [0.4.2] - 2025-09-23
8
+
9
+ #### Fixed
10
+
11
+ - Build failures with recent @noble packages
12
+
13
+ ### [0.4.1] - 2025-09-11
14
+
15
+ #### Fixed
16
+
17
+ - `recurringConsents` is now optional
18
+
19
+ ### [0.4.0] - 2025-09-11
20
+
21
+ #### Added
22
+
23
+ - `recurringConsents` option for `RoutexClient.accounts`, `RoutexClient.collectPayment`, and `RoutexClient.transactions`
24
+ - `RoutexClient.balances`, `RoutexClient.respondBalances`, `RoutexClient.confirmBalances`
25
+ - `DialogContext.VopConfirmation`, `DialogContext.VopCheck`
26
+ - `Confirmation.pollingDelaySecs`
27
+ - `TicketExceptionCode` has two new variants:
28
+ - `ExpiredKey`: The API key is expired.
29
+ - `KeyEnvironmentMismatch`: The API key cannot be used for this environment.
30
+ - The `RoutexClient` constructor now takes an optional `requestRetryFactory` option to retry failed requests. You can pass a factory for custom policies or use `retryRequestExceptionNTimesPolicy` to retry operations that failed due to a `RequestException`. For example, `{ requestRetryFactory: () => retryRequestExceptionNTimesPolicy(1) }` would retry one time.
31
+
32
+ #### Removed
33
+
34
+ - `InvalidRedirectUriException`
35
+
36
+ #### Fixed
37
+
38
+ - The required version for `routex-settlement` is now `0.1.3`. This fixes a bug that if the first requests happened concurrently, some of them could result in a `TicketException: Invalid "yaxi-ticket" header`.
39
+ - Initialization of `UnsupportedProductException`
40
+
41
+ #### Changed
42
+
43
+ - `RoutexClient` now takes an object of options instead of a single URL as argument. For backwards compatibility, it's still possible to pass a URL as a single argument.
44
+
45
+ ### [0.3.4] - 2025-06-25
46
+
47
+ #### Changed
48
+
49
+ - `TypeError`s from the `fetch` method get translated to `RequestException`s
50
+
51
+ #### Fixed
52
+
53
+ - Parsing of service errors
54
+
55
+ ### [0.3.3] - 2025-06-11
56
+
57
+ #### Added
58
+
59
+ - `ServiceBlockedException.code`, `ServiceBlockedCode`
60
+ - `UnsupportedProductException.reason`, `UnsupportedProductException.userMessage`, `UnsupportedProductReason`
61
+
62
+ ### [0.3.2] - 2025-05-28
63
+
64
+ #### Added
65
+
66
+ - `DialogContext.PaymentStatus`
67
+
68
+ ### [0.3.1] - 2025-05-27
69
+
70
+ #### Added
71
+
72
+ - `ProviderErrorException`, `ProviderErrorCode`
73
+
74
+ ### [0.3.0] - 2025-05-23
75
+
76
+ #### Added
77
+
78
+ - `RoutexClient.setRedirectUri`
79
+ - `RoutexClient.transactions`, `RoutexClient.respondTransactions`, `RoutexClient.confirmTransactions`
80
+ - `removeCredentials`
81
+ - `OBResponse`
82
+ - `AccountStatus`
83
+
84
+ #### Changed
85
+
86
+ - This is a pure JS library now, i.e., does not include WebAssembly anymore
87
+ - `ResponseException.response` is now of type `Response`
88
+ - `storeCredentials` and `loadCredentials` take an identifier argument now
89
+ - `Result`, `Dialog`, `Redirect`, and `RedirectHandle` now extend `OBResponse`, providing `fromJSON` and `toJSON` methods
90
+
91
+ #### Removed
92
+
93
+ - `RoutexClientInterface`
94
+ - `Response` type (see `OBResponse` class)
95
+ - `ConnectionType`
96
+
97
+ #### Fixed
98
+
99
+ - `PaymentFailedException.name`
100
+
101
+ ### [0.2.0] - 2025-01-29
102
+
103
+ #### Added
104
+
105
+ - `RoutexClient.collectPayment` takes an optional `currency` attribute
106
+ - `DialogContext.Redirect` for redirect polling
107
+ - `TicketException` for any error related to the provided ticket
108
+ - `code` and `userMessage` on `PaymentFailedException`
109
+ - Inherit docs for `RoutexClient`
110
+ - `storeCredentials` and `loadCredentials` to store encrypted credentials in the user's browser
111
+
112
+ #### Changed
113
+
114
+ - The `traceId` method does not return a `Promise` anymore, but an immediate result
115
+ - Renamed `errorMessage` on exception classes to `userMessage`
116
+ - Removed support for Node.js 18
117
+
118
+ #### Removed
119
+
120
+ - `Confirmation.primaryLabel`
121
+ - `Selection.primaryLabel`
122
+ - `Field.primaryLabel`
123
+ - `Actions`
124
+ - `source` on exception classes
125
+ - `UnexpectedValueException.errorMessage`
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { chacha20poly1305 } from '@noble/ciphers/chacha';
2
- import { managedNonce, utf8ToBytes, bytesToUtf8 } from '@noble/ciphers/utils';
1
+ import { chacha20poly1305 } from '@noble/ciphers/chacha.js';
2
+ import { managedNonce, utf8ToBytes, bytesToUtf8 } from '@noble/ciphers/utils.js';
3
3
  import { jwtDecode } from 'jwt-decode';
4
4
  import { KeySettlement, bytesToBinaryString, binaryStringToBytes } from 'routex-settlement';
5
5
 
@@ -35,7 +35,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
35
35
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
36
36
  };
37
37
 
38
- var version = "0.4.1";
38
+ var version = "0.4.2";
39
39
 
40
40
  var AccountField;
41
41
  (function (AccountField) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "routex-client",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "YAXI routex client",
5
5
  "homepage": "https://yaxi.tech",
6
6
  "author": "YAXI GmbH",
@@ -10,12 +10,11 @@
10
10
  "exports": "./index.js",
11
11
  "types": "./index.d.ts",
12
12
  "files": [
13
- "CHANGELOG.md",
14
13
  "index.d.ts",
15
14
  "index.js"
16
15
  ],
17
16
  "scripts": {
18
- "build": "rollup --input index.ts --dir . --plugin typescript --plugin json --external @noble/ciphers/chacha,@noble/ciphers/utils,@noble/ciphers/webcrypto,jwt-decode,routex-settlement",
17
+ "build": "rollup --input index.ts --dir . --plugin typescript --plugin json --external @noble/ciphers/chacha.js,@noble/ciphers/utils.js,jwt-decode,routex-settlement",
19
18
  "clean": "tsc --build --clean",
20
19
  "fmt": "prettier --write .",
21
20
  "lint": "eslint",
@@ -24,7 +23,7 @@
24
23
  "dependencies": {
25
24
  "@noble/ciphers": "^2.0.0",
26
25
  "jwt-decode": "^4.0.0",
27
- "routex-settlement": "^0.1.3"
26
+ "routex-settlement": "^0.1.4"
28
27
  },
29
28
  "devDependencies": {
30
29
  "@eslint/js": "^9.18.0",
package/CHANGELOG.md DELETED
@@ -1,115 +0,0 @@
1
- # Changelog
2
-
3
- ## [0.4.1] - 2025-09-11
4
-
5
- ### Fixed
6
-
7
- - `recurringConsents` is now optional
8
-
9
- ## [0.4.0] - 2025-09-11
10
-
11
- ### Added
12
-
13
- - `recurringConsents` option for `RoutexClient.accounts`, `RoutexClient.collectPayment`, and `RoutexClient.transactions`
14
- - `RoutexClient.balances`, `RoutexClient.respondBalances`, `RoutexClient.confirmBalances`
15
- - `DialogContext.VopConfirmation`, `DialogContext.VopCheck`
16
- - `Confirmation.pollingDelaySecs`
17
- - `TicketExceptionCode` has two new variants:
18
- - `ExpiredKey`: The API key is expired.
19
- - `KeyEnvironmentMismatch`: The API key cannot be used for this environment.
20
- - The `RoutexClient` constructor now takes an optional `requestRetryFactory` option to retry failed requests. You can pass a factory for custom policies or use `retryRequestExceptionNTimesPolicy` to retry operations that failed due to a `RequestException`. For example, `{ requestRetryFactory: () => retryRequestExceptionNTimesPolicy(1) }` would retry one time.
21
-
22
- ### Removed
23
-
24
- - `InvalidRedirectUriException`
25
-
26
- ### Fixed
27
-
28
- - The required version for `routex-settlement` is now `0.1.3`. This fixes a bug that if the first requests happened concurrently, some of them could result in a `TicketException: Invalid "yaxi-ticket" header`.
29
- - Initialization of `UnsupportedProductException`
30
-
31
- ### Changed
32
-
33
- - `RoutexClient` now takes an object of options instead of a single URL as argument. For backwards compatibility, it's still possible to pass a URL as a single argument.
34
-
35
- ## [0.3.4] - 2025-06-25
36
-
37
- ### Changed
38
-
39
- - `TypeError`s from the `fetch` method get translated to `RequestException`s
40
-
41
- ### Fixed
42
-
43
- - Parsing of service errors
44
-
45
- ## [0.3.3] - 2025-06-11
46
-
47
- ### Added
48
-
49
- - `ServiceBlockedException.code`, `ServiceBlockedCode`
50
- - `UnsupportedProductException.reason`, `UnsupportedProductException.userMessage`, `UnsupportedProductReason`
51
-
52
- ## [0.3.2] - 2025-05-28
53
-
54
- ### Added
55
-
56
- - `DialogContext.PaymentStatus`
57
-
58
- ## [0.3.1] - 2025-05-27
59
-
60
- ### Added
61
-
62
- - `ProviderErrorException`, `ProviderErrorCode`
63
-
64
- ## [0.3.0] - 2025-05-23
65
-
66
- ### Added
67
-
68
- - `RoutexClient.setRedirectUri`
69
- - `RoutexClient.transactions`, `RoutexClient.respondTransactions`, `RoutexClient.confirmTransactions`
70
- - `removeCredentials`
71
- - `OBResponse`
72
- - `AccountStatus`
73
-
74
- ### Changed
75
-
76
- - This is a pure JS library now, i.e., does not include WebAssembly anymore
77
- - `ResponseException.response` is now of type `Response`
78
- - `storeCredentials` and `loadCredentials` take an identifier argument now
79
- - `Result`, `Dialog`, `Redirect`, and `RedirectHandle` now extend `OBResponse`, providing `fromJSON` and `toJSON` methods
80
-
81
- ### Removed
82
-
83
- - `RoutexClientInterface`
84
- - `Response` type (see `OBResponse` class)
85
- - `ConnectionType`
86
-
87
- ### Fixed
88
-
89
- - `PaymentFailedException.name`
90
-
91
- ## [0.2.0] - 2025-01-29
92
-
93
- ### Added
94
-
95
- - `RoutexClient.collectPayment` takes an optional `currency` attribute
96
- - `DialogContext.Redirect` for redirect polling
97
- - `TicketException` for any error related to the provided ticket
98
- - `code` and `userMessage` on `PaymentFailedException`
99
- - Inherit docs for `RoutexClient`
100
- - `storeCredentials` and `loadCredentials` to store encrypted credentials in the user's browser
101
-
102
- ### Changed
103
-
104
- - The `traceId` method does not return a `Promise` anymore, but an immediate result
105
- - Renamed `errorMessage` on exception classes to `userMessage`
106
- - Removed support for Node.js 18
107
-
108
- ### Removed
109
-
110
- - `Confirmation.primaryLabel`
111
- - `Selection.primaryLabel`
112
- - `Field.primaryLabel`
113
- - `Actions`
114
- - `source` on exception classes
115
- - `UnexpectedValueException.errorMessage`