import { z } from 'zod'; import { InferSelectModel, InferInsertModel } from 'drizzle-orm'; import { s as schema } from './rbac.P-yL2vdQ.cjs'; declare const tables: typeof schema; interface RoleScopeSelectType extends InferSelectModel { } interface RoleScopeInsertType extends InferInsertModel { } interface RoleSelectType extends InferSelectModel { } interface RoleInsertType extends InferInsertModel { } type Scope = string; type LabeledScope = { label: string; value: Scope; }; interface UserRoleSelectType extends InferSelectModel { } interface UserRoleInsertType extends InferInsertModel { } interface UserScopeSelectType extends InferSelectModel { } interface UserScopeInsertType extends InferInsertModel { } declare const assignRoleToUserInputSchema: z.ZodObject<{ userId: z.ZodUUID; roleId: z.ZodUUID; }, z.core.$strip>; interface AssignRoleToUserInput extends z.infer { } interface AssignRoleToUserOutput extends UserRoleSelectType { } declare const assignRolesToUserInputSchema: z.ZodObject<{ userId: z.ZodUUID; roles: z.ZodArray; }, z.core.$strip>; interface AssignRolesToUserInput extends z.infer { } interface AssignRolesToUserOutput extends UserRoleSelectType { } declare const createRoleInputSchema: z.ZodObject<{ name: z.ZodString; }, z.core.$strip>; interface CreateRoleInput extends z.infer { } interface CreateRoleOutput extends RoleSelectType { } declare const deleteRoleInputSchema: z.ZodObject<{ id: z.ZodUUID; }, z.core.$strip>; interface DeleteRoleInput extends z.infer { } interface DeleteRoleOutput { } interface GetAllUserRolesOutput { userRoles: { userId: string; roleId: string | null; roleName: string | null; }[]; count: number; } interface GetPermissionsOutput { roles: { id: string; name: string; numberOfScopes: number; numberOfUsers: number; }[]; rolesCount: number; scopes: { scope: Scope; label: string | null; }[]; scopesCount: number; roleScopes: { roleId: string; roleName: string; scopes: { id: string; scope: Scope; label: string | null; resourceId: string | null; }[]; }[]; labeledScopes: LabeledScope[]; roleScopesCount: number; } declare const getUserPermissionsInputSchema: z.ZodObject<{ userId: z.ZodUUID; filter: z.ZodOptional; scopeStartsWith: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>; interface GetUserPermissionsInput extends z.infer { } interface GetUserPermissionsOutput { roles: { id: string; name: string; }[]; rolesCount: number; roleScopes: { id: string; scope: Scope; label: string | null; resourceId: string | null; }[]; roleScopesCount: number; scopes: { id: string; scope: Scope; label: string | null; resourceId: string | null; }[]; scopesCount: number; } declare const grantScopeToRoleInputSchema: z.ZodObject<{ roleId: z.ZodUUID; scope: z.ZodString; resourceId: z.ZodOptional; }, z.core.$strip>; interface GrantScopeToRoleInput extends z.infer { } interface GrantScopeToRoleOutput extends RoleScopeSelectType { } declare const grantScopeToUserInputSchema: z.ZodObject<{ userId: z.ZodUUID; scope: z.ZodString; resourceId: z.ZodOptional; }, z.core.$strip>; interface GrantScopeToUserInput extends z.infer { } interface GrantScopeToUserOutput extends UserScopeSelectType { } declare const grantScopesToUserInputSchema: z.ZodObject<{ userId: z.ZodUUID; scopes: z.ZodArray; }, z.core.$strip>>; }, z.core.$strip>; interface GrantScopesToUserInput extends z.infer { } interface GrantScopesToUserOutput extends UserScopeSelectType { } declare const revokeRoleFromUserInputSchema: z.ZodObject<{ userId: z.ZodUUID; roleId: z.ZodUUID; }, z.core.$strip>; interface RevokeRoleFromUserInput extends z.infer { } interface RevokeRoleFromUserOutput { } declare const revokeScopeFromRoleInputSchema: z.ZodObject<{ roleId: z.ZodUUID; scope: z.ZodString; resourceId: z.ZodOptional; }, z.core.$strip>; interface RevokeScopeFromRoleInput extends z.infer { } interface RevokeScopeFromRoleOutput { } declare const revokeScopeFromUserInputSchema: z.ZodObject<{ userId: z.ZodUUID; scope: z.ZodString; resourceId: z.ZodOptional; }, z.core.$strip>; interface RevokeScopeFromUserInput extends z.infer { } interface RevokeScopeFromUserOutput { } declare const updateRoleInputSchema: z.ZodObject<{ id: z.ZodUUID; name: z.ZodString; }, z.core.$strip>; interface UpdateRoleInput extends z.infer { } interface UpdateRoleOutput { } declare const scopeObjectSchema: z.ZodObject<{ scope: z.ZodString; resourceId: z.ZodOptional; resourcePath: z.ZodOptional; }, z.core.$strip>; type ScopeObject = z.infer; type ScopeCondition = ScopeObject | { or: ScopeCondition[]; } | { and: ScopeCondition[]; } | ScopeCondition[]; declare const scopeConditionSchema: z.ZodType; declare const verifyAccessInputSchema: z.ZodObject<{ userId: z.ZodUUID; accessRequests: z.ZodType>; jwt: z.ZodOptional; }, z.core.$strip>>; user: z.ZodObject<{ id: z.ZodUUID; createdBy: z.ZodOptional>; updatedBy: z.ZodOptional>; deletedBy: z.ZodOptional>; email: z.ZodEmail; rawAppMetaData: z.ZodAny; rawUserMetaData: z.ZodAny; isSuperAdmin: z.ZodDefault; isSsoUser: z.ZodDefault; emailChangeToken: z.ZodOptional>; isBanned: z.ZodOptional>>; createdAt: z.ZodNullable>; updatedAt: z.ZodNullable>; deletedAt: z.ZodNullable>; lastSignInAt: z.ZodOptional>>; emailConfirmedAt: z.ZodOptional>>; confirmationSentAt: z.ZodOptional>>; recoverySentAt: z.ZodOptional>>; emailChangeSentAt: z.ZodOptional>>; }, z.core.$strip>; }, z.core.$strip>>; }, z.core.$strip>; interface VerifyAccessInput extends z.infer { } interface VerifyAccessOutput { isVerified: boolean; } declare function isScopeObject(condition: ScopeCondition): condition is ScopeObject; declare function isOrCondition(condition: ScopeCondition): condition is { or: ScopeCondition[]; }; declare function isAndCondition(condition: ScopeCondition): condition is { and: ScopeCondition[]; }; declare function isImplicitAndCondition(condition: ScopeCondition): condition is ScopeCondition[]; 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 }; 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 };