@riocrypto/common 1.0.709 → 1.0.711

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.
@@ -19,13 +19,15 @@ import { BankPayment } from "../types/bank-payment";
19
19
  import { BankAccount } from "../types/bank-account";
20
20
  import { UserType } from "../types/user-type";
21
21
  import { Quote } from "../types/quote";
22
+ import { Side } from "../types/side";
22
23
  import { Crypto } from "../types/crypto";
24
+ import { QuoteInput } from "../types/quote-input";
23
25
  export declare class RioClient {
24
26
  private axios;
25
27
  constructor(axios: AxiosStatic | AxiosInstance);
26
- getOrders(): Promise<Order[]>;
27
- getQuote(id: string): Promise<Quote>;
28
- getUsers(type?: UserType, brokerId?: string): Promise<User[]>;
28
+ getOrders(side: Side, page: number, limit?: number): Promise<Order[]>;
29
+ createQuote(input: QuoteInput): Promise<Quote>;
30
+ getUsers(page: number, limit: number, type?: UserType, brokerId?: string): Promise<User[]>;
29
31
  updateUser(update: UserUpdate, userId?: string): Promise<User>;
30
32
  uploadBusinessCOI(id: string, formData: FormData): Promise<User>;
31
33
  uploadBusinessKYCReport(id: string, formData: FormData): Promise<User>;
@@ -71,7 +73,7 @@ export declare class RioClient {
71
73
  revenue: number;
72
74
  }>;
73
75
  getPaymentMethods(fiat: Fiat, country: Country): Promise<PaymentMethod[]>;
74
- getBankAccounts(): Promise<BankAccount[]>;
76
+ getBankAccounts(page: number, limit: number): Promise<BankAccount[]>;
75
77
  getSupportedPayoutMethods(fiat: Fiat, country: Country): Promise<PayoutMethod[]>;
76
78
  getPartner(partnerId: string): Promise<Partner>;
77
79
  createKushkiPayment(orderId: string, token: string): Promise<{
@@ -21,24 +21,32 @@ class RioClient {
21
21
  return config;
22
22
  });
23
23
  }
24
- getOrders() {
24
+ getOrders(side, page, limit) {
25
25
  return __awaiter(this, void 0, void 0, function* () {
26
- const { data } = yield this.axios.get(`/api/orders`);
26
+ const { data } = yield this.axios.get(`/api/orders?`, {
27
+ params: {
28
+ side,
29
+ page,
30
+ limit,
31
+ },
32
+ });
27
33
  return data;
28
34
  });
29
35
  }
30
- getQuote(id) {
36
+ createQuote(input) {
31
37
  return __awaiter(this, void 0, void 0, function* () {
32
- const { data } = yield this.axios.get(`/api/quotes/${id}`);
38
+ const { data } = yield this.axios.post(`/api/quotes`, input);
33
39
  return data;
34
40
  });
35
41
  }
36
- getUsers(type, brokerId) {
42
+ getUsers(page, limit, type, brokerId) {
37
43
  return __awaiter(this, void 0, void 0, function* () {
38
44
  const { data } = yield this.axios.get(`/api/users`, {
39
45
  params: {
40
46
  type,
41
47
  brokerId,
48
+ page,
49
+ limit,
42
50
  },
43
51
  });
44
52
  return data;
@@ -244,9 +252,11 @@ class RioClient {
244
252
  return response.data;
245
253
  });
246
254
  }
247
- getBankAccounts() {
255
+ getBankAccounts(page, limit) {
248
256
  return __awaiter(this, void 0, void 0, function* () {
249
- const response = yield this.axios.get(`/api/bank/accounts`);
257
+ const response = yield this.axios.get(`/api/bank/accounts`, {
258
+ params: { page, limit },
259
+ });
250
260
  return response.data;
251
261
  });
252
262
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.709",
3
+ "version": "1.0.711",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",