import type * as Hedra from "../index.js"; /** * Body of a webhook delivery: the `GET /jobs/{job_id}` result envelope without its poll-only fields (`logs`, `cost`, `currency`) — poll the job to read those. */ export interface WebhookPayload { /** The job this envelope describes. */ job_id: string; /** The resolved model id this job ran on. */ model: string; /** The quality level this job ran at; present only for models that offer quality levels. */ quality?: (string | null) | undefined; status: Hedra.JobStatus; /** The prompt this job ran with. When `enhance_prompt` was set, this is the rewritten prompt the model received rather than the one submitted. Absent on models that take no prompt. */ prompt?: (string | null) | undefined; /** The job's outputs — always an array, even for a single output; empty until the job completes. Always empty for a chat completion, whose text the chat response returned. */ outputs?: Hedra.OutputItem[] | undefined; /** Timing for this job; present on completed jobs, and on every finished chat completion. */ metrics?: (Hedra.Metrics | null) | undefined; /** The tokens a chat completion used; absent for other jobs and before a chat completion's usage is recorded. */ usage?: (Hedra.ChatUsage | null) | undefined; /** Why the job failed; null unless `status` is `FAILED`. */ error?: (Hedra.ErrorEnvelope | null) | undefined; }