@riocrypto/common 1.0.603 → 1.0.605

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.
@@ -44,7 +44,7 @@ export declare class RioClient {
44
44
  platformFee: number;
45
45
  }): Promise<void>;
46
46
  updateRioSettings(update: RioSettingsUpdate): Promise<void>;
47
- confirmBankPayment(orderId: string): Promise<any>;
47
+ confirmBankPayment(orderId: string, amountFiat?: number): Promise<any>;
48
48
  confirmBankPayout(orderId: string): Promise<any>;
49
49
  getUser(): Promise<User>;
50
50
  getBusinessUser(): Promise<BusinessUser>;
@@ -99,10 +99,11 @@ class RioClient {
99
99
  return data;
100
100
  });
101
101
  }
102
- confirmBankPayment(orderId) {
102
+ confirmBankPayment(orderId, amountFiat) {
103
103
  return __awaiter(this, void 0, void 0, function* () {
104
104
  const { data } = yield this.axios.post(`/api/payments/bank/confirm`, {
105
105
  orderId,
106
+ amountFiat,
106
107
  });
107
108
  return data;
108
109
  });
@@ -1,26 +1,33 @@
1
1
  import { Country } from "./country";
2
- import { KYCStatus } from "./kyc-status";
3
2
  import { Language } from "./language";
4
3
  import { PlatformFeeRange } from "./platform-fee-range";
5
- import { USState } from "./us-state";
6
4
  import { UserAttribute } from "./user-attribute";
7
- export interface UserInput {
5
+ import { UserType } from "./user-type";
6
+ interface IndividualUser {
8
7
  firstName: string;
9
8
  lastName: string;
10
- phoneNumber?: string;
11
9
  birthday: Date;
10
+ KYCReportFile?: string;
11
+ }
12
+ interface BusinessUser {
13
+ companyName: string;
14
+ legalRepresentative: string;
15
+ COIFile?: string;
16
+ }
17
+ export declare type UserInput = {
18
+ type: UserType;
12
19
  email: string;
20
+ language: Language;
13
21
  street1: string;
14
22
  street2?: string;
15
23
  city: string;
16
- state: USState | string;
17
- postalCode: string;
24
+ state: string;
18
25
  country: Country;
19
- language: Language;
26
+ postalCode: string;
20
27
  cpf?: string;
21
- kycStatus?: KYCStatus;
22
- partnerId?: string;
28
+ platformFeeRanges?: PlatformFeeRange[];
23
29
  attributes?: UserAttribute[];
30
+ partnerId?: string;
24
31
  brokerId?: string;
25
- platformFeeRanges?: PlatformFeeRange[];
26
- }
32
+ } & (UserType.Individual extends UserType ? IndividualUser : {}) & (UserType.Business extends UserType ? BusinessUser : {});
33
+ export {};
@@ -1,25 +1,32 @@
1
1
  import { Country } from "./country";
2
- import { KYCStatus } from "./kyc-status";
3
2
  import { Language } from "./language";
4
3
  import { PlatformFeeRange } from "./platform-fee-range";
5
4
  import { UserAttribute } from "./user-attribute";
6
- export interface UserUpdate {
5
+ import { UserType } from "./user-type";
6
+ interface IndividualUser {
7
7
  firstName?: string;
8
8
  lastName?: string;
9
- phoneNumber?: string;
10
9
  birthday?: Date;
10
+ KYCReportFile?: string;
11
+ }
12
+ interface BusinessUser {
13
+ companyName?: string;
14
+ legalRepresentative?: string;
15
+ COIFile?: string;
16
+ }
17
+ export declare type UserUpdate = {
11
18
  email?: string;
19
+ language?: Language;
12
20
  street1?: string;
13
21
  street2?: string;
14
22
  city?: string;
15
23
  state?: string;
16
- postalCode?: string;
17
24
  country?: Country;
25
+ postalCode?: string;
18
26
  cpf?: string;
19
- kycStatus?: KYCStatus;
20
- language?: Language;
21
- partnerId?: string;
27
+ platformFeeRanges?: PlatformFeeRange[];
22
28
  attributes?: UserAttribute[];
29
+ partnerId?: string;
23
30
  brokerId?: string;
24
- platformFeeRanges?: PlatformFeeRange[];
25
- }
31
+ } & (UserType.Individual extends UserType ? IndividualUser : {}) & (UserType.Business extends UserType ? BusinessUser : {});
32
+ export {};
@@ -2,29 +2,34 @@ import { Country } from "./country";
2
2
  import { KYCStatus } from "./kyc-status";
3
3
  import { Language } from "./language";
4
4
  import { PlatformFeeRange } from "./platform-fee-range";
5
- import { USState } from "./us-state";
6
5
  import { UserAttribute } from "./user-attribute";
7
6
  import { UserType } from "./user-type";
8
- export interface User {
9
- authId: string;
10
- id: string;
11
- type: UserType;
7
+ interface IndividualUser {
12
8
  firstName: string;
13
9
  lastName: string;
14
- phoneNumber: string;
15
10
  birthday: Date;
11
+ KYCReportFile?: string;
12
+ }
13
+ interface BusinessUser {
14
+ companyName: string;
15
+ legalRepresentative: string;
16
+ COIFile?: string;
17
+ }
18
+ export declare type User = {
19
+ type: UserType;
16
20
  email: string;
21
+ language: Language;
17
22
  street1: string;
18
23
  street2?: string;
19
24
  city: string;
20
- state: USState | string;
21
- postalCode: string;
25
+ state: string;
22
26
  country: Country;
27
+ postalCode: string;
23
28
  kycStatus: KYCStatus;
24
29
  cpf?: string;
25
- language?: Language;
26
- partnerId?: string;
30
+ platformFeeRanges?: PlatformFeeRange[];
27
31
  attributes?: UserAttribute[];
32
+ partnerId?: string;
28
33
  brokerId?: string;
29
- platformFeeRanges?: PlatformFeeRange[];
30
- }
34
+ } & (UserType.Individual extends UserType ? IndividualUser : {}) & (UserType.Business extends UserType ? BusinessUser : {});
35
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.603",
3
+ "version": "1.0.605",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",