/// <reference types="bunyan" />
import * as Octokit from '@octokit/rest';
import { Logger } from './logging';
/**
 * the [@octokit/rest Node.js module](https://github.com/octokit/rest.js),
 * which wraps the [GitHub API](https://developer.github.com/v3/) and allows
 * you to do almost anything programmatically that you can do through a web
 * browser.
 * @typedef github
 * @see {@link https://github.com/octokit/rest.js}
 */
export declare const EnhancedGitHubClient: (options?: Options) => OctokitWithPagination;
export interface Options extends Octokit.Options {
    debug: boolean;
    logger: Logger;
    limiter?: any;
}
export interface OctokitRequestOptions {
    method: string;
    url: string;
    headers: any;
    query?: string;
    variables?: Variables;
}
export interface OctokitResult {
    meta: {
        status: string;
    };
}
export interface OctokitError {
    code: number;
    status: string;
}
export interface OctokitWithPagination extends Octokit {
    paginate: (res: Promise<Octokit.AnyResponse>, callback: (results: Octokit.AnyResponse) => void) => Promise<any[]>;
    hook: {
        error: (when: 'request', callback: (error: OctokitError, options: OctokitRequestOptions) => void) => void;
        before: (when: 'request', callback: (result: OctokitResult, options: OctokitRequestOptions) => void) => void;
        after: (when: 'request', callback: (result: OctokitResult, options: OctokitRequestOptions) => void) => void;
    };
    request: (OctokitRequestOptions) => Promise<Octokit.AnyResponse>;
}
export interface Headers {
    [key: string]: string;
}
export declare type Variables = {
    [key: string]: any;
};
