feat(flywheel): expose incident processing timeline
All checks were successful
CD Pipeline / build-and-deploy (push) Successful in 10m56s
All checks were successful
CD Pipeline / build-and-deploy (push) Successful in 10m56s
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user