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.
Type Parameters
Section titled “Type Parameters”Data extends APIWebhookEventPayload
Env extends BlankEnv
Variables
Section titled “Variables”Variables extends object
ContextWithData
Section titled “ContextWithData”ContextWithData = Context<{ Bindings: Env; Variables: Variables; }>
Parameters
Section titled “Parameters”ContextWithData
Returns
Section titled “Returns”Promise<Response> | Response
