devhelm 0.2.0__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. {devhelm-0.2.0 → devhelm-0.3.0}/PKG-INFO +1 -1
  2. {devhelm-0.2.0 → devhelm-0.3.0}/docs/openapi/monitoring-api.json +8 -8
  3. {devhelm-0.2.0 → devhelm-0.3.0}/pyproject.toml +1 -1
  4. {devhelm-0.2.0 → devhelm-0.3.0}/src/devhelm/__init__.py +2 -0
  5. {devhelm-0.2.0 → devhelm-0.3.0}/src/devhelm/_generated.py +12 -8
  6. {devhelm-0.2.0 → devhelm-0.3.0}/src/devhelm/resources/incidents.py +1 -5
  7. {devhelm-0.2.0 → devhelm-0.3.0}/src/devhelm/resources/status_pages.py +14 -0
  8. {devhelm-0.2.0 → devhelm-0.3.0}/src/devhelm/types.py +2 -0
  9. {devhelm-0.2.0 → devhelm-0.3.0}/tests/run_sdk.py +6 -3
  10. {devhelm-0.2.0 → devhelm-0.3.0}/tests/test_negative_validation.py +6 -6
  11. {devhelm-0.2.0 → devhelm-0.3.0}/uv.lock +1 -1
  12. {devhelm-0.2.0 → devhelm-0.3.0}/.github/workflows/ci.yml +0 -0
  13. {devhelm-0.2.0 → devhelm-0.3.0}/.github/workflows/release.yml +0 -0
  14. {devhelm-0.2.0 → devhelm-0.3.0}/.github/workflows/spec-check.yml +0 -0
  15. {devhelm-0.2.0 → devhelm-0.3.0}/.gitignore +0 -0
  16. {devhelm-0.2.0 → devhelm-0.3.0}/LICENSE +0 -0
  17. {devhelm-0.2.0 → devhelm-0.3.0}/Makefile +0 -0
  18. {devhelm-0.2.0 → devhelm-0.3.0}/README.md +0 -0
  19. {devhelm-0.2.0 → devhelm-0.3.0}/scripts/inject_strict_config.py +0 -0
  20. {devhelm-0.2.0 → devhelm-0.3.0}/scripts/regen-from.sh +0 -0
  21. {devhelm-0.2.0 → devhelm-0.3.0}/scripts/release.sh +0 -0
  22. {devhelm-0.2.0 → devhelm-0.3.0}/scripts/typegen.sh +0 -0
  23. {devhelm-0.2.0 → devhelm-0.3.0}/src/devhelm/_errors.py +0 -0
  24. {devhelm-0.2.0 → devhelm-0.3.0}/src/devhelm/_http.py +0 -0
  25. {devhelm-0.2.0 → devhelm-0.3.0}/src/devhelm/_pagination.py +0 -0
  26. {devhelm-0.2.0 → devhelm-0.3.0}/src/devhelm/_validation.py +0 -0
  27. {devhelm-0.2.0 → devhelm-0.3.0}/src/devhelm/client.py +0 -0
  28. {devhelm-0.2.0 → devhelm-0.3.0}/src/devhelm/py.typed +0 -0
  29. {devhelm-0.2.0 → devhelm-0.3.0}/src/devhelm/resources/__init__.py +0 -0
  30. {devhelm-0.2.0 → devhelm-0.3.0}/src/devhelm/resources/alert_channels.py +0 -0
  31. {devhelm-0.2.0 → devhelm-0.3.0}/src/devhelm/resources/api_keys.py +0 -0
  32. {devhelm-0.2.0 → devhelm-0.3.0}/src/devhelm/resources/dependencies.py +0 -0
  33. {devhelm-0.2.0 → devhelm-0.3.0}/src/devhelm/resources/deploy_lock.py +0 -0
  34. {devhelm-0.2.0 → devhelm-0.3.0}/src/devhelm/resources/environments.py +0 -0
  35. {devhelm-0.2.0 → devhelm-0.3.0}/src/devhelm/resources/monitors.py +0 -0
  36. {devhelm-0.2.0 → devhelm-0.3.0}/src/devhelm/resources/notification_policies.py +0 -0
  37. {devhelm-0.2.0 → devhelm-0.3.0}/src/devhelm/resources/resource_groups.py +0 -0
  38. {devhelm-0.2.0 → devhelm-0.3.0}/src/devhelm/resources/secrets.py +0 -0
  39. {devhelm-0.2.0 → devhelm-0.3.0}/src/devhelm/resources/status.py +0 -0
  40. {devhelm-0.2.0 → devhelm-0.3.0}/src/devhelm/resources/tags.py +0 -0
  41. {devhelm-0.2.0 → devhelm-0.3.0}/src/devhelm/resources/webhooks.py +0 -0
  42. {devhelm-0.2.0 → devhelm-0.3.0}/tests/__init__.py +0 -0
  43. {devhelm-0.2.0 → devhelm-0.3.0}/tests/test_client.py +0 -0
  44. {devhelm-0.2.0 → devhelm-0.3.0}/tests/test_errors.py +0 -0
  45. {devhelm-0.2.0 → devhelm-0.3.0}/tests/test_http.py +0 -0
  46. {devhelm-0.2.0 → devhelm-0.3.0}/tests/test_schemas.py +0 -0
  47. {devhelm-0.2.0 → devhelm-0.3.0}/tests/test_spec_parity.py +0 -0
  48. {devhelm-0.2.0 → devhelm-0.3.0}/tests/test_typing.py +0 -0
  49. {devhelm-0.2.0 → devhelm-0.3.0}/tests/test_validation_helpers.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: devhelm
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: DevHelm SDK for Python — typed client for monitors, incidents, alerting, and more
5
5
  Project-URL: Homepage, https://github.com/devhelmhq/sdk-python
