@riocrypto/common 1.0.1556 → 1.0.1558

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.
@@ -0,0 +1,2 @@
1
+ import { AdminAuthRole } from "../types/admin-auth-role";
2
+ export declare const humanizeAdminAuthRole: (role: AdminAuthRole) => string;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.humanizeAdminAuthRole = void 0;
4
+ const admin_auth_role_1 = require("../types/admin-auth-role");
5
+ const humanizeAdminAuthRole = (role) => {
6
+ switch (role) {
7
+ case admin_auth_role_1.AdminAuthRole.ViewOnly:
8
+ return "View only";
9
+ case admin_auth_role_1.AdminAuthRole.CreateAndModify:
10
+ return "Create and modify";
11
+ case admin_auth_role_1.AdminAuthRole.SuperAdmin:
12
+ return "Super admin";
13
+ default:
14
+ return "Unknown";
15
+ }
16
+ };
17
+ exports.humanizeAdminAuthRole = humanizeAdminAuthRole;
@@ -0,0 +1,2 @@
1
+ import { AuthRole } from "../types/auth-role";
2
+ export declare const humanizeAuthRole: (role: AuthRole) => string;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.humanizeAuthRole = void 0;
4
+ const auth_role_1 = require("../types/auth-role");
5
+ const humanizeAuthRole = (role) => {
6
+ switch (role) {
7
+ case auth_role_1.AuthRole.ViewOnly:
8
+ return "View only";
9
+ case auth_role_1.AuthRole.CreateAndModify:
10
+ return "Create and modify";
11
+ case auth_role_1.AuthRole.Owner:
12
+ return "Owner";
13
+ default:
14
+ return "Unknown";
15
+ }
16
+ };
17
+ exports.humanizeAuthRole = humanizeAuthRole;
package/build/index.d.ts CHANGED
@@ -283,6 +283,8 @@ export * from "./helpers/get-auth-name";
283
283
  export * from "./helpers/validate-individual-name";
284
284
  export * from "./helpers/validate-business-name";
285
285
  export * from "./helpers/get-address-for-testing";
286
+ export * from "./helpers/humanize-admin-auth-role";
287
+ export * from "./helpers/humanize-auth-role";
286
288
  export * from "./clients/rio-client";
287
289
  export * from "./clients/rio-admin-client";
288
290
  export * from "./constants/mexico-fiscal-regimens";
package/build/index.js CHANGED
@@ -299,6 +299,8 @@ __exportStar(require("./helpers/get-auth-name"), exports);
299
299
  __exportStar(require("./helpers/validate-individual-name"), exports);
300
300
  __exportStar(require("./helpers/validate-business-name"), exports);
301
301
  __exportStar(require("./helpers/get-address-for-testing"), exports);
302
+ __exportStar(require("./helpers/humanize-admin-auth-role"), exports);
303
+ __exportStar(require("./helpers/humanize-auth-role"), exports);
302
304
  __exportStar(require("./clients/rio-client"), exports);
303
305
  __exportStar(require("./clients/rio-admin-client"), exports);
304
306
  __exportStar(require("./constants/mexico-fiscal-regimens"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.1556",
3
+ "version": "1.0.1558",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",