You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(types): handle CurrentStatus enum suffix shift after MonitorDto.currentStatus addition (#26)
* fix(types): handle CurrentStatus enum suffix shift after MonitorDto adds currentStatus
mono v0.13.0 adds `MonitorDto.currentStatus`. datamodel-code-generator
names inline enums by iteration order, so the existing inline
StatusPageComponentDto.currentStatus enum shifts from CurrentStatus1 to
CurrentStatus2 (MonitorDto + ResultSummaryDto share CurrentStatus —
deduped because their value sets are identical).
Update the type alias in `types.py` to match the new generator output
and re-pin _generated.py + spec to mono v0.13.0. Adds a comment
explaining the suffix-stability hazard so future authors don't repeat
this lesson the hard way.
Caught by mono#369's Spec Evolution Harness — 16 sdk-python tests +
11 mcp-server tests (which depends on sdk-python) failed to import.
Co-authored-by: Cursor <cursoragent@cursor.com>
* test: managedBy is optional on Create as of mono v0.13
The previous test asserted managedBy was required. mono v0.13 made it
optional with a server-side default of API, so SDK consumers can omit
it. Replace the negative test with a positive assertion that omitting
it parses cleanly with managed_by == None.
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
"summary": "List active alert channels for the authenticated org",
169
+
"description": "Supports filtering by `type` (channel integration), `managedBy` (creating surface), and `search` (case-insensitive contains on name). Unrecognised query parameters are silently ignored — pin to the documented set above.",
169
170
"operationId": "list_14",
170
171
"parameters": [
172
+
{
173
+
"name": "type",
174
+
"in": "query",
175
+
"description": "Filter by channel integration type (e.g. SLACK, WEBHOOK, EMAIL)",
176
+
"required": false,
177
+
"schema": {
178
+
"type": "string",
179
+
"enum": [
180
+
"email",
181
+
"webhook",
182
+
"slack",
183
+
"pagerduty",
184
+
"opsgenie",
185
+
"teams",
186
+
"discord"
187
+
]
188
+
}
189
+
},
190
+
{
191
+
"name": "managedBy",
192
+
"in": "query",
193
+
"description": "Filter by managed-by source (DASHBOARD, CLI, TERRAFORM, MCP, API)",
194
+
"required": false,
195
+
"schema": {
196
+
"type": "string",
197
+
"enum": [
198
+
"DASHBOARD",
199
+
"CLI",
200
+
"TERRAFORM",
201
+
"MCP",
202
+
"API"
203
+
]
204
+
}
205
+
},
206
+
{
207
+
"name": "search",
208
+
"in": "query",
209
+
"description": "Case-insensitive contains-match on the channel name",
210
+
"required": false,
211
+
"schema": {
212
+
"type": "string"
213
+
}
214
+
},
171
215
{
172
216
"name": "pageable",
173
217
"in": "query",
@@ -6374,17 +6418,27 @@
6374
6418
"Monitors"
6375
6419
],
6376
6420
"summary": "List monitors for the authenticated org",
6421
+
"description": "Supports filtering by `enabled`, `status` (alias active|paused for enabled), `type`, `managedBy`, `tag` / `tags`, `search`, and `environmentId`. Unrecognised query parameters are silently ignored (Spring's default binding behaviour) — pin to the documented set above.",
6377
6422
"operationId": "list_8",
6378
6423
"parameters": [
6379
6424
{
6380
6425
"name": "enabled",
6381
6426
"in": "query",
6382
-
"description": "Filter by enabled state",
6427
+
"description": "Filter by enabled state (true/false)",
6383
6428
"required": false,
6384
6429
"schema": {
6385
6430
"type": "boolean"
6386
6431
}
6387
6432
},
6433
+
{
6434
+
"name": "status",
6435
+
"in": "query",
6436
+
"description": "Lifecycle status alias: 'active' (enabled=true) or 'paused' (enabled=false). Ignored when ?enabled is also supplied.",
6437
+
"required": false,
6438
+
"schema": {
6439
+
"type": "string"
6440
+
}
6441
+
},
6388
6442
{
6389
6443
"name": "type",
6390
6444
"in": "query",
@@ -6421,7 +6475,16 @@
6421
6475
{
6422
6476
"name": "tags",
6423
6477
"in": "query",
6424
-
"description": "Filter by tag names, comma-separated (e.g. prod,critical)",
6478
+
"description": "Filter by tag names, comma-separated (e.g. prod,critical); OR semantics",
6479
+
"required": false,
6480
+
"schema": {
6481
+
"type": "string"
6482
+
}
6483
+
},
6484
+
{
6485
+
"name": "tag",
6486
+
"in": "query",
6487
+
"description": "Filter by a single tag name (alias for ?tags=); merged with ?tags using OR semantics",
6425
6488
"required": false,
6426
6489
"schema": {
6427
6490
"type": "string"
@@ -21729,6 +21792,18 @@
21729
21792
"description": "SHA-256 hash of the channel config; use for change detection",
21730
21793
"nullable": true
21731
21794
},
21795
+
"managedBy": {
21796
+
"type": "string",
21797
+
"description": "Source that created/owns this channel: DASHBOARD, CLI, TERRAFORM, MCP, or API. Null on channels created before this attribution column existed.",
21798
+
"nullable": true,
21799
+
"enum": [
21800
+
"DASHBOARD",
21801
+
"CLI",
21802
+
"TERRAFORM",
21803
+
"MCP",
21804
+
"API"
21805
+
]
21806
+
},
21732
21807
"lastDeliveryAt": {
21733
21808
"type": "string",
21734
21809
"description": "Timestamp of the most recent delivery attempt",
"description": "Source creating this channel: DASHBOARD, CLI, TERRAFORM, MCP, or API. Defaults to API when omitted.",
23011
+
"nullable": true,
23012
+
"enum": [
23013
+
"DASHBOARD",
23014
+
"CLI",
23015
+
"TERRAFORM",
23016
+
"MCP",
23017
+
"API"
23018
+
]
22932
23019
}
22933
23020
}
22934
23021
},
@@ -23189,12 +23276,14 @@
23189
23276
"maxLength": 100,
23190
23277
"minLength": 0,
23191
23278
"type": "string",
23192
-
"description": "iCal RRULE for recurring windows (max 100 chars); null for one-time",
23279
+
"description": "Reserved: iCal RRULE for recurring windows (stored but not yet honored)",
23193
23280
"nullable": true
23194
23281
},
23195
23282
"reason": {
23283
+
"maxLength": 500,
23284
+
"minLength": 0,
23196
23285
"type": "string",
23197
-
"description": "Human-readable reason for the maintenance",
23286
+
"description": "Human-readable reason for the maintenance (max 500 chars)",
23198
23287
"nullable": true
23199
23288
},
23200
23289
"suppressAlerts": {
@@ -23241,7 +23330,6 @@
23241
23330
"CreateMonitorRequest": {
23242
23331
"required": [
23243
23332
"config",
23244
-
"managedBy",
23245
23333
"name",
23246
23334
"type"
23247
23335
],
@@ -23309,7 +23397,8 @@
23309
23397
},
23310
23398
"managedBy": {
23311
23399
"type": "string",
23312
-
"description": "Source that created/owns this monitor: DASHBOARD, CLI, TERRAFORM, MCP, or API. Use the value matching your surface so audit logs, drift detection, and analytics attribute correctly.",
23400
+
"description": "Source that created/owns this monitor: DASHBOARD, CLI, TERRAFORM, MCP, or API. Defaults to API when omitted; set to your surface so audit logs, drift detection, and analytics attribute correctly.",
23401
+
"nullable": true,
23313
23402
"enum": [
23314
23403
"DASHBOARD",
23315
23404
"CLI",
@@ -23510,6 +23599,18 @@
23510
23599
"description": "Recovery cooldown in minutes after group incident resolves (0–60)",
23511
23600
"format": "int32",
23512
23601
"nullable": true
23602
+
},
23603
+
"managedBy": {
23604
+
"type": "string",
23605
+
"description": "Source creating this group: DASHBOARD, CLI, TERRAFORM, MCP, or API. Defaults to API when omitted.",
23606
+
"nullable": true,
23607
+
"enum": [
23608
+
"DASHBOARD",
23609
+
"CLI",
23610
+
"TERRAFORM",
23611
+
"MCP",
23612
+
"API"
23613
+
]
23513
23614
}
23514
23615
},
23515
23616
"description": "Request body for creating a resource group"
@@ -23811,6 +23912,18 @@
23811
23912
"REVIEW",
23812
23913
"AUTOMATIC"
23813
23914
]
23915
+
},
23916
+
"managedBy": {
23917
+
"type": "string",
23918
+
"description": "Source creating this page: DASHBOARD, CLI, TERRAFORM, MCP, or API. Defaults to API when omitted.",
23919
+
"nullable": true,
23920
+
"enum": [
23921
+
"DASHBOARD",
23922
+
"CLI",
23923
+
"TERRAFORM",
23924
+
"MCP",
23925
+
"API"
23926
+
]
23814
23927
}
23815
23928
}
23816
23929
},
@@ -26436,7 +26549,7 @@
26436
26549
},
26437
26550
"repeatRule": {
26438
26551
"type": "string",
26439
-
"description": "iCal RRULE for recurring windows; null for one-time",
26552
+
"description": "Reserved: iCal RRULE for recurring windows (stored but not yet honored)",
26440
26553
"nullable": true
26441
26554
},
26442
26555
"reason": {
@@ -27271,6 +27384,18 @@
27271
27384
"description": "Alert channel IDs linked to this monitor; populated on single-monitor responses",
27272
27385
"format": "uuid"
27273
27386
}
27387
+
},
27388
+
"currentStatus": {
27389
+
"type": "string",
27390
+
"description": "Current operational state — UP, DOWN, DEGRADED, PAUSED, or UNKNOWN if no probe data yet",
"description": "Source that created/owns this group: DASHBOARD, CLI, TERRAFORM, MCP, or API. Null on groups created before this attribution column existed.",
28592
+
"nullable": true,
28593
+
"enum": [
28594
+
"DASHBOARD",
28595
+
"CLI",
28596
+
"TERRAFORM",
28597
+
"MCP",
28598
+
"API"
28599
+
]
28600
+
},
28464
28601
"createdAt": {
28465
28602
"type": "string",
28466
28603
"description": "Timestamp when the group was created",
@@ -28721,6 +28858,7 @@
28721
28858
"up",
28722
28859
"degraded",
28723
28860
"down",
28861
+
"paused",
28724
28862
"unknown"
28725
28863
]
28726
28864
},
@@ -31056,6 +31194,18 @@
31056
31194
"UNDER_MAINTENANCE"
31057
31195
]
31058
31196
},
31197
+
"managedBy": {
31198
+
"type": "string",
31199
+
"description": "Source that created/owns this status page: DASHBOARD, CLI, TERRAFORM, MCP, or API. Null on pages created before this attribution column existed.",
0 commit comments