Skip to content

Commit 2b9a0d6

Browse files
author
stlc-bot
committed
chore: sync sdk-openapi.json from shapleyai/code@f1e874d0d5
Stainless-Generated-From: 079416925644c7efb725029b9f165f8ca36b8757
1 parent 90ec14b commit 2b9a0d6

5 files changed

Lines changed: 46 additions & 14 deletions

File tree

scripts/mock

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/parallel/resources/monitor.py

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ def update(
182182
*,
183183
frequency: Optional[str] | Omit = omit,
184184
metadata: Optional[Dict[str, str]] | Omit = omit,
185+
processor: Optional[Literal["lite", "base"]] | Omit = omit,
185186
settings: Optional[UpdateMonitorEventStreamSettingsParam] | Omit = omit,
186187
type: Optional[Literal["event_stream", "snapshot"]] | Omit = omit,
187188
webhook: Optional[MonitorWebhookParam] | Omit = omit,
@@ -195,23 +196,31 @@ def update(
195196
"""
196197
Update a monitor.
197198
198-
Only fields explicitly included in the request body are changed. Pass `null` for
199-
`webhook` or `metadata` to clear those fields. Pass `type` and `settings` to
200-
update type-specific settings on an `event_stream` monitor. At least one field
201-
must be provided. Cancelled monitors cannot be updated.
199+
Only fields explicitly included in the request body are changed. Pass `null` to
200+
clear `webhook`, `metadata`, or `settings.advanced_settings`; every other field
201+
rejects `null`, so omit it to leave it unchanged. Pass `type` and `settings` to
202+
update type-specific settings on an `event_stream` monitor. Pass `processor` to
203+
change the processor used by subsequent monitor runs. At least one field must be
204+
provided. Cancelled monitors cannot be updated.
202205
203206
Args:
204207
frequency: Frequency of the monitor. Format: '<number><unit>' where unit is 'h' (hours),
205-
'd' (days), or 'w' (weeks). Must be between 1h and 30d (inclusive).
208+
'd' (days), or 'w' (weeks). Must be between 1h and 30d (inclusive). Omit to keep
209+
the current frequency; `null` is rejected.
206210
207211
metadata: User-provided metadata stored with the monitor and echoed back in webhook
208212
notifications and GET responses, so you can map events to objects in your
209213
application. Keys: max 16 chars; values: max 512 chars.
210214
215+
processor: Processor to use for subsequent monitor runs. `lite` is faster and cheaper;
216+
`base` performs more thorough analysis at higher cost and latency. Omit to keep
217+
the current processor; `null` is rejected.
218+
211219
settings: Type-specific update settings for an `event_stream` monitor.
212220
213221
type: Type of the monitor being updated. Required when `settings` is provided; must be
214222
`event_stream` (snapshot monitors have no updatable type-specific settings).
223+
Omit when `settings` is not provided; `null` is rejected.
215224
216225
webhook: Webhook configuration for a monitor.
217226
@@ -231,6 +240,7 @@ def update(
231240
{
232241
"frequency": frequency,
233242
"metadata": metadata,
243+
"processor": processor,
234244
"settings": settings,
235245
"type": type,
236246
"webhook": webhook,
@@ -599,6 +609,7 @@ async def update(
599609
*,
600610
frequency: Optional[str] | Omit = omit,
601611
metadata: Optional[Dict[str, str]] | Omit = omit,
612+
processor: Optional[Literal["lite", "base"]] | Omit = omit,
602613
settings: Optional[UpdateMonitorEventStreamSettingsParam] | Omit = omit,
603614
type: Optional[Literal["event_stream", "snapshot"]] | Omit = omit,
604615
webhook: Optional[MonitorWebhookParam] | Omit = omit,
@@ -612,23 +623,31 @@ async def update(
612623
"""
613624
Update a monitor.
614625
615-
Only fields explicitly included in the request body are changed. Pass `null` for
616-
`webhook` or `metadata` to clear those fields. Pass `type` and `settings` to
617-
update type-specific settings on an `event_stream` monitor. At least one field
618-
must be provided. Cancelled monitors cannot be updated.
626+
Only fields explicitly included in the request body are changed. Pass `null` to
627+
clear `webhook`, `metadata`, or `settings.advanced_settings`; every other field
628+
rejects `null`, so omit it to leave it unchanged. Pass `type` and `settings` to
629+
update type-specific settings on an `event_stream` monitor. Pass `processor` to
630+
change the processor used by subsequent monitor runs. At least one field must be
631+
provided. Cancelled monitors cannot be updated.
619632
620633
Args:
621634
frequency: Frequency of the monitor. Format: '<number><unit>' where unit is 'h' (hours),
622-
'd' (days), or 'w' (weeks). Must be between 1h and 30d (inclusive).
635+
'd' (days), or 'w' (weeks). Must be between 1h and 30d (inclusive). Omit to keep
636+
the current frequency; `null` is rejected.
623637
624638
metadata: User-provided metadata stored with the monitor and echoed back in webhook
625639
notifications and GET responses, so you can map events to objects in your
626640
application. Keys: max 16 chars; values: max 512 chars.
627641
642+
processor: Processor to use for subsequent monitor runs. `lite` is faster and cheaper;
643+
`base` performs more thorough analysis at higher cost and latency. Omit to keep
644+
the current processor; `null` is rejected.
645+
628646
settings: Type-specific update settings for an `event_stream` monitor.
629647
630648
type: Type of the monitor being updated. Required when `settings` is provided; must be
631649
`event_stream` (snapshot monitors have no updatable type-specific settings).
650+
Omit when `settings` is not provided; `null` is rejected.
632651
633652
webhook: Webhook configuration for a monitor.
634653
@@ -648,6 +667,7 @@ async def update(
648667
{
649668
"frequency": frequency,
650669
"metadata": metadata,
670+
"processor": processor,
651671
"settings": settings,
652672
"type": type,
653673
"webhook": webhook,

src/parallel/types/monitor_update_params.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ class MonitorUpdateParams(TypedDict, total=False):
1616
"""Frequency of the monitor.
1717
1818
Format: '<number><unit>' where unit is 'h' (hours), 'd' (days), or 'w' (weeks).
19-
Must be between 1h and 30d (inclusive).
19+
Must be between 1h and 30d (inclusive). Omit to keep the current frequency;
20+
`null` is rejected.
2021
"""
2122

2223
metadata: Optional[Dict[str, str]]
@@ -26,14 +27,22 @@ class MonitorUpdateParams(TypedDict, total=False):
2627
application. Keys: max 16 chars; values: max 512 chars.
2728
"""
2829

30+
processor: Optional[Literal["lite", "base"]]
31+
"""Processor to use for subsequent monitor runs.
32+
33+
`lite` is faster and cheaper; `base` performs more thorough analysis at higher
34+
cost and latency. Omit to keep the current processor; `null` is rejected.
35+
"""
36+
2937
settings: Optional[UpdateMonitorEventStreamSettingsParam]
3038
"""Type-specific update settings for an `event_stream` monitor."""
3139

3240
type: Optional[Literal["event_stream", "snapshot"]]
3341
"""Type of the monitor being updated.
3442
3543
Required when `settings` is provided; must be `event_stream` (snapshot monitors
36-
have no updatable type-specific settings).
44+
have no updatable type-specific settings). Omit when `settings` is not provided;
45+
`null` is rejected.
3746
"""
3847

3948
webhook: Optional[MonitorWebhookParam]

src/parallel/types/update_monitor_event_stream_settings_param.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ class UpdateMonitorEventStreamSettingsParam(TypedDict, total=False):
2121
2222
Use this for minor updates to prompts and instructions only. Major changes to
2323
the query may lead to unexpected results in change detection, as the monitor
24-
compares new results with what was previously seen.
24+
compares new results with what was previously seen. Omit to keep the current
25+
query; `null` is rejected.
2526
"""

tests/api_resources/test_monitor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ def test_method_update_with_all_params(self, client: Parallel) -> None:
152152
"slack_thread_id": "1234567890.123456",
153153
"user_id": "U123ABC",
154154
},
155+
processor="lite",
155156
settings={
156157
"advanced_settings": {
157158
"location": "us",
@@ -498,6 +499,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncParallel)
498499
"slack_thread_id": "1234567890.123456",
499500
"user_id": "U123ABC",
500501
},
502+
processor="lite",
501503
settings={
502504
"advanced_settings": {
503505
"location": "us",

0 commit comments

Comments
 (0)