OpenAI starter module
Response events
Routes completed background responses and connected service events with repeat-safe handling.
- Files
- 5
- Lines
- 360
- Languages
- TypeScript
Included files
This page lists paths and purposes, not source contents.
src/webhooks/background-route.ts
Accepts a guarded prompt and starts an OpenAI background response.
TypeScript
86 lines
src/webhooks/create-background-response.ts
Starts an allowance-checked background response whose completion arrives by webhook.
TypeScript
63 lines
src/webhooks/handlers/response-completed.ts
Retrieves a completed background response, records usage, and runs optional follow-up steps.
TypeScript
78 lines
src/webhooks/handlers/response-not-completed.ts
Releases a failed background request claim and sends a best-effort status notice.
TypeScript
39 lines
src/webhooks/route.ts
Verifies OpenAI webhook signatures and processes each delivery exactly once.
TypeScript
94 lines