6
6
  Project-URL: Repository, https://github.com/devhelmhq/sdk-python.git
@@ -22744,9 +22744,9 @@
22744
22744
  "format": "int32",
22745
22745
  "nullable": true
22746
22746
  },
22747
- "collapsed": {
22747
+ "defaultOpen": {
22748
22748
  "type": "boolean",
22749
- "description": "Whether the group is collapsed by default (default: true)",
22749
+ "description": "Initial expand/collapse state when a visitor first loads the page; renderer may auto-expand on active incidents (default: true)",
22750
22750
  "nullable": true
22751
22751
  }
22752
22752
  }
@@ -22816,7 +22816,7 @@
22816
22816
  },
22817
22817
  "startDate": {
22818
22818
  "type": "string",
22819
- "description": "Date from which to start showing uptime data",
22819
+ "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",
22820
22820
  "format": "date",
22821
22821
  "nullable": true
22822
22822
  }
@@ -29659,7 +29659,7 @@
29659
29659
  "updatedAt",
29660
29660
  "displayOrder",
29661
29661
  "pageOrder",
29662
- "collapsed"
29662
+ "defaultOpen"
29663
29663
  ],
29664
29664
  "type": "object",
29665
29665
  "properties": {
@@ -29686,7 +29686,7 @@
29686
29686
  "type": "integer",
29687
29687
  "format": "int32"
29688
29688
  },
29689
- "collapsed": {
29689
+ "defaultOpen": {
29690
29690
  "type": "boolean"
29691
29691
  },
29692
29692
  "components": {
@@ -32405,9 +32405,9 @@
32405
32405
  "format": "int32",
32406
32406
  "nullable": true
32407
32407
  },
32408
- "collapsed": {
32408
+ "defaultOpen": {
32409
32409
  "type": "boolean",
32410
- "description": "Whether the group is collapsed by default; null preserves current",
32410
+ "description": "Initial expand/collapse state on first page load; null preserves current. Renderer may auto-expand on active incidents",
32411
32411
  "nullable": true
32412
32412
  }
32413
32413
  }
@@ -32458,7 +32458,7 @@
32458
32458
  },
32459
32459
  "startDate": {
32460
32460
  "type": "string",
32461
- "description": "Date from which to start showing uptime data; null preserves current",
32461
+ "description": "Date from which to start showing uptime; null preserves current. Bars never extend earlier than the underlying monitor's createdAt regardless of value",
32462
32462
  "format": "date",
32463
32463
  "nullable": true
32464
32464
  }
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "devhelm"
3
- version = "0.2.0"
3
+ version = "0.3.0"
4
4
  description = "DevHelm SDK for Python — typed client for monitors, incidents, alerting, and more"
5
5
  authors = [{ name = "DevHelm", email = "hello@devhelm.io" }]
6
6
  license = "MIT"
