import { Logger } from '@n8n/backend-common';
import type { NextFunction, Response } from 'express';
import { Cipher } from 'n8n-core';
import type { ICredentialDataDecryptedObject, IExecutionContext, IWorkflowSettings } from 'n8n-workflow';
import { LoadNodesAndCredentials } from '../../../load-nodes-and-credentials';
import { DynamicCredentialResolverRegistry } from './credential-resolver-registry.service';
import { ResolverConfigExpressionService } from './resolver-config-expression.service';
import type { CredentialResolutionResult, CredentialResolveMetadata, ICredentialResolutionProvider } from '../../../credentials/credential-resolution-provider.interface';
import { DynamicCredentialResolverRepository } from '../database/repositories/credential-resolver.repository';
import { DynamicCredentialsConfig } from '../dynamic-credentials.config';
import { AuthenticatedRequest } from '@n8n/db';
export declare class DynamicCredentialService implements ICredentialResolutionProvider {
    private readonly dynamicCredentialConfig;
    private readonly resolverRegistry;
    private readonly resolverRepository;
    private readonly loadNodesAndCredentials;
    private readonly cipher;
    private readonly logger;
    private readonly expressionService;
    constructor(dynamicCredentialConfig: DynamicCredentialsConfig, resolverRegistry: DynamicCredentialResolverRegistry, resolverRepository: DynamicCredentialResolverRepository, loadNodesAndCredentials: LoadNodesAndCredentials, cipher: Cipher, logger: Logger, expressionService: ResolverConfigExpressionService);
    resolveIfNeeded(credentialsResolveMetadata: CredentialResolveMetadata, staticData: ICredentialDataDecryptedObject, executionContext?: IExecutionContext, workflowSettings?: IWorkflowSettings): Promise<CredentialResolutionResult>;
    private buildCredentialContext;
    private handleResolutionError;
    private handleResolverNotConfigured;
    private handleResolverNotFound;
    private handleMissingContext;
    getDynamicCredentialsEndpointsMiddleware(): (req: AuthenticatedRequest, res: Response, next: NextFunction) => void;
}
