@riocrypto/common 1.0.613 → 1.0.615

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.
@@ -18,11 +18,12 @@ import { UserInput } from "../types/user-input";
18
18
  import { UserUpdate } from "../types/user-update";
19
19
  import { BankPayment } from "../types/bank-payment";
20
20
  import { BankAccount } from "../types/bank-account";
21
+ import { UserType } from "../types/user-type";
21
22
  export declare class RioClient {
22
23
  private axios;
23
24
  constructor(axios: AxiosStatic | AxiosInstance);
24
25
  getOrders(): Promise<Order[]>;
25
- getUsers(): Promise<User[]>;
26
+ getUsers(type?: UserType): Promise<User[]>;
26
27
  signinAdmin(email: string, password: string): Promise<any>;
27
28
  updateUser(update: UserUpdate, userId?: string): Promise<User>;
28
29
  uploadBusinessCOI(id: string, formData: FormData): Promise<User>;
@@ -20,9 +20,13 @@ class RioClient {
20
20
  return data;
21
21
  });
22
22
  }
23
- getUsers() {
23
+ getUsers(type) {
24
24
  return __awaiter(this, void 0, void 0, function* () {
25
- const { data } = yield this.axios.get(`/api/users`);
25
+ const { data } = yield this.axios.get(`/api/users`, {
26
+ params: {
27
+ type,
28
+ },
29
+ });
26
30
  return data;
27
31
  });
28
32
  }
@@ -3,21 +3,18 @@ import { Language } from "./language";
3
3
  import { PlatformFeeRange } from "./platform-fee-range";
4
4
  import { UserAttribute } from "./user-attribute";
5
5
  import { UserType } from "./user-type";
6
- interface IndividualUser {
7
- firstName: string;
8
- lastName: string;
9
- birthday: Date;
6
+ export declare type UserInput = {
7
+ firstName?: string;
8
+ lastName?: string;
9
+ birthday?: Date;
10
10
  KYCReportFile?: string;
11
- }
12
- interface BusinessUser {
13
- companyName: string;
14
- legalRepresentative: string;
11
+ companyName?: string;
12
+ legalRepresentative?: string;
15
13
  COIFile?: string;
16
- }
17
- export declare type UserInput = {
18
14
  type: UserType;
19
15
  email: string;
20
16
  language: Language;
17
+ phoneNumber: string;
21
18
  street1: string;
22
19
  street2?: string;
23
20
  city: string;
@@ -29,5 +26,4 @@ export declare type UserInput = {
29
26
  attributes?: UserAttribute[];
30
27
  partnerId?: string;
31
28
  brokerId?: string;
32
- } & (UserType.Individual extends UserType ? IndividualUser : {}) & (UserType.Business extends UserType ? BusinessUser : {});
33
- export {};
29
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.613",
3
+ "version": "1.0.615",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",