@riocrypto/common 1.0.1260 → 1.0.1262
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.
- package/build/clients/rio-admin-client.d.ts +3 -0
- package/build/clients/rio-admin-client.js +17 -0
- package/build/clients/rio-client.d.ts +3 -0
- package/build/clients/rio-client.js +17 -0
- package/build/index.d.ts +1 -0
- package/build/index.js +1 -0
- package/build/types/UBO-update.d.ts +46 -0
- package/build/types/UBO-update.js +2 -0
- package/package.json +1 -1
|
@@ -40,6 +40,7 @@ import { KYCFileType } from "../types/kyc-file-type";
|
|
|
40
40
|
import { UserType } from "../types/user-type";
|
|
41
41
|
import { UBOInput } from "../types/UBO-input";
|
|
42
42
|
import { UBO } from "../types/UBO";
|
|
43
|
+
import { UBOUpdate } from "../types/UBO-update";
|
|
43
44
|
export declare class RioAdminClient {
|
|
44
45
|
private axios;
|
|
45
46
|
constructor(axios: AxiosStatic | AxiosInstance);
|
|
@@ -62,6 +63,8 @@ export declare class RioAdminClient {
|
|
|
62
63
|
}>;
|
|
63
64
|
uploadFile(id: string, country: CountryOfOrigin, fileType: KYCFileType, formData: FormData): Promise<User>;
|
|
64
65
|
getUBO(id: string): Promise<UBO>;
|
|
66
|
+
getUBOS(page: number, limit?: number): Promise<UBO[]>;
|
|
67
|
+
updateUBO(update: UBOUpdate, uboId?: string): Promise<UBO>;
|
|
65
68
|
getUBOOnboardingRequirements(country: Country, countryOfOrigin: CountryOfOrigin): Promise<{
|
|
66
69
|
textRequirements: ("personalId" | "taxId")[];
|
|
67
70
|
fileRequirements: KYCFileType[];
|
|
@@ -116,6 +116,23 @@ class RioAdminClient {
|
|
|
116
116
|
return data;
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
|
+
getUBOS(page, limit) {
|
|
120
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
121
|
+
const { data } = yield this.axios.get(`/api/ubos?`, {
|
|
122
|
+
params: {
|
|
123
|
+
page,
|
|
124
|
+
limit,
|
|
125
|
+
},
|
|
126
|
+
});
|
|
127
|
+
return data;
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
updateUBO(update, uboId) {
|
|
131
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
132
|
+
const { data } = yield this.axios.patch(`/api/ubos/${uboId}`, update);
|
|
133
|
+
return data;
|
|
134
|
+
});
|
|
135
|
+
}
|
|
119
136
|
getUBOOnboardingRequirements(country, countryOfOrigin) {
|
|
120
137
|
return __awaiter(this, void 0, void 0, function* () {
|
|
121
138
|
const { data } = yield this.axios.get(`/api/ubos/requirements`, {
|
|
@@ -36,6 +36,7 @@ import { CountryOfOrigin } from "../types/country-of-origin";
|
|
|
36
36
|
import { UserType } from "../types/user-type";
|
|
37
37
|
import { UBOInput } from "../types/UBO-input";
|
|
38
38
|
import { UBO } from "../types/UBO";
|
|
39
|
+
import { UBOUpdate } from "../types/UBO-update";
|
|
39
40
|
export declare class RioClient {
|
|
40
41
|
private axios;
|
|
41
42
|
constructor(axios: AxiosStatic | AxiosInstance);
|
|
@@ -45,7 +46,9 @@ export declare class RioClient {
|
|
|
45
46
|
createQuote(input: QuoteInput): Promise<Quote>;
|
|
46
47
|
createChainedQuote(input: ChainedQuoteInput): Promise<ChainedQuote>;
|
|
47
48
|
getUsers(page: number, limit?: number, query?: UserQuery): Promise<User[]>;
|
|
49
|
+
getUBOS(page: number, limit?: number): Promise<UBO[]>;
|
|
48
50
|
updateUser(update: UserUpdate, userId?: string): Promise<User>;
|
|
51
|
+
updateUBO(update: UBOUpdate, uboId?: string): Promise<UBO>;
|
|
49
52
|
uploadCOI(id: string, formData: FormData): Promise<User>;
|
|
50
53
|
uploadFile(id: string, country: CountryOfOrigin, fileType: KYCFileType, formData: FormData): Promise<User>;
|
|
51
54
|
uploadKYCReport(id: string, formData: FormData): Promise<User>;
|
|
@@ -70,12 +70,29 @@ class RioClient {
|
|
|
70
70
|
return data;
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
|
+
getUBOS(page, limit) {
|
|
74
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
const { data } = yield this.axios.get(`/api/ubos?`, {
|
|
76
|
+
params: {
|
|
77
|
+
page,
|
|
78
|
+
limit,
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
return data;
|
|
82
|
+
});
|
|
83
|
+
}
|
|
73
84
|
updateUser(update, userId) {
|
|
74
85
|
return __awaiter(this, void 0, void 0, function* () {
|
|
75
86
|
const { data } = yield this.axios.patch(`/api/users/${userId || ""}`, update);
|
|
76
87
|
return data;
|
|
77
88
|
});
|
|
78
89
|
}
|
|
90
|
+
updateUBO(update, uboId) {
|
|
91
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
92
|
+
const { data } = yield this.axios.patch(`/api/ubos/${uboId}`, update);
|
|
93
|
+
return data;
|
|
94
|
+
});
|
|
95
|
+
}
|
|
79
96
|
uploadCOI(id, formData) {
|
|
80
97
|
return __awaiter(this, void 0, void 0, function* () {
|
|
81
98
|
const { data } = yield this.axios.post(`/api/users/${id}/coi`, formData);
|
package/build/index.d.ts
CHANGED
|
@@ -209,6 +209,7 @@ export * from "./types/identity-verification-status";
|
|
|
209
209
|
export * from "./types/UBO-onboarding-status";
|
|
210
210
|
export * from "./types/UBO";
|
|
211
211
|
export * from "./types/UBO-input";
|
|
212
|
+
export * from "./types/UBO-update";
|
|
212
213
|
export * from "./classes/Asset";
|
|
213
214
|
export * from "./classes/KYCFieldClass";
|
|
214
215
|
export * from "./classes/KYCFileClass";
|
package/build/index.js
CHANGED
|
@@ -225,6 +225,7 @@ __exportStar(require("./types/identity-verification-status"), exports);
|
|
|
225
225
|
__exportStar(require("./types/UBO-onboarding-status"), exports);
|
|
226
226
|
__exportStar(require("./types/UBO"), exports);
|
|
227
227
|
__exportStar(require("./types/UBO-input"), exports);
|
|
228
|
+
__exportStar(require("./types/UBO-update"), exports);
|
|
228
229
|
__exportStar(require("./classes/Asset"), exports);
|
|
229
230
|
__exportStar(require("./classes/KYCFieldClass"), exports);
|
|
230
231
|
__exportStar(require("./classes/KYCFileClass"), exports);
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { CountryOfOrigin } from "./country-of-origin";
|
|
2
|
+
import { OnboardingStatus } from "./onboarding-status";
|
|
3
|
+
export declare type UBOUpdate = {
|
|
4
|
+
individualData?: {
|
|
5
|
+
firstName?: string;
|
|
6
|
+
middleName?: string;
|
|
7
|
+
lastName?: string;
|
|
8
|
+
secondLastName?: string;
|
|
9
|
+
birthday?: Date;
|
|
10
|
+
countryOfOrigin?: CountryOfOrigin;
|
|
11
|
+
};
|
|
12
|
+
phoneNumber?: string;
|
|
13
|
+
email?: string;
|
|
14
|
+
birthday?: Date;
|
|
15
|
+
associatedUserId?: string;
|
|
16
|
+
onboarding?: {
|
|
17
|
+
[country in CountryOfOrigin]?: {
|
|
18
|
+
status?: OnboardingStatus;
|
|
19
|
+
personalId?: string;
|
|
20
|
+
taxId?: string;
|
|
21
|
+
isResident?: boolean;
|
|
22
|
+
individualIdentityVerification?: {
|
|
23
|
+
status?: "passed" | "failed" | "review";
|
|
24
|
+
};
|
|
25
|
+
files?: {
|
|
26
|
+
certificateOfIncorporation?: string;
|
|
27
|
+
KYCReport?: string;
|
|
28
|
+
taxTranscript?: string;
|
|
29
|
+
proofOfAddress?: string;
|
|
30
|
+
businessRegistration?: string;
|
|
31
|
+
taxIdentificationCertificate?: string;
|
|
32
|
+
legalRepresentativeIdPowerOfAttorney?: string;
|
|
33
|
+
personalIdentificationCertificate?: string;
|
|
34
|
+
extraFiles?: string[];
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
address?: {
|
|
39
|
+
street1?: string;
|
|
40
|
+
street2?: string;
|
|
41
|
+
city?: string;
|
|
42
|
+
state?: string;
|
|
43
|
+
postalCode?: string;
|
|
44
|
+
country?: CountryOfOrigin;
|
|
45
|
+
};
|
|
46
|
+
};
|