watchfor 0.17.0 → 0.17.2
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/README.md +9 -2
- package/dist/cli.js +18 -5
- package/dist/client.d.ts +13 -1
- package/dist/client.js +32 -7
- package/dist/schema.d.ts +719 -39
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -102,7 +102,8 @@ const dns = await wf.diagnostics.run("dns-lookup", {
|
|
|
102
102
|
target: "example.com",
|
|
103
103
|
options: { recordType: "A", resolver: "8.8.8.8" },
|
|
104
104
|
});
|
|
105
|
-
// A closed port
|
|
105
|
+
// A closed port, NXDOMAIN, expired certificate or unresolvable host does NOT
|
|
106
|
+
// throw — `success` is false and `error` says why (`result` keeps the raw answer):
|
|
106
107
|
if (!dns.success) console.log("finding:", dns.error);
|
|
107
108
|
console.log("runs left this hour:", dns.remaining);
|
|
108
109
|
|
|
@@ -133,7 +134,13 @@ Toolbox. Details: https://watchfor.io/docs/api/diagnostics
|
|
|
133
134
|
|
|
134
135
|
- Fully typed from the [OpenAPI spec](https://watchfor.io/openapi.json)
|
|
135
136
|
- Zero runtime dependencies (uses global `fetch`, Node ≥ 18)
|
|
136
|
-
- `WatchForError` carries `status`, `code` and `retryAfterSeconds
|
|
137
|
+
- `WatchForError` carries `status`, `code` and `retryAfterSeconds`; a
|
|
138
|
+
non-JSON answer (an HTML page from a wrong base URL or a proxy) is a
|
|
139
|
+
short `http_error` / `invalid_response` pointing at the base URL
|
|
140
|
+
- `baseUrl` (and the CLI's `WATCHFOR_BASE_URL`) takes the origin
|
|
141
|
+
(`https://watchfor.io`) or the full base (`https://watchfor.io/api/v1`) —
|
|
142
|
+
the same value works for the Python and Ruby SDKs
|
|
143
|
+
- CLI: `watchfor --version`; `report --period` accepts only `7d` or `30d`
|
|
137
144
|
- Pass an idempotency key as the second argument of any `create` call for safe retries
|
|
138
145
|
|
|
139
146
|
## Organizations
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from "node:module";
|
|
2
3
|
import { WatchFor, WatchForError } from "./client.js";
|
|
4
|
+
/** The package version (dist/cli.js and src/cli.ts both sit next to
|
|
5
|
+
* ../package.json, which npm always ships). */
|
|
6
|
+
const VERSION = createRequire(import.meta.url)("../package.json").version;
|
|
3
7
|
/**
|
|
4
8
|
* `watchfor` CLI — quick terminal access to the monitoring API.
|
|
5
9
|
*
|
|
@@ -29,6 +33,7 @@ Commands:
|
|
|
29
33
|
watchfor metrics [--tag t] [--type t]
|
|
30
34
|
Prometheus text format (Pro plan and above)
|
|
31
35
|
watchfor help
|
|
36
|
+
watchfor --version Print the CLI/SDK version
|
|
32
37
|
|
|
33
38
|
Global options:
|
|
34
39
|
--organization <id> Organization to act on (X-WatchFor-Organization). OAuth
|
|
@@ -38,7 +43,7 @@ Global options:
|
|
|
38
43
|
Environment:
|
|
39
44
|
WATCHFOR_API_KEY API key (dashboard → Settings → API keys) or an OAuth access token
|
|
40
45
|
WATCHFOR_ORGANIZATION Default for --organization
|
|
41
|
-
WATCHFOR_BASE_URL Override (default https://watchfor.io)
|
|
46
|
+
WATCHFOR_BASE_URL Override (default https://watchfor.io; the origin or …/api/v1)
|
|
42
47
|
`;
|
|
43
48
|
function flag(args, name) {
|
|
44
49
|
const i = args.indexOf(`--${name}`);
|
|
@@ -73,6 +78,10 @@ async function main() {
|
|
|
73
78
|
process.stdout.write(HELP);
|
|
74
79
|
return 0;
|
|
75
80
|
}
|
|
81
|
+
if (cmd === "--version" || cmd === "-v" || cmd === "version") {
|
|
82
|
+
console.log(`watchfor ${VERSION}`);
|
|
83
|
+
return 0;
|
|
84
|
+
}
|
|
76
85
|
const apiKey = process.env.WATCHFOR_API_KEY;
|
|
77
86
|
if (!apiKey) {
|
|
78
87
|
console.error("WATCHFOR_API_KEY is not set. Create a key in the dashboard (Settings → API keys).");
|
|
@@ -129,10 +138,14 @@ async function main() {
|
|
|
129
138
|
return 0;
|
|
130
139
|
}
|
|
131
140
|
case "report": {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
141
|
+
// An invalid --period is an error, never silently replaced (same
|
|
142
|
+
// as the Python and Ruby CLIs).
|
|
143
|
+
const given = flag(args, "period");
|
|
144
|
+
if (given !== undefined && given !== "7d" && given !== "30d") {
|
|
145
|
+
console.error(`--period must be 7d or 30d (got "${given === "true" ? "" : given}")`);
|
|
146
|
+
return 2;
|
|
147
|
+
}
|
|
148
|
+
const period = (given ?? "7d");
|
|
136
149
|
const r = (await wf.report({ period }));
|
|
137
150
|
const sm = r.summary ?? {};
|
|
138
151
|
const up = sm.uptimePct?.current;
|
package/dist/client.d.ts
CHANGED
|
@@ -125,6 +125,13 @@ export interface List<T> {
|
|
|
125
125
|
next_cursor?: string | null;
|
|
126
126
|
total?: number;
|
|
127
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* The API origin, whichever form was given: `https://watchfor.io`,
|
|
130
|
+
* `https://watchfor.io/`, `https://watchfor.io/api/v1` and
|
|
131
|
+
* `https://watchfor.io/api/v1/` all normalise to `https://watchfor.io`
|
|
132
|
+
* (the client appends `/api/v1`). Exported for tests.
|
|
133
|
+
*/
|
|
134
|
+
export declare function normalizeBaseUrl(baseUrl?: string): string;
|
|
128
135
|
export declare class WatchForError extends Error {
|
|
129
136
|
readonly status: number;
|
|
130
137
|
readonly code: string;
|
|
@@ -143,7 +150,12 @@ export interface WatchForOptions {
|
|
|
143
150
|
* or set that same id — any other id is 403 `forbidden`.
|
|
144
151
|
*/
|
|
145
152
|
organization?: string;
|
|
146
|
-
/**
|
|
153
|
+
/**
|
|
154
|
+
* Override for self-hosted / testing. Default https://watchfor.io —
|
|
155
|
+
* the origin or the full API base: `https://watchfor.io` and
|
|
156
|
+
* `https://watchfor.io/api/v1` are the same (as in the Python and Ruby
|
|
157
|
+
* SDKs).
|
|
158
|
+
*/
|
|
147
159
|
baseUrl?: string;
|
|
148
160
|
fetch?: typeof fetch;
|
|
149
161
|
}
|
package/dist/client.js
CHANGED
|
@@ -13,6 +13,20 @@
|
|
|
13
13
|
*/
|
|
14
14
|
/** The request header that selects the organization an OAuth token acts on. */
|
|
15
15
|
export const ORGANIZATION_HEADER = "X-WatchFor-Organization";
|
|
16
|
+
/**
|
|
17
|
+
* The API origin, whichever form was given: `https://watchfor.io`,
|
|
18
|
+
* `https://watchfor.io/`, `https://watchfor.io/api/v1` and
|
|
19
|
+
* `https://watchfor.io/api/v1/` all normalise to `https://watchfor.io`
|
|
20
|
+
* (the client appends `/api/v1`). Exported for tests.
|
|
21
|
+
*/
|
|
22
|
+
export function normalizeBaseUrl(baseUrl) {
|
|
23
|
+
const trimmed = (baseUrl?.trim() || "https://watchfor.io").replace(/\/+$/, "");
|
|
24
|
+
return trimmed.replace(/\/api\/v1$/i, "");
|
|
25
|
+
}
|
|
26
|
+
/** A short, actionable message for a response that isn't API JSON. */
|
|
27
|
+
function notApiMessage(status, url) {
|
|
28
|
+
return `HTTP ${status} from ${url} — the response is not WatchFor API JSON. Is the base URL right? Use the origin, e.g. https://watchfor.io (WATCHFOR_BASE_URL).`;
|
|
29
|
+
}
|
|
16
30
|
export class WatchForError extends Error {
|
|
17
31
|
status;
|
|
18
32
|
code;
|
|
@@ -39,7 +53,7 @@ export class WatchFor {
|
|
|
39
53
|
this.options = opts;
|
|
40
54
|
this.apiKey = opts.apiKey;
|
|
41
55
|
this.organization = opts.organization?.trim() || undefined;
|
|
42
|
-
this.base = (opts.baseUrl
|
|
56
|
+
this.base = normalizeBaseUrl(opts.baseUrl);
|
|
43
57
|
this.fetchImpl = opts.fetch ?? fetch;
|
|
44
58
|
}
|
|
45
59
|
/**
|
|
@@ -78,18 +92,29 @@ export class WatchFor {
|
|
|
78
92
|
return undefined;
|
|
79
93
|
if (opts.text && res.ok)
|
|
80
94
|
return (await res.text());
|
|
95
|
+
const raw = await res.text();
|
|
81
96
|
let json = null;
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
97
|
+
let parsed = raw.trim() === "";
|
|
98
|
+
if (!parsed) {
|
|
99
|
+
try {
|
|
100
|
+
json = JSON.parse(raw);
|
|
101
|
+
parsed = true;
|
|
102
|
+
}
|
|
103
|
+
catch {
|
|
104
|
+
/* non-JSON body — an HTML page from a wrong base URL or a proxy */
|
|
105
|
+
}
|
|
87
106
|
}
|
|
88
107
|
if (!res.ok) {
|
|
89
108
|
const err = json
|
|
90
109
|
?.error;
|
|
91
110
|
const retry = res.headers.get("Retry-After");
|
|
92
|
-
throw new WatchForError(res.status, err?.code ?? "http_error", err?.message ??
|
|
111
|
+
throw new WatchForError(res.status, err?.code ?? "http_error", err?.message ??
|
|
112
|
+
(parsed
|
|
113
|
+
? `HTTP ${res.status}`
|
|
114
|
+
: notApiMessage(res.status, url.toString())), retry ? Number(retry) : undefined);
|
|
115
|
+
}
|
|
116
|
+
if (!parsed) {
|
|
117
|
+
throw new WatchForError(res.status, "invalid_response", notApiMessage(res.status, url.toString()));
|
|
93
118
|
}
|
|
94
119
|
return json;
|
|
95
120
|
}
|
package/dist/schema.d.ts
CHANGED
|
@@ -398,7 +398,10 @@ export interface paths {
|
|
|
398
398
|
};
|
|
399
399
|
get?: never;
|
|
400
400
|
put?: never;
|
|
401
|
-
/**
|
|
401
|
+
/**
|
|
402
|
+
* Dispatch one immediate check (plan-budgeted per hour)
|
|
403
|
+
* @description Asynchronous: 202, and the result lands in GET /monitors/{id}/checks within the probe timeout. Budgeted per monitor by the plan's check-now allowance (shared with the dashboard). Over that budget → 429 `rate_limited` whose `error.next_allowed_at` (and `Retry-After`) say when the next check-now is allowed — distinct from the API rate limit the X-RateLimit-* headers describe. Send an `Idempotency-Key` to retry safely: a retry with the same key replays the original 202 (with `Idempotency-Replay: true`) instead of spending, or being refused by, the hourly budget.
|
|
404
|
+
*/
|
|
402
405
|
post: operations["runMonitorCheckNow"];
|
|
403
406
|
delete?: never;
|
|
404
407
|
options?: never;
|
|
@@ -1165,6 +1168,660 @@ export interface paths {
|
|
|
1165
1168
|
export type webhooks = Record<string, never>;
|
|
1166
1169
|
export interface components {
|
|
1167
1170
|
schemas: {
|
|
1171
|
+
/** @description ssl monitors — the certificate card. `protocol`/`cipher_suite` are the negotiated connection's. */
|
|
1172
|
+
MonitorLatestSsl: {
|
|
1173
|
+
/**
|
|
1174
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1175
|
+
* @enum {string}
|
|
1176
|
+
*/
|
|
1177
|
+
kind: "ssl";
|
|
1178
|
+
/**
|
|
1179
|
+
* Format: date-time
|
|
1180
|
+
* @description When the check this block describes ran.
|
|
1181
|
+
*/
|
|
1182
|
+
checked_at: string | null;
|
|
1183
|
+
days_until_expiry: number | null;
|
|
1184
|
+
/** Format: date-time */
|
|
1185
|
+
not_after: string | null;
|
|
1186
|
+
/** @description Issuer organisation, else its common name. */
|
|
1187
|
+
issuer: string | null;
|
|
1188
|
+
/** @description e.g. "TLS 1.3". */
|
|
1189
|
+
protocol: string | null;
|
|
1190
|
+
valid: boolean | null;
|
|
1191
|
+
hostname_match: boolean | null;
|
|
1192
|
+
chain_valid: boolean | null;
|
|
1193
|
+
subject: string | null;
|
|
1194
|
+
/** @description Subject alternative names. */
|
|
1195
|
+
sans: string[] | null;
|
|
1196
|
+
cipher_suite: string | null;
|
|
1197
|
+
forward_secrecy: boolean | null;
|
|
1198
|
+
/** @description Daily TLS grade (A+ … F) when the monitor opts into grading; from the latest graded check. */
|
|
1199
|
+
tls_grade: string | null;
|
|
1200
|
+
/**
|
|
1201
|
+
* Format: date-time
|
|
1202
|
+
* @description When that grade was measured.
|
|
1203
|
+
*/
|
|
1204
|
+
tls_graded_at: string | null;
|
|
1205
|
+
};
|
|
1206
|
+
/** @description rdap (domain) monitors — the registration card. Expiry fields come from the latest check that found an expiry (an expired domain included); registrar, status and dates from the latest check that returned them. */
|
|
1207
|
+
MonitorLatestRdap: {
|
|
1208
|
+
/**
|
|
1209
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1210
|
+
* @enum {string}
|
|
1211
|
+
*/
|
|
1212
|
+
kind: "rdap";
|
|
1213
|
+
/**
|
|
1214
|
+
* Format: date-time
|
|
1215
|
+
* @description When the check this block describes ran.
|
|
1216
|
+
*/
|
|
1217
|
+
checked_at: string | null;
|
|
1218
|
+
/** Format: date-time */
|
|
1219
|
+
expires_at: string | null;
|
|
1220
|
+
/** @description Negative once the domain has expired. */
|
|
1221
|
+
days_until_expiry: number | null;
|
|
1222
|
+
registrar: string | null;
|
|
1223
|
+
nameservers: string[];
|
|
1224
|
+
/** @description RDAP/EPP status codes, e.g. "client transfer prohibited". */
|
|
1225
|
+
status: string[];
|
|
1226
|
+
/** @description Registration date — ISO 8601 when parseable, else as the registry reports it. */
|
|
1227
|
+
created_date: string | null;
|
|
1228
|
+
/** @description Last registry update — ISO 8601 when parseable, else as reported. */
|
|
1229
|
+
updated_date: string | null;
|
|
1230
|
+
/** @description The expiry came from the prober's lookup cache rather than a fresh registry query. */
|
|
1231
|
+
cached: boolean | null;
|
|
1232
|
+
};
|
|
1233
|
+
/** @description heartbeat monitors — the last-ping card. */
|
|
1234
|
+
MonitorLatestHeartbeat: {
|
|
1235
|
+
/**
|
|
1236
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1237
|
+
* @enum {string}
|
|
1238
|
+
*/
|
|
1239
|
+
kind: "heartbeat";
|
|
1240
|
+
/**
|
|
1241
|
+
* Format: date-time
|
|
1242
|
+
* @description The latest heartbeat event of any kind (ping, start or miss).
|
|
1243
|
+
*/
|
|
1244
|
+
checked_at: string | null;
|
|
1245
|
+
/**
|
|
1246
|
+
* Format: date-time
|
|
1247
|
+
* @description Last finish/plain ping (starts and scheduler-fired misses do not count).
|
|
1248
|
+
*/
|
|
1249
|
+
last_ping_at: string | null;
|
|
1250
|
+
/**
|
|
1251
|
+
* Format: date-time
|
|
1252
|
+
* @description Period schedules only; null for cron.
|
|
1253
|
+
*/
|
|
1254
|
+
next_expected_at: string | null;
|
|
1255
|
+
missed: boolean;
|
|
1256
|
+
last_exit_code: number | null;
|
|
1257
|
+
};
|
|
1258
|
+
/** @description http monitors — the latest check. */
|
|
1259
|
+
MonitorLatestHttp: {
|
|
1260
|
+
/**
|
|
1261
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1262
|
+
* @enum {string}
|
|
1263
|
+
*/
|
|
1264
|
+
kind: "http";
|
|
1265
|
+
/**
|
|
1266
|
+
* Format: date-time
|
|
1267
|
+
* @description When the check this block describes ran.
|
|
1268
|
+
*/
|
|
1269
|
+
checked_at: string | null;
|
|
1270
|
+
status_code: number | null;
|
|
1271
|
+
ttfb_ms: number | null;
|
|
1272
|
+
redirects_count: number | null;
|
|
1273
|
+
/** @description Days until the certificate the latest check saw expires; null when it saw none (plain text, or failed before TLS). */
|
|
1274
|
+
cert_days_left: number | null;
|
|
1275
|
+
};
|
|
1276
|
+
/** @description api monitors — the latest check. */
|
|
1277
|
+
MonitorLatestApi: {
|
|
1278
|
+
/**
|
|
1279
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1280
|
+
* @enum {string}
|
|
1281
|
+
*/
|
|
1282
|
+
kind: "api";
|
|
1283
|
+
/**
|
|
1284
|
+
* Format: date-time
|
|
1285
|
+
* @description When the check this block describes ran.
|
|
1286
|
+
*/
|
|
1287
|
+
checked_at: string | null;
|
|
1288
|
+
status_code: number | null;
|
|
1289
|
+
response_time_ms: number | null;
|
|
1290
|
+
/** @description Days until the certificate the latest check saw expires; null when it saw none (plain text, or failed before TLS). */
|
|
1291
|
+
cert_days_left: number | null;
|
|
1292
|
+
assertions_total: number | null;
|
|
1293
|
+
assertions_failed: number | null;
|
|
1294
|
+
/** @description The latest check's failing assertions (at most 20), redacted like check payloads. */
|
|
1295
|
+
failed_assertions: {
|
|
1296
|
+
source: string | null;
|
|
1297
|
+
property: string | null;
|
|
1298
|
+
operator: string | null;
|
|
1299
|
+
expected: string | null;
|
|
1300
|
+
actual: string | null;
|
|
1301
|
+
error: string | null;
|
|
1302
|
+
}[];
|
|
1303
|
+
};
|
|
1304
|
+
/** @description tcp monitors — the latest check. */
|
|
1305
|
+
MonitorLatestTcp: {
|
|
1306
|
+
/**
|
|
1307
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1308
|
+
* @enum {string}
|
|
1309
|
+
*/
|
|
1310
|
+
kind: "tcp";
|
|
1311
|
+
/**
|
|
1312
|
+
* Format: date-time
|
|
1313
|
+
* @description When the check this block describes ran.
|
|
1314
|
+
*/
|
|
1315
|
+
checked_at: string | null;
|
|
1316
|
+
connect_ms: number | null;
|
|
1317
|
+
/** @description null without TLS. */
|
|
1318
|
+
tls_handshake_ms: number | null;
|
|
1319
|
+
/** @description Days until the certificate the latest check saw expires; null when it saw none (plain text, or failed before TLS). */
|
|
1320
|
+
cert_days_left: number | null;
|
|
1321
|
+
};
|
|
1322
|
+
/** @description udp monitors — the latest check. */
|
|
1323
|
+
MonitorLatestUdp: {
|
|
1324
|
+
/**
|
|
1325
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1326
|
+
* @enum {string}
|
|
1327
|
+
*/
|
|
1328
|
+
kind: "udp";
|
|
1329
|
+
/**
|
|
1330
|
+
* Format: date-time
|
|
1331
|
+
* @description When the check this block describes ran.
|
|
1332
|
+
*/
|
|
1333
|
+
checked_at: string | null;
|
|
1334
|
+
response_received: boolean | null;
|
|
1335
|
+
bytes_received: number | null;
|
|
1336
|
+
first_byte_ms: number | null;
|
|
1337
|
+
};
|
|
1338
|
+
/** @description icmp (ping) monitors — the latest check. RTTs are null when no reply came back. */
|
|
1339
|
+
MonitorLatestIcmp: {
|
|
1340
|
+
/**
|
|
1341
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1342
|
+
* @enum {string}
|
|
1343
|
+
*/
|
|
1344
|
+
kind: "icmp";
|
|
1345
|
+
/**
|
|
1346
|
+
* Format: date-time
|
|
1347
|
+
* @description When the check this block describes ran.
|
|
1348
|
+
*/
|
|
1349
|
+
checked_at: string | null;
|
|
1350
|
+
rtt_avg_ms: number | null;
|
|
1351
|
+
rtt_min_ms: number | null;
|
|
1352
|
+
rtt_max_ms: number | null;
|
|
1353
|
+
jitter_ms: number | null;
|
|
1354
|
+
packet_loss_pct: number | null;
|
|
1355
|
+
packets_sent: number | null;
|
|
1356
|
+
packets_received: number | null;
|
|
1357
|
+
};
|
|
1358
|
+
/** @description dns monitors — the latest check. */
|
|
1359
|
+
MonitorLatestDns: {
|
|
1360
|
+
/**
|
|
1361
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1362
|
+
* @enum {string}
|
|
1363
|
+
*/
|
|
1364
|
+
kind: "dns";
|
|
1365
|
+
/**
|
|
1366
|
+
* Format: date-time
|
|
1367
|
+
* @description When the check this block describes ran.
|
|
1368
|
+
*/
|
|
1369
|
+
checked_at: string | null;
|
|
1370
|
+
query_type: string | null;
|
|
1371
|
+
/** @description e.g. "NOERROR", "NXDOMAIN". */
|
|
1372
|
+
rcode: string | null;
|
|
1373
|
+
answers_count: number | null;
|
|
1374
|
+
lookup_ms: number | null;
|
|
1375
|
+
};
|
|
1376
|
+
/** @description smtp monitors — the latest check. */
|
|
1377
|
+
MonitorLatestSmtp: {
|
|
1378
|
+
/**
|
|
1379
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1380
|
+
* @enum {string}
|
|
1381
|
+
*/
|
|
1382
|
+
kind: "smtp";
|
|
1383
|
+
/**
|
|
1384
|
+
* Format: date-time
|
|
1385
|
+
* @description When the check this block describes ran.
|
|
1386
|
+
*/
|
|
1387
|
+
checked_at: string | null;
|
|
1388
|
+
connect_ms: number | null;
|
|
1389
|
+
tls_supported: boolean | null;
|
|
1390
|
+
open_relay: boolean | null;
|
|
1391
|
+
ptr_valid: boolean | null;
|
|
1392
|
+
/** @description Days until the certificate the latest check saw expires; null when it saw none (plain text, or failed before TLS). */
|
|
1393
|
+
cert_days_left: number | null;
|
|
1394
|
+
/** @description null = no username configured. */
|
|
1395
|
+
login_ok: boolean | null;
|
|
1396
|
+
};
|
|
1397
|
+
/** @description sitemap monitors — the latest check. */
|
|
1398
|
+
MonitorLatestSitemap: {
|
|
1399
|
+
/**
|
|
1400
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1401
|
+
* @enum {string}
|
|
1402
|
+
*/
|
|
1403
|
+
kind: "sitemap";
|
|
1404
|
+
/**
|
|
1405
|
+
* Format: date-time
|
|
1406
|
+
* @description When the check this block describes ran.
|
|
1407
|
+
*/
|
|
1408
|
+
checked_at: string | null;
|
|
1409
|
+
found: boolean | null;
|
|
1410
|
+
url_count: number | null;
|
|
1411
|
+
broken_urls: number | null;
|
|
1412
|
+
broken_percent: number | null;
|
|
1413
|
+
};
|
|
1414
|
+
/** @description mtr (traceroute) monitors — the latest check. */
|
|
1415
|
+
MonitorLatestMtr: {
|
|
1416
|
+
/**
|
|
1417
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1418
|
+
* @enum {string}
|
|
1419
|
+
*/
|
|
1420
|
+
kind: "mtr";
|
|
1421
|
+
/**
|
|
1422
|
+
* Format: date-time
|
|
1423
|
+
* @description When the check this block describes ran.
|
|
1424
|
+
*/
|
|
1425
|
+
checked_at: string | null;
|
|
1426
|
+
destination_reached: boolean | null;
|
|
1427
|
+
hops: number | null;
|
|
1428
|
+
visible_hops: number | null;
|
|
1429
|
+
unresponsive_hops: number | null;
|
|
1430
|
+
destination_loss_pct: number | null;
|
|
1431
|
+
path_loss_max_pct: number | null;
|
|
1432
|
+
/** @description Destination round trip; null when not reached. */
|
|
1433
|
+
rtt_avg_ms: number | null;
|
|
1434
|
+
};
|
|
1435
|
+
/** @description ntp monitors — the latest check. Clock figures are null when no sample was valid. */
|
|
1436
|
+
MonitorLatestNtp: {
|
|
1437
|
+
/**
|
|
1438
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1439
|
+
* @enum {string}
|
|
1440
|
+
*/
|
|
1441
|
+
kind: "ntp";
|
|
1442
|
+
/**
|
|
1443
|
+
* Format: date-time
|
|
1444
|
+
* @description When the check this block describes ran.
|
|
1445
|
+
*/
|
|
1446
|
+
checked_at: string | null;
|
|
1447
|
+
/** @description Signed clock offset. */
|
|
1448
|
+
offset_ms: number | null;
|
|
1449
|
+
delay_ms: number | null;
|
|
1450
|
+
jitter_ms: number | null;
|
|
1451
|
+
/** @description 1–15 synced, 16 unsynchronised. */
|
|
1452
|
+
stratum: number | null;
|
|
1453
|
+
synced: boolean | null;
|
|
1454
|
+
/** @description The probe's own verdict against the configured offset/delay limits. */
|
|
1455
|
+
check_passed: boolean | null;
|
|
1456
|
+
};
|
|
1457
|
+
/** @description websocket monitors — the latest check. */
|
|
1458
|
+
MonitorLatestWebsocket: {
|
|
1459
|
+
/**
|
|
1460
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1461
|
+
* @enum {string}
|
|
1462
|
+
*/
|
|
1463
|
+
kind: "websocket";
|
|
1464
|
+
/**
|
|
1465
|
+
* Format: date-time
|
|
1466
|
+
* @description When the check this block describes ran.
|
|
1467
|
+
*/
|
|
1468
|
+
checked_at: string | null;
|
|
1469
|
+
connected: boolean;
|
|
1470
|
+
handshake_ms: number | null;
|
|
1471
|
+
/** @description null when the ping check is off. */
|
|
1472
|
+
ping_rtt_ms: number | null;
|
|
1473
|
+
/** @description null when no expect pattern is configured. */
|
|
1474
|
+
message_matched: boolean | null;
|
|
1475
|
+
};
|
|
1476
|
+
/** @description blacklist (DNSBL) monitors — the latest check. */
|
|
1477
|
+
MonitorLatestBlacklist: {
|
|
1478
|
+
/**
|
|
1479
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1480
|
+
* @enum {string}
|
|
1481
|
+
*/
|
|
1482
|
+
kind: "blacklist";
|
|
1483
|
+
/**
|
|
1484
|
+
* Format: date-time
|
|
1485
|
+
* @description When the check this block describes ran.
|
|
1486
|
+
*/
|
|
1487
|
+
checked_at: string | null;
|
|
1488
|
+
listed_count: number | null;
|
|
1489
|
+
checked_count: number | null;
|
|
1490
|
+
clean_count: number | null;
|
|
1491
|
+
timeout_count: number | null;
|
|
1492
|
+
/** @description Blocklists the target is listed on; null when the check stored no per-list detail. */
|
|
1493
|
+
listed_on: string[] | null;
|
|
1494
|
+
};
|
|
1495
|
+
/** @description breach monitors — the latest lookup. Counts are null when the lookup itself failed. */
|
|
1496
|
+
MonitorLatestBreach: {
|
|
1497
|
+
/**
|
|
1498
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1499
|
+
* @enum {string}
|
|
1500
|
+
*/
|
|
1501
|
+
kind: "breach";
|
|
1502
|
+
/**
|
|
1503
|
+
* Format: date-time
|
|
1504
|
+
* @description When the check this block describes ran.
|
|
1505
|
+
*/
|
|
1506
|
+
checked_at: string | null;
|
|
1507
|
+
/** @description Known breaches of the domain, any age. */
|
|
1508
|
+
breach_count: number | null;
|
|
1509
|
+
/** @description Of those, within the last 2 years. */
|
|
1510
|
+
recent_count: number | null;
|
|
1511
|
+
};
|
|
1512
|
+
/** @description email_policy monitors — SPF / DMARC / DKIM as of the latest check (MTA-STS is not checked). */
|
|
1513
|
+
MonitorLatestEmailPolicy: {
|
|
1514
|
+
/**
|
|
1515
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1516
|
+
* @enum {string}
|
|
1517
|
+
*/
|
|
1518
|
+
kind: "email_policy";
|
|
1519
|
+
/**
|
|
1520
|
+
* Format: date-time
|
|
1521
|
+
* @description When the check this block describes ran.
|
|
1522
|
+
*/
|
|
1523
|
+
checked_at: string | null;
|
|
1524
|
+
spf_present: boolean | null;
|
|
1525
|
+
spf_valid: boolean | null;
|
|
1526
|
+
dmarc_present: boolean | null;
|
|
1527
|
+
dmarc_valid: boolean | null;
|
|
1528
|
+
/**
|
|
1529
|
+
* @description null without a DMARC record.
|
|
1530
|
+
* @enum {string|null}
|
|
1531
|
+
*/
|
|
1532
|
+
dmarc_policy: "none" | "quarantine" | "reject" | null;
|
|
1533
|
+
dkim_present: boolean | null;
|
|
1534
|
+
dkim_valid: boolean | null;
|
|
1535
|
+
};
|
|
1536
|
+
/** @description cdn monitors — the latest check. */
|
|
1537
|
+
MonitorLatestCdn: {
|
|
1538
|
+
/**
|
|
1539
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1540
|
+
* @enum {string}
|
|
1541
|
+
*/
|
|
1542
|
+
kind: "cdn";
|
|
1543
|
+
/**
|
|
1544
|
+
* Format: date-time
|
|
1545
|
+
* @description When the check this block describes ran.
|
|
1546
|
+
*/
|
|
1547
|
+
checked_at: string | null;
|
|
1548
|
+
detected: boolean | null;
|
|
1549
|
+
/** @description e.g. "cloudflare". */
|
|
1550
|
+
provider: string | null;
|
|
1551
|
+
/** @description The edge's own cache verdict, e.g. HIT. */
|
|
1552
|
+
cache_status: string | null;
|
|
1553
|
+
/** @description 0–1; null when no request had a verdict. */
|
|
1554
|
+
cache_hit_ratio: number | null;
|
|
1555
|
+
ttfb_ms: number | null;
|
|
1556
|
+
};
|
|
1557
|
+
/** @description cms monitors — the latest detection (no version is stored). */
|
|
1558
|
+
MonitorLatestCms: {
|
|
1559
|
+
/**
|
|
1560
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1561
|
+
* @enum {string}
|
|
1562
|
+
*/
|
|
1563
|
+
kind: "cms";
|
|
1564
|
+
/**
|
|
1565
|
+
* Format: date-time
|
|
1566
|
+
* @description When the check this block describes ran.
|
|
1567
|
+
*/
|
|
1568
|
+
checked_at: string | null;
|
|
1569
|
+
detected: boolean | null;
|
|
1570
|
+
/** @description e.g. "WordPress". */
|
|
1571
|
+
name: string | null;
|
|
1572
|
+
/** @description Which fingerprint matched. */
|
|
1573
|
+
source: string | null;
|
|
1574
|
+
};
|
|
1575
|
+
/** @description brotli monitors — the latest check. */
|
|
1576
|
+
MonitorLatestBrotli: {
|
|
1577
|
+
/**
|
|
1578
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1579
|
+
* @enum {string}
|
|
1580
|
+
*/
|
|
1581
|
+
kind: "brotli";
|
|
1582
|
+
/**
|
|
1583
|
+
* Format: date-time
|
|
1584
|
+
* @description When the check this block describes ran.
|
|
1585
|
+
*/
|
|
1586
|
+
checked_at: string | null;
|
|
1587
|
+
supported: boolean | null;
|
|
1588
|
+
};
|
|
1589
|
+
/** @description favicon monitors — the latest check. */
|
|
1590
|
+
MonitorLatestFavicon: {
|
|
1591
|
+
/**
|
|
1592
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1593
|
+
* @enum {string}
|
|
1594
|
+
*/
|
|
1595
|
+
kind: "favicon";
|
|
1596
|
+
/**
|
|
1597
|
+
* Format: date-time
|
|
1598
|
+
* @description When the check this block describes ran.
|
|
1599
|
+
*/
|
|
1600
|
+
checked_at: string | null;
|
|
1601
|
+
found: boolean | null;
|
|
1602
|
+
bytes: number | null;
|
|
1603
|
+
content_type_ok: boolean | null;
|
|
1604
|
+
};
|
|
1605
|
+
/** @description mcp monitors — the latest check. Counts are null when the handshake failed. */
|
|
1606
|
+
MonitorLatestMcp: {
|
|
1607
|
+
/**
|
|
1608
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1609
|
+
* @enum {string}
|
|
1610
|
+
*/
|
|
1611
|
+
kind: "mcp";
|
|
1612
|
+
/**
|
|
1613
|
+
* Format: date-time
|
|
1614
|
+
* @description When the check this block describes ran.
|
|
1615
|
+
*/
|
|
1616
|
+
checked_at: string | null;
|
|
1617
|
+
handshake_ok: boolean | null;
|
|
1618
|
+
server_name: string | null;
|
|
1619
|
+
server_version: string | null;
|
|
1620
|
+
protocol_version: string | null;
|
|
1621
|
+
tools_count: number | null;
|
|
1622
|
+
resources_count: number | null;
|
|
1623
|
+
prompts_count: number | null;
|
|
1624
|
+
/** @description Days until the certificate the latest check saw expires; null when it saw none (plain text, or failed before TLS). */
|
|
1625
|
+
cert_days_left: number | null;
|
|
1626
|
+
};
|
|
1627
|
+
/** @description browser (Core Web Vitals) monitors — the latest successful audit. Scores are 0–1, like the alert metrics; INP is null when the audit did not measure it. */
|
|
1628
|
+
MonitorLatestBrowser: {
|
|
1629
|
+
/**
|
|
1630
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1631
|
+
* @enum {string}
|
|
1632
|
+
*/
|
|
1633
|
+
kind: "browser";
|
|
1634
|
+
/**
|
|
1635
|
+
* Format: date-time
|
|
1636
|
+
* @description When the check this block describes ran.
|
|
1637
|
+
*/
|
|
1638
|
+
checked_at: string | null;
|
|
1639
|
+
performance_score: number | null;
|
|
1640
|
+
accessibility_score: number | null;
|
|
1641
|
+
seo_score: number | null;
|
|
1642
|
+
best_practices_score: number | null;
|
|
1643
|
+
lcp_ms: number | null;
|
|
1644
|
+
cls: number | null;
|
|
1645
|
+
inp_ms: number | null;
|
|
1646
|
+
fcp_ms: number | null;
|
|
1647
|
+
tbt_ms: number | null;
|
|
1648
|
+
/** @description "mobile" or "desktop". */
|
|
1649
|
+
preset: string | null;
|
|
1650
|
+
};
|
|
1651
|
+
/** @description playwright (browser check) monitors — the latest run that reached the site (infrastructure errors skipped). */
|
|
1652
|
+
MonitorLatestPlaywright: {
|
|
1653
|
+
/**
|
|
1654
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1655
|
+
* @enum {string}
|
|
1656
|
+
*/
|
|
1657
|
+
kind: "playwright";
|
|
1658
|
+
/**
|
|
1659
|
+
* Format: date-time
|
|
1660
|
+
* @description When the check this block describes ran.
|
|
1661
|
+
*/
|
|
1662
|
+
checked_at: string | null;
|
|
1663
|
+
/** @description passed | flaky | failed | timed_out | script_error (see the runs endpoint). */
|
|
1664
|
+
status: string | null;
|
|
1665
|
+
tests_total: number | null;
|
|
1666
|
+
tests_passed: number | null;
|
|
1667
|
+
tests_failed: number | null;
|
|
1668
|
+
steps_total: number | null;
|
|
1669
|
+
/** @description Title of the step the run failed at. */
|
|
1670
|
+
failed_step: string | null;
|
|
1671
|
+
console_errors: number | null;
|
|
1672
|
+
failed_requests: number | null;
|
|
1673
|
+
attempts: number | null;
|
|
1674
|
+
};
|
|
1675
|
+
/** @description integrity (page integrity) monitors — the latest check. */
|
|
1676
|
+
MonitorLatestIntegrity: {
|
|
1677
|
+
/**
|
|
1678
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1679
|
+
* @enum {string}
|
|
1680
|
+
*/
|
|
1681
|
+
kind: "integrity";
|
|
1682
|
+
/**
|
|
1683
|
+
* Format: date-time
|
|
1684
|
+
* @description When the check this block describes ran.
|
|
1685
|
+
*/
|
|
1686
|
+
checked_at: string | null;
|
|
1687
|
+
pages_checked: number | null;
|
|
1688
|
+
pages_changed: number | null;
|
|
1689
|
+
text_change_pct_max: number | null;
|
|
1690
|
+
/** @description New script/iframe/form/link origins, keyword hits, redirect, header and script changes — summed. */
|
|
1691
|
+
security_findings: number | null;
|
|
1692
|
+
/** @description Security headers removed or weakened. */
|
|
1693
|
+
headers_weakened: number | null;
|
|
1694
|
+
};
|
|
1695
|
+
/** @description imap monitors — the latest check. */
|
|
1696
|
+
MonitorLatestImap: {
|
|
1697
|
+
/**
|
|
1698
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1699
|
+
* @enum {string}
|
|
1700
|
+
*/
|
|
1701
|
+
kind: "imap";
|
|
1702
|
+
/**
|
|
1703
|
+
* Format: date-time
|
|
1704
|
+
* @description When the check this block describes ran.
|
|
1705
|
+
*/
|
|
1706
|
+
checked_at: string | null;
|
|
1707
|
+
/** @description null = connection-only check (no username configured). */
|
|
1708
|
+
login_ok: boolean | null;
|
|
1709
|
+
/** @description e.g. "TLS 1.3"; null without TLS. */
|
|
1710
|
+
tls_version: string | null;
|
|
1711
|
+
/** @description Days until the certificate the latest check saw expires; null when it saw none (plain text, or failed before TLS). */
|
|
1712
|
+
cert_days_left: number | null;
|
|
1713
|
+
cert_valid: boolean | null;
|
|
1714
|
+
plaintext_login_allowed: boolean | null;
|
|
1715
|
+
/** @description Mailbox message count; null when not measured. */
|
|
1716
|
+
messages: number | null;
|
|
1717
|
+
};
|
|
1718
|
+
/** @description pop3 monitors — the latest check. */
|
|
1719
|
+
MonitorLatestPop3: {
|
|
1720
|
+
/**
|
|
1721
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1722
|
+
* @enum {string}
|
|
1723
|
+
*/
|
|
1724
|
+
kind: "pop3";
|
|
1725
|
+
/**
|
|
1726
|
+
* Format: date-time
|
|
1727
|
+
* @description When the check this block describes ran.
|
|
1728
|
+
*/
|
|
1729
|
+
checked_at: string | null;
|
|
1730
|
+
/** @description null = connection-only check (no username configured). */
|
|
1731
|
+
login_ok: boolean | null;
|
|
1732
|
+
/** @description e.g. "TLS 1.3"; null without TLS. */
|
|
1733
|
+
tls_version: string | null;
|
|
1734
|
+
/** @description Days until the certificate the latest check saw expires; null when it saw none (plain text, or failed before TLS). */
|
|
1735
|
+
cert_days_left: number | null;
|
|
1736
|
+
cert_valid: boolean | null;
|
|
1737
|
+
plaintext_login_allowed: boolean | null;
|
|
1738
|
+
/** @description Mailbox message count; null when not measured. */
|
|
1739
|
+
messages: number | null;
|
|
1740
|
+
};
|
|
1741
|
+
/** @description ftp monitors — the latest check. */
|
|
1742
|
+
MonitorLatestFtp: {
|
|
1743
|
+
/**
|
|
1744
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1745
|
+
* @enum {string}
|
|
1746
|
+
*/
|
|
1747
|
+
kind: "ftp";
|
|
1748
|
+
/**
|
|
1749
|
+
* Format: date-time
|
|
1750
|
+
* @description When the check this block describes ran.
|
|
1751
|
+
*/
|
|
1752
|
+
checked_at: string | null;
|
|
1753
|
+
connected: boolean | null;
|
|
1754
|
+
login_ok: boolean | null;
|
|
1755
|
+
/** @description FTPS (explicit or implicit TLS). */
|
|
1756
|
+
secure: boolean | null;
|
|
1757
|
+
};
|
|
1758
|
+
/** @description sftp monitors — the latest check. */
|
|
1759
|
+
MonitorLatestSftp: {
|
|
1760
|
+
/**
|
|
1761
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1762
|
+
* @enum {string}
|
|
1763
|
+
*/
|
|
1764
|
+
kind: "sftp";
|
|
1765
|
+
/**
|
|
1766
|
+
* Format: date-time
|
|
1767
|
+
* @description When the check this block describes ran.
|
|
1768
|
+
*/
|
|
1769
|
+
checked_at: string | null;
|
|
1770
|
+
connected: boolean | null;
|
|
1771
|
+
login_ok: boolean | null;
|
|
1772
|
+
};
|
|
1773
|
+
/** @description email_roundtrip monitors — the latest run. Everything read off the received message is null when it was not delivered. */
|
|
1774
|
+
MonitorLatestEmailRoundtrip: {
|
|
1775
|
+
/**
|
|
1776
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1777
|
+
* @enum {string}
|
|
1778
|
+
*/
|
|
1779
|
+
kind: "email_roundtrip";
|
|
1780
|
+
/**
|
|
1781
|
+
* Format: date-time
|
|
1782
|
+
* @description When the check this block describes ran.
|
|
1783
|
+
*/
|
|
1784
|
+
checked_at: string | null;
|
|
1785
|
+
delivered: boolean | null;
|
|
1786
|
+
delivery_ms: number | null;
|
|
1787
|
+
in_spam: boolean | null;
|
|
1788
|
+
spf_pass: boolean | null;
|
|
1789
|
+
dkim_pass: boolean | null;
|
|
1790
|
+
dmarc_pass: boolean | null;
|
|
1791
|
+
spam_score: number | null;
|
|
1792
|
+
};
|
|
1793
|
+
/** @description Type-aware summary of the monitor page's top cards. `kind` is always the monitor's type; every field is present, null when unknown. */
|
|
1794
|
+
MonitorLatest:
|
|
1795
|
+
| components["schemas"]["MonitorLatestSsl"]
|
|
1796
|
+
| components["schemas"]["MonitorLatestRdap"]
|
|
1797
|
+
| components["schemas"]["MonitorLatestHeartbeat"]
|
|
1798
|
+
| components["schemas"]["MonitorLatestHttp"]
|
|
1799
|
+
| components["schemas"]["MonitorLatestApi"]
|
|
1800
|
+
| components["schemas"]["MonitorLatestTcp"]
|
|
1801
|
+
| components["schemas"]["MonitorLatestUdp"]
|
|
1802
|
+
| components["schemas"]["MonitorLatestIcmp"]
|
|
1803
|
+
| components["schemas"]["MonitorLatestDns"]
|
|
1804
|
+
| components["schemas"]["MonitorLatestSmtp"]
|
|
1805
|
+
| components["schemas"]["MonitorLatestSitemap"]
|
|
1806
|
+
| components["schemas"]["MonitorLatestMtr"]
|
|
1807
|
+
| components["schemas"]["MonitorLatestNtp"]
|
|
1808
|
+
| components["schemas"]["MonitorLatestWebsocket"]
|
|
1809
|
+
| components["schemas"]["MonitorLatestBlacklist"]
|
|
1810
|
+
| components["schemas"]["MonitorLatestBreach"]
|
|
1811
|
+
| components["schemas"]["MonitorLatestEmailPolicy"]
|
|
1812
|
+
| components["schemas"]["MonitorLatestCdn"]
|
|
1813
|
+
| components["schemas"]["MonitorLatestCms"]
|
|
1814
|
+
| components["schemas"]["MonitorLatestBrotli"]
|
|
1815
|
+
| components["schemas"]["MonitorLatestFavicon"]
|
|
1816
|
+
| components["schemas"]["MonitorLatestMcp"]
|
|
1817
|
+
| components["schemas"]["MonitorLatestBrowser"]
|
|
1818
|
+
| components["schemas"]["MonitorLatestPlaywright"]
|
|
1819
|
+
| components["schemas"]["MonitorLatestIntegrity"]
|
|
1820
|
+
| components["schemas"]["MonitorLatestImap"]
|
|
1821
|
+
| components["schemas"]["MonitorLatestPop3"]
|
|
1822
|
+
| components["schemas"]["MonitorLatestFtp"]
|
|
1823
|
+
| components["schemas"]["MonitorLatestSftp"]
|
|
1824
|
+
| components["schemas"]["MonitorLatestEmailRoundtrip"];
|
|
1168
1825
|
PlaywrightTestRunRequest: {
|
|
1169
1826
|
/** @description A Playwright Test file (TypeScript or JavaScript). Imports: @playwright/test, otpauth, @faker-js/faker, Node built-ins. Read org variables as process.env.NAME; TARGET_URL is `target`. */
|
|
1170
1827
|
script: string;
|
|
@@ -1208,6 +1865,10 @@ export interface components {
|
|
|
1208
1865
|
object: "playwright_run";
|
|
1209
1866
|
/** Format: uuid */
|
|
1210
1867
|
run_id: string;
|
|
1868
|
+
/**
|
|
1869
|
+
* Format: date-time
|
|
1870
|
+
* @description When the run happened — RFC 3339 / ISO 8601 UTC, e.g. 2026-10-17T14:31:29.000Z
|
|
1871
|
+
*/
|
|
1211
1872
|
timestamp?: string;
|
|
1212
1873
|
location?: string;
|
|
1213
1874
|
/** @enum {string} */
|
|
@@ -1237,6 +1898,10 @@ export interface components {
|
|
|
1237
1898
|
object: "playwright_run";
|
|
1238
1899
|
/** Format: uuid */
|
|
1239
1900
|
run_id: string;
|
|
1901
|
+
/**
|
|
1902
|
+
* Format: date-time
|
|
1903
|
+
* @description When the run happened — RFC 3339 / ISO 8601 UTC, e.g. 2026-10-17T14:31:29.000Z
|
|
1904
|
+
*/
|
|
1240
1905
|
timestamp: string;
|
|
1241
1906
|
status: string;
|
|
1242
1907
|
duration_ms?: number;
|
|
@@ -1517,8 +2182,9 @@ export interface components {
|
|
|
1517
2182
|
| "ntp-test"
|
|
1518
2183
|
| "email-health";
|
|
1519
2184
|
target: string;
|
|
1520
|
-
/** @description Whether the check itself succeeded. false is a normal, billable answer
|
|
2185
|
+
/** @description Whether the check itself succeeded — the finding, not the transport. false is a normal, billable answer: a closed port, an NXDOMAIN, an expired or untrusted certificate, a host that doesn't resolve, a failed handshake, or a target the prober refuses (an internal address). Read `error` for what happened; `result` keeps the probe's raw answer. */
|
|
1521
2186
|
success: boolean;
|
|
2187
|
+
/** @description Readable reason when `success` is false (e.g. "No records found (NXDOMAIN)", "The certificate … has expired"); null when the check succeeded. */
|
|
1522
2188
|
error: string | null;
|
|
1523
2189
|
location: components["schemas"]["DiagnosticLocation"];
|
|
1524
2190
|
duration_ms: number;
|
|
@@ -1565,7 +2231,10 @@ export interface components {
|
|
|
1565
2231
|
| "ntp-test"
|
|
1566
2232
|
| "email-health";
|
|
1567
2233
|
label: string;
|
|
1568
|
-
/**
|
|
2234
|
+
/**
|
|
2235
|
+
* @description ok = the check ran and answered (read `success` for what it found); failed = it could not run or the probe did not answer; skipped = see `reason`.
|
|
2236
|
+
* @enum {string}
|
|
2237
|
+
*/
|
|
1569
2238
|
status: "ok" | "failed" | "skipped";
|
|
1570
2239
|
/**
|
|
1571
2240
|
* @description Why the check was skipped, when it was.
|
|
@@ -1575,6 +2244,7 @@ export interface components {
|
|
|
1575
2244
|
detail?: string;
|
|
1576
2245
|
location?: components["schemas"]["DiagnosticLocation"];
|
|
1577
2246
|
duration_ms?: number | null;
|
|
2247
|
+
/** @description Whether the check succeeded (same meaning as DiagnosticRun.success); null when skipped. */
|
|
1578
2248
|
success?: boolean | null;
|
|
1579
2249
|
error?: string | null;
|
|
1580
2250
|
result?: unknown;
|
|
@@ -1744,6 +2414,8 @@ export interface components {
|
|
|
1744
2414
|
} | null;
|
|
1745
2415
|
/** @description PATCH /monitors/{id} responses only: true when the update changed how the check connects (target, port, credentials, TLS, request, record type, script…) and one immediate check was dispatched, so the result reflects the new settings within seconds instead of after a full interval. It does not use the plan's Run-now budget; saves are capped at 10 such checks per monitor per hour. false for alert-rule-only or cosmetic changes and for paused, heartbeat and host monitors. */
|
|
1746
2416
|
check_queued?: boolean;
|
|
2417
|
+
/** @description POST /monitors and PATCH /monitors/{id} responses only: the `config` keys you sent that this monitor type doesn't use — dropped, not stored ([] when everything was kept). Check it after every write: a misspelt key otherwise leaves the setting unset. Obvious aliases are renamed instead of dropped: `login` / `user` → `username` and `pass` → `password` on imap, pop3, smtp, ftp and sftp; `username` / `login` / `user` → `authUsername` and `password` / `pass` → `authPassword` on http and api; a snake_case spelling of a camelCase key (`timeout_seconds` → `timeoutSeconds`) on every type. Config keys per type: GET /meta/monitor-types. */
|
|
2418
|
+
ignored_config_keys?: string[];
|
|
1747
2419
|
/** @description The open (firing or acknowledged) incident, or null. When several are open: the critical one, then the earliest started. */
|
|
1748
2420
|
current_incident?: components["schemas"]["MonitorCurrentIncident"] | null;
|
|
1749
2421
|
/** @description A silence (dashboard Mute) suppresses notifications; incidents still open and close and checks continue. */
|
|
@@ -1814,37 +2486,11 @@ export interface components {
|
|
|
1814
2486
|
region: string;
|
|
1815
2487
|
country_code: string;
|
|
1816
2488
|
}[];
|
|
1817
|
-
/** @description Type-aware summary of the monitor page's top
|
|
1818
|
-
latest?:
|
|
1819
|
-
| {
|
|
1820
|
-
days_until_expiry?: number | null;
|
|
1821
|
-
/** Format: date-time */
|
|
1822
|
-
not_after?: string | null;
|
|
1823
|
-
issuer?: string | null;
|
|
1824
|
-
protocol?: string | null;
|
|
1825
|
-
valid?: boolean | null;
|
|
1826
|
-
}
|
|
1827
|
-
| {
|
|
1828
|
-
/** Format: date-time */
|
|
1829
|
-
expires_at?: string | null;
|
|
1830
|
-
days_until_expiry?: number | null;
|
|
1831
|
-
registrar?: string | null;
|
|
1832
|
-
nameservers?: string[];
|
|
1833
|
-
}
|
|
1834
|
-
| {
|
|
1835
|
-
/** Format: date-time */
|
|
1836
|
-
last_ping_at?: string | null;
|
|
1837
|
-
/**
|
|
1838
|
-
* Format: date-time
|
|
1839
|
-
* @description Period schedules only; null for cron.
|
|
1840
|
-
*/
|
|
1841
|
-
next_expected_at?: string | null;
|
|
1842
|
-
missed?: boolean;
|
|
1843
|
-
last_exit_code?: number | null;
|
|
1844
|
-
}
|
|
1845
|
-
| null;
|
|
2489
|
+
/** @description Type-aware summary of the monitor page's top cards — `kind` is the monitor's type (discriminator). null when the monitor has no check yet, or the analytics store could not be reached (best effort). */
|
|
2490
|
+
latest?: components["schemas"]["MonitorLatest"] | null;
|
|
1846
2491
|
available_metrics: components["schemas"]["CatalogAlertMetric"][];
|
|
1847
2492
|
};
|
|
2493
|
+
/** @description Unknown top-level fields are rejected with 400 naming the accepted ones (like PATCH) — type-specific settings go in `config`. */
|
|
1848
2494
|
MonitorCreate: {
|
|
1849
2495
|
name: string;
|
|
1850
2496
|
/**
|
|
@@ -1882,7 +2528,7 @@ export interface components {
|
|
|
1882
2528
|
| "imap"
|
|
1883
2529
|
| "pop3"
|
|
1884
2530
|
| "email_roundtrip";
|
|
1885
|
-
/** @description Format per type (see GET /meta/monitor-types). Targets in private, loopback, link-local or cloud-metadata address space (and internal hostnames such as localhost, *.internal) are rejected with 400. */
|
|
2531
|
+
/** @description Format per type (see GET /meta/monitor-types). Targets in private, loopback, link-local or cloud-metadata address space (and internal hostnames such as localhost, *.internal) are rejected with 400. heartbeat: the server assigns the ping path — send any placeholder (or omit target); read ping_url from the response. smtp: hostname only, the port goes in config.port. */
|
|
1886
2532
|
target: string;
|
|
1887
2533
|
/** @description Seconds; validated against the plan's per-type minimum */
|
|
1888
2534
|
interval: number;
|
|
@@ -1897,7 +2543,7 @@ export interface components {
|
|
|
1897
2543
|
/** @description Lowercase alphanumeric with hyphens or colons, e.g. prod, team:web */
|
|
1898
2544
|
tags?: string[];
|
|
1899
2545
|
description?: string | null;
|
|
1900
|
-
/** @description Type-specific settings — the keys and types are listed per type under config_fields in GET /meta/monitor-types. Validated against the monitor type: a wrong value returns 400 naming the field (e.g. `config.timeoutSeconds`); keys the type does not use are dropped. Config that drives an alert preset (dns expectedValues, cdn expectedProvider, cms expectedCms, tcp/udp expectMatchRegexp, websocket expectPattern, mcp expectedProtocolVersion, http failIfBody*Regexp) also creates that preset's alert rule. Credential keys (marked secret in the catalog: password, smtpPassword, receivePassword, privateKey, …) are write-only and stored encrypted; responses return them as "[redacted]". */
|
|
2546
|
+
/** @description Type-specific settings — the keys and types are listed per type under config_fields in GET /meta/monitor-types. Validated against the monitor type: a wrong value returns 400 naming the field (e.g. `config.timeoutSeconds`); keys the type does not use are dropped and listed in the response's `ignored_config_keys` (obvious aliases such as `login` → `username` are renamed instead). Config that drives an alert preset (dns expectedValues, cdn expectedProvider, cms expectedCms, tcp/udp expectMatchRegexp, websocket expectPattern, mcp expectedProtocolVersion, http failIfBody*Regexp) also creates that preset's alert rule. Credential keys (marked secret in the catalog: password, smtpPassword, receivePassword, privateKey, …) are write-only and stored encrypted; responses return them as "[redacted]". */
|
|
1901
2547
|
config?: {
|
|
1902
2548
|
[key: string]: unknown;
|
|
1903
2549
|
};
|
|
@@ -1959,6 +2605,10 @@ export interface components {
|
|
|
1959
2605
|
min_response_time_ms?: number | null;
|
|
1960
2606
|
/** @description Latency over successful checks only (a failed check has no response time); null when no check succeeded */
|
|
1961
2607
|
max_response_time_ms?: number | null;
|
|
2608
|
+
/**
|
|
2609
|
+
* Format: date-time
|
|
2610
|
+
* @description The newest failed check in the window (RFC 3339 / ISO 8601 UTC); null when none failed
|
|
2611
|
+
*/
|
|
1962
2612
|
last_failure_at?: string | null;
|
|
1963
2613
|
/** @description Incident-based headline uptime for the last 24 hours */
|
|
1964
2614
|
uptime_24h?: number | null;
|
|
@@ -1995,6 +2645,10 @@ export interface components {
|
|
|
1995
2645
|
object?: "check";
|
|
1996
2646
|
/** @description Addresses this exact probe run */
|
|
1997
2647
|
run_id?: string;
|
|
2648
|
+
/**
|
|
2649
|
+
* Format: date-time
|
|
2650
|
+
* @description When the check ran — RFC 3339 / ISO 8601 UTC, e.g. 2026-10-17T14:31:29.000Z
|
|
2651
|
+
*/
|
|
1998
2652
|
timestamp?: string;
|
|
1999
2653
|
success?: boolean;
|
|
2000
2654
|
duration_ms?: number;
|
|
@@ -2033,6 +2687,10 @@ export interface components {
|
|
|
2033
2687
|
run_id?: string;
|
|
2034
2688
|
/** Format: uuid */
|
|
2035
2689
|
monitor_id?: string;
|
|
2690
|
+
/**
|
|
2691
|
+
* Format: date-time
|
|
2692
|
+
* @description When the check ran — RFC 3339 / ISO 8601 UTC, e.g. 2026-10-17T14:31:29.000Z
|
|
2693
|
+
*/
|
|
2036
2694
|
timestamp?: string;
|
|
2037
2695
|
location?: string;
|
|
2038
2696
|
target?: string;
|
|
@@ -2920,7 +3578,14 @@ export interface components {
|
|
|
2920
3578
|
name?: string;
|
|
2921
3579
|
/** @description -1 = unlimited, 0 = feature disabled */
|
|
2922
3580
|
limits?: Record<string, never> | null;
|
|
2923
|
-
usage
|
|
3581
|
+
/** @description Live usage. `monitors_by_type` counts monitors per type and matches `limits.max_monitors_by_type` (`browser` = page-speed / Core Web Vitals monitors, `playwright` = scripted browser checks). `browser_checks` is kept for compatibility and equals the playwright count. */
|
|
3582
|
+
usage?: {
|
|
3583
|
+
monitors_by_type?: {
|
|
3584
|
+
[key: string]: number;
|
|
3585
|
+
};
|
|
3586
|
+
/** @description Playwright (scripted browser check) monitors */
|
|
3587
|
+
browser_checks?: number;
|
|
3588
|
+
};
|
|
2924
3589
|
};
|
|
2925
3590
|
Notification: {
|
|
2926
3591
|
id?: number;
|
|
@@ -2962,7 +3627,8 @@ export interface components {
|
|
|
2962
3627
|
/** @description Current display name of the entity (from the create/delete snapshot when it no longer exists) */
|
|
2963
3628
|
entity_name?: string | null;
|
|
2964
3629
|
action?: string;
|
|
2965
|
-
|
|
3630
|
+
/** @description What changed, as recorded with the event (e.g. {field: {from, to}} for updates, a snapshot for creates/deletes); null for events that record no details (post-mortem created/deleted/completed, incident acknowledged…) */
|
|
3631
|
+
changes?: Record<string, never> | null;
|
|
2966
3632
|
actor?: {
|
|
2967
3633
|
name?: string | null;
|
|
2968
3634
|
email?: string | null;
|
|
@@ -3203,7 +3869,12 @@ export interface components {
|
|
|
3203
3869
|
toMs?: number;
|
|
3204
3870
|
label?: string;
|
|
3205
3871
|
};
|
|
3206
|
-
|
|
3872
|
+
/** @description The equal-length period before `period` that compared values are measured against */
|
|
3873
|
+
previousPeriod?: {
|
|
3874
|
+
fromMs?: number;
|
|
3875
|
+
toMs?: number;
|
|
3876
|
+
label?: string;
|
|
3877
|
+
};
|
|
3207
3878
|
/** @enum {string} */
|
|
3208
3879
|
depth?: "basic" | "advanced";
|
|
3209
3880
|
typesPresent?: string[];
|
|
@@ -3217,8 +3888,9 @@ export interface components {
|
|
|
3217
3888
|
monitorId?: string;
|
|
3218
3889
|
name?: string;
|
|
3219
3890
|
type?: string;
|
|
3891
|
+
target?: string;
|
|
3220
3892
|
/** @description Incident-based, same formula as the monitor's Uptime card */
|
|
3221
|
-
uptimePct?:
|
|
3893
|
+
uptimePct?: components["schemas"]["ReportCompared"];
|
|
3222
3894
|
downtimeMs?: number;
|
|
3223
3895
|
/** @description Reachability, not health: share of this monitor's checks that reached the target and got a response; null when the period has no checks */
|
|
3224
3896
|
checkSuccessPct?: number | null;
|
|
@@ -3250,6 +3922,14 @@ export interface components {
|
|
|
3250
3922
|
/** @description Insights withheld beyond the plan's cap (0 on advanced depth) */
|
|
3251
3923
|
gatedInsightCount?: number;
|
|
3252
3924
|
};
|
|
3925
|
+
/** @description A report value paired with its previous-period counterpart */
|
|
3926
|
+
ReportCompared: {
|
|
3927
|
+
current: number;
|
|
3928
|
+
/** @description null when the previous period has no data */
|
|
3929
|
+
previous: number | null;
|
|
3930
|
+
/** @description current - previous; null when no baseline */
|
|
3931
|
+
delta: number | null;
|
|
3932
|
+
};
|
|
3253
3933
|
/** @description name/email are null for a member who has since left the organization */
|
|
3254
3934
|
OncallPerson: {
|
|
3255
3935
|
id?: string;
|
|
@@ -3612,7 +4292,7 @@ export interface components {
|
|
|
3612
4292
|
DiagnosticOptionsCdnCheck: Record<string, never>;
|
|
3613
4293
|
/** @description Options for the `sitemap-check` diagnostic. Does this domain publish a valid sitemap, is it reachable from robots.txt, and do its URLs resolve? */
|
|
3614
4294
|
DiagnosticOptionsSitemapCheck: Record<string, never>;
|
|
3615
|
-
/** @description Options for the `brotli-check` diagnostic. Does this domain serve Brotli
|
|
4295
|
+
/** @description Options for the `brotli-check` diagnostic. Does this domain serve Brotli and gzip compression — which Content-Encoding comes back when a client offers only br, and when it offers only gzip? */
|
|
3616
4296
|
DiagnosticOptionsBrotliCheck: Record<string, never>;
|
|
3617
4297
|
/** @description Options for the `redirect-chain` diagnostic. Where does this URL end up — every redirect hop with its status code and Location, the final URL, and whether the chain is longer, slower or less secure than it should be? */
|
|
3618
4298
|
DiagnosticOptionsRedirectChain: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "watchfor",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.2",
|
|
4
4
|
"description": "Official TypeScript SDK + CLI for WatchFor — uptime & infrastructure monitoring (monitors, alert rules, incidents, maintenance windows) over the REST API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"watchfor",
|