import { AbilityBuilder } from '@casl/ability';
import { type ProjectMemberProfile } from '../types/projectMemberProfile';
import { type ProjectType } from '../types/projects';
import { type Role, type RoleWithScopes } from '../types/roles';
import { type LightdashUser } from '../types/user';
import { type OrganizationMemberAbilitiesArgs } from './organizationMemberAbility';
import { type MemberAbility } from './types';
/**
 * Project membership plus the project metadata needed by @self scope
 * conditions (resolved at ability-build time, not per permission check).
 */
export type ProjectAbilityProfile = Pick<ProjectMemberProfile, 'projectUuid' | 'role' | 'userUuid' | 'roleUuid'> & {
    projectType?: ProjectType;
    projectCreatedByUserUuid?: string | null;
};
type UserAbilityBuilderArgs = {
    user: Pick<LightdashUser, 'role' | 'organizationUuid' | 'userUuid' | 'roleUuid'>;
    projectProfiles: ProjectAbilityProfile[];
    permissionsConfig: OrganizationMemberAbilitiesArgs['permissionsConfig'];
    customRoleScopes?: Record<Role['roleUuid'], RoleWithScopes['scopes']>;
    customRolesEnabled?: boolean;
    isEnterprise?: boolean;
};
export declare const JWT_HEADER_NAME = "lightdash-embed-token";
export type UserAbilityBuilderResult = {
    builder: AbilityBuilder<MemberAbility>;
    invalidScopes: string[];
};
export declare const getUserAbilityBuilder: ({ user, projectProfiles, permissionsConfig, customRoleScopes, customRolesEnabled, isEnterprise, }: UserAbilityBuilderArgs) => UserAbilityBuilderResult;
export declare const defineUserAbility: (user: Pick<LightdashUser, "role" | "organizationUuid" | "userUuid" | "roleUuid">, projectProfiles: ProjectAbilityProfile[], customRoleScopes?: Record<Role["roleUuid"], RoleWithScopes["scopes"]>) => MemberAbility;
export {};
//# sourceMappingURL=index.d.ts.map