interfaces/ts/requests/requests.checks.ts
2021-09-26 16:11:41 +02:00

80 lines
1.7 KiB
TypeScript

import * as plugins from '../ul-interfaces.plugins';
export type TCheckResultStatus = 'ok' | 'not ok' | 'timed out';
export interface IRequest_PageCheck_PWA
extends plugins.typedRequestInterfaces.implementsTR<
plugins.typedRequestInterfaces.ITypedRequest,
IRequest_PageCheck_PWA
> {
method: 'pwa';
request: {
intervalMs: number;
domain: string;
};
response: {
timeStarted: number;
timeEnded: number;
duration: number;
status: TCheckResultStatus;
data: {
lhr: any;
reports: any[];
};
checkLog: string[];
};
}
export interface IRequest_PageCheck_Function
extends plugins.typedRequestInterfaces.implementsTR<
plugins.typedRequestInterfaces.ITypedRequest,
IRequest_PageCheck_Function
> {
method: 'function';
request: {
intervalMs: number;
domain: string;
functionDef: string;
};
response: {
timeStarted: number;
timeEnded: number;
duration: number;
status: TCheckResultStatus;
data: any;
checkLog: string[];
};
}
export interface IRequest_PageCheck_Assumption
extends plugins.typedRequestInterfaces.implementsTR<
plugins.typedRequestInterfaces.ITypedRequest,
IRequest_PageCheck_Assumption
> {
method: 'assumption';
request: {
intervalMs: number;
domain: string;
title?: string;
statusCode?: string;
description?: string;
dnsRecordMx?: string;
dnsRecordTxt?: string;
};
response: {
timeStarted: number;
timeEnded: number;
duration: number;
status: TCheckResultStatus;
data: {
domain: string;
title?: string;
statusCode?: string;
description?: string;
dnsRecordMx?: string;
dnsRecordTxt?: string;
};
checkLog: string[];
};
}