Skip to content

Open-source status page, incident response and uptime monitoring

fix: shadcn registry + node sdk docs (#2286)

Colin Ozanneb189491edd49
diff --git a/apps/server/src/routes/rpc/handlers/status-page/converters.ts b/apps/server/src/routes/rpc/handlers/status-page/converters.ts
index 2dbb4bccb..8803c8473 100644
--- a/apps/server/src/routes/rpc/handlers/status-page/converters.ts
+++ b/apps/server/src/routes/rpc/handlers/status-page/converters.ts
@@ -8,6 +8,9 @@ import type {
WebhookChannelHeader,
} from "@openstatus/proto/status_page/v1";
import {
+ ComponentDayStatus,
+ ComponentEventStatus,
+ ComponentEventType,
OverallStatus,
PageAccessType,
PageComponentType,
@@ -184,6 +187,66 @@ export function protoComponentTypeToDb(
}
}
+/**
+ * Convert a resolved per-day component status to proto enum.
+ */
+export function dayStatusToProto(
+ status: "operational" | "degraded" | "down" | "maintenance" | "empty",
+): ComponentDayStatus {
+ switch (status) {
+ case "operational":
+ return ComponentDayStatus.OPERATIONAL;
+ case "degraded":
+ return ComponentDayStatus.DEGRADED;
+ case "down":
+ return ComponentDayStatus.DOWN;
+ case "maintenance":
+ return ComponentDayStatus.MAINTENANCE;
+ case "empty":
+ return ComponentDayStatus.EMPTY;
+ default:
+ return ComponentDayStatus.UNSPECIFIED;
+ }
+}
+
+/**
+ * Convert a timeline event type to proto enum.
+ */
+export function eventTypeToProto(
+ type: "maintenance" | "incident" | "report",
+): ComponentEventType {
+ switch (type) {
+ case "maintenance":
+ return ComponentEventType.MAINTENANCE;
+ case "incident":
+ return ComponentEventType.INCIDENT;
+ case "report":
+ return ComponentEventType.REPORT;
+ default:
+ return ComponentEventType.UNSPECIFIED;
+ }
+}
+
+/**
+ * Convert an event's projected status to proto enum.
+ */
+export function eventStatusToProto(
+ status: "success" | "degraded" | "error" | "info",
+): ComponentEventStatus {
+ switch (status) {
+ case "success":
+ return ComponentEventStatus.OPERATIONAL;
+ case "degraded":
+ return ComponentEventStatus.DEGRADED;
+ case "error":
+ return ComponentEventStatus.DOWN;
+ case "info":
+ return ComponentEventStatus.MAINTENANCE;
+ default:
+ return ComponentEventStatus.UNSPECIFIED;
+ }
+}
+
/**
* Convert DB locale string to proto enum.
*/
diff --git a/apps/server/src/routes/rpc/handlers/status-page/index.ts b/apps/server/src/routes/rpc/handlers/status-page/index.ts
index 3dae69fe5..f16f314e9 100644
--- a/apps/server/src/routes/rpc/handlers/status-page/index.ts
+++ b/apps/server/src/routes/rpc/handlers/status-page/index.ts
@@ -24,7 +24,13 @@ import {
statusReportUpdateToPageComponents,
statusReportsToPageComponents,
} from "@openstatus/db/src/schema";
-import type { StatusPageService } from "@openstatus/proto/status_page/v1";
+import type {
+ ComponentDayBucket,
+ ComponentEvent,
+ GetPageComponentDailySummaryResponse,
+ PageComponentDailySummary,
+ StatusPageService,
+} from "@openstatus/proto/status_page/v1";
import {
OverallStatus,
PageAccessType,
@@ -49,7 +55,10 @@ import {
updatePageLocales,
updatePagePasswordProtection,
} from "@openstatus/services/page";
-import { deletePageComponent } from "@openstatus/services/page-component";
+import {
+ deletePageComponent,
+ getPageComponentDailySummary,
+} from "@openstatus/services/page-component";
import {
createPageSubscriber,
upsertSelfSignupSubscriber,
@@ -59,12 +68,17 @@ import { THEME_KEYS, type ThemeKey } from "@openstatus/theme-store";
import { toConnectError, toServiceCtx } from "../../adapter";
import { getRpcContext } from "../../interceptors";
+import { dbImpactToProto } from "../status-report/converters";
import {
+ dayStatusToProto,
dbComponentToProto,
+ dbComponentTypeToProto,
dbGroupToProto,
dbPageToProto,
dbPageToProtoSummary,
dbSubscriberToProto,
+ eventStatusToProto,
+ eventTypeToProto,
protoAccessTypeToDb,
protoHeadersToPlain,
protoLocaleToDb,
@@ -1653,4 +1667,100 @@ export const statusPageServiceImpl: ServiceImpl<typeof StatusPageService> = {
componentStatuses,
};
},
+
+ async getPageComponentDailySummary(req, ctx) {
+ type PageData = Awaited<ReturnType<typeof getPageById>>;
+ const rpcCtx = getRpcContext(ctx);
+ let pageData: PageData;
+ let identifierValue: string;
+ let isPublicAccess = false;
+
+ if (req.identifier.case === "id") {
+ identifierValue = req.identifier.value;
+ pageData = await getPageById(
+ Number(identifierValue),
+ rpcCtx.workspace.id,
+ );
+ } else if (req.identifier.case === "slug") {
+ identifierValue = req.identifier.value;
+ pageData = await getPageBySlug({ input: { slug: identifierValue } });
+ isPublicAccess = true;
+ } else {
+ throw statusPageIdRequiredError();
+ }
+
+ if (!pageData) {
+ throw statusPageNotFoundError(identifierValue);
+ }
+ if (isPublicAccess) {
+ validatePublicAccess(pageData, identifierValue);
+ }
+
+ try {
+ const result = await getPageComponentDailySummary({
+ ctx: toServiceCtx(rpcCtx),
+ input: {
+ pageId: pageData.id,
+ // scope to the resolved page's workspace, not the caller's — the slug
+ // (public) path may target a page in another workspace
+ workspaceId: pageData.workspaceId,
+ componentIds:
+ req.componentIds.length > 0
+ ? req.componentIds.map(Number)
+ : undefined,
+ days: req.days,
+ },
+ });
+
+ const components = result.components.map(
+ (component): PageComponentDailySummary => ({
+ $typeName: "openstatus.status_page.v1.PageComponentDailySummary",
+ componentId: String(component.componentId),
+ type: dbComponentTypeToProto(component.type),
+ monitorId:
+ component.monitorId != null
+ ? String(component.monitorId)
+ : undefined,
+ name: component.name,
+ buckets: component.buckets.map(
+ (bucket): ComponentDayBucket => ({
+ $typeName: "openstatus.status_page.v1.ComponentDayBucket",
+ day: bucket.day,
+ count: BigInt(bucket.count),
+ ok: BigInt(bucket.ok),
+ degraded: BigInt(bucket.degraded),
+ error: BigInt(bucket.error),
+ status: dayStatusToProto(bucket.status),
+ impact: bucket.impact
+ ? dbImpactToProto(bucket.impact)
+ : undefined,
+ }),
+ ),
+ events: component.events.map(
+ (event): ComponentEvent => ({
+ $typeName: "openstatus.status_page.v1.ComponentEvent",
+ id: String(event.id),
+ name: event.name,
+ type: eventTypeToProto(event.type),
+ status: eventStatusToProto(event.status),
+ from: event.from.toISOString(),
+ to: event.to ? event.to.toISOString() : undefined,
+ impact: event.impact ? dbImpactToProto(event.impact) : undefined,
+ }),
+ ),
+ }),
+ );
+
+ return {
+ $typeName:
+ "openstatus.status_page.v1.GetPageComponentDailySummaryResponse" as const,
+ components,
+ } satisfies GetPageComponentDailySummaryResponse;
+ } catch (err) {
+ if (err instanceof NotFoundError) {
+ throw statusPageNotFoundError(identifierValue);
+ }
+ toConnectError(err);
+ }
+ },
};
diff --git a/apps/server/static/openapi.yaml b/apps/server/static/openapi.yaml
index 64df79e74..820448a71 100644
--- a/apps/server/static/openapi.yaml
+++ b/apps/server/static/openapi.yaml
@@ -2425,6 +2425,122 @@ components:
title: AddStaticComponentResponse
additionalProperties: false
description: AddStaticComponentResponse is the response after adding a static component.
+ openstatus.status_page.v1.ComponentDayBucket:
+ type: object
+ properties:
+ day:
+ type: string
+ title: day
+ description: Day in RFC 3339 format (UTC midnight).
+ count:
+ type:
+ - integer
+ - string
+ title: count
+ format: int64
+ description: Total checks that day.
+ ok:
+ type:
+ - integer
+ - string
+ title: ok
+ format: int64
+ description: Successful checks.
+ degraded:
+ type:
+ - integer
+ - string
+ title: degraded
+ format: int64
+ description: Degraded checks.
+ error:
+ type:
+ - integer
+ - string
+ title: error
+ format: int64
+ description: Failed checks.
+ status:
+ title: status
+ description: Convenience resolved status for the day.
+ $ref: '#/components/schemas/openstatus.status_page.v1.ComponentDayStatus'
+ impact:
+ oneOf:
+ - $ref: '#/components/schemas/openstatus.status_report.v1.PageComponentImpact'
+ - type: "null"
+ title: impact
+ description: Worst status-report impact overlapping the day (absent when none).
+ title: ComponentDayBucket
+ additionalProperties: false
+ description: ComponentDayBucket is one day of status data for a component.
+ openstatus.status_page.v1.ComponentDayStatus:
+ type: string
+ title: ComponentDayStatus
+ enum:
+ - COMPONENT_DAY_STATUS_UNSPECIFIED
+ - COMPONENT_DAY_STATUS_OPERATIONAL
+ - COMPONENT_DAY_STATUS_DEGRADED
+ - COMPONENT_DAY_STATUS_DOWN
+ - COMPONENT_DAY_STATUS_MAINTENANCE
+ - COMPONENT_DAY_STATUS_EMPTY
+ description: ComponentDayStatus is the resolved status of a component on a given day.
+ openstatus.status_page.v1.ComponentEvent:
+ type: object
+ properties:
+ id:
+ type: string
+ title: id
+ description: Identifier of the underlying event.
+ name:
+ type: string
+ title: name
+ description: Human-readable name (incident "Downtime", maintenance / report title).
+ type:
+ title: type
+ description: Kind of event.
+ $ref: '#/components/schemas/openstatus.status_page.v1.ComponentEventType'
+ status:
+ title: status
+ description: Projected status this event contributes.
+ $ref: '#/components/schemas/openstatus.status_page.v1.ComponentEventStatus'
+ from:
+ type: string
+ title: from
+ description: Start time (RFC 3339).
+ to:
+ type:
+ - string
+ - "null"
+ title: to
+ description: End time (RFC 3339); absent while the event is ongoing.
+ impact:
+ oneOf:
+ - $ref: '#/components/schemas/openstatus.status_report.v1.PageComponentImpact'
+ - type: "null"
+ title: impact
+ description: Worst impact over the event (reports only; absent otherwise).
+ title: ComponentEvent
+ additionalProperties: false
+ description: ComponentEvent is a single incident / maintenance / report affecting a component.
+ openstatus.status_page.v1.ComponentEventStatus:
+ type: string
+ title: ComponentEventStatus
+ enum:
+ - COMPONENT_EVENT_STATUS_UNSPECIFIED
+ - COMPONENT_EVENT_STATUS_OPERATIONAL
+ - COMPONENT_EVENT_STATUS_DEGRADED
+ - COMPONENT_EVENT_STATUS_DOWN
+ - COMPONENT_EVENT_STATUS_MAINTENANCE
+ description: ComponentEventStatus is the projected status an event contributes.
+ openstatus.status_page.v1.ComponentEventType:
+ type: string
+ title: ComponentEventType
+ enum:
+ - COMPONENT_EVENT_TYPE_UNSPECIFIED
+ - COMPONENT_EVENT_TYPE_MAINTENANCE
+ - COMPONENT_EVENT_TYPE_INCIDENT
+ - COMPONENT_EVENT_TYPE_REPORT
+ description: ComponentEventType is the kind of timeline event affecting a component.
openstatus.status_page.v1.ComponentStatus:
type: object
properties:
@@ -2735,6 +2851,60 @@ components:
title: GetOverallStatusResponse
additionalProperties: false
description: GetOverallStatusResponse is the response containing the overall status and individual component statuses.
+ openstatus.status_page.v1.GetPageComponentDailySummaryRequest:
+ type: object
+ allOf:
+ - properties:
+ componentIds:
+ type: array
+ items:
+ type: string
+ minLength: 1
+ title: component_ids
+ description: Restrict the result to these component ids (optional, defaults to all components).
+ days:
+ type:
+ - integer
+ - "null"
+ title: days
+ maximum: 45
+ minimum: 1
+ format: int32
+ description: Number of days to return (1-45, defaults to 45 if unspecified).
+ - oneOf:
+ - type: object
+ properties:
+ id:
+ type: string
+ title: id
+ description: ID of the status page.
+ title: id
+ required:
+ - id
+ - type: object
+ properties:
+ slug:
+ type: string
+ title: slug
+ description: Slug of the status page.
+ title: slug
+ required:
+ - slug
+ title: GetPageComponentDailySummaryRequest
+ additionalProperties: false
+ description: GetPageComponentDailySummaryRequest is the request for per-component daily summaries.
+ openstatus.status_page.v1.GetPageComponentDailySummaryResponse:
+ type: object
+ properties:
+ components:
+ type: array
+ items:
+ $ref: '#/components/schemas/openstatus.status_page.v1.PageComponentDailySummary'
+ title: components
+ description: Per-component daily summaries, in page order.
+ title: GetPageComponentDailySummaryResponse
+ additionalProperties: false
+ description: GetPageComponentDailySummaryResponse is the response containing per-component summaries.
openstatus.status_page.v1.GetStatusPageContentRequest:
type: object
oneOf:
@@ -2988,6 +3158,42 @@ components:
title: PageComponent
additionalProperties: false
description: PageComponent represents a component displayed on a status page.
+ openstatus.status_page.v1.PageComponentDailySummary:
+ type: object
+ properties:
+ componentId:
+ type: string
+ title: component_id
+ description: ID of the component.
+ type:
+ title: type
+ description: Component type (monitor or static).
+ $ref: '#/components/schemas/openstatus.status_page.v1.PageComponentType'
+ monitorId:
+ type:
+ - string
+ - "null"
+ title: monitor_id
+ description: Monitor id backing the component (absent for static components).
+ name:
+ type: string
+ title: name
+ description: Display name of the component.
+ buckets:
+ type: array
+ items:
+ $ref: '#/components/schemas/openstatus.status_page.v1.ComponentDayBucket'
+ title: buckets
+ description: Per-day buckets, oldest first.
+ events:
+ type: array
+ items:
+ $ref: '#/components/schemas/openstatus.status_page.v1.ComponentEvent'
+ title: events
+ description: Events affecting the component within the window.
+ title: PageComponentDailySummary
+ additionalProperties: false
+ description: PageComponentDailySummary is the per-day buckets + event timeline for one component.
openstatus.status_page.v1.PageComponentGroup:
type: object
properties:
@@ -5238,6 +5444,58 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/openstatus.status_page.v1.GetOverallStatusResponse'
+ /rpc/openstatus.status_page.v1.StatusPageService/GetPageComponentDailySummary:
+ get:
+ tags:
+ - StatusPageService
+ summary: GetPageComponentDailySummary
+ description: 'Returns per-component daily status buckets (ok/degraded/error/count plus a resolved status) merged with the incident, maintenance, and status-report timeline over the last N days (max 45). Suitable as a single source of truth for status-bar and uptime-calendar rendering. Supports two access paths: by id (authenticated, workspace-scoped) or by slug (public access, requires the page to be published with access_type=PUBLIC).'
+ operationId: StatusPageService_GetPageComponentDailySummary.get
+ parameters:
+ - name: message
+ in: query
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/openstatus.status_page.v1.GetPageComponentDailySummaryRequest'
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/openstatus.status_page.v1.GetPageComponentDailySummaryResponse'
+ post:
+ tags:
+ - StatusPageService
+ summary: GetPageComponentDailySummary
+ description: 'Returns per-component daily status buckets (ok/degraded/error/count plus a resolved status) merged with the incident, maintenance, and status-report timeline over the last N days (max 45). Suitable as a single source of truth for status-bar and uptime-calendar rendering. Supports two access paths: by id (authenticated, workspace-scoped) or by slug (public access, requires the page to be published with access_type=PUBLIC).'
+ operationId: StatusPageService_GetPageComponentDailySummary
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/openstatus.status_page.v1.GetPageComponentDailySummaryRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/openstatus.status_page.v1.GetPageComponentDailySummaryResponse'
/rpc/openstatus.status_page.v1.StatusPageService/GetStatusPage:
get:
tags:
diff --git a/apps/web/src/content/pages/docs/sdk/nodejs/getting-started.mdx b/apps/web/src/content/pages/docs/sdk/nodejs/getting-started.mdx
index c3735f5bd..8fa934e1e 100644
--- a/apps/web/src/content/pages/docs/sdk/nodejs/getting-started.mdx
+++ b/apps/web/src/content/pages/docs/sdk/nodejs/getting-started.mdx
@@ -76,11 +76,41 @@ console.log(`Found ${totalSize} monitors`);
## Runtime Support
-| Runtime | Version | Module Format |
-|---------|---------|---------------|
-| Node.js | 18+ | ESM and CJS |
-| Deno | 2+ | ESM (native) |
-| Bun | Latest | ESM |
+The SDK talks to the API over a fetch-based Connect transport (`@connectrpc/connect-web`), so it runs on any runtime with a global `fetch`:
+
+| Runtime | Version | Module Format |
+|--------------------|---------|---------------|
+| Node.js | 18+ | ESM and CJS |
+| Deno | 2+ | ESM (native) |
+| Bun | Latest | ESM |
+| Cloudflare Workers | — | ESM (edge) |
+
+### Cloudflare Workers and edge runtimes
+
+`@connectrpc/connect-web` sets `redirect: "error"` on every request. Node, Deno, and Bun's `fetch` support that mode, so they need no setup — but Cloudflare Workers (`workerd`) doesn't, so **every** request there fails with `The redirect mode 'error' is not supported`. On Workers, pass a transport with a redirect-normalizing `fetch` (the SDK re-exports `createAuthInterceptor` and the service descriptors for this):
+
+```typescript
+import { createConnectTransport } from "@connectrpc/connect-web";
+import {
+ createAuthInterceptor,
+ createOpenStatusClient,
+} from "@openstatus/sdk-node";
+
+const client = createOpenStatusClient({
+ transport: createConnectTransport({
+ baseUrl: "https://api.openstatus.dev/rpc",
+ interceptors: [createAuthInterceptor(env.OPENSTATUS_API_KEY)],
+ // workerd does not implement fetch's `redirect: "error"`; normalise it.
+ fetch: (input, init) =>
+ fetch(
+ input,
+ init?.redirect === "error" ? { ...init, redirect: "manual" } : init,
+ ),
+ }),
+});
+```
+
+<Aside type="note">When you pass a `transport`, the `apiKey` and `baseUrl` options are ignored — configure authentication on the transport via `createAuthInterceptor`. For full control you can also import the raw service descriptors (`MonitorService`, `StatusPageService`, …) and call `createClient(MonitorService, transport)` from `@connectrpc/connect`.</Aside>
## Full Workflow Example
diff --git a/apps/web/src/content/pages/docs/sdk/nodejs/monitor-service.mdx b/apps/web/src/content/pages/docs/sdk/nodejs/monitor-service.mdx
index fc9277310..2c58f3865 100644
--- a/apps/web/src/content/pages/docs/sdk/nodejs/monitor-service.mdx
+++ b/apps/web/src/content/pages/docs/sdk/nodejs/monitor-service.mdx
@@ -4,7 +4,7 @@ title: Monitor Service
description: "Create and manage HTTP, TCP, and DNS monitors with the openstatus Node.js SDK"
---
-Manage HTTP, TCP, and DNS monitors. The Monitor Service provides 12 RPC methods for creating, updating, listing, triggering, deleting, and querying monitor status and metrics.
+Manage HTTP, TCP, and DNS monitors. The Monitor Service provides 15 RPC methods for creating, updating, listing, triggering, deleting, querying monitor status and metrics, and inspecting HTTP response logs.
All examples assume you have created a client:
@@ -80,7 +80,7 @@ Updates are partial — only include the fields you want to change.
```typescript
const { monitor } = await client.monitor.v1.MonitorService.updateHTTPMonitor({
- id: "mon_123",
+ id: "123456",
monitor: {
name: "Updated API Monitor",
active: false,
@@ -141,7 +141,7 @@ const { monitor } = await client.monitor.v1.MonitorService.createTCPMonitor({
```typescript
const { monitor } = await client.monitor.v1.MonitorService.updateTCPMonitor({
- id: "mon_123",
+ id: "123456",
monitor: {
name: "Updated Database Monitor",
},
@@ -207,7 +207,7 @@ const { monitor } = await client.monitor.v1.MonitorService.createDNSMonitor({
```typescript
const { monitor } = await client.monitor.v1.MonitorService.updateDNSMonitor({
- id: "mon_123",
+ id: "123456",
monitor: {
name: "Updated DNS Check",
},
@@ -261,7 +261,7 @@ Get a single monitor by ID. The response uses a `MonitorConfig` oneof type that
```typescript
const { monitor } = await client.monitor.v1.MonitorService.getMonitor({
- id: "mon_123",
+ id: "123456",
});
if (monitor?.config.case === "http") {
@@ -279,7 +279,7 @@ Trigger an immediate check for a monitor.
```typescript
const { success } = await client.monitor.v1.MonitorService.triggerMonitor({
- id: "mon_123",
+ id: "123456",
});
console.log(`Trigger successful: ${success}`);
@@ -289,7 +289,7 @@ console.log(`Trigger successful: ${success}`);
```typescript
const { success } = await client.monitor.v1.MonitorService.deleteMonitor({
- id: "mon_123",
+ id: "123456",
});
```
@@ -309,7 +309,7 @@ const client = createOpenStatusClient({
});
const { id, regions } = await client.monitor.v1.MonitorService.getMonitorStatus(
- { id: "mon_123" },
+ { id: "123456" },
);
for (const { region, status } of regions) {
@@ -329,7 +329,7 @@ const client = createOpenStatusClient({
});
const summary = await client.monitor.v1.MonitorService.getMonitorSummary({
- id: "mon_123",
+ id: "123456",
timeRange: TimeRange.TIME_RANGE_7D,
regions: [],
});
@@ -346,3 +346,77 @@ console.log(`P99: ${summary.p99}ms`);
```
The latency fields (`p50`, `p75`, `p90`, `p95`, `p99`) and count fields (`totalSuccessful`, `totalDegraded`, `totalFailed`) are `bigint` values. The `regions` parameter is optional — pass an empty array to get metrics across all regions.
+
+`getMonitorSummary` returns a single aggregate over the window and `TimeRange` caps at 14 days. For a per-day series to render status bars, use `getPageComponentDailySummary` on the [Status Page Service](/docs/sdk/nodejs/status-page-service) — it returns per-component daily buckets merged with the incident and maintenance timeline (max 45 days), the single source of truth for the `status-bar` / `status-calendar` registry components. The REST endpoint `GET /v1/monitor/{id}/summary` also exposes a single-monitor daily series (`{ ok, count, day }`).
+
+## List Monitor HTTP Response Logs
+
+List HTTP response logs for a monitor within the 14-day retention window. Supports time-window filtering and offset-based pagination.
+
+<Aside type="caution">Response logs are a paid feature. On the free plan these methods return `permission_denied` ("Upgrade for response logs").</Aside>
+
+```typescript
+import {
+ createOpenStatusClient,
+ HTTPResponseLogRequestStatus,
+ HTTPResponseLogTrigger,
+ Region,
+} from "@openstatus/sdk-node";
+
+const client = createOpenStatusClient({
+ apiKey: process.env.OPENSTATUS_API_KEY,
+});
+
+const { logs, pagination } = await client.monitor.v1.MonitorService
+ .listMonitorHTTPResponseLogs({
+ id: "123456",
+ fromTimestamp: BigInt(Date.now() - 24 * 60 * 60 * 1000),
+ toTimestamp: BigInt(Date.now()),
+ limit: 25,
+ offset: 0,
+ });
+
+for (const log of logs) {
+ console.log(
+ `[${Region[log.region]}] ${log.timestamp}: ` +
+ `${log.statusCode ?? "n/a"} (${log.latency}ms) ` +
+ `status=${HTTPResponseLogRequestStatus[log.requestStatus]} ` +
+ `trigger=${HTTPResponseLogTrigger[log.trigger]}`,
+ );
+}
+
+if (pagination?.hasMore) {
+ console.log(`Next offset: ${pagination.nextOffset}`);
+}
+```
+
+Request parameters:
+
+| Parameter | Type | Description |
+| --------------- | ----------------- | ----------------------------------------------- |
+| `id` | string | Monitor ID (required) |
+| `fromTimestamp` | bigint (optional) | Window start, Unix milliseconds (14d retention) |
+| `toTimestamp` | bigint (optional) | Window end, Unix milliseconds |
+| `limit` | number (optional) | Max results to return (1–100, default 25) |
+| `offset` | number (optional) | Number of results to skip (default 0) |
+
+Each `HTTPResponseLogListItem` includes `id`, `latency`, `statusCode`, `monitorId`, `requestStatus`, `region`, `cronTimestamp`, `trigger`, `timestamp`, and an optional `timing` breakdown (`dns`, `connect`, `tls`, `ttfb`, `transfer`).
+
+## Get Monitor HTTP Response Log
+
+Get full debugging details for a single response log: the requested URL, redacted response headers, error message, and serialized assertions. Same plan gating as above.
+
+```typescript
+const { log } = await client.monitor.v1.MonitorService
+ .getMonitorHTTPResponseLog({
+ id: "123456",
+ logId: "log_456",
+ });
+
+console.log(`URL: ${log?.url}`);
+console.log(`Errored: ${log?.error}`);
+console.log(`Status code: ${log?.log?.statusCode}`);
+console.log(`Assertions: ${log?.assertions ?? "n/a"}`);
+```
+
+The `log.log` field embeds the same `HTTPResponseLogListItem` returned by `listMonitorHTTPResponseLogs`, so timing and classification fields are available alongside the detail fields.
diff --git a/apps/web/src/content/pages/docs/sdk/nodejs/notification-service.mdx b/apps/web/src/content/pages/docs/sdk/nodejs/notification-service.mdx
index 63b717a19..7f368b1b1 100644
--- a/apps/web/src/content/pages/docs/sdk/nodejs/notification-service.mdx
+++ b/apps/web/src/content/pages/docs/sdk/nodejs/notification-service.mdx
@@ -28,7 +28,7 @@ const { notification } = await client.notification.v1.NotificationService
value: { webhookUrl: "https://hooks.slack.com/services/..." },
},
},
- monitorIds: ["mon_123", "mon_456"],
+ monitorIds: ["123456", "123457"],
});
console.log(`Notification created: ${notification?.id}`);
@@ -53,7 +53,7 @@ const { notification } = await client.notification.v1.NotificationService
value: { webhookUrl: "https://hooks.slack.com/services/..." },
},
},
- monitorIds: ["mon_123"],
+ monitorIds: ["123456"],
});
```
@@ -70,7 +70,7 @@ const { notification } = await client.notification.v1.NotificationService
value: { webhookUrl: "https://discord.com/api/webhooks/..." },
},
},
- monitorIds: ["mon_123"],
+ monitorIds: ["123456"],
});
```
@@ -87,7 +87,7 @@ const { notification } = await client.notification.v1.NotificationService
value: { email: "[email protected]" },
},
},
- monitorIds: ["mon_123"],
+ monitorIds: ["123456"],
});
```
@@ -104,7 +104,7 @@ const { notification } = await client.notification.v1.NotificationService
value: { integrationKey: "your-integration-key" },
},
},
- monitorIds: ["mon_123"],
+ monitorIds: ["123456"],
});
```
@@ -123,7 +123,7 @@ const { notification } = await client.notification.v1.NotificationService
value: { apiKey: "your-api-key", region: OpsgenieRegion.US },
},
},
- monitorIds: ["mon_123"],
+ monitorIds: ["123456"],
});
```
@@ -140,7 +140,7 @@ const { notification } = await client.notification.v1.NotificationService
value: { chatId: "123456789" },
},
},
- monitorIds: ["mon_123"],
+ monitorIds: ["123456"],
});
```
@@ -157,7 +157,7 @@ const { notification } = await client.notification.v1.NotificationService
value: { webhookUrl: "https://chat.googleapis.com/v1/spaces/..." },
},
},
- monitorIds: ["mon_123"],
+ monitorIds: ["123456"],
});
```
@@ -174,7 +174,7 @@ const { notification } = await client.notification.v1.NotificationService
value: { webhookUrl: "https://oncall.example.com/..." },
},
},
- monitorIds: ["mon_123"],
+ monitorIds: ["123456"],
});
```
@@ -195,7 +195,7 @@ const { notification } = await client.notification.v1.NotificationService
},
},
},
- monitorIds: ["mon_123"],
+ monitorIds: ["123456"],
});
```
@@ -212,7 +212,7 @@ const { notification } = await client.notification.v1.NotificationService
value: { phoneNumber: "+1234567890" },
},
},
- monitorIds: ["mon_123"],
+ monitorIds: ["123456"],
});
```
@@ -229,7 +229,7 @@ const { notification } = await client.notification.v1.NotificationService
value: { phoneNumber: "+1234567890" },
},
},
- monitorIds: ["mon_123"],
+ monitorIds: ["123456"],
});
```
@@ -252,7 +252,7 @@ const { notification } = await client.notification.v1.NotificationService
},
},
},
- monitorIds: ["mon_123"],
+ monitorIds: ["123456"],
});
```
@@ -327,7 +327,7 @@ const { notification } = await client.notification.v1.NotificationService
.updateNotification({
id: "notif_123",
name: "Updated Slack Alerts",
- monitorIds: ["mon_123", "mon_456", "mon_789"],
+ monitorIds: ["123456", "123457", "123458"],
});
```
diff --git a/apps/web/src/content/pages/docs/sdk/nodejs/status-page-service.mdx b/apps/web/src/content/pages/docs/sdk/nodejs/status-page-service.mdx
index 77246cd3b..4cd93d3d8 100644
--- a/apps/web/src/content/pages/docs/sdk/nodejs/status-page-service.mdx
+++ b/apps/web/src/content/pages/docs/sdk/nodejs/status-page-service.mdx
@@ -4,7 +4,7 @@ title: Status Page Service
description: "Manage status pages, components, groups, and subscribers with the openstatus Node.js SDK"
---
-Manage status pages, components, component groups, and subscribers. The Status Page Service provides 17 RPC methods.
+Manage status pages, components, component groups, and subscribers. The Status Page Service provides 18 RPC methods.
## Status Page CRUD
@@ -67,7 +67,7 @@ Components represent individual services on a status page. They can be linked to
const { component } = await client.statusPage.v1.StatusPageService
.addMonitorComponent({
pageId: "page_123",
- monitorId: "mon_456",
+ monitorId: "123457",
name: "API Server",
description: "Main API endpoint",
order: 1,
@@ -223,3 +223,54 @@ for (const { componentId, status } of componentStatuses) {
console.log(` ${componentId}: ${OverallStatus[status]}`);
}
```
+
+## Get Page Component Daily Summary
+
+Get per-component daily uptime buckets merged with the incident, maintenance, and status-report timeline over the last N days (max 45). This is the single source of truth for rendering per-component status bars and uptime calendars: each component carries gap-filled daily `buckets` (with a resolved `status`) plus the `events` affecting it. Identify the page by ID or slug; optionally restrict to specific `componentIds`.
+
+```typescript
+import {
+ ComponentDayStatus,
+ createOpenStatusClient,
+} from "@openstatus/sdk-node";
+
+const client = createOpenStatusClient({
+ apiKey: process.env.OPENSTATUS_API_KEY,
+});
+
+const { components } = await client.statusPage.v1.StatusPageService
+ .getPageComponentDailySummary({
+ identifier: { case: "slug", value: "my-service" },
+ days: 45,
+ });
+
+for (const component of components) {
+ console.log(`${component.name} (${component.componentId})`);
+ for (const bucket of component.buckets) {
+ console.log(
+ ` ${bucket.day}: ${ComponentDayStatus[bucket.status]} ` +
+ `(${bucket.ok}/${bucket.count} ok)`,
+ );
+ }
+ for (const event of component.events) {
+ console.log(
+ ` event: ${event.name} (${event.from} → ${event.to ?? "ongoing"})`,
+ );
+ }
+}
+```
+
+Request parameters:
+
+| Parameter | Type | Description |
+| -------------- | ------------------- | ---------------------------------------------------------- |
+| `identifier` | oneof id \| slug | Page id (workspace-scoped) or slug (published public page) |
+| `componentIds` | string[] (optional) | Restrict to these component ids (default: all components) |
+| `days` | number (optional) | Days to return (1–45, default 45; values >45 reject) |
+
+Each component returns gap-filled `buckets` (one per day in the window, oldest first) and `events`:
+
+- **`buckets[]`** — `day` (RFC 3339, UTC midnight), the `bigint` counts `count` / `ok` / `degraded` / `error`, a resolved `status` (`ComponentDayStatus`: operational / degraded / down / maintenance / empty), and an optional `impact` (`PageComponentImpact`) for the worst status-report impact that day. Monitor-backed components carry real counts; static components have empty buckets.
+- **`events[]`** — `id`, `name`, `type` (`ComponentEventType`: maintenance / incident / report), a projected `status` (`ComponentEventStatus`), `from` / `to` (RFC 3339; `to` absent while ongoing), and an optional `impact` for report events.
+
+<Aside type="note">Like every RPC, this requires an API key. The slug path additionally requires the page to be published with public access — it is not anonymous.</Aside>
diff --git a/apps/web/src/content/pages/docs/sdk/nodejs/typescript-tips.mdx b/apps/web/src/content/pages/docs/sdk/nodejs/typescript-tips.mdx
index 9cb125c6c..016f5d657 100644
--- a/apps/web/src/content/pages/docs/sdk/nodejs/typescript-tips.mdx
+++ b/apps/web/src/content/pages/docs/sdk/nodejs/typescript-tips.mdx
@@ -35,7 +35,7 @@ Reading bigint values:
```typescript
const summary = await client.monitor.v1.MonitorService.getMonitorSummary({
- id: "mon_123",
+ id: "123456",
timeRange: TimeRange.TIME_RANGE_7D,
regions: [],
});
@@ -53,7 +53,7 @@ Several responses use protobuf `oneof` fields, which map to discriminated unions
```typescript
const { monitor } = await client.monitor.v1.MonitorService.getMonitor({
- id: "mon_123",
+ id: "123456",
});
switch (monitor?.config.case) {
diff --git a/apps/web/src/content/pages/unrelated/registry.mdx b/apps/web/src/content/pages/unrelated/registry.mdx
index 000003329..ed00d6503 100644
--- a/apps/web/src/content/pages/unrelated/registry.mdx
+++ b/apps/web/src/content/pages/unrelated/registry.mdx
@@ -39,6 +39,8 @@ View the [GitHub source code](https://github.com/openstatusHQ/openstatus/tree/ma
## Installation
+> **Prerequisites:** these components target an initialised **shadcn project on Tailwind CSS v4**. If you're starting from scratch (Astro, Vite, etc.), run `shadcn init` first — it creates `components.json`, the `@/*` path alias, and your Tailwind v4 CSS entry. Tested with the latest shadcn CLI (`shadcn@latest`).
+
Install any component with a single [shadcn CLI](https://ui.shadcn.com/docs/cli) command:
```bash
@@ -62,12 +64,14 @@ pnpm dlx shadcn@latest add @openstatus/status-complete
Components are organized by functionality:
- **Collections:** `status-complete` (everything — body + chrome), `status-essentials` (body subset), `status-chrome` (header + footer + switchers + status-updates) - Full status page bundles
-- **Body Blocks:** `status-banner`, `status-bar`, `status-feed`, `status-events`, `status-component`, `status-component-group`, `status-blank`, `status-icon`, `status-layout`, `status-timestamp` - Individual components for the page body
+- **Body Blocks:** `status-banner`, `status-bar`, `status-calendar`, `status-feed`, `status-events`, `status-component`, `status-component-group`, `status-blank`, `status-icon`, `status-layout`, `status-timestamp` - Individual components for the page body
- **Chrome Blocks:** `status-page-shell`, `status-page-header`, `status-page-footer`, `status-page-get-in-touch`, `status-updates`, `status-theme-switcher`, `status-locale-switcher` - Header, footer, and surrounding chrome for a full status page
- **i18n:** `status-i18n` - Optional context provider + hook for translated labels and locale-aware date formatters (auto-installed as a dependency of the blocks above)
Explore the full registry at [openstatus.dev/r/registry.json](https://openstatus.dev/r/registry.json)
+> **Tip:** `status-complete` installs every feature and pulls extra dependencies (`next-themes`, `sonner`, `react-day-picker`, `@date-fns/utc`). If you only need the page body, `status-essentials` is the lighter entry point.
+
### Localization
Blocks ship with English (`en-US`) defaults and require zero setup. To localize, mount `<StatusBlocksI18nProvider>` near your app root and pass a `StatusBlocksLabels` value (translated strings + locale-aware date formatters built from your own i18n library — `next-intl`, `react-intl`, or whatever you use). Blocks read labels via `useStatusBlocksLabels()`; if no provider is mounted, they fall back to `defaultStatusBlocksLabels`.
diff --git a/packages/api/src/router/statusPage.utils.ts b/packages/api/src/router/statusPage.utils.ts
index 9f541058b..6e7534f0a 100644
--- a/packages/api/src/router/statusPage.utils.ts
+++ b/packages/api/src/router/statusPage.utils.ts
@@ -1,439 +1,21 @@
-import type {
- Incident,
- Maintenance,
- PageComponent,
- PageComponentImpact,
- PageComponentType,
- PageComponentWithMonitorRelation,
- StatusReport,
- StatusReportUpdate,
-} from "@openstatus/db/src/schema";
+import type { PageComponentImpact } from "@openstatus/db/src/schema";
import {
LEGACY_IMPACT_WEIGHT,
- currentImpactsFromUpdates,
impactToStatusType,
impactUptimeWeight,
worstImpact,
} from "@openstatus/db/src/schema";
+import {
+ type Event,
+ type StatusData,
+ getHighestPriorityStatus,
+ getWorstVariant,
+ isDateWithinEvent,
+ reportEventDayImpact,
+ reportEventDayStatus,
+} from "@openstatus/services/status-timeline";
-/**
- * Type for a monitor component with a non-null monitor relation
- */
-export type MonitorComponentWithNonNullMonitor =
- PageComponentWithMonitorRelation & {
- type: "monitor";
- monitorId: number;
- monitor: NonNullable<PageComponentWithMonitorRelation["monitor"]>;
- };
-
-/**
- * Type guard to check if a pageComponent is a monitor type with a monitor relation
- * Works with any object that has the shape of a pageComponent with a valid monitor relation
- */
-export function isMonitorComponent(
- component: PageComponentWithMonitorRelation,
-): component is MonitorComponentWithNonNullMonitor {
- return (
- component.type === "monitor" &&
- component.monitor !== null &&
- component.monitor !== undefined &&
- component.monitor.active === true &&
- component.monitor.deletedAt === null
- );
-}
-
-export type StatusData = {
- day: string;
- count: number;
- ok: number;
- degraded: number;
- error: number;
- monitorId: string;
-};
-
-export function fillStatusDataFor45Days(
- data: Array<StatusData>,
- monitorId: string,
- lookbackPeriod = 45,
-): Array<StatusData> {
- const result = [];
- const dataByDay = new Map();
-
- // Index existing data by day
- data.forEach((item) => {
- const dayKey = new Date(item.day).toISOString().split("T")[0]; // YYYY-MM-DD format
- dataByDay.set(dayKey, item);
- });
-
- // Generate all 45 days from today backwards
- const now = new Date();
- for (let i = 0; i < lookbackPeriod; i++) {
- const date = new Date(now);
- date.setUTCDate(date.getUTCDate() - i);
- date.setUTCHours(0, 0, 0, 0); // Set to start of day in UTC
-
- const dayKey = date.toISOString().split("T")[0]; // YYYY-MM-DD format
- const isoString = date.toISOString();
-
- if (dataByDay.has(dayKey)) {
- // Use existing data but ensure the day is properly formatted
- const existingData = dataByDay.get(dayKey);
- result.push({
- ...existingData,
- day: isoString,
- });
- } else {
- // Fill missing day with default values
- result.push({
- day: isoString,
- count: 0,
- ok: 0,
- degraded: 0,
- error: 0,
- monitorId,
- });
- }
- }
-
- // Sort by day (oldest first)
- return result.sort(
- (a, b) => new Date(a.day).getTime() - new Date(b.day).getTime(),
- );
-}
-
-export function fillStatusDataFor45DaysNoop({
- errorDays,
- degradedDays,
- lookbackPeriod = 45,
-}: {
- errorDays: number[];
- degradedDays: number[];
- lookbackPeriod?: number;
-}): Array<StatusData> {
- const issueDays = [...errorDays, ...degradedDays];
- const data: StatusData[] = Array.from({ length: 45 }, (_, i) => {
- return {
- day: new Date(new Date().setDate(new Date().getDate() - i)).toISOString(),
- count: 1,
- ok: issueDays.includes(i) ? 0 : 1,
- degraded: degradedDays.includes(i) ? 1 : 0,
- error: errorDays.includes(i) ? 1 : 0,
- monitorId: "1",
- };
- });
- return fillStatusDataFor45Days(data, "1", lookbackPeriod);
-}
-
-export type ImpactInterval = {
- from: Date;
- to: Date | null; // null = still active
- impact: PageComponentImpact;
-};
-
-export type StatusReportUpdateWithImpactRows = StatusReportUpdate & {
- statusReportUpdateToPageComponents?: {
- pageComponentId: number;
- impact: PageComponentImpact;
- }[];
-};
-
-type Event = {
- id: number;
- name: string;
- from: Date;
- to: Date | null;
- type: "maintenance" | "incident" | "report";
- status: "success" | "degraded" | "error" | "info";
- // absent ⇒ legacy report (no impact rows): orange bar, full-duration downtime
- impactIntervals?: ImpactInterval[];
-};
-
-// per component: change points across the report's updates
-function buildComponentImpactIntervals(
- updates: StatusReportUpdateWithImpactRows[],
-): Map<number, ImpactInterval[]> {
- // closing the last open interval relies on ascending order; don't trust callers
- const sorted = [...updates].sort(
- (a, b) => a.date.getTime() - b.date.getTime() || a.id - b.id,
- );
- const byComponent = new Map<number, ImpactInterval[]>();
- for (const update of sorted) {
- for (const row of update.statusReportUpdateToPageComponents ?? []) {
- const intervals = byComponent.get(row.pageComponentId) ?? [];
- const last = intervals[intervals.length - 1];
- if (last && last.to === null) last.to = update.date;
- intervals.push({ from: update.date, to: null, impact: row.impact });
- byComponent.set(row.pageComponentId, intervals);
- }
- }
- return byComponent;
-}
-
-// page-level projection: worst impact across components per time slice
-function mergeWorstImpactIntervals(
- perComponent: ImpactInterval[][],
-): ImpactInterval[] {
- const all = perComponent.flat();
- if (all.length === 0) return [];
-
- const boundaries = [...new Set(all.map((iv) => iv.from.getTime()))].sort(
- (a, b) => a - b,
- );
-
- const merged: ImpactInterval[] = [];
- for (let i = 0; i < boundaries.length; i++) {
- const sliceStart = boundaries[i];
- const sliceEnd = i + 1 < boundaries.length ? boundaries[i + 1] : null;
- const active = all.filter(
- (iv) =>
- iv.from.getTime() <= sliceStart &&
- (iv.to === null || iv.to.getTime() > sliceStart),
- );
- if (active.length === 0) continue;
- const impact = worstImpact(active.map((iv) => iv.impact));
- const last = merged[merged.length - 1];
- if (
- last &&
- last.impact === impact &&
- last.to !== null &&
- last.to.getTime() === sliceStart
- ) {
- last.to = sliceEnd === null ? null : new Date(sliceEnd);
- } else {
- merged.push({
- from: new Date(sliceStart),
- to: sliceEnd === null ? null : new Date(sliceEnd),
- impact,
- });
- }
- }
- return merged;
-}
-
-// keep impact downtime inside the event window the rest of the math uses
-function clampOpenIntervals(
- intervals: ImpactInterval[] | undefined,
- to: Date | null,
-): ImpactInterval[] | undefined {
- if (!intervals || to === null) return intervals;
- return intervals.map((iv) => (iv.to === null ? { ...iv, to } : iv));
-}
-
-/**
- * Current impact per component: the latest update (by date, ties by id) that
- * names it wins. Empty map ⇒ legacy report.
- */
-export function currentImpactByComponent(report: {
- statusReportUpdates: StatusReportUpdateWithImpactRows[];
-}): Map<number, PageComponentImpact> {
- return currentImpactsFromUpdates(
- report.statusReportUpdates.map((u) => ({
- id: u.id,
- date: u.date,
- componentImpacts: u.statusReportUpdateToPageComponents ?? [],
- })),
- );
-}
-
-/**
- * Worst status among still-active report events. "success"-status reports
- * (everything operational for this projection) don't flag the component.
- */
-export function activeReportStatus(
- events: Event[],
-): "error" | "degraded" | undefined {
- let worst: "error" | "degraded" | undefined;
- for (const e of events) {
- if (e.type !== "report" || e.to) continue;
- if (e.status === "error") return "error";
- if (e.status !== "success") worst = "degraded";
- }
- return worst;
-}
-
-export function getEvents({
- maintenances,
- incidents,
- reports,
- pageComponentId,
- monitorId,
- componentType,
- pastDays = 45,
-}: {
- maintenances: (Maintenance & {
- maintenancesToPageComponents: {
- pageComponent: PageComponent | null;
- }[];
- })[];
- incidents: Incident[];
- reports: (StatusReport & {
- statusReportsToPageComponents: {
- pageComponent: PageComponent | null;
- }[];
- statusReportUpdates: StatusReportUpdateWithImpactRows[];
- })[];
- pageComponentId?: number;
- monitorId?: number;
- componentType?: PageComponentType;
- pastDays?: number;
-}): Event[] {
- const events: Event[] = [];
- const pastThreshod = new Date();
- pastThreshod.setDate(pastThreshod.getDate() - pastDays);
-
- // Filter maintenances - prioritize pageComponentId, fallback to monitorId for backward compatibility
- maintenances
- .filter((maintenance) => {
- if (pageComponentId) {
- return maintenance.maintenancesToPageComponents.some(
- (m) => m.pageComponent?.id === pageComponentId,
- );
- }
- if (monitorId) {
- return maintenance.maintenancesToPageComponents.some(
- (m) => m.pageComponent?.monitorId === monitorId,
- );
- }
- return true;
- })
- .forEach((maintenance) => {
- if (maintenance.from < pastThreshod) return;
- events.push({
- id: maintenance.id,
- name: maintenance.title,
- from: maintenance.from,
- to: maintenance.to,
- type: "maintenance",
- status: "info" as const,
- });
- });
-
- // Filter incidents - only for monitor-type components
- // Static components don't have incidents
- if (componentType !== "static") {
- incidents
- .filter((incident) =>
- monitorId ? incident.monitorId === monitorId : true,
- )
- .forEach((incident) => {
- if (!incident.createdAt || incident.createdAt < pastThreshod) return;
- events.push({
- id: incident.id,
- name: "Downtime",
- from: incident.createdAt,
- to: incident.resolvedAt,
- type: "incident",
- status: "error" as const,
- });
- });
- }
-
- // Filter reports - prioritize pageComponentId, fallback to monitorId for backward compatibility
- reports
- .filter((report) => {
- if (pageComponentId) {
- return report.statusReportsToPageComponents.some(
- (r) => r.pageComponent?.id === pageComponentId,
- );
- }
- if (monitorId) {
- return report.statusReportsToPageComponents.some(
- (r) => r.pageComponent?.monitorId === monitorId,
- );
- }
- return true;
- })
- .map((report) => {
- const updates = [...report.statusReportUpdates].sort(
- (a, b) => a.date.getTime() - b.date.getTime() || a.id - b.id,
- );
- if (updates.length === 0) return;
-
- const firstUpdate = updates[0];
- const lastUpdate = updates[updates.length - 1];
-
- // NOTE: we don't check threshold here because we display all unresolved reports
- if (!firstUpdate?.date) return;
-
- const componentIntervals = buildComponentImpactIntervals(updates);
- const hasImpacts = componentIntervals.size > 0;
-
- const targetComponentId =
- pageComponentId ??
- (monitorId
- ? report.statusReportsToPageComponents.find(
- (r) => r.pageComponent?.monitorId === monitorId,
- )?.pageComponent?.id
- : undefined);
-
- // per-component view projects that component's timeline; page-level
- // takes the worst impact across components per time slice
- let impactIntervals: ImpactInterval[] | undefined;
- if (hasImpacts) {
- impactIntervals =
- targetComponentId !== undefined
- ? (componentIntervals.get(targetComponentId) ?? [])
- : mergeWorstImpactIntervals([...componentIntervals.values()]);
- }
-
- // HACKY: LEGACY: we shouldn't have report.status anymore and instead use the update status for that.
- if (report.status === "resolved") {
- const to = lastUpdate?.date ?? null;
- events.push({
- id: report.id,
- name: report.title,
- from: firstUpdate?.date,
- to,
- type: "report",
- status: "success" as const,
- impactIntervals: clampOpenIntervals(impactIntervals, to),
- });
- return;
- }
-
- const to =
- lastUpdate?.status === "resolved" || lastUpdate?.status === "monitoring"
- ? lastUpdate?.date
- : null;
-
- // derived from the open (current) impacts; legacy stays flat orange.
- // No open non-operational interval — including the empty-projection
- // case (component never named by any update) — reads "success" BY
- // DESIGN: an open report whose impacts are all cleared no longer
- // flags the component, even before the report is formally resolved.
- const openImpacts = (impactIntervals ?? [])
- .filter((iv) => iv.to === null)
- .map((iv) => iv.impact);
- const status = hasImpacts
- ? impactToStatusType(worstImpact(openImpacts))
- : ("degraded" as const);
-
- events.push({
- id: report.id,
- name: report.title,
- from: firstUpdate?.date,
- to,
- type: "report",
- status,
- impactIntervals: clampOpenIntervals(impactIntervals, to),
- });
- });
-
- return events;
-}
-
-// Keep the old function name for backward compatibility
-export const getEventsByMonitorId = getEvents;
-
-export function getWorstVariant<T extends keyof typeof STATUS_PRIORITY>(
- statuses: T[],
-): T | "success" {
- return statuses.reduce<T | "success">(
- (worst, current) =>
- STATUS_PRIORITY[current] > STATUS_PRIORITY[worst] ? current : worst,
- "success",
- );
-}
+export * from "@openstatus/services/status-timeline";
type UptimeData = {
day: string;
@@ -450,30 +32,10 @@ type UptimeData = {
}[];
};
-// Priority mapping for status types (higher number = higher priority)
-const STATUS_PRIORITY = {
- error: 3,
- degraded: 2,
- info: 1,
- success: 0,
- empty: -1,
-} as const;
-
// Constants for time calculations
const MILLISECONDS_PER_DAY = 24 * 60 * 60 * 1000;
const MILLISECONDS_PER_MINUTE = 1000 * 60;
-// Helper to get highest priority status from data
-function getHighestPriorityStatus(
- item: StatusData,
-): keyof typeof STATUS_PRIORITY {
- if (item.error > 0) return "error";
- if (item.degraded > 0) return "degraded";
- if (item.ok > 0) return "success";
-
- return "empty";
-}
-
// Helper to format numbers
function formatNumber(num: number): string {
if (num >= 1000000) return `${(num / 1000000).toFixed(1)}M`;
@@ -500,54 +62,6 @@ function formatDuration(minutes: number): string {
return `${hours}h ${remainingMinutes}m`;
}
-// worst report impact for one day; null = legacy event (no impact rows)
-function reportEventDayImpact(
- event: Event,
- date: Date,
-): PageComponentImpact | null {
- if (!event.impactIntervals) return null;
-
- const startOfDay = new Date(date);
- startOfDay.setUTCHours(0, 0, 0, 0);
- const endOfDay = new Date(date);
- endOfDay.setUTCHours(23, 59, 59, 999);
-
- const overlapping = event.impactIntervals.filter((iv) => {
- const end = iv.to ?? new Date();
- return (
- iv.from.getTime() <= endOfDay.getTime() &&
- end.getTime() >= startOfDay.getTime()
- );
- });
- return worstImpact(overlapping.map((iv) => iv.impact));
-}
-
-// worst projected report color for one day; legacy events stay orange
-function reportEventDayStatus(
- event: Event,
- date: Date,
-): "success" | "degraded" | "error" {
- const impact = reportEventDayImpact(event, date);
- return impact === null ? "degraded" : impactToStatusType(impact);
-}
-
-// Helper to check if date is within event range
-function isDateWithinEvent(date: Date, event: Event): boolean {
- const startOfDay = new Date(date);
- startOfDay.setUTCHours(0, 0, 0, 0);
-
- const endOfDay = new Date(date);
- endOfDay.setUTCHours(23, 59, 59, 999);
-
- const eventStart = new Date(event.from);
- const eventEnd = event.to ? new Date(event.to) : new Date();
-
- return (
- eventStart.getTime() <= endOfDay.getTime() &&
- eventEnd.getTime() >= startOfDay.getTime()
- );
-}
-
// Helper to calculate total minutes in a day (handles today vs past days)
function getTotalMinutesInDay(date: Date): number {
const now = new Date();
diff --git a/packages/proto/api/openstatus/status_page/v1/service.proto b/packages/proto/api/openstatus/status_page/v1/service.proto
index 1974abfcd..bd5eb70da 100644
--- a/packages/proto/api/openstatus/status_page/v1/service.proto
+++ b/packages/proto/api/openstatus/status_page/v1/service.proto
@@ -110,6 +110,16 @@ service StatusPageService {
description: "Returns the overall status of a status page along with individual component statuses. The overall status is computed from active status reports and maintenances with the following priority: degraded (from active status reports) > maintenance (from active maintenance windows) > operational."
};
}
+
+ // GetPageComponentDailySummary returns per-component daily uptime buckets merged
+ // with the incident / maintenance / report timeline — the single source of truth
+ // for rendering per-component status bars and uptime calendars.
+ rpc GetPageComponentDailySummary(GetPageComponentDailySummaryRequest) returns (GetPageComponentDailySummaryResponse) {
+ option idempotency_level = NO_SIDE_EFFECTS;
+ option (gnostic.openapi.v3.operation) = {
+ description: "Returns per-component daily status buckets (ok/degraded/error/count plus a resolved status) merged with the incident, maintenance, and status-report timeline over the last N days (max 45). Suitable as a single source of truth for status-bar and uptime-calendar rendering. Supports two access paths: by id (authenticated, workspace-scoped) or by slug (public access, requires the page to be published with access_type=PUBLIC)."
+ };
+ }
}
// =============================================================================
@@ -632,3 +642,116 @@ message GetOverallStatusResponse {
// Status of individual components.
repeated ComponentStatus component_statuses = 2;
}
+
+// =============================================================================
+// Per-Component Daily Summary Messages
+// =============================================================================
+
+// GetPageComponentDailySummaryRequest is the request for per-component daily summaries.
+message GetPageComponentDailySummaryRequest {
+ // Identifier for the status page (either id or slug).
+ oneof identifier {
+ // ID of the status page.
+ string id = 1;
+ // Slug of the status page.
+ string slug = 2;
+ }
+
+ // Restrict the result to these component ids (optional, defaults to all components).
+ repeated string component_ids = 3 [(buf.validate.field).repeated = {
+ items: {
+ string: {min_len: 1}
+ }
+ }];
+
+ // Number of days to return (1-45, defaults to 45 if unspecified).
+ optional int32 days = 4 [(buf.validate.field).int32 = {
+ gte: 1
+ lte: 45
+ }];
+}
+
+// ComponentDayStatus is the resolved status of a component on a given day.
+enum ComponentDayStatus {
+ COMPONENT_DAY_STATUS_UNSPECIFIED = 0;
+ COMPONENT_DAY_STATUS_OPERATIONAL = 1;
+ COMPONENT_DAY_STATUS_DEGRADED = 2;
+ COMPONENT_DAY_STATUS_DOWN = 3;
+ COMPONENT_DAY_STATUS_MAINTENANCE = 4;
+ COMPONENT_DAY_STATUS_EMPTY = 5;
+}
+
+// ComponentEventType is the kind of timeline event affecting a component.
+enum ComponentEventType {
+ COMPONENT_EVENT_TYPE_UNSPECIFIED = 0;
+ COMPONENT_EVENT_TYPE_MAINTENANCE = 1;
+ COMPONENT_EVENT_TYPE_INCIDENT = 2;
+ COMPONENT_EVENT_TYPE_REPORT = 3;
+}
+
+// ComponentEventStatus is the projected status an event contributes.
+enum ComponentEventStatus {
+ COMPONENT_EVENT_STATUS_UNSPECIFIED = 0;
+ COMPONENT_EVENT_STATUS_OPERATIONAL = 1;
+ COMPONENT_EVENT_STATUS_DEGRADED = 2;
+ COMPONENT_EVENT_STATUS_DOWN = 3;
+ COMPONENT_EVENT_STATUS_MAINTENANCE = 4;
+}
+
+// ComponentDayBucket is one day of status data for a component.
+message ComponentDayBucket {
+ // Day in RFC 3339 format (UTC midnight).
+ string day = 1;
+ // Total checks that day.
+ int64 count = 2;
+ // Successful checks.
+ int64 ok = 3;
+ // Degraded checks.
+ int64 degraded = 4;
+ // Failed checks.
+ int64 error = 5;
+ // Convenience resolved status for the day.
+ ComponentDayStatus status = 6;
+ // Worst status-report impact overlapping the day (absent when none).
+ optional openstatus.status_report.v1.PageComponentImpact impact = 7;
+}
+
+// ComponentEvent is a single incident / maintenance / report affecting a component.
+message ComponentEvent {
+ // Identifier of the underlying event.
+ string id = 1;
+ // Human-readable name (incident "Downtime", maintenance / report title).
+ string name = 2;
+ // Kind of event.
+ ComponentEventType type = 3;
+ // Projected status this event contributes.
+ ComponentEventStatus status = 4;
+ // Start time (RFC 3339).
+ string from = 5;
+ // End time (RFC 3339); absent while the event is ongoing.
+ optional string to = 6;
+ // Worst impact over the event (reports only; absent otherwise).
+ optional openstatus.status_report.v1.PageComponentImpact impact = 7;
+}
+
+// PageComponentDailySummary is the per-day buckets + event timeline for one component.
+message PageComponentDailySummary {
+ // ID of the component.
+ string component_id = 1;
+ // Component type (monitor or static).
+ PageComponentType type = 2;
+ // Monitor id backing the component (absent for static components).
+ optional string monitor_id = 3;
+ // Display name of the component.
+ string name = 4;
+ // Per-day buckets, oldest first.
+ repeated ComponentDayBucket buckets = 5;
+ // Events affecting the component within the window.
+ repeated ComponentEvent events = 6;
+}
+
+// GetPageComponentDailySummaryResponse is the response containing per-component summaries.
+message GetPageComponentDailySummaryResponse {
+ // Per-component daily summaries, in page order.
+ repeated PageComponentDailySummary components = 1;
+}
diff --git a/packages/proto/gen/openapi.yaml b/packages/proto/gen/openapi.yaml
index 64df79e74..820448a71 100644
--- a/packages/proto/gen/openapi.yaml
+++ b/packages/proto/gen/openapi.yaml
@@ -2425,6 +2425,122 @@ components:
title: AddStaticComponentResponse
additionalProperties: false
description: AddStaticComponentResponse is the response after adding a static component.
+ openstatus.status_page.v1.ComponentDayBucket:
+ type: object
+ properties:
+ day:
+ type: string
+ title: day
+ description: Day in RFC 3339 format (UTC midnight).
+ count:
+ type:
+ - integer
+ - string
+ title: count
+ format: int64
+ description: Total checks that day.
+ ok:
+ type:
+ - integer
+ - string
+ title: ok
+ format: int64
+ description: Successful checks.
+ degraded:
+ type:
+ - integer
+ - string
+ title: degraded
+ format: int64
+ description: Degraded checks.
+ error:
+ type:
+ - integer
+ - string
+ title: error
+ format: int64
+ description: Failed checks.
+ status:
+ title: status
+ description: Convenience resolved status for the day.
+ $ref: '#/components/schemas/openstatus.status_page.v1.ComponentDayStatus'
+ impact:
+ oneOf:
+ - $ref: '#/components/schemas/openstatus.status_report.v1.PageComponentImpact'
+ - type: "null"
+ title: impact
+ description: Worst status-report impact overlapping the day (absent when none).
+ title: ComponentDayBucket
+ additionalProperties: false
+ description: ComponentDayBucket is one day of status data for a component.
+ openstatus.status_page.v1.ComponentDayStatus:
+ type: string
+ title: ComponentDayStatus
+ enum:
+ - COMPONENT_DAY_STATUS_UNSPECIFIED
+ - COMPONENT_DAY_STATUS_OPERATIONAL
+ - COMPONENT_DAY_STATUS_DEGRADED
+ - COMPONENT_DAY_STATUS_DOWN
+ - COMPONENT_DAY_STATUS_MAINTENANCE
+ - COMPONENT_DAY_STATUS_EMPTY
+ description: ComponentDayStatus is the resolved status of a component on a given day.
+ openstatus.status_page.v1.ComponentEvent:
+ type: object
+ properties:
+ id:
+ type: string
+ title: id
+ description: Identifier of the underlying event.
+ name:
+ type: string
+ title: name
+ description: Human-readable name (incident "Downtime", maintenance / report title).
+ type:
+ title: type
+ description: Kind of event.
+ $ref: '#/components/schemas/openstatus.status_page.v1.ComponentEventType'
+ status:
+ title: status
+ description: Projected status this event contributes.
+ $ref: '#/components/schemas/openstatus.status_page.v1.ComponentEventStatus'
+ from:
+ type: string
+ title: from
+ description: Start time (RFC 3339).
+ to:
+ type:
+ - string
+ - "null"
+ title: to
+ description: End time (RFC 3339); absent while the event is ongoing.
+ impact:
+ oneOf:
+ - $ref: '#/components/schemas/openstatus.status_report.v1.PageComponentImpact'
+ - type: "null"
+ title: impact
+ description: Worst impact over the event (reports only; absent otherwise).
+ title: ComponentEvent
+ additionalProperties: false
+ description: ComponentEvent is a single incident / maintenance / report affecting a component.
+ openstatus.status_page.v1.ComponentEventStatus:
+ type: string
+ title: ComponentEventStatus
+ enum:
+ - COMPONENT_EVENT_STATUS_UNSPECIFIED
+ - COMPONENT_EVENT_STATUS_OPERATIONAL
+ - COMPONENT_EVENT_STATUS_DEGRADED
+ - COMPONENT_EVENT_STATUS_DOWN
+ - COMPONENT_EVENT_STATUS_MAINTENANCE
+ description: ComponentEventStatus is the projected status an event contributes.
+ openstatus.status_page.v1.ComponentEventType:
+ type: string
+ title: ComponentEventType
+ enum:
+ - COMPONENT_EVENT_TYPE_UNSPECIFIED
+ - COMPONENT_EVENT_TYPE_MAINTENANCE
+ - COMPONENT_EVENT_TYPE_INCIDENT
+ - COMPONENT_EVENT_TYPE_REPORT
+ description: ComponentEventType is the kind of timeline event affecting a component.
openstatus.status_page.v1.ComponentStatus:
type: object
properties:
@@ -2735,6 +2851,60 @@ components:
title: GetOverallStatusResponse
additionalProperties: false
description: GetOverallStatusResponse is the response containing the overall status and individual component statuses.
+ openstatus.status_page.v1.GetPageComponentDailySummaryRequest:
+ type: object
+ allOf:
+ - properties:
+ componentIds:
+ type: array
+ items:
+ type: string
+ minLength: 1
+ title: component_ids
+ description: Restrict the result to these component ids (optional, defaults to all components).
+ days:
+ type:
+ - integer
+ - "null"
+ title: days
+ maximum: 45
+ minimum: 1
+ format: int32
+ description: Number of days to return (1-45, defaults to 45 if unspecified).
+ - oneOf:
+ - type: object
+ properties:
+ id:
+ type: string
+ title: id
+ description: ID of the status page.
+ title: id
+ required:
+ - id
+ - type: object
+ properties:
+ slug:
+ type: string
+ title: slug
+ description: Slug of the status page.
+ title: slug
+ required:
+ - slug
+ title: GetPageComponentDailySummaryRequest
+ additionalProperties: false
+ description: GetPageComponentDailySummaryRequest is the request for per-component daily summaries.
+ openstatus.status_page.v1.GetPageComponentDailySummaryResponse:
+ type: object
+ properties:
+ components:
+ type: array
+ items:
+ $ref: '#/components/schemas/openstatus.status_page.v1.PageComponentDailySummary'
+ title: components
+ description: Per-component daily summaries, in page order.
+ title: GetPageComponentDailySummaryResponse
+ additionalProperties: false
+ description: GetPageComponentDailySummaryResponse is the response containing per-component summaries.
openstatus.status_page.v1.GetStatusPageContentRequest:
type: object
oneOf:
@@ -2988,6 +3158,42 @@ components:
title: PageComponent
additionalProperties: false
description: PageComponent represents a component displayed on a status page.
+ openstatus.status_page.v1.PageComponentDailySummary:
+ type: object
+ properties:
+ componentId:
+ type: string
+ title: component_id
+ description: ID of the component.
+ type:
+ title: type
+ description: Component type (monitor or static).
+ $ref: '#/components/schemas/openstatus.status_page.v1.PageComponentType'
+ monitorId:
+ type:
+ - string
+ - "null"
+ title: monitor_id
+ description: Monitor id backing the component (absent for static components).
+ name:
+ type: string
+ title: name
+ description: Display name of the component.
+ buckets:
+ type: array
+ items:
+ $ref: '#/components/schemas/openstatus.status_page.v1.ComponentDayBucket'
+ title: buckets
+ description: Per-day buckets, oldest first.
+ events:
+ type: array
+ items:
+ $ref: '#/components/schemas/openstatus.status_page.v1.ComponentEvent'
+ title: events
+ description: Events affecting the component within the window.
+ title: PageComponentDailySummary
+ additionalProperties: false
+ description: PageComponentDailySummary is the per-day buckets + event timeline for one component.
openstatus.status_page.v1.PageComponentGroup:
type: object
properties:
@@ -5238,6 +5444,58 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/openstatus.status_page.v1.GetOverallStatusResponse'
+ /rpc/openstatus.status_page.v1.StatusPageService/GetPageComponentDailySummary:
+ get:
+ tags:
+ - StatusPageService
+ summary: GetPageComponentDailySummary
+ description: 'Returns per-component daily status buckets (ok/degraded/error/count plus a resolved status) merged with the incident, maintenance, and status-report timeline over the last N days (max 45). Suitable as a single source of truth for status-bar and uptime-calendar rendering. Supports two access paths: by id (authenticated, workspace-scoped) or by slug (public access, requires the page to be published with access_type=PUBLIC).'
+ operationId: StatusPageService_GetPageComponentDailySummary.get
+ parameters:
+ - name: message
+ in: query
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/openstatus.status_page.v1.GetPageComponentDailySummaryRequest'
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/openstatus.status_page.v1.GetPageComponentDailySummaryResponse'
+ post:
+ tags:
+ - StatusPageService
+ summary: GetPageComponentDailySummary
+ description: 'Returns per-component daily status buckets (ok/degraded/error/count plus a resolved status) merged with the incident, maintenance, and status-report timeline over the last N days (max 45). Suitable as a single source of truth for status-bar and uptime-calendar rendering. Supports two access paths: by id (authenticated, workspace-scoped) or by slug (public access, requires the page to be published with access_type=PUBLIC).'
+ operationId: StatusPageService_GetPageComponentDailySummary
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/openstatus.status_page.v1.GetPageComponentDailySummaryRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/openstatus.status_page.v1.GetPageComponentDailySummaryResponse'
/rpc/openstatus.status_page.v1.StatusPageService/GetStatusPage:
get:
tags:
diff --git a/packages/proto/gen/ts/openstatus/status_page/v1/service_pb.ts b/packages/proto/gen/ts/openstatus/status_page/v1/service_pb.ts
index 1f2e8de3f..be926d2ab 100644
--- a/packages/proto/gen/ts/openstatus/status_page/v1/service_pb.ts
+++ b/packages/proto/gen/ts/openstatus/status_page/v1/service_pb.ts
@@ -2,19 +2,19 @@
// @generated from file openstatus/status_page/v1/service.proto (package openstatus.status_page.v1, syntax proto3)
/* eslint-disable */
-import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
-import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
+import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
+import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
import { file_buf_validate_validate } from "../../../buf/validate/validate_pb.ts";
import { file_gnostic_openapi_v3_annotations } from "../../../gnostic/openapi/v3/annotations_pb.ts";
import type { MaintenanceSummary } from "../../maintenance/v1/maintenance_pb.ts";
import { file_openstatus_maintenance_v1_maintenance } from "../../maintenance/v1/maintenance_pb.ts";
-import type { PageComponent, PageComponentGroup } from "./page_component_pb.ts";
+import type { PageComponent, PageComponentGroup, PageComponentType } from "./page_component_pb.ts";
import { file_openstatus_status_page_v1_page_component } from "./page_component_pb.ts";
import type { PageSubscriber } from "./page_subscriber_pb.ts";
import { file_openstatus_status_page_v1_page_subscriber } from "./page_subscriber_pb.ts";
import type { Locale, OverallStatus, PageAccessType, PageTheme, StatusPage, StatusPageSummary } from "./status_page_pb.ts";
import { file_openstatus_status_page_v1_status_page } from "./status_page_pb.ts";
-import type { StatusReport } from "../../status_report/v1/status_report_pb.ts";
+import type { PageComponentImpact, StatusReport } from "../../status_report/v1/status_report_pb.ts";
import { file_openstatus_status_report_v1_status_report } from "../../status_report/v1/status_report_pb.ts";
import type { Message } from "@bufbuild/protobuf";
@@ -22,7 +22,7 @@ import type { Message } from "@bufbuild/protobuf";
* Describes the file openstatus/status_page/v1/service.proto.
*/
export const file_openstatus_status_page_v1_service: GenFile = /*@__PURE__*/
- fileDesc("CidvcGVuc3RhdHVzL3N0YXR1c19wYWdlL3YxL3NlcnZpY2UucHJvdG8SGW9wZW5zdGF0dXMuc3RhdHVzX3BhZ2UudjEi6gYKF0NyZWF0ZVN0YXR1c1BhZ2VSZXF1ZXN0EjAKBXRpdGxlGAEgASgJQiG6RxQ6EhIQQWNtZSBDb3JwIFN0YXR1c7pIB3IFEAEYgAISIgoLZGVzY3JpcHRpb24YAiABKAlCCLpIBXIDGIAISACIAQESSQoEc2x1ZxgDIAEoCUI7ukcSOhASDm15LXN0YXR1cy1wYWdlukgjciEQARiAAjIaXlthLXowLTldKyg/Oi1bYS16MC05XSspKiQSOQoMaG9tZXBhZ2VfdXJsGAQgASgJQh66Rxs6GRIXaHR0cHM6Ly93d3cuZXhhbXBsZS5jb21IAYgBARIYCgtjb250YWN0X3VybBgFIAEoCUgCiAEBEj4KDmRlZmF1bHRfbG9jYWxlGAYgASgOMiEub3BlbnN0YXR1cy5zdGF0dXNfcGFnZS52MS5Mb2NhbGVIA4gBARIyCgdsb2NhbGVzGAcgAygOMiEub3BlbnN0YXR1cy5zdGF0dXNfcGFnZS52MS5Mb2NhbGUSGwoEaWNvbhgIIAEoCUIIukgFcgMYgAhIBIgBARIkCg1jdXN0b21fZG9tYWluGAkgAS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gc3RhdHVzIHJlcG9ydHMsIGFuZCBzY2hlZHVsZWQgbWFpbnRlbmFuY2VzLiBTdXBwb3J0cyB0d28gYWNjZXNzIHBhdGhzOiBieSBJRCAocmVxdWlyZXMgYXV0aGVudGljYXRpb24sIHdvcmtzcGFjZS1zY29wZWQpIG9yIGJ5IHNsdWcgKHB1YmxpYyBhY2Nlc3MsIHJlcXVpcmVzIHRoZSBwYWdlIHRvIGJlIHB1Ymxpc2hlZCB3aXRoIGFjY2Vzc190eXBlPVBVQkxJQykuEqoDChBHZXRPdmVyYWxsU3RhdHVzEjIub3BlbnN0YXR1cy5zdGF0dXNfcGFnZS52MS5HZXRPdmVyYWxsU3RhdHVzUmVxdWVzdBozLm9wZW5zdGF0dXMuc3RhdHVzX3BhZ2UudjEuR2V0T3ZlcmFsbFN0YXR1c1Jlc3BvbnNlIqwCkAIBukelAhqiAlJldHVybnMgdGhlIG92ZXJhbGwgc3RhdHVzIG9mIGEgc3RhdHVzIHBhZ2UgYWxvbmcgd2l0aCBpbmRpdmlkdWFsIGNvbXBvbmVudCBzdGF0dXNlcy4gVGhlIG92ZXJhbGwgc3RhdHVzIGlzIGNvbXB1dGVkIGZyb20gYWN0aXZlIHN0YXR1cyByZXBvcnRzIGFuZCBtYWludGVuYW5jZXMgd2l0aCB0aGUgZm9sbG93aW5nIHByaW9yaXR5OiBkZWdyYWRlZCAoZnJvbSBhY3RpdmUgc3RhdHVzIHJlcG9ydHMpID4gbWFpbnRlbmFuY2UgKGZyb20gYWN0aXZlIG1haW50ZW5hbmNlIHdpbmRvd3MpID4gb3BlcmF0aW9uYWwuQlpaWGdpdGh1Yi5jb20vb3BlbnN0YXR1c2hxL29wZW5zdGF0dXMvcGFja2FnZXMvcHJvdG8vb3BlbnN0YXR1cy9zdGF0dXNfcGFnZS92MTtzdGF0dXNwYWdldjFiBnByb3RvMw", [file_buf_validate_validate, file_gnostic_openapi_v3_annotations, file_openstatus_maintenance_v1_maintenance, file_openstatus_status_page_v1_page_component, file_openstatus_status_page_v1_page_subscriber, file_openstatus_status_page_v1_status_page, file_openstatus_status_report_v1_status_report]);
+ fileDesc("CidvcGVuc3RhdHVzL3N0YXR1c19wYWdlL3YxL3NlcnZpY2UucHJvdG8SGW9wZW5zdGF0dXMuc3RhdHVzX3BhZ2UudjEi6gYKF0NyZWF0ZVN0YXR1c1BhZ2VSZXF1ZXN0EjAKBXRpdGxlGAEgASgJQiG6RxQ6EhIQQWNtZSBDb3JwIFN0YXR1c7pIB3IFEAEYgAISIgoLZGVzY3JpcHRpb24YAiABKAlCCLpIBXIDGIAISACIAQESSQoEc2x1ZxgDIAEoCUI7ukcSOhASDm15LXN0YXR1cy1wYWdlukgjciEQARiAAjIaXlthLXowLTldKyg/Oi1bYS16MC05XSspKiQSOQoMaG9tZXBhZ2VfdXJsGAQgASgJQh66Rxs6GRIXaHR0cHM6Ly93d3cuZXhhbXBsZS5jb21IAYgBARIYCgtjb250YWN0X3VybBgFIAEoCUgCiAEBEj4KDmRlZmF1bHRfbG9jYWxlGAYgASgOMiEub3BlbnN0YXR1cy5zdGF0dXNfcGFnZS52MS5Mb2NhbGVIA4gBARIyCgdsb2NhbGVzGAcgAygOMiEub3BlbnN0YXR1cy5zdGF0dXNfcGFnZS52MS5Mb2NhbGUSGwoEaWNvbhgIIAEoCUIIukgFcgMYgAhIBIgBARIkCg1jdXN0b21fZG9tYWluGAkgASgJQgi6SAVyAxiAAkgFiAEBEjgKBXRoZW1lGAogASgOMiQub3BlbnN0YXR1cy5zdGF0dXNfcGFnZS52MS5QYWdlVGhlbWVIBogBARJDCgthY2Nlc3NfdHlwZRgLIAEoDjIpLm9wZW5zdGF0dXMuc3RhdHVzX3BhZ2UudjEuUGFnZUFjY2Vzc1R5cGVIB4gBARIhCghwYXNzd29yZBgMIAEoCUIKukgHcgUQARiAAkgIiAEBEhoKEmF1dGhfZW1haWxfZG9tYWlucxgNIAMoCRIYCgthbGxvd19pbmRleBgOIAEoCEgJiAEBEh4KEWFsbG93Z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HVzLXJlcG9ydCB0aW1lbGluZSBvdmVyIHRoZSBsYXN0IE4gZGF5cyAobWF4IDQ1KS4gU3VpdGFibGUgYXMgYSBzaW5nbGUgc291cmNlIG9mIHRydXRoIGZvciBzdGF0dXMtYmFyIGFuZCB1cHRpbWUtY2FsZW5kYXIgcmVuZGVyaW5nLiBTdXBwb3J0cyB0d28gYWNjZXNzIHBhdGhzOiBieSBpZCAoYXV0aGVudGljYXRlZCwgd29ya3NwYWNlLXNjb3BlZCkgb3IgYnkgc2x1ZyAocHVibGljIGFjY2VzcywgcmVxdWlyZXMgdGhlIHBhZ2UgdG8gYmUgcHVibGlzaGVkIHdpdGggYWNjZXNzX3R5cGU9UFVCTElDKS5CWlpYZ2l0aHViLmNvbS9vcGVuc3RhdHVzaHEvb3BlbnN0YXR1cy9wYWNrYWdlcy9wcm90by9vcGVuc3RhdHVzL3N0YXR1c19wYWdlL3YxO3N0YXR1c3BhZ2V2MWIGcHJvdG8z", [file_buf_validate_validate, file_gnostic_openapi_v3_annotations, file_openstatus_maintenance_v1_maintenance, file_openstatus_status_page_v1_page_component, file_openstatus_status_page_v1_page_subscriber, file_openstatus_status_page_v1_status_page, file_openstatus_status_report_v1_status_report]);
/**
* CreateStatusPageRequest is the request to create a new status page.
@@ -1382,6 +1382,374 @@ export type GetOverallStatusResponse = Message<"openstatus.status_page.v1.GetOve
export const GetOverallStatusResponseSchema: GenMessage<GetOverallStatusResponse> = /*@__PURE__*/
messageDesc(file_openstatus_status_page_v1_service, 39);
+/**
+ * GetPageComponentDailySummaryRequest is the request for per-component daily summaries.
+ *
+ * @generated from message openstatus.status_page.v1.GetPageComponentDailySummaryRequest
+ */
+export type GetPageComponentDailySummaryRequest = Message<"openstatus.status_page.v1.GetPageComponentDailySummaryRequest"> & {
+ /**
+ * Identifier for the status page (either id or slug).
+ *
+ * @generated from oneof openstatus.status_page.v1.GetPageComponentDailySummaryRequest.identifier
+ */
+ identifier: {
+ /**
+ * ID of the status page.
+ *
+ * @generated from field: string id = 1;
+ */
+ value: string;
+ case: "id";
+ } | {
+ /**
+ * Slug of the status page.
+ *
+ * @generated from field: string slug = 2;
+ */
+ value: string;
+ case: "slug";
+ } | { case: undefined; value?: undefined };
+
+ /**
+ * Restrict the result to these component ids (optional, defaults to all components).
+ *
+ * @generated from field: repeated string component_ids = 3;
+ */
+ componentIds: string[];
+
+ /**
+ * Number of days to return (1-45, defaults to 45 if unspecified).
+ *
+ * @generated from field: optional int32 days = 4;
+ */
+ days?: number | undefined;
+};
+
+/**
+ * Describes the message openstatus.status_page.v1.GetPageComponentDailySummaryRequest.
+ * Use `create(GetPageComponentDailySummaryRequestSchema)` to create a new message.
+ */
+export const GetPageComponentDailySummaryRequestSchema: GenMessage<GetPageComponentDailySummaryRequest> = /*@__PURE__*/
+ messageDesc(file_openstatus_status_page_v1_service, 40);
+
+/**
+ * ComponentDayBucket is one day of status data for a component.
+ *
+ * @generated from message openstatus.status_page.v1.ComponentDayBucket
+ */
+export type ComponentDayBucket = Message<"openstatus.status_page.v1.ComponentDayBucket"> & {
+ /**
+ * Day in RFC 3339 format (UTC midnight).
+ *
+ * @generated from field: string day = 1;
+ */
+ day: string;
+
+ /**
+ * Total checks that day.
+ *
+ * @generated from field: int64 count = 2;
+ */
+ count: bigint;
+
+ /**
+ * Successful checks.
+ *
+ * @generated from field: int64 ok = 3;
+ */
+ ok: bigint;
+
+ /**
+ * Degraded checks.
+ *
+ * @generated from field: int64 degraded = 4;
+ */
+ degraded: bigint;
+
+ /**
+ * Failed checks.
+ *
+ * @generated from field: int64 error = 5;
+ */
+ error: bigint;
+
+ /**
+ * Convenience resolved status for the day.
+ *
+ * @generated from field: openstatus.status_page.v1.ComponentDayStatus status = 6;
+ */
+ status: ComponentDayStatus;
+
+ /**
+ * Worst status-report impact overlapping the day (absent when none).
+ *
+ * @generated from field: optional openstatus.status_report.v1.PageComponentImpact impact = 7;
+ */
+ impact?: PageComponentImpact | undefined;
+};
+
+/**
+ * Describes the message openstatus.status_page.v1.ComponentDayBucket.
+ * Use `create(ComponentDayBucketSchema)` to create a new message.
+ */
+export const ComponentDayBucketSchema: GenMessage<ComponentDayBucket> = /*@__PURE__*/
+ messageDesc(file_openstatus_status_page_v1_service, 41);
+
+/**
+ * ComponentEvent is a single incident / maintenance / report affecting a component.
+ *
+ * @generated from message openstatus.status_page.v1.ComponentEvent
+ */
+export type ComponentEvent = Message<"openstatus.status_page.v1.ComponentEvent"> & {
+ /**
+ * Identifier of the underlying event.
+ *
+ * @generated from field: string id = 1;
+ */
+ id: string;
+
+ /**
+ * Human-readable name (incident "Downtime", maintenance / report title).
+ *
+ * @generated from field: string name = 2;
+ */
+ name: string;
+
+ /**
+ * Kind of event.
+ *
+ * @generated from field: openstatus.status_page.v1.ComponentEventType type = 3;
+ */
+ type: ComponentEventType;
+
+ /**
+ * Projected status this event contributes.
+ *
+ * @generated from field: openstatus.status_page.v1.ComponentEventStatus status = 4;
+ */
+ status: ComponentEventStatus;
+
+ /**
+ * Start time (RFC 3339).
+ *
+ * @generated from field: string from = 5;
+ */
+ from: string;
+
+ /**
+ * End time (RFC 3339); absent while the event is ongoing.
+ *
+ * @generated from field: optional string to = 6;
+ */
+ to?: string | undefined;
+
+ /**
+ * Worst impact over the event (reports only; absent otherwise).
+ *
+ * @generated from field: optional openstatus.status_report.v1.PageComponentImpact impact = 7;
+ */
+ impact?: PageComponentImpact | undefined;
+};
+
+/**
+ * Describes the message openstatus.status_page.v1.ComponentEvent.
+ * Use `create(ComponentEventSchema)` to create a new message.
+ */
+export const ComponentEventSchema: GenMessage<ComponentEvent> = /*@__PURE__*/
+ messageDesc(file_openstatus_status_page_v1_service, 42);
+
+/**
+ * PageComponentDailySummary is the per-day buckets + event timeline for one component.
+ *
+ * @generated from message openstatus.status_page.v1.PageComponentDailySummary
+ */
+export type PageComponentDailySummary = Message<"openstatus.status_page.v1.PageComponentDailySummary"> & {
+ /**
+ * ID of the component.
+ *
+ * @generated from field: string component_id = 1;
+ */
+ componentId: string;
+
+ /**
+ * Component type (monitor or static).
+ *
+ * @generated from field: openstatus.status_page.v1.PageComponentType type = 2;
+ */
+ type: PageComponentType;
+
+ /**
+ * Monitor id backing the component (absent for static components).
+ *
+ * @generated from field: optional string monitor_id = 3;
+ */
+ monitorId?: string | undefined;
+
+ /**
+ * Display name of the component.
+ *
+ * @generated from field: string name = 4;
+ */
+ name: string;
+
+ /**
+ * Per-day buckets, oldest first.
+ *
+ * @generated from field: repeated openstatus.status_page.v1.ComponentDayBucket buckets = 5;
+ */
+ buckets: ComponentDayBucket[];
+
+ /**
+ * Events affecting the component within the window.
+ *
+ * @generated from field: repeated openstatus.status_page.v1.ComponentEvent events = 6;
+ */
+ events: ComponentEvent[];
+};
+
+/**
+ * Describes the message openstatus.status_page.v1.PageComponentDailySummary.
+ * Use `create(PageComponentDailySummarySchema)` to create a new message.
+ */
+export const PageComponentDailySummarySchema: GenMessage<PageComponentDailySummary> = /*@__PURE__*/
+ messageDesc(file_openstatus_status_page_v1_service, 43);
+
+/**
+ * GetPageComponentDailySummaryResponse is the response containing per-component summaries.
+ *
+ * @generated from message openstatus.status_page.v1.GetPageComponentDailySummaryResponse
+ */
+export type GetPageComponentDailySummaryResponse = Message<"openstatus.status_page.v1.GetPageComponentDailySummaryResponse"> & {
+ /**
+ * Per-component daily summaries, in page order.
+ *
+ * @generated from field: repeated openstatus.status_page.v1.PageComponentDailySummary components = 1;
+ */
+ components: PageComponentDailySummary[];
+};
+
+/**
+ * Describes the message openstatus.status_page.v1.GetPageComponentDailySummaryResponse.
+ * Use `create(GetPageComponentDailySummaryResponseSchema)` to create a new message.
+ */
+export const GetPageComponentDailySummaryResponseSchema: GenMessage<GetPageComponentDailySummaryResponse> = /*@__PURE__*/
+ messageDesc(file_openstatus_status_page_v1_service, 44);
+
+/**
+ * ComponentDayStatus is the resolved status of a component on a given day.
+ *
+ * @generated from enum openstatus.status_page.v1.ComponentDayStatus
+ */
+export enum ComponentDayStatus {
+ /**
+ * @generated from enum value: COMPONENT_DAY_STATUS_UNSPECIFIED = 0;
+ */
+ UNSPECIFIED = 0,
+
+ /**
+ * @generated from enum value: COMPONENT_DAY_STATUS_OPERATIONAL = 1;
+ */
+ OPERATIONAL = 1,
+
+ /**
+ * @generated from enum value: COMPONENT_DAY_STATUS_DEGRADED = 2;
+ */
+ DEGRADED = 2,
+
+ /**
+ * @generated from enum value: COMPONENT_DAY_STATUS_DOWN = 3;
+ */
+ DOWN = 3,
+
+ /**
+ * @generated from enum value: COMPONENT_DAY_STATUS_MAINTENANCE = 4;
+ */
+ MAINTENANCE = 4,
+
+ /**
+ * @generated from enum value: COMPONENT_DAY_STATUS_EMPTY = 5;
+ */
+ EMPTY = 5,
+}
+
+/**
+ * Describes the enum openstatus.status_page.v1.ComponentDayStatus.
+ */
+export const ComponentDayStatusSchema: GenEnum<ComponentDayStatus> = /*@__PURE__*/
+ enumDesc(file_openstatus_status_page_v1_service, 0);
+
+/**
+ * ComponentEventType is the kind of timeline event affecting a component.
+ *
+ * @generated from enum openstatus.status_page.v1.ComponentEventType
+ */
+export enum ComponentEventType {
+ /**
+ * @generated from enum value: COMPONENT_EVENT_TYPE_UNSPECIFIED = 0;
+ */
+ UNSPECIFIED = 0,
+
+ /**
+ * @generated from enum value: COMPONENT_EVENT_TYPE_MAINTENANCE = 1;
+ */
+ MAINTENANCE = 1,
+
+ /**
+ * @generated from enum value: COMPONENT_EVENT_TYPE_INCIDENT = 2;
+ */
+ INCIDENT = 2,
+
+ /**
+ * @generated from enum value: COMPONENT_EVENT_TYPE_REPORT = 3;
+ */
+ REPORT = 3,
+}
+
+/**
+ * Describes the enum openstatus.status_page.v1.ComponentEventType.
+ */
+export const ComponentEventTypeSchema: GenEnum<ComponentEventType> = /*@__PURE__*/
+ enumDesc(file_openstatus_status_page_v1_service, 1);
+
+/**
+ * ComponentEventStatus is the projected status an event contributes.
+ *
+ * @generated from enum openstatus.status_page.v1.ComponentEventStatus
+ */
+export enum ComponentEventStatus {
+ /**
+ * @generated from enum value: COMPONENT_EVENT_STATUS_UNSPECIFIED = 0;
+ */
+ UNSPECIFIED = 0,
+
+ /**
+ * @generated from enum value: COMPONENT_EVENT_STATUS_OPERATIONAL = 1;
+ */
+ OPERATIONAL = 1,
+
+ /**
+ * @generated from enum value: COMPONENT_EVENT_STATUS_DEGRADED = 2;
+ */
+ DEGRADED = 2,
+
+ /**
+ * @generated from enum value: COMPONENT_EVENT_STATUS_DOWN = 3;
+ */
+ DOWN = 3,
+
+ /**
+ * @generated from enum value: COMPONENT_EVENT_STATUS_MAINTENANCE = 4;
+ */
+ MAINTENANCE = 4,
+}
+
+/**
+ * Describes the enum openstatus.status_page.v1.ComponentEventStatus.
+ */
+export const ComponentEventStatusSchema: GenEnum<ComponentEventStatus> = /*@__PURE__*/
+ enumDesc(file_openstatus_status_page_v1_service, 2);
+
/**
* StatusPageService provides CRUD and management operations for status pages,
* including component management, component grouping, subscriber handling, and aggregated status queries.
@@ -1587,6 +1955,18 @@ export const StatusPageService: GenService<{
input: typeof GetOverallStatusRequestSchema;
output: typeof GetOverallStatusResponseSchema;
},
+ /**
+ * GetPageComponentDailySummary returns per-component daily uptime buckets merged
+ * with the incident / maintenance / report timeline — the single source of truth
+ * for rendering per-component status bars and uptime calendars.
+ *
+ * @generated from rpc openstatus.status_page.v1.StatusPageService.GetPageComponentDailySummary
+ */
+ getPageComponentDailySummary: {
+ methodKind: "unary";
+ input: typeof GetPageComponentDailySummaryRequestSchema;
+ output: typeof GetPageComponentDailySummaryResponseSchema;
+ },
}> = /*@__PURE__*/
serviceDesc(file_openstatus_status_page_v1_service, 0);
diff --git a/packages/services/package.json b/packages/services/package.json
index 089c0b4d2..74d255428 100644
--- a/packages/services/package.json
+++ b/packages/services/package.json
@@ -41,6 +41,10 @@
"import": "./src/page/index.ts",
"types": "./src/page/index.ts"
},
+ "./status-timeline": {
+ "import": "./src/status-timeline/index.ts",
+ "types": "./src/status-timeline/index.ts"
+ },
"./workspace": {
"import": "./src/workspace/index.ts",
"types": "./src/workspace/index.ts"
diff --git a/packages/services/src/monitor/__tests__/reads.test.ts b/packages/services/src/monitor/__tests__/reads.test.ts
index 2e7d3c653..ef90d9cb3 100644
--- a/packages/services/src/monitor/__tests__/reads.test.ts
+++ b/packages/services/src/monitor/__tests__/reads.test.ts
@@ -14,6 +14,7 @@ import {
import type { ServiceContext } from "../../context";
import { ForbiddenError, NotFoundError, ValidationError } from "../../errors";
import { createMonitor } from "../create";
+import { fetchMonitorDailyStats } from "../get-daily-summary";
import { getMonitorStatus } from "../get-monitor-status";
import { getMonitorSummary } from "../get-monitor-summary";
import { getResponseLog } from "../get-response-log";
@@ -167,6 +168,143 @@ describe("getMonitorSummary", () => {
});
});
+describe("fetchMonitorDailyStats", () => {
+ const emptyTb = {
+ httpStatus45d: () => Promise.resolve({ data: [] }),
+ tcpStatus45d: () => Promise.resolve({ data: [] }),
+ dnsStatus45d: () => Promise.resolve({ data: [] }),
+ } as unknown as NonNullable<ServiceContext["tb"]>;
+
+ test("skips cross-workspace monitorId (returns empty, no throw)", async () => {
+ await withTestTransaction(async (tx) => {
+ const row = await createMonitor({
+ ctx: { ...teamCtx, db: tx },
+ input: {
+ name: `${TEST_PREFIX}-cross-ws-daily`,
+ jobType: "http",
+ url: "https://example.com",
+ method: "GET",
+ headers: [],
+ assertions: [],
+ active: false,
+ regions: ["ams"],
+ },
+ });
+ const stats = await fetchMonitorDailyStats({
+ db: tx,
+ tb: emptyTb,
+ monitorIds: [row.id],
+ workspaceId: freeCtx.workspace.id,
+ });
+ expect(stats).toEqual([]);
+ });
+ });
+
+ test("skips unknown monitorId (returns empty)", async () => {
+ await withTestTransaction(async (tx) => {
+ const stats = await fetchMonitorDailyStats({
+ db: tx,
+ tb: emptyTb,
+ monitorIds: [999_999_999],
+ workspaceId: teamCtx.workspace.id,
+ });
+ expect(stats).toEqual([]);
+ });
+ });
+
+ test("skips unsupported jobType (icmp)", async () => {
+ await withTestTransaction(async (tx) => {
+ const row = await createMonitor({
+ ctx: { ...teamCtx, db: tx },
+ input: {
+ name: `${TEST_PREFIX}-icmp-daily`,
+ jobType: "icmp",
+ url: "1.1.1.1",
+ method: "GET",
+ headers: [],
+ assertions: [],
+ active: false,
+ regions: ["ams"],
+ },
+ });
+ const stats = await fetchMonitorDailyStats({
+ db: tx,
+ tb: emptyTb,
+ monitorIds: [row.id],
+ workspaceId: teamCtx.workspace.id,
+ });
+ expect(stats).toEqual([]);
+ });
+ });
+
+ test("queries each pipe with its own job type's ids and merges the rows", async () => {
+ await withTestTransaction(async (tx) => {
+ const httpMon = await createMonitor({
+ ctx: { ...teamCtx, db: tx },
+ input: {
+ name: `${TEST_PREFIX}-daily-http`,
+ jobType: "http",
+ url: "https://example.com",
+ method: "GET",
+ headers: [],
+ assertions: [],
+ active: false,
+ regions: ["ams"],
+ },
+ });
+ const tcpMon = await createMonitor({
+ ctx: { ...teamCtx, db: tx },
+ input: {
+ name: `${TEST_PREFIX}-daily-tcp`,
+ jobType: "tcp",
+ url: "example.com:443",
+ method: "GET",
+ headers: [],
+ assertions: [],
+ active: false,
+ regions: ["ams"],
+ },
+ });
+
+ const today = new Date(
+ Math.floor(Date.now() / 86_400_000) * 86_400_000,
+ ).toISOString();
+ const bucket = (monitorId: number) => ({
+ day: today,
+ count: 10,
+ ok: 9,
+ degraded: 1,
+ error: 0,
+ monitorId: String(monitorId),
+ });
+
+ const queried: Record<string, string[]> = {};
+ const fakeTb = {
+ httpStatus45d: ({ monitorIds }: { monitorIds: string[] }) => {
+ queried.http = monitorIds;
+ return Promise.resolve({ data: [bucket(httpMon.id)] });
+ },
+ tcpStatus45d: ({ monitorIds }: { monitorIds: string[] }) => {
+ queried.tcp = monitorIds;
+ return Promise.resolve({ data: [bucket(tcpMon.id)] });
+ },
+ dnsStatus45d: () => Promise.resolve({ data: [] }),
+ } as unknown as NonNullable<ServiceContext["tb"]>;
+
+ const stats = await fetchMonitorDailyStats({
+ db: tx,
+ tb: fakeTb,
+ monitorIds: [httpMon.id, tcpMon.id],
+ workspaceId: teamCtx.workspace.id,
+ });
+
+ expect(queried.http).toEqual([String(httpMon.id)]);
+ expect(queried.tcp).toEqual([String(tcpMon.id)]);
+ expect(stats).toEqual([bucket(httpMon.id), bucket(tcpMon.id)]);
+ });
+ });
+});
+
describe("getResponseLog", () => {
test("throws ForbiddenError when plan disables response-logs", async () => {
await withTestTransaction(async (tx) => {
diff --git a/packages/services/src/monitor/get-daily-summary.ts b/packages/services/src/monitor/get-daily-summary.ts
new file mode 100644
index 000000000..0d8c952ff
--- /dev/null
+++ b/packages/services/src/monitor/get-daily-summary.ts
@@ -0,0 +1,68 @@
+import { and, eq, inArray, isNull } from "@openstatus/db";
+import { monitor } from "@openstatus/db/src/schema";
+import type { OSTinybird } from "@openstatus/tinybird";
+
+import type { DB } from "../context";
+import type { StatusData } from "../status-timeline";
+
+type SupportedJobType = "http" | "tcp" | "dns";
+
+/**
+ * Raw daily status buckets (one row per monitor per day) from the 45d Tinybird
+ * pipes, grouped by jobType. Ids that are missing / soft-deleted / of an
+ * unsupported jobType are skipped — callers want empty data for those, not a
+ * throw. The pipe rows already match `StatusData` (day ISO, monitorId string).
+ */
+export async function fetchMonitorDailyStats(args: {
+ db: DB;
+ tb: OSTinybird;
+ monitorIds: number[];
+ workspaceId: number;
+}): Promise<StatusData[]> {
+ const ids = Array.from(new Set(args.monitorIds));
+ if (ids.length === 0) return [];
+
+ const rows = await args.db
+ .select({ id: monitor.id, jobType: monitor.jobType })
+ .from(monitor)
+ .where(
+ and(
+ inArray(monitor.id, ids),
+ eq(monitor.workspaceId, args.workspaceId),
+ isNull(monitor.deletedAt),
+ ),
+ )
+ .all();
+
+ const idsByJobType: Record<SupportedJobType, string[]> = {
+ http: [],
+ tcp: [],
+ dns: [],
+ };
+ for (const row of rows) {
+ if (
+ row.jobType === "http" ||
+ row.jobType === "tcp" ||
+ row.jobType === "dns"
+ ) {
+ idsByJobType[row.jobType].push(String(row.id));
+ }
+ }
+
+ const results = await Promise.all(
+ (["http", "tcp", "dns"] as const)
+ .filter((jobType) => idsByJobType[jobType].length > 0)
+ .map((jobType) => {
+ const monitorIds = idsByJobType[jobType];
+ const pipe =
+ jobType === "http"
+ ? args.tb.httpStatus45d
+ : jobType === "tcp"
+ ? args.tb.tcpStatus45d
+ : args.tb.dnsStatus45d;
+ return pipe({ monitorIds });
+ }),
+ );
+
+ return results.flatMap((result) => result.data);
+}
diff --git a/packages/services/src/monitor/index.ts b/packages/services/src/monitor/index.ts
index 48222c638..32040998b 100644
--- a/packages/services/src/monitor/index.ts
+++ b/packages/services/src/monitor/index.ts
@@ -1,5 +1,6 @@
export { cloneMonitor } from "./clone";
export { createMonitor } from "./create";
+export { fetchMonitorDailyStats } from "./get-daily-summary";
export { deleteMonitor, deleteMonitors } from "./delete";
export {
getMonitorStatus,
diff --git a/packages/services/src/page-component/__tests__/get-daily-summary.test.ts b/packages/services/src/page-component/__tests__/get-daily-summary.test.ts
new file mode 100644
index 000000000..02db33a04
--- /dev/null
+++ b/packages/services/src/page-component/__tests__/get-daily-summary.test.ts
@@ -0,0 +1,280 @@
+import { beforeAll, describe, expect, test } from "bun:test";
+
+import {
+ maintenance,
+ maintenancesToPageComponents,
+ monitor,
+ page,
+ pageComponent,
+ statusReport,
+ statusReportUpdate,
+ statusReportUpdateToPageComponents,
+ statusReportsToPageComponents,
+} from "@openstatus/db/src/schema";
+
+import { SEEDED_WORKSPACE_TEAM_ID } from "../../../test/fixtures";
+import {
+ loadSeededWorkspace,
+ makeUserCtx,
+ withTestTransaction,
+} from "../../../test/helpers";
+import type { ServiceContext } from "../../context";
+import { NotFoundError } from "../../errors";
+import { getPageComponentDailySummary } from "../get-daily-summary";
+
+const TEST_PREFIX = "svc-page-component-daily-test";
+
+let teamCtx: ServiceContext;
+let workspaceId: number;
+
+beforeAll(async () => {
+ const team = await loadSeededWorkspace(SEEDED_WORKSPACE_TEAM_ID);
+ teamCtx = makeUserCtx(team, { userId: 1 });
+ workspaceId = team.id;
+});
+
+describe("getPageComponentDailySummary", () => {
+ test("merges per-component uptime buckets with the event timeline", async () => {
+ await withTestTransaction(async (tx) => {
+ const pageRow = await tx
+ .insert(page)
+ .values({
+ workspaceId,
+ title: `${TEST_PREFIX}-page`,
+ description: "test",
+ slug: `${TEST_PREFIX}-${Date.now()}`,
+ customDomain: "",
+ })
+ .returning()
+ .get();
+
+ const mon = await tx
+ .insert(monitor)
+ .values({
+ workspaceId,
+ active: true,
+ url: "https://example.com",
+ name: `${TEST_PREFIX}-monitor`,
+ method: "GET",
+ jobType: "http",
+ periodicity: "10m",
+ regions: "ams",
+ })
+ .returning()
+ .get();
+
+ const monitorComponent = await tx
+ .insert(pageComponent)
+ .values({
+ workspaceId,
+ pageId: pageRow.id,
+ type: "monitor",
+ monitorId: mon.id,
+ name: "API",
+ order: 0,
+ })
+ .returning()
+ .get();
+
+ const staticComponent = await tx
+ .insert(pageComponent)
+ .values({
+ workspaceId,
+ pageId: pageRow.id,
+ type: "static",
+ name: "Docs",
+ order: 1,
+ })
+ .returning()
+ .get();
+
+ const now = new Date();
+ const maint = await tx
+ .insert(maintenance)
+ .values({
+ workspaceId,
+ pageId: pageRow.id,
+ title: "Planned maintenance",
+ message: "rolling restart",
+ from: new Date(now.getTime() - 3_600_000),
+ to: new Date(now.getTime() + 3_600_000),
+ })
+ .returning()
+ .get();
+ await tx.insert(maintenancesToPageComponents).values({
+ maintenanceId: maint.id,
+ pageComponentId: monitorComponent.id,
+ });
+
+ const report = await tx
+ .insert(statusReport)
+ .values({
+ workspaceId,
+ pageId: pageRow.id,
+ title: "Elevated latency",
+ status: "investigating",
+ })
+ .returning()
+ .get();
+ await tx.insert(statusReportsToPageComponents).values({
+ statusReportId: report.id,
+ pageComponentId: monitorComponent.id,
+ });
+ const update = await tx
+ .insert(statusReportUpdate)
+ .values({
+ statusReportId: report.id,
+ status: "investigating",
+ date: now,
+ message: "looking into it",
+ })
+ .returning()
+ .get();
+ await tx.insert(statusReportUpdateToPageComponents).values({
+ statusReportUpdateId: update.id,
+ pageComponentId: monitorComponent.id,
+ impact: "degraded_performance",
+ });
+
+ const today = new Date(
+ Math.floor(now.getTime() / 86_400_000) * 86_400_000,
+ ).toISOString();
+ const fakeTb = {
+ httpStatus45d: ({ monitorIds }: { monitorIds: string[] }) => {
+ expect(monitorIds).toEqual([String(mon.id)]);
+ return Promise.resolve({
+ data: [
+ {
+ day: today,
+ count: 10,
+ ok: 9,
+ degraded: 1,
+ error: 0,
+ monitorId: String(mon.id),
+ },
+ ],
+ });
+ },
+ tcpStatus45d: () => Promise.resolve({ data: [] }),
+ dnsStatus45d: () => Promise.resolve({ data: [] }),
+ } as unknown as NonNullable<ServiceContext["tb"]>;
+
+ const { components } = await getPageComponentDailySummary({
+ ctx: { ...teamCtx, db: tx, tb: fakeTb },
+ input: { pageId: pageRow.id, workspaceId, days: 3 },
+ });
+
+ expect(components.map((c) => c.componentId)).toEqual([
+ monitorComponent.id,
+ staticComponent.id,
+ ]);
+
+ const monitorSummary = components[0];
+ expect(monitorSummary.type).toBe("monitor");
+ expect(monitorSummary.monitorId).toBe(mon.id);
+ // gap-filled to the requested window
+ expect(monitorSummary.buckets).toHaveLength(3);
+
+ const todayBucket = monitorSummary.buckets.find((b) => b.day === today);
+ expect(todayBucket).toBeDefined();
+ expect(todayBucket?.count).toBe(10);
+ // a degraded report overlaps today → resolved status + impact
+ expect(todayBucket?.status).toBe("degraded");
+ expect(todayBucket?.impact).toBe("degraded_performance");
+
+ // days without data or events are empty
+ expect(
+ monitorSummary.buckets.filter((b) => b.status === "empty"),
+ ).toHaveLength(2);
+
+ // maintenance + report surface as events, with report impact tagged
+ expect(monitorSummary.events.map((e) => e.type).sort()).toEqual([
+ "maintenance",
+ "report",
+ ]);
+ const reportEvent = monitorSummary.events.find(
+ (e) => e.type === "report",
+ );
+ expect(reportEvent?.impact).toBe("degraded_performance");
+
+ const staticSummary = components[1];
+ expect(staticSummary.type).toBe("static");
+ expect(staticSummary.monitorId).toBeUndefined();
+ expect(staticSummary.buckets).toHaveLength(3);
+ // events are scoped to the monitor component, not the static one
+ expect(staticSummary.events).toHaveLength(0);
+ expect(staticSummary.buckets.every((b) => b.status === "empty")).toBe(
+ true,
+ );
+ });
+ });
+
+ test("filters to requested componentIds and rejects unknown ones", async () => {
+ await withTestTransaction(async (tx) => {
+ const pageRow = await tx
+ .insert(page)
+ .values({
+ workspaceId,
+ title: `${TEST_PREFIX}-filter-page`,
+ description: "test",
+ slug: `${TEST_PREFIX}-filter-${Date.now()}`,
+ customDomain: "",
+ })
+ .returning()
+ .get();
+
+ const compA = await tx
+ .insert(pageComponent)
+ .values({
+ workspaceId,
+ pageId: pageRow.id,
+ type: "static",
+ name: "A",
+ order: 0,
+ })
+ .returning()
+ .get();
+ await tx
+ .insert(pageComponent)
+ .values({
+ workspaceId,
+ pageId: pageRow.id,
+ type: "static",
+ name: "B",
+ order: 1,
+ })
+ .returning()
+ .get();
+
+ // static-only page → no monitor ids → fetchMonitorDailyStats never calls a pipe
+ const emptyTb = {
+ httpStatus45d: () => Promise.resolve({ data: [] }),
+ tcpStatus45d: () => Promise.resolve({ data: [] }),
+ dnsStatus45d: () => Promise.resolve({ data: [] }),
+ } as unknown as NonNullable<ServiceContext["tb"]>;
+
+ const { components } = await getPageComponentDailySummary({
+ ctx: { ...teamCtx, db: tx, tb: emptyTb },
+ input: {
+ pageId: pageRow.id,
+ workspaceId,
+ componentIds: [compA.id],
+ days: 2,
+ },
+ });
+ expect(components.map((c) => c.componentId)).toEqual([compA.id]);
+
+ await expect(
+ getPageComponentDailySummary({
+ ctx: { ...teamCtx, db: tx, tb: emptyTb },
+ input: {
+ pageId: pageRow.id,
+ workspaceId,
+ componentIds: [compA.id, 999_999_999],
+ days: 2,
+ },
+ }),
+ ).rejects.toBeInstanceOf(NotFoundError);
+ });
+ });
+});
diff --git a/packages/services/src/page-component/get-daily-summary.ts b/packages/services/src/page-component/get-daily-summary.ts
new file mode 100644
index 000000000..0b5b4b31b
--- /dev/null
+++ b/packages/services/src/page-component/get-daily-summary.ts
@@ -0,0 +1,178 @@
+import { and, asc, eq, inArray } from "@openstatus/db";
+import { incidentTable, pageComponent } from "@openstatus/db/src/schema";
+import type {
+ PageComponentImpact,
+ PageComponentType,
+} from "@openstatus/db/src/schema";
+
+import { type ServiceContext, defaultTb, getReadDb } from "../context";
+import { NotFoundError } from "../errors";
+import { fetchMonitorDailyStats } from "../monitor/get-daily-summary";
+import {
+ type DayStatus,
+ type Event,
+ eventWorstImpact,
+ fillStatusDataFor45Days,
+ getEvents,
+ resolveDayStatus,
+} from "../status-timeline";
+import { GetPageComponentDailySummaryInput } from "./schemas";
+
+export type ComponentDayBucket = {
+ day: string;
+ count: number;
+ ok: number;
+ degraded: number;
+ error: number;
+ status: DayStatus;
+ impact?: PageComponentImpact;
+};
+
+export type ComponentEventSummary = {
+ id: number;
+ name: string;
+ type: Event["type"];
+ status: Event["status"];
+ from: Date;
+ to: Date | null;
+ impact?: PageComponentImpact;
+};
+
+export type PageComponentDailySummary = {
+ componentId: number;
+ type: PageComponentType;
+ monitorId?: number;
+ name: string;
+ buckets: ComponentDayBucket[];
+ events: ComponentEventSummary[];
+};
+
+export type GetPageComponentDailySummaryResult = {
+ components: PageComponentDailySummary[];
+};
+
+export async function getPageComponentDailySummary(args: {
+ ctx: ServiceContext;
+ input: GetPageComponentDailySummaryInput;
+}): Promise<GetPageComponentDailySummaryResult> {
+ const { ctx } = args;
+ const input = GetPageComponentDailySummaryInput.parse(args.input);
+ const db = getReadDb(ctx);
+ const tb = ctx.tb ?? defaultTb;
+ const days = input.days ?? 45;
+
+ const conditions = [
+ eq(pageComponent.pageId, input.pageId),
+ eq(pageComponent.workspaceId, input.workspaceId),
+ ];
+ if (input.componentIds?.length) {
+ conditions.push(inArray(pageComponent.id, input.componentIds));
+ }
+
+ const components = await db
+ .select()
+ .from(pageComponent)
+ .where(and(...conditions))
+ .orderBy(asc(pageComponent.order))
+ .all();
+
+ if (input.componentIds?.length) {
+ const found = new Set(components.map((c) => c.id));
+ for (const id of input.componentIds) {
+ if (!found.has(id)) throw new NotFoundError("page_component", id);
+ }
+ }
+
+ const monitorIds = Array.from(
+ new Set(
+ components.map((c) => c.monitorId).filter((m): m is number => m != null),
+ ),
+ );
+
+ const [monitorStats, maintenances, reports, incidents] = await Promise.all([
+ fetchMonitorDailyStats({
+ db,
+ tb,
+ monitorIds,
+ workspaceId: input.workspaceId,
+ }),
+ db.query.maintenance.findMany({
+ where: (m, { eq }) => eq(m.pageId, input.pageId),
+ with: { maintenancesToPageComponents: { with: { pageComponent: true } } },
+ }),
+ db.query.statusReport.findMany({
+ where: (r, { eq }) => eq(r.pageId, input.pageId),
+ with: {
+ statusReportsToPageComponents: { with: { pageComponent: true } },
+ statusReportUpdates: {
+ with: { statusReportUpdateToPageComponents: true },
+ },
+ },
+ }),
+ monitorIds.length > 0
+ ? db
+ .select()
+ .from(incidentTable)
+ .where(inArray(incidentTable.monitorId, monitorIds))
+ .all()
+ : Promise.resolve([]),
+ ]);
+
+ const statsByMonitor = new Map<string, typeof monitorStats>();
+ for (const stat of monitorStats) {
+ const arr = statsByMonitor.get(stat.monitorId);
+ if (arr) arr.push(stat);
+ else statsByMonitor.set(stat.monitorId, [stat]);
+ }
+
+ const summaries = components.map((component) => {
+ const events = getEvents({
+ maintenances,
+ incidents,
+ reports,
+ pageComponentId: component.id,
+ monitorId: component.monitorId ?? undefined,
+ componentType: component.type,
+ pastDays: days,
+ });
+
+ const monitorKey =
+ component.monitorId != null ? String(component.monitorId) : "";
+ const stats = statsByMonitor.get(monitorKey) ?? [];
+ const filled = fillStatusDataFor45Days(stats, monitorKey, days);
+
+ const buckets: ComponentDayBucket[] = filled.map((bucket) => {
+ const { status, impact } = resolveDayStatus(bucket, events);
+ return {
+ day: bucket.day,
+ count: bucket.count,
+ ok: bucket.ok,
+ degraded: bucket.degraded,
+ error: bucket.error,
+ status,
+ impact,
+ };
+ });
+
+ const eventSummaries: ComponentEventSummary[] = events.map((event) => ({
+ id: event.id,
+ name: event.name,
+ type: event.type,
+ status: event.status,
+ from: event.from,
+ to: event.to,
+ impact: eventWorstImpact(event),
+ }));
+
+ return {
+ componentId: component.id,
+ type: component.type,
+ monitorId: component.monitorId ?? undefined,
+ name: component.name,
+ buckets,
+ events: eventSummaries,
+ };
+ });
+
+ return { components: summaries };
+}
diff --git a/packages/services/src/page-component/index.ts b/packages/services/src/page-component/index.ts
index 86ddc89f4..e22ccfd97 100644
--- a/packages/services/src/page-component/index.ts
+++ b/packages/services/src/page-component/index.ts
@@ -1,9 +1,17 @@
export { deletePageComponent } from "./delete";
+export {
+ type ComponentDayBucket,
+ type ComponentEventSummary,
+ getPageComponentDailySummary,
+ type GetPageComponentDailySummaryResult,
+ type PageComponentDailySummary,
+} from "./get-daily-summary";
export { listPageComponents, type PageComponentWithRelations } from "./list";
export { updatePageComponentOrder } from "./update-order";
export {
DeletePageComponentInput,
+ GetPageComponentDailySummaryInput,
ListPageComponentsInput,
UpdatePageComponentOrderInput,
} from "./schemas";
diff --git a/packages/services/src/page-component/schemas.ts b/packages/services/src/page-component/schemas.ts
index 466092ba6..3ec13e473 100644
--- a/packages/services/src/page-component/schemas.ts
+++ b/packages/services/src/page-component/schemas.ts
@@ -61,3 +61,13 @@ export const UpdatePageComponentOrderInput = z.object({
export type UpdatePageComponentOrderInput = z.infer<
typeof UpdatePageComponentOrderInput
>;
+
+export const GetPageComponentDailySummaryInput = z.object({
+ pageId: z.number().int(),
+ workspaceId: z.number().int(),
+ componentIds: z.array(z.number().int()).optional(),
+ days: z.number().int().min(1).max(45).optional(),
+});
+export type GetPageComponentDailySummaryInput = z.infer<
+ typeof GetPageComponentDailySummaryInput
+>;
diff --git a/packages/services/src/status-timeline/events.ts b/packages/services/src/status-timeline/events.ts
new file mode 100644
index 000000000..d4f3afee5
--- /dev/null
+++ b/packages/services/src/status-timeline/events.ts
@@ -0,0 +1,564 @@
+import type {
+ Incident,
+ Maintenance,
+ PageComponent,
+ PageComponentImpact,
+ PageComponentType,
+ PageComponentWithMonitorRelation,
+ StatusReport,
+ StatusReportUpdate,
+} from "@openstatus/db/src/schema";
+import {
+ currentImpactsFromUpdates,
+ impactToStatusType,
+ worstImpact,
+} from "@openstatus/db/src/schema";
+
+export type MonitorComponentWithNonNullMonitor =
+ PageComponentWithMonitorRelation & {
+ type: "monitor";
+ monitorId: number;
+ monitor: NonNullable<PageComponentWithMonitorRelation["monitor"]>;
+ };
+
+export function isMonitorComponent(
+ component: PageComponentWithMonitorRelation,
+): component is MonitorComponentWithNonNullMonitor {
+ return (
+ component.type === "monitor" &&
+ component.monitor !== null &&
+ component.monitor !== undefined &&
+ component.monitor.active === true &&
+ component.monitor.deletedAt === null
+ );
+}
+
+export type StatusData = {
+ day: string;
+ count: number;
+ ok: number;
+ degraded: number;
+ error: number;
+ monitorId: string;
+};
+
+export function fillStatusDataFor45Days(
+ data: Array<StatusData>,
+ monitorId: string,
+ lookbackPeriod = 45,
+): Array<StatusData> {
+ const result = [];
+ const dataByDay = new Map();
+
+ // Index existing data by day
+ data.forEach((item) => {
+ const dayKey = new Date(item.day).toISOString().split("T")[0]; // YYYY-MM-DD format
+ dataByDay.set(dayKey, item);
+ });
+
+ // Generate all days from today backwards
+ const now = new Date();
+ for (let i = 0; i < lookbackPeriod; i++) {
+ const date = new Date(now);
+ date.setUTCDate(date.getUTCDate() - i);
+ date.setUTCHours(0, 0, 0, 0); // Set to start of day in UTC
+
+ const dayKey = date.toISOString().split("T")[0]; // YYYY-MM-DD format
+ const isoString = date.toISOString();
+
+ if (dataByDay.has(dayKey)) {
+ // Use existing data but ensure the day is properly formatted
+ const existingData = dataByDay.get(dayKey);
+ result.push({
+ ...existingData,
+ day: isoString,
+ });
+ } else {
+ // Fill missing day with default values
+ result.push({
+ day: isoString,
+ count: 0,
+ ok: 0,
+ degraded: 0,
+ error: 0,
+ monitorId,
+ });
+ }
+ }
+
+ // Sort by day (oldest first)
+ return result.sort(
+ (a, b) => new Date(a.day).getTime() - new Date(b.day).getTime(),
+ );
+}
+
+export function fillStatusDataFor45DaysNoop({
+ errorDays,
+ degradedDays,
+ lookbackPeriod = 45,
+}: {
+ errorDays: number[];
+ degradedDays: number[];
+ lookbackPeriod?: number;
+}): Array<StatusData> {
+ const issueDays = [...errorDays, ...degradedDays];
+ // UTC day grid, matching fillStatusDataFor45Days, so synthetic days line up
+ const data: StatusData[] = Array.from({ length: lookbackPeriod }, (_, i) => {
+ const date = new Date();
+ date.setUTCDate(date.getUTCDate() - i);
+ date.setUTCHours(0, 0, 0, 0);
+ return {
+ day: date.toISOString(),
+ count: 1,
+ ok: issueDays.includes(i) ? 0 : 1,
+ degraded: degradedDays.includes(i) ? 1 : 0,
+ error: errorDays.includes(i) ? 1 : 0,
+ monitorId: "1",
+ };
+ });
+ return fillStatusDataFor45Days(data, "1", lookbackPeriod);
+}
+
+export type ImpactInterval = {
+ from: Date;
+ to: Date | null; // null = still active
+ impact: PageComponentImpact;
+};
+
+export type StatusReportUpdateWithImpactRows = StatusReportUpdate & {
+ statusReportUpdateToPageComponents?: {
+ pageComponentId: number;
+ impact: PageComponentImpact;
+ }[];
+};
+
+export type Event = {
+ id: number;
+ name: string;
+ from: Date;
+ to: Date | null;
+ type: "maintenance" | "incident" | "report";
+ status: "success" | "degraded" | "error" | "info";
+ // absent ⇒ legacy report (no impact rows): orange bar, full-duration downtime
+ impactIntervals?: ImpactInterval[];
+};
+
+// per component: change points across the report's updates
+function buildComponentImpactIntervals(
+ updates: StatusReportUpdateWithImpactRows[],
+): Map<number, ImpactInterval[]> {
+ // closing the last open interval relies on ascending order; don't trust callers
+ const sorted = [...updates].sort(
+ (a, b) => a.date.getTime() - b.date.getTime() || a.id - b.id,
+ );
+ const byComponent = new Map<number, ImpactInterval[]>();
+ for (const update of sorted) {
+ for (const row of update.statusReportUpdateToPageComponents ?? []) {
+ const intervals = byComponent.get(row.pageComponentId) ?? [];
+ const last = intervals[intervals.length - 1];
+ if (last && last.to === null) last.to = update.date;
+ intervals.push({ from: update.date, to: null, impact: row.impact });
+ byComponent.set(row.pageComponentId, intervals);
+ }
+ }
+ return byComponent;
+}
+
+// page-level projection: worst impact across components per time slice
+function mergeWorstImpactIntervals(
+ perComponent: ImpactInterval[][],
+): ImpactInterval[] {
+ const all = perComponent.flat();
+ if (all.length === 0) return [];
+
+ const boundaries = [...new Set(all.map((iv) => iv.from.getTime()))].sort(
+ (a, b) => a - b,
+ );
+
+ const merged: ImpactInterval[] = [];
+ for (let i = 0; i < boundaries.length; i++) {
+ const sliceStart = boundaries[i];
+ const sliceEnd = i + 1 < boundaries.length ? boundaries[i + 1] : null;
+ const active = all.filter(
+ (iv) =>
+ iv.from.getTime() <= sliceStart &&
+ (iv.to === null || iv.to.getTime() > sliceStart),
+ );
+ if (active.length === 0) continue;
+ const impact = worstImpact(active.map((iv) => iv.impact));
+ const last = merged[merged.length - 1];
+ if (
+ last &&
+ last.impact === impact &&
+ last.to !== null &&
+ last.to.getTime() === sliceStart
+ ) {
+ last.to = sliceEnd === null ? null : new Date(sliceEnd);
+ } else {
+ merged.push({
+ from: new Date(sliceStart),
+ to: sliceEnd === null ? null : new Date(sliceEnd),
+ impact,
+ });
+ }
+ }
+ return merged;
+}
+
+// keep impact downtime inside the event window the rest of the math uses
+function clampOpenIntervals(
+ intervals: ImpactInterval[] | undefined,
+ to: Date | null,
+): ImpactInterval[] | undefined {
+ if (!intervals || to === null) return intervals;
+ return intervals.map((iv) => (iv.to === null ? { ...iv, to } : iv));
+}
+
+/**
+ * Current impact per component: the latest update (by date, ties by id) that
+ * names it wins. Empty map ⇒ legacy report.
+ */
+export function currentImpactByComponent(report: {
+ statusReportUpdates: StatusReportUpdateWithImpactRows[];
+}): Map<number, PageComponentImpact> {
+ return currentImpactsFromUpdates(
+ report.statusReportUpdates.map((u) => ({
+ id: u.id,
+ date: u.date,
+ componentImpacts: u.statusReportUpdateToPageComponents ?? [],
+ })),
+ );
+}
+
+/**
+ * Worst status among still-active report events. "success"-status reports
+ * (everything operational for this projection) don't flag the component.
+ */
+export function activeReportStatus(
+ events: Event[],
+): "error" | "degraded" | undefined {
+ let worst: "error" | "degraded" | undefined;
+ for (const e of events) {
+ if (e.type !== "report" || e.to) continue;
+ if (e.status === "error") return "error";
+ if (e.status !== "success") worst = "degraded";
+ }
+ return worst;
+}
+
+export function getEvents({
+ maintenances,
+ incidents,
+ reports,
+ pageComponentId,
+ monitorId,
+ componentType,
+ pastDays = 45,
+}: {
+ maintenances: (Maintenance & {
+ maintenancesToPageComponents: {
+ pageComponent: PageComponent | null;
+ }[];
+ })[];
+ incidents: Incident[];
+ reports: (StatusReport & {
+ statusReportsToPageComponents: {
+ pageComponent: PageComponent | null;
+ }[];
+ statusReportUpdates: StatusReportUpdateWithImpactRows[];
+ })[];
+ pageComponentId?: number;
+ monitorId?: number;
+ componentType?: PageComponentType;
+ pastDays?: number;
+}): Event[] {
+ const events: Event[] = [];
+ const pastThreshold = new Date();
+ pastThreshold.setDate(pastThreshold.getDate() - pastDays);
+
+ // Filter maintenances - prioritize pageComponentId, fallback to monitorId for backward compatibility
+ maintenances
+ .filter((maintenance) => {
+ if (pageComponentId) {
+ return maintenance.maintenancesToPageComponents.some(
+ (m) => m.pageComponent?.id === pageComponentId,
+ );
+ }
+ if (monitorId) {
+ return maintenance.maintenancesToPageComponents.some(
+ (m) => m.pageComponent?.monitorId === monitorId,
+ );
+ }
+ return true;
+ })
+ .forEach((maintenance) => {
+ if (maintenance.from < pastThreshold) return;
+ events.push({
+ id: maintenance.id,
+ name: maintenance.title,
+ from: maintenance.from,
+ to: maintenance.to,
+ type: "maintenance",
+ status: "info" as const,
+ });
+ });
+
+ // Filter incidents - only for monitor-type components
+ // Static components don't have incidents
+ if (componentType !== "static") {
+ incidents
+ .filter((incident) =>
+ monitorId ? incident.monitorId === monitorId : true,
+ )
+ .forEach((incident) => {
+ if (!incident.createdAt || incident.createdAt < pastThreshold) return;
+ events.push({
+ id: incident.id,
+ name: "Downtime",
+ from: incident.createdAt,
+ to: incident.resolvedAt,
+ type: "incident",
+ status: "error" as const,
+ });
+ });
+ }
+
+ // Filter reports - prioritize pageComponentId, fallback to monitorId for backward compatibility
+ reports
+ .filter((report) => {
+ if (pageComponentId) {
+ return report.statusReportsToPageComponents.some(
+ (r) => r.pageComponent?.id === pageComponentId,
+ );
+ }
+ if (monitorId) {
+ return report.statusReportsToPageComponents.some(
+ (r) => r.pageComponent?.monitorId === monitorId,
+ );
+ }
+ return true;
+ })
+ .map((report) => {
+ const updates = [...report.statusReportUpdates].sort(
+ (a, b) => a.date.getTime() - b.date.getTime() || a.id - b.id,
+ );
+ if (updates.length === 0) return;
+
+ const firstUpdate = updates[0];
+ const lastUpdate = updates[updates.length - 1];
+
+ // NOTE: we don't check threshold here because we display all unresolved reports
+ if (!firstUpdate?.date) return;
+
+ const componentIntervals = buildComponentImpactIntervals(updates);
+ const hasImpacts = componentIntervals.size > 0;
+
+ const targetComponentId =
+ pageComponentId ??
+ (monitorId
+ ? report.statusReportsToPageComponents.find(
+ (r) => r.pageComponent?.monitorId === monitorId,
+ )?.pageComponent?.id
+ : undefined);
+
+ // per-component view projects that component's timeline; page-level
+ // takes the worst impact across components per time slice
+ let impactIntervals: ImpactInterval[] | undefined;
+ if (hasImpacts) {
+ impactIntervals =
+ targetComponentId !== undefined
+ ? (componentIntervals.get(targetComponentId) ?? [])
+ : mergeWorstImpactIntervals([...componentIntervals.values()]);
+ }
+
+ // HACKY: LEGACY: we shouldn't have report.status anymore and instead use the update status for that.
+ if (report.status === "resolved") {
+ const to = lastUpdate?.date ?? null;
+ // unresolved reports show regardless of age; a resolved report that
+ // ended before the window is out of range — drop it
+ if (to !== null && to < pastThreshold) return;
+ events.push({
+ id: report.id,
+ name: report.title,
+ from: firstUpdate?.date,
+ to,
+ type: "report",
+ status: "success" as const,
+ impactIntervals: clampOpenIntervals(impactIntervals, to),
+ });
+ return;
+ }
+
+ const to =
+ lastUpdate?.status === "resolved" || lastUpdate?.status === "monitoring"
+ ? lastUpdate?.date
+ : null;
+
+ // derived from the open (current) impacts; legacy stays flat orange.
+ // No open non-operational interval — including the empty-projection
+ // case (component never named by any update) — reads "success" BY
+ // DESIGN: an open report whose impacts are all cleared no longer
+ // flags the component, even before the report is formally resolved.
+ const openImpacts = (impactIntervals ?? [])
+ .filter((iv) => iv.to === null)
+ .map((iv) => iv.impact);
+ const status = hasImpacts
+ ? impactToStatusType(worstImpact(openImpacts))
+ : ("degraded" as const);
+
+ events.push({
+ id: report.id,
+ name: report.title,
+ from: firstUpdate?.date,
+ to,
+ type: "report",
+ status,
+ impactIntervals: clampOpenIntervals(impactIntervals, to),
+ });
+ });
+
+ return events;
+}
+
+// Keep the old function name for backward compatibility
+export const getEventsByMonitorId = getEvents;
+
+// Priority mapping for status types (higher number = higher priority)
+const STATUS_PRIORITY = {
+ error: 3,
+ degraded: 2,
+ info: 1,
+ success: 0,
+ empty: -1,
+} as const;
+
+export function getWorstVariant<T extends keyof typeof STATUS_PRIORITY>(
+ statuses: T[],
+): T | "success" {
+ return statuses.reduce<T | "success">(
+ (worst, current) =>
+ STATUS_PRIORITY[current] > STATUS_PRIORITY[worst] ? current : worst,
+ "success",
+ );
+}
+
+// Helper to get highest priority status from data
+export function getHighestPriorityStatus(
+ item: StatusData,
+): keyof typeof STATUS_PRIORITY {
+ if (item.error > 0) return "error";
+ if (item.degraded > 0) return "degraded";
+ if (item.ok > 0) return "success";
+
+ return "empty";
+}
+
+// worst report impact for one day; null = legacy event (no impact rows)
+export function reportEventDayImpact(
+ event: Event,
+ date: Date,
+): PageComponentImpact | null {
+ if (!event.impactIntervals) return null;
+
+ const startOfDay = new Date(date);
+ startOfDay.setUTCHours(0, 0, 0, 0);
+ const endOfDay = new Date(date);
+ endOfDay.setUTCHours(23, 59, 59, 999);
+
+ const overlapping = event.impactIntervals.filter((iv) => {
+ const end = iv.to ?? new Date();
+ return (
+ iv.from.getTime() <= endOfDay.getTime() &&
+ end.getTime() >= startOfDay.getTime()
+ );
+ });
+ return worstImpact(overlapping.map((iv) => iv.impact));
+}
+
+// worst projected report color for one day; legacy events stay orange
+export function reportEventDayStatus(
+ event: Event,
+ date: Date,
+): "success" | "degraded" | "error" {
+ const impact = reportEventDayImpact(event, date);
+ return impact === null ? "degraded" : impactToStatusType(impact);
+}
+
+// Helper to check if date is within event range
+export function isDateWithinEvent(date: Date, event: Event): boolean {
+ const startOfDay = new Date(date);
+ startOfDay.setUTCHours(0, 0, 0, 0);
+
+ const endOfDay = new Date(date);
+ endOfDay.setUTCHours(23, 59, 59, 999);
+
+ const eventStart = new Date(event.from);
+ const eventEnd = event.to ? new Date(event.to) : new Date();
+
+ return (
+ eventStart.getTime() <= endOfDay.getTime() &&
+ eventEnd.getTime() >= startOfDay.getTime()
+ );
+}
+
+export type DayStatus =
+ | "operational"
+ | "degraded"
+ | "down"
+ | "maintenance"
+ | "empty";
+
+// Convenience per-day status: event severity (incident > report > maintenance)
+// wins, else fall back to the uptime buckets. Mirrors the "dominant" bar rule.
+export function resolveDayStatus(
+ bucket: StatusData,
+ events: Event[],
+): { status: DayStatus; impact?: PageComponentImpact } {
+ const date = new Date(bucket.day);
+ const dayEvents = events.filter((e) => isDateWithinEvent(date, e));
+ const reports = dayEvents.filter((e) => e.type === "report");
+
+ const dayImpacts = reports
+ .map((e) => reportEventDayImpact(e, date))
+ .filter((i): i is PageComponentImpact => i !== null);
+ const impact = dayImpacts.length > 0 ? worstImpact(dayImpacts) : undefined;
+
+ if (dayEvents.some((e) => e.type === "incident")) {
+ return { status: "down", impact };
+ }
+
+ const reportsDayStatus = reports.length
+ ? getWorstVariant(reports.map((e) => reportEventDayStatus(e, date)))
+ : undefined;
+ if (reportsDayStatus && reportsDayStatus !== "success") {
+ return {
+ status: reportsDayStatus === "error" ? "down" : "degraded",
+ impact,
+ };
+ }
+
+ if (dayEvents.some((e) => e.type === "maintenance")) {
+ return { status: "maintenance", impact };
+ }
+
+ switch (getHighestPriorityStatus(bucket)) {
+ case "error":
+ return { status: "down" };
+ case "degraded":
+ return { status: "degraded" };
+ case "success":
+ return { status: "operational" };
+ default:
+ return { status: "empty" };
+ }
+}
+
+// worst impact over the whole event (reports only); undefined ⇒ no impact rows
+export function eventWorstImpact(
+ event: Event,
+): PageComponentImpact | undefined {
+ if (!event.impactIntervals || event.impactIntervals.length === 0) {
+ return undefined;
+ }
+ return worstImpact(event.impactIntervals.map((iv) => iv.impact));
+}
diff --git a/packages/services/src/status-timeline/index.ts b/packages/services/src/status-timeline/index.ts
new file mode 100644
index 000000000..1784004f0
--- /dev/null
+++ b/packages/services/src/status-timeline/index.ts
@@ -0,0 +1 @@
+export * from "./events";
diff --git a/packages/ui/registry.json b/packages/ui/registry.json
index 853f59cb3..e877e2b17 100644
--- a/packages/ui/registry.json
+++ b/packages/ui/registry.json
@@ -4,44 +4,21 @@
"homepage": "https://openstatus.dev",
"version": "0.2.0",
"style": "default",
- "tailwind": {
- "config": {
- "theme": {
- "extend": {
- "colors": {
- "success": "hsl(var(--success))",
- "success-foreground": "hsl(var(--success-foreground))",
- "warning": "hsl(var(--warning))",
- "warning-foreground": "hsl(var(--warning-foreground))",
- "destructive": "hsl(var(--destructive))",
- "destructive-foreground": "hsl(var(--destructive-foreground))",
- "info": "hsl(var(--info))",
- "info-foreground": "hsl(var(--info-foreground))"
- }
- }
- }
- }
- },
"cssVars": {
+ "theme": {
+ "color-success": "var(--success)",
+ "color-warning": "var(--warning)",
+ "color-info": "var(--info)"
+ },
"light": {
- "success": "142.1 76.2% 36.3%",
- "success-foreground": "355.7 100% 97.3%",
- "warning": "38 92% 50%",
- "warning-foreground": "48 96% 89%",
- "destructive": "0 84.2% 60.2%",
- "destructive-foreground": "0 0% 98%",
- "info": "221.2 83.2% 53.3%",
- "info-foreground": "210 40% 98%"
+ "success": "oklch(0.72 0.19 150)",
+ "warning": "oklch(0.77 0.16 70)",
+ "info": "oklch(0.62 0.19 260)"
},
"dark": {
- "success": "142.1 70.6% 45.3%",
- "success-foreground": "144.9 80.4% 10%",
- "warning": "38 92% 50%",
- "warning-foreground": "48 96% 89%",
- "destructive": "0 72.2% 50.6%",
- "destructive-foreground": "0 85.7% 97.3%",
- "info": "217.2 91.2% 59.8%",
- "info-foreground": "222.2 47.4% 11.2%"
+ "success": "oklch(0.72 0.19 150)",
+ "warning": "oklch(0.77 0.16 70)",
+ "info": "oklch(0.62 0.19 260)"
}
},
"items": [
@@ -91,6 +68,23 @@
"title": "Status Utilities",
"description": "Utility functions for status formatting and display",
"dependencies": ["date-fns"],
+ "cssVars": {
+ "theme": {
+ "color-success": "var(--success)",
+ "color-warning": "var(--warning)",
+ "color-info": "var(--info)"
+ },
+ "light": {
+ "success": "oklch(0.72 0.19 150)",
+ "warning": "oklch(0.77 0.16 70)",
+ "info": "oklch(0.62 0.19 260)"
+ },
+ "dark": {
+ "success": "oklch(0.72 0.19 150)",
+ "warning": "oklch(0.77 0.16 70)",
+ "info": "oklch(0.62 0.19 260)"
+ }
+ },
"files": [
{
"path": "src/components/blocks/status.utils.ts",
@@ -106,6 +100,23 @@
"description": "Unified status icon component with variants for different contexts",
"registryDependencies": ["status-types"],
"dependencies": ["lucide-react"],
+ "cssVars": {
+ "theme": {
+ "color-success": "var(--success)",
+ "color-warning": "var(--warning)",
+ "color-info": "var(--info)"
+ },
+ "light": {
+ "success": "oklch(0.72 0.19 150)",
+ "warning": "oklch(0.77 0.16 70)",
+ "info": "oklch(0.62 0.19 260)"
+ },
+ "dark": {
+ "success": "oklch(0.72 0.19 150)",
+ "warning": "oklch(0.77 0.16 70)",
+ "info": "oklch(0.62 0.19 260)"
+ }
+ },
"files": [
{
"path": "src/components/blocks/status-icon.tsx",
@@ -166,7 +177,12 @@
"use-copy-to-clipboard",
"use-media-query"
],
- "dependencies": ["date-fns", "@date-fns/[email protected]", "lucide-react"],
+ "dependencies": [
+ "@radix-ui/react-hover-card",
+ "date-fns",
+ "@date-fns/[email protected]",
+ "lucide-react"
+ ],
"files": [
{
"path": "src/components/blocks/status-timestamp.tsx",
@@ -252,7 +268,7 @@
"separator",
"tooltip"
],
- "dependencies": ["date-fns", "lucide-react"],
+ "dependencies": ["@radix-ui/react-slot", "date-fns", "lucide-react"],
"files": [
{
"path": "src/components/blocks/status-events.tsx",
@@ -299,7 +315,7 @@
"skeleton",
"use-media-query"
],
- "dependencies": ["date-fns", "lucide-react", "react-day-picker"],
+ "dependencies": ["date-fns", "lucide-react", "react-day-picker@8"],
"files": [
{
"path": "src/components/blocks/status-calendar.tsx",
diff --git a/packages/ui/src/components/blocks/status-bar.tsx b/packages/ui/src/components/blocks/status-bar.tsx
index e923d41c7..11ea8cf10 100644
--- a/packages/ui/src/components/blocks/status-bar.tsx
+++ b/packages/ui/src/components/blocks/status-bar.tsx
@@ -118,7 +118,7 @@ function useStatusBar({ dataLength, isTouch }: UseStatusBarProps) {
const [activeIndex, setActiveIndex] = useState<number | null>(null);
const [interactionType, setInteractionType] = useState<InteractionType>(null);
const buttonRefs = useRef<(HTMLElement | null)[]>([]);
- const hoverTimeoutRef = useRef<NodeJS.Timeout | null>(null);
+ const hoverTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);
const containerRef = useRef<HTMLDivElement>(null);
// Clear hover timeout on unmount