interfaces/ts/data/checks.ts

60 lines
1.2 KiB
TypeScript
Raw Normal View History

2022-07-19 13:52:49 +00:00
import * as plugins from '../ul-interfaces.plugins.js';
export type TCheckResultStatus = 'ok' | 'not ok' | 'timed out';
export interface ICheck {
type: 'pwa' | 'function' | 'assumption';
intervalMs: number;
pwaData?: {
domain: string;
};
functionData: {
domain: string;
functionDef: string;
};
assumptionData?: {
domain: string;
title?: string;
statusCode?: string;
description?: string;
dnsRecordMx?: string;
dnsRecordTxt?: string;
};
checkResults: Array<{
pwaResult?: {
timeStarted: number;
timeEnded: number;
duration: number;
status: TCheckResultStatus;
data: {
lhr: any;
reports: any[];
};
};
functionResult?: {
timeStarted: number;
timeEnded: number;
duration: number;
status: TCheckResultStatus;
data: any;
};
assumptionResult: {
timeStarted: number;
timeEnded: number;
duration: number;
status: TCheckResultStatus;
data: {
domain: string;
title?: string;
statusCode?: string;
description?: string;
dnsRecordMx?: string;
dnsRecordTxt?: string;
};
};
checkLog: string[];
}>;
}