feat(web): add TypeScript type definitions
This commit is contained in:
61
web/types/index.ts
Normal file
61
web/types/index.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
export interface AuthResponse {
|
||||
accessToken: string;
|
||||
refreshToken: string;
|
||||
activeOrg: ActiveOrg;
|
||||
}
|
||||
|
||||
export interface ActiveOrg {
|
||||
id: string;
|
||||
name: string;
|
||||
slug: string;
|
||||
role: string;
|
||||
}
|
||||
|
||||
export interface User {
|
||||
id: string;
|
||||
email: string;
|
||||
displayName: string;
|
||||
activeOrg: ActiveOrg;
|
||||
}
|
||||
|
||||
export interface Incident {
|
||||
id: string;
|
||||
serviceId: string;
|
||||
serviceName: string;
|
||||
title: string;
|
||||
description?: string;
|
||||
status: 'triggered' | 'acknowledged' | 'mitigated' | 'resolved';
|
||||
version: number;
|
||||
assignedToUserId?: string;
|
||||
assignedToUserName?: string;
|
||||
createdAt: string;
|
||||
acknowledgedAt?: string;
|
||||
mitigatedAt?: string;
|
||||
resolvedAt?: string;
|
||||
}
|
||||
|
||||
export interface IncidentEvent {
|
||||
id: string;
|
||||
eventType: string;
|
||||
actorUserId?: string;
|
||||
actorUserName?: string;
|
||||
payload?: string;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
export interface Service {
|
||||
id: string;
|
||||
name: string;
|
||||
slug: string;
|
||||
description?: string;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
export interface OrgMember {
|
||||
id: string;
|
||||
userId: string;
|
||||
email: string;
|
||||
displayName: string;
|
||||
role: string;
|
||||
joinedAt: string;
|
||||
}
|
||||
Reference in New Issue
Block a user