Skip to content

Commit c18ad90

Browse files
authored
Regenerate client from latest OpenAPI spec (#11)
* Regenerate client from latest OpenAPI spec Supersedes #10 (owner_group_ids on heartbeat models) — that field is now included via the full regeneration. * Add v1.4.0 changelog and fix pyproject.toml version Generator overwrote version to "v1" — restored to 1.4.0. Also restored CHANGELOG.md in package includes. * Add .serena/ to .gitignore and remove from tracking * Fix ruff lint errors in generated SDK code Auto-fix 23051 errors: unused imports (F401), import sorting (I001), and deprecated type annotations (UP). * Add ruff check --fix step to Makefile regenerate target * Fix ruff formatting for entire rootly_sdk/ directory Previous commit only formatted models/ subdirectory, missing api/, client.py, errors.py, and types.py.
1 parent 4baa10f commit c18ad90

1,668 files changed

Lines changed: 59367 additions & 3499 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@ dmypy.json
2121

2222
/coverage.xml
2323
/.coverage
24+
25+
# Serena
26+
.serena/

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.4.0] - 2026-07-20
11+
12+
### Added
13+
- New AI Chat endpoints (create, stream, list session messages, delete session)
14+
- New Shift Coverage Requests endpoints (create, read, delete, list)
15+
- New Workflow Action Item Form Field Conditions endpoints (create, read, update, delete, list)
16+
- Bulk operations for catalog entities, environments, functionalities, services, and teams (bulk upsert and bulk delete)
17+
- New Meeting Recordings actions: import, delete standalone, start recording session, list all
18+
- Alert escalation and snooze actions (`escalate_alert`, `snooze_alert`)
19+
- Alert receipt endpoint (`get_receipt`)
20+
- Alert events feed endpoint (`list_alert_events_feed`)
21+
- New Google Chat workflow task types: create/rename/archive spaces, change space privacy, update space description, invite to space, send messages and attachments
22+
- New workflow task type: `InviteToMicrosoftTeamsChannelRootlyTaskParams` — invite users to Microsoft Teams channels via Rootly
23+
- New workflow task type: `AttachRetrospectivePdfToJiraIssueTaskParams` — attach retrospective PDFs to Jira issues
24+
- Edge connector filters support (`CreateEdgeConnectorBodyDataAttributesFilters`)
25+
- `owner_group_ids` field on heartbeat, alerts source, functionality, and schedule models for team-scoped API key support
26+
- GitHub issue task params: labels mode support (`update_github_issue_task_params_labels_mode`)
27+
28+
### Changed
29+
- Regenerated client from latest OpenAPI specification
30+
- httpx minimum version bumped from `>=0.20.0` to `>=0.23.0`
31+
- 428 new model files, 28 removed models (consolidated upstream)
32+
33+
### Fixed
34+
- Applied nullable enum fix to all model files via `tools/fix_nullable_enums.py`
35+
1036
## [1.3.0] - 2026-04-21
1137

1238
### Added

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ regenerate:
4141
--config tools/config.yaml
4242
@echo "Applying nullable enum fix..."
4343
@python tools/fix_nullable_enums.py
44+
@echo "Fixing lint errors..."
45+
@ruff check --fix rootly_sdk/
4446
@echo "Formatting patched files..."
45-
@ruff format rootly_sdk/models/
47+
@ruff format rootly_sdk/
4648

4749
test:
4850
python -c "import rootly_sdk; print('SDK imports successfully')"

pyproject.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "rootly"
3-
version = "1.3.0"
3+
version = "1.4.0"
44
description = "A client library for accessing Rootly API v1"
55
authors = []
66
readme = "README.md"
@@ -11,13 +11,10 @@ include = ["CHANGELOG.md", "rootly_sdk/py.typed"]
1111

1212
[tool.poetry.dependencies]
1313
python = "^3.10"
14-
httpx = ">=0.20.0,<0.29.0"
14+
httpx = ">=0.23.0,<0.29.0"
1515
attrs = ">=22.2.0"
1616
python-dateutil = "^2.8.0"
1717

