2026-02-23 17:48:53 +00:00
|
|
|
import type { GeoCheck, GroupedGeoCheck } from "@/types/geoCheck.js";
|
2026-02-24 22:30:28 +00:00
|
|
|
import type { GeoContinent } from "@/types/geoCheck.js";
|
2026-02-23 17:48:53 +00:00
|
|
|
|
2026-02-24 23:20:36 +00:00
|
|
|
export interface GeoChecksQueryResult {
|
|
|
|
|
geoChecksCount: number;
|
|
|
|
|
geoChecks: GeoCheck[];
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-23 17:48:53 +00:00
|
|
|
export interface IGeoChecksRepository {
|
2026-02-24 18:19:51 +00:00
|
|
|
createGeoChecks(geoChecks: Omit<GeoCheck, "id" | "__v" | "createdAt" | "updatedAt">[]): Promise<GeoCheck[]>;
|
2026-02-24 23:20:36 +00:00
|
|
|
findByMonitorId(
|
|
|
|
|
monitorId: string,
|
|
|
|
|
sortOrder: string,
|
|
|
|
|
dateRange: string,
|
|
|
|
|
page: number,
|
|
|
|
|
rowsPerPage: number,
|
|
|
|
|
continent?: GeoContinent
|
|
|
|
|
): Promise<GeoChecksQueryResult>;
|
2026-02-23 17:48:53 +00:00
|
|
|
findByMonitorIdAndDateRange(monitorId: string, startDate: Date, endDate: Date): Promise<GeoCheck[]>;
|
2026-02-24 22:30:28 +00:00
|
|
|
findGroupedByMonitorIdAndDateRange(
|
|
|
|
|
monitorId: string,
|
|
|
|
|
startDate: Date,
|
|
|
|
|
endDate: Date,
|
|
|
|
|
dateFormat: string,
|
|
|
|
|
continent?: GeoContinent
|
|
|
|
|
): Promise<GroupedGeoCheck[]>;
|
2026-02-23 17:48:53 +00:00
|
|
|
deleteByMonitorId(monitorId: string): Promise<number>;
|
|
|
|
|
deleteByTeamId(teamId: string): Promise<number>;
|
|
|
|
|
}
|