Skip to content

WebhookEventHandlerFnWithRequest

Type Alias: WebhookEventHandlerFnWithRequest<Data, Env, Variables, ContextWithData>

Section titled “Type Alias: WebhookEventHandlerFnWithRequest<Data, Env, Variables, ContextWithData>”

WebhookEventHandlerFnWithRequest<Data, Env, Variables, ContextWithData> = (c) => Promise<Response> | Response

Defined in: types/webhook.ts:17

A function type for handling webhook events, where the context includes typed variables for the event data. The return type is a Response or a Promise that resolves to a Response, which is suitable for standard server environments.

Data extends APIWebhookEventPayload

Env extends BlankEnv

Variables extends object

ContextWithData = Context<{ Bindings: Env; Variables: Variables; }>

ContextWithData

Promise<Response> | Response