Files
Checkmate/server/src/repositories/maintenance-windows/IMaintenanceWindowsRepository.ts
T

16 lines
770 B
TypeScript
Raw Normal View History

2026-01-21 23:26:13 +00:00
import type { MaintenanceWindow } from "@/types/index.js";
export interface IMaintenanceWindowsRepository {
// create
create(data: Partial<MaintenanceWindow>): Promise<MaintenanceWindow>;
// fetch
findById(id: string, teamId: string): Promise<MaintenanceWindow>;
2026-01-22 17:44:03 +00:00
findByMonitorId(monitorId: string, teamId: string): Promise<MaintenanceWindow[]>;
2026-03-11 11:50:51 -07:00
findByTeamId(teamId: string, page: number, rowsPerPage: number, field?: string, order?: string, active?: boolean): Promise<MaintenanceWindow[]>;
2026-01-21 23:26:13 +00:00
// update
2026-01-22 17:44:03 +00:00
updateById(id: string, teamId: string, data: Partial<MaintenanceWindow>): Promise<MaintenanceWindow>;
2026-01-21 23:26:13 +00:00
// delete
2026-01-22 17:44:03 +00:00
deleteById(id: string, teamId: string): Promise<MaintenanceWindow>;
2026-01-21 23:26:13 +00:00
// other
2026-03-11 11:50:51 -07:00
countByTeamId(teamId: string, active?: boolean): Promise<number>;
2026-01-21 23:26:13 +00:00
}