UNPKG

1.06 kBTypeScriptView Raw
1import type { Logger } from "pino";
2import type { EmitterWebhookEvent as WebhookEvent } from "@octokit/webhooks";
3import { ProbotOctokit } from "./octokit/probot-octokit.js";
4import type { ApplicationFunction, ApplicationFunctionOptions, Options, ProbotWebhooks } from "./types.js";
5export type Constructor<T = any> = new (...args: any[]) => T;
6export declare class Probot {
7 static version: string;
8 static defaults<S extends Constructor>(this: S, defaults: Options): {
9 new (...args: any[]): {
10 [x: string]: any;
11 };
12 } & S;
13 webhooks: ProbotWebhooks;
14 webhookPath: string;
15 log: Logger;
16 version: String;
17 on: ProbotWebhooks["on"];
18 onAny: ProbotWebhooks["onAny"];
19 onError: ProbotWebhooks["onError"];
20 auth: (installationId?: number, log?: Logger) => Promise<ProbotOctokit>;
21 private state;
22 constructor(options?: Options);
23 receive(event: WebhookEvent): Promise<void>;
24 load(appFn: ApplicationFunction | ApplicationFunction[], options?: ApplicationFunctionOptions): Promise<void>;
25}