import { UserRole } from '@prisma/client';
import { AuditService } from '../audit/audit.service';
import { RequestUser } from '../common/request-user';
import { PrismaService } from '../database/prisma.service';
import { UpdatePlanFeatureSettingsDto, UpdateRoleFeatureSettingsDto } from './dto/feature-access.dto';
import { FeatureKey } from './feature-catalog';
export declare class FeatureAccessService {
    private readonly prisma;
    private readonly audit;
    constructor(prisma: PrismaService, audit: AuditService);
    listCatalog(): import("./feature-catalog").FeatureDefinition[];
    getMyFeatures(user: RequestUser): Promise<{
        role: import(".prisma/client").$Enums.UserRole;
        estateId: string | null;
        defaultEnabled: boolean;
        globalEnabled: boolean;
        estateEnabled: boolean | null;
        planEnabled: boolean;
        effectiveEnabled: boolean;
        source: string;
        key: FeatureKey;
        label: string;
        description: string;
        category: string;
        defaultRoles: UserRole[];
        estateConfigurable: boolean;
    }[]>;
    getRoleSettings(role: UserRole, estateId?: string | null): Promise<{
        role: import(".prisma/client").$Enums.UserRole;
        estateId: string | null;
        defaultEnabled: boolean;
        globalEnabled: boolean;
        estateEnabled: boolean | null;
        planEnabled: boolean;
        effectiveEnabled: boolean;
        source: string;
        key: FeatureKey;
        label: string;
        description: string;
        category: string;
        defaultRoles: UserRole[];
        estateConfigurable: boolean;
    }[]>;
    getManageableRoleSettings(role: UserRole, requestedEstateId: string | undefined, actor: RequestUser): Promise<{
        role: import(".prisma/client").$Enums.UserRole;
        estateId: string | null;
        defaultEnabled: boolean;
        globalEnabled: boolean;
        estateEnabled: boolean | null;
        planEnabled: boolean;
        effectiveEnabled: boolean;
        source: string;
        key: FeatureKey;
        label: string;
        description: string;
        category: string;
        defaultRoles: UserRole[];
        estateConfigurable: boolean;
    }[]>;
    isFeatureEnabled(user: RequestUser, feature: FeatureKey | string): Promise<boolean>;
    updateRoleSettings(role: UserRole, dto: UpdateRoleFeatureSettingsDto, actor: RequestUser): Promise<{
        role: import(".prisma/client").$Enums.UserRole;
        estateId: string | null;
        defaultEnabled: boolean;
        globalEnabled: boolean;
        estateEnabled: boolean | null;
        planEnabled: boolean;
        effectiveEnabled: boolean;
        source: string;
        key: FeatureKey;
        label: string;
        description: string;
        category: string;
        defaultRoles: UserRole[];
        estateConfigurable: boolean;
    }[]>;
    getPlanSettings(code: string): Promise<{
        code: string;
        name: string;
        features: {
            planCode: string;
            enabled: boolean;
            key: FeatureKey;
            label: string;
            description: string;
            category: string;
            defaultRoles: UserRole[];
            estateConfigurable: boolean;
        }[];
    }>;
    updatePlanSettings(code: string, dto: UpdatePlanFeatureSettingsDto, actor: RequestUser): Promise<{
        code: string;
        name: string;
        features: {
            planCode: string;
            enabled: boolean;
            key: FeatureKey;
            label: string;
            description: string;
            category: string;
            defaultRoles: UserRole[];
            estateConfigurable: boolean;
        }[];
    }>;
    private upsertGlobalSettings;
    private upsertEstateSettings;
    private resolveManagementScope;
    private assertRole;
    private assertFeature;
    private assertCanSetFeature;
    private isPlanGatedRole;
    private getEstatePlanFeatureSet;
    private isFeatureInEstatePlan;
}
