import CurlSender from '../../Transport/Curl/CurlSender'; import Webhook from '../Database/Webhook'; import WebhookRepository from '../Database/WebhookRepository'; import ApplicationLoader from '../ApplicationLoader'; import { ApplicationInstall } from '../Database/ApplicationInstall'; import ApplicationInstallRepository from '../Database/ApplicationInstallRepository'; import AApplication from '../Base/AApplication'; interface IWebhookBody { name?: string; topology?: string; } interface IWebhookForm { name: string; default: boolean; enabled: boolean; topology: string; } export default class WebhookManager { private _loader; private _curl; private _webhookRepository; private _appRepository; constructor(_loader: ApplicationLoader, _curl: CurlSender, _webhookRepository: WebhookRepository, _appRepository: ApplicationInstallRepository); getWebhooks(app: AApplication, user: string): Promise; subscribeWebhooks(name: string, user: string, data: IWebhookBody): Promise; unsubscribeWebhooks(name: string, user: string, data: IWebhookBody): Promise; private _getAllWebhooks; private _getApplication; private _loadApplicationInstall; private _validateBody; } export {};