watchfor 0.10.0 → 0.11.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 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 (26 check types, confirmed alerting,
4
+ uptime & infrastructure monitoring (27 check types, confirmed alerting,
5
5
  status pages, on-call).
6
6
 
7
7
  ```bash
@@ -42,6 +42,11 @@ await wf.monitors.reset(monitor.id!);
42
42
  // Page integrity: after a deploy, accept what the newest check saw as the new baseline.
43
43
  await wf.monitors.acceptBaseline(integrityMonitorId);
44
44
 
45
+ // Browser checks: try a Playwright script once (nothing saved), then read the result.
46
+ const { id } = await wf.playwright.testRun({ script, target: "https://shop.example.com" });
47
+ const run = await wf.playwright.getTestRun(id); // status: queued | running | done | error
48
+ await wf.variables.put("LOGIN_PASSWORD", { value: process.env.PW!, secret: true });
49
+
45
50
  // Older checks: pass next_cursor back as cursor (keep the same hours/success).
46
51
  const page = await wf.monitors.checks(monitor.id!, { hours: 24, limit: 100 });
47
52
  if (page.next_cursor) {
@@ -100,5 +105,5 @@ npx watchfor report --period 30d
100
105
  ## Links
101
106
 
102
107
  - API docs: https://watchfor.io/docs/api
103
- - MCP server for AI agents (56 tools): https://watchfor.io/docs/api/mcp
108
+ - MCP server for AI agents (59 tools): https://watchfor.io/docs/api/mcp
104
109
  - Create an API key: dashboard → Settings → API keys (`read` or `read+write` scope)
package/dist/client.d.ts CHANGED
@@ -12,6 +12,15 @@ export type MonitorDetail = components["schemas"]["MonitorDetail"];
12
12
  export type MonitorReset = components["schemas"]["MonitorReset"];
13
13
  export type IntegrityBaseline = components["schemas"]["IntegrityBaseline"];
14
14
  export type IntegrityBaselineAccept = components["schemas"]["IntegrityBaselineAccept"];
15
+ export type PlaywrightTestRunRequest = components["schemas"]["PlaywrightTestRunRequest"];
16
+ export type PlaywrightTestRunAccepted = components["schemas"]["PlaywrightTestRunAccepted"];
17
+ export type PlaywrightTestRun = components["schemas"]["PlaywrightTestRun"];
18
+ export type PlaywrightRun = components["schemas"]["PlaywrightRun"];
19
+ export type PlaywrightRunSummary = components["schemas"]["PlaywrightRunSummary"];
20
+ export type ScriptVersion = components["schemas"]["ScriptVersion"];
21
+ export type ScriptVersionSummary = components["schemas"]["ScriptVersionSummary"];
22
+ export type Variable = components["schemas"]["Variable"];
23
+ export type VariableDeleted = components["schemas"]["VariableDeleted"];
15
24
  export type Incident = components["schemas"]["Incident"];
16
25
  export type AlertRule = components["schemas"]["AlertRule"];
17
26
  export type Contact = components["schemas"]["Contact"];
@@ -136,6 +145,27 @@ export declare class WatchFor {
136
145
  acceptBaseline: (id: string, body?: {
137
146
  pages?: string[];
138
147
  }, idempotencyKey?: string) => Promise<IntegrityBaselineAccept>;
148
+ /** Browser checks: runs, newest first (`status` failed | flaky). */
149
+ runs: (id: string, params?: {
150
+ status?: "all" | "failed" | "flaky";
151
+ limit?: number;
152
+ cursor?: string;
153
+ }) => Promise<{
154
+ object: "list";
155
+ data: PlaywrightRunSummary[];
156
+ total?: number;
157
+ has_more: boolean;
158
+ next_cursor: string | null;
159
+ }>;
160
+ /** Browser checks: one run — steps, errors, Web Vitals, screenshot
161
+ * URLs (15 min) and the trace-viewer link. */
162
+ run: (id: string, runId: string) => Promise<PlaywrightRun>;
163
+ /** Browser checks: saved script versions (last 50). */
164
+ scriptVersions: (id: string) => Promise<{
165
+ object: "list";
166
+ data: ScriptVersionSummary[];
167
+ }>;
168
+ scriptVersion: (id: string, version: number) => Promise<ScriptVersion>;
139
169
  uptime: (id: string, period?: "1h" | "24h" | "7d" | "30d" | "90d") => Promise<Uptime>;
140
170
  /** Recent probe results, newest first. Page with `next_cursor` →
141
171
  * `cursor` (keep the same `hours`/`success`); `locations` is the
@@ -156,6 +186,29 @@ export declare class WatchFor {
156
186
  update: (monitorId: string, ruleId: string, body: Record<string, unknown>) => Promise<AlertRule>;
157
187
  delete: (monitorId: string, ruleId: string) => Promise<Deleted>;
158
188
  };
189
+ /**
190
+ * Browser checks (Playwright): run a script once without saving it —
191
+ * `testRun()` returns an id, `getTestRun()` its live progress and result.
192
+ */
193
+ readonly playwright: {
194
+ testRun: (body: PlaywrightTestRunRequest, idempotencyKey?: string) => Promise<PlaywrightTestRunAccepted>;
195
+ getTestRun: (id: string) => Promise<PlaywrightTestRun>;
196
+ };
197
+ /**
198
+ * Org variables and secrets browser checks read as process.env.NAME.
199
+ * Secrets are write-only: `list()` never returns their value.
200
+ */
201
+ readonly variables: {
202
+ list: () => Promise<{
203
+ object: "list";
204
+ data: Variable[];
205
+ }>;
206
+ put: (name: string, body: {
207
+ value?: string;
208
+ secret?: boolean;
209
+ }) => Promise<Variable>;
210
+ delete: (name: string) => Promise<VariableDeleted>;
211
+ };
159
212
  readonly incidents: {
160
213
  list: (q?: {
161
214
  status?: "firing" | "acknowledged" | "resolved";
package/dist/client.js CHANGED
@@ -141,6 +141,14 @@ export class WatchFor {
141
141
  body: body ?? {},
142
142
  idempotencyKey,
143
143
  }),
144
+ /** Browser checks: runs, newest first (`status` failed | flaky). */
145
+ runs: (id, params = {}) => this.request("GET", `/monitors/${id}/runs`, { query: params }),
146
+ /** Browser checks: one run — steps, errors, Web Vitals, screenshot
147
+ * URLs (15 min) and the trace-viewer link. */
148
+ run: (id, runId) => this.request("GET", `/monitors/${id}/runs/${runId}`),
149
+ /** Browser checks: saved script versions (last 50). */
150
+ scriptVersions: (id) => this.request("GET", `/monitors/${id}/script/versions`),
151
+ scriptVersion: (id, version) => this.request("GET", `/monitors/${id}/script/versions/${version}`),
144
152
  uptime: (id, period) => this.request("GET", `/monitors/${id}/uptime`, { query: { period } }),
145
153
  /** Recent probe results, newest first. Page with `next_cursor` →
146
154
  * `cursor` (keep the same `hours`/`success`); `locations` is the
@@ -163,6 +171,23 @@ export class WatchFor {
163
171
  delete: (monitorId, ruleId) => this.request("DELETE", `/monitors/${monitorId}/alert-rules/${ruleId}`),
164
172
  };
165
173
  // ── Incidents ─────────────────────────────────────────────────
174
+ /**
175
+ * Browser checks (Playwright): run a script once without saving it —
176
+ * `testRun()` returns an id, `getTestRun()` its live progress and result.
177
+ */
178
+ playwright = {
179
+ testRun: (body, idempotencyKey) => this.request("POST", "/playwright/test-runs", { body, idempotencyKey }),
180
+ getTestRun: (id) => this.request("GET", `/playwright/test-runs/${id}`),
181
+ };
182
+ /**
183
+ * Org variables and secrets browser checks read as process.env.NAME.
184
+ * Secrets are write-only: `list()` never returns their value.
185
+ */
186
+ variables = {
187
+ list: () => this.request("GET", "/variables"),
188
+ put: (name, body) => this.request("PUT", `/variables/${encodeURIComponent(name)}`, { body }),
189
+ delete: (name) => this.request("DELETE", `/variables/${encodeURIComponent(name)}`),
190
+ };
166
191
  incidents = {
167
192
  list: (q) => this.request("GET", "/incidents", { query: q }),
168
193
  get: (id) => this.request("GET", `/incidents/${id}`),
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 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";
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 PlaywrightRun, type PlaywrightRunSummary, type PlaywrightTestRun, type PlaywrightTestRunAccepted, type PlaywrightTestRunRequest, type ScriptVersion, type ScriptVersionSummary, type StatusPage, type Summary, type Uptime, type Variable, type VariableDeleted, WatchFor, WatchForError, type WatchForOptions, } from "./client.js";
package/dist/schema.d.ts CHANGED
@@ -4,6 +4,146 @@
4
4
  */
5
5
 
6
6
  export interface paths {
7
+ "/playwright/test-runs": {
8
+ parameters: {
9
+ query?: never;
10
+ header?: never;
11
+ path?: never;
12
+ cookie?: never;
13
+ };
14
+ get?: never;
15
+ put?: never;
16
+ /**
17
+ * Run a browser-check script once without saving it (returns 202 + id to poll)
18
+ * @description Validates the script (400 names the line), then runs it in a sandboxed browser on a browser location. Org variables and secrets the script reads are provided exactly as for a saved check. Poll GET /playwright/test-runs/{id}. Counts against the plan's playwrightTestRunsPerHour (429 when spent); an organization can have 3 test runs in flight at once (429 beyond).
19
+ */
20
+ post: operations["createPlaywrightTestRun"];
21
+ delete?: never;
22
+ options?: never;
23
+ head?: never;
24
+ patch?: never;
25
+ trace?: never;
26
+ };
27
+ "/playwright/test-runs/{id}": {
28
+ parameters: {
29
+ query?: never;
30
+ header?: never;
31
+ path?: never;
32
+ cookie?: never;
33
+ };
34
+ /** A test run's live progress and, when done, its result (kept 1 hour) */
35
+ get: operations["getPlaywrightTestRun"];
36
+ put?: never;
37
+ post?: never;
38
+ delete?: never;
39
+ options?: never;
40
+ head?: never;
41
+ patch?: never;
42
+ trace?: never;
43
+ };
44
+ "/monitors/{id}/runs": {
45
+ parameters: {
46
+ query?: never;
47
+ header?: never;
48
+ path?: never;
49
+ cookie?: never;
50
+ };
51
+ /** A browser check's runs, newest first (404 for other monitor types) */
52
+ get: operations["listMonitorRuns"];
53
+ put?: never;
54
+ post?: never;
55
+ delete?: never;
56
+ options?: never;
57
+ head?: never;
58
+ patch?: never;
59
+ trace?: never;
60
+ };
61
+ "/monitors/{id}/runs/{run_id}": {
62
+ parameters: {
63
+ query?: never;
64
+ header?: never;
65
+ path?: never;
66
+ cookie?: never;
67
+ };
68
+ /** One browser-check run: steps, errors with code frames, Web Vitals, screenshots (presigned 15 min), trace link */
69
+ get: operations["getMonitorRun"];
70
+ put?: never;
71
+ post?: never;
72
+ delete?: never;
73
+ options?: never;
74
+ head?: never;
75
+ patch?: never;
76
+ trace?: never;
77
+ };
78
+ "/monitors/{id}/script/versions": {
79
+ parameters: {
80
+ query?: never;
81
+ header?: never;
82
+ path?: never;
83
+ cookie?: never;
84
+ };
85
+ /** Saved versions of a browser check's script (last 50) */
86
+ get: operations["listScriptVersions"];
87
+ put?: never;
88
+ post?: never;
89
+ delete?: never;
90
+ options?: never;
91
+ head?: never;
92
+ patch?: never;
93
+ trace?: never;
94
+ };
95
+ "/monitors/{id}/script/versions/{version}": {
96
+ parameters: {
97
+ query?: never;
98
+ header?: never;
99
+ path?: never;
100
+ cookie?: never;
101
+ };
102
+ /** One saved version of a browser check's script */
103
+ get: operations["getScriptVersion"];
104
+ put?: never;
105
+ post?: never;
106
+ delete?: never;
107
+ options?: never;
108
+ head?: never;
109
+ patch?: never;
110
+ trace?: never;
111
+ };
112
+ "/variables": {
113
+ parameters: {
114
+ query?: never;
115
+ header?: never;
116
+ path?: never;
117
+ cookie?: never;
118
+ };
119
+ /** Org variables and secrets browser checks read as process.env.NAME (secrets without values) */
120
+ get: operations["listVariables"];
121
+ put?: never;
122
+ post?: never;
123
+ delete?: never;
124
+ options?: never;
125
+ head?: never;
126
+ patch?: never;
127
+ trace?: never;
128
+ };
129
+ "/variables/{name}": {
130
+ parameters: {
131
+ query?: never;
132
+ header?: never;
133
+ path?: never;
134
+ cookie?: never;
135
+ };
136
+ get?: never;
137
+ /** Create or replace a variable or secret; checks that read it are re-synced */
138
+ put: operations["putVariable"];
139
+ post?: never;
140
+ /** Delete a variable; checks that read it get undefined from their next run */
141
+ delete: operations["deleteVariable"];
142
+ options?: never;
143
+ head?: never;
144
+ patch?: never;
145
+ trace?: never;
146
+ };
7
147
  "/diagnostics": {
8
148
  parameters: {
9
149
  query?: never;
@@ -941,6 +1081,166 @@ export interface paths {
941
1081
  export type webhooks = Record<string, never>;
942
1082
  export interface components {
943
1083
  schemas: {
1084
+ PlaywrightTestRunRequest: {
1085
+ /** @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`. */
1086
+ script: string;
1087
+ /**
1088
+ * Format: uri
1089
+ * @description The site under test (process.env.TARGET_URL)
1090
+ */
1091
+ target: string;
1092
+ /**
1093
+ * Format: uuid
1094
+ * @description A browser location (GET /locations, browser: true); omit for the nearest
1095
+ */
1096
+ location_id?: string;
1097
+ /** @description Per-attempt timeout, capped by the plan (maxPlaywrightTimeoutSeconds); default 60 */
1098
+ timeout_seconds?: number;
1099
+ /**
1100
+ * @description Retry a failed test once inside the run
1101
+ * @default true
1102
+ */
1103
+ retry: boolean;
1104
+ };
1105
+ PlaywrightTestRunAccepted: {
1106
+ /** @constant */
1107
+ object: "playwright_test_run";
1108
+ /** Format: uuid */
1109
+ id: string;
1110
+ /** @constant */
1111
+ status: "queued";
1112
+ location?: {
1113
+ /** Format: uuid */
1114
+ id?: string;
1115
+ name?: string;
1116
+ };
1117
+ timeout_seconds?: number;
1118
+ /** @description process.env names the script reads that no org variable defines (they are undefined in the run) */
1119
+ missing_variables?: string[];
1120
+ };
1121
+ /** @description One browser-check run. `result` is the stored run result (credentials masked): status, attempts, duration_ms, runtime, tests[].steps[] (title, status, duration_ms, error {message, location, snippet}), failure, navigations (Web Vitals per page), console_errors, page_errors, failed_requests, blocked_requests, artifacts. */
1122
+ PlaywrightRun: {
1123
+ /** @constant */
1124
+ object: "playwright_run";
1125
+ /** Format: uuid */
1126
+ run_id: string;
1127
+ timestamp?: string;
1128
+ location?: string;
1129
+ /** @enum {string} */
1130
+ status:
1131
+ | "passed"
1132
+ | "flaky"
1133
+ | "failed"
1134
+ | "timed_out"
1135
+ | "script_error"
1136
+ | "infra_error";
1137
+ duration_ms?: number;
1138
+ result: {
1139
+ [key: string]: unknown;
1140
+ };
1141
+ /** @description Artefact key → presigned screenshot URL (valid 15 minutes) */
1142
+ screenshot_urls?: {
1143
+ [key: string]: string;
1144
+ };
1145
+ /**
1146
+ * Format: uri
1147
+ * @description The Playwright trace in WatchFor's own trace viewer (opens for a signed-in member; traces never leave our origin). Null when no trace was kept.
1148
+ */
1149
+ trace_url?: string | null;
1150
+ };
1151
+ PlaywrightRunSummary: {
1152
+ /** @constant */
1153
+ object: "playwright_run";
1154
+ /** Format: uuid */
1155
+ run_id: string;
1156
+ timestamp: string;
1157
+ status: string;
1158
+ duration_ms?: number;
1159
+ attempts?: number;
1160
+ location?: string;
1161
+ failed_step?: string | null;
1162
+ console_errors?: number;
1163
+ failed_requests?: number;
1164
+ /** @enum {string} */
1165
+ artifacts?: "full" | "failure" | "none";
1166
+ has_trace?: boolean;
1167
+ };
1168
+ PlaywrightTestRun: {
1169
+ /** @constant */
1170
+ object: "playwright_test_run";
1171
+ /** Format: uuid */
1172
+ id: string;
1173
+ /** @enum {string} */
1174
+ status: "queued" | "running" | "done" | "error";
1175
+ /** Format: date-time */
1176
+ started_at?: string;
1177
+ /** Format: date-time */
1178
+ finished_at?: string | null;
1179
+ location?: {
1180
+ id?: string;
1181
+ name?: string;
1182
+ } | null;
1183
+ /** @description Streamed progress lines: test_begin, step_begin, step_end (status, duration_ms, error), test_end */
1184
+ events: {
1185
+ [key: string]: unknown;
1186
+ }[];
1187
+ result?: components["schemas"]["PlaywrightRun"] | null;
1188
+ /** @description Why the run could not happen (our side), when status is error */
1189
+ error?: string | null;
1190
+ };
1191
+ ScriptVersionSummary: {
1192
+ /** @constant */
1193
+ object: "script_version";
1194
+ version: number;
1195
+ current?: boolean;
1196
+ saved_by?: string | null;
1197
+ /** Format: date-time */
1198
+ created_at?: string;
1199
+ lines?: number;
1200
+ };
1201
+ ScriptVersion: {
1202
+ /** @constant */
1203
+ object: "script_version";
1204
+ version: number;
1205
+ saved_by?: string | null;
1206
+ /** Format: date-time */
1207
+ created_at?: string;
1208
+ script: string;
1209
+ };
1210
+ Variable: {
1211
+ /** @constant */
1212
+ object: "variable";
1213
+ name: string;
1214
+ secret: boolean;
1215
+ /** @description Null for secrets — a secret's value is never returned */
1216
+ value?: string | null;
1217
+ /** Format: date-time */
1218
+ updated_at?: string;
1219
+ used_by?: {
1220
+ /** Format: uuid */
1221
+ id?: string;
1222
+ name?: string;
1223
+ }[];
1224
+ /** @description Browser checks re-synced by this write */
1225
+ checks_updated?: number;
1226
+ };
1227
+ VariablePut: {
1228
+ /** @description The value. For an existing secret, omit it to keep the stored one. */
1229
+ value?: string;
1230
+ /**
1231
+ * @description Store encrypted and never show again; masked in logs, errors, traces and screenshots
1232
+ * @default false
1233
+ */
1234
+ secret: boolean;
1235
+ };
1236
+ VariableDeleted: {
1237
+ /** @constant */
1238
+ object: "variable";
1239
+ name: string;
1240
+ /** @constant */
1241
+ deleted: true;
1242
+ checks_updated?: number;
1243
+ };
944
1244
  /** @description Error envelope. Status by code: 400 invalid_request (a field path + human message; unknown enum values list the valid ones), 401 unauthorized, 403 forbidden, 404 not_found, 405 method_not_allowed, 409 conflict, 413 payload_too_large (request body over 256 KiB), 429 rate_limited (Retry-After set), 501 not_implemented, 500 internal_error. Every authenticated response — errors included — carries the real X-RateLimit-*\/RateLimit-* remaining count. */
