@riocrypto/common 1.0.1226 → 1.0.1229

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.
@@ -37,6 +37,7 @@ import { InternalSwap } from "../types/internal-swap";
37
37
  import { BridgeExternalAccountQuery } from "../types/bridge-external-account-query";
38
38
  import { CountryOfOrigin } from "../types/country-of-origin";
39
39
  import { KYCFileType } from "../types/kyc-file-type";
40
+ import { UserType } from "../types/user-type";
40
41
  export declare class RioAdminClient {
41
42
  private axios;
42
43
  constructor(axios: AxiosStatic | AxiosInstance);
@@ -53,6 +54,10 @@ export declare class RioAdminClient {
53
54
  signinAdmin(email: string, password: string, authenticatorCode: string): Promise<any>;
54
55
  updateUser(update: UserUpdate, userId?: string): Promise<User>;
55
56
  uploadCOI(id: string, formData: FormData): Promise<User>;
57
+ getKYCRequirements(userType: UserType, country: Country, countryOfOrigin: CountryOfOrigin): Promise<{
58
+ textRequirements: "personalId" | "taxId"[];
59
+ fileRequirements: KYCFileType[];
60
+ }>;
56
61
  uploadFile(id: string, country: CountryOfOrigin, fileType: KYCFileType, formData: FormData): Promise<User>;
57
62
  uploadKYCReport(id: string, formData: FormData): Promise<User>;
58
63
  uploadCSF(id: string, formData: FormData): Promise<User>;
@@ -91,6 +91,18 @@ class RioAdminClient {
91
91
  return data;
92
92
  });
93
93
  }
94
+ getKYCRequirements(userType, country, countryOfOrigin) {
95
+ return __awaiter(this, void 0, void 0, function* () {
96
+ const { data } = yield this.axios.get(`/api/kyc/requirements`, {
97
+ params: {
98
+ type: userType,
99
+ country,
100
+ countryOfOrigin,
101
+ },
102
+ });
103
+ return data;
104
+ });
105
+ }
94
106
  uploadFile(id, country, fileType, formData) {
95
107
  return __awaiter(this, void 0, void 0, function* () {
96
108
  const { data } = yield this.axios.post(`/api/users/${id}/files/${country}/${fileType}`, formData);
@@ -33,6 +33,7 @@ import { BridgeExternalAccountQuery } from "../types/bridge-external-account-que
33
33
  import { SecurityQuestion } from "../types/security-question";
34
34
  import { KYCFileType } from "../types/kyc-file-type";
35
35
  import { CountryOfOrigin } from "../types/country-of-origin";
36
+ import { UserType } from "../types/user-type";
36
37
  export declare class RioClient {
37
38
  private axios;
38
39
  constructor(axios: AxiosStatic | AxiosInstance);
@@ -48,6 +49,10 @@ export declare class RioClient {
48
49
  uploadKYCReport(id: string, formData: FormData): Promise<User>;
49
50
  uploadCSF(id: string, formData: FormData): Promise<User>;
50
51
  getRioSettings(): Promise<RioSettings>;
52
+ getKYCRequirements(userType: UserType, country: Country, countryOfOrigin: CountryOfOrigin): Promise<{
53
+ textRequirements: "personalId" | "taxId"[];
54
+ fileRequirements: KYCFileType[];
55
+ }>;
51
56
  createRioSettings(rioSettings: {
52
57
  platformFee: number;
53
58
  }): Promise<void>;
@@ -106,6 +106,18 @@ class RioClient {
106
106
  return data;
107
107
  });
108
108
  }
109
+ getKYCRequirements(userType, country, countryOfOrigin) {
110
+ return __awaiter(this, void 0, void 0, function* () {
111
+ const { data } = yield this.axios.get(`/api/kyc/requirements`, {
112
+ params: {
113
+ type: userType,
114
+ country,
115
+ countryOfOrigin,
116
+ },
117
+ });
118
+ return data;
119
+ });
120
+ }
109
121
  createRioSettings(rioSettings) {
110
122
  return __awaiter(this, void 0, void 0, function* () {
111
123
  yield this.axios.post(`/api/settings`, rioSettings);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.1226",
3
+ "version": "1.0.1229",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",