Openstatus sdk www.openstatus.dev

feat: add Status Report service (#5)

Add new StatusReportService for managing incident and maintenance reports:
- createStatusReport: Create new status reports
- getStatusReport: Get report with full update timeline
- listStatusReports: List reports with pagination and filtering
- updateStatusReport: Update report metadata
- deleteStatusReport: Delete reports
- addStatusReportUpdate: Add updates to report timeline

Update README with comprehensive documentation for the new service.

authored by

Thibault Le Ouay and committed by
GitHub
00d03374 61e2ccfd

+1062 -151
+3 -3
.github/workflows/publish.yml
··· 5 5 - "*" 6 6 7 7 permissions: 8 - id-token: write # Required for OIDC 8 + id-token: write # Required for OIDC 9 9 contents: read 10 10 11 11 jobs: ··· 32 32 - name: Setup Node.js 33 33 uses: actions/setup-node@v4 34 34 with: 35 - node-version: '24' 36 - registry-url: 'https://registry.npmjs.org' 35 + node-version: "24" 36 + registry-url: "https://registry.npmjs.org" 37 37 - name: Install Deno 38 38 uses: denoland/setup-deno@v2 39 39 with:
+280 -141
README.md
··· 4 4 [![npm](https://img.shields.io/npm/v/@openstatus/sdk-node)](https://www.npmjs.com/package/@openstatus/sdk-node) 5 5 [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) 6 6 7 - Official Node.js SDK for [OpenStatus](https://openstatus.dev) - the open-source 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 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 55 }; 52 56 53 57 // Create a monitor 54 - const { monitor } = await openstatus.monitor.v1.MonitorService.createHTTPMonitor( 55 - { 56 - monitor: { 57 - name: "My API", 58 - url: "https://api.example.com/health", 59 - periodicity: Periodicity.PERIODICITY_1M, 60 - method: HTTPMethod.HTTP_METHOD_GET, 61 - regions: [Region.FLY_AMS, Region.FLY_IAD, Region.FLY_SYD], 62 - active: true, 63 - statusCodeAssertions: [ 64 - { comparator: NumberComparator.EQUAL, target: BigInt(200) }, 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 - { headers }, 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 - await openstatus.monitor.v1.MonitorService.listMonitors({}, { headers }); 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 112 Create an HTTP/HTTPS monitor. 108 113 109 114 ```typescript 110 - import { Periodicity, Region, HTTPMethod } from "@openstatus/sdk-node"; 115 + import { HTTPMethod, Periodicity, Region } from "@openstatus/sdk-node"; 111 116 112 - const { monitor } = await openstatus.monitor.v1.MonitorService.createHTTPMonitor( 113 - { 114 - monitor: { 115 - name: "My Website", 116 - url: "https://example.com", 117 - periodicity: Periodicity.PERIODICITY_1M, 118 - method: HTTPMethod.HTTP_METHOD_GET, 119 - regions: [Region.FLY_AMS, Region.FLY_IAD, Region.FLY_SYD], 120 - active: true, 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 - { headers }, 124 - ); 129 + { headers }, 130 + ); 125 131 ``` 126 132 127 133 #### `updateHTTPMonitor(request, options)` ··· 129 135 Update an existing HTTP monitor. 130 136 131 137 ```typescript 132 - const { monitor } = await openstatus.monitor.v1.MonitorService.updateHTTPMonitor( 133 - { 134 - id: "mon_123", 135 - monitor: { 136 - name: "Updated Name", 137 - active: false, 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 - { headers }, 141 - ); 147 + { headers }, 148 + ); 142 149 ``` 143 150 144 151 #### `createTCPMonitor(request, options)` ··· 261 268 ```typescript 262 269 import { MonitorStatus, Region } from "@openstatus/sdk-node"; 263 270 264 - const { id, regions } = await openstatus.monitor.v1.MonitorService.getMonitorStatus( 265 - { id: "mon_123" }, 266 - { headers }, 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 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 | Required | Description | 320 - | ---------------------- | ------------------ | -------- | -------------------------------------------------------- | 321 - | `name` | string | Yes | Monitor name (max 256 chars) | 322 - | `url` | string | Yes | URL to monitor (max 2048 chars) | 323 - | `periodicity` | Periodicity | Yes | Check interval (see [Periodicity](#periodicity)) | 324 - | `method` | HTTPMethod | No | HTTP method (see [HTTP Methods](#http-methods)) | 325 - | `body` | string | No | Request body | 326 - | `headers` | Headers[] | No | Custom headers (`{ key: string, value: string }[]`) | 327 - | `timeout` | bigint | No | Timeout in ms (default: 45000, max: 120000) | 328 - | `retry` | bigint | No | Retry attempts (default: 3, max: 10) | 329 - | `followRedirects` | boolean | No | Follow redirects (default: true) | 330 - | `regions` | Region[] | No | [Regions](#regions) for checks | 331 - | `active` | boolean | No | Enable monitoring (default: false) | 332 - | `public` | boolean | No | Public visibility (default: false) | 333 - | `degradedAt` | bigint | No | Latency threshold (ms) for degraded status | 334 - | `description` | string | No | Monitor description (max 1024 chars) | 335 - | `statusCodeAssertions` | array | No | [Status code assertions](#status-code-assertions) | 336 - | `bodyAssertions` | array | No | [Body assertions](#body-assertions) | 337 - | `headerAssertions` | array | No | [Header assertions](#header-assertions) | 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 | Required | Description | 343 - | --------------- | ------------------ | -------- | ------------------------------------------------ | 344 - | `name` | string | Yes | Monitor name (max 256 chars) | 345 - | `uri` | string | Yes | `host:port` to monitor (max 2048 chars) | 346 - | `periodicity` | Periodicity | Yes | Check interval (see [Periodicity](#periodicity)) | 347 - | `timeout` | bigint | No | Timeout in ms (default: 45000, max: 120000) | 348 - | `retry` | bigint | No | Retry attempts (default: 3, max: 10) | 349 - | `regions` | Region[] | No | [Regions](#regions) for checks | 350 - | `active` | boolean | No | Enable monitoring (default: false) | 351 - | `public` | boolean | No | Public visibility (default: false) | 352 - | `degradedAt` | bigint | No | Latency threshold (ms) for degraded status | 353 - | `description` | string | No | Monitor description (max 1024 chars) | 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 | Required | Description | 359 - | ------------------ | ------------------ | -------- | -------------------------------------------------- | 360 - | `name` | string | Yes | Monitor name (max 256 chars) | 361 - | `uri` | string | Yes | Domain to resolve (max 2048 chars) | 362 - | `periodicity` | Periodicity | Yes | Check interval (see [Periodicity](#periodicity)) | 363 - | `timeout` | bigint | No | Timeout in ms (default: 45000, max: 120000) | 364 - | `retry` | bigint | No | Retry attempts (default: 3, max: 10) | 365 - | `regions` | Region[] | No | [Regions](#regions) for checks | 366 - | `active` | boolean | No | Enable monitoring (default: false) | 367 - | `public` | boolean | No | Public visibility (default: false) | 368 - | `degradedAt` | bigint | No | Latency threshold (ms) for degraded status | 369 - | `description` | string | No | Monitor description (max 1024 chars) | 370 - | `recordAssertions` | array | No | [DNS record assertions](#dns-record-assertions) | 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 | Description | 376 - | ----------------------- | ------------ | 377 - | `PERIODICITY_30S` | Every 30s | 378 - | `PERIODICITY_1M` | Every 1m | 379 - | `PERIODICITY_5M` | Every 5m | 380 - | `PERIODICITY_10M` | Every 10m | 381 - | `PERIODICITY_30M` | Every 30m | 382 - | `PERIODICITY_1H` | Every 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 | Description | 387 - | ------------------------- | ----------- | 388 - | `HTTP_METHOD_GET` | GET | 389 - | `HTTP_METHOD_POST` | POST | 390 - | `HTTP_METHOD_HEAD` | HEAD | 391 - | `HTTP_METHOD_PUT` | PUT | 392 - | `HTTP_METHOD_PATCH` | PATCH | 393 - | `HTTP_METHOD_DELETE` | DELETE | 394 - | `HTTP_METHOD_TRACE` | TRACE | 395 - | `HTTP_METHOD_CONNECT` | CONNECT | 396 - | `HTTP_METHOD_OPTIONS` | 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 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 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 616 483 617 { 484 618 recordAssertions: [ 485 - { record: "A", comparator: RecordComparator.EQUAL, target: "93.184.216.34" }, 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 639 502 640 ## Regions 503 641 504 - Monitor from 28 global locations across multiple providers. Use the `Region` enum: 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 685 547 686 ### Railway Regions 548 687 549 - | Enum Value | Location | 550 - | ------------------------ | -------------- | 551 - | `RAILWAY_US_WEST2` | US West | 552 - | `RAILWAY_US_EAST4` | US East | 553 - | `RAILWAY_EUROPE_WEST4` | Europe West | 554 - | `RAILWAY_ASIA_SOUTHEAST1`| Asia Southeast | 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
+484
src/gen/openstatus/status_report/v1/service_pb.ts
··· 1 + // @generated by protoc-gen-es v2.11.0 with parameter "target=ts,import_extension=ts" 2 + // @generated from file openstatus/status_report/v1/service.proto (package openstatus.status_report.v1, syntax proto3) 3 + /* eslint-disable */ 4 + 5 + import type { 6 + GenFile, 7 + GenMessage, 8 + GenService, 9 + } from "@bufbuild/protobuf/codegenv2"; 10 + import { 11 + fileDesc, 12 + messageDesc, 13 + serviceDesc, 14 + } from "@bufbuild/protobuf/codegenv2"; 15 + import { file_buf_validate_validate } from "../../../buf/validate/validate_pb.ts"; 16 + import type { 17 + StatusReport, 18 + StatusReportStatus, 19 + StatusReportSummary, 20 + } from "./status_report_pb.ts"; 21 + import { file_openstatus_status_report_v1_status_report } from "./status_report_pb.ts"; 22 + import type { Message } from "@bufbuild/protobuf"; 23 + 24 + /** 25 + * Describes the file openstatus/status_report/v1/service.proto. 26 + */ 27 + export const file_openstatus_status_report_v1_service: GenFile = /*@__PURE__*/ 28 + fileDesc( 29 + "CilvcGVuc3RhdHVzL3N0YXR1c19yZXBvcnQvdjEvc2VydmljZS5wcm90bxIbb3BlbnN0YXR1cy5zdGF0dXNfcmVwb3J0LnYxIqkCChlDcmVhdGVTdGF0dXNSZXBvcnRSZXF1ZXN0EhYKBXRpdGxlGAEgASgJQge6SARyAhABEkkKBnN0YXR1cxgCIAEoDjIvLm9wZW5zdGF0dXMuc3RhdHVzX3JlcG9ydC52MS5TdGF0dXNSZXBvcnRTdGF0dXNCCLpIBYIBAhABEhgKB21lc3NhZ2UYAyABKAlCB7pIBHICEAESOQoEZGF0ZRgEIAEoCUIrukgociYyJF5cZHs0fS1cZHsyfS1cZHs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ydFJlc3BvbnNlEoIBChFMaXN0U3RhdHVzUmVwb3J0cxI1Lm9wZW5zdGF0dXMuc3RhdHVzX3JlcG9ydC52MS5MaXN0U3RhdHVzUmVwb3J0c1JlcXVlc3QaNi5vcGVuc3RhdHVzLnN0YXR1c19yZXBvcnQudjEuTGlzdFN0YXR1c1JlcG9ydHNSZXNwb25zZRKFAQoSVXBkYXRlU3RhdHVzUmVwb3J0EjYub3BlbnN0YXR1cy5zdGF0dXNfcmVwb3J0LnYxLlVwZGF0ZVN0YXR1c1JlcG9ydFJlcXVlc3QaNy5vcGVuc3RhdHVzLnN0YXR1c19yZXBvcnQudjEuVXBkYXRlU3RhdHVzUmVwb3J0UmVzcG9uc2UShQEKEkRlbGV0ZVN0YXR1c1JlcG9ydBI2Lm9wZW5zdGF0dXMuc3RhdHVzX3JlcG9ydC52MS5EZWxldGVTdGF0dXNSZXBvcnRSZXF1ZXN0Gjcub3BlbnN0YXR1cy5zdGF0dXNfcmVwb3J0LnYxLkRlbGV0ZVN0YXR1c1JlcG9ydFJlc3BvbnNlEo4BChVBZGRTdGF0dXNSZXBvcnRVcGRhdGUSOS5vcGVuc3RhdHVzLnN0YXR1c19yZXBvcnQudjEuQWRkU3RhdHVzUmVwb3J0VXBkYXRlUmVxdWVzdBo6Lm9wZW5zdGF0dXMuc3RhdHVzX3JlcG9ydC52MS5BZGRTdGF0dXNSZXBvcnRVcGRhdGVSZXNwb25zZUJeWlxnaXRodWIuY29tL29wZW5zdGF0dXNocS9vcGVuc3RhdHVzL3BhY2thZ2VzL3Byb3RvL29wZW5zdGF0dXMvc3RhdHVzX3JlcG9ydC92MTtzdGF0dXNyZXBvcnR2MWIGcHJvdG8z", 30 + [ 31 + file_buf_validate_validate, 32 + file_openstatus_status_report_v1_status_report, 33 + ], 34 + ); 35 + 36 + /** 37 + * @generated from message openstatus.status_report.v1.CreateStatusReportRequest 38 + */ 39 + export type CreateStatusReportRequest = 40 + & Message<"openstatus.status_report.v1.CreateStatusReportRequest"> 41 + & { 42 + /** 43 + * Title of the status report (required). 44 + * 45 + * @generated from field: string title = 1; 46 + */ 47 + title: string; 48 + 49 + /** 50 + * Initial status (required). 51 + * 52 + * @generated from field: openstatus.status_report.v1.StatusReportStatus status = 2; 53 + */ 54 + status: StatusReportStatus; 55 + 56 + /** 57 + * Initial message describing the incident (required). 58 + * 59 + * @generated from field: string message = 3; 60 + */ 61 + message: string; 62 + 63 + /** 64 + * Date when the event occurred (RFC 3339 format, required). 65 + * 66 + * @generated from field: string date = 4; 67 + */ 68 + date: string; 69 + 70 + /** 71 + * Page ID to associate with this report (required). 72 + * 73 + * @generated from field: string page_id = 5; 74 + */ 75 + pageId: string; 76 + 77 + /** 78 + * Page component IDs to associate with this report (optional). 79 + * 80 + * @generated from field: repeated string page_component_ids = 6; 81 + */ 82 + pageComponentIds: string[]; 83 + 84 + /** 85 + * Whether to notify subscribers about this status report (optional, defaults to false). 86 + * 87 + * @generated from field: optional bool notify = 7; 88 + */ 89 + notify?: boolean; 90 + }; 91 + 92 + /** 93 + * Describes the message openstatus.status_report.v1.CreateStatusReportRequest. 94 + * Use `create(CreateStatusReportRequestSchema)` to create a new message. 95 + */ 96 + export const CreateStatusReportRequestSchema: GenMessage< 97 + CreateStatusReportRequest 98 + > = /*@__PURE__*/ 99 + messageDesc(file_openstatus_status_report_v1_service, 0); 100 + 101 + /** 102 + * @generated from message openstatus.status_report.v1.CreateStatusReportResponse 103 + */ 104 + export type CreateStatusReportResponse = 105 + & Message<"openstatus.status_report.v1.CreateStatusReportResponse"> 106 + & { 107 + /** 108 + * The created status report. 109 + * 110 + * @generated from field: openstatus.status_report.v1.StatusReport status_report = 1; 111 + */ 112 + statusReport?: StatusReport; 113 + }; 114 + 115 + /** 116 + * Describes the message openstatus.status_report.v1.CreateStatusReportResponse. 117 + * Use `create(CreateStatusReportResponseSchema)` to create a new message. 118 + */ 119 + export const CreateStatusReportResponseSchema: GenMessage< 120 + CreateStatusReportResponse 121 + > = /*@__PURE__*/ 122 + messageDesc(file_openstatus_status_report_v1_service, 1); 123 + 124 + /** 125 + * @generated from message openstatus.status_report.v1.GetStatusReportRequest 126 + */ 127 + export type GetStatusReportRequest = 128 + & Message<"openstatus.status_report.v1.GetStatusReportRequest"> 129 + & { 130 + /** 131 + * ID of the status report to retrieve (required). 132 + * 133 + * @generated from field: string id = 1; 134 + */ 135 + id: string; 136 + }; 137 + 138 + /** 139 + * Describes the message openstatus.status_report.v1.GetStatusReportRequest. 140 + * Use `create(GetStatusReportRequestSchema)` to create a new message. 141 + */ 142 + export const GetStatusReportRequestSchema: GenMessage< 143 + GetStatusReportRequest 144 + > = /*@__PURE__*/ 145 + messageDesc(file_openstatus_status_report_v1_service, 2); 146 + 147 + /** 148 + * @generated from message openstatus.status_report.v1.GetStatusReportResponse 149 + */ 150 + export type GetStatusReportResponse = 151 + & Message<"openstatus.status_report.v1.GetStatusReportResponse"> 152 + & { 153 + /** 154 + * The requested status report. 155 + * 156 + * @generated from field: openstatus.status_report.v1.StatusReport status_report = 1; 157 + */ 158 + statusReport?: StatusReport; 159 + }; 160 + 161 + /** 162 + * Describes the message openstatus.status_report.v1.GetStatusReportResponse. 163 + * Use `create(GetStatusReportResponseSchema)` to create a new message. 164 + */ 165 + export const GetStatusReportResponseSchema: GenMessage< 166 + GetStatusReportResponse 167 + > = /*@__PURE__*/ 168 + messageDesc(file_openstatus_status_report_v1_service, 3); 169 + 170 + /** 171 + * @generated from message openstatus.status_report.v1.ListStatusReportsRequest 172 + */ 173 + export type ListStatusReportsRequest = 174 + & Message<"openstatus.status_report.v1.ListStatusReportsRequest"> 175 + & { 176 + /** 177 + * Maximum number of reports to return (1-100, defaults to 50). 178 + * 179 + * @generated from field: optional int32 limit = 1; 180 + */ 181 + limit?: number; 182 + 183 + /** 184 + * Number of reports to skip for pagination (defaults to 0). 185 + * 186 + * @generated from field: optional int32 offset = 2; 187 + */ 188 + offset?: number; 189 + 190 + /** 191 + * Filter by status (optional). If empty, returns all statuses. 192 + * 193 + * @generated from field: repeated openstatus.status_report.v1.StatusReportStatus statuses = 3; 194 + */ 195 + statuses: StatusReportStatus[]; 196 + }; 197 + 198 + /** 199 + * Describes the message openstatus.status_report.v1.ListStatusReportsRequest. 200 + * Use `create(ListStatusReportsRequestSchema)` to create a new message. 201 + */ 202 + export const ListStatusReportsRequestSchema: GenMessage< 203 + ListStatusReportsRequest 204 + > = /*@__PURE__*/ 205 + messageDesc(file_openstatus_status_report_v1_service, 4); 206 + 207 + /** 208 + * @generated from message openstatus.status_report.v1.ListStatusReportsResponse 209 + */ 210 + export type ListStatusReportsResponse = 211 + & Message<"openstatus.status_report.v1.ListStatusReportsResponse"> 212 + & { 213 + /** 214 + * List of status reports (metadata only, use GetStatusReport for full details). 215 + * 216 + * @generated from field: repeated openstatus.status_report.v1.StatusReportSummary status_reports = 1; 217 + */ 218 + statusReports: StatusReportSummary[]; 219 + 220 + /** 221 + * Total number of reports matching the filter. 222 + * 223 + * @generated from field: int32 total_size = 2; 224 + */ 225 + totalSize: number; 226 + }; 227 + 228 + /** 229 + * Describes the message openstatus.status_report.v1.ListStatusReportsResponse. 230 + * Use `create(ListStatusReportsResponseSchema)` to create a new message. 231 + */ 232 + export const ListStatusReportsResponseSchema: GenMessage< 233 + ListStatusReportsResponse 234 + > = /*@__PURE__*/ 235 + messageDesc(file_openstatus_status_report_v1_service, 5); 236 + 237 + /** 238 + * @generated from message openstatus.status_report.v1.UpdateStatusReportRequest 239 + */ 240 + export type UpdateStatusReportRequest = 241 + & Message<"openstatus.status_report.v1.UpdateStatusReportRequest"> 242 + & { 243 + /** 244 + * ID of the status report to update (required). 245 + * 246 + * @generated from field: string id = 1; 247 + */ 248 + id: string; 249 + 250 + /** 251 + * New title for the report (optional). 252 + * 253 + * @generated from field: optional string title = 2; 254 + */ 255 + title?: string; 256 + 257 + /** 258 + * New list of page component IDs (optional, replaces existing list). 259 + * 260 + * @generated from field: repeated string page_component_ids = 3; 261 + */ 262 + pageComponentIds: string[]; 263 + }; 264 + 265 + /** 266 + * Describes the message openstatus.status_report.v1.UpdateStatusReportRequest. 267 + * Use `create(UpdateStatusReportRequestSchema)` to create a new message. 268 + */ 269 + export const UpdateStatusReportRequestSchema: GenMessage< 270 + UpdateStatusReportRequest 271 + > = /*@__PURE__*/ 272 + messageDesc(file_openstatus_status_report_v1_service, 6); 273 + 274 + /** 275 + * @generated from message openstatus.status_report.v1.UpdateStatusReportResponse 276 + */ 277 + export type UpdateStatusReportResponse = 278 + & Message<"openstatus.status_report.v1.UpdateStatusReportResponse"> 279 + & { 280 + /** 281 + * The updated status report. 282 + * 283 + * @generated from field: openstatus.status_report.v1.StatusReport status_report = 1; 284 + */ 285 + statusReport?: StatusReport; 286 + }; 287 + 288 + /** 289 + * Describes the message openstatus.status_report.v1.UpdateStatusReportResponse. 290 + * Use `create(UpdateStatusReportResponseSchema)` to create a new message. 291 + */ 292 + export const UpdateStatusReportResponseSchema: GenMessage< 293 + UpdateStatusReportResponse 294 + > = /*@__PURE__*/ 295 + messageDesc(file_openstatus_status_report_v1_service, 7); 296 + 297 + /** 298 + * @generated from message openstatus.status_report.v1.DeleteStatusReportRequest 299 + */ 300 + export type DeleteStatusReportRequest = 301 + & Message<"openstatus.status_report.v1.DeleteStatusReportRequest"> 302 + & { 303 + /** 304 + * ID of the status report to delete (required). 305 + * 306 + * @generated from field: string id = 1; 307 + */ 308 + id: string; 309 + }; 310 + 311 + /** 312 + * Describes the message openstatus.status_report.v1.DeleteStatusReportRequest. 313 + * Use `create(DeleteStatusReportRequestSchema)` to create a new message. 314 + */ 315 + export const DeleteStatusReportRequestSchema: GenMessage< 316 + DeleteStatusReportRequest 317 + > = /*@__PURE__*/ 318 + messageDesc(file_openstatus_status_report_v1_service, 8); 319 + 320 + /** 321 + * @generated from message openstatus.status_report.v1.DeleteStatusReportResponse 322 + */ 323 + export type DeleteStatusReportResponse = 324 + & Message<"openstatus.status_report.v1.DeleteStatusReportResponse"> 325 + & { 326 + /** 327 + * Whether the deletion was successful. 328 + * 329 + * @generated from field: bool success = 1; 330 + */ 331 + success: boolean; 332 + }; 333 + 334 + /** 335 + * Describes the message openstatus.status_report.v1.DeleteStatusReportResponse. 336 + * Use `create(DeleteStatusReportResponseSchema)` to create a new message. 337 + */ 338 + export const DeleteStatusReportResponseSchema: GenMessage< 339 + DeleteStatusReportResponse 340 + > = /*@__PURE__*/ 341 + messageDesc(file_openstatus_status_report_v1_service, 9); 342 + 343 + /** 344 + * @generated from message openstatus.status_report.v1.AddStatusReportUpdateRequest 345 + */ 346 + export type AddStatusReportUpdateRequest = 347 + & Message<"openstatus.status_report.v1.AddStatusReportUpdateRequest"> 348 + & { 349 + /** 350 + * ID of the status report to update (required). 351 + * 352 + * @generated from field: string status_report_id = 1; 353 + */ 354 + statusReportId: string; 355 + 356 + /** 357 + * New status for the report (required). 358 + * 359 + * @generated from field: openstatus.status_report.v1.StatusReportStatus status = 2; 360 + */ 361 + status: StatusReportStatus; 362 + 363 + /** 364 + * Message describing what changed (required). 365 + * 366 + * @generated from field: string message = 3; 367 + */ 368 + message: string; 369 + 370 + /** 371 + * Optional date for the update (RFC 3339 format). Defaults to current time if not provided. 372 + * 373 + * @generated from field: optional string date = 4; 374 + */ 375 + date?: string; 376 + 377 + /** 378 + * Whether to notify subscribers about this update (optional, defaults to false). 379 + * 380 + * @generated from field: optional bool notify = 5; 381 + */ 382 + notify?: boolean; 383 + }; 384 + 385 + /** 386 + * Describes the message openstatus.status_report.v1.AddStatusReportUpdateRequest. 387 + * Use `create(AddStatusReportUpdateRequestSchema)` to create a new message. 388 + */ 389 + export const AddStatusReportUpdateRequestSchema: GenMessage< 390 + AddStatusReportUpdateRequest 391 + > = /*@__PURE__*/ 392 + messageDesc(file_openstatus_status_report_v1_service, 10); 393 + 394 + /** 395 + * @generated from message openstatus.status_report.v1.AddStatusReportUpdateResponse 396 + */ 397 + export type AddStatusReportUpdateResponse = 398 + & Message<"openstatus.status_report.v1.AddStatusReportUpdateResponse"> 399 + & { 400 + /** 401 + * The updated status report with the new update included. 402 + * 403 + * @generated from field: openstatus.status_report.v1.StatusReport status_report = 1; 404 + */ 405 + statusReport?: StatusReport; 406 + }; 407 + 408 + /** 409 + * Describes the message openstatus.status_report.v1.AddStatusReportUpdateResponse. 410 + * Use `create(AddStatusReportUpdateResponseSchema)` to create a new message. 411 + */ 412 + export const AddStatusReportUpdateResponseSchema: GenMessage< 413 + AddStatusReportUpdateResponse 414 + > = /*@__PURE__*/ 415 + messageDesc(file_openstatus_status_report_v1_service, 11); 416 + 417 + /** 418 + * StatusReportService provides CRUD operations for status reports. 419 + * 420 + * @generated from service openstatus.status_report.v1.StatusReportService 421 + */ 422 + export const StatusReportService: GenService<{ 423 + /** 424 + * CreateStatusReport creates a new status report. 425 + * 426 + * @generated from rpc openstatus.status_report.v1.StatusReportService.CreateStatusReport 427 + */ 428 + createStatusReport: { 429 + methodKind: "unary"; 430 + input: typeof CreateStatusReportRequestSchema; 431 + output: typeof CreateStatusReportResponseSchema; 432 + }; 433 + /** 434 + * GetStatusReport retrieves a specific status report by ID (includes full update timeline). 435 + * 436 + * @generated from rpc openstatus.status_report.v1.StatusReportService.GetStatusReport 437 + */ 438 + getStatusReport: { 439 + methodKind: "unary"; 440 + input: typeof GetStatusReportRequestSchema; 441 + output: typeof GetStatusReportResponseSchema; 442 + }; 443 + /** 444 + * ListStatusReports returns all status reports for the workspace (metadata only). 445 + * 446 + * @generated from rpc openstatus.status_report.v1.StatusReportService.ListStatusReports 447 + */ 448 + listStatusReports: { 449 + methodKind: "unary"; 450 + input: typeof ListStatusReportsRequestSchema; 451 + output: typeof ListStatusReportsResponseSchema; 452 + }; 453 + /** 454 + * UpdateStatusReport updates the metadata of a status report (title, page components). 455 + * 456 + * @generated from rpc openstatus.status_report.v1.StatusReportService.UpdateStatusReport 457 + */ 458 + updateStatusReport: { 459 + methodKind: "unary"; 460 + input: typeof UpdateStatusReportRequestSchema; 461 + output: typeof UpdateStatusReportResponseSchema; 462 + }; 463 + /** 464 + * DeleteStatusReport removes a status report and all its updates. 465 + * 466 + * @generated from rpc openstatus.status_report.v1.StatusReportService.DeleteStatusReport 467 + */ 468 + deleteStatusReport: { 469 + methodKind: "unary"; 470 + input: typeof DeleteStatusReportRequestSchema; 471 + output: typeof DeleteStatusReportResponseSchema; 472 + }; 473 + /** 474 + * AddStatusReportUpdate adds a new update to an existing status report timeline. 475 + * 476 + * @generated from rpc openstatus.status_report.v1.StatusReportService.AddStatusReportUpdate 477 + */ 478 + addStatusReportUpdate: { 479 + methodKind: "unary"; 480 + input: typeof AddStatusReportUpdateRequestSchema; 481 + output: typeof AddStatusReportUpdateResponseSchema; 482 + }; 483 + }> = /*@__PURE__*/ 484 + serviceDesc(file_openstatus_status_report_v1_service, 0);
+238
src/gen/openstatus/status_report/v1/status_report_pb.ts
··· 1 + // @generated by protoc-gen-es v2.11.0 with parameter "target=ts,import_extension=ts" 2 + // @generated from file openstatus/status_report/v1/status_report.proto (package openstatus.status_report.v1, syntax proto3) 3 + /* eslint-disable */ 4 + 5 + import type { 6 + GenEnum, 7 + GenFile, 8 + GenMessage, 9 + } from "@bufbuild/protobuf/codegenv2"; 10 + import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2"; 11 + import type { Message } from "@bufbuild/protobuf"; 12 + 13 + /** 14 + * Describes the file openstatus/status_report/v1/status_report.proto. 15 + */ 16 + export const file_openstatus_status_report_v1_status_report: 17 + GenFile = /*@__PURE__*/ 18 + fileDesc( 19 + "Ci9vcGVuc3RhdHVzL3N0YXR1c19yZXBvcnQvdjEvc3RhdHVzX3JlcG9ydC5wcm90bxIbb3BlbnN0YXR1cy5zdGF0dXNfcmVwb3J0LnYxIpQBChJTdGF0dXNSZXBvcnRVcGRhdGUSCgoCaWQYASABKAkSPwoGc3RhdHVzGAIgASgOMi8ub3BlbnN0YXR1cy5zdGF0dXNfcmVwb3J0LnYxLlN0YXR1c1JlcG9ydFN0YXR1cxIMCgRkYXRlGAMgASgJEg8KB21lc3NhZ2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status report timeline. 24 + * 25 + * @generated from message openstatus.status_report.v1.StatusReportUpdate 26 + */ 27 + export type StatusReportUpdate = 28 + & Message<"openstatus.status_report.v1.StatusReportUpdate"> 29 + & { 30 + /** 31 + * Unique identifier for the update. 32 + * 33 + * @generated from field: string id = 1; 34 + */ 35 + id: string; 36 + 37 + /** 38 + * Status at the time of this update. 39 + * 40 + * @generated from field: openstatus.status_report.v1.StatusReportStatus status = 2; 41 + */ 42 + status: StatusReportStatus; 43 + 44 + /** 45 + * Timestamp when this update occurred (RFC 3339 format). 46 + * 47 + * @generated from field: string date = 3; 48 + */ 49 + date: string; 50 + 51 + /** 52 + * Message describing the update. 53 + * 54 + * @generated from field: string message = 4; 55 + */ 56 + message: string; 57 + 58 + /** 59 + * Timestamp when the update was created (RFC 3339 format). 60 + * 61 + * @generated from field: string created_at = 5; 62 + */ 63 + createdAt: string; 64 + }; 65 + 66 + /** 67 + * Describes the message openstatus.status_report.v1.StatusReportUpdate. 68 + * Use `create(StatusReportUpdateSchema)` to create a new message. 69 + */ 70 + export const StatusReportUpdateSchema: GenMessage< 71 + StatusReportUpdate 72 + > = /*@__PURE__*/ 73 + messageDesc(file_openstatus_status_report_v1_status_report, 0); 74 + 75 + /** 76 + * StatusReportSummary represents metadata for a status report (used in list responses). 77 + * 78 + * @generated from message openstatus.status_report.v1.StatusReportSummary 79 + */ 80 + export type StatusReportSummary = 81 + & Message<"openstatus.status_report.v1.StatusReportSummary"> 82 + & { 83 + /** 84 + * Unique identifier for the status report. 85 + * 86 + * @generated from field: string id = 1; 87 + */ 88 + id: string; 89 + 90 + /** 91 + * Current status of the report. 92 + * 93 + * @generated from field: openstatus.status_report.v1.StatusReportStatus status = 2; 94 + */ 95 + status: StatusReportStatus; 96 + 97 + /** 98 + * Title of the status report. 99 + * 100 + * @generated from field: string title = 3; 101 + */ 102 + title: string; 103 + 104 + /** 105 + * IDs of affected page components. 106 + * 107 + * @generated from field: repeated string page_component_ids = 4; 108 + */ 109 + pageComponentIds: string[]; 110 + 111 + /** 112 + * Timestamp when the report was created (RFC 3339 format). 113 + * 114 + * @generated from field: string created_at = 5; 115 + */ 116 + createdAt: string; 117 + 118 + /** 119 + * Timestamp when the report was last updated (RFC 3339 format). 120 + * 121 + * @generated from field: string updated_at = 6; 122 + */ 123 + updatedAt: string; 124 + }; 125 + 126 + /** 127 + * Describes the message openstatus.status_report.v1.StatusReportSummary. 128 + * Use `create(StatusReportSummarySchema)` to create a new message. 129 + */ 130 + export const StatusReportSummarySchema: GenMessage< 131 + StatusReportSummary 132 + > = /*@__PURE__*/ 133 + messageDesc(file_openstatus_status_report_v1_status_report, 1); 134 + 135 + /** 136 + * StatusReport represents an incident or maintenance report with full details. 137 + * 138 + * @generated from message openstatus.status_report.v1.StatusReport 139 + */ 140 + export type StatusReport = 141 + & Message<"openstatus.status_report.v1.StatusReport"> 142 + & { 143 + /** 144 + * Unique identifier for the status report. 145 + * 146 + * @generated from field: string id = 1; 147 + */ 148 + id: string; 149 + 150 + /** 151 + * Current status of the report. 152 + * 153 + * @generated from field: openstatus.status_report.v1.StatusReportStatus status = 2; 154 + */ 155 + status: StatusReportStatus; 156 + 157 + /** 158 + * Title of the status report. 159 + * 160 + * @generated from field: string title = 3; 161 + */ 162 + title: string; 163 + 164 + /** 165 + * IDs of affected page components. 166 + * 167 + * @generated from field: repeated string page_component_ids = 4; 168 + */ 169 + pageComponentIds: string[]; 170 + 171 + /** 172 + * Timeline of updates for this report (only included in GetStatusReport). 173 + * 174 + * @generated from field: repeated openstatus.status_report.v1.StatusReportUpdate updates = 5; 175 + */ 176 + updates: StatusReportUpdate[]; 177 + 178 + /** 179 + * Timestamp when the report was created (RFC 3339 format). 180 + * 181 + * @generated from field: string created_at = 6; 182 + */ 183 + createdAt: string; 184 + 185 + /** 186 + * Timestamp when the report was last updated (RFC 3339 format). 187 + * 188 + * @generated from field: string updated_at = 7; 189 + */ 190 + updatedAt: string; 191 + }; 192 + 193 + /** 194 + * Describes the message openstatus.status_report.v1.StatusReport. 195 + * Use `create(StatusReportSchema)` to create a new message. 196 + */ 197 + export const StatusReportSchema: GenMessage<StatusReport> = /*@__PURE__*/ 198 + messageDesc(file_openstatus_status_report_v1_status_report, 2); 199 + 200 + /** 201 + * StatusReportStatus represents the current state of a status report. 202 + * 203 + * @generated from enum openstatus.status_report.v1.StatusReportStatus 204 + */ 205 + export enum StatusReportStatus { 206 + /** 207 + * @generated from enum value: STATUS_REPORT_STATUS_UNSPECIFIED = 0; 208 + */ 209 + UNSPECIFIED = 0, 210 + 211 + /** 212 + * @generated from enum value: STATUS_REPORT_STATUS_INVESTIGATING = 1; 213 + */ 214 + INVESTIGATING = 1, 215 + 216 + /** 217 + * @generated from enum value: STATUS_REPORT_STATUS_IDENTIFIED = 2; 218 + */ 219 + IDENTIFIED = 2, 220 + 221 + /** 222 + * @generated from enum value: STATUS_REPORT_STATUS_MONITORING = 3; 223 + */ 224 + MONITORING = 3, 225 + 226 + /** 227 + * @generated from enum value: STATUS_REPORT_STATUS_RESOLVED = 4; 228 + */ 229 + RESOLVED = 4, 230 + } 231 + 232 + /** 233 + * Describes the enum openstatus.status_report.v1.StatusReportStatus. 234 + */ 235 + export const StatusReportStatusSchema: GenEnum< 236 + StatusReportStatus 237 + > = /*@__PURE__*/ 238 + enumDesc(file_openstatus_status_report_v1_status_report, 0);
+57 -7
src/mod.ts
··· 33 33 import { createConnectTransport } from "@connectrpc/connect-node"; 34 34 import { MonitorService } from "./gen/openstatus/monitor/v1/service_pb.ts"; 35 35 import { HealthService } from "./gen/openstatus/health/v1/health_pb.ts"; 36 + import { StatusReportService } from "./gen/openstatus/status_report/v1/service_pb.ts"; 36 37 37 38 // Re-export monitor types 38 39 export type { ··· 56 57 // Re-export assertion comparator enums 57 58 export { 58 59 NumberComparator, 59 - StringComparator, 60 60 RecordComparator, 61 + StringComparator, 61 62 } from "./gen/openstatus/monitor/v1/assertions_pb.ts"; 62 63 63 64 // Re-export enums ··· 75 76 CreateHTTPMonitorResponse, 76 77 CreateTCPMonitorRequest, 77 78 CreateTCPMonitorResponse, 78 - UpdateDNSMonitorRequest, 79 - UpdateDNSMonitorResponse, 80 - UpdateHTTPMonitorRequest, 81 - UpdateHTTPMonitorResponse, 82 - UpdateTCPMonitorRequest, 83 - UpdateTCPMonitorResponse, 84 79 DeleteMonitorRequest, 85 80 DeleteMonitorResponse, 86 81 GetMonitorStatusRequest, ··· 92 87 RegionStatus, 93 88 TriggerMonitorRequest, 94 89 TriggerMonitorResponse, 90 + UpdateDNSMonitorRequest, 91 + UpdateDNSMonitorResponse, 92 + UpdateHTTPMonitorRequest, 93 + UpdateHTTPMonitorResponse, 94 + UpdateTCPMonitorRequest, 95 + UpdateTCPMonitorResponse, 95 96 } from "./gen/openstatus/monitor/v1/service_pb.ts"; 96 97 97 98 export { TimeRange } from "./gen/openstatus/monitor/v1/service_pb.ts"; ··· 104 105 105 106 export { CheckResponse_ServingStatus as ServingStatus } from "./gen/openstatus/health/v1/health_pb.ts"; 106 107 108 + // Re-export status report types 109 + export type { 110 + StatusReport, 111 + StatusReportSummary, 112 + StatusReportUpdate, 113 + } from "./gen/openstatus/status_report/v1/status_report_pb.ts"; 114 + 115 + export { StatusReportStatus } from "./gen/openstatus/status_report/v1/status_report_pb.ts"; 116 + 117 + // Re-export status report request/response types 118 + export type { 119 + AddStatusReportUpdateRequest, 120 + AddStatusReportUpdateResponse, 121 + CreateStatusReportRequest, 122 + CreateStatusReportResponse, 123 + DeleteStatusReportRequest, 124 + DeleteStatusReportResponse, 125 + GetStatusReportRequest, 126 + GetStatusReportResponse, 127 + ListStatusReportsRequest, 128 + ListStatusReportsResponse, 129 + UpdateStatusReportRequest, 130 + UpdateStatusReportResponse, 131 + } from "./gen/openstatus/status_report/v1/service_pb.ts"; 132 + 107 133 /** 108 134 * Default OpenStatus API URL. 109 135 */ ··· 161 187 HealthService: Client<typeof HealthService>; 162 188 }; 163 189 }; 190 + /** 191 + * Status report service namespace (v1). 192 + */ 193 + statusReport: { 194 + v1: { 195 + /** 196 + * StatusReportService provides CRUD operations for status reports. 197 + * 198 + * Methods: 199 + * - `createStatusReport` - Create a new status report 200 + * - `getStatusReport` - Get a status report by ID 201 + * - `listStatusReports` - List all status reports 202 + * - `updateStatusReport` - Update a status report 203 + * - `deleteStatusReport` - Delete a status report 204 + * - `addStatusReportUpdate` - Add an update to a status report 205 + */ 206 + StatusReportService: Client<typeof StatusReportService>; 207 + }; 208 + }; 164 209 } 165 210 166 211 /** ··· 196 241 health: { 197 242 v1: { 198 243 HealthService: createClient(HealthService, transport), 244 + }, 245 + }, 246 + statusReport: { 247 + v1: { 248 + StatusReportService: createClient(StatusReportService, transport), 199 249 }, 200 250 }, 201 251 };