🐛 AdGuard Home time unit fix (#1005)

This commit is contained in:
Manuel
2023-08-12 12:10:21 +02:00
committed by GitHub
parent c955b04b48
commit 9519dfaf0a
4 changed files with 12 additions and 20 deletions

View File

@@ -1,7 +1,7 @@
import { z } from 'zod';
export const adGuardApiStatsResponseSchema = z.object({
time_units: z.enum(['hours']),
time_units: z.enum(['hours', 'days']),
top_queried_domains: z.array(z.record(z.string(), z.number())),
top_clients: z.array(z.record(z.string(), z.number())),
top_blocked_domains: z.array(z.record(z.string(), z.number())),

View File

@@ -1,3 +1,4 @@
import { z } from 'zod';
import { trimStringEnding } from '../../../shared/strings';
import {
adGuardApiFilteringStatusSchema,
@@ -77,19 +78,4 @@ export class AdGuard {
}
}
export type AdGuardStatsType = {
time_units: string;
top_queried_domains: { [key: string]: number }[];
top_clients: { [key: string]: number }[];
top_blocked_domains: { [key: string]: number }[];
dns_queries: number[];
blocked_filtering: number[];
replaced_safebrowsing: number[];
replaced_parental: number[];
num_dns_queries: number;
num_blocked_filtering: number;
num_replaced_safebrowsing: number;
num_replaced_safesearch: number;
num_replaced_parental: number;
avg_processing_time: number;
};
export type AdGuardStatsType = z.infer<typeof adGuardApiStatsResponseSchema>;