/// import { Server } from "http"; import express from "express"; import { Logger } from "pino"; import { WebhookEvent, Webhooks } from "@octokit/webhooks"; import { ProbotOctokit } from "./octokit/probot-octokit"; import { ApplicationFunction, DeprecatedLogger, Options, ProbotWebhooks } from "./types"; export declare type Constructor = new (...args: any[]) => T; export declare class Probot { static run(appFn: ApplicationFunction | string[]): Promise; static version: string; static defaults>(this: S, defaults: Options): { new (...args: any[]): { [x: string]: any; }; } & S; server: express.Application; webhooks: ProbotWebhooks; log: DeprecatedLogger; version: String; on: ProbotWebhooks["on"]; auth: (installationId?: number, log?: Logger) => Promise>; throttleOptions: any; private httpServer?; private state; constructor(options?: Options); /** * @deprecated `probot.webhook` is deprecated. Use `probot.webhooks` instead */ get webhook(): Webhooks; receive(event: WebhookEvent): Promise; load(appFn: string | ApplicationFunction | ApplicationFunction[]): this; setup(appFns: Array): void; start(): Server; stop(): void; /** * Get an {@link http://expressjs.com|express} router that can be used to * expose HTTP endpoints * * ``` * module.exports = ({ app, getRouter }) => { * // Get an express router to expose new HTTP endpoints * const router = getRouter('/my-app'); * * // Use any middleware * router.use(require('express').static(__dirname + '/public')); * * // Add a new route * router.get('/hello-world', (req, res) => { * res.end('Hello World'); * }); * }; * ``` * * @param path - the prefix for the routes* @param path * * @deprecated "app.route()" is deprecated, use the "getRouter()" argument from the app function instead: "({ app, getRouter }) => { ... }" */ route(path?: string): express.Router; /** * @deprecated this.internalRouter can be removed once we remove the Application class */ private internalRouter; /** * @deprecated use probot.log instead */ get logger(): DeprecatedLogger; /** * @deprecated "app.router" is deprecated, use "getRouter()" from the app function instead: "({ app, getRouter }) => { ... }" */ get router(): express.Router; }