File size: 1,393 Bytes
4e83772 fc50dd8 4e83772 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | import { GithubCommitType, GithubRepoResponse, GithubRepositoryBranch, GithubRepositoryOwner } from "@/constants/types/github.js";
import { IUser } from "@/models/User.js";
export interface IWebhookService {
webhookHandleNewRequest(userId: string, redirectPath: string): Promise<string>;
webhookInstaltnCreateEvent(installationId: number, account: GithubRepositoryOwner, repos: GithubRepoResponse[]): Promise<void>;
webhookInstaltnDeleteEvent(installationId: number, account: GithubRepositoryOwner, repos: GithubRepoResponse[]): Promise<void>;
webhookRepositoryAddRemove(added: GithubRepoResponse[], removed: GithubRepoResponse[]): Promise<void>;
webhookCodePushEvent(
repo: GithubRepoResponse,
meta: {
sender: GithubRepositoryOwner;
installationId: number;
headCommit: GithubCommitType;
ref: string;
allChanges: string[];
deployRequired: boolean;
},
): Promise<{ status: string; reason: string }>;
webhookCheckRunReRequestEvent(
repo: GithubRepoResponse,
meta: {
sender: GithubRepositoryOwner;
installationId: number;
headCommitId: string;
},
): Promise<{ status: string; reason: string }>;
githubSecondaryEvents(installationId: string, userId: string): Promise<string>;
removeGhbInstallation(installationId: string, userId: string, skipUserCheck?: boolean): Promise<void>;
removeGhbInstallationManual(userId: string): Promise<boolean>;
}
|