Files
Checkmate/server/src/repositories/incidents/IIncidentsRepository.ts
T

23 lines
686 B
TypeScript
Raw Normal View History

2026-01-19 23:41:24 +00:00
import type { Incident } from "@/types/index.js";
export interface IIncidentsRepository {
// create
create(incident: Partial<Incident>): Promise<Incident>;
// fetch
findActiveByIncidentId(incidentId: string, teamId: string): Promise<Incident | null>;
findActiveByMonitorId(monitorId: string, teamId: string): Promise<Incident | null>;
findByTeamId(
teamId: string,
2026-01-20 00:02:27 +00:00
startDate: Date,
endDate: Date,
2026-01-19 23:41:24 +00:00
page: number,
rowsPerPage: number,
sortOrder?: string,
status?: string,
monitorId?: string,
resolutionType?: string
): Promise<Incident[]>;
// update
updateById(incidentId: string, teamId: string, updateData: Partial<Incident>): Promise<Incident>;
// delete
}