import type { Check, ChecksQueryResult, ChecksSummary, HardwareChecksResult, PageSpeedChecksResult, UptimeChecksResult, } from "@/domain/checks/check.type.js"; import type { MonitorType } from "@/domain/monitors/monitor.types.js"; import type { LatestChecksMap } from "@/domain/checks/check.repository.mongo.js"; export interface IChecksRepository { // create create(check: Check): Promise; createChecks(checks: Check[]): Promise; // single fetch // collection fetch findByMonitorId( monitorId: string, sortOrder: string, dateRange: string, filter: string | undefined, page: number, rowsPerPage: number, status: boolean | undefined ): Promise; findByTeamId( sortOrder: string, dateRange: string, filter: string | undefined, page: number, rowsPerPage: number, teamId: string ): Promise; findLatestByMonitorIds(monitorIds: string[], options?: { limitPerMonitor?: number }): Promise; findByDateRangeAndMonitorId( monitorId: string, startDate: Date, endDate: Date, dateString: string, options?: { type?: MonitorType } ): Promise; findSummaryByTeamId(teamId: string, dateRange: string): Promise; findUnevaluatedByMonitorId(monitorId: string, since: number): Promise; // update //delete deleteByMonitorId(monitorId: string): Promise; deleteByTeamId(teamId: string): Promise; deleteByMonitorIdsNotIn(monitorIds: string[]): Promise; deleteOlderThan(date: Date): Promise; }