fix(core): update

This commit is contained in:
2022-07-19 15:52:49 +02:00
parent 5b8fa6ebb7
commit 1119e5f790
9 changed files with 117 additions and 550 deletions

59
ts/data/checks.ts Normal file
View File

@ -0,0 +1,59 @@
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[];
}>;
}

8
ts/data/property.ts Normal file
View File

@ -0,0 +1,8 @@
import * as plugins from '../ul-interfaces.plugins.js';
export class IProperty {
name: string;
type: 'website' | 'app' | 'api' | 'other';
access: 'private' | 'public' | 'auth';
}

12
ts/data/status.ts Normal file
View File

@ -0,0 +1,12 @@
import * as plugins from '../ul-interfaces.plugins.js';
export interface IStatus {
last90days: IDailyStatus[];
}
export interface IDailyStatus {
timezone: 'UTC',
date: plugins.tsclass.general.IDate;
overallStatus: 'ok' | 'reduced' | 'outage';
incidentRefs: string[];
}