import { AppBit, Logger } from '@o/kit';
import { GithubComment, GithubIssue, GithubOrganization, GithubPerson, GithubRepository } from './GithubModels';
/**
 * Options for loadIssues and loadPullRequests methods.
 */
export interface GithubLoaderIssueOrPullRequestStreamOptions {
    organization: string;
    repository: string;
    cursor: string;
    loadedCount: number;
    handler: (issue: GithubIssue, cursor?: string, loadedCount?: number, isLast?: boolean) => Promise<boolean> | boolean;
}
/**
 * Performs requests GitHub API.
 */
export declare class GithubLoader {
    private app;
    private log;
    private loader;
    private totalCost;
    private remainingCost;
    constructor(app: AppBit, log?: Logger);
    /**
     * Loads all user organizations.
     */
    loadOrganizations(): Promise<GithubOrganization[]>;
    /**
     * Loads all user repositories.
     */
    loadUserRepositories(): Promise<GithubRepository[]>;
    /**
     * Loads repository information for all given repository names.
     */
    loadRepositories(names: string[]): Promise<GithubRepository[]>;
    /**
     * Loads all issues and executes a given callback for each loaded issue.
     */
    loadIssues(options?: GithubLoaderIssueOrPullRequestStreamOptions): Promise<void>;
    /**
     * Loads all pull requests and executes a given callback for each loaded issue.
     */
    loadPullRequests(options?: GithubLoaderIssueOrPullRequestStreamOptions): Promise<void>;
    /**
     * Loads all issue/pull request comments.
     */
    loadComments(organization: string, repository: string, issueOrPrNumber: number, cursor?: string, loadedCount?: number): Promise<GithubComment[]>;
    /**
     * Loads github people.
     */
    loadPeople(organization: string): Promise<GithubPerson[]>;
    private loadOrganizationsByCursor;
    private loadRepositoriesByCursor;
    private loadPeopleByCursor;
    /**
     * Executes load query.
     */
    private load;
}
