import { J as Json, P as PaginationInput, S as SdkModule } from '../../module-Bq-w9Ws5.cjs'; import 'graphql-request'; type ActorType = 'user' | 'app' | 'service' | 'super_admin'; interface Role { id: string; name: string; description?: string | null; scopeId: string; scopeType: string; isSystem: boolean; priority: number; createdAt: string; updatedAt: string; } interface CreateRoleInput { name: string; description?: string; scopeId: string; scopeType?: string; isSystem?: boolean; priority?: number; parentId?: string; } interface UpdateRoleInput { name?: string; description?: string; priority?: number; parentId?: string; } interface RoleFilterInput { search?: string; isSystem?: boolean; } interface PolicyReference { id: string; name: string; description?: string | null; opaPackage: string; resourceType: string; action: string; isActive: boolean; priority: number; createdAt: string; updatedAt: string; } interface PermissionCheckInput { actorId: string; actorType: ActorType; scopeId: string; resourceType: string; action: string; resourceId?: string; attributes?: Json; } interface PermissionCheckResult { allowed: boolean; decisionPath: string; roleLevel?: string | null; roleName?: string | null; overrideType?: string | null; opaPolicy?: string | null; } type RbacScope = 'workspace' | 'global'; interface CheckActor { actorId: string; actorType: ActorType; scopeId: string; } interface CheckResource { resourceType: string; resourceId?: string; attributes?: unknown; } interface RolesApi { list(scopeId: string, filter?: RoleFilterInput, pagination?: PaginationInput, scope?: RbacScope): Promise; get(id: string, scope?: RbacScope): Promise; create(input: CreateRoleInput, scope?: RbacScope): Promise; update(id: string, input: UpdateRoleInput, scope?: RbacScope): Promise; delete(id: string, reassignToRoleId?: string, scope?: RbacScope): Promise; } interface PoliciesApi { list(filter?: { resourceType?: string; action?: string; isActive?: boolean; }, pagination?: PaginationInput, scope?: RbacScope): Promise; attach(roleId: string, policyId: string, scope?: RbacScope): Promise; detach(roleId: string, policyId: string, scope?: RbacScope): Promise; } interface RbacApi { roles: RolesApi; policies: PoliciesApi; check(actor: CheckActor, action: string, resource: CheckResource, scope?: RbacScope): Promise; } declare const rbacModule: SdkModule; export { type ActorType, type CheckActor, type CheckResource, type CreateRoleInput, type PermissionCheckInput, type PermissionCheckResult, type PoliciesApi, type PolicyReference, type RbacApi, type RbacScope, type Role, type RoleFilterInput, type RolesApi, type UpdateRoleInput, rbacModule as default };