WebhookOptions
Auto-generated API reference for WebhookOptions.
Interface: WebhookOptions<TContext>
Defined in: background.ts:196
#Type Parameters
#TContext
TContext = unknown
#Properties
#agent
agent:
AgentHandle<TContext>
Defined in: background.ts:197
#context?
optionalcontext?:TContext| ((req) =>TContext)
Defined in: background.ts:204
Pass-through context for the agent.
#extractTask?
optionalextractTask?: (req) =>string
Defined in: background.ts:202
Extract the task string from the webhook body. Default:
body.task for JSON bodies, or the raw string.
#Parameters
req
#Returns
string
#onEvent?
optionalonEvent?: (event) =>void
Defined in: background.ts:207
#Parameters
event
error?
string
type
"received" | "rejected" | "handled"
#Returns
void
#verify?
optionalverify?: (req) =>boolean|Promise<boolean>
Defined in: background.ts:206
Verify the incoming request (signature, token, etc.).
#Parameters
req
#Returns
boolean | Promise<boolean>