fix(core): update
This commit is contained in:
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@uptime.link/interfaces',
|
||||
version: '2.0.0',
|
||||
version: '2.0.1',
|
||||
description: 'TypeScript interface for the uptime.link API and modules'
|
||||
}
|
||||
|
59
ts/data/checks.ts
Normal file
59
ts/data/checks.ts
Normal 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
8
ts/data/property.ts
Normal 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
12
ts/data/status.ts
Normal 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[];
|
||||
}
|
@ -1,79 +1,16 @@
|
||||
import { ICheck } from '../data/checks.js';
|
||||
import * as plugins from '../ul-interfaces.plugins.js';
|
||||
|
||||
export type TCheckResultStatus = 'ok' | 'not ok' | 'timed out';
|
||||
|
||||
export interface IRequest_PageCheck_PWA
|
||||
export interface IRequest_CheckExchange
|
||||
extends plugins.typedRequestInterfaces.implementsTR<
|
||||
plugins.typedRequestInterfaces.ITypedRequest,
|
||||
IRequest_PageCheck_PWA
|
||||
IRequest_CheckExchange
|
||||
> {
|
||||
method: 'pwa';
|
||||
method: 'check';
|
||||
request: {
|
||||
intervalMs: number;
|
||||
domain: string;
|
||||
check: ICheck;
|
||||
};
|
||||
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[];
|
||||
};
|
||||
check: ICheck;
|
||||
}
|
||||
}
|
||||
|
17
ts/requests/requests.status.ts
Normal file
17
ts/requests/requests.status.ts
Normal file
@ -0,0 +1,17 @@
|
||||
import * as plugins from '../ul-interfaces.plugins.js';
|
||||
import * as data from '../data/index.js';
|
||||
import { IStatus } from '../data/status.js';
|
||||
|
||||
export interface IRequest_Status_Get
|
||||
extends plugins.typedRequestInterfaces.implementsTR<
|
||||
plugins.typedRequestInterfaces.ITypedRequest,
|
||||
IRequest_Status_Get
|
||||
> {
|
||||
method: 'getStatus';
|
||||
request: {
|
||||
userToken?: string;
|
||||
};
|
||||
response: {
|
||||
status: IStatus;
|
||||
};
|
||||
}
|
@ -1,3 +1,10 @@
|
||||
import * as typedRequestInterfaces from '@apiglobal/typedrequest-interfaces';
|
||||
|
||||
export { typedRequestInterfaces };
|
||||
|
||||
// tsclass scope
|
||||
import * as tsclass from '@tsclass/tsclass';
|
||||
|
||||
export {
|
||||
tsclass
|
||||
}
|
||||
|
Reference in New Issue
Block a user