evo360-types 1.3.807 → 1.3.809
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/dist/apps/evo-core/zod-schemas.d.ts +7 -0
- package/dist/apps/evo-core/zod-schemas.js +6 -1
- package/dist/apps/evo-core/zod-schemas.ts +6 -0
- package/dist/types/evo-core/rbac/index.d.ts +23 -0
- package/dist/types/evo-core/rbac/index.js +16 -1
- package/dist/types/evo-core/rbac/index.ts +31 -0
- package/package.json +1 -1
|
@@ -16,6 +16,10 @@ export declare const zActionArgsSchema: z.ZodObject<{
|
|
|
16
16
|
* Schema for RbacPermValue (tri-state permission value)
|
|
17
17
|
*/
|
|
18
18
|
export declare const zRbacPermValueSchema: z.ZodEnum<["allow", "deny", "forbid"]>;
|
|
19
|
+
/**
|
|
20
|
+
* Schema for PermOverrideValue (per-user override, feat-345)
|
|
21
|
+
*/
|
|
22
|
+
export declare const zPermOverrideValueSchema: z.ZodEnum<["allow", "forbid"]>;
|
|
19
23
|
/**
|
|
20
24
|
* Schema for TenantUserStatus
|
|
21
25
|
*/
|
|
@@ -41,6 +45,7 @@ export declare const zTenantUserSchema: z.ZodObject<{
|
|
|
41
45
|
status: z.ZodEnum<["active", "invited", "disabled", "removed"]>;
|
|
42
46
|
roles: z.ZodArray<z.ZodString, "many">;
|
|
43
47
|
perms: z.ZodRecord<z.ZodString, z.ZodBoolean>;
|
|
48
|
+
perm_overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["allow", "forbid"]>>>;
|
|
44
49
|
picture_url: z.ZodOptional<z.ZodString>;
|
|
45
50
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
46
51
|
id: z.ZodString;
|
|
@@ -55,6 +60,7 @@ export declare const zTenantUserSchema: z.ZodObject<{
|
|
|
55
60
|
status: z.ZodEnum<["active", "invited", "disabled", "removed"]>;
|
|
56
61
|
roles: z.ZodArray<z.ZodString, "many">;
|
|
57
62
|
perms: z.ZodRecord<z.ZodString, z.ZodBoolean>;
|
|
63
|
+
perm_overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["allow", "forbid"]>>>;
|
|
58
64
|
picture_url: z.ZodOptional<z.ZodString>;
|
|
59
65
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
60
66
|
id: z.ZodString;
|
|
@@ -69,6 +75,7 @@ export declare const zTenantUserSchema: z.ZodObject<{
|
|
|
69
75
|
status: z.ZodEnum<["active", "invited", "disabled", "removed"]>;
|
|
70
76
|
roles: z.ZodArray<z.ZodString, "many">;
|
|
71
77
|
perms: z.ZodRecord<z.ZodString, z.ZodBoolean>;
|
|
78
|
+
perm_overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["allow", "forbid"]>>>;
|
|
72
79
|
picture_url: z.ZodOptional<z.ZodString>;
|
|
73
80
|
}, z.ZodTypeAny, "passthrough">>;
|
|
74
81
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.zNexusClaimsSchema = exports.zNexusModulesSchema = exports.zNexusModuleToolsPermissionsSchema = exports.zNexusModuleFinancePermissionsSchema = exports.zNexusModuleChatPermissionsSchema = exports.zRbacGroupSchema = exports.zRbacPermissionMetadataSchema = exports.zRbacRoleSchema = exports.zRbacRolePermsSchema = exports.zUserTenantIndexSchema = exports.zTenantUserSchema = exports.zUserTenantIndexStatusSchema = exports.zTenantUserStatusSchema = exports.zRbacPermValueSchema = exports.zActionArgsSchema = void 0;
|
|
3
|
+
exports.zNexusClaimsSchema = exports.zNexusModulesSchema = exports.zNexusModuleToolsPermissionsSchema = exports.zNexusModuleFinancePermissionsSchema = exports.zNexusModuleChatPermissionsSchema = exports.zRbacGroupSchema = exports.zRbacPermissionMetadataSchema = exports.zRbacRoleSchema = exports.zRbacRolePermsSchema = exports.zUserTenantIndexSchema = exports.zTenantUserSchema = exports.zUserTenantIndexStatusSchema = exports.zTenantUserStatusSchema = exports.zPermOverrideValueSchema = exports.zRbacPermValueSchema = exports.zActionArgsSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const zod_schemas_1 = require("../shared/zod-schemas");
|
|
6
6
|
const zod_schemas_2 = require("../evo-tenant/zod-schemas");
|
|
@@ -14,6 +14,10 @@ exports.zActionArgsSchema = zod_1.z.object({
|
|
|
14
14
|
* Schema for RbacPermValue (tri-state permission value)
|
|
15
15
|
*/
|
|
16
16
|
exports.zRbacPermValueSchema = zod_1.z.enum(["allow", "deny", "forbid"]);
|
|
17
|
+
/**
|
|
18
|
+
* Schema for PermOverrideValue (per-user override, feat-345)
|
|
19
|
+
*/
|
|
20
|
+
exports.zPermOverrideValueSchema = zod_1.z.enum(["allow", "forbid"]);
|
|
17
21
|
/**
|
|
18
22
|
* Schema for TenantUserStatus
|
|
19
23
|
*/
|
|
@@ -41,6 +45,7 @@ exports.zTenantUserSchema = zod_schemas_1.zFireDocSchema
|
|
|
41
45
|
status: exports.zTenantUserStatusSchema,
|
|
42
46
|
roles: zod_1.z.array(zod_1.z.string()),
|
|
43
47
|
perms: zod_1.z.record(zod_1.z.boolean()),
|
|
48
|
+
perm_overrides: zod_1.z.record(exports.zPermOverrideValueSchema).optional(),
|
|
44
49
|
picture_url: zod_1.z.string().optional(),
|
|
45
50
|
})
|
|
46
51
|
.passthrough();
|
|
@@ -15,6 +15,11 @@ export const zActionArgsSchema = z.object({
|
|
|
15
15
|
*/
|
|
16
16
|
export const zRbacPermValueSchema = z.enum(["allow", "deny", "forbid"]);
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Schema for PermOverrideValue (per-user override, feat-345)
|
|
20
|
+
*/
|
|
21
|
+
export const zPermOverrideValueSchema = z.enum(["allow", "forbid"]);
|
|
22
|
+
|
|
18
23
|
/**
|
|
19
24
|
* Schema for TenantUserStatus
|
|
20
25
|
*/
|
|
@@ -44,6 +49,7 @@ export const zTenantUserSchema = zFireDocSchema
|
|
|
44
49
|
status: zTenantUserStatusSchema,
|
|
45
50
|
roles: z.array(z.string()),
|
|
46
51
|
perms: z.record(z.boolean()),
|
|
52
|
+
perm_overrides: z.record(zPermOverrideValueSchema).optional(),
|
|
47
53
|
picture_url: z.string().optional(),
|
|
48
54
|
})
|
|
49
55
|
.passthrough();
|
|
@@ -21,6 +21,19 @@ export declare const RbacPermValueEnum: {
|
|
|
21
21
|
readonly Forbid: "forbid";
|
|
22
22
|
};
|
|
23
23
|
export type RbacPermValue = (typeof RbacPermValueEnum)[keyof typeof RbacPermValueEnum];
|
|
24
|
+
/**
|
|
25
|
+
* Per-user permission override value (feat-345).
|
|
26
|
+
* Applied by the materializer AFTER the roles:
|
|
27
|
+
* - 'allow': the permission is granted even if no role grants it
|
|
28
|
+
* - 'forbid': the permission is removed even if a role grants it
|
|
29
|
+
* Absent key = inherit from roles (there is no 'deny' here).
|
|
30
|
+
*/
|
|
31
|
+
export declare const PermOverrideValueEnum: {
|
|
32
|
+
readonly Allow: "allow";
|
|
33
|
+
readonly Forbid: "forbid";
|
|
34
|
+
};
|
|
35
|
+
export type PermOverrideValue = Extract<RbacPermValue, (typeof PermOverrideValueEnum)[keyof typeof PermOverrideValueEnum]>;
|
|
36
|
+
export declare const PERM_OVERRIDE_VALUES: readonly PermOverrideValue[];
|
|
24
37
|
/**
|
|
25
38
|
* Membership status for a user in a tenant.
|
|
26
39
|
*/
|
|
@@ -71,6 +84,16 @@ export interface ITenantUser extends IFireDoc {
|
|
|
71
84
|
perms: {
|
|
72
85
|
[permissionKey: string]: boolean;
|
|
73
86
|
};
|
|
87
|
+
/**
|
|
88
|
+
* Per-user permission overrides (feat-345). INPUT field, next to `roles`:
|
|
89
|
+
* the materializer applies them on top of the roles and writes the result
|
|
90
|
+
* into `perms`, so they survive every recompute. Only the
|
|
91
|
+
* `core_tenant_users-setPermOverrides` callable writes this field.
|
|
92
|
+
* Absent = `{}`.
|
|
93
|
+
*/
|
|
94
|
+
perm_overrides?: {
|
|
95
|
+
[permissionKey: string]: PermOverrideValue;
|
|
96
|
+
};
|
|
74
97
|
/**
|
|
75
98
|
* User picture URL.
|
|
76
99
|
*/
|
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.UserTenantIndexStatusEnum = exports.TenantUserStatusEnum = exports.RbacPermValueEnum = exports.CoreRbacPermissions = void 0;
|
|
17
|
+
exports.UserTenantIndexStatusEnum = exports.TenantUserStatusEnum = exports.PERM_OVERRIDE_VALUES = exports.PermOverrideValueEnum = exports.RbacPermValueEnum = exports.CoreRbacPermissions = void 0;
|
|
18
18
|
__exportStar(require("./fb_collections"), exports);
|
|
19
19
|
// Permissões para o core rbac
|
|
20
20
|
exports.CoreRbacPermissions = {
|
|
@@ -36,6 +36,21 @@ exports.RbacPermValueEnum = {
|
|
|
36
36
|
Deny: "deny",
|
|
37
37
|
Forbid: "forbid",
|
|
38
38
|
};
|
|
39
|
+
/**
|
|
40
|
+
* Per-user permission override value (feat-345).
|
|
41
|
+
* Applied by the materializer AFTER the roles:
|
|
42
|
+
* - 'allow': the permission is granted even if no role grants it
|
|
43
|
+
* - 'forbid': the permission is removed even if a role grants it
|
|
44
|
+
* Absent key = inherit from roles (there is no 'deny' here).
|
|
45
|
+
*/
|
|
46
|
+
exports.PermOverrideValueEnum = {
|
|
47
|
+
Allow: "allow",
|
|
48
|
+
Forbid: "forbid",
|
|
49
|
+
};
|
|
50
|
+
exports.PERM_OVERRIDE_VALUES = [
|
|
51
|
+
exports.PermOverrideValueEnum.Allow,
|
|
52
|
+
exports.PermOverrideValueEnum.Forbid,
|
|
53
|
+
];
|
|
39
54
|
/**
|
|
40
55
|
* Membership status for a user in a tenant.
|
|
41
56
|
*/
|
|
@@ -30,6 +30,26 @@ export const RbacPermValueEnum = {
|
|
|
30
30
|
export type RbacPermValue =
|
|
31
31
|
(typeof RbacPermValueEnum)[keyof typeof RbacPermValueEnum];
|
|
32
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Per-user permission override value (feat-345).
|
|
35
|
+
* Applied by the materializer AFTER the roles:
|
|
36
|
+
* - 'allow': the permission is granted even if no role grants it
|
|
37
|
+
* - 'forbid': the permission is removed even if a role grants it
|
|
38
|
+
* Absent key = inherit from roles (there is no 'deny' here).
|
|
39
|
+
*/
|
|
40
|
+
export const PermOverrideValueEnum = {
|
|
41
|
+
Allow: "allow",
|
|
42
|
+
Forbid: "forbid",
|
|
43
|
+
} as const;
|
|
44
|
+
export type PermOverrideValue = Extract<
|
|
45
|
+
RbacPermValue,
|
|
46
|
+
(typeof PermOverrideValueEnum)[keyof typeof PermOverrideValueEnum]
|
|
47
|
+
>;
|
|
48
|
+
export const PERM_OVERRIDE_VALUES: readonly PermOverrideValue[] = [
|
|
49
|
+
PermOverrideValueEnum.Allow,
|
|
50
|
+
PermOverrideValueEnum.Forbid,
|
|
51
|
+
] as const;
|
|
52
|
+
|
|
33
53
|
/**
|
|
34
54
|
* Membership status for a user in a tenant.
|
|
35
55
|
*/
|
|
@@ -91,6 +111,17 @@ export interface ITenantUser extends IFireDoc {
|
|
|
91
111
|
[permissionKey: string]: boolean;
|
|
92
112
|
};
|
|
93
113
|
|
|
114
|
+
/**
|
|
115
|
+
* Per-user permission overrides (feat-345). INPUT field, next to `roles`:
|
|
116
|
+
* the materializer applies them on top of the roles and writes the result
|
|
117
|
+
* into `perms`, so they survive every recompute. Only the
|
|
118
|
+
* `core_tenant_users-setPermOverrides` callable writes this field.
|
|
119
|
+
* Absent = `{}`.
|
|
120
|
+
*/
|
|
121
|
+
perm_overrides?: {
|
|
122
|
+
[permissionKey: string]: PermOverrideValue;
|
|
123
|
+
};
|
|
124
|
+
|
|
94
125
|
/**
|
|
95
126
|
* User picture URL.
|
|
96
127
|
*/
|