Skip to content

Commit c3d087f

Browse files
feat: add custom_domain to StatusPageSummary proto message (#2007)
Include custom_domain in list responses so API consumers can access the custom URL without fetching the full StatusPage detail.
1 parent d2fe184 commit c3d087f

File tree

5 files changed

+112
-1
lines changed

5 files changed

+112
-1
lines changed

apps/server/src/routes/rpc/services/status-page/converters.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ export function dbPageToProtoSummary(page: DBPage): StatusPageSummary {
235235
published: page.published ?? false,
236236
createdAt: page.createdAt?.toISOString() ?? "",
237237
updatedAt: page.updatedAt?.toISOString() ?? "",
238+
customDomain: page.customDomain ?? "",
238239
};
239240
}
240241

apps/server/static/openapi.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2181,6 +2181,18 @@ components:
21812181
- "null"
21822182
title: contact_url
21832183
description: URL to the contact page (optional).
2184+
defaultLocale:
2185+
oneOf:
2186+
- $ref: '#/components/schemas/openstatus.status_page.v1.Locale'
2187+
- type: "null"
2188+
title: default_locale
2189+
description: Default locale for the status page (optional, defaults to EN).
2190+
locales:
2191+
type: array
2192+
items:
2193+
$ref: '#/components/schemas/openstatus.status_page.v1.Locale'
2194+
title: locales
2195+
description: Enabled locales for the status page (optional).
21842196
title: CreateStatusPageRequest
21852197
additionalProperties: false
21862198
description: CreateStatusPageRequest is the request to create a new status page.
@@ -2442,6 +2454,15 @@ components:
24422454
title: ListSubscribersResponse
24432455
additionalProperties: false
24442456
description: ListSubscribersResponse is the response containing status page subscribers.
2457+
openstatus.status_page.v1.Locale:
2458+
type: string
2459+
title: Locale
2460+
enum:
2461+
- LOCALE_UNSPECIFIED
2462+
- LOCALE_EN
2463+
- LOCALE_FR
2464+
- LOCALE_DE
2465+
description: Locale defines the supported languages for a status page.
24452466
openstatus.status_page.v1.OverallStatus:
24462467
type: string
24472468
title: OverallStatus
@@ -2676,6 +2697,16 @@ components:
26762697
- "2024-06-20T14:30:00Z"
26772698
title: updated_at
26782699
description: Timestamp when the page was last updated (RFC 3339 format).
2700+
defaultLocale:
2701+
title: default_locale
2702+
description: Default locale for the status page.
2703+
$ref: '#/components/schemas/openstatus.status_page.v1.Locale'
2704+
locales:
2705+
type: array
2706+
items:
2707+
$ref: '#/components/schemas/openstatus.status_page.v1.Locale'
2708+
title: locales
2709+
description: Enabled locales for the status page.
26792710
title: StatusPage
26802711
additionalProperties: false
26812712
description: StatusPage represents a full status page with all details.
@@ -2706,6 +2737,12 @@ components:
27062737
type: string
27072738
title: updated_at
27082739
description: Timestamp when the page was last updated (RFC 3339 format).
2740+
customDomain:
2741+
type: string
2742+
examples:
2743+
- status.example.com
2744+
title: custom_domain
2745+
description: Custom domain for the status page (optional).
27092746
title: StatusPageSummary
27102747
additionalProperties: false
27112748
description: StatusPageSummary represents metadata for a status page (used in list responses).
@@ -2904,6 +2941,18 @@ components:
29042941
- "null"
29052942
title: contact_url
29062943
description: New contact URL (optional).
2944+
defaultLocale:
2945+
oneOf:
2946+
- $ref: '#/components/schemas/openstatus.status_page.v1.Locale'
2947+
- type: "null"
2948+
title: default_locale
2949+
description: New default locale for the status page (optional).
2950+
locales:
2951+
type: array
2952+
items:
2953+
$ref: '#/components/schemas/openstatus.status_page.v1.Locale'
2954+
title: locales
2955+
description: New enabled locales for the status page (optional).
29072956
title: UpdateStatusPageRequest
29082957
additionalProperties: false
29092958
description: UpdateStatusPageRequest is the request to update a status page.

packages/proto/api/openstatus/status_page/v1/status_page.proto

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,9 @@ message StatusPageSummary {
117117

118118
// Timestamp when the page was last updated (RFC 3339 format).
119119
string updated_at = 6;
120+
121+
// Custom domain for the status page (optional).
122+
string custom_domain = 7 [
123+
(gnostic.openapi.v3.property) = {example: {yaml: "status.example.com"}}
124+
];
120125
}