945
1245
  Error: {
946
1246
  error: {
@@ -1233,7 +1533,10 @@ export interface components {
1233
1533
  /** @constant */
1234
1534
  object?: "monitor";
1235
1535
  name?: string;
1236
- /** @enum {string} */
1536
+ /**
1537
+ * @description Monitor type id; the catalog with target formats and config fields is GET /meta/monitor-types. `playwright` = browser checks (scripted Playwright journeys: login, checkout, search); `browser` = Core Web Vitals (a Lighthouse audit of one page).
1538
+ * @enum {string}
1539
+ */
1237
1540
  type?:
1238
1541
  | "tcp"
1239
1542
  | "dns"
@@ -1260,7 +1563,8 @@ export interface components {
1260
1563
  | "heartbeat"
1261
1564
  | "mcp"
1262
1565
  | "api"
1263
- | "integrity";
1566
+ | "integrity"
1567
+ | "playwright";
1264
1568
  target?: string;
1265
1569
  description?: string | null;
1266
1570
  interval_seconds?: number;
@@ -1397,7 +1701,10 @@ export interface components {
1397
1701
  };
1398
1702
  MonitorCreate: {
1399
1703
  name: string;
1400
- /** @enum {string} */
1704
+ /**
1705
+ * @description Monitor type id; the catalog with target formats and config fields is GET /meta/monitor-types. `playwright` = browser checks (scripted Playwright journeys: login, checkout, search); `browser` = Core Web Vitals (a Lighthouse audit of one page).
1706
+ * @enum {string}
1707
+ */
1401
1708
  type:
1402
1709
  | "tcp"
1403
1710
  | "dns"
@@ -1424,7 +1731,8 @@ export interface components {
1424
1731
  | "heartbeat"
1425
1732
  | "mcp"
1426
1733
  | "api"
1427
- | "integrity";
1734
+ | "integrity"
1735
+ | "playwright";
1428
1736
  /** @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. */
1429
1737
  target: string;
1430
1738
  /** @description Seconds; validated against the plan's per-type minimum */
@@ -1449,7 +1757,7 @@ export interface components {
1449
1757
  */
1450
1758
  cloneFromMonitorId?: string;
1451
1759
  };
1452
- /** @description Partial update — send only what changes. `config` is MERGED into the stored config (see the property). */
1760
+ /** @description Partial update — send only what changes. `config` is MERGED into the stored config (see the property). An unknown top-level field is a 400 naming it (e.g. `interval_seconds` — the field is `interval`), never silently ignored. */
1453
1761
  MonitorUpdate: {
1454
1762
  name?: string;
1455
1763
  target?: string;
@@ -2346,7 +2654,10 @@ export interface components {
2346
2654
  MonitorType: {
2347
2655
  /** @constant */
2348
2656
  object?: "monitor_type";
2349
- /** @enum {string} */
2657
+ /**
2658
+ * @description Monitor type id; the catalog with target formats and config fields is GET /meta/monitor-types. `playwright` = browser checks (scripted Playwright journeys: login, checkout, search); `browser` = Core Web Vitals (a Lighthouse audit of one page).
2659
+ * @enum {string}
2660
+ */
2350
2661
  type?:
2351
2662
  | "tcp"
2352
2663
  | "dns"
@@ -2373,7 +2684,8 @@ export interface components {
2373
2684
  | "heartbeat"
2374
2685
  | "mcp"
2375
2686
  | "api"
2376
- | "integrity";
2687
+ | "integrity"
2688
+ | "playwright";
2377
2689
  label?: string;
2378
2690
  description?: string;
2379
2691
  target_format?: string;
@@ -2597,6 +2909,29 @@ export interface components {
2597
2909
  active?: boolean;
2598
2910
  }[];
2599
2911
  };
2912
+ PlaywrightRunSummaryList: {
2913
+ /** @constant */
2914
+ object: "list";
2915
+ data: components["schemas"]["PlaywrightRunSummary"][];
2916
+ has_more: boolean;
2917
+ total?: number;
2918
+ next_cursor?: string | null;
2919
+ };
2920
+ ScriptVersionSummaryList: {
2921
+ /** @constant */
2922
+ object: "list";
2923
+ data: components["schemas"]["ScriptVersionSummary"][];
2924
+ has_more: boolean;
2925
+ };
2926
+ VariableList: {
2927
+ /** @constant */
2928
+ object: "list";
2929
+ data: components["schemas"]["Variable"][];
2930
+ has_more: boolean;
2931
+ secrets_available?: boolean;
2932
+ /** @description Names checks read that no variable defines */
2933
+ undefined_refs?: string[];
2934
+ };
2600
2935
  MonitorTypeList: {
2601
2936
  /** @constant */
2602
2937
  object: "list";
@@ -2888,6 +3223,312 @@ export interface components {
2888
3223
  }
2889
3224
  export type $defs = Record<string, never>;
2890
3225
  export interface operations {
3226
+ createPlaywrightTestRun: {
3227
+ parameters: {
3228
+ query?: never;
3229
+ header?: never;
3230
+ path?: never;
3231
+ cookie?: never;
3232
+ };
3233
+ requestBody: {
3234
+ content: {
3235
+ "application/json": components["schemas"]["PlaywrightTestRunRequest"];
3236
+ };
3237
+ };
3238
+ responses: {
3239
+ /** @description Queued */
3240
+ 202: {
3241
+ headers: {
3242
+ [name: string]: unknown;
3243
+ };
3244
+ content: {
3245
+ "application/json": components["schemas"]["PlaywrightTestRunAccepted"];
3246
+ };
3247
+ };
3248
+ /** @description Error */
3249
+ default: {
3250
+ headers: {
3251
+ [name: string]: unknown;
3252
+ };
3253
+ content: {
3254
+ "application/json": components["schemas"]["Error"];
3255
+ };
3256
+ };
3257
+ };
3258
+ };
3259
+ getPlaywrightTestRun: {
3260
+ parameters: {
3261
+ query?: never;
3262
+ header?: never;
3263
+ path: {
3264
+ /** @description Test run id returned by POST /playwright/test-runs */
3265
+ id: string;
3266
+ };
3267
+ cookie?: never;
3268
+ };
3269
+ requestBody?: never;
3270
+ responses: {
3271
+ /** @description OK */
3272
+ 200: {
3273
+ headers: {
3274
+ [name: string]: unknown;
3275
+ };
3276
+ content: {
3277
+ "application/json": components["schemas"]["PlaywrightTestRun"];
3278
+ };
3279
+ };
3280
+ /** @description Error */
3281
+ default: {
3282
+ headers: {
3283
+ [name: string]: unknown;
3284
+ };
3285
+ content: {
3286
+ "application/json": components["schemas"]["Error"];
3287
+ };
3288
+ };
3289
+ };
3290
+ };
3291
+ listMonitorRuns: {
3292
+ parameters: {
3293
+ query?: {
3294
+ status?: "all" | "failed" | "flaky";
3295
+ /** @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. */
3296
+ limit?: number;
3297
+ /** @description Opaque cursor from the previous page's next_cursor */
3298
+ cursor?: string;
3299
+ };
3300
+ header?: never;
3301
+ path: {
3302
+ /** @description Resource id (UUID) */
3303
+ id: string;
3304
+ };
3305
+ cookie?: never;
3306
+ };
3307
+ requestBody?: never;
3308
+ responses: {
3309
+ /** @description OK */
3310
+ 200: {
3311
+ headers: {
3312
+ [name: string]: unknown;
3313
+ };
3314
+ content: {
3315
+ "application/json": components["schemas"]["PlaywrightRunSummaryList"];
3316
+ };
3317
+ };
3318
+ /** @description Error */
3319
+ default: {
3320
+ headers: {
3321
+ [name: string]: unknown;
3322
+ };
3323
+ content: {
3324
+ "application/json": components["schemas"]["Error"];
3325
+ };
3326
+ };
3327
+ };
3328
+ };
3329
+ getMonitorRun: {
3330
+ parameters: {
3331
+ query?: never;
3332
+ header?: never;
3333
+ path: {
3334
+ /** @description Resource id (UUID) */
3335
+ id: string;
3336
+ /** @description Run id from GET /monitors/{id}/runs */
3337
+ run_id: string;
3338
+ };
3339
+ cookie?: never;
3340
+ };
3341
+ requestBody?: never;
3342
+ responses: {
3343
+ /** @description OK */
3344
+ 200: {
3345
+ headers: {
3346
+ [name: string]: unknown;
3347
+ };
3348
+ content: {
3349
+ "application/json": components["schemas"]["PlaywrightRun"];
3350
+ };
3351
+ };
3352
+ /** @description Error */
3353
+ default: {
3354
+ headers: {
3355
+ [name: string]: unknown;
3356
+ };
3357
+ content: {
3358
+ "application/json": components["schemas"]["Error"];
3359
+ };
3360
+ };
3361
+ };
3362
+ };
3363
+ listScriptVersions: {
3364
+ parameters: {
3365
+ query?: never;
3366
+ header?: never;
3367
+ path: {
3368
+ /** @description Resource id (UUID) */
3369
+ id: string;
3370
+ };
3371
+ cookie?: never;
3372
+ };
3373
+ requestBody?: never;
3374
+ responses: {
3375
+ /** @description OK */
3376
+ 200: {
3377
+ headers: {
3378
+ [name: string]: unknown;
3379
+ };
3380
+ content: {
3381
+ "application/json": components["schemas"]["ScriptVersionSummaryList"];
3382
+ };
3383
+ };
3384
+ /** @description Error */
3385
+ default: {
3386
+ headers: {
3387
+ [name: string]: unknown;
3388
+ };
3389
+ content: {
3390
+ "application/json": components["schemas"]["Error"];
3391
+ };
3392
+ };
3393
+ };
3394
+ };
3395
+ getScriptVersion: {
3396
+ parameters: {
3397
+ query?: never;
3398
+ header?: never;
3399
+ path: {
3400
+ /** @description Resource id (UUID) */
3401
+ id: string;
3402
+ version: number;
3403
+ };
3404
+ cookie?: never;
3405
+ };
3406
+ requestBody?: never;
3407
+ responses: {
3408
+ /** @description OK */
3409
+ 200: {
3410
+ headers: {
3411
+ [name: string]: unknown;
3412
+ };
3413
+ content: {
3414
+ "application/json": components["schemas"]["ScriptVersion"];
3415
+ };
3416
+ };
3417
+ /** @description Error */
3418
+ default: {
3419
+ headers: {
3420
+ [name: string]: unknown;
3421
+ };
3422
+ content: {
3423
+ "application/json": components["schemas"]["Error"];
3424
+ };
3425
+ };
3426
+ };
3427
+ };
3428
+ listVariables: {
3429
+ parameters: {
3430
+ query?: never;
3431
+ header?: never;
3432
+ path?: never;
3433
+ cookie?: never;
3434
+ };
3435
+ requestBody?: never;
3436
+ responses: {
3437
+ /** @description OK */
3438
+ 200: {
3439
+ headers: {
3440
+ [name: string]: unknown;
3441
+ };
3442
+ content: {
3443
+ "application/json": components["schemas"]["VariableList"];
3444
+ };
3445
+ };
3446
+ /** @description Error */
3447
+ default: {
3448
+ headers: {
3449
+ [name: string]: unknown;
3450
+ };
3451
+ content: {
3452
+ "application/json": components["schemas"]["Error"];
3453
+ };
3454
+ };
3455
+ };
3456
+ };
3457
+ putVariable: {
3458
+ parameters: {
3459
+ query?: never;
3460
+ header?: never;
3461
+ path: {
3462
+ name: string;
3463
+ };
3464
+ cookie?: never;
3465
+ };
3466
+ requestBody: {
3467
+ content: {
3468
+ "application/json": components["schemas"]["VariablePut"];
3469
+ };
3470
+ };
3471
+ responses: {
3472
+ /** @description Updated */
3473
+ 200: {
3474
+ headers: {
3475
+ [name: string]: unknown;
3476
+ };
3477
+ content: {
3478
+ "application/json": components["schemas"]["Variable"];
3479
+ };
3480
+ };
3481
+ /** @description Created */
3482
+ 201: {
3483
+ headers: {
3484
+ [name: string]: unknown;
3485
+ };
3486
+ content: {
3487
+ "application/json": components["schemas"]["Variable"];
3488
+ };
3489
+ };
3490
+ /** @description Error */
3491
+ default: {
3492
+ headers: {
3493
+ [name: string]: unknown;
3494
+ };
3495
+ content: {
3496
+ "application/json": components["schemas"]["Error"];
3497
+ };
3498
+ };
3499
+ };
3500
+ };
3501
+ deleteVariable: {
3502
+ parameters: {
3503
+ query?: never;
3504
+ header?: never;
3505
+ path: {
3506
+ name: string;
3507
+ };
3508
+ cookie?: never;
3509
+ };
3510
+ requestBody?: never;
3511
+ responses: {
3512
+ /** @description OK */
3513
+ 200: {
3514
+ headers: {
3515
+ [name: string]: unknown;
3516
+ };
3517
+ content: {
3518
+ "application/json": components["schemas"]["VariableDeleted"];
3519
+ };
3520
+ };
3521
+ /** @description Error */
3522
+ default: {
3523
+ headers: {
3524
+ [name: string]: unknown;
3525
+ };
3526
+ content: {
3527
+ "application/json": components["schemas"]["Error"];
3528
+ };
3529
+ };
3530
+ };
3531
+ };
2891
3532
  listDiagnostics: {
2892
3533
  parameters: {
2893
3534
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "watchfor",
3
- "version": "0.10.0",
3
+ "version": "0.11.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",