import { createEventHandler } from "./event-handler/index"; import { EmitterWebhookEvent, EmitterWebhookEventName, HandlerFunction, RemoveHandlerFunction, Options, WebhookError, WebhookEventHandlerError, EmitterWebhookEventWithStringPayloadAndSignature, EmitterWebhookEventWithSignature } from "./types"; export { createNodeMiddleware } from "./middleware/node/index"; export { emitterEventNames } from "./generated/webhook-names"; export type Iverify = { /** @deprecated Passing a JSON payload object to `verify()` is deprecated and the functionality will be removed in a future release of `@octokit/webhooks`. */ (eventPayload: object, signature: string): Promise; (eventPayload: string, signature: string): Promise; }; export type IverifyAndReceive = { /** @deprecated Passing a JSON payload object to `verifyAndReceive()` is deprecated and the functionality will be removed in a future release of `@octokit/webhooks`. */ (options: EmitterWebhookEventWithSignature): Promise; (options: EmitterWebhookEventWithStringPayloadAndSignature): Promise; }; declare class Webhooks { sign: (payload: string | object) => Promise; verify: Iverify; on: (event: E | E[], callback: HandlerFunction) => void; onAny: (callback: (event: EmitterWebhookEvent) => any) => void; onError: (callback: (event: WebhookEventHandlerError) => any) => void; removeListener: (event: E | E[], callback: RemoveHandlerFunction) => void; receive: (event: EmitterWebhookEvent) => Promise; verifyAndReceive: IverifyAndReceive; constructor(options: Options & { secret: string; }); } export { createEventHandler, Webhooks, EmitterWebhookEvent, EmitterWebhookEventName, WebhookError, };