packages/proto/gen/openapi.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2181,6 +2181,18 @@ components:
21812181
- "null"
21822182
title: contact_url
21832183
description: URL to the contact page (optional).
2184+
defaultLocale:
2185+
oneOf:
2186+
- $ref: '#/components/schemas/openstatus.status_page.v1.Locale'
2187+
- type: "null"
2188+
title: default_locale
2189+
description: Default locale for the status page (optional, defaults to EN).
2190+
locales:
2191+
type: array
2192+
items:
2193+
$ref: '#/components/schemas/openstatus.status_page.v1.Locale'
2194+
title: locales
2195+
description: Enabled locales for the status page (optional).
21842196
title: CreateStatusPageRequest
21852197
additionalProperties: false
21862198
description: CreateStatusPageRequest is the request to create a new status page.
@@ -2442,6 +2454,15 @@ components:
24422454
title: ListSubscribersResponse
24432455
additionalProperties: false
24442456
description: ListSubscribersResponse is the response containing status page subscribers.
2457+
openstatus.status_page.v1.Locale:
2458+
type: string
2459+
title: Locale
2460+
enum:
2461+
- LOCALE_UNSPECIFIED
2462+
- LOCALE_EN
2463+
- LOCALE_FR
2464+
- LOCALE_DE
2465+
description: Locale defines the supported languages for a status page.
24452466
openstatus.status_page.v1.OverallStatus:
24462467
type: string
24472468
title: OverallStatus
@@ -2676,6 +2697,16 @@ components:
26762697
- "2024-06-20T14:30:00Z"
26772698
title: updated_at
26782699
description: Timestamp when the page was last updated (RFC 3339 format).
2700+
defaultLocale:
2701+
title: default_locale
2702+
description: Default locale for the status page.
2703+
$ref: '#/components/schemas/openstatus.status_page.v1.Locale'
2704+
locales:
2705+
type: array
2706+
items:
2707+
$ref: '#/components/schemas/openstatus.status_page.v1.Locale'
2708+
title: locales
2709+
description: Enabled locales for the status page.
26792710
title: StatusPage
26802711
additionalProperties: false
26812712
description: StatusPage represents a full status page with all details.
@@ -2706,6 +2737,12 @@ components:
27062737
type: string
27072738
title: updated_at
27082739
description: Timestamp when the page was last updated (RFC 3339 format).
2740+
customDomain:
2741+
type: string
2742+
examples:
2743+
- status.example.com
2744+
title: custom_domain
2745+
description: Custom domain for the status page (optional).
27092746
title: StatusPageSummary
27102747
additionalProperties: false
27112748
description: StatusPageSummary represents metadata for a status page (used in list responses).
@@ -2904,6 +2941,18 @@ components:
29042941
- "null"
29052942
title: contact_url
29062943
description: New contact URL (optional).
2944+
defaultLocale:
2945+
oneOf:
2946+
- $ref: '#/components/schemas/openstatus.status_page.v1.Locale'
2947+
- type: "null"
2948+
title: default_locale
2949+
description: New default locale for the status page (optional).
2950+
locales:
2951+
type: array
2952+
items:
2953+
$ref: '#/components/schemas/openstatus.status_page.v1.Locale'
2954+
title: locales
2955+
description: New enabled locales for the status page (optional).
29072956
title: UpdateStatusPageRequest
29082957
additionalProperties: false
29092958
description: UpdateStatusPageRequest is the request to update a status page.

packages/proto/gen/ts/openstatus/status_page/v1/status_page_pb.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import type { Message } from "@bufbuild/protobuf";
1111
* Describes the file openstatus/status_page/v1/status_page.proto.
1212
*/
1313
export const file_openstatus_status_page_v1_status_page: GenFile = /*@__PURE__*/
14-
fileDesc("CitvcGVuc3RhdHVzL3N0YXR1c19wYWdlL3YxL3N0YXR1c19wYWdlLnByb3RvEhlvcGVuc3RhdHVzLnN0YXR1c19wYWdlLnYxIqAECgpTdGF0dXNQYWdlEgoKAmlkGAEgASgJEg0KBXRpdGxlGAIgASgJEhMKC2Rlc2NyaXB0aW9uGAMgASgJEh4KBHNsdWcYBCABKAlCELpHDToLEglhY21lLWNvcnASMAoNY3VzdG9tX2RvbWFpbhgFIAEoCUIZukcWOhQSEnN0YXR1cy5leGFtcGxlLmNvbRIRCglwdWJsaXNoZWQYBiABKAgSPgoLYWNjZXNzX3R5cGUYByABKA4yKS5vcGVuc3RhdHVzLnN0YXR1c19wYWdlLnYxLlBhZ2VBY2Nlc3NUeXBlEjMKBXRoZW1lGAggASgOMiQub3BlbnN0YXR1cy5zdGF0dXNfcGFnZS52MS5QYWdlVGhlbWUSFAoMaG9tZXBhZ2VfdXJsGAkgASgJEhMKC2NvbnRhY3RfdXJsGAogASgJEgwKBGljb24YCyABKAkSLw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RAFEhoKFk9WRVJBTExfU1RBVFVTX1VOS05PV04QBkJaWlhnaXRodWIuY29tL29wZW5zdGF0dXNocS9vcGVuc3RhdHVzL3BhY2thZ2VzL3Byb3RvL29wZW5zdGF0dXMvc3RhdHVzX3BhZ2UvdjE7c3RhdHVzcGFnZXYxYgZwcm90bzM", [file_gnostic_openapi_v3_annotations]);
1515

1616
/**
1717
* StatusPage represents a full status page with all details.
@@ -179,6 +179,13 @@ export type StatusPageSummary = Message<"openstatus.status_page.v1.StatusPageSum
179179
* @generated from field: string updated_at = 6;
180180
*/
181181
updatedAt: string;
182+
183+
/**
184+
* Custom domain for the status page (optional).
185+
*
186+
* @generated from field: string custom_domain = 7;
187+
*/
188+
customDomain: string;
182189
};
183190

184191
/**

0 commit comments

Comments
 (0)