wire client
This commit is contained in:
1 parent
506133af29
commit
c15d6e0851
11 files changed
+189
-116
No files matched your search
@@ -1,4 +1,9 @@
|
||||
import type { GroupedCheck, CheckSnapshot, GroupedUptimeCheck } from "@/Types/Check";
|
||||
import type {
|
||||
GroupedCheck,
|
||||
CheckSnapshot,
|
||||
GroupedUptimeCheck,
|
||||
DailyCheckBucket,
|
||||
} from "@/Types/Check";
|
||||
import type { PageSpeedGroupedCheck } from "@/Types/Check";
|
||||
import type { GeoContinent } from "@/Types/GeoCheck";
|
||||
export type { GeoContinent } from "@/Types/GeoCheck";
|
||||
@@ -149,6 +154,7 @@ export interface Monitor {
|
||||
dnsServer?: string;
|
||||
dnsRecordType?: DnsRecordType;
|
||||
recentChecks: CheckSnapshot[];
|
||||
dailyChecks?: DailyCheckBucket[];
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
@@ -24,13 +24,16 @@ export const STATUS_PAGE_THEME_MODES = ["auto", "light", "dark"] as const;
|
||||
export type StatusPageThemeMode = (typeof STATUS_PAGE_THEME_MODES)[number];
|
||||
export const DEFAULT_STATUS_PAGE_THEME_MODE: StatusPageThemeMode = "auto";
|
||||
|
||||
export const STATUS_PAGE_RANGES = ["latest", "30d", "60d", "90d"] as const;
|
||||
export const STATUS_PAGE_DAY_RANGES = ["30d", "60d", "90d"] as const;
|
||||
export type StatusPageDayRange = (typeof STATUS_PAGE_DAY_RANGES)[number];
|
||||
export const STATUS_PAGE_RANGES = ["latest", ...STATUS_PAGE_DAY_RANGES] as const;
|
||||
export type StatusPageRange = (typeof STATUS_PAGE_RANGES)[number];
|
||||
|
||||
export const STATUS_PAGE_RANGE_DAYS: Record<
|
||||
Exclude<StatusPageRange, "latest">,
|
||||
number
|
||||
> = { "30d": 30, "60d": 60, "90d": 90 };
|
||||
export const STATUS_PAGE_RANGE_DAYS: Record<StatusPageDayRange, number> = {
|
||||
"30d": 30,
|
||||
"60d": 60,
|
||||
"90d": 90,
|
||||
};
|
||||
|
||||
export const isStatusPageRange = (value: string | null): value is StatusPageRange =>
|
||||
STATUS_PAGE_RANGES.some((range) => range === value);
|
||||
@@ -78,4 +81,7 @@ export interface StatusPage {
|
||||
export interface StatusPageResponse {
|
||||
statusPage: StatusPage;
|
||||
monitors: Monitor[];
|
||||
range?: StatusPageDayRange; // present only when range !== "latest"
|
||||
bucketTimezone?: string;
|
||||
checkTTLDays?: number;
|
||||
}
|
||||
Reference in new issue
Block a user