import { Octokit } from '@octokit/rest'; import { WrappedError } from '../utils/wrapped-error'; import { Tree } from './types'; export declare class GithubConnector { private readonly octokit; constructor(octokit: Octokit); commit({ owner, repo, message, newTreeSha, currentCommitSha }: { owner: string; repo: string; message: string; newTreeSha: string; currentCommitSha: string; }): Promise<{ sha: string; tree: { sha: string; url: string; }; }>; getFile({ owner, repo, path, branch }: { owner: string; repo: string; path: string; branch: string; }): Promise<{ data: string; sha: string; }>; createTree({ owner, repo, parentTreeSha, tree }: { owner: string; repo: string; parentTreeSha: string; tree: Tree[]; }): Promise<{ sha: string; url: string; truncated: boolean; tree: { path?: string | undefined; mode?: string | undefined; type?: string | undefined; sha?: string | undefined; size?: number | undefined; url?: string | undefined; }[]; }>; createBlob({ org, repo, content }: { org: string; repo: string; content: string; }): Promise<{ url: string; sha: string; }>; getCurrentCommit({ org, repo, branch }: { org: string; repo: string; branch: string; }): Promise<{ commitSha: string; treeSha: string; }>; doesBranchExist({ org, repo, branch }: { org: string; repo: string; branch: string; }): Promise; createBranch({ org, repo, branch, currentCommitSha }: { org: string; repo: string; branch: string; currentCommitSha: string; }): Promise<{ type: string; sha: string; url: string; }>; updateRef({ org, repo, branch, commitSha }: { org: string; repo: string; branch: string; commitSha: string; }): Promise>; } export declare class GithubError extends WrappedError { constructor(message: string, error: any); }