Skip to content

Commit dbb0691

Browse files
kwentclaude
andcommitted
Regenerate client with latest OpenAPI spec updates
New fields from upstream spec changes: - filter[notification_types] on /v1/oncalls endpoint - calling_tree_enabled on live call router - time_zone, csv_file_url, xlsx_file_url on on-call pay reports - links.last now nullable 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 2207234 commit dbb0691

5 files changed

Lines changed: 106 additions & 3 deletions

File tree

rootly_sdk/api/on_calls/list_oncalls.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def _get_kwargs(
2222
filteruser_ids: str | Unset = UNSET,
2323
filterservice_ids: str | Unset = UNSET,
2424
filtergroup_ids: str | Unset = UNSET,
25+
filternotification_types: str | Unset = UNSET,
2526
) -> dict[str, Any]:
2627

2728
params: dict[str, Any] = {}
@@ -50,6 +51,8 @@ def _get_kwargs(
5051

5152
params["filter[group_ids]"] = filtergroup_ids
5253

54+
params["filter[notification_types]"] = filternotification_types
55+
5356
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
5457

5558
_kwargs: dict[str, Any] = {
@@ -104,6 +107,7 @@ def sync_detailed(
104107
filteruser_ids: str | Unset = UNSET,
105108
filterservice_ids: str | Unset = UNSET,
106109
filtergroup_ids: str | Unset = UNSET,
110+
filternotification_types: str | Unset = UNSET,
107111
) -> Response[Any | ErrorsList]:
108112
"""List on-calls
109113
@@ -121,6 +125,7 @@ def sync_detailed(
121125
filteruser_ids (str | Unset):
122126
filterservice_ids (str | Unset):
123127
filtergroup_ids (str | Unset):
128+
filternotification_types (str | Unset):
124129
125130
Raises:
126131
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -141,6 +146,7 @@ def sync_detailed(
141146
filteruser_ids=filteruser_ids,
142147
filterservice_ids=filterservice_ids,
143148
filtergroup_ids=filtergroup_ids,
149+
filternotification_types=filternotification_types,
144150
)
145151

146152
response = client.get_httpx_client().request(
@@ -163,6 +169,7 @@ def sync(
163169
filteruser_ids: str | Unset = UNSET,
164170
filterservice_ids: str | Unset = UNSET,
165171
filtergroup_ids: str | Unset = UNSET,
172+
filternotification_types: str | Unset = UNSET,
166173
) -> Any | ErrorsList | None:
167174
"""List on-calls
168175
@@ -180,6 +187,7 @@ def sync(
180187
filteruser_ids (str | Unset):
181188
filterservice_ids (str | Unset):
182189
filtergroup_ids (str | Unset):
190+
filternotification_types (str | Unset):
183191
184192
Raises:
185193
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -201,6 +209,7 @@ def sync(
201209
filteruser_ids=filteruser_ids,
202210
filterservice_ids=filterservice_ids,
203211
filtergroup_ids=filtergroup_ids,
212+
filternotification_types=filternotification_types,
204213
).parsed
205214

206215

@@ -217,6 +226,7 @@ async def asyncio_detailed(
217226
filteruser_ids: str | Unset = UNSET,
218227
filterservice_ids: str | Unset = UNSET,
219228
filtergroup_ids: str | Unset = UNSET,
229+
filternotification_types: str | Unset = UNSET,
220230
) -> Response[Any | ErrorsList]:
221231
"""List on-calls
222232
@@ -234,6 +244,7 @@ async def asyncio_detailed(
234244
filteruser_ids (str | Unset):
235245
filterservice_ids (str | Unset):
236246
filtergroup_ids (str | Unset):
247+
filternotification_types (str | Unset):
237248
238249
Raises:
239250
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -254,6 +265,7 @@ async def asyncio_detailed(
254265
filteruser_ids=filteruser_ids,
255266
filterservice_ids=filterservice_ids,
256267
filtergroup_ids=filtergroup_ids,
268+
filternotification_types=filternotification_types,
257269
)
258270

259271
response = await client.get_async_httpx_client().request(**kwargs)
@@ -274,6 +286,7 @@ async def asyncio(
274286
filteruser_ids: str | Unset = UNSET,
275287
filterservice_ids: str | Unset = UNSET,
276288
filtergroup_ids: str | Unset = UNSET,
289+
filternotification_types: str | Unset = UNSET,
277290
) -> Any | ErrorsList | None:
278291
"""List on-calls
279292
@@ -291,6 +304,7 @@ async def asyncio(
291304
filteruser_ids (str | Unset):
292305
filterservice_ids (str | Unset):
293306
filtergroup_ids (str | Unset):
307+
filternotification_types (str | Unset):
294308
295309
Raises:
296310
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -313,5 +327,6 @@ async def asyncio(
313327
filteruser_ids=filteruser_ids,
314328
filterservice_ids=filterservice_ids,
315329
filtergroup_ids=filtergroup_ids,
330+
filternotification_types=filternotification_types,
316331
)
317332
).parsed

rootly_sdk/models/links.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ class Links:
1717
first (str):
1818
prev (None | str):
1919
next_ (None | str):
20-
last (str):
20+
last (None | str):
2121
"""
2222

2323
self_: str
2424
first: str
2525
prev: None | str
2626
next_: None | str
27-
last: str
27+
last: None | str
2828
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
2929

3030
def to_dict(self) -> dict[str, Any]:
@@ -38,6 +38,7 @@ def to_dict(self) -> dict[str, Any]:
3838
next_: None | str
3939
next_ = self.next_
4040

41+
last: None | str
4142
last = self.last
4243

4344
field_dict: dict[str, Any] = {}
@@ -75,7 +76,12 @@ def _parse_next_(data: object) -> None | str:
7576

7677
next_ = _parse_next_(d.pop("next"))
7778

78-
last = d.pop("last")
79+
def _parse_last(data: object) -> None | str:
80+
if data is None:
81+
return data
82+
return cast(None | str, data)
83+
84+
last = _parse_last(d.pop("last"))
7985

8086
links = cls(
8187
self_=self_,

rootly_sdk/models/new_live_call_router_data_attributes.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ class NewLiveCallRouterDataAttributes:
5959
escalation_level_delay_in_seconds (int | Unset): This overrides the delay (seconds) in escalation levels
6060
should_auto_resolve_alert_on_call_end (bool | Unset): This overrides the delay (seconds) in escalation levels
6161
alert_urgency_id (str | Unset): This is used in escalation paths to determine who to page
62+
calling_tree_enabled (bool | Unset): Whether the live call router is configured as a phone tree, requiring
63+
callers to press a key before being connected
6264
calling_tree_prompt (str | Unset): The audio instructions callers will hear when they call this number,
6365
prompting them to select from available options to route their call
6466
escalation_policy_trigger_params (NewLiveCallRouterDataAttributesEscalationPolicyTriggerParams | Unset):
@@ -79,6 +81,7 @@ class NewLiveCallRouterDataAttributes:
7981
escalation_level_delay_in_seconds: int | Unset = UNSET
8082
should_auto_resolve_alert_on_call_end: bool | Unset = UNSET
8183
alert_urgency_id: str | Unset = UNSET
84+
calling_tree_enabled: bool | Unset = UNSET
8285
calling_tree_prompt: str | Unset = UNSET
8386
escalation_policy_trigger_params: NewLiveCallRouterDataAttributesEscalationPolicyTriggerParams | Unset = UNSET
8487

@@ -118,6 +121,8 @@ def to_dict(self) -> dict[str, Any]:
118121

119122
alert_urgency_id = self.alert_urgency_id
120123

124+
calling_tree_enabled = self.calling_tree_enabled
125+
121126
calling_tree_prompt = self.calling_tree_prompt
122127

123128
escalation_policy_trigger_params: dict[str, Any] | Unset = UNSET
@@ -153,6 +158,8 @@ def to_dict(self) -> dict[str, Any]:
153158
field_dict["should_auto_resolve_alert_on_call_end"] = should_auto_resolve_alert_on_call_end
154159
if alert_urgency_id is not UNSET:
155160
field_dict["alert_urgency_id"] = alert_urgency_id
161+
if calling_tree_enabled is not UNSET:
162+
field_dict["calling_tree_enabled"] = calling_tree_enabled
156163
if calling_tree_prompt is not UNSET:
157164
field_dict["calling_tree_prompt"] = calling_tree_prompt
158165
if escalation_policy_trigger_params is not UNSET:
@@ -210,6 +217,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
210217

211218
alert_urgency_id = d.pop("alert_urgency_id", UNSET)
212219

220+
calling_tree_enabled = d.pop("calling_tree_enabled", UNSET)
221+
213222
calling_tree_prompt = d.pop("calling_tree_prompt", UNSET)
214223

215224
_escalation_policy_trigger_params = d.pop("escalation_policy_trigger_params", UNSET)
@@ -237,6 +246,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
237246
escalation_level_delay_in_seconds=escalation_level_delay_in_seconds,
238247
should_auto_resolve_alert_on_call_end=should_auto_resolve_alert_on_call_end,
239248
alert_urgency_id=alert_urgency_id,
249+
calling_tree_enabled=calling_tree_enabled,
240250
calling_tree_prompt=calling_tree_prompt,
241251
escalation_policy_trigger_params=escalation_policy_trigger_params,
242252
)

rootly_sdk/models/on_call_pay_report.py

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ class OnCallPayReport:
3636
has_single_rate (bool | Unset): Whether a single rate is applied to all users.
3737
enabled_granular_time_breakdown (bool | Unset): Whether granular time breakdown is enabled.
3838
last_generated_at (datetime.datetime | None | Unset): When the report was last generated.
39+
time_zone (None | str | Unset): The team's IANA timezone used to interpret start_date and end_date.
40+
csv_file_url (None | str | Unset): Download URL for the generated CSV report. Null until the report is
41+
generated.
42+
xlsx_file_url (None | str | Unset): Download URL for the generated XLSX report. Null until the report is
43+
generated.
3944
"""
4045

4146
status: OnCallPayReportStatus
@@ -55,6 +60,9 @@ class OnCallPayReport:
5560
has_single_rate: bool | Unset = UNSET
5661
enabled_granular_time_breakdown: bool | Unset = UNSET
5762
last_generated_at: datetime.datetime | None | Unset = UNSET
63+
time_zone: None | str | Unset = UNSET
64+
csv_file_url: None | str | Unset = UNSET
65+
xlsx_file_url: None | str | Unset = UNSET
5866
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
5967

6068
def to_dict(self) -> dict[str, Any]:
@@ -100,6 +108,24 @@ def to_dict(self) -> dict[str, Any]:
100108
else:
101109
last_generated_at = self.last_generated_at
102110

111+
time_zone: None | str | Unset
112+
if isinstance(self.time_zone, Unset):
113+
time_zone = UNSET
114+
else:
115+
time_zone = self.time_zone
116+
117+
csv_file_url: None | str | Unset
118+
if isinstance(self.csv_file_url, Unset):
119+
csv_file_url = UNSET
120+
else:
121+
csv_file_url = self.csv_file_url
122+
123+
xlsx_file_url: None | str | Unset
124+
if isinstance(self.xlsx_file_url, Unset):
125+
xlsx_file_url = UNSET
126+
else:
127+
xlsx_file_url = self.xlsx_file_url
128+
103129
field_dict: dict[str, Any] = {}
104130
field_dict.update(self.additional_properties)
105131
field_dict.update(
@@ -135,6 +161,12 @@ def to_dict(self) -> dict[str, Any]:
135161
field_dict["enabled_granular_time_breakdown"] = enabled_granular_time_breakdown
136162
if last_generated_at is not UNSET:
137163
field_dict["last_generated_at"] = last_generated_at
164+
if time_zone is not UNSET:
165+
field_dict["time_zone"] = time_zone
166+
if csv_file_url is not UNSET:
167+
field_dict["csv_file_url"] = csv_file_url
168+
if xlsx_file_url is not UNSET:
169+
field_dict["xlsx_file_url"] = xlsx_file_url
138170

139171
return field_dict
140172

@@ -195,6 +227,33 @@ def _parse_last_generated_at(data: object) -> datetime.datetime | None | Unset:
195227

196228
last_generated_at = _parse_last_generated_at(d.pop("last_generated_at", UNSET))
197229

230+
def _parse_time_zone(data: object) -> None | str | Unset:
231+
if data is None:
232+
return data
233+
if isinstance(data, Unset):
234+
return data
235+
return cast(None | str | Unset, data)
236+
237+
time_zone = _parse_time_zone(d.pop("time_zone", UNSET))
238+
239+
def _parse_csv_file_url(data: object) -> None | str | Unset:
240+
if data is None:
241+
return data
242+
if isinstance(data, Unset):
243+
return data
244+
return cast(None | str | Unset, data)
245+
246+
csv_file_url = _parse_csv_file_url(d.pop("csv_file_url", UNSET))
247+
248+
def _parse_xlsx_file_url(data: object) -> None | str | Unset:
249+
if data is None:
250+
return data
251+
if isinstance(data, Unset):
252+
return data
253+
return cast(None | str | Unset, data)
254+
255+
xlsx_file_url = _parse_xlsx_file_url(d.pop("xlsx_file_url", UNSET))
256+
198257
on_call_pay_report = cls(
199258
status=status,
200259
start_date=start_date,
@@ -213,6 +272,9 @@ def _parse_last_generated_at(data: object) -> datetime.datetime | None | Unset:
213272
has_single_rate=has_single_rate,
214273
enabled_granular_time_breakdown=enabled_granular_time_breakdown,
215274
last_generated_at=last_generated_at,
275+
time_zone=time_zone,
276+
csv_file_url=csv_file_url,
277+
xlsx_file_url=xlsx_file_url,
216278
)
217279

218280
on_call_pay_report.additional_properties = d

rootly_sdk/models/update_live_call_router_data_attributes.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ class UpdateLiveCallRouterDataAttributes:
5454
escalation_level_delay_in_seconds (int | Unset): This overrides the delay (seconds) in escalation levels
5555
should_auto_resolve_alert_on_call_end (bool | Unset): This overrides the delay (seconds) in escalation levels
5656
alert_urgency_id (str | Unset): This is used in escalation paths to determine who to page
57+
calling_tree_enabled (bool | Unset): Whether the live call router is configured as a phone tree, requiring
58+
callers to press a key before being connected
5759
calling_tree_prompt (str | Unset): The audio instructions callers will hear when they call this number,
5860
prompting them to select from available options to route their call
5961
paging_targets (list[UpdateLiveCallRouterDataAttributesPagingTargetsItem] | Unset): Paging targets that callers
@@ -74,6 +76,7 @@ class UpdateLiveCallRouterDataAttributes:
7476
escalation_level_delay_in_seconds: int | Unset = UNSET
7577
should_auto_resolve_alert_on_call_end: bool | Unset = UNSET
7678
alert_urgency_id: str | Unset = UNSET
79+
calling_tree_enabled: bool | Unset = UNSET
7780
calling_tree_prompt: str | Unset = UNSET
7881
paging_targets: list[UpdateLiveCallRouterDataAttributesPagingTargetsItem] | Unset = UNSET
7982
escalation_policy_trigger_params: UpdateLiveCallRouterDataAttributesEscalationPolicyTriggerParams | Unset = UNSET
@@ -113,6 +116,8 @@ def to_dict(self) -> dict[str, Any]:
113116

114117
alert_urgency_id = self.alert_urgency_id
115118

119+
calling_tree_enabled = self.calling_tree_enabled
120+
116121
calling_tree_prompt = self.calling_tree_prompt
117122

118123
paging_targets: list[dict[str, Any]] | Unset = UNSET
@@ -155,6 +160,8 @@ def to_dict(self) -> dict[str, Any]:
155160
field_dict["should_auto_resolve_alert_on_call_end"] = should_auto_resolve_alert_on_call_end
156161
if alert_urgency_id is not UNSET:
157162
field_dict["alert_urgency_id"] = alert_urgency_id
163+
if calling_tree_enabled is not UNSET:
164+
field_dict["calling_tree_enabled"] = calling_tree_enabled
158165
if calling_tree_prompt is not UNSET:
159166
field_dict["calling_tree_prompt"] = calling_tree_prompt
160167
if paging_targets is not UNSET:
@@ -220,6 +227,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
220227

221228
alert_urgency_id = d.pop("alert_urgency_id", UNSET)
222229

230+
calling_tree_enabled = d.pop("calling_tree_enabled", UNSET)
231+
223232
calling_tree_prompt = d.pop("calling_tree_prompt", UNSET)
224233

225234
_paging_targets = d.pop("paging_targets", UNSET)
@@ -258,6 +267,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
258267
escalation_level_delay_in_seconds=escalation_level_delay_in_seconds,
259268
should_auto_resolve_alert_on_call_end=should_auto_resolve_alert_on_call_end,
260269
alert_urgency_id=alert_urgency_id,
270+
calling_tree_enabled=calling_tree_enabled,
261271
calling_tree_prompt=calling_tree_prompt,
262272
paging_targets=paging_targets,
263273
escalation_policy_trigger_params=escalation_policy_trigger_params,

0 commit comments

Comments
 (0)