@@ -82,6 +82,7 @@ from devhelm.types import (
82
82
  NotificationPolicyDto,
83
83
  PublishIncidentStatus,
84
84
  ReorderComponentsRequest,
85
+ ReorderPageLayoutRequest,
85
86
  ResolveIncidentRequest,
86
87
  ResourceGroupDto,
87
88
  ResourceGroupHealthStatus,
@@ -204,6 +205,7 @@ __all__ = [
204
205
  "AddCustomDomainRequest",
205
206
  "AdminAddSubscriberRequest",
206
207
  "ReorderComponentsRequest",
208
+ "ReorderPageLayoutRequest",
207
209
  "CreateMonitorRequest",
208
210
  "UpdateMonitorRequest",
209
211
  "CreateManualIncidentRequest",
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: .openapi-preprocessed.json
3
- # timestamp: 2026-04-22T07:20:30+00:00
3
+ # timestamp: 2026-04-22T14:03:54+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
  from typing import Annotated, Any, Literal
@@ -1023,9 +1023,12 @@ class CreateStatusPageComponentGroupRequest(BaseModel):
1023
1023
  int | None,
1024
1024
  Field(alias="displayOrder", description="Position in the group list"),
1025
1025
  ] = None
1026
- collapsed: Annotated[
1026
+ default_open: Annotated[
1027
1027
  bool | None,
1028
- Field(description="Whether the group is collapsed by default (default: true)"),
1028
+ Field(
1029
+ alias="defaultOpen",
1030
+ description="Initial expand/collapse state when a visitor first loads the page; renderer may auto-expand on active incidents (default: true)",
1031
+ ),
1029
1032
  ] = None
1030
1033
 
1031
1034
 
@@ -1088,7 +1091,7 @@ class CreateStatusPageComponentRequest(BaseModel):
1088
1091
  date_aliased | None,
1089
1092
  Field(
1090
1093
  alias="startDate",
1091
- description="Date from which to start showing uptime data",
1094
+ 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",
1092
1095
  ),
1093
1096
  ] = None
1094
1097
 
@@ -4730,7 +4733,7 @@ class StatusPageComponentGroupDto(BaseModel):
4730
4733
  description: str | None = None
4731
4734
  display_order: Annotated[int, Field(alias="displayOrder")]
4732
4735
  page_order: Annotated[int, Field(alias="pageOrder")]
4733
- collapsed: bool
4736
+ default_open: Annotated[bool, Field(alias="defaultOpen")]
4734
4737
  components: list[StatusPageComponentDto] | None = None
4735
4738
  created_at: Annotated[AwareDatetime, Field(alias="createdAt")]
4736
4739
  updated_at: Annotated[AwareDatetime, Field(alias="updatedAt")]
@@ -5760,10 +5763,11 @@ class UpdateStatusPageComponentGroupRequest(BaseModel):
5760
5763
  description="New position in the group list; null preserves current",
5761
5764
  ),
5762
5765
  ] = None
5763
- collapsed: Annotated[
5766
+ default_open: Annotated[
5764
5767
  bool | None,
5765
5768
  Field(
5766
- description="Whether the group is collapsed by default; null preserves current"
5769
+ alias="defaultOpen",
5770
+ description="Initial expand/collapse state on first page load; null preserves current. Renderer may auto-expand on active incidents",
5767
5771
  ),
5768
5772
  ] = None
5769
5773
 
@@ -5825,7 +5829,7 @@ class UpdateStatusPageComponentRequest(BaseModel):
5825
5829
  date_aliased | None,
5826
5830
  Field(
5827
5831
  alias="startDate",
5828
- description="Date from which to start showing uptime data; null preserves current",
5832
+ description="Date from which to start showing uptime; null preserves current. Bars never extend earlier than the underlying monitor's createdAt regardless of value",
5829
5833
  ),
5830
5834
  ] = None
5831
5835
 
@@ -8,7 +8,7 @@ from devhelm._generated import (
8
8
  IncidentDto,
9
9
  ResolveIncidentRequest,
10
10
  )
11
- from devhelm._http import api_delete, api_get, api_post, path_param
11
+ from devhelm._http import api_get, api_post, path_param
12
12
  from devhelm._pagination import Page, fetch_all_pages, fetch_page
13
13
  from devhelm._validation import RequestBody, parse_single, validate_request
14
14
 
@@ -57,7 +57,3 @@ class Incidents:
57
57
  api_post(self._client, f"/api/v1/incidents/{path_param(id)}/resolve", body),
58
58
  f"POST /api/v1/incidents/{id}/resolve",
59
59
  )
