@riocrypto/common 1.0.1259 → 1.0.1261

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.
@@ -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);
@@ -61,6 +62,8 @@ export declare class RioAdminClient {
61
62
  fileRequirements: KYCFileType[];
62
63
  }>;
63
64
  uploadFile(id: string, country: CountryOfOrigin, fileType: KYCFileType, formData: FormData): Promise<User>;
65
+ getUBO(id: string): Promise<UBO>;
66
+ updateUBO(update: UBOUpdate, uboId?: string): Promise<UBO>;
64
67
  getUBOOnboardingRequirements(country: Country, countryOfOrigin: CountryOfOrigin): Promise<{
65
68
  textRequirements: ("personalId" | "taxId")[];
66
69
  fileRequirements: KYCFileType[];
@@ -109,6 +109,19 @@ class RioAdminClient {
109
109
  return data;
110
110
  });
111
111
  }
112
+ getUBO(id) {
113
+ return __awaiter(this, void 0, void 0, function* () {
114
+ let url = `/api/ubos/${id}`;
115
+ const { data } = yield this.axios.get(url);
116
+ return data;
117
+ });
118
+ }
119
+ updateUBO(update, uboId) {
120
+ return __awaiter(this, void 0, void 0, function* () {
121
+ const { data } = yield this.axios.patch(`/api/ubos/${uboId}`, update);
122
+ return data;
123
+ });
124
+ }
112
125
  getUBOOnboardingRequirements(country, countryOfOrigin) {
113
126
  return __awaiter(this, void 0, void 0, function* () {
114
127
  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);
@@ -46,6 +47,7 @@ export declare class RioClient {
46
47
  createChainedQuote(input: ChainedQuoteInput): Promise<ChainedQuote>;
47
48
  getUsers(page: number, limit?: number, query?: UserQuery): Promise<User[]>;
48
49
  updateUser(update: UserUpdate, userId?: string): Promise<User>;
50
+ updateUBO(update: UBOUpdate, uboId?: string): Promise<UBO>;
49
51
  uploadCOI(id: string, formData: FormData): Promise<User>;
50
52
  uploadFile(id: string, country: CountryOfOrigin, fileType: KYCFileType, formData: FormData): Promise<User>;
51
53
  uploadKYCReport(id: string, formData: FormData): Promise<User>;
@@ -73,6 +75,7 @@ export declare class RioClient {
73
75
  deleteAPIKey(id: string): Promise<void>;
74
76
  confirmBankPayout(orderId: string): Promise<any>;
75
77
  getUser(userId?: string): Promise<User>;
78
+ getUBO(id: string): Promise<UBO>;
76
79
  createUser(user: UserInput): Promise<User>;
77
80
  createUBO(user: UBOInput): Promise<UBO>;
78
81
  uploadUBOFile(id: string, country: CountryOfOrigin, fileType: KYCFileType, formData: FormData): Promise<UBO>;
@@ -76,6 +76,12 @@ class RioClient {
76
76
  return data;
77
77
  });
78
78
  }
79
+ updateUBO(update, uboId) {
80
+ return __awaiter(this, void 0, void 0, function* () {
81
+ const { data } = yield this.axios.patch(`/api/ubos/${uboId}`, update);
82
+ return data;
83
+ });
84
+ }
79
85
  uploadCOI(id, formData) {
80
86
  return __awaiter(this, void 0, void 0, function* () {
81
87
  const { data } = yield this.axios.post(`/api/users/${id}/coi`, formData);
@@ -193,6 +199,13 @@ class RioClient {
193
199
  return data;
194
200
  });
195
201
  }
202
+ getUBO(id) {
203
+ return __awaiter(this, void 0, void 0, function* () {
204
+ let url = `/api/ubos/${id}`;
205
+ const { data } = yield this.axios.get(url);
206
+ return data;
207
+ });
208
+ }
196
209
  createUser(user) {
197
210
  return __awaiter(this, void 0, void 0, function* () {
198
211
  const { data } = yield this.axios.post("/api/users", user);
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
+ };
@@ -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.1259",
3
+ "version": "1.0.1261",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",