@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
@@ -138,4 +138,3 @@ export * from "./helpers/validate-address";
138
138
  export * from "./helpers/round-down-to-two-decimal-places";
139
139
  export * from "./clients/rio-client";
140
140
  export * from "./clients/rio-admin-client";
141
- export * from "./clients/aiprise-client";
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.659",
3
+ "version": "1.0.661",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -1,4 +0,0 @@
1
- export declare class AiPriseClient {
2
- constructor();
3
- createVerificationLink(userId: string, firstName: string, lastName: string): Promise<string>;
4
- }
@@ -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;