@graphteon/juricode
Version:
We are forging the future with lines of digital steel
40 lines (39 loc) • 1.01 kB
TypeScript
export interface GitUser {
id: string;
login: string;
avatar_url: string;
company?: string;
name?: string;
email?: string;
}
export interface GitRepository {
id: string;
name: string;
full_name: string;
description?: string;
private: boolean;
html_url: string;
default_branch: string;
}
export interface Branch {
name: string;
protected: boolean;
}
export interface GitChange {
path: string;
status: string;
}
export interface GitChangeDiff {
path: string;
diff: string;
}
export declare class GitService {
private baseUrl;
constructor();
getGitUser(): Promise<GitUser>;
searchRepositories(query: string, perPage?: number): Promise<GitRepository[]>;
getUserRepositories(): Promise<GitRepository[]>;
getRepositoryBranches(repository: string): Promise<Branch[]>;
getGitChanges(conversationId: string): Promise<GitChange[]>;
getGitChangeDiff(conversationId: string, path: string): Promise<GitChangeDiff>;
}