import { PrismaService } from "../../core/database/prisma/prisma.service";
import { AuthCacheService } from "../../modules/organization/auth/services/auth-cache.service";
import { DataScopeService, UserDataScope } from './data-scope.service';
import { IamAuditService } from './iam-audit.service';
export interface CreateDelegationDto {
    fromUserId: string;
    toUserId: string;
    resource?: string;
    validFrom: Date;
    validTo: Date;
    reason: string;
    organizationId?: string;
    createdById: string;
}
export declare class PermissionDelegationService {
    private readonly prisma;
    private readonly authCache;
    private readonly dataScope;
    private readonly audit;
    constructor(prisma: PrismaService, authCache: AuthCacheService, dataScope: DataScopeService, audit: IamAuditService);
    create(dto: CreateDelegationDto): Promise<{
        id: string;
        createdAt: Date;
        updatedAt: Date;
        organizationId: string | null;
        resource: string;
        createdById: string;
        fromUserId: string;
        toUserId: string;
        validFrom: Date;
        validTo: Date;
        reason: string;
        revokedAt: Date | null;
    }>;
    revoke(id: string, actor: string): Promise<{
        id: string;
        createdAt: Date;
        updatedAt: Date;
        organizationId: string | null;
        resource: string;
        createdById: string;
        fromUserId: string;
        toUserId: string;
        validFrom: Date;
        validTo: Date;
        reason: string;
        revokedAt: Date | null;
    }>;
    listRelatedToUser(userId: string): Promise<{
        id: string;
        createdAt: Date;
        updatedAt: Date;
        organizationId: string | null;
        resource: string;
        createdById: string;
        fromUserId: string;
        toUserId: string;
        validFrom: Date;
        validTo: Date;
        reason: string;
        revokedAt: Date | null;
    }[]>;
    loadActiveInboundScopes(toUserId: string): Promise<UserDataScope[]>;
    private assertNotChained;
    private assertValidWindow;
}
