@openstatus/sdk-node 0.0.2 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +281 -142
- package/esm/gen/openstatus/status_report/v1/service_pb.d.ts +357 -0
- package/esm/gen/openstatus/status_report/v1/service_pb.d.ts.map +1 -0
- package/esm/gen/openstatus/status_report/v1/service_pb.js +79 -0
- package/esm/gen/openstatus/status_report/v1/status_report_pb.d.ts +182 -0
- package/esm/gen/openstatus/status_report/v1/status_report_pb.d.ts.map +1 -0
- package/esm/gen/openstatus/status_report/v1/status_report_pb.js +55 -0
- package/esm/mod.d.ts +25 -2
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +8 -1
- package/package.json +1 -1
- package/script/gen/openstatus/status_report/v1/service_pb.d.ts +357 -0
- package/script/gen/openstatus/status_report/v1/service_pb.d.ts.map +1 -0
- package/script/gen/openstatus/status_report/v1/service_pb.js +82 -0
- package/script/gen/openstatus/status_report/v1/status_report_pb.d.ts +182 -0
- package/script/gen/openstatus/status_report/v1/status_report_pb.d.ts.map +1 -0
- package/script/gen/openstatus/status_report/v1/status_report_pb.js +58 -0
- package/script/mod.d.ts +25 -2
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +12 -4
package/README.md
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
# OpenStatus Node.js SDK
|
|
1
|
+
# OpenStatus Node.js SDK (Beta)
|
|
2
2
|
|
|
3
3
|
[](https://jsr.io/@openstatus/sdk-node)
|
|
4
4
|
[](https://www.npmjs.com/package/@openstatus/sdk-node)
|
|
5
5
|
[](https://opensource.org/licenses/MIT)
|
|
6
6
|
|
|
7
|
-
Official Node.js SDK for [OpenStatus](https://openstatus.dev) -
|
|
8
|
-
monitoring platform.
|
|
7
|
+
Official Node.js SDK for [OpenStatus](https://openstatus.dev) - The open-source status page with uptime monitoring.
|
|
9
8
|
|
|
10
9
|
## Features
|
|
11
10
|
|
|
11
|
+
### Status Page
|
|
12
|
+
- **Status Reports** - Manage incident and maintenance reports with update timelines
|
|
13
|
+
|
|
14
|
+
### Monitoring
|
|
12
15
|
- **HTTP Monitoring** - Monitor websites and APIs with customizable assertions
|
|
13
16
|
- **TCP Monitoring** - Check database connections and other TCP services
|
|
14
17
|
- **DNS Monitoring** - Verify DNS records and resolution
|
|
18
|
+
|
|
15
19
|
- **Global Regions** - Monitor from 28 locations worldwide
|
|
16
20
|
- **Type-safe** - Full TypeScript support with generated types from protobuf
|
|
17
21
|
|
|
@@ -39,11 +43,11 @@ import { openstatus } from "jsr:@openstatus/sdk-node";
|
|
|
39
43
|
|
|
40
44
|
```typescript
|
|
41
45
|
import {
|
|
46
|
+
HTTPMethod,
|
|
47
|
+
NumberComparator,
|
|
42
48
|
openstatus,
|
|
43
49
|
Periodicity,
|
|
44
50
|
Region,
|
|
45
|
-
HTTPMethod,
|
|
46
|
-
NumberComparator,
|
|
47
51
|
} from "@openstatus/sdk-node";
|
|
48
52
|
|
|
49
53
|
const headers = {
|
|
@@ -51,28 +55,29 @@ const headers = {
|
|
|
51
55
|
};
|
|
52
56
|
|
|
53
57
|
// Create a monitor
|
|
54
|
-
const { monitor } = await openstatus.monitor.v1.MonitorService
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
58
|
+
const { monitor } = await openstatus.monitor.v1.MonitorService
|
|
59
|
+
.createHTTPMonitor(
|
|
60
|
+
{
|
|
61
|
+
monitor: {
|
|
62
|
+
name: "My API",
|
|
63
|
+
url: "https://api.example.com/health",
|
|
64
|
+
periodicity: Periodicity.PERIODICITY_1M,
|
|
65
|
+
method: HTTPMethod.HTTP_METHOD_GET,
|
|
66
|
+
regions: [Region.FLY_AMS, Region.FLY_IAD, Region.FLY_SYD],
|
|
67
|
+
active: true,
|
|
68
|
+
statusCodeAssertions: [
|
|
69
|
+
{ comparator: NumberComparator.EQUAL, target: BigInt(200) },
|
|
70
|
+
],
|
|
71
|
+
},
|
|
66
72
|
},
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
);
|
|
73
|
+
{ headers },
|
|
74
|
+
);
|
|
70
75
|
|
|
71
76
|
console.log(`Monitor created: ${monitor?.id}`);
|
|
72
77
|
|
|
73
78
|
// List all monitors
|
|
74
|
-
const { httpMonitors, tcpMonitors, dnsMonitors, totalSize } =
|
|
75
|
-
|
|
79
|
+
const { httpMonitors, tcpMonitors, dnsMonitors, totalSize } = await openstatus
|
|
80
|
+
.monitor.v1.MonitorService.listMonitors({}, { headers });
|
|
76
81
|
|
|
77
82
|
console.log(`Found ${totalSize} monitors`);
|
|
78
83
|
```
|
|
@@ -107,21 +112,22 @@ await openstatus.monitor.v1.MonitorService.listMonitors({}, { headers });
|
|
|
107
112
|
Create an HTTP/HTTPS monitor.
|
|
108
113
|
|
|
109
114
|
```typescript
|
|
110
|
-
import { Periodicity, Region
|
|
115
|
+
import { HTTPMethod, Periodicity, Region } from "@openstatus/sdk-node";
|
|
111
116
|
|
|
112
|
-
const { monitor } = await openstatus.monitor.v1.MonitorService
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
117
|
+
const { monitor } = await openstatus.monitor.v1.MonitorService
|
|
118
|
+
.createHTTPMonitor(
|
|
119
|
+
{
|
|
120
|
+
monitor: {
|
|
121
|
+
name: "My Website",
|
|
122
|
+
url: "https://example.com",
|
|
123
|
+
periodicity: Periodicity.PERIODICITY_1M,
|
|
124
|
+
method: HTTPMethod.HTTP_METHOD_GET,
|
|
125
|
+
regions: [Region.FLY_AMS, Region.FLY_IAD, Region.FLY_SYD],
|
|
126
|
+
active: true,
|
|
127
|
+
},
|
|
121
128
|
},
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
);
|
|
129
|
+
{ headers },
|
|
130
|
+
);
|
|
125
131
|
```
|
|
126
132
|
|
|
127
133
|
#### `updateHTTPMonitor(request, options)`
|
|
@@ -129,16 +135,17 @@ const { monitor } = await openstatus.monitor.v1.MonitorService.createHTTPMonitor
|
|
|
129
135
|
Update an existing HTTP monitor.
|
|
130
136
|
|
|
131
137
|
```typescript
|
|
132
|
-
const { monitor } = await openstatus.monitor.v1.MonitorService
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
+
const { monitor } = await openstatus.monitor.v1.MonitorService
|
|
139
|
+
.updateHTTPMonitor(
|
|
140
|
+
{
|
|
141
|
+
id: "mon_123",
|
|
142
|
+
monitor: {
|
|
143
|
+
name: "Updated Name",
|
|
144
|
+
active: false,
|
|
145
|
+
},
|
|
138
146
|
},
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
);
|
|
147
|
+
{ headers },
|
|
148
|
+
);
|
|
142
149
|
```
|
|
143
150
|
|
|
144
151
|
#### `createTCPMonitor(request, options)`
|
|
@@ -261,10 +268,11 @@ Get the current status of a monitor across all configured regions.
|
|
|
261
268
|
```typescript
|
|
262
269
|
import { MonitorStatus, Region } from "@openstatus/sdk-node";
|
|
263
270
|
|
|
264
|
-
const { id, regions } = await openstatus.monitor.v1.MonitorService
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
271
|
+
const { id, regions } = await openstatus.monitor.v1.MonitorService
|
|
272
|
+
.getMonitorStatus(
|
|
273
|
+
{ id: "mon_123" },
|
|
274
|
+
{ headers },
|
|
275
|
+
);
|
|
268
276
|
|
|
269
277
|
// regions is an array of { region, status }
|
|
270
278
|
// region: Region enum value (e.g., Region.FLY_AMS)
|
|
@@ -312,88 +320,214 @@ const { status } = await openstatus.health.v1.HealthService.check({});
|
|
|
312
320
|
console.log(ServingStatus[status]); // "SERVING"
|
|
313
321
|
```
|
|
314
322
|
|
|
323
|
+
### Status Report Service
|
|
324
|
+
|
|
325
|
+
Manage incident and maintenance reports with update timelines.
|
|
326
|
+
|
|
327
|
+
#### `createStatusReport(request, options)`
|
|
328
|
+
|
|
329
|
+
Create a new status report.
|
|
330
|
+
|
|
331
|
+
```typescript
|
|
332
|
+
import { StatusReportStatus } from "@openstatus/sdk-node";
|
|
333
|
+
|
|
334
|
+
const { statusReport } = await openstatus.statusReport.v1.StatusReportService
|
|
335
|
+
.createStatusReport(
|
|
336
|
+
{
|
|
337
|
+
title: "API Degradation",
|
|
338
|
+
status: StatusReportStatus.INVESTIGATING,
|
|
339
|
+
message: "We are investigating reports of increased latency.",
|
|
340
|
+
date: "2024-01-15T10:30:00",
|
|
341
|
+
pageId: "page_123",
|
|
342
|
+
pageComponentIds: ["comp_456"],
|
|
343
|
+
notify: true,
|
|
344
|
+
},
|
|
345
|
+
{ headers },
|
|
346
|
+
);
|
|
347
|
+
|
|
348
|
+
console.log(`Status report created: ${statusReport?.id}`);
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
#### `getStatusReport(request, options)`
|
|
352
|
+
|
|
353
|
+
Get a status report by ID (includes full update timeline).
|
|
354
|
+
|
|
355
|
+
```typescript
|
|
356
|
+
const { statusReport } = await openstatus.statusReport.v1.StatusReportService
|
|
357
|
+
.getStatusReport(
|
|
358
|
+
{ id: "sr_123" },
|
|
359
|
+
{ headers },
|
|
360
|
+
);
|
|
361
|
+
|
|
362
|
+
console.log(`Title: ${statusReport?.title}`);
|
|
363
|
+
console.log(`Status: ${StatusReportStatus[statusReport?.status ?? 0]}`);
|
|
364
|
+
|
|
365
|
+
// Access update timeline
|
|
366
|
+
for (const update of statusReport?.updates ?? []) {
|
|
367
|
+
console.log(`${update.date}: ${update.message}`);
|
|
368
|
+
}
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
#### `listStatusReports(request, options)`
|
|
372
|
+
|
|
373
|
+
List all status reports with pagination and optional filtering.
|
|
374
|
+
|
|
375
|
+
```typescript
|
|
376
|
+
import { StatusReportStatus } from "@openstatus/sdk-node";
|
|
377
|
+
|
|
378
|
+
const { statusReports, totalSize } = await openstatus.statusReport.v1
|
|
379
|
+
.StatusReportService.listStatusReports(
|
|
380
|
+
{
|
|
381
|
+
limit: 10,
|
|
382
|
+
offset: 0,
|
|
383
|
+
statuses: [StatusReportStatus.INVESTIGATING, StatusReportStatus.IDENTIFIED],
|
|
384
|
+
},
|
|
385
|
+
{ headers },
|
|
386
|
+
);
|
|
387
|
+
|
|
388
|
+
console.log(`Found ${totalSize} status reports`);
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
#### `updateStatusReport(request, options)`
|
|
392
|
+
|
|
393
|
+
Update status report metadata (title, page components).
|
|
394
|
+
|
|
395
|
+
```typescript
|
|
396
|
+
const { statusReport } = await openstatus.statusReport.v1.StatusReportService
|
|
397
|
+
.updateStatusReport(
|
|
398
|
+
{
|
|
399
|
+
id: "sr_123",
|
|
400
|
+
title: "Updated Title",
|
|
401
|
+
pageComponentIds: ["comp_456", "comp_789"],
|
|
402
|
+
},
|
|
403
|
+
{ headers },
|
|
404
|
+
);
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
#### `deleteStatusReport(request, options)`
|
|
408
|
+
|
|
409
|
+
Delete a status report and all its updates.
|
|
410
|
+
|
|
411
|
+
```typescript
|
|
412
|
+
const { success } = await openstatus.statusReport.v1.StatusReportService
|
|
413
|
+
.deleteStatusReport(
|
|
414
|
+
{ id: "sr_123" },
|
|
415
|
+
{ headers },
|
|
416
|
+
);
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
#### `addStatusReportUpdate(request, options)`
|
|
420
|
+
|
|
421
|
+
Add a new update to an existing status report timeline.
|
|
422
|
+
|
|
423
|
+
```typescript
|
|
424
|
+
import { StatusReportStatus } from "@openstatus/sdk-node";
|
|
425
|
+
|
|
426
|
+
const { statusReport } = await openstatus.statusReport.v1.StatusReportService
|
|
427
|
+
.addStatusReportUpdate(
|
|
428
|
+
{
|
|
429
|
+
statusReportId: "sr_123",
|
|
430
|
+
status: StatusReportStatus.IDENTIFIED,
|
|
431
|
+
message: "The issue has been identified as a database connection problem.",
|
|
432
|
+
date: "2024-01-15T11:00:00", // optional, defaults to current time
|
|
433
|
+
notify: true,
|
|
434
|
+
},
|
|
435
|
+
{ headers },
|
|
436
|
+
);
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
### Status Report Status
|
|
440
|
+
|
|
441
|
+
| Enum Value | Description |
|
|
442
|
+
| --------------- | ------------------------------- |
|
|
443
|
+
| `UNSPECIFIED` | Default/unspecified status |
|
|
444
|
+
| `INVESTIGATING` | Actively investigating the issue |
|
|
445
|
+
| `IDENTIFIED` | Root cause has been identified |
|
|
446
|
+
| `MONITORING` | Fix deployed, monitoring |
|
|
447
|
+
| `RESOLVED` | Issue fully resolved |
|
|
448
|
+
|
|
315
449
|
## Monitor Options
|
|
316
450
|
|
|
317
451
|
### HTTP Monitor
|
|
318
452
|
|
|
319
|
-
| Option | Type
|
|
320
|
-
| ---------------------- |
|
|
321
|
-
| `name` | string
|
|
322
|
-
| `url` | string
|
|
323
|
-
| `periodicity` | Periodicity
|
|
324
|
-
| `method` | HTTPMethod
|
|
325
|
-
| `body` | string
|
|
326
|
-
| `headers` | Headers[]
|
|
327
|
-
| `timeout` | bigint
|
|
328
|
-
| `retry` | bigint
|
|
329
|
-
| `followRedirects` | boolean
|
|
330
|
-
| `regions` | Region[]
|
|
331
|
-
| `active` | boolean
|
|
332
|
-
| `public` | boolean
|
|
333
|
-
| `degradedAt` | bigint
|
|
334
|
-
| `description` | string
|
|
335
|
-
| `statusCodeAssertions` | array
|
|
336
|
-
| `bodyAssertions` | array
|
|
337
|
-
| `headerAssertions` | array
|
|
338
|
-
| `openTelemetry` | OpenTelemetryConfig| No | OpenTelemetry export configuration
|
|
453
|
+
| Option | Type | Required | Description |
|
|
454
|
+
| ---------------------- | ------------------- | -------- | --------------------------------------------------- |
|
|
455
|
+
| `name` | string | Yes | Monitor name (max 256 chars) |
|
|
456
|
+
| `url` | string | Yes | URL to monitor (max 2048 chars) |
|
|
457
|
+
| `periodicity` | Periodicity | Yes | Check interval (see [Periodicity](#periodicity)) |
|
|
458
|
+
| `method` | HTTPMethod | No | HTTP method (see [HTTP Methods](#http-methods)) |
|
|
459
|
+
| `body` | string | No | Request body |
|
|
460
|
+
| `headers` | Headers[] | No | Custom headers (`{ key: string, value: string }[]`) |
|
|
461
|
+
| `timeout` | bigint | No | Timeout in ms (default: 45000, max: 120000) |
|
|
462
|
+
| `retry` | bigint | No | Retry attempts (default: 3, max: 10) |
|
|
463
|
+
| `followRedirects` | boolean | No | Follow redirects (default: true) |
|
|
464
|
+
| `regions` | Region[] | No | [Regions](#regions) for checks |
|
|
465
|
+
| `active` | boolean | No | Enable monitoring (default: false) |
|
|
466
|
+
| `public` | boolean | No | Public visibility (default: false) |
|
|
467
|
+
| `degradedAt` | bigint | No | Latency threshold (ms) for degraded status |
|
|
468
|
+
| `description` | string | No | Monitor description (max 1024 chars) |
|
|
469
|
+
| `statusCodeAssertions` | array | No | [Status code assertions](#status-code-assertions) |
|
|
470
|
+
| `bodyAssertions` | array | No | [Body assertions](#body-assertions) |
|
|
471
|
+
| `headerAssertions` | array | No | [Header assertions](#header-assertions) |
|
|
472
|
+
| `openTelemetry` | OpenTelemetryConfig | No | OpenTelemetry export configuration |
|
|
339
473
|
|
|
340
474
|
### TCP Monitor
|
|
341
475
|
|
|
342
|
-
| Option | Type
|
|
343
|
-
| --------------- |
|
|
344
|
-
| `name` | string
|
|
345
|
-
| `uri` | string
|
|
346
|
-
| `periodicity` | Periodicity
|
|
347
|
-
| `timeout` | bigint
|
|
348
|
-
| `retry` | bigint
|
|
349
|
-
| `regions` | Region[]
|
|
350
|
-
| `active` | boolean
|
|
351
|
-
| `public` | boolean
|
|
352
|
-
| `degradedAt` | bigint
|
|
353
|
-
| `description` | string
|
|
354
|
-
| `openTelemetry` | OpenTelemetryConfig| No | OpenTelemetry export configuration |
|
|
476
|
+
| Option | Type | Required | Description |
|
|
477
|
+
| --------------- | ------------------- | -------- | ------------------------------------------------ |
|
|
478
|
+
| `name` | string | Yes | Monitor name (max 256 chars) |
|
|
479
|
+
| `uri` | string | Yes | `host:port` to monitor (max 2048 chars) |
|
|
480
|
+
| `periodicity` | Periodicity | Yes | Check interval (see [Periodicity](#periodicity)) |
|
|
481
|
+
| `timeout` | bigint | No | Timeout in ms (default: 45000, max: 120000) |
|
|
482
|
+
| `retry` | bigint | No | Retry attempts (default: 3, max: 10) |
|
|
483
|
+
| `regions` | Region[] | No | [Regions](#regions) for checks |
|
|
484
|
+
| `active` | boolean | No | Enable monitoring (default: false) |
|
|
485
|
+
| `public` | boolean | No | Public visibility (default: false) |
|
|
486
|
+
| `degradedAt` | bigint | No | Latency threshold (ms) for degraded status |
|
|
487
|
+
| `description` | string | No | Monitor description (max 1024 chars) |
|
|
488
|
+
| `openTelemetry` | OpenTelemetryConfig | No | OpenTelemetry export configuration |
|
|
355
489
|
|
|
356
490
|
### DNS Monitor
|
|
357
491
|
|
|
358
|
-
| Option | Type
|
|
359
|
-
| ------------------ |
|
|
360
|
-
| `name` | string
|
|
361
|
-
| `uri` | string
|
|
362
|
-
| `periodicity` | Periodicity
|
|
363
|
-
| `timeout` | bigint
|
|
364
|
-
| `retry` | bigint
|
|
365
|
-
| `regions` | Region[]
|
|
366
|
-
| `active` | boolean
|
|
367
|
-
| `public` | boolean
|
|
368
|
-
| `degradedAt` | bigint
|
|
369
|
-
| `description` | string
|
|
370
|
-
| `recordAssertions` | array
|
|
371
|
-
| `openTelemetry` | OpenTelemetryConfig| No | OpenTelemetry export configuration
|
|
492
|
+
| Option | Type | Required | Description |
|
|
493
|
+
| ------------------ | ------------------- | -------- | ------------------------------------------------ |
|
|
494
|
+
| `name` | string | Yes | Monitor name (max 256 chars) |
|
|
495
|
+
| `uri` | string | Yes | Domain to resolve (max 2048 chars) |
|
|
496
|
+
| `periodicity` | Periodicity | Yes | Check interval (see [Periodicity](#periodicity)) |
|
|
497
|
+
| `timeout` | bigint | No | Timeout in ms (default: 45000, max: 120000) |
|
|
498
|
+
| `retry` | bigint | No | Retry attempts (default: 3, max: 10) |
|
|
499
|
+
| `regions` | Region[] | No | [Regions](#regions) for checks |
|
|
500
|
+
| `active` | boolean | No | Enable monitoring (default: false) |
|
|
501
|
+
| `public` | boolean | No | Public visibility (default: false) |
|
|
502
|
+
| `degradedAt` | bigint | No | Latency threshold (ms) for degraded status |
|
|
503
|
+
| `description` | string | No | Monitor description (max 1024 chars) |
|
|
504
|
+
| `recordAssertions` | array | No | [DNS record assertions](#dns-record-assertions) |
|
|
505
|
+
| `openTelemetry` | OpenTelemetryConfig | No | OpenTelemetry export configuration |
|
|
372
506
|
|
|
373
507
|
### Periodicity
|
|
374
508
|
|
|
375
|
-
| Enum Value
|
|
376
|
-
|
|
|
377
|
-
| `PERIODICITY_30S`
|
|
378
|
-
| `PERIODICITY_1M`
|
|
379
|
-
| `PERIODICITY_5M`
|
|
380
|
-
| `PERIODICITY_10M`
|
|
381
|
-
| `PERIODICITY_30M`
|
|
382
|
-
| `PERIODICITY_1H`
|
|
509
|
+
| Enum Value | Description |
|
|
510
|
+
| ----------------- | ----------- |
|
|
511
|
+
| `PERIODICITY_30S` | Every 30s |
|
|
512
|
+
| `PERIODICITY_1M` | Every 1m |
|
|
513
|
+
| `PERIODICITY_5M` | Every 5m |
|
|
514
|
+
| `PERIODICITY_10M` | Every 10m |
|
|
515
|
+
| `PERIODICITY_30M` | Every 30m |
|
|
516
|
+
| `PERIODICITY_1H` | Every 1h |
|
|
383
517
|
|
|
384
518
|
### HTTP Methods
|
|
385
519
|
|
|
386
|
-
| Enum Value
|
|
387
|
-
|
|
|
388
|
-
| `HTTP_METHOD_GET`
|
|
389
|
-
| `HTTP_METHOD_POST`
|
|
390
|
-
| `HTTP_METHOD_HEAD`
|
|
391
|
-
| `HTTP_METHOD_PUT`
|
|
392
|
-
| `HTTP_METHOD_PATCH`
|
|
393
|
-
| `HTTP_METHOD_DELETE`
|
|
394
|
-
| `HTTP_METHOD_TRACE`
|
|
395
|
-
| `HTTP_METHOD_CONNECT`
|
|
396
|
-
| `HTTP_METHOD_OPTIONS`
|
|
520
|
+
| Enum Value | Description |
|
|
521
|
+
| --------------------- | ----------- |
|
|
522
|
+
| `HTTP_METHOD_GET` | GET |
|
|
523
|
+
| `HTTP_METHOD_POST` | POST |
|
|
524
|
+
| `HTTP_METHOD_HEAD` | HEAD |
|
|
525
|
+
| `HTTP_METHOD_PUT` | PUT |
|
|
526
|
+
| `HTTP_METHOD_PATCH` | PATCH |
|
|
527
|
+
| `HTTP_METHOD_DELETE` | DELETE |
|
|
528
|
+
| `HTTP_METHOD_TRACE` | TRACE |
|
|
529
|
+
| `HTTP_METHOD_CONNECT` | CONNECT |
|
|
530
|
+
| `HTTP_METHOD_OPTIONS` | OPTIONS |
|
|
397
531
|
|
|
398
532
|
## Assertions
|
|
399
533
|
|
|
@@ -416,14 +550,14 @@ import { NumberComparator } from "@openstatus/sdk-node";
|
|
|
416
550
|
|
|
417
551
|
**NumberComparator values:**
|
|
418
552
|
|
|
419
|
-
| Enum Value | Description
|
|
420
|
-
| ----------------------- |
|
|
421
|
-
| `EQUAL` | Equal to target
|
|
422
|
-
| `NOT_EQUAL` | Not equal to target
|
|
423
|
-
| `GREATER_THAN` | Greater than target
|
|
424
|
-
| `GREATER_THAN_OR_EQUAL` | Greater than or equal
|
|
425
|
-
| `LESS_THAN` | Less than target
|
|
426
|
-
| `LESS_THAN_OR_EQUAL` | Less than or equal
|
|
553
|
+
| Enum Value | Description |
|
|
554
|
+
| ----------------------- | --------------------- |
|
|
555
|
+
| `EQUAL` | Equal to target |
|
|
556
|
+
| `NOT_EQUAL` | Not equal to target |
|
|
557
|
+
| `GREATER_THAN` | Greater than target |
|
|
558
|
+
| `GREATER_THAN_OR_EQUAL` | Greater than or equal |
|
|
559
|
+
| `LESS_THAN` | Less than target |
|
|
560
|
+
| `LESS_THAN_OR_EQUAL` | Less than or equal |
|
|
427
561
|
|
|
428
562
|
### Body Assertions
|
|
429
563
|
|
|
@@ -442,18 +576,18 @@ import { StringComparator } from "@openstatus/sdk-node";
|
|
|
442
576
|
|
|
443
577
|
**StringComparator values:**
|
|
444
578
|
|
|
445
|
-
| Enum Value | Description
|
|
446
|
-
| ----------------------- |
|
|
447
|
-
| `CONTAINS` | Contains target string
|
|
448
|
-
| `NOT_CONTAINS` | Does not contain target
|
|
449
|
-
| `EQUAL` | Equal to target
|
|
450
|
-
| `NOT_EQUAL` | Not equal to target
|
|
451
|
-
| `EMPTY` | Body is empty
|
|
452
|
-
| `NOT_EMPTY` | Body is not empty
|
|
453
|
-
| `GREATER_THAN` | Lexicographically greater
|
|
454
|
-
| `GREATER_THAN_OR_EQUAL` | Lexicographically >= target
|
|
455
|
-
| `LESS_THAN` | Lexicographically less
|
|
456
|
-
| `LESS_THAN_OR_EQUAL` | Lexicographically <= target
|
|
579
|
+
| Enum Value | Description |
|
|
580
|
+
| ----------------------- | --------------------------- |
|
|
581
|
+
| `CONTAINS` | Contains target string |
|
|
582
|
+
| `NOT_CONTAINS` | Does not contain target |
|
|
583
|
+
| `EQUAL` | Equal to target |
|
|
584
|
+
| `NOT_EQUAL` | Not equal to target |
|
|
585
|
+
| `EMPTY` | Body is empty |
|
|
586
|
+
| `NOT_EMPTY` | Body is not empty |
|
|
587
|
+
| `GREATER_THAN` | Lexicographically greater |
|
|
588
|
+
| `GREATER_THAN_OR_EQUAL` | Lexicographically >= target |
|
|
589
|
+
| `LESS_THAN` | Lexicographically less |
|
|
590
|
+
| `LESS_THAN_OR_EQUAL` | Lexicographically <= target |
|
|
457
591
|
|
|
458
592
|
### Header Assertions
|
|
459
593
|
|
|
@@ -482,7 +616,11 @@ import { RecordComparator } from "@openstatus/sdk-node";
|
|
|
482
616
|
|
|
483
617
|
{
|
|
484
618
|
recordAssertions: [
|
|
485
|
-
{
|
|
619
|
+
{
|
|
620
|
+
record: "A",
|
|
621
|
+
comparator: RecordComparator.EQUAL,
|
|
622
|
+
target: "93.184.216.34",
|
|
623
|
+
},
|
|
486
624
|
{ record: "CNAME", comparator: RecordComparator.CONTAINS, target: "cdn" },
|
|
487
625
|
];
|
|
488
626
|
}
|
|
@@ -501,7 +639,8 @@ import { RecordComparator } from "@openstatus/sdk-node";
|
|
|
501
639
|
|
|
502
640
|
## Regions
|
|
503
641
|
|
|
504
|
-
Monitor from 28 global locations across multiple providers. Use the `Region`
|
|
642
|
+
Monitor from 28 global locations across multiple providers. Use the `Region`
|
|
643
|
+
enum:
|
|
505
644
|
|
|
506
645
|
```typescript
|
|
507
646
|
import { Region } from "@openstatus/sdk-node";
|
|
@@ -546,12 +685,12 @@ regions: [Region.FLY_AMS, Region.FLY_IAD, Region.KOYEB_FRA];
|
|
|
546
685
|
|
|
547
686
|
### Railway Regions
|
|
548
687
|
|
|
549
|
-
| Enum Value
|
|
550
|
-
|
|
|
551
|
-
| `RAILWAY_US_WEST2`
|
|
552
|
-
| `RAILWAY_US_EAST4`
|
|
553
|
-
| `RAILWAY_EUROPE_WEST4`
|
|
554
|
-
| `RAILWAY_ASIA_SOUTHEAST1
|
|
688
|
+
| Enum Value | Location |
|
|
689
|
+
| ------------------------- | -------------- |
|
|
690
|
+
| `RAILWAY_US_WEST2` | US West |
|
|
691
|
+
| `RAILWAY_US_EAST4` | US East |
|
|
692
|
+
| `RAILWAY_EUROPE_WEST4` | Europe West |
|
|
693
|
+
| `RAILWAY_ASIA_SOUTHEAST1` | Asia Southeast |
|
|
555
694
|
|
|
556
695
|
## Error Handling
|
|
557
696
|
|