@riocrypto/common-server 1.0.1504 → 1.0.1506

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.
@@ -4,6 +4,7 @@ declare class AiPriseClient {
4
4
  baseUrl: string;
5
5
  constructor(apiKey: string, decafApiKey: string);
6
6
  createVerificationLink(userId: string, firstName: string, lastName: string, metadata?: Object): Promise<string>;
7
+ createVerificationLinkWithoutName(): Promise<string>;
7
8
  getVerificationResult(sessionId: string, partner?: "decaf"): Promise<any>;
8
9
  private getCallbackUrl;
9
10
  private getRedirectUrl;
@@ -68,6 +68,16 @@ class AiPriseClient {
68
68
  return response.data.verification_url;
69
69
  });
70
70
  }
71
+ createVerificationLinkWithoutName() {
72
+ return __awaiter(this, void 0, void 0, function* () {
73
+ const response = yield axios_1.default.post(`https://${this.baseUrl}.aiprise.com/api/v1/verify/get_user_verification_url`, undefined, {
74
+ headers: {
75
+ "X-API-KEY": this.apiKey,
76
+ },
77
+ });
78
+ return response.data.verification_url;
79
+ });
80
+ }
71
81
  getVerificationResult(sessionId, partner) {
72
82
  return __awaiter(this, void 0, void 0, function* () {
73
83
  const apiKey = partner === "decaf" ? this.decafApiKey : this.apiKey;
@@ -23,7 +23,7 @@ const requireMinAdminRole = (req, res, next, minRole) => __awaiter(void 0, void
23
23
  adminRoleOrder.indexOf(minRole)) {
24
24
  throw new common_1.GenericInputError(`Insufficient permissions. This endpoint requires at least the ${minRole} role. Contact Javier to change your access role.`);
25
25
  }
26
- next();
27
26
  }
27
+ next();
28
28
  });
29
29
  exports.requireMinAdminRole = requireMinAdminRole;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1504",
3
+ "version": "1.0.1506",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",