routex-client 0.4.4 → 0.4.6

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
@@ -4,6 +4,18 @@ A client for [YAXI](https://yaxi.tech/)'s Open Banking services.
4
4
 
5
5
  ## Changelog
6
6
 
7
+ ### [0.4.6] - 2025-12-08
8
+
9
+ #### Fixed
10
+
11
+ - `collectPayment` without given `account` argument
12
+
13
+ ### [0.4.5] - 2025-11-25
14
+
15
+ #### Added
16
+
17
+ - `encryptedIban` as alternative to `iban` in `collectPayment`'s `account` option
18
+
7
19
  ### [0.4.4] - 2025-11-09
8
20
 
9
21
  #### Fixed
package/client.d.ts CHANGED
@@ -129,7 +129,10 @@ export interface BalancesOptions extends ServiceOptions {
129
129
  }
130
130
  export type TransactionsOptions = ServiceOptions;
131
131
  export interface CollectPaymentOptions extends ServiceOptions {
132
- account?: AccountReference;
132
+ account?: AccountReference | {
133
+ encryptedIban: Uint8Array;
134
+ currency?: string;
135
+ };
133
136
  }
134
137
  interface AccountReference {
135
138
  iban: string;
@@ -534,7 +537,7 @@ export declare class RoutexClient {
534
537
  private _respond;
535
538
  private _confirm;
536
539
  /**
537
- * Fetch a list of accounts
540
+ * [Accounts service]{@link https://docs.yaxi.tech/accounts.html}
538
541
  */
539
542
  accounts({ credentials, session, recurringConsents, ticket, fields, filter, }: AccountsOptions): Promise<OBResponse>;
540
543
  /**
@@ -546,7 +549,7 @@ export declare class RoutexClient {
546
549
  */
547
550
  confirmAccounts(options: ConfirmationOptions): Promise<OBResponse>;
548
551
  /**
549
- * Fetch a list of balances
552
+ * [Balances service]{@link https://docs.yaxi.tech/balances.html}
550
553
  */
551
554
  balances({ credentials, session, recurringConsents, ticket, accounts, }: BalancesOptions): Promise<OBResponse>;
552
555
  /**
@@ -558,7 +561,7 @@ export declare class RoutexClient {
558
561
  */
559
562
  confirmBalances(options: ConfirmationOptions): Promise<OBResponse>;
560
563
  /**
561
- * Fetch a list of transactions
564
+ * [Transactions service]{@link https://docs.yaxi.tech/transactions.html}
562
565
  */
563
566
  transactions({ credentials, session, recurringConsents, ticket, }: TransactionsOptions): Promise<OBResponse>;
564
567
  /**
@@ -570,7 +573,7 @@ export declare class RoutexClient {
570
573
  */
571
574
  confirmTransactions(options: ConfirmationOptions): Promise<OBResponse>;
572
575
  /**
573
- * Collect a predefined payment
576
+ * [Collect Payment service]{@link https://docs.yaxi.tech/collect-payment.html}
574
577
  */
575
578
  collectPayment({ credentials, session, recurringConsents, ticket, account, }: CollectPaymentOptions): Promise<OBResponse>;
576
579
  /**
package/index.js CHANGED
@@ -41,7 +41,7 @@ function bytesToUtf8(bytes) {
41
41
  });
42
42
  }
43
43
 
44
- var version = "0.4.4";
44
+ var version = "0.4.6";
45
45
 
46
46
  var AccountField;
47
47
  (function (AccountField) {
@@ -628,7 +628,7 @@ class RoutexClient {
628
628
  });
629
629
  }
630
630
  /**
631
- * Fetch a list of accounts
631
+ * [Accounts service]{@link https://docs.yaxi.tech/accounts.html}
632
632
  */
633
633
  accounts(_a) {
634
634
  return __awaiter(this, arguments, void 0, function* ({ credentials, session, recurringConsents, ticket, fields, filter, }) {
@@ -657,7 +657,7 @@ class RoutexClient {
657
657
  });
658
658
  }
659
659
  /**
660
- * Fetch a list of balances
660
+ * [Balances service]{@link https://docs.yaxi.tech/balances.html}
661
661
  */
662
662
  balances(_a) {
663
663
  return __awaiter(this, arguments, void 0, function* ({ credentials, session, recurringConsents, ticket, accounts, }) {
@@ -685,7 +685,7 @@ class RoutexClient {
685
685
  });
686
686
  }
687
687
  /**
688
- * Fetch a list of transactions
688
+ * [Transactions service]{@link https://docs.yaxi.tech/transactions.html}
689
689
  */
690
690
  transactions(_a) {
691
691
  return __awaiter(this, arguments, void 0, function* ({ credentials, session, recurringConsents, ticket, }) {
@@ -711,12 +711,19 @@ class RoutexClient {
711
711
  });
712
712
  }
713
713
  /**
714
- * Collect a predefined payment
714
+ * [Collect Payment service]{@link https://docs.yaxi.tech/collect-payment.html}
715
715
  */
716
716
  collectPayment(_a) {
717
717
  return __awaiter(this, arguments, void 0, function* ({ credentials, session, recurringConsents, ticket, account, }) {
718
+ let encodedAccount = undefined;
719
+ if (account && "encryptedIban" in account) {
720
+ encodedAccount = Object.assign(Object.assign({}, account), { encryptedIban: base64Encode(account.encryptedIban) });
721
+ }
722
+ else if (account) {
723
+ encodedAccount = Object.assign({}, account);
724
+ }
718
725
  const data = _prepareData(credentials, session, recurringConsents, {
719
- account,
726
+ account: encodedAccount,
720
727
  });
721
728
  const r = yield this._request(ticket, "collect-payment/service", data);
722
729
  return _readOBResponse(r);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "routex-client",
3
- "version": "0.4.4",
3
+ "version": "0.4.6",
4
4
  "description": "YAXI routex client",
5
5
  "homepage": "https://yaxi.tech",
6
6
  "author": "YAXI GmbH",