Skip to content

Commit 8dfa750

Browse files
feat(api): manual updates
1 parent b3c0639 commit 8dfa750

64 files changed

Lines changed: 3125 additions & 371 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.

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 29
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web/parallel-sdk-f886afe5dd04f4e33caf809b02945ca92fd22a7d297f7815444a41404b0b545f.yml
3-
openapi_spec_hash: a46fe5664f6e27846f060276e765fddc
4-
config_hash: 456111b9d3664d8dbb99018e7dc88488
1+
configured_endpoints: 38
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web/parallel-sdk-6e6477081ebc7944d0bdab7d867b3e906ae85519a17a8a594262fb9e1556b85e.yml
3+
openapi_spec_hash: 688facba9b1f3e19785c0ca88953e1c9
4+
config_hash: 684bafded5e8218044e29d022389a8a2

api.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ from parallel.types import (
1717
ExtractResponse,
1818
ExtractResult,
1919
FetchPolicy,
20+
FullContentSettings,
2021
SearchResult,
2122
UsageItem,
2223
WebSearchResult,
@@ -40,9 +41,13 @@ from parallel.types import (
4041
JsonSchema,
4142
ParsedTaskRunResult,
4243
RunInput,
44+
TaskAdvancedSettings,
4345
TaskRun,
4446
TaskRunJsonOutput,
47+
TaskRunProgressMessageEvent,
48+
TaskRunProgressStatsEvent,
4549
TaskRunResult,
50+
TaskRunSourceStats,
4651
TaskRunTextOutput,
4752
TaskSpec,
4853
TextSchema,
@@ -54,6 +59,7 @@ Methods:
5459
- <code title="post /v1/tasks/runs">client.task_run.<a href="./src/parallel/resources/task_run.py">create</a>(\*\*<a href="src/parallel/types/task_run_create_params.py">params</a>) -> <a href="./src/parallel/types/task_run.py">TaskRun</a></code>
5560
- <code title="get /v1/tasks/runs/{run_id}">client.task_run.<a href="./src/parallel/resources/task_run.py">retrieve</a>(run_id) -> <a href="./src/parallel/types/task_run.py">TaskRun</a></code>
5661
- <code title="get /v1/tasks/runs/{run_id}/result">client.task_run.<a href="./src/parallel/resources/task_run.py">result</a>(run_id, \*\*<a href="src/parallel/types/task_run_result_params.py">params</a>) -> <a href="./src/parallel/types/task_run_result.py">TaskRunResult</a></code>
62+
- <code title="get /v1/tasks/runs/{run_id}/input">client.task_run.<a href="./src/parallel/resources/task_run.py">retrieve_input</a>(run_id) -> <a href="./src/parallel/types/run_input.py">RunInput</a></code>
5763

5864
Convenience methods:
5965

@@ -68,6 +74,7 @@ from parallel.types import (
6874
TaskGroup,
6975
TaskGroupRunResponse,
7076
TaskGroupStatus,
77+
TaskGroupStatusEvent,
7178
TaskGroupEventsResponse,
7279
TaskGroupGetRunsResponse,
7380
)
@@ -80,5 +87,42 @@ Methods:
8087
- <code title="post /v1/tasks/groups/{taskgroup_id}/runs">client.task_group.<a href="./src/parallel/resources/task_group.py">add_runs</a>(task_group_id, \*\*<a href="src/parallel/types/task_group_add_runs_params.py">params</a>) -> <a href="./src/parallel/types/task_group_run_response.py">TaskGroupRunResponse</a></code>
8188
- <code title="get /v1/tasks/groups/{taskgroup_id}/events">client.task_group.<a href="./src/parallel/resources/task_group.py">events</a>(task_group_id, \*\*<a href="src/parallel/types/task_group_events_params.py">params</a>) -> <a href="./src/parallel/types/task_group_events_response.py">TaskGroupEventsResponse</a></code>
8289
- <code title="get /v1/tasks/groups/{taskgroup_id}/runs">client.task_group.<a href="./src/parallel/resources/task_group.py">get_runs</a>(task_group_id, \*\*<a href="src/parallel/types/task_group_get_runs_params.py">params</a>) -> <a href="./src/parallel/types/task_group_get_runs_response.py">TaskGroupGetRunsResponse</a></code>
90+
- <code title="get /v1/tasks/groups/{taskgroup_id}/runs/{run_id}">client.task_group.<a href="./src/parallel/resources/task_group.py">retrieve_run</a>(run_id, \*, task_group_id) -> <a href="./src/parallel/types/task_run.py">TaskRun</a></code>
91+
92+
# Monitor
93+
94+
Types:
95+
96+
```python
97+
from parallel.types import (
98+
AdvancedMonitorSettings,
99+
CreateMonitorRequest,
100+
Monitor,
101+
MonitorCompletionEvent,
102+
MonitorErrorEvent,
103+
MonitorEventStreamEvent,
104+
MonitorEventStreamResponseSettings,
105+
MonitorEventStreamSettings,
106+
MonitorSnapshotEvent,
107+
MonitorSnapshotOutput,
108+
MonitorSnapshotResponseSettings,
109+
MonitorSnapshotSettings,
110+
MonitorWebhook,
111+
PaginatedMonitorEvents,
112+
PaginatedMonitorResponse,
113+
UpdateMonitorEventStreamSettings,
114+
UpdateMonitorRequest,
115+
)
116+
```
117+
118+
Methods:
119+
120+
- <code title="post /v1/monitors">client.monitor.<a href="./src/parallel/resources/monitor.py">create</a>(\*\*<a href="src/parallel/types/monitor_create_params.py">params</a>) -> <a href="./src/parallel/types/monitor.py">Monitor</a></code>
121+
- <code title="get /v1/monitors/{monitor_id}">client.monitor.<a href="./src/parallel/resources/monitor.py">retrieve</a>(monitor_id) -> <a href="./src/parallel/types/monitor.py">Monitor</a></code>
122+
- <code title="post /v1/monitors/{monitor_id}/update">client.monitor.<a href="./src/parallel/resources/monitor.py">update</a>(monitor_id, \*\*<a href="src/parallel/types/monitor_update_params.py">params</a>) -> <a href="./src/parallel/types/monitor.py">Monitor</a></code>
123+
- <code title="get /v1/monitors">client.monitor.<a href="./src/parallel/resources/monitor.py">list</a>(\*\*<a href="src/parallel/types/monitor_list_params.py">params</a>) -> <a href="./src/parallel/types/paginated_monitor_response.py">PaginatedMonitorResponse</a></code>
124+
- <code title="post /v1/monitors/{monitor_id}/cancel">client.monitor.<a href="./src/parallel/resources/monitor.py">cancel</a>(monitor_id) -> <a href="./src/parallel/types/monitor.py">Monitor</a></code>
125+
- <code title="get /v1/monitors/{monitor_id}/events">client.monitor.<a href="./src/parallel/resources/monitor.py">events</a>(monitor_id, \*\*<a href="src/parallel/types/monitor_events_params.py">params</a>) -> <a href="./src/parallel/types/paginated_monitor_events.py">PaginatedMonitorEvents</a></code>
126+
- <code title="post /v1/monitors/{monitor_id}/trigger">client.monitor.<a href="./src/parallel/resources/monitor.py">trigger</a>(monitor_id) -> None</code>
83127

84128
# [Beta](src/parallel/resources/beta/api.md)

src/parallel/_client.py

Lines changed: 86 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@
5454
from .types.advanced_extract_settings_param import AdvancedExtractSettingsParam
5555

5656
if TYPE_CHECKING:
57-
from .resources import beta, task_run, task_group
57+
from .resources import beta, monitor, task_run, task_group
58+
from .resources.monitor import MonitorResource, AsyncMonitorResource
5859
from .resources.task_run import TaskRunResource, AsyncTaskRunResource
5960
from .resources.beta.beta import BetaResource, AsyncBetaResource
6061
from .resources.task_group import TaskGroupResource, AsyncTaskGroupResource
@@ -171,6 +172,20 @@ def task_group(self) -> TaskGroupResource:
171172

172173
return TaskGroupResource(self)
173174

175+
@cached_property
176+
def monitor(self) -> MonitorResource:
177+
"""The Monitor API watches the web for material changes on a fixed frequency.
178+
179+
Each monitor runs once on creation and then on its configured schedule, emitting events when meaningful changes are detected.
180+
- `event_stream` monitors track a search query and emit an event for each new material change.
181+
- `snapshot` monitors track a specific task run's output and emit an event when the output changes.
182+
183+
Results can be polled via the events endpoint or delivered via webhooks.
184+
"""
185+
from .resources.monitor import MonitorResource
186+
187+
return MonitorResource(self)
188+
174189
@cached_property
175190
def beta(self) -> BetaResource:
176191
from .resources.beta import BetaResource
@@ -549,6 +564,20 @@ def task_group(self) -> AsyncTaskGroupResource:
549564

550565
return AsyncTaskGroupResource(self)
551566

567+
@cached_property
568+
def monitor(self) -> AsyncMonitorResource:
569+
"""The Monitor API watches the web for material changes on a fixed frequency.
570+
571+
Each monitor runs once on creation and then on its configured schedule, emitting events when meaningful changes are detected.
572+
- `event_stream` monitors track a search query and emit an event for each new material change.
573+
- `snapshot` monitors track a specific task run's output and emit an event when the output changes.
574+
575+
Results can be polled via the events endpoint or delivered via webhooks.
576+
"""
577+
from .resources.monitor import AsyncMonitorResource
578+
579+
return AsyncMonitorResource(self)
580+
552581
@cached_property
553582
def beta(self) -> AsyncBetaResource:
554583
from .resources.beta import AsyncBetaResource
@@ -876,6 +905,20 @@ def task_group(self) -> task_group.TaskGroupResourceWithRawResponse:
876905

877906
return TaskGroupResourceWithRawResponse(self._client.task_group)
878907

908+
@cached_property
909+
def monitor(self) -> monitor.MonitorResourceWithRawResponse:
910+
"""The Monitor API watches the web for material changes on a fixed frequency.
911+
912+
Each monitor runs once on creation and then on its configured schedule, emitting events when meaningful changes are detected.
913+
- `event_stream` monitors track a search query and emit an event for each new material change.
914+
- `snapshot` monitors track a specific task run's output and emit an event when the output changes.
915+
916+
Results can be polled via the events endpoint or delivered via webhooks.
917+
"""
918+
from .resources.monitor import MonitorResourceWithRawResponse
919+
920+
return MonitorResourceWithRawResponse(self._client.monitor)
921+
879922
@cached_property
880923
def beta(self) -> beta.BetaResourceWithRawResponse:
881924
from .resources.beta import BetaResourceWithRawResponse
@@ -932,6 +975,20 @@ def task_group(self) -> task_group.AsyncTaskGroupResourceWithRawResponse:
932975

933976
return AsyncTaskGroupResourceWithRawResponse(self._client.task_group)
934977

978+
@cached_property
979+
def monitor(self) -> monitor.AsyncMonitorResourceWithRawResponse:
980+
"""The Monitor API watches the web for material changes on a fixed frequency.
981+
982+
Each monitor runs once on creation and then on its configured schedule, emitting events when meaningful changes are detected.
983+
- `event_stream` monitors track a search query and emit an event for each new material change.
984+
- `snapshot` monitors track a specific task run's output and emit an event when the output changes.
985+
986+
Results can be polled via the events endpoint or delivered via webhooks.
987+
"""
988+
from .resources.monitor import AsyncMonitorResourceWithRawResponse
989+
990+
return AsyncMonitorResourceWithRawResponse(self._client.monitor)
991+
935992
@cached_property
936993
def beta(self) -> beta.AsyncBetaResourceWithRawResponse:
937994
from .resources.beta import AsyncBetaResourceWithRawResponse
@@ -988,6 +1045,20 @@ def task_group(self) -> task_group.TaskGroupResourceWithStreamingResponse:
9881045

9891046
return TaskGroupResourceWithStreamingResponse(self._client.task_group)
9901047

1048+
@cached_property
1049+
def monitor(self) -> monitor.MonitorResourceWithStreamingResponse:
1050+
"""The Monitor API watches the web for material changes on a fixed frequency.
1051+
1052+
Each monitor runs once on creation and then on its configured schedule, emitting events when meaningful changes are detected.
1053+
- `event_stream` monitors track a search query and emit an event for each new material change.
1054+
- `snapshot` monitors track a specific task run's output and emit an event when the output changes.
1055+
1056+
Results can be polled via the events endpoint or delivered via webhooks.
1057+
"""
1058+
from .resources.monitor import MonitorResourceWithStreamingResponse
1059+
1060+
return MonitorResourceWithStreamingResponse(self._client.monitor)
1061+
9911062
@cached_property
9921063
def beta(self) -> beta.BetaResourceWithStreamingResponse:
9931064
from .resources.beta import BetaResourceWithStreamingResponse
@@ -1044,6 +1115,20 @@ def task_group(self) -> task_group.AsyncTaskGroupResourceWithStreamingResponse:
10441115

10451116
return AsyncTaskGroupResourceWithStreamingResponse(self._client.task_group)
10461117

1118+
@cached_property
1119+
def monitor(self) -> monitor.AsyncMonitorResourceWithStreamingResponse:
1120+
"""The Monitor API watches the web for material changes on a fixed frequency.
1121+
1122+
Each monitor runs once on creation and then on its configured schedule, emitting events when meaningful changes are detected.
1123+
- `event_stream` monitors track a search query and emit an event for each new material change.
1124+
- `snapshot` monitors track a specific task run's output and emit an event when the output changes.
1125+
1126+
Results can be polled via the events endpoint or delivered via webhooks.
1127+
"""
1128+
from .resources.monitor import AsyncMonitorResourceWithStreamingResponse
1129+
1130+
return AsyncMonitorResourceWithStreamingResponse(self._client.monitor)
1131+
10471132
@cached_property
10481133
def beta(self) -> beta.AsyncBetaResourceWithStreamingResponse:
10491134
from .resources.beta import AsyncBetaResourceWithStreamingResponse

src/parallel/resources/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3+
from .monitor import (
4+
MonitorResource,
5+
AsyncMonitorResource,
6+
MonitorResourceWithRawResponse,
7+
AsyncMonitorResourceWithRawResponse,
8+
MonitorResourceWithStreamingResponse,
9+
AsyncMonitorResourceWithStreamingResponse,
10+
)
311
from .task_run import (
412
TaskRunResource,
513
AsyncTaskRunResource,
@@ -30,4 +38,10 @@
3038
"AsyncTaskGroupResourceWithRawResponse",
3139
"TaskGroupResourceWithStreamingResponse",
3240
"AsyncTaskGroupResourceWithStreamingResponse",
41+
"MonitorResource",
42+
"AsyncMonitorResource",
43+
"MonitorResourceWithRawResponse",
44+
"AsyncMonitorResourceWithRawResponse",
45+
"MonitorResourceWithStreamingResponse",
46+
"AsyncMonitorResourceWithStreamingResponse",
3347
]

src/parallel/resources/beta/api.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ from parallel.types.beta import (
1111
WebSearchResult,
1212
ExtractError,
1313
FetchPolicy,
14+
FullContentSettings,
1415
UsageItem,
1516
)
1617
```
@@ -53,6 +54,7 @@ from parallel.types.beta import (
5354
TaskGroupEventsResponse,
5455
TaskGroupGetRunsResponse,
5556
TaskGroupStatus,
57+
TaskGroupStatusEvent,
5658
TaskGroup,
5759
TaskGroupRunResponse,
5860
)
@@ -72,18 +74,22 @@ Types:
7274

7375
```python
7476
from parallel.types.beta import (
77+
FindAllCandidate,
7578
FindAllCandidateMatchStatusEvent,
79+
FindAllCandidateMetrics,
7680
FindAllCandidatesRequest,
7781
FindAllCandidatesResponse,
7882
FindAllEnrichInput,
7983
FindAllExtendInput,
8084
FindAllRun,
8185
FindAllRunInput,
8286
FindAllRunResult,
87+
FindAllRunStatus,
8388
FindAllRunStatusEvent,
8489
FindAllSchema,
8590
FindAllSchemaUpdatedEvent,
8691
IngestInput,
92+
MatchCondition,
8793
FindAllEventsResponse,
8894
)
8995
```

src/parallel/resources/beta/findall.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
from ...types.beta.mcp_server_param import McpServerParam
3636
from ...types.beta.findall_run_result import FindAllRunResult
3737
from ...types.beta.parallel_beta_param import ParallelBetaParam
38+
from ...types.beta.match_condition_param import MatchConditionParam
3839
from ...types.beta.findall_events_response import FindAllEventsResponse
3940
from ...types.beta.findall_candidates_response import FindAllCandidatesResponse
4041

@@ -83,7 +84,7 @@ def create(
8384
*,
8485
entity_type: str,
8586
generator: Literal["base", "core", "pro", "preview"],
86-
match_conditions: Iterable[findall_create_params.MatchCondition],
87+
match_conditions: Iterable[MatchConditionParam],
8788
match_limit: int,
8889
objective: str,
8990
exclude_list: Optional[Iterable[findall_create_params.ExcludeList]] | Omit = omit,
@@ -681,7 +682,7 @@ async def create(
681682
*,
682683
entity_type: str,
683684
generator: Literal["base", "core", "pro", "preview"],
684-
match_conditions: Iterable[findall_create_params.MatchCondition],
685+
match_conditions: Iterable[MatchConditionParam],
685686
match_limit: int,
686687
objective: str,
687688
exclude_list: Optional[Iterable[findall_create_params.ExcludeList]] | Omit = omit,

src/parallel/resources/beta/task_run.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
from ...types.mcp_server_param import McpServerParam
2929
from ...types.beta.parallel_beta_param import ParallelBetaParam
3030
from ...types.shared_params.source_policy import SourcePolicy
31+
from ...types.task_advanced_settings_param import TaskAdvancedSettingsParam
3132
from ...types.beta.task_run_events_response import TaskRunEventsResponse
3233

3334
__all__ = ["TaskRunResource", "AsyncTaskRunResource"]
@@ -72,7 +73,7 @@ def create(
7273
*,
7374
input: Union[str, Dict[str, object]],
7475
processor: str,
75-
advanced_settings: Optional[task_run_create_params.AdvancedSettings] | Omit = omit,
76+
advanced_settings: Optional[TaskAdvancedSettingsParam] | Omit = omit,
7677
enable_events: Optional[bool] | Omit = omit,
7778
mcp_servers: Optional[Iterable[McpServerParam]] | Omit = omit,
7879
metadata: Optional[Dict[str, Union[str, float, bool]]] | Omit = omit,
@@ -310,7 +311,7 @@ async def create(
310311
*,
311312
input: Union[str, Dict[str, object]],
312313
processor: str,
313-
advanced_settings: Optional[task_run_create_params.AdvancedSettings] | Omit = omit,
314+
advanced_settings: Optional[TaskAdvancedSettingsParam] | Omit = omit,
314315
enable_events: Optional[bool] | Omit = omit,
315316
mcp_servers: Optional[Iterable[McpServerParam]] | Omit = omit,
316317
metadata: Optional[Dict[str, Union[str, float, bool]]] | Omit = omit,

0 commit comments

Comments
 (0)