18-
[tool.poetry.group.dev.dependencies]
19-
ruff = ">=0.15.0"
20-
2118
[build-system]
2219
requires = ["poetry-core>=2.0.0,<3.0.0"]
2320
build-backend = "poetry.core.masonry.api"

rootly_sdk/api/ai_chat/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Contains endpoint functions for accessing the API"""
Lines changed: 237 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,237 @@
1+
from http import HTTPStatus
2+
from typing import Any, cast
3+
from uuid import UUID
4+
5+
import httpx
6+
7+
from ... import errors
8+
from ...client import AuthenticatedClient, Client
9+
from ...models.ai_chat_response import AiChatResponse
10+
from ...types import UNSET, Response, Unset
11+
12+
13+
def _get_kwargs(
14+
*,
15+
message: str,
16+
session_id: UUID | Unset = UNSET,
17+
incident_id: UUID | Unset = UNSET,
18+
alert_id: UUID | Unset = UNSET,
19+
) -> dict[str, Any]:
20+
21+
params: dict[str, Any] = {}
22+
23+
params["message"] = message
24+
25+
json_session_id: str | Unset = UNSET
26+
if not isinstance(session_id, Unset):
27+
json_session_id = str(session_id)
28+
params["session_id"] = json_session_id
29+
30+
json_incident_id: str | Unset = UNSET
31+
if not isinstance(incident_id, Unset):
32+
json_incident_id = str(incident_id)
33+
params["incident_id"] = json_incident_id
34+
35+
json_alert_id: str | Unset = UNSET
36+
if not isinstance(alert_id, Unset):
37+
json_alert_id = str(alert_id)
38+
params["alert_id"] = json_alert_id
39+
40+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
41+
42+
_kwargs: dict[str, Any] = {
43+
"method": "post",
44+
"url": "/v1/ai/chat",
45+
"params": params,
46+
}
47+
48+
return _kwargs
49+
50+
51+
def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AiChatResponse | Any | None:
52+
if response.status_code == 200:
53+
response_200 = AiChatResponse.from_dict(response.json())
54+
55+
return response_200
56+
57+
if response.status_code == 403:
58+
response_403 = cast(Any, None)
59+
return response_403
60+
61+
if response.status_code == 422:
62+
response_422 = cast(Any, None)
63+
return response_422
64+
65+
if client.raise_on_unexpected_status:
66+
raise errors.UnexpectedStatus(response.status_code, response.content)
67+
else:
68+
return None
69+
70+
71+
def _build_response(
72+
*, client: AuthenticatedClient | Client, response: httpx.Response
73+
) -> Response[AiChatResponse | Any]:
74+
return Response(
75+
status_code=HTTPStatus(response.status_code),
76+
content=response.content,
77+
headers=response.headers,
78+
parsed=_parse_response(client=client, response=response),
79+
)
80+
81+
82+
def sync_detailed(
83+
*,
84+
client: AuthenticatedClient,
85+
message: str,
86+
session_id: UUID | Unset = UNSET,
87+
incident_id: UUID | Unset = UNSET,
88+
alert_id: UUID | Unset = UNSET,
89+
) -> Response[AiChatResponse | Any]:
90+
"""Send AI chat message
91+
92+
Send a message to the AI assistant and receive a synchronous reply. Optionally bind the conversation
93+
to an incident or alert for context-aware responses. Requires `ai.chat:write` OAuth scope or an API
94+
key.
95+
96+
Args:
97+
message (str):
98+
session_id (UUID | Unset):
99+
incident_id (UUID | Unset):
100+
alert_id (UUID | Unset):
101+
102+
Raises:
103+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
104+
httpx.TimeoutException: If the request takes longer than Client.timeout.
105+
106+
Returns:
107+
Response[AiChatResponse | Any]
108+
"""
109+
110+
kwargs = _get_kwargs(
111+
message=message,
112+
session_id=session_id,
113+
incident_id=incident_id,
114+
alert_id=alert_id,
115+
)
116+
117+
response = client.get_httpx_client().request(
118+
**kwargs,
119+
)
120+
121+
return _build_response(client=client, response=response)
122+
123+
124+
def sync(
125+
*,
126+
client: AuthenticatedClient,
127+
message: str,
128+
session_id: UUID | Unset = UNSET,
129+
incident_id: UUID | Unset = UNSET,
130+
alert_id: UUID | Unset = UNSET,
131+
) -> AiChatResponse | Any | None:
132+
"""Send AI chat message
133+
134+
Send a message to the AI assistant and receive a synchronous reply. Optionally bind the conversation
135+
to an incident or alert for context-aware responses. Requires `ai.chat:write` OAuth scope or an API
136+
key.
137+
138+
Args:
139+
message (str):
140+
session_id (UUID | Unset):
141+
incident_id (UUID | Unset):
142+
alert_id (UUID | Unset):
143+
144+
Raises:
145+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
146+
httpx.TimeoutException: If the request takes longer than Client.timeout.
147+
148+
Returns:
149+
AiChatResponse | Any
150+
"""
151+
152+
return sync_detailed(
153+
client=client,
154+
message=message,
155+
session_id=session_id,
156+
incident_id=incident_id,
157+
alert_id=alert_id,
158+
).parsed
159+
160+
161+
async def asyncio_detailed(
162+
*,
163+
client: AuthenticatedClient,
164+
message: str,
165+
session_id: UUID | Unset = UNSET,
166+
incident_id: UUID | Unset = UNSET,
167+
alert_id: UUID | Unset = UNSET,
168+
) -> Response[AiChatResponse | Any]:
169+
"""Send AI chat message
170+
171+
Send a message to the AI assistant and receive a synchronous reply. Optionally bind the conversation
172+
to an incident or alert for context-aware responses. Requires `ai.chat:write` OAuth scope or an API
173+
key.
174+
175+
Args:
176+
message (str):
177+
session_id (UUID | Unset):
178+
incident_id (UUID | Unset):
179+
alert_id (UUID | Unset):
180+
181+
Raises:
182+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
183+
httpx.TimeoutException: If the request takes longer than Client.timeout.
184+
185+
Returns:
186+
Response[AiChatResponse | Any]
187+
"""
188+
189+
kwargs = _get_kwargs(
190+
message=message,
191+
session_id=session_id,
192+
incident_id=incident_id,
193+
alert_id=alert_id,
194+
)
195+
196+
response = await client.get_async_httpx_client().request(**kwargs)
197+
198+
return _build_response(client=client, response=response)
199+
200+
201+
async def asyncio(
202+
*,
203+
client: AuthenticatedClient,
204+
message: str,
205+
session_id: UUID | Unset = UNSET,
206+
incident_id: UUID | Unset = UNSET,
207+
alert_id: UUID | Unset = UNSET,
208+
) -> AiChatResponse | Any | None:
209+
"""Send AI chat message
210+
211+
Send a message to the AI assistant and receive a synchronous reply. Optionally bind the conversation
212+
to an incident or alert for context-aware responses. Requires `ai.chat:write` OAuth scope or an API
213+
key.
214+
215+
Args:
216+
message (str):
217+
session_id (UUID | Unset):
218+
incident_id (UUID | Unset):
219+
alert_id (UUID | Unset):
220+
221+
Raises:
222+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
223+
httpx.TimeoutException: If the request takes longer than Client.timeout.
224+
225+
Returns:
226+
AiChatResponse | Any
227+
"""
228+
229+
return (
230+
await asyncio_detailed(
231+
client=client,
232+
message=message,
233+
session_id=session_id,
234+
incident_id=incident_id,
235+
alert_id=alert_id,
236+
)
237+
).parsed

0 commit comments

Comments
 (0)