watchfor 0.8.0 → 0.10.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/README.md +5 -2
- package/dist/client.d.ts +35 -0
- package/dist/client.js +26 -0
- package/dist/index.d.ts +1 -1
- package/dist/schema.d.ts +730 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# watchfor
|
|
2
2
|
|
|
3
3
|
Official TypeScript SDK + CLI for [WatchFor](https://watchfor.io) —
|
|
4
|
-
uptime & infrastructure monitoring (
|
|
4
|
+
uptime & infrastructure monitoring (26 check types, confirmed alerting,
|
|
5
5
|
status pages, on-call).
|
|
6
6
|
|
|
7
7
|
```bash
|
|
@@ -39,6 +39,9 @@ await wf.incidents.exclude(19351, { reason: "Probe-side DNS hiccup" });
|
|
|
39
39
|
// Irreversible: wipe a monitor's checks and incidents; uptime restarts "since reset".
|
|
40
40
|
await wf.monitors.reset(monitor.id!);
|
|
41
41
|
|
|
42
|
+
// Page integrity: after a deploy, accept what the newest check saw as the new baseline.
|
|
43
|
+
await wf.monitors.acceptBaseline(integrityMonitorId);
|
|
44
|
+
|
|
42
45
|
// Older checks: pass next_cursor back as cursor (keep the same hours/success).
|
|
43
46
|
const page = await wf.monitors.checks(monitor.id!, { hours: 24, limit: 100 });
|
|
44
47
|
if (page.next_cursor) {
|
|
@@ -97,5 +100,5 @@ npx watchfor report --period 30d
|
|
|
97
100
|
## Links
|
|
98
101
|
|
|
99
102
|
- API docs: https://watchfor.io/docs/api
|
|
100
|
-
- MCP server for AI agents (
|
|
103
|
+
- MCP server for AI agents (56 tools): https://watchfor.io/docs/api/mcp
|
|
101
104
|
- Create an API key: dashboard → Settings → API keys (`read` or `read+write` scope)
|
package/dist/client.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ export type Monitor = components["schemas"]["Monitor"];
|
|
|
10
10
|
/** Monitor + `available_metrics` (GET /monitors/{id} only). */
|
|
11
11
|
export type MonitorDetail = components["schemas"]["MonitorDetail"];
|
|
12
12
|
export type MonitorReset = components["schemas"]["MonitorReset"];
|
|
13
|
+
export type IntegrityBaseline = components["schemas"]["IntegrityBaseline"];
|
|
14
|
+
export type IntegrityBaselineAccept = components["schemas"]["IntegrityBaselineAccept"];
|
|
13
15
|
export type Incident = components["schemas"]["Incident"];
|
|
14
16
|
export type AlertRule = components["schemas"]["AlertRule"];
|
|
15
17
|
export type Contact = components["schemas"]["Contact"];
|
|
@@ -124,6 +126,16 @@ export declare class WatchFor {
|
|
|
124
126
|
* the monitor and start uptime over ("since reset"). The monitor and
|
|
125
127
|
* its configuration, alert rules, tags and locations stay. */
|
|
126
128
|
reset: (id: string) => Promise<MonitorReset>;
|
|
129
|
+
/** Page integrity monitors: the accepted baseline of every watched
|
|
130
|
+
* page (whether it has one, when and how it was captured). */
|
|
131
|
+
getBaseline: (id: string) => Promise<IntegrityBaseline>;
|
|
132
|
+
/** Page integrity monitors: accept what the newest check saw as the
|
|
133
|
+
* new baseline — all pages, or only `pages`. Call it from a deploy
|
|
134
|
+
* pipeline a minute after the release; unfetched pages come back in
|
|
135
|
+
* `skipped`. */
|
|
136
|
+
acceptBaseline: (id: string, body?: {
|
|
137
|
+
pages?: string[];
|
|
138
|
+
}, idempotencyKey?: string) => Promise<IntegrityBaselineAccept>;
|
|
127
139
|
uptime: (id: string, period?: "1h" | "24h" | "7d" | "30d" | "90d") => Promise<Uptime>;
|
|
128
140
|
/** Recent probe results, newest first. Page with `next_cursor` →
|
|
129
141
|
* `cursor` (keep the same `hours`/`success`); `locations` is the
|
|
@@ -136,6 +148,8 @@ export declare class WatchFor {
|
|
|
136
148
|
}) => Promise<CheckList>;
|
|
137
149
|
};
|
|
138
150
|
readonly alertRules: {
|
|
151
|
+
/** One probe run in full, redacted server-side — run_id from checks(). */
|
|
152
|
+
checkDetail: (id: string, runId: string) => Promise<Record<string, unknown>>;
|
|
139
153
|
list: (monitorId: string) => Promise<List<AlertRule>>;
|
|
140
154
|
get: (monitorId: string, ruleId: string) => Promise<AlertRule>;
|
|
141
155
|
create: (monitorId: string, body: Record<string, unknown>, idempotencyKey?: string) => Promise<AlertRule>;
|
|
@@ -165,6 +179,27 @@ export declare class WatchFor {
|
|
|
165
179
|
/** Undo `exclude` — the incident counts as downtime again. */
|
|
166
180
|
include: (id: number) => Promise<Incident>;
|
|
167
181
|
};
|
|
182
|
+
readonly statusPages: {
|
|
183
|
+
list: (q?: {
|
|
184
|
+
limit?: number;
|
|
185
|
+
cursor?: string;
|
|
186
|
+
}) => Promise<List<StatusPage>>;
|
|
187
|
+
get: (id: string) => Promise<StatusPage>;
|
|
188
|
+
announcements: (id: string, q?: {
|
|
189
|
+
limit?: number;
|
|
190
|
+
cursor?: string;
|
|
191
|
+
}) => Promise<List<Record<string, unknown>>>;
|
|
192
|
+
};
|
|
193
|
+
readonly onCall: {
|
|
194
|
+
get: () => Promise<Record<string, unknown>>;
|
|
195
|
+
};
|
|
196
|
+
readonly notificationChannels: {
|
|
197
|
+
list: (q?: {
|
|
198
|
+
limit?: number;
|
|
199
|
+
cursor?: string;
|
|
200
|
+
}) => Promise<List<Record<string, unknown>>>;
|
|
201
|
+
get: (id: string) => Promise<Record<string, unknown>>;
|
|
202
|
+
};
|
|
168
203
|
readonly hosts: {
|
|
169
204
|
list: (q?: {
|
|
170
205
|
limit?: number;
|
package/dist/client.js
CHANGED
|
@@ -130,6 +130,17 @@ export class WatchFor {
|
|
|
130
130
|
* the monitor and start uptime over ("since reset"). The monitor and
|
|
131
131
|
* its configuration, alert rules, tags and locations stay. */
|
|
132
132
|
reset: (id) => this.request("POST", `/monitors/${id}/reset`),
|
|
133
|
+
/** Page integrity monitors: the accepted baseline of every watched
|
|
134
|
+
* page (whether it has one, when and how it was captured). */
|
|
135
|
+
getBaseline: (id) => this.request("GET", `/monitors/${id}/baseline`),
|
|
136
|
+
/** Page integrity monitors: accept what the newest check saw as the
|
|
137
|
+
* new baseline — all pages, or only `pages`. Call it from a deploy
|
|
138
|
+
* pipeline a minute after the release; unfetched pages come back in
|
|
139
|
+
* `skipped`. */
|
|
140
|
+
acceptBaseline: (id, body, idempotencyKey) => this.request("POST", `/monitors/${id}/baseline`, {
|
|
141
|
+
body: body ?? {},
|
|
142
|
+
idempotencyKey,
|
|
143
|
+
}),
|
|
133
144
|
uptime: (id, period) => this.request("GET", `/monitors/${id}/uptime`, { query: { period } }),
|
|
134
145
|
/** Recent probe results, newest first. Page with `next_cursor` →
|
|
135
146
|
* `cursor` (keep the same `hours`/`success`); `locations` is the
|
|
@@ -138,6 +149,8 @@ export class WatchFor {
|
|
|
138
149
|
};
|
|
139
150
|
// ── Alert rules ───────────────────────────────────────────────
|
|
140
151
|
alertRules = {
|
|
152
|
+
/** One probe run in full, redacted server-side — run_id from checks(). */
|
|
153
|
+
checkDetail: (id, runId) => this.request("GET", `/monitors/${id}/checks/${runId}`),
|
|
141
154
|
list: (monitorId) => this.request("GET", `/monitors/${monitorId}/alert-rules`),
|
|
142
155
|
get: (monitorId, ruleId) => this.request("GET", `/monitors/${monitorId}/alert-rules/${ruleId}`),
|
|
143
156
|
create: (monitorId, body, idempotencyKey) => this.request("POST", `/monitors/${monitorId}/alert-rules`, {
|
|
@@ -163,6 +176,19 @@ export class WatchFor {
|
|
|
163
176
|
/** Undo `exclude` — the incident counts as downtime again. */
|
|
164
177
|
include: (id) => this.request("POST", `/incidents/${id}/include`),
|
|
165
178
|
};
|
|
179
|
+
// ── Status pages, on-call, channels ──────────────────────────
|
|
180
|
+
statusPages = {
|
|
181
|
+
list: (q) => this.request("GET", "/status-pages", { query: q }),
|
|
182
|
+
get: (id) => this.request("GET", `/status-pages/${id}`),
|
|
183
|
+
announcements: (id, q) => this.request("GET", `/status-pages/${id}/announcements`, { query: q }),
|
|
184
|
+
};
|
|
185
|
+
onCall = {
|
|
186
|
+
get: () => this.request("GET", "/on-call"),
|
|
187
|
+
};
|
|
188
|
+
notificationChannels = {
|
|
189
|
+
list: (q) => this.request("GET", "/notification-channels", { query: q }),
|
|
190
|
+
get: (id) => this.request("GET", `/notification-channels/${id}`),
|
|
191
|
+
};
|
|
166
192
|
// ── Hosts (servers running watchfor-agent) ───────────────────
|
|
167
193
|
hosts = {
|
|
168
194
|
list: (q) => this.request("GET", "/hosts", { query: q }),
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { type ActivityEvent, type AlertRule, type ApiErrorBody, type Check, type CheckList, type CheckNowAck, type Contact, type ContactGroup, type Deleted, type DiagnosticCatalog, type DiagnosticCatalogEntry, type DiagnosticReport, type DiagnosticRun, type DiagnosticSlug, type Incident, type IncidentStats, type List, type MaintenanceWindow, type Monitor, type MonitorDetail, type MonitorReset, type Notification, type Plan, type StatusPage, type Summary, type Uptime, WatchFor, WatchForError, type WatchForOptions, } from "./client.js";
|
|
1
|
+
export { type ActivityEvent, type AlertRule, type ApiErrorBody, type Check, type CheckList, type CheckNowAck, type Contact, type ContactGroup, type Deleted, type DiagnosticCatalog, type DiagnosticCatalogEntry, type DiagnosticReport, type DiagnosticRun, type DiagnosticSlug, type Incident, type IncidentStats, type IntegrityBaseline, type IntegrityBaselineAccept, type List, type MaintenanceWindow, type Monitor, type MonitorDetail, type MonitorReset, type Notification, type Plan, type StatusPage, type Summary, type Uptime, WatchFor, WatchForError, type WatchForOptions, } from "./client.js";
|
package/dist/schema.d.ts
CHANGED
|
@@ -260,6 +260,30 @@ export interface paths {
|
|
|
260
260
|
patch?: never;
|
|
261
261
|
trace?: never;
|
|
262
262
|
};
|
|
263
|
+
"/monitors/{id}/baseline": {
|
|
264
|
+
parameters: {
|
|
265
|
+
query?: never;
|
|
266
|
+
header?: never;
|
|
267
|
+
path?: never;
|
|
268
|
+
cookie?: never;
|
|
269
|
+
};
|
|
270
|
+
/**
|
|
271
|
+
* Page integrity baseline — what each watched page is compared against
|
|
272
|
+
* @description Page integrity monitors only (404 for other types). One row per watched page: whether it has an accepted baseline, when it was captured, and how (auto = recorded from the first check, manual = accepted in the dashboard, api = this endpoint, timer = accepted automatically after the monitor's autoAcceptAfterHours).
|
|
273
|
+
*/
|
|
274
|
+
get: operations["getMonitorBaseline"];
|
|
275
|
+
put?: never;
|
|
276
|
+
/**
|
|
277
|
+
* Accept the latest state of the watched pages as the new baseline — call it after a deploy
|
|
278
|
+
* @description Page integrity monitors only. Takes the newest checked fingerprint (and text) of every watched page — or only `pages` — as the accepted baseline, so an intended change stops alerting and the next check compares against it. Pages no check has fetched yet are returned in `skipped`. Typical use: the last step of a deploy pipeline, a minute after the release (so a check has seen the new version).
|
|
279
|
+
*/
|
|
280
|
+
post: operations["acceptMonitorBaseline"];
|
|
281
|
+
delete?: never;
|
|
282
|
+
options?: never;
|
|
283
|
+
head?: never;
|
|
284
|
+
patch?: never;
|
|
285
|
+
trace?: never;
|
|
286
|
+
};
|
|
263
287
|
"/monitors/{id}/uptime": {
|
|
264
288
|
parameters: {
|
|
265
289
|
query?: never;
|
|
@@ -294,6 +318,23 @@ export interface paths {
|
|
|
294
318
|
patch?: never;
|
|
295
319
|
trace?: never;
|
|
296
320
|
};
|
|
321
|
+
"/monitors/{id}/checks/{run_id}": {
|
|
322
|
+
parameters: {
|
|
323
|
+
query?: never;
|
|
324
|
+
header?: never;
|
|
325
|
+
path?: never;
|
|
326
|
+
cookie?: never;
|
|
327
|
+
};
|
|
328
|
+
/** One check in detail — the list row plus the stored result, redacted server-side exactly as the dashboard shows it */
|
|
329
|
+
get: operations["getCheckDetail"];
|
|
330
|
+
put?: never;
|
|
331
|
+
post?: never;
|
|
332
|
+
delete?: never;
|
|
333
|
+
options?: never;
|
|
334
|
+
head?: never;
|
|
335
|
+
patch?: never;
|
|
336
|
+
trace?: never;
|
|
337
|
+
};
|
|
297
338
|
"/monitors/{id}/alert-rules": {
|
|
298
339
|
parameters: {
|
|
299
340
|
query?: never;
|
|
@@ -524,6 +565,40 @@ export interface paths {
|
|
|
524
565
|
patch?: never;
|
|
525
566
|
trace?: never;
|
|
526
567
|
};
|
|
568
|
+
"/notification-channels": {
|
|
569
|
+
parameters: {
|
|
570
|
+
query?: never;
|
|
571
|
+
header?: never;
|
|
572
|
+
path?: never;
|
|
573
|
+
cookie?: never;
|
|
574
|
+
};
|
|
575
|
+
/** List notification channels (created_at desc; secrets masked) */
|
|
576
|
+
get: operations["listNotificationChannels"];
|
|
577
|
+
put?: never;
|
|
578
|
+
post?: never;
|
|
579
|
+
delete?: never;
|
|
580
|
+
options?: never;
|
|
581
|
+
head?: never;
|
|
582
|
+
patch?: never;
|
|
583
|
+
trace?: never;
|
|
584
|
+
};
|
|
585
|
+
"/notification-channels/{id}": {
|
|
586
|
+
parameters: {
|
|
587
|
+
query?: never;
|
|
588
|
+
header?: never;
|
|
589
|
+
path?: never;
|
|
590
|
+
cookie?: never;
|
|
591
|
+
};
|
|
592
|
+
/** Get a notification channel (secrets masked) */
|
|
593
|
+
get: operations["getNotificationChannel"];
|
|
594
|
+
put?: never;
|
|
595
|
+
post?: never;
|
|
596
|
+
delete?: never;
|
|
597
|
+
options?: never;
|
|
598
|
+
head?: never;
|
|
599
|
+
patch?: never;
|
|
600
|
+
trace?: never;
|
|
601
|
+
};
|
|
527
602
|
"/maintenance-windows": {
|
|
528
603
|
parameters: {
|
|
529
604
|
query?: never;
|
|
@@ -1145,7 +1220,7 @@ export interface components {
|
|
|
1145
1220
|
CatalogConfigField: {
|
|
1146
1221
|
key: string;
|
|
1147
1222
|
/** @enum {string} */
|
|
1148
|
-
type: "string" | "number" | "boolean" | "enum" | "array";
|
|
1223
|
+
type: "string" | "number" | "boolean" | "enum" | "array" | "object";
|
|
1149
1224
|
enum?: string[];
|
|
1150
1225
|
default?: unknown;
|
|
1151
1226
|
/** @description Write-only credential; read back as [redacted] */
|
|
@@ -1184,7 +1259,8 @@ export interface components {
|
|
|
1184
1259
|
| "browser"
|
|
1185
1260
|
| "heartbeat"
|
|
1186
1261
|
| "mcp"
|
|
1187
|
-
| "api"
|
|
1262
|
+
| "api"
|
|
1263
|
+
| "integrity";
|
|
1188
1264
|
target?: string;
|
|
1189
1265
|
description?: string | null;
|
|
1190
1266
|
interval_seconds?: number;
|
|
@@ -1204,6 +1280,30 @@ export interface components {
|
|
|
1204
1280
|
/** @enum {string} */
|
|
1205
1281
|
scheduling_strategy?: "roundrobin" | "random" | "parallel";
|
|
1206
1282
|
locations?: string[];
|
|
1283
|
+
/**
|
|
1284
|
+
* @description Why `status` is what it is: critical_incident = a confirmed critical incident is open (the only way to be down); warning_incident = an open warning incident; failed_check = the latest check failed, not yet confirmed (degraded); paused; no_data = nothing reported yet (unknown); ok. Present on GET/POST/PATCH/pause/resume responses.
|
|
1285
|
+
* @enum {string}
|
|
1286
|
+
*/
|
|
1287
|
+
status_reason?:
|
|
1288
|
+
| "critical_incident"
|
|
1289
|
+
| "warning_incident"
|
|
1290
|
+
| "failed_check"
|
|
1291
|
+
| "paused"
|
|
1292
|
+
| "no_data"
|
|
1293
|
+
| "ok";
|
|
1294
|
+
/**
|
|
1295
|
+
* Format: date-time
|
|
1296
|
+
* @description When the open incident behind a critical_incident / warning_incident started; null otherwise.
|
|
1297
|
+
*/
|
|
1298
|
+
status_since?: string | null;
|
|
1299
|
+
/** @description The open (firing or acknowledged) incident, or null. When several are open: the critical one, then the earliest started. */
|
|
1300
|
+
current_incident?: components["schemas"]["MonitorCurrentIncident"] | null;
|
|
1301
|
+
/** @description A silence (dashboard Mute) suppresses notifications; incidents still open and close and checks continue. */
|
|
1302
|
+
alerts_muted?: boolean;
|
|
1303
|
+
/** Format: date-time */
|
|
1304
|
+
alerts_muted_until?: string | null;
|
|
1305
|
+
/** @description true when an alert rule is routed to a contact group or the monitor has its own notification groups; false = the dashboard's silent-monitor warning: an incident here would reach nobody. */
|
|
1306
|
+
has_notification_route?: boolean;
|
|
1207
1307
|
tags?: string[];
|
|
1208
1308
|
/** @description Type-specific config; secret values are [redacted] */
|
|
1209
1309
|
config?: Record<string, never>;
|
|
@@ -1217,8 +1317,82 @@ export interface components {
|
|
|
1217
1317
|
/** Format: date-time */
|
|
1218
1318
|
updated_at?: string;
|
|
1219
1319
|
};
|
|
1320
|
+
MonitorCurrentIncident: {
|
|
1321
|
+
id: number;
|
|
1322
|
+
/** @enum {string} */
|
|
1323
|
+
severity: "critical" | "warning";
|
|
1324
|
+
/** @enum {string} */
|
|
1325
|
+
status: "firing" | "acknowledged";
|
|
1326
|
+
/** Format: date-time */
|
|
1327
|
+
started_at: string;
|
|
1328
|
+
/** @description Humanised like GET /incidents. */
|
|
1329
|
+
message: string | null;
|
|
1330
|
+
};
|
|
1220
1331
|
/** @description A monitor plus `available_metrics` — the alert metrics valid for its type (GET /monitors/{id} only) */
|
|
1221
1332
|
MonitorDetail: components["schemas"]["Monitor"] & {
|
|
1333
|
+
/** @description The monitor has produced at least one check (within a year); while false, uptime and SLA figures are meaningless. */
|
|
1334
|
+
has_probe_data?: boolean;
|
|
1335
|
+
/** @description The most recent check; null when there is none or the analytics store could not be reached (best effort). */
|
|
1336
|
+
last_check?: {
|
|
1337
|
+
/** Format: date-time */
|
|
1338
|
+
at: string;
|
|
1339
|
+
success: boolean;
|
|
1340
|
+
duration_ms: number;
|
|
1341
|
+
/** @description Location name; the prober's name when it is not a listed location. */
|
|
1342
|
+
location: string;
|
|
1343
|
+
error: string | null;
|
|
1344
|
+
/** @description http and api monitors only. */
|
|
1345
|
+
status_code?: number;
|
|
1346
|
+
} | null;
|
|
1347
|
+
/**
|
|
1348
|
+
* Format: date-time
|
|
1349
|
+
* @description last_check.at + interval_seconds — an estimate that can sit in the past when checks stall. null for heartbeat, paused, or no check.
|
|
1350
|
+
*/
|
|
1351
|
+
next_check_estimate_at?: string | null;
|
|
1352
|
+
/** @description The monitor's own notification groups (config.notificationGroupIds), in config order. */
|
|
1353
|
+
notification_groups?: {
|
|
1354
|
+
/** Format: uuid */
|
|
1355
|
+
id: string;
|
|
1356
|
+
name: string;
|
|
1357
|
+
}[];
|
|
1358
|
+
/** @description The `locations` ids resolved, in the monitor's order. */
|
|
1359
|
+
locations_detail?: {
|
|
1360
|
+
/** Format: uuid */
|
|
1361
|
+
id: string;
|
|
1362
|
+
name: string;
|
|
1363
|
+
city: string | null;
|
|
1364
|
+
region: string;
|
|
1365
|
+
country_code: string;
|
|
1366
|
+
}[];
|
|
1367
|
+
/** @description Type-aware summary of the monitor page's top card; null for other types. */
|
|
1368
|
+
latest?:
|
|
1369
|
+
| {
|
|
1370
|
+
days_until_expiry?: number | null;
|
|
1371
|
+
/** Format: date-time */
|
|
1372
|
+
not_after?: string | null;
|
|
1373
|
+
issuer?: string | null;
|
|
1374
|
+
protocol?: string | null;
|
|
1375
|
+
valid?: boolean | null;
|
|
1376
|
+
}
|
|
1377
|
+
| {
|
|
1378
|
+
/** Format: date-time */
|
|
1379
|
+
expires_at?: string | null;
|
|
1380
|
+
days_until_expiry?: number | null;
|
|
1381
|
+
registrar?: string | null;
|
|
1382
|
+
nameservers?: string[];
|
|
1383
|
+
}
|
|
1384
|
+
| {
|
|
1385
|
+
/** Format: date-time */
|
|
1386
|
+
last_ping_at?: string | null;
|
|
1387
|
+
/**
|
|
1388
|
+
* Format: date-time
|
|
1389
|
+
* @description Period schedules only; null for cron.
|
|
1390
|
+
*/
|
|
1391
|
+
next_expected_at?: string | null;
|
|
1392
|
+
missed?: boolean;
|
|
1393
|
+
last_exit_code?: number | null;
|
|
1394
|
+
}
|
|
1395
|
+
| null;
|
|
1222
1396
|
available_metrics: components["schemas"]["CatalogAlertMetric"][];
|
|
1223
1397
|
};
|
|
1224
1398
|
MonitorCreate: {
|
|
@@ -1249,7 +1423,8 @@ export interface components {
|
|
|
1249
1423
|
| "browser"
|
|
1250
1424
|
| "heartbeat"
|
|
1251
1425
|
| "mcp"
|
|
1252
|
-
| "api"
|
|
1426
|
+
| "api"
|
|
1427
|
+
| "integrity";
|
|
1253
1428
|
/** @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. */
|
|
1254
1429
|
target: string;
|
|
1255
1430
|
/** @description Seconds; validated against the plan's per-type minimum */
|
|
@@ -1321,16 +1496,94 @@ export interface components {
|
|
|
1321
1496
|
uptime_24h?: number | null;
|
|
1322
1497
|
uptime_7d?: number | null;
|
|
1323
1498
|
uptime_30d?: number | null;
|
|
1499
|
+
/** @description Incidents that overlapped the period (false positives excluded) */
|
|
1500
|
+
incident_count?: number;
|
|
1501
|
+
/** @description The outages behind the number: each incident that overlapped the period with the downtime it contributed inside the window (maintenance not subtracted here; it is in downtime_ms). */
|
|
1502
|
+
incidents?: {
|
|
1503
|
+
id?: number | null;
|
|
1504
|
+
severity?: string | null;
|
|
1505
|
+
status?: string;
|
|
1506
|
+
/** Format: date-time */
|
|
1507
|
+
started_at?: string;
|
|
1508
|
+
/** Format: date-time */
|
|
1509
|
+
resolved_at?: string | null;
|
|
1510
|
+
downtime_ms?: number;
|
|
1511
|
+
}[];
|
|
1324
1512
|
};
|
|
1513
|
+
/** @description One probe run. Type-specific fields appear only when the probe recorded them (packet loss for ICMP, rcode and answer count for DNS, connect / TLS handshake times for TCP, relay and PTR checks for SMTP, sitemap counts). */
|
|
1325
1514
|
Check: {
|
|
1326
1515
|
/** @constant */
|
|
1327
1516
|
object?: "check";
|
|
1517
|
+
/** @description Addresses this exact probe run */
|
|
1518
|
+
run_id?: string;
|
|
1328
1519
|
timestamp?: string;
|
|
1329
1520
|
success?: boolean;
|
|
1330
1521
|
duration_ms?: number;
|
|
1331
1522
|
location?: string;
|
|
1523
|
+
target?: string;
|
|
1524
|
+
error?: string | null;
|
|
1525
|
+
status_code?: number;
|
|
1526
|
+
body_bytes?: number;
|
|
1527
|
+
rtt_avg_ms?: number;
|
|
1528
|
+
packet_loss_pct?: number;
|
|
1529
|
+
dns_query_type?: string;
|
|
1530
|
+
dns_rcode?: string;
|
|
1531
|
+
dns_answers_count?: number;
|
|
1532
|
+
dns_lookup_ms?: number;
|
|
1533
|
+
tcp_connect_ms?: number;
|
|
1534
|
+
tcp_tls_handshake_ms?: number;
|
|
1535
|
+
tcp_match?: boolean;
|
|
1536
|
+
smtp_connect_ms?: number;
|
|
1537
|
+
smtp_tls_supported?: boolean;
|
|
1538
|
+
smtp_open_relay?: boolean;
|
|
1539
|
+
smtp_ptr_valid?: boolean;
|
|
1540
|
+
sitemap_found?: boolean;
|
|
1541
|
+
sitemap_url_count?: number;
|
|
1542
|
+
sitemap_broken_urls?: number;
|
|
1543
|
+
sitemap_broken_percent?: number;
|
|
1544
|
+
};
|
|
1545
|
+
/** @description One probe run in detail: the Check row plus the stored result. Sensitive values (passwords, tokens, cookies, Authorization headers, credentials in URLs, well-known key shapes) are redacted on the server before the response is built — the raw payload is never returned. Type-specific fields appear only when the probe recorded them. */
|
|
1546
|
+
CheckDetail: {
|
|
1547
|
+
/** @constant */
|
|
1548
|
+
object?: "check_detail";
|
|
1549
|
+
run_id?: string;
|
|
1550
|
+
/** Format: uuid */
|
|
1551
|
+
monitor_id?: string;
|
|
1552
|
+
timestamp?: string;
|
|
1553
|
+
location?: string;
|
|
1554
|
+
target?: string;
|
|
1555
|
+
success?: boolean;
|
|
1556
|
+
duration_ms?: number;
|
|
1332
1557
|
error?: string | null;
|
|
1333
1558
|
status_code?: number;
|
|
1559
|
+
body_bytes?: number;
|
|
1560
|
+
rtt_avg_ms?: number;
|
|
1561
|
+
packet_loss_pct?: number;
|
|
1562
|
+
dns_query_type?: string;
|
|
1563
|
+
dns_rcode?: string;
|
|
1564
|
+
dns_answers_count?: number;
|
|
1565
|
+
dns_lookup_ms?: number;
|
|
1566
|
+
tcp_connect_ms?: number;
|
|
1567
|
+
tcp_tls_handshake_ms?: number;
|
|
1568
|
+
tcp_match?: boolean;
|
|
1569
|
+
smtp_connect_ms?: number;
|
|
1570
|
+
smtp_tls_supported?: boolean;
|
|
1571
|
+
smtp_open_relay?: boolean;
|
|
1572
|
+
smtp_ptr_valid?: boolean;
|
|
1573
|
+
sitemap_found?: boolean;
|
|
1574
|
+
sitemap_url_count?: number;
|
|
1575
|
+
sitemap_broken_urls?: number;
|
|
1576
|
+
sitemap_broken_percent?: number;
|
|
1577
|
+
/** @description The stored output, redacted: a JSON object whose shape depends on the monitor type; a string when the probe recorded plain text; null when stored is false */
|
|
1578
|
+
result?: Record<string, never> | string | null;
|
|
1579
|
+
/** @description Size of the stored output before redaction (0 when nothing is stored) */
|
|
1580
|
+
result_bytes?: number;
|
|
1581
|
+
/** @description How many values were redacted in result */
|
|
1582
|
+
redacted_count?: number;
|
|
1583
|
+
/** @description true when the probe stopped capturing the body at its size cap — result holds the part it kept */
|
|
1584
|
+
truncated?: boolean;
|
|
1585
|
+
/** @description false when the check is known but no result body is stored for it (result is null); the metadata fields are still filled in */
|
|
1586
|
+
stored?: boolean;
|
|
1334
1587
|
};
|
|
1335
1588
|
BulkResult: {
|
|
1336
1589
|
/** @constant */
|
|
@@ -1399,6 +1652,8 @@ export interface components {
|
|
|
1399
1652
|
region?: string;
|
|
1400
1653
|
country?: string;
|
|
1401
1654
|
country_code?: string;
|
|
1655
|
+
/** @description The location can run real-browser checks (Core Web Vitals, Page integrity in browser mode). */
|
|
1656
|
+
browser?: boolean;
|
|
1402
1657
|
};
|
|
1403
1658
|
Incident: {
|
|
1404
1659
|
id?: number;
|
|
@@ -1426,6 +1681,59 @@ export interface components {
|
|
|
1426
1681
|
started_at?: string;
|
|
1427
1682
|
acknowledged_at?: string | null;
|
|
1428
1683
|
resolved_at?: string | null;
|
|
1684
|
+
/** @description Expected vs detected, in words — the incident page's root-cause block. `detected` is the observed value or condition when the incident opened (e.g. 'HTTP Status Code = 404'). null only when no rule snapshot exists. */
|
|
1685
|
+
root_cause?: {
|
|
1686
|
+
title?: string;
|
|
1687
|
+
summary?: string;
|
|
1688
|
+
expected?: string;
|
|
1689
|
+
detected?: string;
|
|
1690
|
+
metric_failure?: boolean;
|
|
1691
|
+
/** @description Page integrity monitors in browser mode, single-incident responses only: the screenshots the check that opened the incident took (a page is photographed only when it differs from its baseline). `url` is a signed link valid for `expires_in` seconds — fetch the incident again for a fresh one. Absent for other monitor types; empty when the check took none. */
|
|
1692
|
+
screenshots?: {
|
|
1693
|
+
/** Format: uri */
|
|
1694
|
+
page_url?: string;
|
|
1695
|
+
/** Format: uri */
|
|
1696
|
+
url?: string;
|
|
1697
|
+
/** Format: date-time */
|
|
1698
|
+
taken_at?: string | null;
|
|
1699
|
+
expires_in?: number;
|
|
1700
|
+
}[];
|
|
1701
|
+
} | null;
|
|
1702
|
+
/** @description The fire-time snapshot the alerting engine stored: the metrics the probe reported (http.status_code, response_time_ms, ssl.days_until_expiry, …), an optional response excerpt, the rule expression, the failure threshold, which prober fired and which probers confirmed. Values under sensitive keys are redacted. */
|
|
1703
|
+
trigger?: {
|
|
1704
|
+
metrics?: {
|
|
1705
|
+
[key: string]: unknown;
|
|
1706
|
+
} | null;
|
|
1707
|
+
/** @description The response excerpt the probe kept (status, headers, body_snippet) plus page_title and visible_text — the readable part of an HTML body — and, from newer probes, final_url and redirect_chain. */
|
|
1708
|
+
response?: {
|
|
1709
|
+
[key: string]: unknown;
|
|
1710
|
+
} | null;
|
|
1711
|
+
expression?: string | null;
|
|
1712
|
+
failure_threshold?: number | null;
|
|
1713
|
+
min_failed_probes?: number | null;
|
|
1714
|
+
prober?: string | null;
|
|
1715
|
+
run_id?: string | null;
|
|
1716
|
+
confirmations?: {
|
|
1717
|
+
prober?: string;
|
|
1718
|
+
run_id?: string;
|
|
1719
|
+
}[];
|
|
1720
|
+
} | null;
|
|
1721
|
+
/** @description Evaluations that fired before and during the incident */
|
|
1722
|
+
fire_count?: number;
|
|
1723
|
+
flapping?: boolean;
|
|
1724
|
+
/** @description Only on GET /incidents/{id}: the incident's events in order (opened, notified, acknowledged, resolved, …). */
|
|
1725
|
+
timeline?: {
|
|
1726
|
+
/** Format: date-time */
|
|
1727
|
+
at?: string;
|
|
1728
|
+
type?: string;
|
|
1729
|
+
source?: string | null;
|
|
1730
|
+
/** @description On the resolved event: exact seconds from start to resolution */
|
|
1731
|
+
duration_seconds?: number;
|
|
1732
|
+
/** @description The event payload without the fire-time snapshot (that is `trigger`) */
|
|
1733
|
+
detail?: {
|
|
1734
|
+
[key: string]: unknown;
|
|
1735
|
+
} | null;
|
|
1736
|
+
}[];
|
|
1429
1737
|
/** @description started_at → resolved_at in seconds; null while open */
|
|
1430
1738
|
duration_seconds?: number | null;
|
|
1431
1739
|
/** @description The incident's active span overlapped a maintenance window for its monitor (the dashboard's Maintenance badge): planned work — it did not notify and does not dent uptime */
|
|
@@ -1437,6 +1745,46 @@ export interface components {
|
|
|
1437
1745
|
/** Format: date-time */
|
|
1438
1746
|
excluded_at?: string | null;
|
|
1439
1747
|
};
|
|
1748
|
+
/** @description The accepted baseline of a page integrity monitor */
|
|
1749
|
+
IntegrityBaseline: {
|
|
1750
|
+
/** @constant */
|
|
1751
|
+
object: "integrity_baseline";
|
|
1752
|
+
/** Format: uuid */
|
|
1753
|
+
monitor_id: string;
|
|
1754
|
+
pages: {
|
|
1755
|
+
/** Format: uri */
|
|
1756
|
+
url: string;
|
|
1757
|
+
has_baseline: boolean;
|
|
1758
|
+
/** Format: date-time */
|
|
1759
|
+
captured_at: string | null;
|
|
1760
|
+
/**
|
|
1761
|
+
* @description auto = recorded from the first check, manual = accepted in the dashboard, api = accepted via this API, timer = accepted automatically because nobody reviewed the change within the monitor's autoAcceptAfterHours
|
|
1762
|
+
* @enum {string|null}
|
|
1763
|
+
*/
|
|
1764
|
+
source: "auto" | "manual" | "api" | "timer" | null;
|
|
1765
|
+
/** @description User or API key name; null for auto and timer */
|
|
1766
|
+
accepted_by?: string | null;
|
|
1767
|
+
}[];
|
|
1768
|
+
trusted_origins?: string[];
|
|
1769
|
+
text_change_threshold?: number;
|
|
1770
|
+
};
|
|
1771
|
+
IntegrityBaselineAcceptRequest: {
|
|
1772
|
+
/** @description Accept only these watched pages; omit for all */
|
|
1773
|
+
pages?: string[];
|
|
1774
|
+
};
|
|
1775
|
+
IntegrityBaselineAccept: {
|
|
1776
|
+
/** @constant */
|
|
1777
|
+
object: "integrity_baseline_accept";
|
|
1778
|
+
/** Format: uuid */
|
|
1779
|
+
monitor_id: string;
|
|
1780
|
+
accepted: string[];
|
|
1781
|
+
skipped: {
|
|
1782
|
+
url: string;
|
|
1783
|
+
reason: string;
|
|
1784
|
+
}[];
|
|
1785
|
+
/** Format: date-time */
|
|
1786
|
+
captured_at?: string | null;
|
|
1787
|
+
};
|
|
1440
1788
|
MonitorReset: {
|
|
1441
1789
|
/** @constant */
|
|
1442
1790
|
object?: "monitor_reset";
|
|
@@ -1452,7 +1800,7 @@ export interface components {
|
|
|
1452
1800
|
/** @description Best-effort steps that failed (e.g. clickhouse); the reset marker is set regardless */
|
|
1453
1801
|
warnings?: string[];
|
|
1454
1802
|
};
|
|
1455
|
-
/** @description A server running watchfor-agent. `status` is the agent's liveness (online = a batch
|
|
1803
|
+
/** @description A server running watchfor-agent. `status` is the agent's liveness (online = a batch within three push intervals and never less than 90 s, stale = none for that long, offline = none for 10 min, never = not reported yet). `monitor_id` is the host's internal monitor — use it wherever a monitor id is asked for (status-page components, maintenance windows, incidents). `metrics` are the latest gauges from the last five minutes, null when the host is silent. */
|
|
1456
1804
|
Host: {
|
|
1457
1805
|
/** Format: uuid */
|
|
1458
1806
|
id?: string;
|
|
@@ -1470,6 +1818,7 @@ export interface components {
|
|
|
1470
1818
|
os?: string | null;
|
|
1471
1819
|
kernel?: string | null;
|
|
1472
1820
|
arch?: string | null;
|
|
1821
|
+
/** @description The agent's tags as key=value strings, sorted (e.g. env=prod, role=db) */
|
|
1473
1822
|
tags?: string[];
|
|
1474
1823
|
push_interval_seconds?: number;
|
|
1475
1824
|
/** Format: uuid */
|
|
@@ -1518,6 +1867,34 @@ export interface components {
|
|
|
1518
1867
|
points?: number[][];
|
|
1519
1868
|
}[];
|
|
1520
1869
|
};
|
|
1870
|
+
/** @description Read-only. Tokens, API/integration keys, passwords, incoming-webhook URLs, the generic-webhook delivery url and phone numbers are returned as "__redacted__". Channels are created and edited in the dashboard. */
|
|
1871
|
+
NotificationChannel: {
|
|
1872
|
+
id?: number;
|
|
1873
|
+
/** @constant */
|
|
1874
|
+
object?: "notification_channel";
|
|
1875
|
+
name?: string;
|
|
1876
|
+
/** @description Channel kind as shown in the dashboard: slack, discord, teams, googlechat, mattermost, rocketchat, telegram, email, webhook, zapier, pagerduty, opsgenie, pushover, pushbullet, ntfy, gotify, … */
|
|
1877
|
+
type?: string;
|
|
1878
|
+
enabled?: boolean;
|
|
1879
|
+
is_default?: boolean;
|
|
1880
|
+
severity_filter?: string[];
|
|
1881
|
+
/** @description Channel settings with secrets masked as "__redacted__" */
|
|
1882
|
+
config?: {
|
|
1883
|
+
[key: string]: unknown;
|
|
1884
|
+
};
|
|
1885
|
+
/** @description Contact groups that deliver through this channel (only groups that still exist) */
|
|
1886
|
+
routes?: {
|
|
1887
|
+
contact_group?: {
|
|
1888
|
+
/** Format: uuid */
|
|
1889
|
+
id?: string;
|
|
1890
|
+
name?: string;
|
|
1891
|
+
};
|
|
1892
|
+
}[];
|
|
1893
|
+
/** Format: date-time */
|
|
1894
|
+
created_at?: string;
|
|
1895
|
+
/** Format: date-time */
|
|
1896
|
+
updated_at?: string;
|
|
1897
|
+
};
|
|
1521
1898
|
MaintenanceWindow: {
|
|
1522
1899
|
/** Format: uuid */
|
|
1523
1900
|
id?: string;
|
|
@@ -1537,6 +1914,21 @@ export interface components {
|
|
|
1537
1914
|
suppress_alerts?: boolean;
|
|
1538
1915
|
exclude_from_sla?: boolean;
|
|
1539
1916
|
enabled?: boolean;
|
|
1917
|
+
mark_maintenance?: boolean;
|
|
1918
|
+
auto_publish?: boolean;
|
|
1919
|
+
status_page_ids?: string[];
|
|
1920
|
+
/**
|
|
1921
|
+
* @description active = an occurrence is running now (alerts muted); upcoming = a future occurrence is scheduled; ended = nothing left to run; disabled = enabled:false and not currently running
|
|
1922
|
+
* @enum {string}
|
|
1923
|
+
*/
|
|
1924
|
+
state?: "active" | "upcoming" | "ended" | "disabled";
|
|
1925
|
+
/**
|
|
1926
|
+
* Format: date-time
|
|
1927
|
+
* @description Start of the next occurrence (the running one while active); null for ended and disabled
|
|
1928
|
+
*/
|
|
1929
|
+
next_run_at?: string | null;
|
|
1930
|
+
/** Format: date-time */
|
|
1931
|
+
updated_at?: string;
|
|
1540
1932
|
/** Format: date-time */
|
|
1541
1933
|
created_at?: string;
|
|
1542
1934
|
};
|
|
@@ -1749,6 +2141,18 @@ export interface components {
|
|
|
1749
2141
|
/** @enum {string} */
|
|
1750
2142
|
theme?: "light" | "dark" | "auto";
|
|
1751
2143
|
url?: string;
|
|
2144
|
+
/**
|
|
2145
|
+
* @description The public page banner, GET /status-pages/{id} only (the same render visitors see, cached up to 60 s). Third-party components never tip it. null if the live status could not be computed
|
|
2146
|
+
* @enum {string|null}
|
|
2147
|
+
*/
|
|
2148
|
+
overall_status?:
|
|
2149
|
+
| "operational"
|
|
2150
|
+
| "degraded"
|
|
2151
|
+
| "major_outage"
|
|
2152
|
+
| "maintenance"
|
|
2153
|
+
| null;
|
|
2154
|
+
/** @description Announcements on the page (incident and maintenance notices), removed ones excluded — GET /status-pages/{id} only */
|
|
2155
|
+
incident_count?: number;
|
|
1752
2156
|
component_count?: number;
|
|
1753
2157
|
components?: components["schemas"]["StatusPageComponent"][];
|
|
1754
2158
|
/** Format: date-time */
|
|
@@ -1764,9 +2168,39 @@ export interface components {
|
|
|
1764
2168
|
name?: string;
|
|
1765
2169
|
description?: string | null;
|
|
1766
2170
|
position?: number;
|
|
1767
|
-
|
|
2171
|
+
/** @enum {string} */
|
|
2172
|
+
display_mode?: "rolled_up" | "expanded" | "collapsible_group";
|
|
2173
|
+
/**
|
|
2174
|
+
* @description How much an auto-published incident notice says about why this component's monitors or hosts fail: hidden = generic 'service disruption'; cause = a plain-words category ('Disk space running low', 'Returning errors'), no values; full = the category plus the detected value ('Disk / is 92.0% full'), for internal pages. A notice covering several components uses the most private level among them. Set in the dashboard component editor.
|
|
2175
|
+
* @enum {string}
|
|
2176
|
+
*/
|
|
2177
|
+
public_cause?: "hidden" | "cause" | "full";
|
|
1768
2178
|
monitor_ids?: string[];
|
|
1769
2179
|
monitor_tags?: string[];
|
|
2180
|
+
/**
|
|
2181
|
+
* @description Rolled-up status as rendered on the public page; GET /status-pages/{id} only
|
|
2182
|
+
* @enum {string|null}
|
|
2183
|
+
*/
|
|
2184
|
+
status?:
|
|
2185
|
+
| "up"
|
|
2186
|
+
| "degraded"
|
|
2187
|
+
| "down"
|
|
2188
|
+
| "maintenance"
|
|
2189
|
+
| "paused"
|
|
2190
|
+
| "unknown"
|
|
2191
|
+
| null;
|
|
2192
|
+
/** @description Monitors the component resolves to right now (monitor_ids ∪ monitors carrying any monitor_tags), alphabetical; empty for third-party components; GET /status-pages/{id} only */
|
|
2193
|
+
monitors?: {
|
|
2194
|
+
/** Format: uuid */
|
|
2195
|
+
id?: string;
|
|
2196
|
+
name?: string;
|
|
2197
|
+
type?: string;
|
|
2198
|
+
}[];
|
|
2199
|
+
/** @description Set when the component mirrors an external provider's status page; components empty = the whole service */
|
|
2200
|
+
third_party?: {
|
|
2201
|
+
service_slug?: string;
|
|
2202
|
+
components?: string[];
|
|
2203
|
+
} | null;
|
|
1770
2204
|
};
|
|
1771
2205
|
Announcement: {
|
|
1772
2206
|
/** Format: uuid */
|
|
@@ -1782,6 +2216,30 @@ export interface components {
|
|
|
1782
2216
|
/** @enum {string} */
|
|
1783
2217
|
severity?: "minor" | "major" | "critical";
|
|
1784
2218
|
affected_component_ids?: string[];
|
|
2219
|
+
/** @description Narrows impact to specific monitors inside the affected components; empty = all of them */
|
|
2220
|
+
affected_monitor_ids?: string[];
|
|
2221
|
+
/**
|
|
2222
|
+
* Format: date-time
|
|
2223
|
+
* @description Maintenance-type notices only
|
|
2224
|
+
*/
|
|
2225
|
+
scheduled_start?: string | null;
|
|
2226
|
+
/**
|
|
2227
|
+
* Format: date-time
|
|
2228
|
+
* @description Maintenance-type notices only
|
|
2229
|
+
*/
|
|
2230
|
+
scheduled_end?: string | null;
|
|
2231
|
+
/** @description The internal incident an auto-published notice came from */
|
|
2232
|
+
source_incident_id?: number | null;
|
|
2233
|
+
/** @description Public timeline, oldest first; the opening body is the first entry */
|
|
2234
|
+
updates?: {
|
|
2235
|
+
/** Format: uuid */
|
|
2236
|
+
id?: string;
|
|
2237
|
+
body?: string;
|
|
2238
|
+
/** @enum {string} */
|
|
2239
|
+
status?: "investigating" | "identified" | "monitoring" | "resolved";
|
|
2240
|
+
/** Format: date-time */
|
|
2241
|
+
created_at?: string;
|
|
2242
|
+
}[];
|
|
1785
2243
|
resolved_at?: string | null;
|
|
1786
2244
|
/** Format: date-time */
|
|
1787
2245
|
created_at?: string;
|
|
@@ -1914,7 +2372,8 @@ export interface components {
|
|
|
1914
2372
|
| "browser"
|
|
1915
2373
|
| "heartbeat"
|
|
1916
2374
|
| "mcp"
|
|
1917
|
-
| "api"
|
|
2375
|
+
| "api"
|
|
2376
|
+
| "integrity";
|
|
1918
2377
|
label?: string;
|
|
1919
2378
|
description?: string;
|
|
1920
2379
|
target_format?: string;
|
|
@@ -1942,6 +2401,8 @@ export interface components {
|
|
|
1942
2401
|
down?: number;
|
|
1943
2402
|
paused?: number;
|
|
1944
2403
|
unknown?: number;
|
|
2404
|
+
/** @description up + down + degraded — the health_score denominator */
|
|
2405
|
+
active?: number;
|
|
1945
2406
|
health_score?: number;
|
|
1946
2407
|
};
|
|
1947
2408
|
/** @description Open incident counts (firing, split by severity, and acknowledged) plus incidents started in the last 24h */
|
|
@@ -1953,6 +2414,27 @@ export interface components {
|
|
|
1953
2414
|
started_24h?: number;
|
|
1954
2415
|
};
|
|
1955
2416
|
open_maintenance_windows?: number;
|
|
2417
|
+
/** @description Servers running the agent (revoked ones excluded) by liveness — the same rule as GET /hosts: online = reported within three push intervals (at least 90 s), stale = longer but under 10 min, offline = longer, never = has not reported yet */
|
|
2418
|
+
hosts?: {
|
|
2419
|
+
total?: number;
|
|
2420
|
+
online?: number;
|
|
2421
|
+
stale?: number;
|
|
2422
|
+
offline?: number;
|
|
2423
|
+
never?: number;
|
|
2424
|
+
};
|
|
2425
|
+
/** @description The dashboard's hero number: (monitors_up + hosts_online) / (monitors_active + hosts_counted), 100 when nothing is counted. Stale and offline hosts count against it; hosts that never reported do not */
|
|
2426
|
+
fleet?: {
|
|
2427
|
+
health_score?: number;
|
|
2428
|
+
monitors_up?: number;
|
|
2429
|
+
monitors_active?: number;
|
|
2430
|
+
hosts_online?: number;
|
|
2431
|
+
hosts_counted?: number;
|
|
2432
|
+
};
|
|
2433
|
+
/** @description The dashboard's setup callout */
|
|
2434
|
+
attention?: {
|
|
2435
|
+
/** @description Active monitors whose alerts would reach nobody (no alert rule with a contact group and no notification group) */
|
|
2436
|
+
silent_monitors?: number;
|
|
2437
|
+
};
|
|
1956
2438
|
};
|
|
1957
2439
|
IncidentStats: {
|
|
1958
2440
|
/** @constant */
|
|
@@ -2040,6 +2522,12 @@ export interface components {
|
|
|
2040
2522
|
/** @description Insights withheld beyond the plan's cap (0 on advanced depth) */
|
|
2041
2523
|
gatedInsightCount?: number;
|
|
2042
2524
|
};
|
|
2525
|
+
/** @description name/email are null for a member who has since left the organization */
|
|
2526
|
+
OncallPerson: {
|
|
2527
|
+
id?: string;
|
|
2528
|
+
name?: string | null;
|
|
2529
|
+
email?: string | null;
|
|
2530
|
+
};
|
|
2043
2531
|
OncallSchedule: {
|
|
2044
2532
|
id?: number;
|
|
2045
2533
|
/** @constant */
|
|
@@ -2048,11 +2536,66 @@ export interface components {
|
|
|
2048
2536
|
timezone?: string;
|
|
2049
2537
|
enabled?: boolean;
|
|
2050
2538
|
layer_count?: number;
|
|
2539
|
+
/** @description null when the schedule is disabled or nobody is on shift right now */
|
|
2051
2540
|
current_on_call?: {
|
|
2052
2541
|
user_id?: string;
|
|
2053
2542
|
name?: string | null;
|
|
2054
|
-
email?: string;
|
|
2543
|
+
email?: string | null;
|
|
2544
|
+
/**
|
|
2545
|
+
* Format: date-time
|
|
2546
|
+
* @description End of the current block — the next handoff or the end of the covering override
|
|
2547
|
+
*/
|
|
2548
|
+
until?: string | null;
|
|
2549
|
+
/** @description Has at least one enabled contact method; contact details are never exposed */
|
|
2550
|
+
reachable?: boolean;
|
|
2055
2551
|
} | null;
|
|
2552
|
+
/** @description The next five staffed blocks after the current one, in order; gaps where nobody is on call are skipped */
|
|
2553
|
+
upcoming_shifts?: {
|
|
2554
|
+
user?: components["schemas"]["OncallPerson"];
|
|
2555
|
+
/** Format: date-time */
|
|
2556
|
+
from?: string;
|
|
2557
|
+
/** Format: date-time */
|
|
2558
|
+
until?: string;
|
|
2559
|
+
/** @description The rotation layer staffing the block; null for an override */
|
|
2560
|
+
layer?: {
|
|
2561
|
+
id?: number;
|
|
2562
|
+
position?: number;
|
|
2563
|
+
} | null;
|
|
2564
|
+
override?: boolean;
|
|
2565
|
+
}[];
|
|
2566
|
+
/** @description Rotation layers, lowest position first; a higher position wins where two cover the same time */
|
|
2567
|
+
layers?: {
|
|
2568
|
+
id?: number;
|
|
2569
|
+
position?: number;
|
|
2570
|
+
/** @enum {string} */
|
|
2571
|
+
rotation?: "daily" | "weekly" | "custom";
|
|
2572
|
+
/** @description Meaningful for custom; daily = 1, weekly = 7 */
|
|
2573
|
+
interval_days?: number;
|
|
2574
|
+
/** @description HH:MM in the schedule's time zone */
|
|
2575
|
+
handoff_time?: string;
|
|
2576
|
+
/** @description YYYY-MM-DD the rotation counts from */
|
|
2577
|
+
anchor_date?: string;
|
|
2578
|
+
/** @description In rotation order */
|
|
2579
|
+
participants?: (components["schemas"]["OncallPerson"] & {
|
|
2580
|
+
reachable?: boolean;
|
|
2581
|
+
})[];
|
|
2582
|
+
/** @description Part-of-week coverage; null = always. days are ISO weekdays 1 = Monday … 7 = Sunday, empty = every day */
|
|
2583
|
+
restrictions?: {
|
|
2584
|
+
start?: string | null;
|
|
2585
|
+
end?: string | null;
|
|
2586
|
+
days?: number[];
|
|
2587
|
+
} | null;
|
|
2588
|
+
}[];
|
|
2589
|
+
/** @description Overrides that are running or still ahead; past ones are not listed */
|
|
2590
|
+
overrides?: {
|
|
2591
|
+
id?: number;
|
|
2592
|
+
user?: components["schemas"]["OncallPerson"];
|
|
2593
|
+
/** Format: date-time */
|
|
2594
|
+
from?: string;
|
|
2595
|
+
/** Format: date-time */
|
|
2596
|
+
until?: string;
|
|
2597
|
+
active?: boolean;
|
|
2598
|
+
}[];
|
|
2056
2599
|
};
|
|
2057
2600
|
MonitorTypeList: {
|
|
2058
2601
|
/** @constant */
|
|
@@ -2118,6 +2661,13 @@ export interface components {
|
|
|
2118
2661
|
has_more: boolean;
|
|
2119
2662
|
next_cursor?: string | null;
|
|
2120
2663
|
};
|
|
2664
|
+
NotificationChannelList: {
|
|
2665
|
+
/** @constant */
|
|
2666
|
+
object: "list";
|
|
2667
|
+
data: components["schemas"]["NotificationChannel"][];
|
|
2668
|
+
has_more: boolean;
|
|
2669
|
+
next_cursor?: string | null;
|
|
2670
|
+
};
|
|
2121
2671
|
MaintenanceWindowList: {
|
|
2122
2672
|
/** @constant */
|
|
2123
2673
|
object: "list";
|
|
@@ -2921,6 +3471,77 @@ export interface operations {
|
|
|
2921
3471
|
};
|
|
2922
3472
|
};
|
|
2923
3473
|
};
|
|
3474
|
+
getMonitorBaseline: {
|
|
3475
|
+
parameters: {
|
|
3476
|
+
query?: never;
|
|
3477
|
+
header?: never;
|
|
3478
|
+
path: {
|
|
3479
|
+
/** @description Resource id (UUID) */
|
|
3480
|
+
id: string;
|
|
3481
|
+
};
|
|
3482
|
+
cookie?: never;
|
|
3483
|
+
};
|
|
3484
|
+
requestBody?: never;
|
|
3485
|
+
responses: {
|
|
3486
|
+
/** @description OK */
|
|
3487
|
+
200: {
|
|
3488
|
+
headers: {
|
|
3489
|
+
[name: string]: unknown;
|
|
3490
|
+
};
|
|
3491
|
+
content: {
|
|
3492
|
+
"application/json": components["schemas"]["IntegrityBaseline"];
|
|
3493
|
+
};
|
|
3494
|
+
};
|
|
3495
|
+
/** @description Error */
|
|
3496
|
+
default: {
|
|
3497
|
+
headers: {
|
|
3498
|
+
[name: string]: unknown;
|
|
3499
|
+
};
|
|
3500
|
+
content: {
|
|
3501
|
+
"application/json": components["schemas"]["Error"];
|
|
3502
|
+
};
|
|
3503
|
+
};
|
|
3504
|
+
};
|
|
3505
|
+
};
|
|
3506
|
+
acceptMonitorBaseline: {
|
|
3507
|
+
parameters: {
|
|
3508
|
+
query?: never;
|
|
3509
|
+
header?: {
|
|
3510
|
+
/** @description Unique key for safe retries (Stripe semantics, 24h window): the same key + body replays the original response instead of re-creating. */
|
|
3511
|
+
"Idempotency-Key"?: string;
|
|
3512
|
+
};
|
|
3513
|
+
path: {
|
|
3514
|
+
/** @description Resource id (UUID) */
|
|
3515
|
+
id: string;
|
|
3516
|
+
};
|
|
3517
|
+
cookie?: never;
|
|
3518
|
+
};
|
|
3519
|
+
requestBody?: {
|
|
3520
|
+
content: {
|
|
3521
|
+
"application/json": components["schemas"]["IntegrityBaselineAcceptRequest"];
|
|
3522
|
+
};
|
|
3523
|
+
};
|
|
3524
|
+
responses: {
|
|
3525
|
+
/** @description The pages accepted and the ones skipped */
|
|
3526
|
+
200: {
|
|
3527
|
+
headers: {
|
|
3528
|
+
[name: string]: unknown;
|
|
3529
|
+
};
|
|
3530
|
+
content: {
|
|
3531
|
+
"application/json": components["schemas"]["IntegrityBaselineAccept"];
|
|
3532
|
+
};
|
|
3533
|
+
};
|
|
3534
|
+
/** @description Error */
|
|
3535
|
+
default: {
|
|
3536
|
+
headers: {
|
|
3537
|
+
[name: string]: unknown;
|
|
3538
|
+
};
|
|
3539
|
+
content: {
|
|
3540
|
+
"application/json": components["schemas"]["Error"];
|
|
3541
|
+
};
|
|
3542
|
+
};
|
|
3543
|
+
};
|
|
3544
|
+
};
|
|
2924
3545
|
getMonitorUptime: {
|
|
2925
3546
|
parameters: {
|
|
2926
3547
|
query?: {
|
|
@@ -2995,6 +3616,40 @@ export interface operations {
|
|
|
2995
3616
|
};
|
|
2996
3617
|
};
|
|
2997
3618
|
};
|
|
3619
|
+
getCheckDetail: {
|
|
3620
|
+
parameters: {
|
|
3621
|
+
query?: never;
|
|
3622
|
+
header?: never;
|
|
3623
|
+
path: {
|
|
3624
|
+
/** @description Resource id (UUID) */
|
|
3625
|
+
id: string;
|
|
3626
|
+
/** @description The check's run_id as listed by GET /monitors/{id}/checks (opaque; malformed → 400, unknown for this monitor → 404) */
|
|
3627
|
+
run_id: string;
|
|
3628
|
+
};
|
|
3629
|
+
cookie?: never;
|
|
3630
|
+
};
|
|
3631
|
+
requestBody?: never;
|
|
3632
|
+
responses: {
|
|
3633
|
+
/** @description OK */
|
|
3634
|
+
200: {
|
|
3635
|
+
headers: {
|
|
3636
|
+
[name: string]: unknown;
|
|
3637
|
+
};
|
|
3638
|
+
content: {
|
|
3639
|
+
"application/json": components["schemas"]["CheckDetail"];
|
|
3640
|
+
};
|
|
3641
|
+
};
|
|
3642
|
+
/** @description Error */
|
|
3643
|
+
default: {
|
|
3644
|
+
headers: {
|
|
3645
|
+
[name: string]: unknown;
|
|
3646
|
+
};
|
|
3647
|
+
content: {
|
|
3648
|
+
"application/json": components["schemas"]["Error"];
|
|
3649
|
+
};
|
|
3650
|
+
};
|
|
3651
|
+
};
|
|
3652
|
+
};
|
|
2998
3653
|
listAlertRules: {
|
|
2999
3654
|
parameters: {
|
|
3000
3655
|
query?: never;
|
|
@@ -3586,6 +4241,72 @@ export interface operations {
|
|
|
3586
4241
|
};
|
|
3587
4242
|
};
|
|
3588
4243
|
};
|
|
4244
|
+
listNotificationChannels: {
|
|
4245
|
+
parameters: {
|
|
4246
|
+
query?: {
|
|
4247
|
+
/** @description Page size, 1–100 (default 50). Any other value — 0, negative, non-integer — returns 400. A `sort` query parameter is not supported and returns 400 naming the fixed order. */
|
|
4248
|
+
limit?: number;
|
|
4249
|
+
/** @description Opaque cursor from the previous page's next_cursor. It encodes the last row's position (sort key + id), so paging continues correctly even if that row is deleted meanwhile. A malformed cursor is 400 'Malformed cursor'; a legacy id-only cursor whose row no longer exists is 400 'Cursor no longer valid' — restart from the first page. */
|
|
4250
|
+
cursor?: string;
|
|
4251
|
+
};
|
|
4252
|
+
header?: never;
|
|
4253
|
+
path?: never;
|
|
4254
|
+
cookie?: never;
|
|
4255
|
+
};
|
|
4256
|
+
requestBody?: never;
|
|
4257
|
+
responses: {
|
|
4258
|
+
/** @description OK */
|
|
4259
|
+
200: {
|
|
4260
|
+
headers: {
|
|
4261
|
+
[name: string]: unknown;
|
|
4262
|
+
};
|
|
4263
|
+
content: {
|
|
4264
|
+
"application/json": components["schemas"]["NotificationChannelList"];
|
|
4265
|
+
};
|
|
4266
|
+
};
|
|
4267
|
+
/** @description Error */
|
|
4268
|
+
default: {
|
|
4269
|
+
headers: {
|
|
4270
|
+
[name: string]: unknown;
|
|
4271
|
+
};
|
|
4272
|
+
content: {
|
|
4273
|
+
"application/json": components["schemas"]["Error"];
|
|
4274
|
+
};
|
|
4275
|
+
};
|
|
4276
|
+
};
|
|
4277
|
+
};
|
|
4278
|
+
getNotificationChannel: {
|
|
4279
|
+
parameters: {
|
|
4280
|
+
query?: never;
|
|
4281
|
+
header?: never;
|
|
4282
|
+
path: {
|
|
4283
|
+
/** @description Notification channel id (integer) */
|
|
4284
|
+
id: number;
|
|
4285
|
+
};
|
|
4286
|
+
cookie?: never;
|
|
4287
|
+
};
|
|
4288
|
+
requestBody?: never;
|
|
4289
|
+
responses: {
|
|
4290
|
+
/** @description OK */
|
|
4291
|
+
200: {
|
|
4292
|
+
headers: {
|
|
4293
|
+
[name: string]: unknown;
|
|
4294
|
+
};
|
|
4295
|
+
content: {
|
|
4296
|
+
"application/json": components["schemas"]["NotificationChannel"];
|
|
4297
|
+
};
|
|
4298
|
+
};
|
|
4299
|
+
/** @description Error */
|
|
4300
|
+
default: {
|
|
4301
|
+
headers: {
|
|
4302
|
+
[name: string]: unknown;
|
|
4303
|
+
};
|
|
4304
|
+
content: {
|
|
4305
|
+
"application/json": components["schemas"]["Error"];
|
|
4306
|
+
};
|
|
4307
|
+
};
|
|
4308
|
+
};
|
|
4309
|
+
};
|
|
3589
4310
|
listMaintenanceWindows: {
|
|
3590
4311
|
parameters: {
|
|
3591
4312
|
query?: {
|
|
@@ -3593,6 +4314,8 @@ export interface operations {
|
|
|
3593
4314
|
limit?: number;
|
|
3594
4315
|
/** @description Opaque cursor from the previous page's next_cursor. It encodes the last row's position (sort key + id), so paging continues correctly even if that row is deleted meanwhile. A malformed cursor is 400 'Malformed cursor'; a legacy id-only cursor whose row no longer exists is 400 'Cursor no longer valid' — restart from the first page. */
|
|
3595
4316
|
cursor?: string;
|
|
4317
|
+
/** @description Only live windows. Evaluated over all of the organization's windows before paging, so has_more and next_cursor describe the filtered set. ended/disabled are not filterable — read state off each row. */
|
|
4318
|
+
state?: "active" | "upcoming";
|
|
3596
4319
|
};
|
|
3597
4320
|
header?: never;
|
|
3598
4321
|
path?: never;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "watchfor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
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",
|