-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_generated.py
More file actions
7730 lines (6956 loc) · 245 KB
/
_generated.py
File metadata and controls
7730 lines (6956 loc) · 245 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# generated by datamodel-codegen:
# filename: .openapi-preprocessed.json
from __future__ import annotations
from typing import Annotated, Any, Literal
from pydantic import ConfigDict, AwareDatetime, BaseModel, EmailStr, Field, RootModel
from enum import StrEnum
from uuid import UUID
from datetime import date as date_aliased
class AcquireDeployLockRequest(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
locked_by: Annotated[
str,
Field(
alias="lockedBy",
description="Identity of the lock requester (e.g. hostname, CI job ID)",
min_length=1,
),
]
ttl_minutes: Annotated[
int | None,
Field(
alias="ttlMinutes",
description="Lock TTL in minutes (default: 30, max: 60)",
examples=[30],
),
] = None
class AddCustomDomainRequest(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
hostname: Annotated[
str,
Field(
description="Custom hostname, e.g. status.acme.com",
max_length=255,
min_length=0,
pattern="^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$",
),
]
class NewStatus(StrEnum):
watching = "WATCHING"
triggered = "TRIGGERED"
confirmed = "CONFIRMED"
resolved = "RESOLVED"
class AddIncidentUpdateRequest(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
body: Annotated[
str | None, Field(description="Update message or post-mortem notes")
] = None
new_status: Annotated[
NewStatus | None,
Field(
alias="newStatus",
description="Updated incident status; null to keep current status",
),
] = None
notify_subscribers: Annotated[
bool,
Field(
alias="notifySubscribers",
description="Whether to notify subscribers of this update",
),
]
class AddResourceGroupMemberRequest(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
member_type: Annotated[
str,
Field(
alias="memberType",
description="Type of member: 'monitor' or 'service'",
min_length=1,
pattern="monitor|service",
),
]
member_id: Annotated[
UUID, Field(alias="memberId", description="ID of the monitor or service to add")
]
class AdminAddSubscriberRequest(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
email: Annotated[
EmailStr,
Field(
description="Email address to add as a confirmed subscriber", min_length=1
),
]
class Status(StrEnum):
operational = "OPERATIONAL"
degraded_performance = "DEGRADED_PERFORMANCE"
partial_outage = "PARTIAL_OUTAGE"
major_outage = "MAJOR_OUTAGE"
under_maintenance = "UNDER_MAINTENANCE"
class AffectedComponent(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
component_id: Annotated[
UUID, Field(alias="componentId", description="Status page component ID")
]
status: Annotated[
Status, Field(description="Component status during this incident")
]
class AlertChannelDisplayConfig(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
recipients: Annotated[
list[str] | None, Field(description="Email recipients list (email channels)")
] = None
region: Annotated[
str | None, Field(description="OpsGenie API region: us or eu")
] = None
severity_override: Annotated[
str | None,
Field(
alias="severityOverride",
description="PagerDuty severity override (critical, error, warning, info)",
),
] = None
mention_role_id: Annotated[
str | None,
Field(
alias="mentionRoleId",
description="Discord role ID to mention in notifications",
),
] = None
custom_headers: Annotated[
dict[str, str] | None,
Field(
alias="customHeaders",
description="Custom HTTP headers for webhook requests",
),
] = None
class AlertChannelDto(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
id: Annotated[UUID, Field(description="Unique alert channel identifier")]
name: Annotated[str, Field(description="Human-readable channel name")]
channel_type: Annotated[
str,
Field(
alias="channelType",
description="Channel integration type (e.g. SLACK, PAGERDUTY, EMAIL)",
),
]
display_config: Annotated[
AlertChannelDisplayConfig | None, Field(alias="displayConfig")
] = None
created_at: Annotated[
AwareDatetime,
Field(alias="createdAt", description="Timestamp when the channel was created"),
]
updated_at: Annotated[
AwareDatetime,
Field(
alias="updatedAt", description="Timestamp when the channel was last updated"
),
]
config_hash: Annotated[
str | None,
Field(
alias="configHash",
description="SHA-256 hash of the channel config; use for change detection",
),
] = None
managed_by: Annotated[
str | None,
Field(
alias="managedBy",
description="Source that created/owns this channel: DASHBOARD, CLI, TERRAFORM, MCP, or API. Null on channels created before this attribution column existed.",
),
] = None
last_delivery_at: Annotated[
AwareDatetime | None,
Field(
alias="lastDeliveryAt",
description="Timestamp of the most recent delivery attempt",
),
] = None
last_delivery_status: Annotated[
str | None,
Field(
alias="lastDeliveryStatus",
description="Outcome of the most recent delivery (SUCCESS, FAILED, etc.)",
),
] = None
class AlertDeliveryDto(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
id: UUID
incident_id: Annotated[
UUID,
Field(alias="incidentId", description="Incident that triggered this delivery"),
]
dispatch_id: Annotated[
UUID | None,
Field(
alias="dispatchId",
description="Notification dispatch that created this delivery",
),
] = None
channel_id: Annotated[
UUID, Field(alias="channelId", description="Alert channel ID")
]
channel: Annotated[str, Field(description="Human-readable channel name")]
channel_type: Annotated[
str,
Field(
alias="channelType",
description="Alert channel type (e.g. slack, email, webhook)",
),
]
status: Annotated[str, Field(description="Current delivery status")]
event_type: Annotated[
str,
Field(
alias="eventType",
description="Incident lifecycle event that triggered this delivery",
),
]
step_number: Annotated[
int,
Field(
alias="stepNumber",
description="1-based escalation step this delivery belongs to",
),
]
fire_count: Annotated[
int,
Field(
alias="fireCount",
description="Fire sequence within the step: 1 = initial, 2+ = repeat re-fires",
),
]
attempt_count: Annotated[
int, Field(alias="attemptCount", description="Number of delivery attempts made")
]
last_attempt_at: Annotated[
AwareDatetime | None,
Field(alias="lastAttemptAt", description="When the last attempt was made"),
] = None
next_retry_at: Annotated[
AwareDatetime | None,
Field(
alias="nextRetryAt",
description="When the next retry is scheduled (null if not retrying)",
),
] = None
delivered_at: Annotated[
AwareDatetime | None,
Field(
alias="deliveredAt",
description="Timestamp when the delivery was confirmed (null if not yet delivered)",
),
] = None
error_message: Annotated[
str | None,
Field(
alias="errorMessage",
description="Error message from the last failed attempt",
),
] = None
created_at: Annotated[AwareDatetime, Field(alias="createdAt")]
class ApiKeyAuthConfig(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
type: Literal["api_key"] = "api_key"
header_name: Annotated[
str,
Field(
alias="headerName",
description="HTTP header name that carries the API key",
min_length=1,
pattern="^[A-Za-z0-9\\-_]+$",
),
]
vault_secret_id: Annotated[
UUID | None,
Field(
alias="vaultSecretId", description="Vault secret ID for the API key value"
),
] = None
class ApiKeyCreateResponse(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
id: Annotated[int, Field(description="Unique API key identifier")]
name: Annotated[
str, Field(description="Human-readable name for this API key", min_length=1)
]
key: Annotated[
str,
Field(
description="Full API key value in dh_live_* format; store this now",
min_length=1,
),
]
created_at: Annotated[
AwareDatetime,
Field(alias="createdAt", description="Timestamp when the key was created"),
]
expires_at: Annotated[
AwareDatetime | None,
Field(
alias="expiresAt",
description="Timestamp when the key expires; null if no expiration",
),
] = None
class ApiKeyDto(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
id: Annotated[int, Field(description="Unique API key identifier")]
name: Annotated[
str, Field(description="Human-readable name for this API key", min_length=1)
]
key: Annotated[
str, Field(description="Full API key value in dh_live_* format", min_length=1)
]
created_at: Annotated[
AwareDatetime,
Field(alias="createdAt", description="Timestamp when the key was created"),
]
updated_at: Annotated[
AwareDatetime,
Field(alias="updatedAt", description="Timestamp when the key was last updated"),
]
last_used_at: Annotated[
AwareDatetime | None,
Field(
alias="lastUsedAt",
description="Timestamp of the most recent API call; null if never used",
),
] = None
revoked_at: Annotated[
AwareDatetime | None,
Field(
alias="revokedAt",
description="Timestamp when the key was revoked; null if active",
),
] = None
expires_at: Annotated[
AwareDatetime | None,
Field(
alias="expiresAt",
description="Timestamp when the key expires; null if no expiration",
),
] = None
class AssertionResultDto(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
type: Annotated[str, Field(description="Assertion type", examples=["status_code"])]
passed: Annotated[bool, Field(description="Whether the assertion passed")]
severity: Annotated[str, Field(description="Assertion severity")]
message: Annotated[
str | None, Field(description="Human-readable result message")
] = None
expected: Annotated[
str | None, Field(description="Expected value", examples=["200"])
] = None
actual: Annotated[
str | None, Field(description="Actual value observed", examples=["503"])
] = None
class AssertionTestResultDto(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
assertion_type: Annotated[
str, Field(alias="assertionType", description="Assertion type evaluated")
]
passed: Annotated[bool, Field(description="Whether the assertion passed")]
severity: Annotated[str, Field(description="Assertion severity: FAIL or WARN")]
message: Annotated[str, Field(description="Human-readable result description")]
expected: Annotated[str | None, Field(description="Expected value")] = None
actual: Annotated[
str | None, Field(description="Actual value observed during the test")
] = None
class BasicAuthConfig(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
type: Literal["basic"] = "basic"
vault_secret_id: Annotated[
UUID | None,
Field(
alias="vaultSecretId",
description="Vault secret ID holding Basic auth username and password",
),
] = None
class BearerAuthConfig(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
type: Literal["bearer"] = "bearer"
vault_secret_id: Annotated[
UUID | None,
Field(
alias="vaultSecretId",
description="Vault secret ID holding the bearer token value",
),
] = None
class BodyContainsAssertion(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
type: Literal["body_contains"] = "body_contains"
substring: Annotated[
str,
Field(
description="Substring that must appear in the response body", min_length=1
),
]
class Action(StrEnum):
pause = "PAUSE"
resume = "RESUME"
delete = "DELETE"
add_tag = "ADD_TAG"
remove_tag = "REMOVE_TAG"
class CategoryDto(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
category: Annotated[
str, Field(description="Category name (e.g. CI/CD, Cloud, Payments)")
]
service_count: Annotated[
int,
Field(alias="serviceCount", description="Number of services in this category"),
]
class OrgRole(StrEnum):
owner = "OWNER"
admin = "ADMIN"
member = "MEMBER"
class ChangeRoleRequest(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
org_role: Annotated[
OrgRole, Field(alias="orgRole", description="New role to assign")
]
class Status1(StrEnum):
invited = "INVITED"
active = "ACTIVE"
suspended = "SUSPENDED"
left = "LEFT"
removed = "REMOVED"
declined = "DECLINED"
class ChangeStatusRequest(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
status: Annotated[
Status1, Field(description="New membership status (ACTIVE or SUSPENDED)")
]
class ChartBucketDto(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
bucket: Annotated[
AwareDatetime,
Field(
description="Start of the time bucket (ISO 8601)",
examples=["2026-03-12T10:00:00Z"],
),
]
uptime_percent: Annotated[
float | None,
Field(
alias="uptimePercent",
description="Uptime percentage for this bucket; null when no data",
examples=[100],
),
] = None
avg_latency_ms: Annotated[
float | None,
Field(
alias="avgLatencyMs",
description="Weighted average latency in milliseconds for this bucket",
examples=[120.3],
),
] = None
p95_latency_ms: Annotated[
float | None,
Field(
alias="p95LatencyMs",
description="95th percentile latency in milliseconds (max across regions)",
examples=[250],
),
] = None
p99_latency_ms: Annotated[
float | None,
Field(
alias="p99LatencyMs",
description="99th percentile latency in milliseconds (max across regions)",
examples=[480],
),
] = None
class ComponentImpact(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
component_id: Annotated[
UUID, Field(alias="componentId", description="Status page component UUID")
]
component_name: Annotated[
str, Field(alias="componentName", description="Component display name")
]
group_name: Annotated[
str | None,
Field(
alias="groupName",
description="Parent group display name when the component belongs to a group",
),
] = None
uptime_percentage: Annotated[
float,
Field(
alias="uptimePercentage",
description="Computed uptime % for this component on this day",
),
]
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",
),
]
class ComponentPosition(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
component_id: Annotated[
UUID, Field(alias="componentId", description="Component ID")
]
display_order: Annotated[
int, Field(alias="displayOrder", description="New display order (0-based)")
]
group_id: Annotated[
UUID | None,
Field(alias="groupId", description="Target group ID, null for ungrouped"),
] = None
class ComponentsSummaryDto(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
total_count: Annotated[
int,
Field(
alias="totalCount",
description="Total active components for this service across all groups",
),
]
included_count: Annotated[
int,
Field(
alias="includedCount",
description="Number of components actually returned in the inline ``components`` list",
),
]
group_component_counts: Annotated[
dict[str, int],
Field(
alias="groupComponentCounts",
description='Per-group active leaf count, keyed by group component id (UUID stringified). Empty when the service has no groups; lets the UI render "show all N" affordances without a second round trip',
),
]
class ComponentStatusDto(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
id: Annotated[str, Field(description="Component UUID")]
name: Annotated[str, Field(description="Human-readable component name")]
status: Annotated[
str,
Field(
description="Current component status, e.g. operational, degraded_performance"
),
]
class ComponentUptimeSummaryDto(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
day: Annotated[
float | None,
Field(description="Uptime percentage over the last 24 hours", examples=[99.95]),
] = None
week: Annotated[
float | None,
Field(description="Uptime percentage over the last 7 days", examples=[99.98]),
] = None
month: Annotated[
float | None,
Field(description="Uptime percentage over the last 30 days", examples=[99.92]),
] = None
source: Annotated[
str,
Field(
description="Data source: vendor_reported or incident_derived",
examples=["vendor_reported"],
),
]
class ConfirmationPolicy(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
type: Annotated[
Literal["multi_region"],
Field(description="How incident confirmation is coordinated across regions"),
] = "multi_region"
min_regions_failing: Annotated[
int,
Field(
alias="minRegionsFailing",
description="Minimum failing regions required to confirm an incident",
),
]
max_wait_seconds: Annotated[
int,
Field(
alias="maxWaitSeconds",
description="Maximum seconds to wait for enough regions to fail after first trigger",
),
]
class ManagedBy(StrEnum):
dashboard = "DASHBOARD"
cli = "CLI"
terraform = "TERRAFORM"
mcp = "MCP"
api = "API"
class CreateApiKeyRequest(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
name: Annotated[
str,
Field(
description="Human-readable name to identify this API key",
max_length=200,
min_length=0,
),
]
expires_at: Annotated[
AwareDatetime | None,
Field(
alias="expiresAt",
description="Optional expiration timestamp in ISO 8601 format",
),
] = None
class Severity(StrEnum):
fail = "fail"
warn = "warn"
class CreateEnvironmentRequest(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
name: Annotated[
str,
Field(
description="Human-readable environment name", max_length=100, min_length=0
),
]
slug: Annotated[
str,
Field(
description="URL-safe identifier (lowercase alphanumeric, hyphens, underscores)",
max_length=100,
min_length=0,
pattern="^[a-z0-9][a-z0-9_-]*$",
),
]
variables: Annotated[
dict[str, str] | None,
Field(description="Initial key-value variable pairs for this environment"),
] = None
is_default: Annotated[
bool | None,
Field(
alias="isDefault",
description="Whether this is the default environment for new monitors (default: false)",
),
] = None
class RoleOffered(StrEnum):
owner = "OWNER"
admin = "ADMIN"
member = "MEMBER"
class CreateInviteRequest(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
email: Annotated[
EmailStr, Field(description="Email address to invite", min_length=1)
]
role_offered: Annotated[
RoleOffered,
Field(alias="roleOffered", description="Role to assign on acceptance"),
]
class CreateMaintenanceWindowRequest(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
monitor_id: Annotated[
UUID | None,
Field(
alias="monitorId",
description="Monitor to attach this maintenance window to; null for org-wide",
),
] = None
starts_at: Annotated[
AwareDatetime,
Field(
alias="startsAt",
description="Scheduled start of the maintenance window (ISO 8601)",
),
]
ends_at: Annotated[
AwareDatetime,
Field(
alias="endsAt",
description="Scheduled end of the maintenance window (ISO 8601)",
),
]
repeat_rule: Annotated[
str | None,
Field(
alias="repeatRule",
description="Reserved: iCal RRULE for recurring windows (stored but not yet honored)",
max_length=100,
min_length=0,
),
] = None
reason: Annotated[
str | None,
Field(
description="Human-readable reason for the maintenance (max 500 chars)",
max_length=500,
min_length=0,
),
] = None
suppress_alerts: Annotated[
bool | None,
Field(
alias="suppressAlerts",
description="Whether to suppress alerts during this window (default: true)",
),
] = None
class Severity1(StrEnum):
down = "DOWN"
degraded = "DEGRADED"
maintenance = "MAINTENANCE"
class CreateManualIncidentRequest(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
title: Annotated[
str, Field(description="Short summary of the incident", min_length=1)
]
severity: Annotated[
Severity1,
Field(description="Incident severity: DOWN, DEGRADED, or MAINTENANCE"),
]
monitor_id: Annotated[
UUID | None,
Field(alias="monitorId", description="Monitor to associate with this incident"),
] = None
body: Annotated[
str | None,
Field(description="Detailed description or context for the incident"),
] = None
class Type(StrEnum):
http = "HTTP"
dns = "DNS"
mcp_server = "MCP_SERVER"
tcp = "TCP"
icmp = "ICMP"
heartbeat = "HEARTBEAT"
class HealthThresholdType(StrEnum):
count = "COUNT" # type: ignore[assignment]
percentage = "PERCENTAGE"
class CreateSecretRequest(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
key: Annotated[
str,
Field(
description="Unique secret key within the workspace (max 255 chars)",
max_length=255,
min_length=0,
),
]
value: Annotated[
str,
Field(
description="Secret value, stored encrypted (max 32KB)",
max_length=32768,
min_length=0,
),
]
class CreateStatusPageComponentGroupRequest(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
name: Annotated[
str, Field(description="Group display name", max_length=255, min_length=0)
]
description: Annotated[
str | None,
Field(description="Optional group description", max_length=500, min_length=0),
] = None
display_order: Annotated[
int | None,
Field(alias="displayOrder", description="Position in the group list"),
] = None
default_open: Annotated[
bool | None,
Field(
alias="defaultOpen",
description="Initial expand/collapse state when a visitor first loads the page; renderer may auto-expand on active incidents (default: true)",
),
] = None
class Type1(StrEnum):
monitor = "MONITOR"
group = "GROUP"
static = "STATIC"
class CreateStatusPageComponentRequest(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
name: Annotated[
str, Field(description="Component display name", max_length=255, min_length=0)
]
description: Annotated[
str | None,
Field(
description="Optional description shown on expand",
max_length=500,
min_length=0,
),
] = None
type: Annotated[
Type1, Field(description="Component type: MONITOR, GROUP, or STATIC")
]
monitor_id: Annotated[
UUID | None,
Field(alias="monitorId", description="Monitor ID (required when type=MONITOR)"),
] = None
resource_group_id: Annotated[
UUID | None,
Field(
alias="resourceGroupId",
description="Resource group ID (required when type=GROUP)",
),
] = None
group_id: Annotated[
UUID | None,
Field(alias="groupId", description="Component group ID for visual grouping"),
] = None
show_uptime: Annotated[
bool | None,
Field(
alias="showUptime",
description="Whether to show the uptime bar (default: true)",
),
] = None
display_order: Annotated[
int | None,
Field(alias="displayOrder", description="Position in the component list"),
] = None
exclude_from_overall: Annotated[
bool | None,
Field(
alias="excludeFromOverall",
description="Exclude from overall status calculation (default: false, use true for third-party deps)",
),
] = None
start_date: Annotated[
date_aliased | None,
Field(
alias="startDate",
description="Date from which to start showing uptime; defaults to component creation. Set earlier to backdate (e.g. launch day); clamped at the monitor's createdAt for MONITOR-type components",
),
] = None
class Status2(StrEnum):
investigating = "INVESTIGATING"
identified = "IDENTIFIED"
monitoring = "MONITORING"
resolved = "RESOLVED"
class Impact(StrEnum):
none = "NONE"
minor = "MINOR"
major = "MAJOR"
critical = "CRITICAL"
class CreateStatusPageIncidentRequest(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
title: Annotated[
str,
Field(
description="Customer-facing incident title", max_length=500, min_length=0
),
]
status: Annotated[
Status2 | None, Field(description="Initial status (default: INVESTIGATING)")
] = None
impact: Annotated[
Impact, Field(description="Impact level: NONE, MINOR, MAJOR, or CRITICAL")
]
body: Annotated[
str, Field(description="Initial update body in markdown", min_length=1)
]
affected_components: Annotated[
list[AffectedComponent] | None,
Field(
alias="affectedComponents",
description="Component IDs affected by this incident",
),
] = None
scheduled: Annotated[
bool | None,
Field(description="Whether this is a scheduled maintenance (default: false)"),
] = None
scheduled_for: Annotated[
AwareDatetime | None,
Field(
alias="scheduledFor",
description="Maintenance start time (required when scheduled=true)",
),
] = None
scheduled_until: Annotated[
AwareDatetime | None,
Field(alias="scheduledUntil", description="Maintenance end time"),
] = None
auto_resolve: Annotated[
bool | None,
Field(
alias="autoResolve",
description="Auto-resolve at scheduledUntil (default: false)",
),
] = None
notify_subscribers: Annotated[
bool | None,
Field(
alias="notifySubscribers",
description="Whether to email confirmed subscribers about this incident (default: true)",
),
] = None
class CreateStatusPageIncidentUpdateRequest(BaseModel):
model_config = ConfigDict(extra="forbid", populate_by_name=True)
status: Annotated[