import type { GraphqlOptions, HttpOptions, HttpResponse, InternalHttpOptions } from './types';
import { Http } from '.';
export declare const setBaseUrl: (url: string) => void;
export interface GithubHttpOptions extends HttpOptions {
    paginate?: boolean | string;
    paginationField?: string;
    pageLimit?: number;
    repository?: string;
}
export type GithubGraphqlResponse<T = unknown> = {
    data: T;
    errors?: never;
} | {
    data?: never;
    errors: {
        type?: string;
        message: string;
    }[];
};
interface GraphqlPageCacheItem {
    pageLastResizedAt: string;
    pageSize: number;
}
export type GraphqlPageCache = Record<string, GraphqlPageCacheItem>;
export declare class GithubHttp extends Http<GithubHttpOptions> {
    constructor(hostType?: string, options?: GithubHttpOptions);
    protected request<T>(url: string | URL, options?: InternalHttpOptions & GithubHttpOptions, okToRetry?: boolean): Promise<HttpResponse<T>>;
    requestGraphql<T = unknown>(query: string, options?: GraphqlOptions): Promise<GithubGraphqlResponse<T> | null>;
    queryRepoField<T = Record<string, unknown>>(query: string, fieldName: string, options?: GraphqlOptions): Promise<T[]>;
    /**
     * Get the raw text file from a URL.
     * Only use this method to fetch text files.
     *
     * @param url Full API URL, contents path or path inside the repository to the file
     * @param options
     *
     * @example url = 'https://api.github.com/repos/renovatebot/renovate/contents/package.json'
     * @example url = 'renovatebot/renovate/contents/package.json'
     * @example url = 'package.json' & options.repository = 'renovatebot/renovate'
     */
    getRawTextFile(url: string, options?: InternalHttpOptions & GithubHttpOptions): Promise<HttpResponse>;
}
export {};
