import { YcmdServerInfo } from "./server";
export interface YcmdRequestOptions {
    method?: "GET" | "POST" | "PUT" | "DELETE";
    headers?: Record<string, string>;
    timeout?: number;
}
export interface YcmdCompletionRequest {
    filepath: string;
    line_num: number;
    column_num: number;
    file_data: Record<string, {
        contents: string;
        filetypes: string[];
    }>;
    force_semantic?: boolean;
}
export interface YcmdCompletionResponse {
    completions: {
        insertion_text: string;
        menu_text?: string;
        extra_menu_info?: string;
        detailed_info?: string;
        kind?: string;
    }[];
    completion_start_column: number;
}
export interface YcmdDiagnostic {
    kind: "ERROR" | "WARNING" | "INFO";
    text: string;
    location: {
        line_num: number;
        column_num: number;
        filepath: string;
    };
    location_extent: {
        start: {
            line_num: number;
            column_num: number;
            filepath: string;
        };
        end: {
            line_num: number;
            column_num: number;
            filepath: string;
        };
    };
    ranges: {
        start: {
            line_num: number;
            column_num: number;
            filepath: string;
        };
        end: {
            line_num: number;
            column_num: number;
            filepath: string;
        };
    }[];
    fixit_available: boolean;
}
export interface YcmdGoToResponse {
    filepath: string;
    line_num: number;
    column_num: number;
    description?: string;
}
export declare class YcmdClient {
    private serverInfo;
    private baseUrl;
    constructor(serverInfo: YcmdServerInfo);
    request<T = any>(endpoint: string, data?: any, options?: YcmdRequestOptions): Promise<T>;
    private generateHmac;
    private generateSimpleHmac;
    isReady(): Promise<boolean>;
    isHealthy(): Promise<boolean>;
    loadExtraConfFile(filepath: string): Promise<boolean>;
    getCompletions(request: YcmdCompletionRequest): Promise<YcmdCompletionResponse>;
    getCompletionDetail(request: YcmdCompletionRequest): Promise<any>;
    getDiagnostics(filepath: string, contents: string, filetypes: string[], line_num?: number, column_num?: number): Promise<YcmdDiagnostic[]>;
    goToDefinition(filepath: string, line: number, column: number, contents: string, filetypes: string[]): Promise<YcmdGoToResponse>;
    goToDeclaration(filepath: string, line: number, column: number, contents: string, filetypes: string[]): Promise<YcmdGoToResponse>;
    goToReferences(filepath: string, line: number, column: number, contents: string, filetypes: string[]): Promise<YcmdGoToResponse[]>;
    getSignatureHelp(filepath: string, line: number, column: number, contents: string, filetypes: string[]): Promise<any>;
    getRefactorCommands(filepath: string, line: number, column: number, contents: string, filetypes: string[]): Promise<any[]>;
    refactorRename(filepath: string, line: number, column: number, contents: string, filetypes: string[], newName: string): Promise<any>;
    refactorExtractMethod(filepath: string, line: number, column: number, contents: string, filetypes: string[]): Promise<any>;
    refactorOrganizeImports(filepath: string, line: number, column: number, contents: string, filetypes: string[]): Promise<any>;
    refactorFixIt(filepath: string, line: number, column: number, contents: string, filetypes: string[], fixitIndex: number): Promise<any>;
    executeRefactor(command: string, args: any): Promise<any>;
    notifyFileEvent(event: "BufferVisit" | "BufferUnload" | "FileReadyToParse" | "InsertLeave" | "CurrentIdentifierFinished", filepath: string, contents?: string, filetypes?: string[], line_num?: number, column_num?: number): Promise<void>;
    shutdown(): Promise<void>;
}
export declare function getFileTypes(filepath: string): string[];
