@riocrypto/common 1.0.2503 → 1.0.2504

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.
package/build/index.d.ts CHANGED
@@ -336,6 +336,7 @@ export * from "./types/kyc-file-index";
336
336
  export * from "./types/identity-verification-status";
337
337
  export * from "./types/immigration-status";
338
338
  export * from "./types/auth-role";
339
+ export * from "./types/auth-method";
339
340
  export * from "./types/address-verification-status";
340
341
  export * from "./types/bank-account-verification-status";
341
342
  export * from "./types/rio-bank-account";
package/build/index.js CHANGED
@@ -352,6 +352,7 @@ __exportStar(require("./types/kyc-file-index"), exports);
352
352
  __exportStar(require("./types/identity-verification-status"), exports);
353
353
  __exportStar(require("./types/immigration-status"), exports);
354
354
  __exportStar(require("./types/auth-role"), exports);
355
+ __exportStar(require("./types/auth-method"), exports);
355
356
  __exportStar(require("./types/address-verification-status"), exports);
356
357
  __exportStar(require("./types/bank-account-verification-status"), exports);
357
358
  __exportStar(require("./types/rio-bank-account"), exports);
@@ -0,0 +1,4 @@
1
+ export declare enum AuthMethod {
2
+ Phone = "phone",
3
+ Email = "email"
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuthMethod = void 0;
4
+ var AuthMethod;
5
+ (function (AuthMethod) {
6
+ AuthMethod["Phone"] = "phone";
7
+ AuthMethod["Email"] = "email";
8
+ })(AuthMethod = exports.AuthMethod || (exports.AuthMethod = {}));
@@ -1,5 +1,10 @@
1
1
  export interface AuthPayload {
2
2
  id: string;
3
- phoneNumber: string;
3
+ phoneNumber?: string;
4
+ email?: string;
4
5
  tokenVersion?: number;
5
6
  }
7
+ export interface AuthMissing2FAPayload {
8
+ id: string;
9
+ requires2FA: boolean;
10
+ }
@@ -1,4 +1,5 @@
1
1
  import { APIKey } from "./api-key";
2
+ import { AuthMethod } from "./auth-method";
2
3
  import { AuthPermission } from "./auth-permission";
3
4
  import { AuthRole } from "./auth-role";
4
5
  import { SecurityQuestion } from "./security-question";
@@ -31,4 +32,5 @@ export interface Auth {
31
32
  secondLastName?: string;
32
33
  role?: AuthRole;
33
34
  permissions?: AuthPermission[];
35
+ authMethod?: AuthMethod;
34
36
  }
@@ -4,6 +4,7 @@ export declare enum AuthorizationType {
4
4
  User = "user",
5
5
  AdminAuth = "adminAuth",
6
6
  Auth = "auth",
7
+ AuthMissing2FA = "authMissing2FA",
7
8
  Cluster = "cluster",
8
9
  Public = "public"
9
10
  }
@@ -8,6 +8,7 @@ var AuthorizationType;
8
8
  AuthorizationType["User"] = "user";
9
9
  AuthorizationType["AdminAuth"] = "adminAuth";
10
10
  AuthorizationType["Auth"] = "auth";
11
+ AuthorizationType["AuthMissing2FA"] = "authMissing2FA";
11
12
  AuthorizationType["Cluster"] = "cluster";
12
13
  AuthorizationType["Public"] = "public";
13
14
  })(AuthorizationType = exports.AuthorizationType || (exports.AuthorizationType = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.2503",
3
+ "version": "1.0.2504",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",