@riocrypto/common 1.0.932 → 1.0.935

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.
@@ -28,6 +28,7 @@ import { AdminTask } from "../types/admin-task";
28
28
  import { AdminTaskType } from "../types/admin-task-type";
29
29
  import { ImportOrderInput } from "../types/import-order-input";
30
30
  import { Invoice } from "../types/invoice";
31
+ import { CryptoAddressQuery } from "../types/crypto-address-query";
31
32
  export declare class RioAdminClient {
32
33
  private axios;
33
34
  constructor(axios: AxiosStatic | AxiosInstance);
@@ -100,7 +101,7 @@ export declare class RioAdminClient {
100
101
  getOrder(id: string): Promise<Order>;
101
102
  createBankPayout(oid: string, bankAccountId: string): Promise<BankPayout>;
102
103
  getBankPayout(orderId: string): Promise<BankPayout>;
103
- getCryptoAddresses(userId: string, address?: string, crypto?: Crypto): Promise<CryptoAddress[]>;
104
+ getCryptoAddresses(page: number, limit?: number, query?: CryptoAddressQuery): Promise<CryptoAddress[]>;
104
105
  createCryptoAddress(address: string, crypto: Crypto, userId: string, label?: string): Promise<CryptoAddress>;
105
106
  createBankAccount(userId: string, country: Country, fiat: Fiat, bankName: string, accountHolderName: string, accountNumber: string, swiftCode?: string, notes?: string): Promise<BankAccount>;
106
107
  updateBankAccount(id: string, userId?: string, country?: Country, fiat?: Fiat, bankName?: string, accountHolderName?: string, accountNumber?: string, swiftCode?: string, notes?: string, approved?: boolean): Promise<BankAccount>;
@@ -336,16 +336,13 @@ class RioAdminClient {
336
336
  return response.data;
337
337
  });
338
338
  }
339
- getCryptoAddresses(userId, address, crypto) {
339
+ getCryptoAddresses(page, limit, query) {
340
340
  return __awaiter(this, void 0, void 0, function* () {
341
- const response = yield this.axios.get(`/api/address`, {
342
- params: {
343
- userId,
344
- address,
345
- crypto,
346
- },
341
+ const { data } = yield this.axios.get(`/api/addresses?`, {
342
+ params: Object.assign({ page,
343
+ limit }, query),
347
344
  });
348
- return response.data;
345
+ return data;
349
346
  });
350
347
  }
351
348
  createCryptoAddress(address, crypto, userId, label) {
@@ -23,6 +23,7 @@ import { UserQuery } from "../types/user-query";
23
23
  import { OrderQuery } from "../types/order-query";
24
24
  import { BankAccountQuery } from "../types/bank-account-query";
25
25
  import { Invoice } from "../types/invoice";
26
+ import { CryptoAddressQuery } from "../types/crypto-address-query";
26
27
  export declare class RioClient {
27
28
  private axios;
28
29
  constructor(axios: AxiosStatic | AxiosInstance);
@@ -74,7 +75,7 @@ export declare class RioClient {
74
75
  account_owner_name: string;
75
76
  last_4: string;
76
77
  }[]>;
77
- getCryptoAddresses(userId?: string, address?: string, crypto?: Crypto): Promise<CryptoAddress[]>;
78
+ getCryptoAddresses(page: number, limit?: number, query?: CryptoAddressQuery): Promise<CryptoAddress[]>;
78
79
  createCryptoAddress(address: string, crypto: Crypto, userId?: string, label?: string): Promise<CryptoAddress>;
79
80
  createBridgePlaidLink(userId: string): Promise<string>;
80
81
  createBankAccount(userId: string, country: Country, fiat: Fiat, bankName: string, accountHolderName: string, accountNumber: string, swiftCode?: string, notes?: string): Promise<BankAccount>;
@@ -228,16 +228,13 @@ class RioClient {
228
228
  return data;
229
229
  });
230
230
  }
231
- getCryptoAddresses(userId, address, crypto) {
231
+ getCryptoAddresses(page, limit, query) {
232
232
  return __awaiter(this, void 0, void 0, function* () {
233
- const response = yield this.axios.get(`/api/address`, {
234
- params: {
235
- userId,
236
- address,
237
- crypto,
238
- },
233
+ const { data } = yield this.axios.get(`/api/addresses?`, {
234
+ params: Object.assign({ page,
235
+ limit }, query),
239
236
  });
240
- return response.data;
237
+ return data;
241
238
  });
242
239
  }
243
240
  createCryptoAddress(address, crypto, userId, label) {
package/build/index.d.ts CHANGED
@@ -140,6 +140,7 @@ export * from "./types/bank-account";
140
140
  export * from "./types/quote-input";
141
141
  export * from "./types/order-query";
142
142
  export * from "./types/user-query";
143
+ export * from "./types/crypto-address-query";
143
144
  export * from "./types/bank-account-query";
144
145
  export * from "./types/mexico-fiscal-regimen";
145
146
  export * from "./types/bridge-customer";
package/build/index.js CHANGED
@@ -156,6 +156,7 @@ __exportStar(require("./types/bank-account"), exports);
156
156
  __exportStar(require("./types/quote-input"), exports);
157
157
  __exportStar(require("./types/order-query"), exports);
158
158
  __exportStar(require("./types/user-query"), exports);
159
+ __exportStar(require("./types/crypto-address-query"), exports);
159
160
  __exportStar(require("./types/bank-account-query"), exports);
160
161
  __exportStar(require("./types/mexico-fiscal-regimen"), exports);
161
162
  __exportStar(require("./types/bridge-customer"), exports);
@@ -0,0 +1,5 @@
1
+ export interface CryptoAddressQuery {
2
+ userId?: string;
3
+ address?: string;
4
+ crypto?: string;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.932",
3
+ "version": "1.0.935",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",