@riocrypto/common-server 1.0.1365 → 1.0.1366

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.
@@ -1,4 +1,4 @@
1
- import { Quote, Fiat, Crypto, BitsoBankAccount, Side, Country, Order, CryptoAddress } from "@riocrypto/common";
1
+ import { Quote, Fiat, Crypto, BitsoBankAccount, Side, Country, Order, CryptoAddress, BankAccount } from "@riocrypto/common";
2
2
  declare class ClusterClient {
3
3
  private baseUrl;
4
4
  private clusterApiKey;
@@ -17,6 +17,7 @@ declare class ClusterClient {
17
17
  account_owner_name: string;
18
18
  last_4: string;
19
19
  }[]>;
20
+ getBankAccounts(userId: string): Promise<BankAccount[]>;
20
21
  getTransactionLimits(userId: string): Promise<{
21
22
  limit: number;
22
23
  used: number;
@@ -162,6 +162,16 @@ class ClusterClient {
162
162
  return rioResponse.data;
163
163
  });
164
164
  }
165
+ getBankAccounts(userId) {
166
+ return __awaiter(this, void 0, void 0, function* () {
167
+ const rioResponse = yield this.axios.get(`${this.baseUrl}/api/bank/accounts?userId=${userId}`, {
168
+ headers: {
169
+ "x-cluster-api-key": this.clusterApiKey,
170
+ },
171
+ });
172
+ return rioResponse.data;
173
+ });
174
+ }
165
175
  getTransactionLimits(userId) {
166
176
  return __awaiter(this, void 0, void 0, function* () {
167
177
  const response = yield this.axios.get(`${this.baseUrl}/api/users/${userId}/limits`, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1365",
3
+ "version": "1.0.1366",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",