import { Repository, Collaborator, User, PullRequest, Organization, Properties } from './github-model'; export declare const githubKeyServicePath = "/services/github"; export declare const GithubService: unique symbol; /** * Representation of JSON-RPC service for GitHub communication. */ export interface GithubService { /** * Get specified repository. * * @param {string} owner Owner of the repository. * @param {string} repository Name of the repository. */ getRepository(owner: string, repository: string, properties?: Properties): Promise; /** * Get repositories owned by a user. * * @param {string} user Owner of the repository. * @param {number} [pageNumber=0] Number of the page (optional, 0 by default). * @param {number} [pageSize=0] Size of the page (optional, 0 by default). */ getUserRepositories(user: string, pageNumber?: number, pageSize?: number, properties?: Properties): Promise; /** * Get repositories owned by an organization. * * @param {string} organization Organization witch repository belongs to. * @param {number} [pageNumber=0] Number of the page (optional, 0 by default). * @param {number} [pageSize=0] Size of the page (optional, 0 by default). */ getOrganizationRepositories(organization: string, pageNumber?: number, pageSize?: number, properties?: Properties): Promise; /** * Get all repositories from logged in user. * * @param {number} [pageNumber=0] Number of the page (optional, 0 by default). * @param {number} [pageSize=0] Size of the page (optional, 0 by default). */ getAllRepositories(pageNumber?: number, pageSize?: number, properties?: Properties): Promise; /** * Get Forks of the repository. * * @param {string} owner Owner of the repository. * @param {string} repository Name of the repository. * @param {number} [pageNumber=0] Number of the page (optional, 0 by default). * @param {number} [pageSize=0] Size of the page (optional, 0 by default). */ getForks(owner: string, repository: string, pageNumber?: number, pageSize?: number, properties?: Properties): Promise; /** * Create fork of the repository. * * @param {string} owner Owner of the repository. * @param {string} repository Name of the repository. */ createFork(owner: string, repository: string, properties?: Properties): Promise; /** * Comment issue of the repository. * * @param {string} owner Owner of the repository. * @param {string} repository Name of the repository. * @param {number} id Id of the issue. * @param {string} comment Comment. */ commentIssue(owner: string, repository: string, id: number, comment: string, properties?: Properties): Promise; /** * Get specified pull-request of the repository. * * @param {string} owner Owner of the repository. * @param {string} repository Name of the repository. * @param {number} id Id of the pull-request. */ getPullRequest(owner: string, repository: string, id: number, properties?: Properties): Promise; /** * Get pull-requests of the repository. * * @param {string} owner Owner of the repository. * @param {string} repository Name of the repository. * @param {number} [pageNumber=0] Number of the page (optional, 0 by default). * @param {number} [pageSize=0] Size of the page (optional, 0 by default). */ getPullRequests(owner: string, repository: string, pageNumber?: number, pageSize?: number, properties?: Properties): Promise; /** * Create pull-request for repository. * * @param {string} owner Owner of the repository. * @param {string} repository Name of the repository. * @param {string} head Branch (or git ref) where the changes are implemented. * @param {string} base Branch (or git ref) where the changes are going to be pulled into. * @param {string} title Title of the pull request. */ createPullRequest(owner: string, repository: string, head: string, base: string, title: string, properties?: Properties): Promise; /** * Update the pull-request. * * @param {string} owner Owner of the repository. * @param {string} repository Name of the repository. * @param {string} id Id of the pull-request. * @param pullRequest Pull-Request object that contains updated fields. */ updatePullRequest(owner: string, repository: string, id: string, pullRequest: PullRequest, properties?: Properties): Promise; /** * Get organizations of the logined user. * * @param {number} [pageNumber=0] Number of the page (optional, 0 by default). * @param {number} [pageSize=0] Size of the page (optional, 0 by default). */ getOrganizations(pageNumber?: number, pageSize?: number, properties?: Properties): Promise; /** * Get current logined user. */ getCurrentUser(properties?: Properties): Promise; /** * Get collaborators of the repository. * * @param {string} owner Owner of the repository. * @param {string} repository Name of the repository. * @param {number} [pageNumber=0] Number of the page (optional, 0 by default). * @param {number} [pageSize=0] Size of the page (optional, 0 by default). */ getCollaborators(owner: string, repository: string, pageNumber?: number, pageSize?: number, properties?: Properties): Promise; /** * Upload SSH key. * * @param {string} title Tile of the key. */ uploadSshKey(title: string, properties?: Properties): Promise; } export declare const SshKeyServer: unique symbol; /** * Representation of JSON-RPC service for SSH key pair management. */ export interface SshKeyServer { generate(service: string, name: string): Promise; create(sshKeyPair: SshKeyPair): Promise; get(service: string, name: string): Promise; getAll(service: string): Promise; delete(service: string, name: string): Promise; } /** * Representation of a SSH key pair. */ export interface SshKeyPair { /** * Che service that uses SSH key pair, e.g. workspace, machine, vcs. */ service: string; /** * Key pair identifier. */ name: string; privateKey?: string; publicKey?: string; } //# sourceMappingURL=github-service.d.ts.map