@riocrypto/common-server 1.0.1368 → 1.0.1370

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.
@@ -11,13 +11,14 @@ declare class ClusterClient {
11
11
  confirmPayment(orderId: string): Promise<void>;
12
12
  createBitsoBankAccount(userId: string): Promise<BitsoBankAccount>;
13
13
  getBalance(asset: Crypto | Fiat): Promise<number>;
14
- getUSBankAccounts(userId: string, fiat: Fiat, country: Country): Promise<{
14
+ createPayout(orderId: string, bankAccountId: string): Promise<void>;
15
+ getUSBankAccounts(userId: string): Promise<{
15
16
  id: string;
16
17
  bank_name: string;
17
18
  account_owner_name: string;
18
19
  last_4: string;
19
20
  }[]>;
20
- getBankAccounts(userId: string): Promise<BankAccount[]>;
21
+ getBankAccounts(userId: string, fiat: Fiat, country: Country): Promise<BankAccount[]>;
21
22
  getTransactionLimits(userId: string): Promise<{
22
23
  limit: number;
23
24
  used: number;
@@ -152,9 +152,21 @@ class ClusterClient {
152
152
  return rioResponse.data.balance;
153
153
  });
154
154
  }
155
- getUSBankAccounts(userId, fiat, country) {
155
+ createPayout(orderId, bankAccountId) {
156
156
  return __awaiter(this, void 0, void 0, function* () {
157
- const rioResponse = yield this.axios.get(`${this.baseUrl}/api/bank/us/accounts?userId=${userId}&fiat=${fiat}&country=${country}`, {
157
+ yield this.axios.post(`${this.baseUrl}/api/payouts/bank`, {
158
+ orderId,
159
+ bankAccountId,
160
+ }, {
161
+ headers: {
162
+ "x-cluster-api-key": this.clusterApiKey,
163
+ },
164
+ });
165
+ });
166
+ }
167
+ getUSBankAccounts(userId) {
168
+ return __awaiter(this, void 0, void 0, function* () {
169
+ const rioResponse = yield this.axios.get(`${this.baseUrl}/api/bank/us/accounts?userId=${userId}`, {
158
170
  headers: {
159
171
  "x-cluster-api-key": this.clusterApiKey,
160
172
  },
@@ -162,9 +174,9 @@ class ClusterClient {
162
174
  return rioResponse.data;
163
175
  });
164
176
  }
165
- getBankAccounts(userId) {
177
+ getBankAccounts(userId, fiat, country) {
166
178
  return __awaiter(this, void 0, void 0, function* () {
167
- const rioResponse = yield this.axios.get(`${this.baseUrl}/api/bank/accounts?userId=${userId}`, {
179
+ const rioResponse = yield this.axios.get(`${this.baseUrl}/api/bank/accounts?userId=${userId}&fiat=${fiat}&country=${country}`, {
168
180
  headers: {
169
181
  "x-cluster-api-key": this.clusterApiKey,
170
182
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1368",
3
+ "version": "1.0.1370",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",