60
-
61
- def delete(self, id: int | str) -> None:
62
- """Delete an incident."""
63
- api_delete(self._client, f"/api/v1/incidents/{path_param(id)}")
@@ -11,6 +11,7 @@ from devhelm._generated import (
11
11
  CreateStatusPageIncidentUpdateRequest,
12
12
  CreateStatusPageRequest,
13
13
  ReorderComponentsRequest,
14
+ ReorderPageLayoutRequest,
14
15
  StatusPageComponentDto,
15
16
  StatusPageComponentGroupDto,
16
17
  StatusPageCustomDomainDto,
@@ -392,3 +393,16 @@ class StatusPages:
392
393
  def delete(self, id: int | str) -> None:
393
394
  """Delete a status page."""
394
395
  api_delete(self._client, _page_path(id))
396
+
397
+ def reorder_layout(
398
+ self, id: int | str, body: RequestBody[ReorderPageLayoutRequest]
399
+ ) -> None:
400
+ """Batch-reorder the page layout: top-level sections (groups +
401
+ ungrouped components) and, optionally, within-group component ordering.
402
+
403
+ Returns 204 No Content on success.
404
+ """
405
+ body = validate_request(
406
+ ReorderPageLayoutRequest, body, "statusPages.reorderLayout"
407
+ )
408
+ api_put(self._client, f"{_page_path(id)}/layout/reorder", body)
@@ -81,6 +81,7 @@ from devhelm._generated import (
81
81
  PublishStatusPageIncidentRequest,
82
82
  RecordType,
83
83
  ReorderComponentsRequest,
84
+ ReorderPageLayoutRequest,
84
85
  ResolutionReason,
85
86
  ResolveIncidentRequest,
86
87
  ResourceGroupDto,
@@ -250,6 +251,7 @@ __all__ = [
250
251
  "NotificationPolicyDto",
251
252
  "PublishStatusPageIncidentRequest",
252
253
  "ReorderComponentsRequest",
254
+ "ReorderPageLayoutRequest",
253
255
  "ResolveIncidentRequest",
254
256
  "ResourceGroupDto",
255
257
  "ResourceGroupMemberDto",
@@ -39,6 +39,7 @@ from devhelm import (
39
39
  Devhelm,
40
40
  DevhelmError,
41
41
  ReorderComponentsRequest,
42
+ ReorderPageLayoutRequest,
42
43
  ResolveIncidentRequest,
43
44
  UpdateAlertChannelRequest,
44
45
  UpdateEnvironmentRequest,
@@ -137,9 +138,6 @@ def run(client: Devhelm, resource: str, action: str, rest: list[str]) -> Any: #
137
138
  else None
138
139
  )
139
140
  return client.incidents.resolve(rest[0], body)
140
- if op == "incidents.delete":
141
- client.incidents.delete(rest[0])
142
- return None
143
141
 
144
142
  # -- Alert Channels --
145
143
  if op == "alert-channels.list":
@@ -311,6 +309,11 @@ def run(client: Devhelm, resource: str, action: str, rest: list[str]) -> Any: #
311
309
  if op == "status-pages.delete":
312
310
  client.status_pages.delete(rest[0])
313
311
  return None
312
+ if op == "status-pages.reorder-layout":
313
+ client.status_pages.reorder_layout(
314
+ rest[0], _parse(ReorderPageLayoutRequest, rest[1])
315
+ )
316
+ return None
314
317
 
315
318
  # -- Status Page Components --
316
319
  if op == "status-pages.components.list":
@@ -299,7 +299,7 @@ def _sp_group(**kw: object) -> dict[str, Any]:
299
299
  "name": "Infra",
300
300
  "displayOrder": 0,
301
301
  "pageOrder": 0,
302
- "collapsed": True,
302
+ "defaultOpen": True,
303
303
  "createdAt": NOW,
304
304
  "updatedAt": NOW,
305
305
  }
@@ -1874,9 +1874,9 @@ class TestStatusPageComponentGroupDtoNegative:
1874
1874
  _del(_sp_group(), "displayOrder")
1875
1875
  )
1876
1876
 
1877
- def test_missing_collapsed(self) -> None:
1878
- with pytest.raises(ValidationError, match="collapsed"):
1879
- StatusPageComponentGroupDto.model_validate(_del(_sp_group(), "collapsed"))
1877
+ def test_missing_default_open(self) -> None:
1878
+ with pytest.raises(ValidationError, match="defaultOpen"):
1879
+ StatusPageComponentGroupDto.model_validate(_del(_sp_group(), "defaultOpen"))
1880
1880
 
1881
1881
  def test_empty_dict(self) -> None:
1882
1882
  with pytest.raises(ValidationError):
@@ -1924,9 +1924,9 @@ class TestUpdateStatusPageComponentGroupRequestNegative:
1924
1924
  {"description": "x" * 501}
1925
1925
  )
1926
1926
 
1927
- def test_wrong_collapsed_type(self) -> None:
1927
+ def test_wrong_default_open_type(self) -> None:
1928
1928
  with pytest.raises(ValidationError):
1929
- UpdateStatusPageComponentGroupRequest.model_validate({"collapsed": [1]})
1929
+ UpdateStatusPageComponentGroupRequest.model_validate({"defaultOpen": [1]})
1930
1930
 
1931
1931
 
1932
1932
  # ===================================================================
@@ -315,7 +315,7 @@ wheels = [
315
315
 
316
316
  [[package]]
317
317
  name = "devhelm"
318
- version = "0.2.0"
318
+ version = "0.3.0"
319
319
  source = { editable = "." }
320
320
  dependencies = [
321
321
  { name = "httpx" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes