@develit-services/rbac 0.6.1 → 0.7.0
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/export/worker.cjs +26 -0
- package/dist/export/worker.d.cts +2 -1
- package/dist/export/worker.d.mts +2 -1
- package/dist/export/worker.d.ts +2 -1
- package/dist/export/worker.mjs +26 -0
- package/dist/shared/{rbac.pzUpSmwr.d.mts → rbac.CSHPMf7E.d.mts} +11 -2
- package/dist/shared/{rbac.zvG5RbZL.d.ts → rbac.CkCfjtKu.d.ts} +11 -2
- package/dist/shared/{rbac.Pu6JbQGr.d.cts → rbac.DypKJ7qb.d.cts} +11 -2
- package/dist/types.d.cts +1 -1
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +2 -2
package/dist/export/worker.cjs
CHANGED
|
@@ -181,6 +181,16 @@ const getAllRolesQuery = async ({
|
|
|
181
181
|
return result;
|
|
182
182
|
};
|
|
183
183
|
|
|
184
|
+
const getAllUserRolesQuery = async ({
|
|
185
|
+
db
|
|
186
|
+
}) => {
|
|
187
|
+
return await db.select({
|
|
188
|
+
userId: tables.userRole.userId,
|
|
189
|
+
roleId: tables.role.id,
|
|
190
|
+
roleName: tables.role.name
|
|
191
|
+
}).from(tables.userRole).leftJoin(tables.role, drizzleOrm.eq(tables.role.id, tables.userRole.roleId));
|
|
192
|
+
};
|
|
193
|
+
|
|
184
194
|
const getRoleQuery = async ({
|
|
185
195
|
db,
|
|
186
196
|
roleId
|
|
@@ -590,6 +600,19 @@ let RbacServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
|
|
|
590
600
|
}
|
|
591
601
|
);
|
|
592
602
|
}
|
|
603
|
+
async getAllUserRoles() {
|
|
604
|
+
return this.handleAction(
|
|
605
|
+
null,
|
|
606
|
+
{ successMessage: "User roles successfully returned." },
|
|
607
|
+
async () => {
|
|
608
|
+
const userRoles = await getAllUserRolesQuery({ db: this.db });
|
|
609
|
+
return {
|
|
610
|
+
userRoles,
|
|
611
|
+
count: userRoles.length
|
|
612
|
+
};
|
|
613
|
+
}
|
|
614
|
+
);
|
|
615
|
+
}
|
|
593
616
|
async getPermissions() {
|
|
594
617
|
return this.handleAction(
|
|
595
618
|
null,
|
|
@@ -834,6 +857,9 @@ __decorateClass([
|
|
|
834
857
|
__decorateClass([
|
|
835
858
|
backendSdk.action("revokeScopeFromRole")
|
|
836
859
|
], RbacServiceBase.prototype, "revokeScopeFromRole", 1);
|
|
860
|
+
__decorateClass([
|
|
861
|
+
backendSdk.action("getAllUserRoles")
|
|
862
|
+
], RbacServiceBase.prototype, "getAllUserRoles", 1);
|
|
837
863
|
__decorateClass([
|
|
838
864
|
backendSdk.action("getPermissions")
|
|
839
865
|
], RbacServiceBase.prototype, "getPermissions", 1);
|
package/dist/export/worker.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
2
2
|
import { IRPCResponse } from '@develit-io/backend-sdk';
|
|
3
|
-
import { L as LabeledScope$1, t as tables, C as CreateRoleInput, a as CreateRoleOutput, A as AssignRoleToUserInput, b as AssignRoleToUserOutput, c as AssignRolesToUserInput, d as AssignRolesToUserOutput, R as RevokeRoleFromUserInput, e as RevokeRoleFromUserOutput, G as GrantScopeToUserInput, f as GrantScopeToUserOutput, g as GrantScopesToUserInput, h as GrantScopesToUserOutput, i as RevokeScopeFromUserInput, j as RevokeScopeFromUserOutput, k as GrantScopeToRoleInput, l as GrantScopeToRoleOutput, m as RevokeScopeFromRoleInput, n as RevokeScopeFromRoleOutput, o as
|
|
3
|
+
import { L as LabeledScope$1, t as tables, C as CreateRoleInput, a as CreateRoleOutput, A as AssignRoleToUserInput, b as AssignRoleToUserOutput, c as AssignRolesToUserInput, d as AssignRolesToUserOutput, R as RevokeRoleFromUserInput, e as RevokeRoleFromUserOutput, G as GrantScopeToUserInput, f as GrantScopeToUserOutput, g as GrantScopesToUserInput, h as GrantScopesToUserOutput, i as RevokeScopeFromUserInput, j as RevokeScopeFromUserOutput, k as GrantScopeToRoleInput, l as GrantScopeToRoleOutput, m as RevokeScopeFromRoleInput, n as RevokeScopeFromRoleOutput, o as GetAllUserRolesOutput, p as GetPermissionsOutput, q as GetUserPermissionsInput, r as GetUserPermissionsOutput, V as VerifyAccessInput, s as VerifyAccessOutput, D as DeleteRoleInput, u as DeleteRoleOutput, U as UpdateRoleInput, v as UpdateRoleOutput } from '../shared/rbac.DypKJ7qb.cjs';
|
|
4
4
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
5
5
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
6
6
|
import 'zod';
|
|
@@ -33,6 +33,7 @@ declare class RbacServiceBase<TScopes extends readonly LabeledScope$1[] = Labele
|
|
|
33
33
|
revokeScopeFromUser(input: RevokeScopeFromUserInput): Promise<IRPCResponse<RevokeScopeFromUserOutput>>;
|
|
34
34
|
grantScopeToRole(input: GrantScopeToRoleInput): Promise<IRPCResponse<GrantScopeToRoleOutput>>;
|
|
35
35
|
revokeScopeFromRole(input: RevokeScopeFromRoleInput): Promise<IRPCResponse<RevokeScopeFromRoleOutput>>;
|
|
36
|
+
getAllUserRoles(): Promise<IRPCResponse<GetAllUserRolesOutput>>;
|
|
36
37
|
getPermissions(): Promise<IRPCResponse<GetPermissionsOutput>>;
|
|
37
38
|
getUserPermissions(input: GetUserPermissionsInput): Promise<IRPCResponse<GetUserPermissionsOutput>>;
|
|
38
39
|
verifyAccess(input: Omit<VerifyAccessInput, 'accessRequests'> & {
|
package/dist/export/worker.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
2
2
|
import { IRPCResponse } from '@develit-io/backend-sdk';
|
|
3
|
-
import { L as LabeledScope$1, t as tables, C as CreateRoleInput, a as CreateRoleOutput, A as AssignRoleToUserInput, b as AssignRoleToUserOutput, c as AssignRolesToUserInput, d as AssignRolesToUserOutput, R as RevokeRoleFromUserInput, e as RevokeRoleFromUserOutput, G as GrantScopeToUserInput, f as GrantScopeToUserOutput, g as GrantScopesToUserInput, h as GrantScopesToUserOutput, i as RevokeScopeFromUserInput, j as RevokeScopeFromUserOutput, k as GrantScopeToRoleInput, l as GrantScopeToRoleOutput, m as RevokeScopeFromRoleInput, n as RevokeScopeFromRoleOutput, o as
|
|
3
|
+
import { L as LabeledScope$1, t as tables, C as CreateRoleInput, a as CreateRoleOutput, A as AssignRoleToUserInput, b as AssignRoleToUserOutput, c as AssignRolesToUserInput, d as AssignRolesToUserOutput, R as RevokeRoleFromUserInput, e as RevokeRoleFromUserOutput, G as GrantScopeToUserInput, f as GrantScopeToUserOutput, g as GrantScopesToUserInput, h as GrantScopesToUserOutput, i as RevokeScopeFromUserInput, j as RevokeScopeFromUserOutput, k as GrantScopeToRoleInput, l as GrantScopeToRoleOutput, m as RevokeScopeFromRoleInput, n as RevokeScopeFromRoleOutput, o as GetAllUserRolesOutput, p as GetPermissionsOutput, q as GetUserPermissionsInput, r as GetUserPermissionsOutput, V as VerifyAccessInput, s as VerifyAccessOutput, D as DeleteRoleInput, u as DeleteRoleOutput, U as UpdateRoleInput, v as UpdateRoleOutput } from '../shared/rbac.CSHPMf7E.mjs';
|
|
4
4
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
5
5
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
6
6
|
import 'zod';
|
|
@@ -33,6 +33,7 @@ declare class RbacServiceBase<TScopes extends readonly LabeledScope$1[] = Labele
|
|
|
33
33
|
revokeScopeFromUser(input: RevokeScopeFromUserInput): Promise<IRPCResponse<RevokeScopeFromUserOutput>>;
|
|
34
34
|
grantScopeToRole(input: GrantScopeToRoleInput): Promise<IRPCResponse<GrantScopeToRoleOutput>>;
|
|
35
35
|
revokeScopeFromRole(input: RevokeScopeFromRoleInput): Promise<IRPCResponse<RevokeScopeFromRoleOutput>>;
|
|
36
|
+
getAllUserRoles(): Promise<IRPCResponse<GetAllUserRolesOutput>>;
|
|
36
37
|
getPermissions(): Promise<IRPCResponse<GetPermissionsOutput>>;
|
|
37
38
|
getUserPermissions(input: GetUserPermissionsInput): Promise<IRPCResponse<GetUserPermissionsOutput>>;
|
|
38
39
|
verifyAccess(input: Omit<VerifyAccessInput, 'accessRequests'> & {
|
package/dist/export/worker.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
2
2
|
import { IRPCResponse } from '@develit-io/backend-sdk';
|
|
3
|
-
import { L as LabeledScope$1, t as tables, C as CreateRoleInput, a as CreateRoleOutput, A as AssignRoleToUserInput, b as AssignRoleToUserOutput, c as AssignRolesToUserInput, d as AssignRolesToUserOutput, R as RevokeRoleFromUserInput, e as RevokeRoleFromUserOutput, G as GrantScopeToUserInput, f as GrantScopeToUserOutput, g as GrantScopesToUserInput, h as GrantScopesToUserOutput, i as RevokeScopeFromUserInput, j as RevokeScopeFromUserOutput, k as GrantScopeToRoleInput, l as GrantScopeToRoleOutput, m as RevokeScopeFromRoleInput, n as RevokeScopeFromRoleOutput, o as
|
|
3
|
+
import { L as LabeledScope$1, t as tables, C as CreateRoleInput, a as CreateRoleOutput, A as AssignRoleToUserInput, b as AssignRoleToUserOutput, c as AssignRolesToUserInput, d as AssignRolesToUserOutput, R as RevokeRoleFromUserInput, e as RevokeRoleFromUserOutput, G as GrantScopeToUserInput, f as GrantScopeToUserOutput, g as GrantScopesToUserInput, h as GrantScopesToUserOutput, i as RevokeScopeFromUserInput, j as RevokeScopeFromUserOutput, k as GrantScopeToRoleInput, l as GrantScopeToRoleOutput, m as RevokeScopeFromRoleInput, n as RevokeScopeFromRoleOutput, o as GetAllUserRolesOutput, p as GetPermissionsOutput, q as GetUserPermissionsInput, r as GetUserPermissionsOutput, V as VerifyAccessInput, s as VerifyAccessOutput, D as DeleteRoleInput, u as DeleteRoleOutput, U as UpdateRoleInput, v as UpdateRoleOutput } from '../shared/rbac.CkCfjtKu.js';
|
|
4
4
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
5
5
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
6
6
|
import 'zod';
|
|
@@ -33,6 +33,7 @@ declare class RbacServiceBase<TScopes extends readonly LabeledScope$1[] = Labele
|
|
|
33
33
|
revokeScopeFromUser(input: RevokeScopeFromUserInput): Promise<IRPCResponse<RevokeScopeFromUserOutput>>;
|
|
34
34
|
grantScopeToRole(input: GrantScopeToRoleInput): Promise<IRPCResponse<GrantScopeToRoleOutput>>;
|
|
35
35
|
revokeScopeFromRole(input: RevokeScopeFromRoleInput): Promise<IRPCResponse<RevokeScopeFromRoleOutput>>;
|
|
36
|
+
getAllUserRoles(): Promise<IRPCResponse<GetAllUserRolesOutput>>;
|
|
36
37
|
getPermissions(): Promise<IRPCResponse<GetPermissionsOutput>>;
|
|
37
38
|
getUserPermissions(input: GetUserPermissionsInput): Promise<IRPCResponse<GetUserPermissionsOutput>>;
|
|
38
39
|
verifyAccess(input: Omit<VerifyAccessInput, 'accessRequests'> & {
|
package/dist/export/worker.mjs
CHANGED
|
@@ -177,6 +177,16 @@ const getAllRolesQuery = async ({
|
|
|
177
177
|
return result;
|
|
178
178
|
};
|
|
179
179
|
|
|
180
|
+
const getAllUserRolesQuery = async ({
|
|
181
|
+
db
|
|
182
|
+
}) => {
|
|
183
|
+
return await db.select({
|
|
184
|
+
userId: tables.userRole.userId,
|
|
185
|
+
roleId: tables.role.id,
|
|
186
|
+
roleName: tables.role.name
|
|
187
|
+
}).from(tables.userRole).leftJoin(tables.role, eq(tables.role.id, tables.userRole.roleId));
|
|
188
|
+
};
|
|
189
|
+
|
|
180
190
|
const getRoleQuery = async ({
|
|
181
191
|
db,
|
|
182
192
|
roleId
|
|
@@ -586,6 +596,19 @@ let RbacServiceBase = class extends develitWorker(WorkerEntrypoint) {
|
|
|
586
596
|
}
|
|
587
597
|
);
|
|
588
598
|
}
|
|
599
|
+
async getAllUserRoles() {
|
|
600
|
+
return this.handleAction(
|
|
601
|
+
null,
|
|
602
|
+
{ successMessage: "User roles successfully returned." },
|
|
603
|
+
async () => {
|
|
604
|
+
const userRoles = await getAllUserRolesQuery({ db: this.db });
|
|
605
|
+
return {
|
|
606
|
+
userRoles,
|
|
607
|
+
count: userRoles.length
|
|
608
|
+
};
|
|
609
|
+
}
|
|
610
|
+
);
|
|
611
|
+
}
|
|
589
612
|
async getPermissions() {
|
|
590
613
|
return this.handleAction(
|
|
591
614
|
null,
|
|
@@ -830,6 +853,9 @@ __decorateClass([
|
|
|
830
853
|
__decorateClass([
|
|
831
854
|
action("revokeScopeFromRole")
|
|
832
855
|
], RbacServiceBase.prototype, "revokeScopeFromRole", 1);
|
|
856
|
+
__decorateClass([
|
|
857
|
+
action("getAllUserRoles")
|
|
858
|
+
], RbacServiceBase.prototype, "getAllUserRoles", 1);
|
|
833
859
|
__decorateClass([
|
|
834
860
|
action("getPermissions")
|
|
835
861
|
], RbacServiceBase.prototype, "getPermissions", 1);
|
|
@@ -64,6 +64,15 @@ interface DeleteRoleInput extends z.infer<typeof deleteRoleInputSchema> {
|
|
|
64
64
|
interface DeleteRoleOutput {
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
interface GetAllUserRolesOutput {
|
|
68
|
+
userRoles: {
|
|
69
|
+
userId: string;
|
|
70
|
+
roleId: string | null;
|
|
71
|
+
roleName: string | null;
|
|
72
|
+
}[];
|
|
73
|
+
count: number;
|
|
74
|
+
}
|
|
75
|
+
|
|
67
76
|
interface GetPermissionsOutput {
|
|
68
77
|
roles: {
|
|
69
78
|
id: string;
|
|
@@ -252,5 +261,5 @@ declare function isAndCondition(condition: ScopeCondition): condition is {
|
|
|
252
261
|
};
|
|
253
262
|
declare function isImplicitAndCondition(condition: ScopeCondition): condition is ScopeCondition[];
|
|
254
263
|
|
|
255
|
-
export {
|
|
256
|
-
export type { AssignRoleToUserInput as A,
|
|
264
|
+
export { revokeRoleFromUserInputSchema as $, assignRoleToUserInputSchema as K, assignRolesToUserInputSchema as M, createRoleInputSchema as N, deleteRoleInputSchema as O, getUserPermissionsInputSchema as P, grantScopeToRoleInputSchema as Q, grantScopeToUserInputSchema as T, grantScopesToUserInputSchema as W, isAndCondition as X, isImplicitAndCondition as Y, isOrCondition as Z, isScopeObject as _, revokeScopeFromRoleInputSchema as a0, revokeScopeFromUserInputSchema as a1, scopeConditionSchema as a2, scopeObjectSchema as a3, updateRoleInputSchema as a4, verifyAccessInputSchema as a5, tables as t };
|
|
265
|
+
export type { AssignRoleToUserInput as A, ScopeCondition as B, CreateRoleInput as C, DeleteRoleInput as D, ScopeObject as E, UserRoleInsertType as F, GrantScopeToUserInput as G, UserRoleSelectType as H, UserScopeInsertType as I, UserScopeSelectType as J, LabeledScope as L, RevokeRoleFromUserInput as R, Scope as S, UpdateRoleInput as U, VerifyAccessInput as V, CreateRoleOutput as a, AssignRoleToUserOutput as b, AssignRolesToUserInput as c, AssignRolesToUserOutput as d, RevokeRoleFromUserOutput as e, GrantScopeToUserOutput as f, GrantScopesToUserInput as g, GrantScopesToUserOutput as h, RevokeScopeFromUserInput as i, RevokeScopeFromUserOutput as j, GrantScopeToRoleInput as k, GrantScopeToRoleOutput as l, RevokeScopeFromRoleInput as m, RevokeScopeFromRoleOutput as n, GetAllUserRolesOutput as o, GetPermissionsOutput as p, GetUserPermissionsInput as q, GetUserPermissionsOutput as r, VerifyAccessOutput as s, DeleteRoleOutput as u, UpdateRoleOutput as v, RoleInsertType as w, RoleScopeInsertType as x, RoleScopeSelectType as y, RoleSelectType as z };
|
|
@@ -64,6 +64,15 @@ interface DeleteRoleInput extends z.infer<typeof deleteRoleInputSchema> {
|
|
|
64
64
|
interface DeleteRoleOutput {
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
interface GetAllUserRolesOutput {
|
|
68
|
+
userRoles: {
|
|
69
|
+
userId: string;
|
|
70
|
+
roleId: string | null;
|
|
71
|
+
roleName: string | null;
|
|
72
|
+
}[];
|
|
73
|
+
count: number;
|
|
74
|
+
}
|
|
75
|
+
|
|
67
76
|
interface GetPermissionsOutput {
|
|
68
77
|
roles: {
|
|
69
78
|
id: string;
|
|
@@ -252,5 +261,5 @@ declare function isAndCondition(condition: ScopeCondition): condition is {
|
|
|
252
261
|
};
|
|
253
262
|
declare function isImplicitAndCondition(condition: ScopeCondition): condition is ScopeCondition[];
|
|
254
263
|
|
|
255
|
-
export {
|
|
256
|
-
export type { AssignRoleToUserInput as A,
|
|
264
|
+
export { revokeRoleFromUserInputSchema as $, assignRoleToUserInputSchema as K, assignRolesToUserInputSchema as M, createRoleInputSchema as N, deleteRoleInputSchema as O, getUserPermissionsInputSchema as P, grantScopeToRoleInputSchema as Q, grantScopeToUserInputSchema as T, grantScopesToUserInputSchema as W, isAndCondition as X, isImplicitAndCondition as Y, isOrCondition as Z, isScopeObject as _, revokeScopeFromRoleInputSchema as a0, revokeScopeFromUserInputSchema as a1, scopeConditionSchema as a2, scopeObjectSchema as a3, updateRoleInputSchema as a4, verifyAccessInputSchema as a5, tables as t };
|
|
265
|
+
export type { AssignRoleToUserInput as A, ScopeCondition as B, CreateRoleInput as C, DeleteRoleInput as D, ScopeObject as E, UserRoleInsertType as F, GrantScopeToUserInput as G, UserRoleSelectType as H, UserScopeInsertType as I, UserScopeSelectType as J, LabeledScope as L, RevokeRoleFromUserInput as R, Scope as S, UpdateRoleInput as U, VerifyAccessInput as V, CreateRoleOutput as a, AssignRoleToUserOutput as b, AssignRolesToUserInput as c, AssignRolesToUserOutput as d, RevokeRoleFromUserOutput as e, GrantScopeToUserOutput as f, GrantScopesToUserInput as g, GrantScopesToUserOutput as h, RevokeScopeFromUserInput as i, RevokeScopeFromUserOutput as j, GrantScopeToRoleInput as k, GrantScopeToRoleOutput as l, RevokeScopeFromRoleInput as m, RevokeScopeFromRoleOutput as n, GetAllUserRolesOutput as o, GetPermissionsOutput as p, GetUserPermissionsInput as q, GetUserPermissionsOutput as r, VerifyAccessOutput as s, DeleteRoleOutput as u, UpdateRoleOutput as v, RoleInsertType as w, RoleScopeInsertType as x, RoleScopeSelectType as y, RoleSelectType as z };
|
|
@@ -64,6 +64,15 @@ interface DeleteRoleInput extends z.infer<typeof deleteRoleInputSchema> {
|
|
|
64
64
|
interface DeleteRoleOutput {
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
interface GetAllUserRolesOutput {
|
|
68
|
+
userRoles: {
|
|
69
|
+
userId: string;
|
|
70
|
+
roleId: string | null;
|
|
71
|
+
roleName: string | null;
|
|
72
|
+
}[];
|
|
73
|
+
count: number;
|
|
74
|
+
}
|
|
75
|
+
|
|
67
76
|
interface GetPermissionsOutput {
|
|
68
77
|
roles: {
|
|
69
78
|
id: string;
|
|
@@ -252,5 +261,5 @@ declare function isAndCondition(condition: ScopeCondition): condition is {
|
|
|
252
261
|
};
|
|
253
262
|
declare function isImplicitAndCondition(condition: ScopeCondition): condition is ScopeCondition[];
|
|
254
263
|
|
|
255
|
-
export {
|
|
256
|
-
export type { AssignRoleToUserInput as A,
|
|
264
|
+
export { revokeRoleFromUserInputSchema as $, assignRoleToUserInputSchema as K, assignRolesToUserInputSchema as M, createRoleInputSchema as N, deleteRoleInputSchema as O, getUserPermissionsInputSchema as P, grantScopeToRoleInputSchema as Q, grantScopeToUserInputSchema as T, grantScopesToUserInputSchema as W, isAndCondition as X, isImplicitAndCondition as Y, isOrCondition as Z, isScopeObject as _, revokeScopeFromRoleInputSchema as a0, revokeScopeFromUserInputSchema as a1, scopeConditionSchema as a2, scopeObjectSchema as a3, updateRoleInputSchema as a4, verifyAccessInputSchema as a5, tables as t };
|
|
265
|
+
export type { AssignRoleToUserInput as A, ScopeCondition as B, CreateRoleInput as C, DeleteRoleInput as D, ScopeObject as E, UserRoleInsertType as F, GrantScopeToUserInput as G, UserRoleSelectType as H, UserScopeInsertType as I, UserScopeSelectType as J, LabeledScope as L, RevokeRoleFromUserInput as R, Scope as S, UpdateRoleInput as U, VerifyAccessInput as V, CreateRoleOutput as a, AssignRoleToUserOutput as b, AssignRolesToUserInput as c, AssignRolesToUserOutput as d, RevokeRoleFromUserOutput as e, GrantScopeToUserOutput as f, GrantScopesToUserInput as g, GrantScopesToUserOutput as h, RevokeScopeFromUserInput as i, RevokeScopeFromUserOutput as j, GrantScopeToRoleInput as k, GrantScopeToRoleOutput as l, RevokeScopeFromRoleInput as m, RevokeScopeFromRoleOutput as n, GetAllUserRolesOutput as o, GetPermissionsOutput as p, GetUserPermissionsInput as q, GetUserPermissionsOutput as r, VerifyAccessOutput as s, DeleteRoleOutput as u, UpdateRoleOutput as v, RoleInsertType as w, RoleScopeInsertType as x, RoleScopeSelectType as y, RoleSelectType as z };
|
package/dist/types.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AssignRoleToUserInput, b as AssignRoleToUserOutput, c as AssignRolesToUserInput, d as AssignRolesToUserOutput, C as CreateRoleInput, a as CreateRoleOutput, D as DeleteRoleInput,
|
|
1
|
+
export { A as AssignRoleToUserInput, b as AssignRoleToUserOutput, c as AssignRolesToUserInput, d as AssignRolesToUserOutput, C as CreateRoleInput, a as CreateRoleOutput, D as DeleteRoleInput, u as DeleteRoleOutput, o as GetAllUserRolesOutput, p as GetPermissionsOutput, q as GetUserPermissionsInput, r as GetUserPermissionsOutput, k as GrantScopeToRoleInput, l as GrantScopeToRoleOutput, G as GrantScopeToUserInput, f as GrantScopeToUserOutput, g as GrantScopesToUserInput, h as GrantScopesToUserOutput, L as LabeledScope, R as RevokeRoleFromUserInput, e as RevokeRoleFromUserOutput, m as RevokeScopeFromRoleInput, n as RevokeScopeFromRoleOutput, i as RevokeScopeFromUserInput, j as RevokeScopeFromUserOutput, w as RoleInsertType, x as RoleScopeInsertType, y as RoleScopeSelectType, z as RoleSelectType, S as Scope, B as ScopeCondition, E as ScopeObject, U as UpdateRoleInput, v as UpdateRoleOutput, F as UserRoleInsertType, H as UserRoleSelectType, I as UserScopeInsertType, J as UserScopeSelectType, V as VerifyAccessInput, s as VerifyAccessOutput, K as assignRoleToUserInputSchema, M as assignRolesToUserInputSchema, N as createRoleInputSchema, O as deleteRoleInputSchema, P as getUserPermissionsInputSchema, Q as grantScopeToRoleInputSchema, T as grantScopeToUserInputSchema, W as grantScopesToUserInputSchema, X as isAndCondition, Y as isImplicitAndCondition, Z as isOrCondition, _ as isScopeObject, $ as revokeRoleFromUserInputSchema, a0 as revokeScopeFromRoleInputSchema, a1 as revokeScopeFromUserInputSchema, a2 as scopeConditionSchema, a3 as scopeObjectSchema, a4 as updateRoleInputSchema, a5 as verifyAccessInputSchema } from './shared/rbac.DypKJ7qb.cjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
export { a as RbacServiceEnv, b as RbacServiceEnvironmentConfig, R as RbacServiceWranglerConfig } from './shared/rbac.DUk_qXWk.cjs';
|
|
4
4
|
import 'drizzle-orm';
|
package/dist/types.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AssignRoleToUserInput, b as AssignRoleToUserOutput, c as AssignRolesToUserInput, d as AssignRolesToUserOutput, C as CreateRoleInput, a as CreateRoleOutput, D as DeleteRoleInput,
|
|
1
|
+
export { A as AssignRoleToUserInput, b as AssignRoleToUserOutput, c as AssignRolesToUserInput, d as AssignRolesToUserOutput, C as CreateRoleInput, a as CreateRoleOutput, D as DeleteRoleInput, u as DeleteRoleOutput, o as GetAllUserRolesOutput, p as GetPermissionsOutput, q as GetUserPermissionsInput, r as GetUserPermissionsOutput, k as GrantScopeToRoleInput, l as GrantScopeToRoleOutput, G as GrantScopeToUserInput, f as GrantScopeToUserOutput, g as GrantScopesToUserInput, h as GrantScopesToUserOutput, L as LabeledScope, R as RevokeRoleFromUserInput, e as RevokeRoleFromUserOutput, m as RevokeScopeFromRoleInput, n as RevokeScopeFromRoleOutput, i as RevokeScopeFromUserInput, j as RevokeScopeFromUserOutput, w as RoleInsertType, x as RoleScopeInsertType, y as RoleScopeSelectType, z as RoleSelectType, S as Scope, B as ScopeCondition, E as ScopeObject, U as UpdateRoleInput, v as UpdateRoleOutput, F as UserRoleInsertType, H as UserRoleSelectType, I as UserScopeInsertType, J as UserScopeSelectType, V as VerifyAccessInput, s as VerifyAccessOutput, K as assignRoleToUserInputSchema, M as assignRolesToUserInputSchema, N as createRoleInputSchema, O as deleteRoleInputSchema, P as getUserPermissionsInputSchema, Q as grantScopeToRoleInputSchema, T as grantScopeToUserInputSchema, W as grantScopesToUserInputSchema, X as isAndCondition, Y as isImplicitAndCondition, Z as isOrCondition, _ as isScopeObject, $ as revokeRoleFromUserInputSchema, a0 as revokeScopeFromRoleInputSchema, a1 as revokeScopeFromUserInputSchema, a2 as scopeConditionSchema, a3 as scopeObjectSchema, a4 as updateRoleInputSchema, a5 as verifyAccessInputSchema } from './shared/rbac.CSHPMf7E.mjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
export { a as RbacServiceEnv, b as RbacServiceEnvironmentConfig, R as RbacServiceWranglerConfig } from './shared/rbac.DUk_qXWk.mjs';
|
|
4
4
|
import 'drizzle-orm';
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AssignRoleToUserInput, b as AssignRoleToUserOutput, c as AssignRolesToUserInput, d as AssignRolesToUserOutput, C as CreateRoleInput, a as CreateRoleOutput, D as DeleteRoleInput,
|
|
1
|
+
export { A as AssignRoleToUserInput, b as AssignRoleToUserOutput, c as AssignRolesToUserInput, d as AssignRolesToUserOutput, C as CreateRoleInput, a as CreateRoleOutput, D as DeleteRoleInput, u as DeleteRoleOutput, o as GetAllUserRolesOutput, p as GetPermissionsOutput, q as GetUserPermissionsInput, r as GetUserPermissionsOutput, k as GrantScopeToRoleInput, l as GrantScopeToRoleOutput, G as GrantScopeToUserInput, f as GrantScopeToUserOutput, g as GrantScopesToUserInput, h as GrantScopesToUserOutput, L as LabeledScope, R as RevokeRoleFromUserInput, e as RevokeRoleFromUserOutput, m as RevokeScopeFromRoleInput, n as RevokeScopeFromRoleOutput, i as RevokeScopeFromUserInput, j as RevokeScopeFromUserOutput, w as RoleInsertType, x as RoleScopeInsertType, y as RoleScopeSelectType, z as RoleSelectType, S as Scope, B as ScopeCondition, E as ScopeObject, U as UpdateRoleInput, v as UpdateRoleOutput, F as UserRoleInsertType, H as UserRoleSelectType, I as UserScopeInsertType, J as UserScopeSelectType, V as VerifyAccessInput, s as VerifyAccessOutput, K as assignRoleToUserInputSchema, M as assignRolesToUserInputSchema, N as createRoleInputSchema, O as deleteRoleInputSchema, P as getUserPermissionsInputSchema, Q as grantScopeToRoleInputSchema, T as grantScopeToUserInputSchema, W as grantScopesToUserInputSchema, X as isAndCondition, Y as isImplicitAndCondition, Z as isOrCondition, _ as isScopeObject, $ as revokeRoleFromUserInputSchema, a0 as revokeScopeFromRoleInputSchema, a1 as revokeScopeFromUserInputSchema, a2 as scopeConditionSchema, a3 as scopeObjectSchema, a4 as updateRoleInputSchema, a5 as verifyAccessInputSchema } from './shared/rbac.CkCfjtKu.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
export { a as RbacServiceEnv, b as RbacServiceEnvironmentConfig, R as RbacServiceWranglerConfig } from './shared/rbac.DUk_qXWk.js';
|
|
4
4
|
import 'drizzle-orm';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@develit-services/rbac",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"author": "Develit.io s.r.o.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"build": "unbuild"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@develit-io/backend-sdk": "^9.
|
|
49
|
+
"@develit-io/backend-sdk": "^9.10.3",
|
|
50
50
|
"drizzle-orm": "^0.45.0",
|
|
51
51
|
"zod": "^4.1.13"
|
|
52
52
|
}
|