@uptime.link/interfaces 2.0.21 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist_ts/00_commitinfo_data.d.ts +1 -1
- package/dist_ts/00_commitinfo_data.js +3 -3
- package/dist_ts/data/checkcollection.d.ts +15 -5
- package/dist_ts/data/checkcollection.js +2 -4
- package/dist_ts/data/checks/assumption.check.d.ts +7 -2
- package/dist_ts/data/checks/assumption.check.js +2 -3
- package/dist_ts/data/checks/function.check.d.ts +6 -1
- package/dist_ts/data/checks/function.check.js +2 -2
- package/dist_ts/data/checks/index.d.ts +72 -1
- package/dist_ts/data/checks/index.js +5 -1
- package/dist_ts/data/checks/pagerank.check.d.ts +7 -2
- package/dist_ts/data/checks/pagerank.check.js +2 -3
- package/dist_ts/data/checks/pwa.check.d.ts +5 -1
- package/dist_ts/data/checks/pwa.check.js +2 -2
- package/dist_ts/data/domainsnapshot.d.ts +1 -1
- package/dist_ts/data/domainsnapshot.js +2 -3
- package/dist_ts/data/incident.d.ts +39 -3
- package/dist_ts/data/incident.js +2 -2
- package/dist_ts/data/index.d.ts +5 -1
- package/dist_ts/data/index.js +16 -2
- package/dist_ts/data/linksnapshot.js +2 -2
- package/dist_ts/data/property.js +8 -2
- package/dist_ts/data/servicestatus.d.ts +39 -0
- package/dist_ts/data/servicestatus.js +2 -0
- package/dist_ts/data/status.js +2 -2
- package/dist_ts/data/statuspageconfig.d.ts +35 -0
- package/dist_ts/data/statuspageconfig.js +2 -0
- package/dist_ts/data/types.d.ts +31 -0
- package/dist_ts/data/types.js +5 -0
- package/dist_ts/requests/requests.checks.d.ts +1 -1
- package/dist_ts/requests/requests.checks.js +2 -3
- package/dist_ts/requests/requests.incidents.js +3 -3
- package/dist_ts/requests/requests.snapshot.d.ts +2 -2
- package/dist_ts/requests/requests.snapshot.js +2 -4
- package/dist_ts/requests/requests.status.d.ts +1 -1
- package/dist_ts/requests/requests.status.js +3 -4
- package/dist_ts/ul-interfaces.plugins.d.ts +1 -1
- package/dist_ts/ul-interfaces.plugins.js +2 -2
- package/npmextra.json +10 -4
- package/package.json +7 -8
- package/ts/00_commitinfo_data.ts +2 -2
- package/ts/data/checkcollection.ts +19 -8
- package/ts/data/checks/assumption.check.ts +7 -2
- package/ts/data/checks/function.check.ts +6 -1
- package/ts/data/checks/index.ts +105 -1
- package/ts/data/checks/pagerank.check.ts +7 -2
- package/ts/data/checks/pwa.check.ts +8 -2
- package/ts/data/domainsnapshot.ts +1 -1
- package/ts/data/incident.ts +65 -6
- package/ts/data/index.ts +23 -2
- package/ts/data/servicestatus.ts +64 -0
- package/ts/data/statuspageconfig.ts +57 -0
- package/ts/data/types.ts +63 -0
- package/ts/requests/requests.checks.ts +1 -1
- package/ts/requests/requests.snapshot.ts +2 -2
- package/ts/requests/requests.status.ts +1 -1
- package/ts/ul-interfaces.plugins.ts +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* autocreated commitinfo by @
|
|
2
|
+
* autocreated commitinfo by @push.rocks/commitinfo
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@uptime.link/interfaces',
|
|
6
|
-
version: '2.0
|
|
6
|
+
version: '2.1.0',
|
|
7
7
|
description: 'TypeScript interface for the uptime.link API and modules'
|
|
8
8
|
};
|
|
9
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx5QkFBeUI7SUFDL0IsT0FBTyxFQUFFLE9BQU87SUFDaEIsV0FBVyxFQUFFLDBEQUEwRDtDQUN4RSxDQUFBIn0=
|
|
@@ -1,9 +1,19 @@
|
|
|
1
|
-
import * as checks from './checks/index.js';
|
|
1
|
+
import type * as checks from './checks/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* A collection of checks to run against a property/service.
|
|
4
|
+
*
|
|
5
|
+
* Two storage modes supported:
|
|
6
|
+
* 1. Legacy: Separate arrays for each check type (assumptionChecks, functionChecks, etc.)
|
|
7
|
+
* 2. Modern: Single unified array using discriminated union (checks)
|
|
8
|
+
*/
|
|
2
9
|
export interface ICheckCollection {
|
|
3
10
|
id: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
description?: string;
|
|
4
13
|
intervalMs: number;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
14
|
+
checks?: checks.TCheckConfig[];
|
|
15
|
+
assumptionChecks?: checks.IAssumptionCheck[];
|
|
16
|
+
functionChecks?: checks.IFunctionCheck[];
|
|
17
|
+
pwaChecks?: checks.IPwaCheck[];
|
|
18
|
+
pageRankChecks?: checks.IPageRankCheck[];
|
|
9
19
|
}
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import './checks/index.js';
|
|
4
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hlY2tjb2xsZWN0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvZGF0YS9jaGVja2NvbGxlY3Rpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBeUIsNkJBQTZCLENBQUM7QUFDdkQsT0FBd0IsYUFBYSxDQUFDO0FBRXRDLE9BQXdCLG1CQUFtQixDQUFDIn0=
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hlY2tjb2xsZWN0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvZGF0YS9jaGVja2NvbGxlY3Rpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import * as plugins from '../../ul-interfaces.plugins.js';
|
|
2
|
-
import { TCheckResultStatus
|
|
1
|
+
import type * as plugins from '../../ul-interfaces.plugins.js';
|
|
2
|
+
import type { TCheckResultStatus } from '../types.js';
|
|
3
|
+
import type { TExecutionTiming } from './index.js';
|
|
4
|
+
/**
|
|
5
|
+
* Assumption check execution data.
|
|
6
|
+
* Used by check runners to store input and results.
|
|
7
|
+
*/
|
|
3
8
|
export interface IAssumptionCheck {
|
|
4
9
|
inputData: {
|
|
5
10
|
domain: string;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzdW1wdGlvbi5jaGVjay5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3RzL2RhdGEvY2hlY2tzL2Fzc3VtcHRpb24uY2hlY2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBeUIsZ0NBQWdDLENBQUM7QUFDMUQsT0FBcUQsWUFBWSxDQUFDIn0=
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzdW1wdGlvbi5jaGVjay5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3RzL2RhdGEvY2hlY2tzL2Fzc3VtcHRpb24uY2hlY2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import { TCheckResultStatus
|
|
1
|
+
import type { TCheckResultStatus } from '../types.js';
|
|
2
|
+
import type { TExecutionTiming } from './index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Function check execution data.
|
|
5
|
+
* Used by check runners to store input and results.
|
|
6
|
+
*/
|
|
2
7
|
export interface IFunctionCheck {
|
|
3
8
|
checkId: string;
|
|
4
9
|
inputData: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnVuY3Rpb24uY2hlY2suanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi90cy9kYXRhL2NoZWNrcy9mdW5jdGlvbi5jaGVjay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
|
|
@@ -1,10 +1,81 @@
|
|
|
1
|
-
|
|
1
|
+
import type { TStatusType, TCheckResultStatus, TCheckLastResult } from '../types.js';
|
|
2
2
|
export interface TExecutionTiming {
|
|
3
3
|
plannedTime: number;
|
|
4
4
|
timeStarted: number;
|
|
5
5
|
timeEnded: number;
|
|
6
6
|
duration: number;
|
|
7
7
|
}
|
|
8
|
+
export type { TCheckResultStatus };
|
|
9
|
+
/**
|
|
10
|
+
* Base interface for all check configurations.
|
|
11
|
+
* Extended by discriminated variants.
|
|
12
|
+
*/
|
|
13
|
+
export interface ICheckBase {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
enabled: boolean;
|
|
18
|
+
intervalMs?: number;
|
|
19
|
+
lastRun?: number;
|
|
20
|
+
lastResult?: TCheckLastResult;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Assumption check - assumes a status without active verification
|
|
24
|
+
*/
|
|
25
|
+
export interface IAssumptionCheckConfig extends ICheckBase {
|
|
26
|
+
checkType: 'assumption';
|
|
27
|
+
assumedStatus: TStatusType;
|
|
28
|
+
domain?: string;
|
|
29
|
+
title?: string;
|
|
30
|
+
statusCode?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Function check - calls a URL and validates response
|
|
34
|
+
*/
|
|
35
|
+
export interface IFunctionCheckConfig extends ICheckBase {
|
|
36
|
+
checkType: 'function';
|
|
37
|
+
functionUrl: string;
|
|
38
|
+
domain?: string;
|
|
39
|
+
expectedStatusCode?: number;
|
|
40
|
+
timeoutMs?: number;
|
|
41
|
+
headers?: Record<string, string>;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* PWA check - validates Progressive Web App criteria
|
|
45
|
+
*/
|
|
46
|
+
export interface IPwaCheckConfig extends ICheckBase {
|
|
47
|
+
checkType: 'pwa';
|
|
48
|
+
targetUrl: string;
|
|
49
|
+
domain?: string;
|
|
50
|
+
lighthouseThreshold?: number;
|
|
51
|
+
categories?: ('performance' | 'accessibility' | 'best-practices' | 'seo')[];
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* PageRank check - validates search engine ranking
|
|
55
|
+
*/
|
|
56
|
+
export interface IPageRankCheckConfig extends ICheckBase {
|
|
57
|
+
checkType: 'pagerank';
|
|
58
|
+
targetUrl: string;
|
|
59
|
+
domain?: string;
|
|
60
|
+
searchTerm: string;
|
|
61
|
+
minimumRank?: number;
|
|
62
|
+
checkGoogle?: boolean;
|
|
63
|
+
checkBing?: boolean;
|
|
64
|
+
googleMinRank?: number;
|
|
65
|
+
bingMinRank?: number;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Union of all check configuration types.
|
|
69
|
+
* Use `checkType` discriminant for type narrowing.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* function handleCheck(check: TCheckConfig) {
|
|
73
|
+
* if (check.checkType === 'function') {
|
|
74
|
+
* console.log(check.functionUrl); // TypeScript knows this exists
|
|
75
|
+
* }
|
|
76
|
+
* }
|
|
77
|
+
*/
|
|
78
|
+
export type TCheckConfig = IAssumptionCheckConfig | IFunctionCheckConfig | IPwaCheckConfig | IPageRankCheckConfig;
|
|
8
79
|
export * from './assumption.check.js';
|
|
9
80
|
export * from './function.check.js';
|
|
10
81
|
export * from './pagerank.check.js';
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
// ============================================
|
|
2
|
+
// Execution Interfaces (Runtime Data)
|
|
3
|
+
// ============================================
|
|
4
|
+
// Keep existing execution interfaces for backward compatibility
|
|
1
5
|
export * from './assumption.check.js';
|
|
2
6
|
export * from './function.check.js';
|
|
3
7
|
export * from './pagerank.check.js';
|
|
4
8
|
export * from './pwa.check.js';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi90cy9kYXRhL2NoZWNrcy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE0R0EsK0NBQStDO0FBQy9DLHNDQUFzQztBQUN0QywrQ0FBK0M7QUFFL0MsZ0VBQWdFO0FBQ2hFLGNBQWMsdUJBQXVCLENBQUM7QUFDdEMsY0FBYyxxQkFBcUIsQ0FBQztBQUNwQyxjQUFjLHFCQUFxQixDQUFDO0FBQ3BDLGNBQWMsZ0JBQWdCLENBQUMifQ==
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import * as search from '../search.js';
|
|
2
|
-
import { TCheckResultStatus
|
|
1
|
+
import type * as search from '../search.js';
|
|
2
|
+
import type { TCheckResultStatus } from '../types.js';
|
|
3
|
+
import type { TExecutionTiming } from './index.js';
|
|
4
|
+
/**
|
|
5
|
+
* PageRank check execution data.
|
|
6
|
+
* Used by check runners to store input and results.
|
|
7
|
+
*/
|
|
3
8
|
export interface IPageRankCheck {
|
|
4
9
|
inputData: {
|
|
5
10
|
subId: string;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFnZXJhbmsuY2hlY2suanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi90cy9kYXRhL2NoZWNrcy9wYWdlcmFuay5jaGVjay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUF3QixjQUFjLENBQUM7QUFDdkMsT0FBcUQsWUFBWSxDQUFDIn0=
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFnZXJhbmsuY2hlY2suanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi90cy9kYXRhL2NoZWNrcy9wYWdlcmFuay5jaGVjay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { TCheckResultStatus } from '
|
|
1
|
+
import type { TCheckResultStatus } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* PWA check execution data.
|
|
4
|
+
* Used by check runners to store input and results.
|
|
5
|
+
*/
|
|
2
6
|
export interface IPwaCheck {
|
|
3
7
|
inputData: {
|
|
4
8
|
domain: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHdhLmNoZWNrLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vdHMvZGF0YS9jaGVja3MvcHdhLmNoZWNrLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import '../ul-interfaces.plugins.js';
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZG9tYWluc25hcHNob3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9kYXRhL2RvbWFpbnNuYXBzaG90LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQXlCLDZCQUE2QixDQUFDO0FBQ3ZELE9BQThCLG1CQUFtQixDQUFDIn0=
|
|
1
|
+
import * as plugins from '../ul-interfaces.plugins.js';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZG9tYWluc25hcHNob3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9kYXRhL2RvbWFpbnNuYXBzaG90LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxPQUFPLE1BQU0sNkJBQTZCLENBQUMifQ==
|
|
@@ -1,9 +1,45 @@
|
|
|
1
|
+
import type { TIncidentSeverity, TIncidentStatus } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* A single update within an incident timeline.
|
|
4
|
+
*/
|
|
5
|
+
export interface IIncidentUpdate {
|
|
6
|
+
id: string;
|
|
7
|
+
incidentId: string;
|
|
8
|
+
status: TIncidentStatus;
|
|
9
|
+
message: string;
|
|
10
|
+
createdAt: number;
|
|
11
|
+
createdBy?: string;
|
|
12
|
+
type?: 'comment' | 'status_change' | 'automatic';
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Represents an incident affecting one or more services.
|
|
16
|
+
*/
|
|
1
17
|
export interface IIncident {
|
|
18
|
+
id: string;
|
|
19
|
+
title: string;
|
|
20
|
+
description: string;
|
|
21
|
+
severity: TIncidentSeverity;
|
|
22
|
+
status: TIncidentStatus;
|
|
23
|
+
affectedServiceIds: string[];
|
|
24
|
+
createdAt: number;
|
|
25
|
+
updatedAt: number;
|
|
26
|
+
resolvedAt?: number;
|
|
27
|
+
firstResponseAt?: number;
|
|
28
|
+
updates: IIncidentUpdate[];
|
|
29
|
+
createdBy?: string;
|
|
30
|
+
assignedUserId?: string;
|
|
31
|
+
creationMode?: 'monitor' | 'manual';
|
|
32
|
+
isScheduled?: boolean;
|
|
33
|
+
scheduledStartTime?: number;
|
|
34
|
+
scheduledEndTime?: number;
|
|
35
|
+
postMortemLink?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated Use IIncident instead
|
|
39
|
+
*/
|
|
40
|
+
export interface IIncidentLegacy {
|
|
2
41
|
timestamp: number;
|
|
3
42
|
firstResponseTimestamp?: number;
|
|
4
|
-
/**
|
|
5
|
-
* indicates
|
|
6
|
-
*/
|
|
7
43
|
status: 'discovered' | 'investigating' | 'fixing' | 'fixImplemented' | 'watching' | 'resolved';
|
|
8
44
|
creationMode: 'monitor' | 'manual';
|
|
9
45
|
assignedUserId?: string;
|
package/dist_ts/data/incident.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5jaWRlbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9kYXRhL2luY2lkZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
|
package/dist_ts/data/index.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
export * from './types.js';
|
|
2
|
+
export * from './checks/index.js';
|
|
1
3
|
export * from './checkcollection.js';
|
|
2
|
-
export * from './domainsnapshot.js';
|
|
3
4
|
export * from './incident.js';
|
|
5
|
+
export * from './servicestatus.js';
|
|
6
|
+
export * from './statuspageconfig.js';
|
|
7
|
+
export * from './domainsnapshot.js';
|
|
4
8
|
export * from './linksnapshot.js';
|
|
5
9
|
export * from './property.js';
|
|
6
10
|
export * from './search.js';
|
package/dist_ts/data/index.js
CHANGED
|
@@ -1,10 +1,24 @@
|
|
|
1
|
+
// Core types
|
|
2
|
+
export * from './types.js';
|
|
3
|
+
// Check interfaces (configuration + execution)
|
|
4
|
+
export * from './checks/index.js';
|
|
5
|
+
// Collections
|
|
1
6
|
export * from './checkcollection.js';
|
|
2
|
-
|
|
7
|
+
// Incidents
|
|
3
8
|
export * from './incident.js';
|
|
9
|
+
// Service status
|
|
10
|
+
export * from './servicestatus.js';
|
|
11
|
+
// Status page configuration
|
|
12
|
+
export * from './statuspageconfig.js';
|
|
13
|
+
// Domain and link snapshots
|
|
14
|
+
export * from './domainsnapshot.js';
|
|
4
15
|
export * from './linksnapshot.js';
|
|
16
|
+
// Property and search
|
|
5
17
|
export * from './property.js';
|
|
6
18
|
export * from './search.js';
|
|
19
|
+
// Status (90-day history)
|
|
7
20
|
export * from './status.js';
|
|
21
|
+
// Re-export checks namespace for convenience
|
|
8
22
|
import * as checks from './checks/index.js';
|
|
9
23
|
export { checks };
|
|
10
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
24
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9kYXRhL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGFBQWE7QUFDYixjQUFjLFlBQVksQ0FBQztBQUUzQiwrQ0FBK0M7QUFDL0MsY0FBYyxtQkFBbUIsQ0FBQztBQUVsQyxjQUFjO0FBQ2QsY0FBYyxzQkFBc0IsQ0FBQztBQUVyQyxZQUFZO0FBQ1osY0FBYyxlQUFlLENBQUM7QUFFOUIsaUJBQWlCO0FBQ2pCLGNBQWMsb0JBQW9CLENBQUM7QUFFbkMsNEJBQTRCO0FBQzVCLGNBQWMsdUJBQXVCLENBQUM7QUFFdEMsNEJBQTRCO0FBQzVCLGNBQWMscUJBQXFCLENBQUM7QUFDcEMsY0FBYyxtQkFBbUIsQ0FBQztBQUVsQyxzQkFBc0I7QUFDdEIsY0FBYyxlQUFlLENBQUM7QUFDOUIsY0FBYyxhQUFhLENBQUM7QUFFNUIsMEJBQTBCO0FBQzFCLGNBQWMsYUFBYSxDQUFDO0FBRTVCLDZDQUE2QztBQUM3QyxPQUFPLEtBQUssTUFBTSxNQUFNLG1CQUFtQixDQUFDO0FBQzVDLE9BQU8sRUFBRSxNQUFNLEVBQUUsQ0FBQyJ9
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import '../ul-interfaces.plugins.js';
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import * as plugins from '../ul-interfaces.plugins.js';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlua3NuYXBzaG90LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvZGF0YS9saW5rc25hcHNob3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLE9BQU8sTUFBTSw2QkFBNkIsQ0FBQyJ9
|
package/dist_ts/data/property.js
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import '../ul-interfaces.plugins.js';
|
|
1
|
+
import * as plugins from '../ul-interfaces.plugins.js';
|
|
2
2
|
export class IUplinkProperty {
|
|
3
|
+
wgOrgIdRef;
|
|
4
|
+
wgPropertyIdRef;
|
|
5
|
+
name;
|
|
6
|
+
type;
|
|
7
|
+
access;
|
|
8
|
+
checkCollectionIdRefs;
|
|
3
9
|
}
|
|
4
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
10
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvcGVydHkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9kYXRhL3Byb3BlcnR5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxPQUFPLE1BQU0sNkJBQTZCLENBQUM7QUFFdkQsTUFBTSxPQUFPLGVBQWU7SUFDMUIsVUFBVSxDQUFTO0lBQ25CLGVBQWUsQ0FBUztJQUN4QixJQUFJLENBQVM7SUFDYixJQUFJLENBQXNDO0lBQzFDLE1BQU0sQ0FBZ0M7SUFDdEMscUJBQXFCLENBQVc7Q0FDakMifQ==
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { TStatusType, TStatusMode, TCheckType } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Represents the status of a monitored service.
|
|
4
|
+
*/
|
|
5
|
+
export interface IServiceStatus {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
displayName: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
currentStatus: TStatusType;
|
|
11
|
+
lastChecked: number;
|
|
12
|
+
responseTime: number;
|
|
13
|
+
uptime30d: number;
|
|
14
|
+
uptime90d: number;
|
|
15
|
+
category?: string;
|
|
16
|
+
dependencies?: string[];
|
|
17
|
+
statusMode: TStatusMode;
|
|
18
|
+
manualStatus?: TStatusType;
|
|
19
|
+
paused: boolean;
|
|
20
|
+
checkType?: TCheckType;
|
|
21
|
+
checkCollectionId?: string;
|
|
22
|
+
intervalMs?: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A point in the status history timeline.
|
|
26
|
+
*/
|
|
27
|
+
export interface IStatusHistoryPoint {
|
|
28
|
+
timestamp: number;
|
|
29
|
+
status: TStatusType;
|
|
30
|
+
responseTime?: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Aggregate status for a group of services or entire status page.
|
|
34
|
+
*/
|
|
35
|
+
export interface IOverallStatus {
|
|
36
|
+
status: TStatusType;
|
|
37
|
+
message?: string;
|
|
38
|
+
lastUpdated: number;
|
|
39
|
+
}
|
package/dist_ts/data/status.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import '../ul-interfaces.plugins.js';
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import * as plugins from '../ul-interfaces.plugins.js';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RhdHVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvZGF0YS9zdGF0dXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLE9BQU8sTUFBTSw2QkFBNkIsQ0FBQyJ9
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { IOverallStatus } from './servicestatus.js';
|
|
2
|
+
/**
|
|
3
|
+
* A group of related services displayed together.
|
|
4
|
+
*/
|
|
5
|
+
export interface IServiceGroup {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
serviceIds: string[];
|
|
10
|
+
expanded: boolean;
|
|
11
|
+
order?: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Configuration for a public status page.
|
|
15
|
+
*/
|
|
16
|
+
export interface IStatusPageConfig {
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
slug: string;
|
|
20
|
+
logoUrl?: string;
|
|
21
|
+
faviconUrl?: string;
|
|
22
|
+
primaryColor?: string;
|
|
23
|
+
customCss?: string;
|
|
24
|
+
headerTitle: string;
|
|
25
|
+
headerDescription?: string;
|
|
26
|
+
footerText?: string;
|
|
27
|
+
showHistoricalUptime: boolean;
|
|
28
|
+
showResponseTime: boolean;
|
|
29
|
+
showSubscribeButton: boolean;
|
|
30
|
+
showIncidentHistory: boolean;
|
|
31
|
+
serviceGroups: IServiceGroup[];
|
|
32
|
+
overallStatus?: IOverallStatus;
|
|
33
|
+
customDomain?: string;
|
|
34
|
+
sslEnabled?: boolean;
|
|
35
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared type definitions for uptime.link
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Status types for monitors/services
|
|
6
|
+
*/
|
|
7
|
+
export type TStatusType = 'operational' | 'degraded' | 'partial_outage' | 'major_outage' | 'maintenance' | 'initializing' | 'error' | 'paused';
|
|
8
|
+
/**
|
|
9
|
+
* Check types (discriminant values for TCheck union)
|
|
10
|
+
*/
|
|
11
|
+
export type TCheckType = 'assumption' | 'function' | 'pwa' | 'pagerank';
|
|
12
|
+
/**
|
|
13
|
+
* Status mode for monitors - auto follows checks, manual is user-set
|
|
14
|
+
*/
|
|
15
|
+
export type TStatusMode = 'auto' | 'manual';
|
|
16
|
+
/**
|
|
17
|
+
* Incident severity levels
|
|
18
|
+
*/
|
|
19
|
+
export type TIncidentSeverity = 'critical' | 'major' | 'minor' | 'maintenance';
|
|
20
|
+
/**
|
|
21
|
+
* Incident status workflow
|
|
22
|
+
*/
|
|
23
|
+
export type TIncidentStatus = 'investigating' | 'identified' | 'monitoring' | 'resolved' | 'postmortem';
|
|
24
|
+
/**
|
|
25
|
+
* Result status for check execution
|
|
26
|
+
*/
|
|
27
|
+
export type TCheckResultStatus = 'ok' | 'not ok' | 'timed out';
|
|
28
|
+
/**
|
|
29
|
+
* Last result state for a check
|
|
30
|
+
*/
|
|
31
|
+
export type TCheckLastResult = 'success' | 'failure' | 'pending';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared type definitions for uptime.link
|
|
3
|
+
*/
|
|
4
|
+
export {};
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9kYXRhL3R5cGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHIn0=
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ICheckCollection } from '../data/checkcollection.js';
|
|
1
|
+
import type { ICheckCollection } from '../data/checkcollection.js';
|
|
2
2
|
import * as plugins from '../ul-interfaces.plugins.js';
|
|
3
3
|
export interface IRequest_CheckExchange extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IRequest_CheckExchange> {
|
|
4
4
|
method: 'check';
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import '../
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVxdWVzdHMuY2hlY2tzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvcmVxdWVzdHMvcmVxdWVzdHMuY2hlY2tzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQWlDLDRCQUE0QixDQUFDO0FBQzlELE9BQXlCLDZCQUE2QixDQUFDIn0=
|
|
1
|
+
import * as plugins from '../ul-interfaces.plugins.js';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVxdWVzdHMuY2hlY2tzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvcmVxdWVzdHMvcmVxdWVzdHMuY2hlY2tzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sS0FBSyxPQUFPLE1BQU0sNkJBQTZCLENBQUMifQ==
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import '../ul-interfaces.plugins.js';
|
|
2
|
-
import '../data/index.js';
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import * as plugins from '../ul-interfaces.plugins.js';
|
|
2
|
+
import * as data from '../data/index.js';
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVxdWVzdHMuaW5jaWRlbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvcmVxdWVzdHMvcmVxdWVzdHMuaW5jaWRlbnRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxPQUFPLE1BQU0sNkJBQTZCLENBQUM7QUFDdkQsT0FBTyxLQUFLLElBQUksTUFBTSxrQkFBa0IsQ0FBQyJ9
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IDomainSnapshot } from '../data/domainsnapshot.js';
|
|
2
|
-
import { ILinkSnapshot } from '../data/linksnapshot.js';
|
|
1
|
+
import type { IDomainSnapshot } from '../data/domainsnapshot.js';
|
|
2
|
+
import type { ILinkSnapshot } from '../data/linksnapshot.js';
|
|
3
3
|
import * as plugins from '../ul-interfaces.plugins.js';
|
|
4
4
|
export interface IReq_PerformDomainSnapshot extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_PerformDomainSnapshot> {
|
|
5
5
|
method: 'performDomainSnapshot';
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import '../
|
|
2
|
-
|
|
3
|
-
import '../ul-interfaces.plugins.js';
|
|
4
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVxdWVzdHMuc25hcHNob3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9yZXF1ZXN0cy9yZXF1ZXN0cy5zbmFwc2hvdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFnQywyQkFBMkIsQ0FBQztBQUM1RCxPQUE4Qix5QkFBeUIsQ0FBQztBQUN4RCxPQUF5Qiw2QkFBNkIsQ0FBQyJ9
|
|
1
|
+
import * as plugins from '../ul-interfaces.plugins.js';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVxdWVzdHMuc25hcHNob3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9yZXF1ZXN0cy9yZXF1ZXN0cy5zbmFwc2hvdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFQSxPQUFPLEtBQUssT0FBTyxNQUFNLDZCQUE2QixDQUFDIn0=
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as plugins from '../ul-interfaces.plugins.js';
|
|
2
|
-
import { IStatus } from '../data/status.js';
|
|
2
|
+
import type { IStatus } from '../data/status.js';
|
|
3
3
|
export interface IRequest_Status_Get extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IRequest_Status_Get> {
|
|
4
4
|
method: 'getStatus';
|
|
5
5
|
request: {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import '../ul-interfaces.plugins.js';
|
|
2
|
-
import '../data/index.js';
|
|
3
|
-
|
|
4
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVxdWVzdHMuc3RhdHVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvcmVxdWVzdHMvcmVxdWVzdHMuc3RhdHVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQXlCLDZCQUE2QixDQUFDO0FBQ3ZELE9BQXNCLGtCQUFrQixDQUFDO0FBQ3pDLE9BQXdCLG1CQUFtQixDQUFDIn0=
|
|
1
|
+
import * as plugins from '../ul-interfaces.plugins.js';
|
|
2
|
+
import * as data from '../data/index.js';
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVxdWVzdHMuc3RhdHVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvcmVxdWVzdHMvcmVxdWVzdHMuc3RhdHVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxPQUFPLE1BQU0sNkJBQTZCLENBQUM7QUFDdkQsT0FBTyxLQUFLLElBQUksTUFBTSxrQkFBa0IsQ0FBQyJ9
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as typedRequestInterfaces from '@
|
|
1
|
+
import * as typedRequestInterfaces from '@api.global/typedrequest-interfaces';
|
|
2
2
|
export { typedRequestInterfaces };
|
|
3
3
|
// tsclass scope
|
|
4
4
|
import * as tsclass from '@tsclass/tsclass';
|
|
5
5
|
export { tsclass };
|
|
6
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
6
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidWwtaW50ZXJmYWNlcy5wbHVnaW5zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvdWwtaW50ZXJmYWNlcy5wbHVnaW5zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxzQkFBc0IsTUFBTSxxQ0FBcUMsQ0FBQztBQUU5RSxPQUFPLEVBQUUsc0JBQXNCLEVBQUUsQ0FBQztBQUVsQyxnQkFBZ0I7QUFDaEIsT0FBTyxLQUFLLE9BQU8sTUFBTSxrQkFBa0IsQ0FBQztBQUU1QyxPQUFPLEVBQUUsT0FBTyxFQUFFLENBQUMifQ==
|
package/npmextra.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
2
|
+
"@git.zone/cli": {
|
|
3
3
|
"projectType": "npm",
|
|
4
4
|
"module": {
|
|
5
5
|
"githost": "gitlab.com",
|
|
@@ -9,10 +9,16 @@
|
|
|
9
9
|
"npmPackagename": "@uptime.link/interfaces",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"projectDomain": "uptime.link"
|
|
12
|
+
},
|
|
13
|
+
"release": {
|
|
14
|
+
"registries": [
|
|
15
|
+
"https://verdaccio.lossless.digital",
|
|
16
|
+
"https://registry.npmjs.org"
|
|
17
|
+
],
|
|
18
|
+
"accessLevel": "public"
|
|
12
19
|
}
|
|
13
20
|
},
|
|
14
|
-
"
|
|
15
|
-
"npmGlobalTools": []
|
|
16
|
-
"npmAccessLevel": "public"
|
|
21
|
+
"@ship.zone/szci": {
|
|
22
|
+
"npmGlobalTools": []
|
|
17
23
|
}
|
|
18
24
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uptime.link/interfaces",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "TypeScript interface for the uptime.link API and modules",
|
|
6
6
|
"main": "dist_ts/index.js",
|
|
@@ -14,15 +14,14 @@
|
|
|
14
14
|
"buildDocs": "tsdoc"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@
|
|
18
|
-
"@
|
|
19
|
-
"@
|
|
20
|
-
"@
|
|
21
|
-
"@types/node": "^18.15.11"
|
|
17
|
+
"@git.zone/tsbuild": "^4.0.2",
|
|
18
|
+
"@git.zone/tsrun": "^2.0.1",
|
|
19
|
+
"@git.zone/tstest": "^3.1.3",
|
|
20
|
+
"@types/node": "^25.0.3"
|
|
22
21
|
},
|
|
23
22
|
"dependencies": {
|
|
24
|
-
"@
|
|
25
|
-
"@tsclass/tsclass": "^
|
|
23
|
+
"@api.global/typedrequest-interfaces": "^3.0.19",
|
|
24
|
+
"@tsclass/tsclass": "^9.3.0"
|
|
26
25
|
},
|
|
27
26
|
"files": [
|
|
28
27
|
"ts/**/*",
|
package/ts/00_commitinfo_data.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* autocreated commitinfo by @
|
|
2
|
+
* autocreated commitinfo by @push.rocks/commitinfo
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@uptime.link/interfaces',
|
|
6
|
-
version: '2.0
|
|
6
|
+
version: '2.1.0',
|
|
7
7
|
description: 'TypeScript interface for the uptime.link API and modules'
|
|
8
8
|
}
|
|
@@ -1,13 +1,24 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as search from './search.js';
|
|
3
|
-
|
|
4
|
-
import * as checks from './checks/index.js';
|
|
1
|
+
import type * as checks from './checks/index.js';
|
|
5
2
|
|
|
3
|
+
/**
|
|
4
|
+
* A collection of checks to run against a property/service.
|
|
5
|
+
*
|
|
6
|
+
* Two storage modes supported:
|
|
7
|
+
* 1. Legacy: Separate arrays for each check type (assumptionChecks, functionChecks, etc.)
|
|
8
|
+
* 2. Modern: Single unified array using discriminated union (checks)
|
|
9
|
+
*/
|
|
6
10
|
export interface ICheckCollection {
|
|
7
11
|
id: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
description?: string;
|
|
8
14
|
intervalMs: number;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
15
|
+
|
|
16
|
+
// Modern: Single array with discriminated union
|
|
17
|
+
checks?: checks.TCheckConfig[];
|
|
18
|
+
|
|
19
|
+
// Legacy: Separate arrays by type (for backward compatibility)
|
|
20
|
+
assumptionChecks?: checks.IAssumptionCheck[];
|
|
21
|
+
functionChecks?: checks.IFunctionCheck[];
|
|
22
|
+
pwaChecks?: checks.IPwaCheck[];
|
|
23
|
+
pageRankChecks?: checks.IPageRankCheck[];
|
|
13
24
|
}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import * as plugins from '../../ul-interfaces.plugins.js';
|
|
2
|
-
import { TCheckResultStatus
|
|
1
|
+
import type * as plugins from '../../ul-interfaces.plugins.js';
|
|
2
|
+
import type { TCheckResultStatus } from '../types.js';
|
|
3
|
+
import type { TExecutionTiming } from './index.js';
|
|
3
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Assumption check execution data.
|
|
7
|
+
* Used by check runners to store input and results.
|
|
8
|
+
*/
|
|
4
9
|
export interface IAssumptionCheck {
|
|
5
10
|
inputData: {
|
|
6
11
|
domain: string;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import { TCheckResultStatus
|
|
1
|
+
import type { TCheckResultStatus } from '../types.js';
|
|
2
|
+
import type { TExecutionTiming } from './index.js';
|
|
2
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Function check execution data.
|
|
6
|
+
* Used by check runners to store input and results.
|
|
7
|
+
*/
|
|
3
8
|
export interface IFunctionCheck {
|
|
4
9
|
checkId: string;
|
|
5
10
|
inputData: {
|
package/ts/data/checks/index.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import type { TStatusType, TCheckResultStatus, TCheckLastResult } from '../types.js';
|
|
2
|
+
|
|
3
|
+
// ============================================
|
|
4
|
+
// Execution Timing (used by check runners)
|
|
5
|
+
// ============================================
|
|
2
6
|
|
|
3
7
|
export interface TExecutionTiming {
|
|
4
8
|
plannedTime: number;
|
|
@@ -7,6 +11,106 @@ export interface TExecutionTiming {
|
|
|
7
11
|
duration: number;
|
|
8
12
|
}
|
|
9
13
|
|
|
14
|
+
// Re-export for backward compatibility
|
|
15
|
+
export type { TCheckResultStatus };
|
|
16
|
+
|
|
17
|
+
// ============================================
|
|
18
|
+
// Check Configuration Base Interface
|
|
19
|
+
// ============================================
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Base interface for all check configurations.
|
|
23
|
+
* Extended by discriminated variants.
|
|
24
|
+
*/
|
|
25
|
+
export interface ICheckBase {
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
description?: string;
|
|
29
|
+
enabled: boolean;
|
|
30
|
+
intervalMs?: number;
|
|
31
|
+
lastRun?: number;
|
|
32
|
+
lastResult?: TCheckLastResult;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// ============================================
|
|
36
|
+
// Discriminated Check Variants (Configuration)
|
|
37
|
+
// ============================================
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Assumption check - assumes a status without active verification
|
|
41
|
+
*/
|
|
42
|
+
export interface IAssumptionCheckConfig extends ICheckBase {
|
|
43
|
+
checkType: 'assumption';
|
|
44
|
+
assumedStatus: TStatusType;
|
|
45
|
+
domain?: string;
|
|
46
|
+
title?: string;
|
|
47
|
+
statusCode?: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Function check - calls a URL and validates response
|
|
52
|
+
*/
|
|
53
|
+
export interface IFunctionCheckConfig extends ICheckBase {
|
|
54
|
+
checkType: 'function';
|
|
55
|
+
functionUrl: string;
|
|
56
|
+
domain?: string;
|
|
57
|
+
expectedStatusCode?: number;
|
|
58
|
+
timeoutMs?: number;
|
|
59
|
+
headers?: Record<string, string>;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* PWA check - validates Progressive Web App criteria
|
|
64
|
+
*/
|
|
65
|
+
export interface IPwaCheckConfig extends ICheckBase {
|
|
66
|
+
checkType: 'pwa';
|
|
67
|
+
targetUrl: string;
|
|
68
|
+
domain?: string;
|
|
69
|
+
lighthouseThreshold?: number;
|
|
70
|
+
categories?: ('performance' | 'accessibility' | 'best-practices' | 'seo')[];
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* PageRank check - validates search engine ranking
|
|
75
|
+
*/
|
|
76
|
+
export interface IPageRankCheckConfig extends ICheckBase {
|
|
77
|
+
checkType: 'pagerank';
|
|
78
|
+
targetUrl: string;
|
|
79
|
+
domain?: string;
|
|
80
|
+
searchTerm: string;
|
|
81
|
+
minimumRank?: number;
|
|
82
|
+
checkGoogle?: boolean;
|
|
83
|
+
checkBing?: boolean;
|
|
84
|
+
googleMinRank?: number;
|
|
85
|
+
bingMinRank?: number;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// ============================================
|
|
89
|
+
// Union Type (for UI and generic handling)
|
|
90
|
+
// ============================================
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Union of all check configuration types.
|
|
94
|
+
* Use `checkType` discriminant for type narrowing.
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* function handleCheck(check: TCheckConfig) {
|
|
98
|
+
* if (check.checkType === 'function') {
|
|
99
|
+
* console.log(check.functionUrl); // TypeScript knows this exists
|
|
100
|
+
* }
|
|
101
|
+
* }
|
|
102
|
+
*/
|
|
103
|
+
export type TCheckConfig =
|
|
104
|
+
| IAssumptionCheckConfig
|
|
105
|
+
| IFunctionCheckConfig
|
|
106
|
+
| IPwaCheckConfig
|
|
107
|
+
| IPageRankCheckConfig;
|
|
108
|
+
|
|
109
|
+
// ============================================
|
|
110
|
+
// Execution Interfaces (Runtime Data)
|
|
111
|
+
// ============================================
|
|
112
|
+
|
|
113
|
+
// Keep existing execution interfaces for backward compatibility
|
|
10
114
|
export * from './assumption.check.js';
|
|
11
115
|
export * from './function.check.js';
|
|
12
116
|
export * from './pagerank.check.js';
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import * as search from '../search.js';
|
|
2
|
-
import { TCheckResultStatus
|
|
1
|
+
import type * as search from '../search.js';
|
|
2
|
+
import type { TCheckResultStatus } from '../types.js';
|
|
3
|
+
import type { TExecutionTiming } from './index.js';
|
|
3
4
|
|
|
5
|
+
/**
|
|
6
|
+
* PageRank check execution data.
|
|
7
|
+
* Used by check runners to store input and results.
|
|
8
|
+
*/
|
|
4
9
|
export interface IPageRankCheck {
|
|
5
10
|
inputData: {
|
|
6
11
|
subId: string;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import { TCheckResultStatus } from '
|
|
1
|
+
import type { TCheckResultStatus } from '../types.js';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* PWA check execution data.
|
|
5
|
+
* Used by check runners to store input and results.
|
|
6
|
+
*/
|
|
3
7
|
export interface IPwaCheck {
|
|
4
|
-
inputData: {
|
|
8
|
+
inputData: {
|
|
9
|
+
domain: string;
|
|
10
|
+
};
|
|
5
11
|
executionResults: Array<{
|
|
6
12
|
subId: string;
|
|
7
13
|
timeStarted: number;
|
package/ts/data/incident.ts
CHANGED
|
@@ -1,21 +1,80 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { TIncidentSeverity, TIncidentStatus } from './types.js';
|
|
2
2
|
|
|
3
|
+
// ============================================
|
|
4
|
+
// Incident Update
|
|
5
|
+
// ============================================
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* A single update within an incident timeline.
|
|
9
|
+
*/
|
|
10
|
+
export interface IIncidentUpdate {
|
|
11
|
+
id: string;
|
|
12
|
+
incidentId: string;
|
|
13
|
+
status: TIncidentStatus;
|
|
14
|
+
message: string;
|
|
15
|
+
createdAt: number;
|
|
16
|
+
createdBy?: string;
|
|
17
|
+
type?: 'comment' | 'status_change' | 'automatic';
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// ============================================
|
|
21
|
+
// Incident
|
|
22
|
+
// ============================================
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Represents an incident affecting one or more services.
|
|
26
|
+
*/
|
|
3
27
|
export interface IIncident {
|
|
28
|
+
id: string;
|
|
29
|
+
title: string;
|
|
30
|
+
description: string;
|
|
31
|
+
severity: TIncidentSeverity;
|
|
32
|
+
status: TIncidentStatus;
|
|
33
|
+
|
|
34
|
+
// Affected services
|
|
35
|
+
affectedServiceIds: string[];
|
|
36
|
+
|
|
37
|
+
// Timeline
|
|
38
|
+
createdAt: number;
|
|
39
|
+
updatedAt: number;
|
|
40
|
+
resolvedAt?: number;
|
|
41
|
+
firstResponseAt?: number;
|
|
42
|
+
|
|
43
|
+
// Updates history
|
|
44
|
+
updates: IIncidentUpdate[];
|
|
45
|
+
|
|
46
|
+
// Metadata
|
|
47
|
+
createdBy?: string;
|
|
48
|
+
assignedUserId?: string;
|
|
49
|
+
creationMode?: 'monitor' | 'manual';
|
|
50
|
+
|
|
51
|
+
// Scheduled maintenance
|
|
52
|
+
isScheduled?: boolean;
|
|
53
|
+
scheduledStartTime?: number;
|
|
54
|
+
scheduledEndTime?: number;
|
|
55
|
+
|
|
56
|
+
// Post-incident
|
|
57
|
+
postMortemLink?: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// ============================================
|
|
61
|
+
// Legacy Interface (for backward compatibility)
|
|
62
|
+
// ============================================
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @deprecated Use IIncident instead
|
|
66
|
+
*/
|
|
67
|
+
export interface IIncidentLegacy {
|
|
4
68
|
timestamp: number;
|
|
5
69
|
firstResponseTimestamp?: number;
|
|
6
|
-
/**
|
|
7
|
-
* indicates
|
|
8
|
-
*/
|
|
9
70
|
status: 'discovered' | 'investigating' | 'fixing' | 'fixImplemented' | 'watching' | 'resolved';
|
|
10
71
|
creationMode: 'monitor' | 'manual';
|
|
11
72
|
assignedUserId?: string;
|
|
12
73
|
postMortemLink?: string;
|
|
13
|
-
|
|
14
74
|
updates: {
|
|
15
75
|
markdownText: string;
|
|
16
76
|
type: 'comment' | 'manualUpdate' | 'automaticUpdate';
|
|
17
77
|
}[];
|
|
18
|
-
|
|
19
78
|
justForLooks: {
|
|
20
79
|
isoTimestamp: string;
|
|
21
80
|
};
|
package/ts/data/index.ts
CHANGED
|
@@ -1,11 +1,32 @@
|
|
|
1
|
+
// Core types
|
|
2
|
+
export * from './types.js';
|
|
3
|
+
|
|
4
|
+
// Check interfaces (configuration + execution)
|
|
5
|
+
export * from './checks/index.js';
|
|
6
|
+
|
|
7
|
+
// Collections
|
|
1
8
|
export * from './checkcollection.js';
|
|
2
|
-
|
|
9
|
+
|
|
10
|
+
// Incidents
|
|
3
11
|
export * from './incident.js';
|
|
12
|
+
|
|
13
|
+
// Service status
|
|
14
|
+
export * from './servicestatus.js';
|
|
15
|
+
|
|
16
|
+
// Status page configuration
|
|
17
|
+
export * from './statuspageconfig.js';
|
|
18
|
+
|
|
19
|
+
// Domain and link snapshots
|
|
20
|
+
export * from './domainsnapshot.js';
|
|
4
21
|
export * from './linksnapshot.js';
|
|
22
|
+
|
|
23
|
+
// Property and search
|
|
5
24
|
export * from './property.js';
|
|
6
25
|
export * from './search.js';
|
|
26
|
+
|
|
27
|
+
// Status (90-day history)
|
|
7
28
|
export * from './status.js';
|
|
8
29
|
|
|
30
|
+
// Re-export checks namespace for convenience
|
|
9
31
|
import * as checks from './checks/index.js';
|
|
10
|
-
|
|
11
32
|
export { checks };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { TStatusType, TStatusMode, TCheckType } from './types.js';
|
|
2
|
+
|
|
3
|
+
// ============================================
|
|
4
|
+
// Service Status
|
|
5
|
+
// ============================================
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Represents the status of a monitored service.
|
|
9
|
+
*/
|
|
10
|
+
export interface IServiceStatus {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
displayName: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
|
|
16
|
+
// Current state
|
|
17
|
+
currentStatus: TStatusType;
|
|
18
|
+
lastChecked: number;
|
|
19
|
+
responseTime: number;
|
|
20
|
+
|
|
21
|
+
// Uptime metrics
|
|
22
|
+
uptime30d: number;
|
|
23
|
+
uptime90d: number;
|
|
24
|
+
|
|
25
|
+
// Organization
|
|
26
|
+
category?: string;
|
|
27
|
+
dependencies?: string[];
|
|
28
|
+
|
|
29
|
+
// Status management
|
|
30
|
+
statusMode: TStatusMode;
|
|
31
|
+
manualStatus?: TStatusType;
|
|
32
|
+
paused: boolean;
|
|
33
|
+
|
|
34
|
+
// Check configuration
|
|
35
|
+
checkType?: TCheckType;
|
|
36
|
+
checkCollectionId?: string;
|
|
37
|
+
intervalMs?: number;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// ============================================
|
|
41
|
+
// Status History
|
|
42
|
+
// ============================================
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* A point in the status history timeline.
|
|
46
|
+
*/
|
|
47
|
+
export interface IStatusHistoryPoint {
|
|
48
|
+
timestamp: number;
|
|
49
|
+
status: TStatusType;
|
|
50
|
+
responseTime?: number;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// ============================================
|
|
54
|
+
// Overall Status
|
|
55
|
+
// ============================================
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Aggregate status for a group of services or entire status page.
|
|
59
|
+
*/
|
|
60
|
+
export interface IOverallStatus {
|
|
61
|
+
status: TStatusType;
|
|
62
|
+
message?: string;
|
|
63
|
+
lastUpdated: number;
|
|
64
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { IOverallStatus } from './servicestatus.js';
|
|
2
|
+
|
|
3
|
+
// ============================================
|
|
4
|
+
// Service Group
|
|
5
|
+
// ============================================
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* A group of related services displayed together.
|
|
9
|
+
*/
|
|
10
|
+
export interface IServiceGroup {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
serviceIds: string[];
|
|
15
|
+
expanded: boolean;
|
|
16
|
+
order?: number;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// ============================================
|
|
20
|
+
// Status Page Configuration
|
|
21
|
+
// ============================================
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Configuration for a public status page.
|
|
25
|
+
*/
|
|
26
|
+
export interface IStatusPageConfig {
|
|
27
|
+
id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
slug: string;
|
|
30
|
+
|
|
31
|
+
// Branding
|
|
32
|
+
logoUrl?: string;
|
|
33
|
+
faviconUrl?: string;
|
|
34
|
+
primaryColor?: string;
|
|
35
|
+
customCss?: string;
|
|
36
|
+
|
|
37
|
+
// Content
|
|
38
|
+
headerTitle: string;
|
|
39
|
+
headerDescription?: string;
|
|
40
|
+
footerText?: string;
|
|
41
|
+
|
|
42
|
+
// Features
|
|
43
|
+
showHistoricalUptime: boolean;
|
|
44
|
+
showResponseTime: boolean;
|
|
45
|
+
showSubscribeButton: boolean;
|
|
46
|
+
showIncidentHistory: boolean;
|
|
47
|
+
|
|
48
|
+
// Service grouping
|
|
49
|
+
serviceGroups: IServiceGroup[];
|
|
50
|
+
|
|
51
|
+
// Overall status override
|
|
52
|
+
overallStatus?: IOverallStatus;
|
|
53
|
+
|
|
54
|
+
// Custom domain
|
|
55
|
+
customDomain?: string;
|
|
56
|
+
sslEnabled?: boolean;
|
|
57
|
+
}
|
package/ts/data/types.ts
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared type definitions for uptime.link
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// ============================================
|
|
6
|
+
// Status Types
|
|
7
|
+
// ============================================
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Status types for monitors/services
|
|
11
|
+
*/
|
|
12
|
+
export type TStatusType =
|
|
13
|
+
| 'operational'
|
|
14
|
+
| 'degraded'
|
|
15
|
+
| 'partial_outage'
|
|
16
|
+
| 'major_outage'
|
|
17
|
+
| 'maintenance'
|
|
18
|
+
| 'initializing'
|
|
19
|
+
| 'error'
|
|
20
|
+
| 'paused';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Check types (discriminant values for TCheck union)
|
|
24
|
+
*/
|
|
25
|
+
export type TCheckType = 'assumption' | 'function' | 'pwa' | 'pagerank';
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Status mode for monitors - auto follows checks, manual is user-set
|
|
29
|
+
*/
|
|
30
|
+
export type TStatusMode = 'auto' | 'manual';
|
|
31
|
+
|
|
32
|
+
// ============================================
|
|
33
|
+
// Incident Types
|
|
34
|
+
// ============================================
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Incident severity levels
|
|
38
|
+
*/
|
|
39
|
+
export type TIncidentSeverity = 'critical' | 'major' | 'minor' | 'maintenance';
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Incident status workflow
|
|
43
|
+
*/
|
|
44
|
+
export type TIncidentStatus =
|
|
45
|
+
| 'investigating'
|
|
46
|
+
| 'identified'
|
|
47
|
+
| 'monitoring'
|
|
48
|
+
| 'resolved'
|
|
49
|
+
| 'postmortem';
|
|
50
|
+
|
|
51
|
+
// ============================================
|
|
52
|
+
// Check Result Types (used by execution)
|
|
53
|
+
// ============================================
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Result status for check execution
|
|
57
|
+
*/
|
|
58
|
+
export type TCheckResultStatus = 'ok' | 'not ok' | 'timed out';
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Last result state for a check
|
|
62
|
+
*/
|
|
63
|
+
export type TCheckLastResult = 'success' | 'failure' | 'pending';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IDomainSnapshot } from '../data/domainsnapshot.js';
|
|
2
|
-
import { ILinkSnapshot } from '../data/linksnapshot.js';
|
|
1
|
+
import type { IDomainSnapshot } from '../data/domainsnapshot.js';
|
|
2
|
+
import type { ILinkSnapshot } from '../data/linksnapshot.js';
|
|
3
3
|
import * as plugins from '../ul-interfaces.plugins.js';
|
|
4
4
|
|
|
5
5
|
export interface IReq_PerformDomainSnapshot
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as plugins from '../ul-interfaces.plugins.js';
|
|
2
2
|
import * as data from '../data/index.js';
|
|
3
|
-
import { IStatus } from '../data/status.js';
|
|
3
|
+
import type { IStatus } from '../data/status.js';
|
|
4
4
|
|
|
5
5
|
export interface IRequest_Status_Get
|
|
6
6
|
extends plugins.typedRequestInterfaces.implementsTR<
|