@riocrypto/common 1.0.659 → 1.0.661
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.
|
@@ -32,6 +32,7 @@ export declare class RioAdminClient {
|
|
|
32
32
|
updateUser(update: UserUpdate, userId?: string): Promise<User>;
|
|
33
33
|
uploadBusinessCOI(id: string, formData: FormData): Promise<User>;
|
|
34
34
|
uploadBusinessKYCReport(id: string, formData: FormData): Promise<User>;
|
|
35
|
+
createVerificationLink(userId: string, firstName: string, lastName: string): Promise<string>;
|
|
35
36
|
updateAdmin(update: {
|
|
36
37
|
email?: string;
|
|
37
38
|
password?: string;
|
|
@@ -85,6 +85,16 @@ class RioAdminClient {
|
|
|
85
85
|
return data;
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
|
+
createVerificationLink(userId, firstName, lastName) {
|
|
89
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
const { data } = yield this.axios.post("/api/kyc/link", {
|
|
91
|
+
userId,
|
|
92
|
+
firstName,
|
|
93
|
+
lastName,
|
|
94
|
+
});
|
|
95
|
+
return data.link;
|
|
96
|
+
});
|
|
97
|
+
}
|
|
88
98
|
updateAdmin(update) {
|
|
89
99
|
return __awaiter(this, void 0, void 0, function* () {
|
|
90
100
|
const { data } = yield this.axios.patch(`/api/auth/admin`, update);
|
package/build/index.d.ts
CHANGED
package/build/index.js
CHANGED
|
@@ -154,4 +154,3 @@ __exportStar(require("./helpers/validate-address"), exports);
|
|
|
154
154
|
__exportStar(require("./helpers/round-down-to-two-decimal-places"), exports);
|
|
155
155
|
__exportStar(require("./clients/rio-client"), exports);
|
|
156
156
|
__exportStar(require("./clients/rio-admin-client"), exports);
|
|
157
|
-
__exportStar(require("./clients/aiprise-client"), exports);
|
package/package.json
CHANGED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.AiPriseClient = void 0;
|
|
16
|
-
const axios_1 = __importDefault(require("axios"));
|
|
17
|
-
class AiPriseClient {
|
|
18
|
-
constructor() { }
|
|
19
|
-
createVerificationLink(userId, firstName, lastName) {
|
|
20
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const response = yield axios_1.default.post("https://api.aiprise.com/api/v1/verify/get_user_verification_url", {
|
|
22
|
-
template_id: "15cd1203-5c60-470b-8cbc-4d806433c7b7",
|
|
23
|
-
"client-reference-id": userId,
|
|
24
|
-
"user-data": {
|
|
25
|
-
first_name: firstName,
|
|
26
|
-
last_name: lastName,
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
return response.data.verification_url;
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.AiPriseClient = AiPriseClient;
|