diff --git a/docs/openapi/monitoring-api.json b/docs/openapi/monitoring-api.json index 9e73bdb..ccd3413 100644 --- a/docs/openapi/monitoring-api.json +++ b/docs/openapi/monitoring-api.json @@ -15794,7 +15794,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/TableValueResultStatusPageComponentUptimeDayDto" + "$ref": "#/components/schemas/TableValueResultComponentUptimeDayDto" } } } @@ -16343,6 +16343,127 @@ } } }, + "/api/v1/status-pages/{id}/domains/{domainId}/primary": { + "post": { + "tags": [ + "Status Pages" + ], + "summary": "Mark a verified custom domain as the page's primary host", + "operationId": "setPrimaryDomain", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "domainId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/SingleValueResponseStatusPageCustomDomainDto" + } + } + } + }, + "400": { + "description": "Bad request — the payload failed validation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden — the actor lacks permission for this resource", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not found — the requested resource does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "409": { + "description": "Conflict — the request collides with current resource state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal server error — see the message field for details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "502": { + "description": "Bad gateway — an upstream provider returned an error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "503": { + "description": "Service unavailable — try again shortly", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, "/api/v1/status-pages/{id}/domains/{domainId}/verify": { "post": { "tags": [ @@ -21970,7 +22091,6 @@ "ComponentUptimeDayDto": { "required": [ "date", - "source", "partialOutageSeconds", "majorOutageSeconds", "degradedSeconds", @@ -21980,7 +22100,7 @@ "properties": { "date": { "type": "string", - "description": "Date of the daily bucket (ISO 8601)", + "description": "Start-of-day timestamp for this bucket (UTC midnight, ISO 8601)", "format": "date-time" }, "partialOutageSeconds": { @@ -22000,17 +22120,16 @@ }, "uptimePercentage": { "type": "number", - "description": "Computed uptime percentage for the day", + "description": "Computed uptime percentage using the weighted formula (degraded does not lower it)", "format": "double" }, - "eventsJson": { - "type": "string", - "description": "Incident event references for this day as raw JSON", - "nullable": true - }, - "source": { - "type": "string", - "description": "Data source: vendor_reported or incident_derived" + "incidents": { + "type": "array", + "description": "Incidents that overlapped this day, in display order", + "nullable": true, + "items": { + "$ref": "#/components/schemas/IncidentRef" + } } }, "description": "Daily uptime data for a component" @@ -24991,19 +25110,19 @@ "properties": { "id": { "type": "string", - "description": "Status page incident ID", + "description": "Internal incident ID — UUID for status-page incidents, service incident UUID for catalog", "format": "uuid" }, "title": { "type": "string", - "description": "Incident title" + "description": "Incident title at the time of the overlap" }, "impact": { "type": "string", - "description": "Incident impact level" + "description": "Incident impact level (e.g. minor, major, critical for catalog; NONE/MINOR/MAJOR/CRITICAL for status pages)" } }, - "description": "Lightweight reference to an incident overlapping this day" + "description": "Lightweight reference to an incident overlapping a given uptime day" }, "IncidentsSummaryDto": { "type": "object", @@ -29706,46 +29825,6 @@ } } }, - "StatusPageComponentUptimeDayDto": { - "required": [ - "date", - "partialOutageSeconds", - "majorOutageSeconds", - "uptimePercentage" - ], - "type": "object", - "properties": { - "date": { - "type": "string", - "description": "Start-of-day timestamp for this bucket (UTC midnight)", - "format": "date-time" - }, - "partialOutageSeconds": { - "type": "integer", - "description": "Seconds of partial outage on this day", - "format": "int32" - }, - "majorOutageSeconds": { - "type": "integer", - "description": "Seconds of major outage on this day", - "format": "int32" - }, - "uptimePercentage": { - "type": "number", - "description": "Computed uptime percentage using weighted formula", - "format": "double" - }, - "incidents": { - "type": "array", - "description": "Incidents that overlapped this day", - "nullable": true, - "items": { - "$ref": "#/components/schemas/IncidentRef" - } - } - }, - "description": "Daily uptime data for a status page component" - }, "StatusPageCustomDomainDto": { "required": [ "createdAt", @@ -29801,6 +29880,19 @@ "type": "string", "nullable": true }, + "cfCustomHostnameId": { + "type": "string", + "nullable": true + }, + "cfSslStatus": { + "type": "string", + "nullable": true + }, + "sslActiveAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, "createdAt": { "type": "string", "format": "date-time" @@ -30979,38 +31071,6 @@ } } }, - "TableValueResultStatusPageComponentUptimeDayDto": { - "required": [ - "data", - "hasNext", - "hasPrev" - ], - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StatusPageComponentUptimeDayDto" - } - }, - "hasNext": { - "type": "boolean" - }, - "hasPrev": { - "type": "boolean" - }, - "totalElements": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "totalPages": { - "type": "integer", - "format": "int32", - "nullable": true - } - } - }, "TableValueResultStatusPageCustomDomainDto": { "required": [ "data", diff --git a/src/devhelm/_generated.py b/src/devhelm/_generated.py index 8969c84..0495bf8 100644 --- a/src/devhelm/_generated.py +++ b/src/devhelm/_generated.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: .openapi-preprocessed.json -# timestamp: 2026-04-22T14:03:54+00:00 +# timestamp: 2026-04-23T14:44:11+00:00 from __future__ import annotations from typing import Annotated, Any, Literal @@ -741,51 +741,6 @@ class ComponentStatusDto(BaseModel): ] -class ComponentUptimeDayDto(BaseModel): - model_config = ConfigDict(extra="forbid") - date: Annotated[ - AwareDatetime, Field(description="Date of the daily bucket (ISO 8601)") - ] - partial_outage_seconds: Annotated[ - int, - Field( - alias="partialOutageSeconds", - description="Seconds of partial outage observed on this day", - ), - ] - major_outage_seconds: Annotated[ - int, - Field( - alias="majorOutageSeconds", - description="Seconds of major outage observed on this day", - ), - ] - degraded_seconds: Annotated[ - int, - Field( - alias="degradedSeconds", - description="Seconds the component spent in degraded performance on this day", - ), - ] - uptime_percentage: Annotated[ - float, - Field( - alias="uptimePercentage", - description="Computed uptime percentage for the day", - ), - ] - events_json: Annotated[ - str | None, - Field( - alias="eventsJson", - description="Incident event references for this day as raw JSON", - ), - ] = None - source: Annotated[ - str, Field(description="Data source: vendor_reported or incident_derived") - ] - - class ComponentUptimeSummaryDto(BaseModel): model_config = ConfigDict(extra="forbid") day: Annotated[ @@ -2522,9 +2477,21 @@ class IncidentFilterParams(BaseModel): class IncidentRef(BaseModel): model_config = ConfigDict(extra="forbid") - id: Annotated[UUID, Field(description="Status page incident ID")] - title: Annotated[str, Field(description="Incident title")] - impact: Annotated[str, Field(description="Incident impact level")] + id: Annotated[ + UUID, + Field( + description="Internal incident ID — UUID for status-page incidents, service incident UUID for catalog" + ), + ] + title: Annotated[ + str, Field(description="Incident title at the time of the overlap") + ] + impact: Annotated[ + str, + Field( + description="Incident impact level (e.g. minor, major, critical for catalog; NONE/MINOR/MAJOR/CRITICAL for status pages)" + ), + ] class IncidentsSummaryDto(BaseModel): @@ -4739,39 +4706,6 @@ class StatusPageComponentGroupDto(BaseModel): updated_at: Annotated[AwareDatetime, Field(alias="updatedAt")] -class StatusPageComponentUptimeDayDto(BaseModel): - model_config = ConfigDict(extra="forbid") - date: Annotated[ - AwareDatetime, - Field(description="Start-of-day timestamp for this bucket (UTC midnight)"), - ] - partial_outage_seconds: Annotated[ - int, - Field( - alias="partialOutageSeconds", - description="Seconds of partial outage on this day", - ), - ] - major_outage_seconds: Annotated[ - int, - Field( - alias="majorOutageSeconds", - description="Seconds of major outage on this day", - ), - ] - uptime_percentage: Annotated[ - float, - Field( - alias="uptimePercentage", - description="Computed uptime percentage using weighted formula", - ), - ] - incidents: Annotated[ - list[IncidentRef] | None, - Field(description="Incidents that overlapped this day"), - ] = None - - class Status14(StrEnum): pending_verification = "PENDING_VERIFICATION" verification_failed = "VERIFICATION_FAILED" @@ -4799,6 +4733,11 @@ class StatusPageCustomDomainDto(BaseModel): verification_cname_target: Annotated[str, Field(alias="verificationCnameTarget")] verified_at: Annotated[AwareDatetime | None, Field(alias="verifiedAt")] = None verification_error: Annotated[str | None, Field(alias="verificationError")] = None + cf_custom_hostname_id: Annotated[str | None, Field(alias="cfCustomHostnameId")] = ( + None + ) + cf_ssl_status: Annotated[str | None, Field(alias="cfSslStatus")] = None + ssl_active_at: Annotated[AwareDatetime | None, Field(alias="sslActiveAt")] = None created_at: Annotated[AwareDatetime, Field(alias="createdAt")] updated_at: Annotated[AwareDatetime, Field(alias="updatedAt")] primary: bool @@ -4929,15 +4868,6 @@ class TableValueResultCategoryDto(BaseModel): total_pages: Annotated[int | None, Field(alias="totalPages")] = None -class TableValueResultComponentUptimeDayDto(BaseModel): - model_config = ConfigDict(extra="forbid") - data: list[ComponentUptimeDayDto] - has_next: Annotated[bool, Field(alias="hasNext")] - has_prev: Annotated[bool, Field(alias="hasPrev")] - total_elements: Annotated[int | None, Field(alias="totalElements")] = None - total_pages: Annotated[int | None, Field(alias="totalPages")] = None - - class TableValueResultDeliveryAttemptDto(BaseModel): model_config = ConfigDict(extra="forbid") data: list[DeliveryAttemptDto] @@ -5073,15 +5003,6 @@ class TableValueResultStatusPageComponentGroupDto(BaseModel): total_pages: Annotated[int | None, Field(alias="totalPages")] = None -class TableValueResultStatusPageComponentUptimeDayDto(BaseModel): - model_config = ConfigDict(extra="forbid") - data: list[StatusPageComponentUptimeDayDto] - has_next: Annotated[bool, Field(alias="hasNext")] - has_prev: Annotated[bool, Field(alias="hasPrev")] - total_elements: Annotated[int | None, Field(alias="totalElements")] = None - total_pages: Annotated[int | None, Field(alias="totalPages")] = None - - class TableValueResultStatusPageCustomDomainDto(BaseModel): model_config = ConfigDict(extra="forbid") data: list[StatusPageCustomDomainDto] @@ -6216,16 +6137,6 @@ class AuthMeResponse(BaseModel): rate_limits: Annotated[RateLimitInfo, Field(alias="rateLimits")] -class BatchComponentUptimeDto(BaseModel): - model_config = ConfigDict(extra="forbid") - components: Annotated[ - dict[str, list[ComponentUptimeDayDto]], - Field( - description="Map of component ID → list of per-day uptime entries (oldest → newest)" - ), - ] - - class BulkMonitorActionRequest(BaseModel): model_config = ConfigDict(extra="forbid") monitor_ids: Annotated[ @@ -6280,6 +6191,48 @@ class CheckTypeDetailsDto(RootModel[Http | Tcp | Icmp | Dns | McpServer]): ] +class ComponentUptimeDayDto(BaseModel): + model_config = ConfigDict(extra="forbid") + date: Annotated[ + AwareDatetime, + Field( + description="Start-of-day timestamp for this bucket (UTC midnight, ISO 8601)" + ), + ] + partial_outage_seconds: Annotated[ + int, + Field( + alias="partialOutageSeconds", + description="Seconds of partial outage observed on this day", + ), + ] + major_outage_seconds: Annotated[ + int, + Field( + alias="majorOutageSeconds", + description="Seconds of major outage observed on this day", + ), + ] + degraded_seconds: Annotated[ + int, + Field( + alias="degradedSeconds", + description="Seconds the component spent in degraded performance on this day", + ), + ] + uptime_percentage: Annotated[ + float, + Field( + alias="uptimePercentage", + description="Computed uptime percentage using the weighted formula (degraded does not lower it)", + ), + ] + incidents: Annotated[ + list[IncidentRef] | None, + Field(description="Incidents that overlapped this day, in display order"), + ] = None + + class CreateAlertChannelRequest(BaseModel): model_config = ConfigDict(extra="forbid") name: Annotated[ @@ -7154,11 +7107,6 @@ class SingleValueResponseAuthMeResponse(BaseModel): data: AuthMeResponse -class SingleValueResponseBatchComponentUptimeDto(BaseModel): - model_config = ConfigDict(extra="forbid") - data: BatchComponentUptimeDto - - class SingleValueResponseBulkMonitorActionResult(BaseModel): model_config = ConfigDict(extra="forbid") data: BulkMonitorActionResult @@ -7317,6 +7265,15 @@ class StatusPageIncidentDto(BaseModel): updated_at: Annotated[AwareDatetime, Field(alias="updatedAt")] +class TableValueResultComponentUptimeDayDto(BaseModel): + model_config = ConfigDict(extra="forbid") + data: list[ComponentUptimeDayDto] + has_next: Annotated[bool, Field(alias="hasNext")] + has_prev: Annotated[bool, Field(alias="hasPrev")] + total_elements: Annotated[int | None, Field(alias="totalElements")] = None + total_pages: Annotated[int | None, Field(alias="totalPages")] = None + + class TableValueResultIntegrationDto(BaseModel): model_config = ConfigDict(extra="forbid") data: list[IntegrationDto] @@ -7547,6 +7504,16 @@ class UpdateNotificationPolicyRequest(BaseModel): ] = None +class BatchComponentUptimeDto(BaseModel): + model_config = ConfigDict(extra="forbid") + components: Annotated[ + dict[str, list[ComponentUptimeDayDto]], + Field( + description="Map of component ID → list of per-day uptime entries (oldest → newest)" + ), + ] + + class CheckResultDetailsDto(BaseModel): model_config = ConfigDict(extra="forbid") status_code: Annotated[ @@ -7693,6 +7660,11 @@ class CursorPageCheckResultDto(BaseModel): ] +class SingleValueResponseBatchComponentUptimeDto(BaseModel): + model_config = ConfigDict(extra="forbid") + data: BatchComponentUptimeDto + + class SingleValueResponseStatusPageIncidentDto(BaseModel): model_config = ConfigDict(extra="forbid") data: StatusPageIncidentDto diff --git a/uv.lock b/uv.lock index b27703c..437d105 100644 --- a/uv.lock +++ b/uv.lock @@ -331,7 +331,7 @@ wheels = [ [[package]] name = "devhelm" -version = "0.2.1" +version = "0.3.0" source = { editable = "." } dependencies = [ { name = "httpx" },