feat(flywheel): expose incident processing timeline
All checks were successful
CD Pipeline / build-and-deploy (push) Successful in 10m56s

This commit is contained in:
Your Name
2026-04-29 23:38:30 +08:00
parent dae0aa2312
commit 4a57c2d04f
12 changed files with 984 additions and 12 deletions

View File

@@ -175,6 +175,11 @@ export const apiClient = {
return handleResponse<IncidentResponse>(res)
},
async getIncidentTimeline(incidentId: string) {
const res = await fetch(`${API_BASE_URL}/incidents/${incidentId}/timeline`)
return handleResponse<IncidentTimelineResponse>(res)
},
async generateProposal(incidentId: string) {
const res = await fetch(`${API_BASE_URL}/incidents/${incidentId}/proposal`, {
method: 'POST',
@@ -279,6 +284,37 @@ export interface IncidentListResponse {
incidents: IncidentResponse[]
}
export interface IncidentTimelineEvent {
stage: string
status: string
title: string
description: string | null
actor: string | null
timestamp: string | null
source_table: string | null
data: Record<string, unknown>
}
export interface IncidentTimelineStage extends IncidentTimelineEvent {
label: string
events: IncidentTimelineEvent[]
}
export interface IncidentTimelineResponse {
incident_id: string
title: string
status: string
severity: string
started_at: string | null
updated_at: string | null
resolved_at: string | null
affected_services: string[]
approval_ids: string[]
timeline: IncidentTimelineStage[]
events: IncidentTimelineEvent[]
ascii_timeline: string
}
export interface BlastRadius {
affected_pods: number
estimated_downtime: string