( eventId: string, )
| 103 | |
| 104 | /** Fetch runs for a single event (GET /v1/events/{eventId}/runs) – runs are the actual jobs */ |
| 105 | export const fetchInngestRunsForEvent = async ( |
| 106 | eventId: string, |
| 107 | ): Promise<InngestRun[]> => { |
| 108 | const res = await fetch( |
| 109 | `${baseUrl}/v1/events/${encodeURIComponent(eventId)}/runs`, |
| 110 | { |
| 111 | headers: { |
| 112 | Authorization: `Bearer ${signingKey}`, |
| 113 | "Content-Type": "application/json", |
| 114 | }, |
| 115 | }, |
| 116 | ); |
| 117 | if (!res.ok) { |
| 118 | logger.warn("Inngest runs API error", { |
| 119 | eventId, |
| 120 | status: res.status, |
| 121 | body: await res.text(), |
| 122 | }); |
| 123 | return []; |
| 124 | } |
| 125 | const body = (await res.json()) as { data?: InngestRun[] }; |
| 126 | return Array.isArray(body.data) ? body.data : []; |
| 127 | }; |
| 128 | |
| 129 | /** One row for the queue UI (BullMQ-compatible shape) */ |
| 130 | export type DeploymentJobRow = { |
no outgoing calls
no test coverage detected