@riocrypto/common 1.0.1555 → 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.
- package/build/helpers/humanize-admin-auth-role.d.ts +2 -0
- package/build/helpers/humanize-admin-auth-role.js +17 -0
- package/build/helpers/humanize-auth-role.d.ts +2 -0
- package/build/helpers/humanize-auth-role.js +17 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +2 -0
- package/build/types/admin-auth-role.d.ts +2 -2
- package/build/types/admin-auth-role.js +2 -2
- package/package.json +1 -1
|
@@ -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,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);
|
|
@@ -4,6 +4,6 @@ exports.AdminAuthRole = void 0;
|
|
|
4
4
|
var AdminAuthRole;
|
|
5
5
|
(function (AdminAuthRole) {
|
|
6
6
|
AdminAuthRole["SuperAdmin"] = "superAdmin";
|
|
7
|
-
AdminAuthRole["
|
|
8
|
-
AdminAuthRole["
|
|
7
|
+
AdminAuthRole["CreateAndModify"] = "createAndModify";
|
|
8
|
+
AdminAuthRole["ViewOnly"] = "viewOnly";
|
|
9
9
|
})(AdminAuthRole = exports.AdminAuthRole || (exports.AdminAuthRole = {}));
|