| 281 | } |
| 282 | |
| 283 | async updateStatus(runId: string, id: string, status: StatusUpdate) { |
| 284 | const apiKey = await this.#apiKey(); |
| 285 | |
| 286 | this.#logger.debug("Update status", { |
| 287 | id, |
| 288 | status, |
| 289 | }); |
| 290 | |
| 291 | return await zodfetch( |
| 292 | JobRunStatusRecordSchema, |
| 293 | `${this.#apiUrl}/api/v1/runs/${runId}/statuses/${id}`, |
| 294 | { |
| 295 | method: "PUT", |
| 296 | headers: { |
| 297 | "Content-Type": "application/json", |
| 298 | Authorization: `Bearer ${apiKey}`, |
| 299 | }, |
| 300 | body: JSON.stringify(status), |
| 301 | } |
| 302 | ); |
| 303 | } |
| 304 | |
| 305 | async updateSource( |
| 306 | client: string, |