docs: update public api docs

This commit is contained in:
inman
2026-06-08 11:24:54 +08:00
parent 288e31d641
commit d98e58adfa
2 changed files with 33 additions and 9 deletions

View File

@@ -142,10 +142,21 @@ export async function GET(request: Request) {
},
WebhookPayload: {
type: "object",
required: ["event", "job"],
required: ["jobId", "status", "capability", "outputAssetIds", "updatedAt"],
properties: {
event: { type: "string", example: "generation.succeeded" },
job: { $ref: "#/components/schemas/GenerationJob" }
jobId: { type: "string", example: "job_mpqe3wtt_12ed738079" },
status: { $ref: "#/components/schemas/GenerationStatus" },
capability: { $ref: "#/components/schemas/GenerationCapability" },
outputAssetIds: { type: "array", items: { type: "string" } },
error: {
type: "object",
properties: {
code: { oneOf: [{ type: "string" }, { type: "number" }] },
message: { type: "string" },
retryable: { type: "boolean" }
}
},
updatedAt: { type: "string", format: "date-time" }
}
}
}