updown.io 3.4.5 → 3.4.6
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/package.json +5 -6
- package/dist/Endpoints.d.ts +0 -19
- package/dist/Endpoints.js +0 -37
- package/dist/UpdownIO.d.ts +0 -12
- package/dist/UpdownIO.js +0 -28
- package/dist/api/ChecksAPI.d.ts +0 -55
- package/dist/api/ChecksAPI.js +0 -113
- package/dist/api/NodesAPI.d.ts +0 -17
- package/dist/api/NodesAPI.js +0 -50
- package/dist/api/index.d.ts +0 -2
- package/dist/api/index.js +0 -18
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -18
- package/dist/interfaces/API.d.ts +0 -5
- package/dist/interfaces/API.js +0 -2
- package/dist/interfaces/Check.d.ts +0 -27
- package/dist/interfaces/Check.js +0 -2
- package/dist/interfaces/Deleted.d.ts +0 -3
- package/dist/interfaces/Deleted.js +0 -2
- package/dist/interfaces/Downtime.d.ts +0 -6
- package/dist/interfaces/Downtime.js +0 -2
- package/dist/interfaces/Metrics.d.ts +0 -25
- package/dist/interfaces/Metrics.js +0 -2
- package/dist/interfaces/Nodes.d.ts +0 -11
- package/dist/interfaces/Nodes.js +0 -2
- package/dist/interfaces/Options.d.ts +0 -56
- package/dist/interfaces/Options.js +0 -2
- package/dist/interfaces/index.d.ts +0 -7
- package/dist/interfaces/index.js +0 -23
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "Florian Imdahl <git@ffflorian.de>",
|
|
3
3
|
"dependencies": {
|
|
4
|
-
"@ffflorian/api-client": "2.
|
|
4
|
+
"@ffflorian/api-client": "2.5.0"
|
|
5
5
|
},
|
|
6
6
|
"description": "An updown.io API client",
|
|
7
7
|
"devDependencies": {
|
|
8
8
|
"@types/node": "~24",
|
|
9
|
-
"rimraf": "6.1.
|
|
10
|
-
"typedoc": "0.28.
|
|
11
|
-
"typescript": "
|
|
9
|
+
"rimraf": "6.1.3",
|
|
10
|
+
"typedoc": "0.28.18",
|
|
11
|
+
"typescript": "6.0.2"
|
|
12
12
|
},
|
|
13
13
|
"engines": {
|
|
14
14
|
"node": ">= 21"
|
|
@@ -35,6 +35,5 @@
|
|
|
35
35
|
"dist": "yarn clean && yarn build:ts",
|
|
36
36
|
"test": "exit 0"
|
|
37
37
|
},
|
|
38
|
-
"version": "3.4.
|
|
39
|
-
"gitHead": "8d7471cbe490305b3e441c27acbc81e36a4bd9df"
|
|
38
|
+
"version": "3.4.6"
|
|
40
39
|
}
|
package/dist/Endpoints.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare const Endpoint: {
|
|
2
|
-
CHECKS: string;
|
|
3
|
-
DOWNTIMES: string;
|
|
4
|
-
METRICS: string;
|
|
5
|
-
NODES: string;
|
|
6
|
-
IPV4: string;
|
|
7
|
-
IPV6: string;
|
|
8
|
-
Checks: {
|
|
9
|
-
check(token: string): string;
|
|
10
|
-
downtimes(token: string): string;
|
|
11
|
-
metrics(token: string): string;
|
|
12
|
-
};
|
|
13
|
-
Nodes: {
|
|
14
|
-
ipv4(): string;
|
|
15
|
-
ipv6(): string;
|
|
16
|
-
};
|
|
17
|
-
checks(token?: string): string;
|
|
18
|
-
nodes(): string;
|
|
19
|
-
};
|
package/dist/Endpoints.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Endpoint = void 0;
|
|
4
|
-
const encode = encodeURIComponent;
|
|
5
|
-
exports.Endpoint = {
|
|
6
|
-
CHECKS: 'checks',
|
|
7
|
-
DOWNTIMES: 'downtimes',
|
|
8
|
-
METRICS: 'metrics',
|
|
9
|
-
NODES: 'nodes',
|
|
10
|
-
IPV4: 'ipv4',
|
|
11
|
-
IPV6: 'ipv6',
|
|
12
|
-
Checks: {
|
|
13
|
-
check(token) {
|
|
14
|
-
return `/${exports.Endpoint.CHECKS}/${encode(token)}/`;
|
|
15
|
-
},
|
|
16
|
-
downtimes(token) {
|
|
17
|
-
return `/${exports.Endpoint.CHECKS}/${encode(token)}/${exports.Endpoint.DOWNTIMES}/`;
|
|
18
|
-
},
|
|
19
|
-
metrics(token) {
|
|
20
|
-
return `/${exports.Endpoint.CHECKS}/${encode(token)}/${exports.Endpoint.METRICS}/`;
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
Nodes: {
|
|
24
|
-
ipv4() {
|
|
25
|
-
return `/${exports.Endpoint.NODES}/${exports.Endpoint.IPV4}/`;
|
|
26
|
-
},
|
|
27
|
-
ipv6() {
|
|
28
|
-
return `/${exports.Endpoint.NODES}/${exports.Endpoint.IPV6}/`;
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
checks(token) {
|
|
32
|
-
return `/${exports.Endpoint.CHECKS}/${token ? `${encode(token)}/` : ''}`;
|
|
33
|
-
},
|
|
34
|
-
nodes() {
|
|
35
|
-
return `/${exports.Endpoint.NODES}/`;
|
|
36
|
-
},
|
|
37
|
-
};
|
package/dist/UpdownIO.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { API, ClientOptions } from './interfaces';
|
|
2
|
-
export declare class UpdownIO {
|
|
3
|
-
api: API;
|
|
4
|
-
private readonly apiClient;
|
|
5
|
-
constructor(apiKey?: string);
|
|
6
|
-
constructor(options?: ClientOptions);
|
|
7
|
-
/**
|
|
8
|
-
* Set a new API URL.
|
|
9
|
-
* @param newURL The new API url
|
|
10
|
-
*/
|
|
11
|
-
setApiUrl(newURL: string): void;
|
|
12
|
-
}
|
package/dist/UpdownIO.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UpdownIO = void 0;
|
|
4
|
-
const api_client_1 = require("@ffflorian/api-client");
|
|
5
|
-
const api_1 = require("./api");
|
|
6
|
-
class UpdownIO {
|
|
7
|
-
constructor(options) {
|
|
8
|
-
if (typeof options === 'string') {
|
|
9
|
-
options = { apiKey: options };
|
|
10
|
-
}
|
|
11
|
-
this.apiClient = new api_client_1.APIClient('https://updown.io/api/', {
|
|
12
|
-
headers: Object.assign({}, ((options === null || options === void 0 ? void 0 : options.apiKey) && { 'X-API-KEY': options.apiKey })),
|
|
13
|
-
});
|
|
14
|
-
this.api = {
|
|
15
|
-
checks: new api_1.ChecksAPI(this.apiClient),
|
|
16
|
-
nodes: new api_1.NodesAPI(this.apiClient),
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Set a new API URL.
|
|
21
|
-
* @param newURL The new API url
|
|
22
|
-
*/
|
|
23
|
-
setApiUrl(newURL) {
|
|
24
|
-
this.api.checks.setApiUrl(newURL);
|
|
25
|
-
this.api.nodes.setApiUrl(newURL);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
exports.UpdownIO = UpdownIO;
|
package/dist/api/ChecksAPI.d.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import type { APIClient } from '@ffflorian/api-client';
|
|
2
|
-
import type { Check, CheckOptions, Deleted, Downtime, Metrics, MetricsOptions } from '../interfaces';
|
|
3
|
-
export declare class ChecksAPI {
|
|
4
|
-
private readonly apiClient;
|
|
5
|
-
constructor(apiClient: APIClient);
|
|
6
|
-
/**
|
|
7
|
-
* Add a new check.
|
|
8
|
-
* @param url The URL you want to monitor.
|
|
9
|
-
* @param options Further check adding options
|
|
10
|
-
*/
|
|
11
|
-
addCheck(url: string, options?: CheckOptions): Promise<Check>;
|
|
12
|
-
/**
|
|
13
|
-
* Delete a check.
|
|
14
|
-
* @param token The check unique token
|
|
15
|
-
*/
|
|
16
|
-
deleteCheck(token: string): Promise<Deleted>;
|
|
17
|
-
/**
|
|
18
|
-
* Show a single check.
|
|
19
|
-
* @param token The check unique token
|
|
20
|
-
* @param metrics Include performance metrics (last hour only)
|
|
21
|
-
*/
|
|
22
|
-
getCheck(token: string, metrics?: boolean): Promise<Check>;
|
|
23
|
-
/** List all your checks. */
|
|
24
|
-
getChecks(): Promise<Check[]>;
|
|
25
|
-
/**
|
|
26
|
-
* Get all the downtimes of a check.
|
|
27
|
-
*
|
|
28
|
-
* @param token The check unique token
|
|
29
|
-
* @param page The page to fetch (100 per page)
|
|
30
|
-
*/
|
|
31
|
-
getDowntimes(token: string, page?: number): Promise<Downtime[]>;
|
|
32
|
-
/**
|
|
33
|
-
* Get detailed metrics about the check.
|
|
34
|
-
*
|
|
35
|
-
* Statistic are aggregated per hour which means you can't get more
|
|
36
|
-
* precise results than this. For example all requests performed
|
|
37
|
-
* between 5:00 and 5:59 will be reported at 5:00 in this API.
|
|
38
|
-
* The time range needs to be at least one hour to get data.
|
|
39
|
-
*
|
|
40
|
-
* @param token The check unique token
|
|
41
|
-
* @param page The page to fetch (100 per page)
|
|
42
|
-
*/
|
|
43
|
-
getMetrics(token: string, options?: MetricsOptions): Promise<Metrics>;
|
|
44
|
-
/**
|
|
45
|
-
* Set a new API URL.
|
|
46
|
-
* @param newURL The new API url
|
|
47
|
-
*/
|
|
48
|
-
setApiUrl(newURL: string): void;
|
|
49
|
-
/**
|
|
50
|
-
* Update a check.
|
|
51
|
-
* @param token The check unique token
|
|
52
|
-
* @param options Further check updating options
|
|
53
|
-
*/
|
|
54
|
-
updateCheck(token: string, options?: CheckOptions): Promise<Check>;
|
|
55
|
-
}
|
package/dist/api/ChecksAPI.js
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.ChecksAPI = void 0;
|
|
13
|
-
const Endpoints_1 = require("../Endpoints");
|
|
14
|
-
class ChecksAPI {
|
|
15
|
-
constructor(apiClient) {
|
|
16
|
-
this.apiClient = apiClient;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Add a new check.
|
|
20
|
-
* @param url The URL you want to monitor.
|
|
21
|
-
* @param options Further check adding options
|
|
22
|
-
*/
|
|
23
|
-
addCheck(url, options) {
|
|
24
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
-
const endpoint = Endpoints_1.Endpoint.checks();
|
|
26
|
-
const params = Object.assign({ url }, options);
|
|
27
|
-
const { data } = yield this.apiClient.post(endpoint, params);
|
|
28
|
-
return data;
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Delete a check.
|
|
33
|
-
* @param token The check unique token
|
|
34
|
-
*/
|
|
35
|
-
deleteCheck(token) {
|
|
36
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
-
const endpoint = Endpoints_1.Endpoint.checks(token);
|
|
38
|
-
const { data } = yield this.apiClient.delete(endpoint);
|
|
39
|
-
return data;
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Show a single check.
|
|
44
|
-
* @param token The check unique token
|
|
45
|
-
* @param metrics Include performance metrics (last hour only)
|
|
46
|
-
*/
|
|
47
|
-
getCheck(token, metrics) {
|
|
48
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
-
const endpoint = Endpoints_1.Endpoint.Checks.check(token);
|
|
50
|
-
const { data } = yield this.apiClient.get(endpoint, { data: { metrics } });
|
|
51
|
-
return data;
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
/** List all your checks. */
|
|
55
|
-
getChecks() {
|
|
56
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
-
const endpoint = Endpoints_1.Endpoint.checks();
|
|
58
|
-
const { data } = yield this.apiClient.get(endpoint);
|
|
59
|
-
return data;
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Get all the downtimes of a check.
|
|
64
|
-
*
|
|
65
|
-
* @param token The check unique token
|
|
66
|
-
* @param page The page to fetch (100 per page)
|
|
67
|
-
*/
|
|
68
|
-
getDowntimes(token, page) {
|
|
69
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
-
const endpoint = Endpoints_1.Endpoint.Checks.downtimes(token);
|
|
71
|
-
const { data } = yield this.apiClient.get(endpoint, { params: { page } });
|
|
72
|
-
return data;
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Get detailed metrics about the check.
|
|
77
|
-
*
|
|
78
|
-
* Statistic are aggregated per hour which means you can't get more
|
|
79
|
-
* precise results than this. For example all requests performed
|
|
80
|
-
* between 5:00 and 5:59 will be reported at 5:00 in this API.
|
|
81
|
-
* The time range needs to be at least one hour to get data.
|
|
82
|
-
*
|
|
83
|
-
* @param token The check unique token
|
|
84
|
-
* @param page The page to fetch (100 per page)
|
|
85
|
-
*/
|
|
86
|
-
getMetrics(token, options) {
|
|
87
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
88
|
-
const endpoint = Endpoints_1.Endpoint.Checks.downtimes(token);
|
|
89
|
-
const { data } = yield this.apiClient.get(endpoint, { params: options });
|
|
90
|
-
return data;
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Set a new API URL.
|
|
95
|
-
* @param newURL The new API url
|
|
96
|
-
*/
|
|
97
|
-
setApiUrl(newURL) {
|
|
98
|
-
this.apiClient.setBaseURL(newURL);
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Update a check.
|
|
102
|
-
* @param token The check unique token
|
|
103
|
-
* @param options Further check updating options
|
|
104
|
-
*/
|
|
105
|
-
updateCheck(token, options) {
|
|
106
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
107
|
-
const endpoint = Endpoints_1.Endpoint.checks(token);
|
|
108
|
-
const { data } = yield this.apiClient.put(endpoint, options);
|
|
109
|
-
return data;
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
exports.ChecksAPI = ChecksAPI;
|
package/dist/api/NodesAPI.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { APIClient } from '@ffflorian/api-client';
|
|
2
|
-
import type { Nodes } from '../interfaces';
|
|
3
|
-
export declare class NodesAPI {
|
|
4
|
-
private readonly apiClient;
|
|
5
|
-
constructor(apiClient: APIClient);
|
|
6
|
-
/** List all updown.io monitoring nodes IPv4 addresses. */
|
|
7
|
-
getIpv4Nodes(): Promise<string[]>;
|
|
8
|
-
/** List all updown.io monitoring nodes IPv6 addresses. */
|
|
9
|
-
getIpv6Nodes(): Promise<string[]>;
|
|
10
|
-
/** List all updown.io monitoring nodes. */
|
|
11
|
-
getNodes(): Promise<Nodes>;
|
|
12
|
-
/**
|
|
13
|
-
* Set a new API URL.
|
|
14
|
-
* @param newURL The new API url
|
|
15
|
-
*/
|
|
16
|
-
setApiUrl(newURL: string): void;
|
|
17
|
-
}
|
package/dist/api/NodesAPI.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.NodesAPI = void 0;
|
|
13
|
-
const Endpoints_1 = require("../Endpoints");
|
|
14
|
-
class NodesAPI {
|
|
15
|
-
constructor(apiClient) {
|
|
16
|
-
this.apiClient = apiClient;
|
|
17
|
-
}
|
|
18
|
-
/** List all updown.io monitoring nodes IPv4 addresses. */
|
|
19
|
-
getIpv4Nodes() {
|
|
20
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const endpoint = Endpoints_1.Endpoint.Nodes.ipv4();
|
|
22
|
-
const { data } = yield this.apiClient.get(endpoint);
|
|
23
|
-
return data;
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
/** List all updown.io monitoring nodes IPv6 addresses. */
|
|
27
|
-
getIpv6Nodes() {
|
|
28
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
const endpoint = Endpoints_1.Endpoint.Nodes.ipv6();
|
|
30
|
-
const { data } = yield this.apiClient.get(endpoint);
|
|
31
|
-
return data;
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
/** List all updown.io monitoring nodes. */
|
|
35
|
-
getNodes() {
|
|
36
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
-
const endpoint = Endpoints_1.Endpoint.nodes();
|
|
38
|
-
const { data } = yield this.apiClient.get(endpoint);
|
|
39
|
-
return data;
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Set a new API URL.
|
|
44
|
-
* @param newURL The new API url
|
|
45
|
-
*/
|
|
46
|
-
setApiUrl(newURL) {
|
|
47
|
-
this.apiClient.setBaseURL(newURL);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
exports.NodesAPI = NodesAPI;
|
package/dist/api/index.d.ts
DELETED
package/dist/api/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./ChecksAPI"), exports);
|
|
18
|
-
__exportStar(require("./NodesAPI"), exports);
|
package/dist/index.d.ts
DELETED
package/dist/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./UpdownIO"), exports);
|
|
18
|
-
__exportStar(require("./interfaces/"), exports);
|
package/dist/interfaces/API.d.ts
DELETED
package/dist/interfaces/API.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { CustomHeaders } from './Options';
|
|
2
|
-
export interface Check {
|
|
3
|
-
alias: string;
|
|
4
|
-
apdex_t: number;
|
|
5
|
-
custom_headers: CustomHeaders;
|
|
6
|
-
disabled_locations: string[];
|
|
7
|
-
down: boolean;
|
|
8
|
-
down_since: string | null;
|
|
9
|
-
enabled: boolean;
|
|
10
|
-
error: string | null;
|
|
11
|
-
favicon_url: string | null;
|
|
12
|
-
last_check_at: string;
|
|
13
|
-
last_status: number;
|
|
14
|
-
mute_until: string | null;
|
|
15
|
-
next_check_at: string;
|
|
16
|
-
period: number;
|
|
17
|
-
published: boolean;
|
|
18
|
-
ssl: {
|
|
19
|
-
error: string | null;
|
|
20
|
-
tested_at: string;
|
|
21
|
-
valid: boolean;
|
|
22
|
-
};
|
|
23
|
-
string_match: number;
|
|
24
|
-
token: string;
|
|
25
|
-
uptime: number;
|
|
26
|
-
url: string;
|
|
27
|
-
}
|
package/dist/interfaces/Check.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export interface Metrics {
|
|
2
|
-
apdex: number;
|
|
3
|
-
requests: {
|
|
4
|
-
by_response_time: {
|
|
5
|
-
under1000: number;
|
|
6
|
-
under125: number;
|
|
7
|
-
under2000: number;
|
|
8
|
-
under250: number;
|
|
9
|
-
under4000: number;
|
|
10
|
-
under500: number;
|
|
11
|
-
};
|
|
12
|
-
failures: number;
|
|
13
|
-
samples: number;
|
|
14
|
-
satisfied: number;
|
|
15
|
-
tolerated: number;
|
|
16
|
-
};
|
|
17
|
-
timings: {
|
|
18
|
-
connection: number;
|
|
19
|
-
handshake: number;
|
|
20
|
-
namelookup: number;
|
|
21
|
-
redirect: number;
|
|
22
|
-
response: number;
|
|
23
|
-
total: number;
|
|
24
|
-
};
|
|
25
|
-
}
|
package/dist/interfaces/Nodes.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
export interface ClientOptions {
|
|
2
|
-
apiKey: string;
|
|
3
|
-
apiUrl?: string;
|
|
4
|
-
}
|
|
5
|
-
export interface CustomHeaders {
|
|
6
|
-
[key: string]: string | number | boolean;
|
|
7
|
-
}
|
|
8
|
-
export type HttpMethod = 'delete' | 'get' | 'post' | 'put';
|
|
9
|
-
type MetricsGroup = 'time' | 'host';
|
|
10
|
-
export interface RequestOptions {
|
|
11
|
-
alias?: string;
|
|
12
|
-
apdex_t?: number;
|
|
13
|
-
'api-key'?: string;
|
|
14
|
-
custom_headers?: CustomHeaders;
|
|
15
|
-
disabled_locations?: string[];
|
|
16
|
-
enabled?: boolean;
|
|
17
|
-
from?: string;
|
|
18
|
-
group?: MetricsGroup;
|
|
19
|
-
metrics?: boolean;
|
|
20
|
-
mute_until?: string;
|
|
21
|
-
page?: number;
|
|
22
|
-
period?: number;
|
|
23
|
-
published?: boolean;
|
|
24
|
-
string_match?: string;
|
|
25
|
-
to?: string;
|
|
26
|
-
url?: string;
|
|
27
|
-
}
|
|
28
|
-
export interface MetricsOptions {
|
|
29
|
-
/** Start time, default to 1 month ago */
|
|
30
|
-
from?: string;
|
|
31
|
-
/** Group data by 'time' (hour) or 'host' (location) */
|
|
32
|
-
group: MetricsGroup;
|
|
33
|
-
/** End time, default to now */
|
|
34
|
-
to?: string;
|
|
35
|
-
}
|
|
36
|
-
export interface CheckOptions {
|
|
37
|
-
/** Human readable name */
|
|
38
|
-
alias?: string;
|
|
39
|
-
/** APDEX threshold in seconds (0.125, 0.25, 0.5, 1.0 or 2.0) */
|
|
40
|
-
apdex_t?: number;
|
|
41
|
-
/** The HTTP headers you want in updown requests. Ex: custom_headers[X-Api-Key]=xxxxxxxxx */
|
|
42
|
-
customHeaders?: CustomHeaders;
|
|
43
|
-
/** Disabled monitoring locations. It's an array of abbreviated location names. Can be any of these: ["lan", "mia", "bhs", "gra", "fra", "sin", "tok", "syd"]. Ex: disabled_locations[]=lan&disabled_locations[]=syd */
|
|
44
|
-
disabledLocations?: string[];
|
|
45
|
-
/** Is the check enabled (true or false) */
|
|
46
|
-
enabled?: boolean;
|
|
47
|
-
/** Mute notifications until given time, accepts a time, 'recovery' or 'forever' */
|
|
48
|
-
mute_until?: string;
|
|
49
|
-
/** Interval in seconds (15, 30, 60, 120, 300, 600, 1800 or 3600) */
|
|
50
|
-
period?: number;
|
|
51
|
-
/** Shall the status page be public (true or false) */
|
|
52
|
-
published?: boolean;
|
|
53
|
-
/** Search for this string in the page */
|
|
54
|
-
string_match?: string;
|
|
55
|
-
}
|
|
56
|
-
export {};
|
package/dist/interfaces/index.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./API"), exports);
|
|
18
|
-
__exportStar(require("./Check"), exports);
|
|
19
|
-
__exportStar(require("./Deleted"), exports);
|
|
20
|
-
__exportStar(require("./Downtime"), exports);
|
|
21
|
-
__exportStar(require("./Metrics"), exports);
|
|
22
|
-
__exportStar(require("./Nodes"), exports);
|
|
23
|
-
__exportStar(require("./Options"), exports);
|