import { Logger } from '@n8n/backend-common';
import { AuthIdentityRepository, UserRepository, type User } from '@n8n/db';
import { EventService } from '../../../events/event.service';
import { UserService } from '../../../services/user.service';
import type { ExternalTokenClaims } from '../token-exchange.schemas';
export declare class IdentityResolutionService {
    private readonly userRepository;
    private readonly authIdentityRepository;
    private readonly eventService;
    private readonly userService;
    private readonly logger;
    constructor(logger: Logger, userRepository: UserRepository, authIdentityRepository: AuthIdentityRepository, eventService: EventService, userService: UserService);
    resolve(claims: ExternalTokenClaims, allowedRoles?: string[], tokenContext?: {
        kid: string;
        issuer: string;
    }): Promise<User>;
    private resolveByIdentity;
    private resolveByEmail;
    private provisionUser;
    private resolveRoleForExistingUser;
    private resolveRoleForNewUser;
    private syncProfile;
}
