samplehc 0.13.0__py3-none-any.whl → 0.15.0__py3-none-any.whl
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.
- samplehc/_base_client.py +8 -2
- samplehc/_client.py +105 -29
- samplehc/_models.py +37 -15
- samplehc/_streaming.py +12 -12
- samplehc/_types.py +3 -2
- samplehc/_utils/_sync.py +3 -31
- samplehc/_utils/_utils.py +1 -1
- samplehc/_version.py +1 -1
- samplehc/resources/v2/__init__.py +0 -28
- samplehc/resources/v2/documents/documents.py +8 -0
- samplehc/resources/v2/integrations/__init__.py +14 -0
- samplehc/resources/v2/integrations/integrations.py +32 -0
- samplehc/resources/v2/integrations/wellsky/__init__.py +33 -0
- samplehc/resources/v2/integrations/wellsky/patients.py +324 -0
- samplehc/resources/v2/integrations/wellsky/wellsky.py +102 -0
- samplehc/resources/v2/tasks/tasks.py +12 -3
- samplehc/resources/v2/v2.py +0 -64
- samplehc/types/v1_query_audit_logs_response.py +4 -0
- samplehc/types/v2/__init__.py +0 -2
- samplehc/types/v2/clearinghouse/claim_submit_response.py +5 -0
- samplehc/types/v2/clearinghouse/payer_list_response.py +2 -0
- samplehc/types/v2/clearinghouse/payer_search_response.py +2 -0
- samplehc/types/v2/clearinghouse_check_eligibility_response.py +4 -0
- samplehc/types/v2/clearinghouse_run_discovery_response.py +2 -0
- samplehc/types/v2/communication_send_fax_params.py +2 -0
- samplehc/types/v2/communication_send_fax_response.py +2 -0
- samplehc/types/v2/communication_send_letter_params.py +8 -0
- samplehc/types/v2/communication_send_letter_response.py +2 -0
- samplehc/types/v2/database_execute_sql_response.py +2 -0
- samplehc/types/v2/document_classify_params.py +2 -0
- samplehc/types/v2/document_classify_response.py +2 -0
- samplehc/types/v2/document_combine_response.py +4 -0
- samplehc/types/v2/document_create_from_splits_params.py +2 -0
- samplehc/types/v2/document_create_from_splits_response.py +2 -0
- samplehc/types/v2/document_extract_params.py +40 -3
- samplehc/types/v2/document_extract_response.py +2 -0
- samplehc/types/v2/document_generate_csv_response.py +4 -0
- samplehc/types/v2/document_presigned_upload_url_response.py +2 -0
- samplehc/types/v2/document_retrieve_csv_content_response.py +2 -0
- samplehc/types/v2/document_retrieve_metadata_response.py +2 -0
- samplehc/types/v2/document_search_response.py +2 -0
- samplehc/types/v2/document_split_params.py +2 -0
- samplehc/types/v2/document_split_response.py +2 -0
- samplehc/types/v2/documents/format_create_pdf_response.py +2 -0
- samplehc/types/v2/documents/legacy_extract_response.py +2 -0
- samplehc/types/v2/documents/legacy_reason_response.py +2 -0
- samplehc/types/v2/documents/legacy_split_params.py +2 -0
- samplehc/types/v2/documents/legacy_split_response.py +2 -0
- samplehc/types/v2/documents/pdf_template_retrieve_metadata_response.py +2 -0
- samplehc/types/v2/documents/template_render_document_response.py +2 -0
- samplehc/types/v2/hie/document_upload_params.py +2 -0
- samplehc/types/v2/integrations/glidian/prior_authorization_create_draft_response.py +2 -0
- samplehc/types/v2/integrations/glidian/prior_authorization_retrieve_record_response.py +2 -0
- samplehc/types/v2/integrations/glidian/prior_authorization_submit_response.py +2 -0
- samplehc/types/v2/integrations/glidian/prior_authorization_update_record_response.py +2 -0
- samplehc/types/v2/integrations/glidian/prior_authorizations/clinical_question_list_response.py +2 -0
- samplehc/types/v2/integrations/glidian/prior_authorizations/clinical_question_update_response.py +2 -0
- samplehc/types/v2/integrations/kno2/message_get_attachment_response.py +2 -0
- samplehc/types/v2/integrations/kno2/message_retrieve_response.py +2 -0
- samplehc/types/v2/integrations/wellsky/__init__.py +6 -0
- samplehc/types/v2/integrations/wellsky/patient_add_params.py +13 -0
- samplehc/types/v2/integrations/wellsky/patient_search_params.py +32 -0
- samplehc/types/v2/policy_list_companies_response.py +2 -0
- samplehc/types/v2/policy_list_plans_response.py +2 -0
- samplehc/types/v2/policy_list_response.py +2 -0
- samplehc/types/v2/policy_retrieve_presigned_url_response.py +2 -0
- samplehc/types/v2/policy_retrieve_text_response.py +2 -0
- samplehc/types/v2/task_cancel_response.py +2 -0
- samplehc/types/v2/task_complete_response.py +2 -0
- samplehc/types/v2/task_update_column_params.py +6 -3
- samplehc/types/v2/workflow_run_resume_when_complete_response.py +2 -0
- samplehc/types/v2/workflow_run_retrieve_response.py +2 -0
- samplehc/types/v2/workflow_runs/step_get_output_response.py +2 -0
- samplehc/types/v2/workflow_start_response.py +2 -0
- {samplehc-0.13.0.dist-info → samplehc-0.15.0.dist-info}/METADATA +8 -7
- {samplehc-0.13.0.dist-info → samplehc-0.15.0.dist-info}/RECORD +78 -91
- {samplehc-0.13.0.dist-info → samplehc-0.15.0.dist-info}/licenses/LICENSE +1 -1
- samplehc/resources/v2/browser_agents/__init__.py +0 -33
- samplehc/resources/v2/browser_agents/browser_agents.py +0 -209
- samplehc/resources/v2/browser_agents/runs/__init__.py +0 -33
- samplehc/resources/v2/browser_agents/runs/help_requests.py +0 -191
- samplehc/resources/v2/browser_agents/runs/runs.py +0 -233
- samplehc/resources/v2/browser_automation/__init__.py +0 -33
- samplehc/resources/v2/browser_automation/availity.py +0 -249
- samplehc/resources/v2/browser_automation/browser_automation.py +0 -102
- samplehc/types/v2/browser_agent_invoke_params.py +0 -13
- samplehc/types/v2/browser_agent_invoke_response.py +0 -15
- samplehc/types/v2/browser_agents/__init__.py +0 -6
- samplehc/types/v2/browser_agents/run_list_events_params.py +0 -15
- samplehc/types/v2/browser_agents/run_list_events_response.py +0 -30
- samplehc/types/v2/browser_agents/runs/__init__.py +0 -6
- samplehc/types/v2/browser_agents/runs/help_request_resolve_params.py +0 -18
- samplehc/types/v2/browser_agents/runs/help_request_resolve_response.py +0 -28
- samplehc/types/v2/browser_automation/__init__.py +0 -6
- samplehc/types/v2/browser_automation/availity_submit_appeal_params.py +0 -59
- samplehc/types/v2/browser_automation/availity_submit_appeal_response.py +0 -12
- {samplehc-0.13.0.dist-info → samplehc-0.15.0.dist-info}/WHEEL +0 -0
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
from typing import Dict
|
|
6
|
-
|
|
7
|
-
import httpx
|
|
8
|
-
|
|
9
|
-
from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
10
|
-
from ...._utils import maybe_transform, async_maybe_transform
|
|
11
|
-
from .runs.runs import (
|
|
12
|
-
RunsResource,
|
|
13
|
-
AsyncRunsResource,
|
|
14
|
-
RunsResourceWithRawResponse,
|
|
15
|
-
AsyncRunsResourceWithRawResponse,
|
|
16
|
-
RunsResourceWithStreamingResponse,
|
|
17
|
-
AsyncRunsResourceWithStreamingResponse,
|
|
18
|
-
)
|
|
19
|
-
from ...._compat import cached_property
|
|
20
|
-
from ....types.v2 import browser_agent_invoke_params
|
|
21
|
-
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
22
|
-
from ...._response import (
|
|
23
|
-
to_raw_response_wrapper,
|
|
24
|
-
to_streamed_response_wrapper,
|
|
25
|
-
async_to_raw_response_wrapper,
|
|
26
|
-
async_to_streamed_response_wrapper,
|
|
27
|
-
)
|
|
28
|
-
from ...._base_client import make_request_options
|
|
29
|
-
from ....types.v2.browser_agent_invoke_response import BrowserAgentInvokeResponse
|
|
30
|
-
|
|
31
|
-
__all__ = ["BrowserAgentsResource", "AsyncBrowserAgentsResource"]
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
class BrowserAgentsResource(SyncAPIResource):
|
|
35
|
-
@cached_property
|
|
36
|
-
def runs(self) -> RunsResource:
|
|
37
|
-
return RunsResource(self._client)
|
|
38
|
-
|
|
39
|
-
@cached_property
|
|
40
|
-
def with_raw_response(self) -> BrowserAgentsResourceWithRawResponse:
|
|
41
|
-
"""
|
|
42
|
-
This property can be used as a prefix for any HTTP method call to return
|
|
43
|
-
the raw response object instead of the parsed content.
|
|
44
|
-
|
|
45
|
-
For more information, see https://www.github.com/samplehc/samplehc-python#accessing-raw-response-data-eg-headers
|
|
46
|
-
"""
|
|
47
|
-
return BrowserAgentsResourceWithRawResponse(self)
|
|
48
|
-
|
|
49
|
-
@cached_property
|
|
50
|
-
def with_streaming_response(self) -> BrowserAgentsResourceWithStreamingResponse:
|
|
51
|
-
"""
|
|
52
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
53
|
-
|
|
54
|
-
For more information, see https://www.github.com/samplehc/samplehc-python#with_streaming_response
|
|
55
|
-
"""
|
|
56
|
-
return BrowserAgentsResourceWithStreamingResponse(self)
|
|
57
|
-
|
|
58
|
-
def invoke(
|
|
59
|
-
self,
|
|
60
|
-
slug: str,
|
|
61
|
-
*,
|
|
62
|
-
variables: Dict[str, object] | Omit = omit,
|
|
63
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
64
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
65
|
-
extra_headers: Headers | None = None,
|
|
66
|
-
extra_query: Query | None = None,
|
|
67
|
-
extra_body: Body | None = None,
|
|
68
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
69
|
-
) -> BrowserAgentInvokeResponse:
|
|
70
|
-
"""
|
|
71
|
-
Start execution of a browser agent with optional variables.
|
|
72
|
-
|
|
73
|
-
Args:
|
|
74
|
-
variables: Variables to pass to the browser agent
|
|
75
|
-
|
|
76
|
-
extra_headers: Send extra headers
|
|
77
|
-
|
|
78
|
-
extra_query: Add additional query parameters to the request
|
|
79
|
-
|
|
80
|
-
extra_body: Add additional JSON properties to the request
|
|
81
|
-
|
|
82
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
83
|
-
"""
|
|
84
|
-
if not slug:
|
|
85
|
-
raise ValueError(f"Expected a non-empty value for `slug` but received {slug!r}")
|
|
86
|
-
return self._post(
|
|
87
|
-
f"/api/v2/browser-agents/{slug}/invoke",
|
|
88
|
-
body=maybe_transform({"variables": variables}, browser_agent_invoke_params.BrowserAgentInvokeParams),
|
|
89
|
-
options=make_request_options(
|
|
90
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
91
|
-
),
|
|
92
|
-
cast_to=BrowserAgentInvokeResponse,
|
|
93
|
-
)
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
class AsyncBrowserAgentsResource(AsyncAPIResource):
|
|
97
|
-
@cached_property
|
|
98
|
-
def runs(self) -> AsyncRunsResource:
|
|
99
|
-
return AsyncRunsResource(self._client)
|
|
100
|
-
|
|
101
|
-
@cached_property
|
|
102
|
-
def with_raw_response(self) -> AsyncBrowserAgentsResourceWithRawResponse:
|
|
103
|
-
"""
|
|
104
|
-
This property can be used as a prefix for any HTTP method call to return
|
|
105
|
-
the raw response object instead of the parsed content.
|
|
106
|
-
|
|
107
|
-
For more information, see https://www.github.com/samplehc/samplehc-python#accessing-raw-response-data-eg-headers
|
|
108
|
-
"""
|
|
109
|
-
return AsyncBrowserAgentsResourceWithRawResponse(self)
|
|
110
|
-
|
|
111
|
-
@cached_property
|
|
112
|
-
def with_streaming_response(self) -> AsyncBrowserAgentsResourceWithStreamingResponse:
|
|
113
|
-
"""
|
|
114
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
115
|
-
|
|
116
|
-
For more information, see https://www.github.com/samplehc/samplehc-python#with_streaming_response
|
|
117
|
-
"""
|
|
118
|
-
return AsyncBrowserAgentsResourceWithStreamingResponse(self)
|
|
119
|
-
|
|
120
|
-
async def invoke(
|
|
121
|
-
self,
|
|
122
|
-
slug: str,
|
|
123
|
-
*,
|
|
124
|
-
variables: Dict[str, object] | Omit = omit,
|
|
125
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
126
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
127
|
-
extra_headers: Headers | None = None,
|
|
128
|
-
extra_query: Query | None = None,
|
|
129
|
-
extra_body: Body | None = None,
|
|
130
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
131
|
-
) -> BrowserAgentInvokeResponse:
|
|
132
|
-
"""
|
|
133
|
-
Start execution of a browser agent with optional variables.
|
|
134
|
-
|
|
135
|
-
Args:
|
|
136
|
-
variables: Variables to pass to the browser agent
|
|
137
|
-
|
|
138
|
-
extra_headers: Send extra headers
|
|
139
|
-
|
|
140
|
-
extra_query: Add additional query parameters to the request
|
|
141
|
-
|
|
142
|
-
extra_body: Add additional JSON properties to the request
|
|
143
|
-
|
|
144
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
145
|
-
"""
|
|
146
|
-
if not slug:
|
|
147
|
-
raise ValueError(f"Expected a non-empty value for `slug` but received {slug!r}")
|
|
148
|
-
return await self._post(
|
|
149
|
-
f"/api/v2/browser-agents/{slug}/invoke",
|
|
150
|
-
body=await async_maybe_transform(
|
|
151
|
-
{"variables": variables}, browser_agent_invoke_params.BrowserAgentInvokeParams
|
|
152
|
-
),
|
|
153
|
-
options=make_request_options(
|
|
154
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
155
|
-
),
|
|
156
|
-
cast_to=BrowserAgentInvokeResponse,
|
|
157
|
-
)
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
class BrowserAgentsResourceWithRawResponse:
|
|
161
|
-
def __init__(self, browser_agents: BrowserAgentsResource) -> None:
|
|
162
|
-
self._browser_agents = browser_agents
|
|
163
|
-
|
|
164
|
-
self.invoke = to_raw_response_wrapper(
|
|
165
|
-
browser_agents.invoke,
|
|
166
|
-
)
|
|
167
|
-
|
|
168
|
-
@cached_property
|
|
169
|
-
def runs(self) -> RunsResourceWithRawResponse:
|
|
170
|
-
return RunsResourceWithRawResponse(self._browser_agents.runs)
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
class AsyncBrowserAgentsResourceWithRawResponse:
|
|
174
|
-
def __init__(self, browser_agents: AsyncBrowserAgentsResource) -> None:
|
|
175
|
-
self._browser_agents = browser_agents
|
|
176
|
-
|
|
177
|
-
self.invoke = async_to_raw_response_wrapper(
|
|
178
|
-
browser_agents.invoke,
|
|
179
|
-
)
|
|
180
|
-
|
|
181
|
-
@cached_property
|
|
182
|
-
def runs(self) -> AsyncRunsResourceWithRawResponse:
|
|
183
|
-
return AsyncRunsResourceWithRawResponse(self._browser_agents.runs)
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
class BrowserAgentsResourceWithStreamingResponse:
|
|
187
|
-
def __init__(self, browser_agents: BrowserAgentsResource) -> None:
|
|
188
|
-
self._browser_agents = browser_agents
|
|
189
|
-
|
|
190
|
-
self.invoke = to_streamed_response_wrapper(
|
|
191
|
-
browser_agents.invoke,
|
|
192
|
-
)
|
|
193
|
-
|
|
194
|
-
@cached_property
|
|
195
|
-
def runs(self) -> RunsResourceWithStreamingResponse:
|
|
196
|
-
return RunsResourceWithStreamingResponse(self._browser_agents.runs)
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
class AsyncBrowserAgentsResourceWithStreamingResponse:
|
|
200
|
-
def __init__(self, browser_agents: AsyncBrowserAgentsResource) -> None:
|
|
201
|
-
self._browser_agents = browser_agents
|
|
202
|
-
|
|
203
|
-
self.invoke = async_to_streamed_response_wrapper(
|
|
204
|
-
browser_agents.invoke,
|
|
205
|
-
)
|
|
206
|
-
|
|
207
|
-
@cached_property
|
|
208
|
-
def runs(self) -> AsyncRunsResourceWithStreamingResponse:
|
|
209
|
-
return AsyncRunsResourceWithStreamingResponse(self._browser_agents.runs)
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
from .runs import (
|
|
4
|
-
RunsResource,
|
|
5
|
-
AsyncRunsResource,
|
|
6
|
-
RunsResourceWithRawResponse,
|
|
7
|
-
AsyncRunsResourceWithRawResponse,
|
|
8
|
-
RunsResourceWithStreamingResponse,
|
|
9
|
-
AsyncRunsResourceWithStreamingResponse,
|
|
10
|
-
)
|
|
11
|
-
from .help_requests import (
|
|
12
|
-
HelpRequestsResource,
|
|
13
|
-
AsyncHelpRequestsResource,
|
|
14
|
-
HelpRequestsResourceWithRawResponse,
|
|
15
|
-
AsyncHelpRequestsResourceWithRawResponse,
|
|
16
|
-
HelpRequestsResourceWithStreamingResponse,
|
|
17
|
-
AsyncHelpRequestsResourceWithStreamingResponse,
|
|
18
|
-
)
|
|
19
|
-
|
|
20
|
-
__all__ = [
|
|
21
|
-
"HelpRequestsResource",
|
|
22
|
-
"AsyncHelpRequestsResource",
|
|
23
|
-
"HelpRequestsResourceWithRawResponse",
|
|
24
|
-
"AsyncHelpRequestsResourceWithRawResponse",
|
|
25
|
-
"HelpRequestsResourceWithStreamingResponse",
|
|
26
|
-
"AsyncHelpRequestsResourceWithStreamingResponse",
|
|
27
|
-
"RunsResource",
|
|
28
|
-
"AsyncRunsResource",
|
|
29
|
-
"RunsResourceWithRawResponse",
|
|
30
|
-
"AsyncRunsResourceWithRawResponse",
|
|
31
|
-
"RunsResourceWithStreamingResponse",
|
|
32
|
-
"AsyncRunsResourceWithStreamingResponse",
|
|
33
|
-
]
|
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
import httpx
|
|
6
|
-
|
|
7
|
-
from ....._types import Body, Query, Headers, NotGiven, not_given
|
|
8
|
-
from ....._utils import maybe_transform, async_maybe_transform
|
|
9
|
-
from ....._compat import cached_property
|
|
10
|
-
from ....._resource import SyncAPIResource, AsyncAPIResource
|
|
11
|
-
from ....._response import (
|
|
12
|
-
to_raw_response_wrapper,
|
|
13
|
-
to_streamed_response_wrapper,
|
|
14
|
-
async_to_raw_response_wrapper,
|
|
15
|
-
async_to_streamed_response_wrapper,
|
|
16
|
-
)
|
|
17
|
-
from ....._base_client import make_request_options
|
|
18
|
-
from .....types.v2.browser_agents.runs import help_request_resolve_params
|
|
19
|
-
from .....types.v2.browser_agents.runs.help_request_resolve_response import HelpRequestResolveResponse
|
|
20
|
-
|
|
21
|
-
__all__ = ["HelpRequestsResource", "AsyncHelpRequestsResource"]
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class HelpRequestsResource(SyncAPIResource):
|
|
25
|
-
@cached_property
|
|
26
|
-
def with_raw_response(self) -> HelpRequestsResourceWithRawResponse:
|
|
27
|
-
"""
|
|
28
|
-
This property can be used as a prefix for any HTTP method call to return
|
|
29
|
-
the raw response object instead of the parsed content.
|
|
30
|
-
|
|
31
|
-
For more information, see https://www.github.com/samplehc/samplehc-python#accessing-raw-response-data-eg-headers
|
|
32
|
-
"""
|
|
33
|
-
return HelpRequestsResourceWithRawResponse(self)
|
|
34
|
-
|
|
35
|
-
@cached_property
|
|
36
|
-
def with_streaming_response(self) -> HelpRequestsResourceWithStreamingResponse:
|
|
37
|
-
"""
|
|
38
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
39
|
-
|
|
40
|
-
For more information, see https://www.github.com/samplehc/samplehc-python#with_streaming_response
|
|
41
|
-
"""
|
|
42
|
-
return HelpRequestsResourceWithStreamingResponse(self)
|
|
43
|
-
|
|
44
|
-
def resolve(
|
|
45
|
-
self,
|
|
46
|
-
help_request_id: str,
|
|
47
|
-
*,
|
|
48
|
-
slug: str,
|
|
49
|
-
browser_agent_run_id: str,
|
|
50
|
-
resolution: str,
|
|
51
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
52
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
53
|
-
extra_headers: Headers | None = None,
|
|
54
|
-
extra_query: Query | None = None,
|
|
55
|
-
extra_body: Body | None = None,
|
|
56
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
57
|
-
) -> HelpRequestResolveResponse:
|
|
58
|
-
"""
|
|
59
|
-
Update the resolution and resolvedAt for a help request on a browser agent run.
|
|
60
|
-
|
|
61
|
-
Args:
|
|
62
|
-
resolution: Resolution details for the help request
|
|
63
|
-
|
|
64
|
-
extra_headers: Send extra headers
|
|
65
|
-
|
|
66
|
-
extra_query: Add additional query parameters to the request
|
|
67
|
-
|
|
68
|
-
extra_body: Add additional JSON properties to the request
|
|
69
|
-
|
|
70
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
71
|
-
"""
|
|
72
|
-
if not slug:
|
|
73
|
-
raise ValueError(f"Expected a non-empty value for `slug` but received {slug!r}")
|
|
74
|
-
if not browser_agent_run_id:
|
|
75
|
-
raise ValueError(
|
|
76
|
-
f"Expected a non-empty value for `browser_agent_run_id` but received {browser_agent_run_id!r}"
|
|
77
|
-
)
|
|
78
|
-
if not help_request_id:
|
|
79
|
-
raise ValueError(f"Expected a non-empty value for `help_request_id` but received {help_request_id!r}")
|
|
80
|
-
return self._patch(
|
|
81
|
-
f"/api/v2/browser-agents/{slug}/runs/{browser_agent_run_id}/help-requests/{help_request_id}/resolution",
|
|
82
|
-
body=maybe_transform({"resolution": resolution}, help_request_resolve_params.HelpRequestResolveParams),
|
|
83
|
-
options=make_request_options(
|
|
84
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
85
|
-
),
|
|
86
|
-
cast_to=HelpRequestResolveResponse,
|
|
87
|
-
)
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
class AsyncHelpRequestsResource(AsyncAPIResource):
|
|
91
|
-
@cached_property
|
|
92
|
-
def with_raw_response(self) -> AsyncHelpRequestsResourceWithRawResponse:
|
|
93
|
-
"""
|
|
94
|
-
This property can be used as a prefix for any HTTP method call to return
|
|
95
|
-
the raw response object instead of the parsed content.
|
|
96
|
-
|
|
97
|
-
For more information, see https://www.github.com/samplehc/samplehc-python#accessing-raw-response-data-eg-headers
|
|
98
|
-
"""
|
|
99
|
-
return AsyncHelpRequestsResourceWithRawResponse(self)
|
|
100
|
-
|
|
101
|
-
@cached_property
|
|
102
|
-
def with_streaming_response(self) -> AsyncHelpRequestsResourceWithStreamingResponse:
|
|
103
|
-
"""
|
|
104
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
105
|
-
|
|
106
|
-
For more information, see https://www.github.com/samplehc/samplehc-python#with_streaming_response
|
|
107
|
-
"""
|
|
108
|
-
return AsyncHelpRequestsResourceWithStreamingResponse(self)
|
|
109
|
-
|
|
110
|
-
async def resolve(
|
|
111
|
-
self,
|
|
112
|
-
help_request_id: str,
|
|
113
|
-
*,
|
|
114
|
-
slug: str,
|
|
115
|
-
browser_agent_run_id: str,
|
|
116
|
-
resolution: str,
|
|
117
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
118
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
119
|
-
extra_headers: Headers | None = None,
|
|
120
|
-
extra_query: Query | None = None,
|
|
121
|
-
extra_body: Body | None = None,
|
|
122
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
123
|
-
) -> HelpRequestResolveResponse:
|
|
124
|
-
"""
|
|
125
|
-
Update the resolution and resolvedAt for a help request on a browser agent run.
|
|
126
|
-
|
|
127
|
-
Args:
|
|
128
|
-
resolution: Resolution details for the help request
|
|
129
|
-
|
|
130
|
-
extra_headers: Send extra headers
|
|
131
|
-
|
|
132
|
-
extra_query: Add additional query parameters to the request
|
|
133
|
-
|
|
134
|
-
extra_body: Add additional JSON properties to the request
|
|
135
|
-
|
|
136
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
137
|
-
"""
|
|
138
|
-
if not slug:
|
|
139
|
-
raise ValueError(f"Expected a non-empty value for `slug` but received {slug!r}")
|
|
140
|
-
if not browser_agent_run_id:
|
|
141
|
-
raise ValueError(
|
|
142
|
-
f"Expected a non-empty value for `browser_agent_run_id` but received {browser_agent_run_id!r}"
|
|
143
|
-
)
|
|
144
|
-
if not help_request_id:
|
|
145
|
-
raise ValueError(f"Expected a non-empty value for `help_request_id` but received {help_request_id!r}")
|
|
146
|
-
return await self._patch(
|
|
147
|
-
f"/api/v2/browser-agents/{slug}/runs/{browser_agent_run_id}/help-requests/{help_request_id}/resolution",
|
|
148
|
-
body=await async_maybe_transform(
|
|
149
|
-
{"resolution": resolution}, help_request_resolve_params.HelpRequestResolveParams
|
|
150
|
-
),
|
|
151
|
-
options=make_request_options(
|
|
152
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
153
|
-
),
|
|
154
|
-
cast_to=HelpRequestResolveResponse,
|
|
155
|
-
)
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
class HelpRequestsResourceWithRawResponse:
|
|
159
|
-
def __init__(self, help_requests: HelpRequestsResource) -> None:
|
|
160
|
-
self._help_requests = help_requests
|
|
161
|
-
|
|
162
|
-
self.resolve = to_raw_response_wrapper(
|
|
163
|
-
help_requests.resolve,
|
|
164
|
-
)
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
class AsyncHelpRequestsResourceWithRawResponse:
|
|
168
|
-
def __init__(self, help_requests: AsyncHelpRequestsResource) -> None:
|
|
169
|
-
self._help_requests = help_requests
|
|
170
|
-
|
|
171
|
-
self.resolve = async_to_raw_response_wrapper(
|
|
172
|
-
help_requests.resolve,
|
|
173
|
-
)
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
class HelpRequestsResourceWithStreamingResponse:
|
|
177
|
-
def __init__(self, help_requests: HelpRequestsResource) -> None:
|
|
178
|
-
self._help_requests = help_requests
|
|
179
|
-
|
|
180
|
-
self.resolve = to_streamed_response_wrapper(
|
|
181
|
-
help_requests.resolve,
|
|
182
|
-
)
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
class AsyncHelpRequestsResourceWithStreamingResponse:
|
|
186
|
-
def __init__(self, help_requests: AsyncHelpRequestsResource) -> None:
|
|
187
|
-
self._help_requests = help_requests
|
|
188
|
-
|
|
189
|
-
self.resolve = async_to_streamed_response_wrapper(
|
|
190
|
-
help_requests.resolve,
|
|
191
|
-
)
|
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
import httpx
|
|
6
|
-
|
|
7
|
-
from ....._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
8
|
-
from ....._utils import maybe_transform, async_maybe_transform
|
|
9
|
-
from ....._compat import cached_property
|
|
10
|
-
from ....._resource import SyncAPIResource, AsyncAPIResource
|
|
11
|
-
from ....._response import (
|
|
12
|
-
to_raw_response_wrapper,
|
|
13
|
-
to_streamed_response_wrapper,
|
|
14
|
-
async_to_raw_response_wrapper,
|
|
15
|
-
async_to_streamed_response_wrapper,
|
|
16
|
-
)
|
|
17
|
-
from .help_requests import (
|
|
18
|
-
HelpRequestsResource,
|
|
19
|
-
AsyncHelpRequestsResource,
|
|
20
|
-
HelpRequestsResourceWithRawResponse,
|
|
21
|
-
AsyncHelpRequestsResourceWithRawResponse,
|
|
22
|
-
HelpRequestsResourceWithStreamingResponse,
|
|
23
|
-
AsyncHelpRequestsResourceWithStreamingResponse,
|
|
24
|
-
)
|
|
25
|
-
from ....._base_client import make_request_options
|
|
26
|
-
from .....types.v2.browser_agents import run_list_events_params
|
|
27
|
-
from .....types.v2.browser_agents.run_list_events_response import RunListEventsResponse
|
|
28
|
-
|
|
29
|
-
__all__ = ["RunsResource", "AsyncRunsResource"]
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
class RunsResource(SyncAPIResource):
|
|
33
|
-
@cached_property
|
|
34
|
-
def help_requests(self) -> HelpRequestsResource:
|
|
35
|
-
return HelpRequestsResource(self._client)
|
|
36
|
-
|
|
37
|
-
@cached_property
|
|
38
|
-
def with_raw_response(self) -> RunsResourceWithRawResponse:
|
|
39
|
-
"""
|
|
40
|
-
This property can be used as a prefix for any HTTP method call to return
|
|
41
|
-
the raw response object instead of the parsed content.
|
|
42
|
-
|
|
43
|
-
For more information, see https://www.github.com/samplehc/samplehc-python#accessing-raw-response-data-eg-headers
|
|
44
|
-
"""
|
|
45
|
-
return RunsResourceWithRawResponse(self)
|
|
46
|
-
|
|
47
|
-
@cached_property
|
|
48
|
-
def with_streaming_response(self) -> RunsResourceWithStreamingResponse:
|
|
49
|
-
"""
|
|
50
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
51
|
-
|
|
52
|
-
For more information, see https://www.github.com/samplehc/samplehc-python#with_streaming_response
|
|
53
|
-
"""
|
|
54
|
-
return RunsResourceWithStreamingResponse(self)
|
|
55
|
-
|
|
56
|
-
def list_events(
|
|
57
|
-
self,
|
|
58
|
-
browser_agent_run_id: str,
|
|
59
|
-
*,
|
|
60
|
-
cursor: str | Omit = omit,
|
|
61
|
-
limit: float | Omit = omit,
|
|
62
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
63
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
64
|
-
extra_headers: Headers | None = None,
|
|
65
|
-
extra_query: Query | None = None,
|
|
66
|
-
extra_body: Body | None = None,
|
|
67
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
68
|
-
) -> RunListEventsResponse:
|
|
69
|
-
"""
|
|
70
|
-
Get events for a browser agent run.
|
|
71
|
-
|
|
72
|
-
Args:
|
|
73
|
-
cursor: Cursor from previous page
|
|
74
|
-
|
|
75
|
-
limit: Maximum number of events to return
|
|
76
|
-
|
|
77
|
-
extra_headers: Send extra headers
|
|
78
|
-
|
|
79
|
-
extra_query: Add additional query parameters to the request
|
|
80
|
-
|
|
81
|
-
extra_body: Add additional JSON properties to the request
|
|
82
|
-
|
|
83
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
84
|
-
"""
|
|
85
|
-
if not browser_agent_run_id:
|
|
86
|
-
raise ValueError(
|
|
87
|
-
f"Expected a non-empty value for `browser_agent_run_id` but received {browser_agent_run_id!r}"
|
|
88
|
-
)
|
|
89
|
-
return self._get(
|
|
90
|
-
f"/api/v2/browser-agents/runs/{browser_agent_run_id}/events",
|
|
91
|
-
options=make_request_options(
|
|
92
|
-
extra_headers=extra_headers,
|
|
93
|
-
extra_query=extra_query,
|
|
94
|
-
extra_body=extra_body,
|
|
95
|
-
timeout=timeout,
|
|
96
|
-
query=maybe_transform(
|
|
97
|
-
{
|
|
98
|
-
"cursor": cursor,
|
|
99
|
-
"limit": limit,
|
|
100
|
-
},
|
|
101
|
-
run_list_events_params.RunListEventsParams,
|
|
102
|
-
),
|
|
103
|
-
),
|
|
104
|
-
cast_to=RunListEventsResponse,
|
|
105
|
-
)
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
class AsyncRunsResource(AsyncAPIResource):
|
|
109
|
-
@cached_property
|
|
110
|
-
def help_requests(self) -> AsyncHelpRequestsResource:
|
|
111
|
-
return AsyncHelpRequestsResource(self._client)
|
|
112
|
-
|
|
113
|
-
@cached_property
|
|
114
|
-
def with_raw_response(self) -> AsyncRunsResourceWithRawResponse:
|
|
115
|
-
"""
|
|
116
|
-
This property can be used as a prefix for any HTTP method call to return
|
|
117
|
-
the raw response object instead of the parsed content.
|
|
118
|
-
|
|
119
|
-
For more information, see https://www.github.com/samplehc/samplehc-python#accessing-raw-response-data-eg-headers
|
|
120
|
-
"""
|
|
121
|
-
return AsyncRunsResourceWithRawResponse(self)
|
|
122
|
-
|
|
123
|
-
@cached_property
|
|
124
|
-
def with_streaming_response(self) -> AsyncRunsResourceWithStreamingResponse:
|
|
125
|
-
"""
|
|
126
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
127
|
-
|
|
128
|
-
For more information, see https://www.github.com/samplehc/samplehc-python#with_streaming_response
|
|
129
|
-
"""
|
|
130
|
-
return AsyncRunsResourceWithStreamingResponse(self)
|
|
131
|
-
|
|
132
|
-
async def list_events(
|
|
133
|
-
self,
|
|
134
|
-
browser_agent_run_id: str,
|
|
135
|
-
*,
|
|
136
|
-
cursor: str | Omit = omit,
|
|
137
|
-
limit: float | Omit = omit,
|
|
138
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
139
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
140
|
-
extra_headers: Headers | None = None,
|
|
141
|
-
extra_query: Query | None = None,
|
|
142
|
-
extra_body: Body | None = None,
|
|
143
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
144
|
-
) -> RunListEventsResponse:
|
|
145
|
-
"""
|
|
146
|
-
Get events for a browser agent run.
|
|
147
|
-
|
|
148
|
-
Args:
|
|
149
|
-
cursor: Cursor from previous page
|
|
150
|
-
|
|
151
|
-
limit: Maximum number of events to return
|
|
152
|
-
|
|
153
|
-
extra_headers: Send extra headers
|
|
154
|
-
|
|
155
|
-
extra_query: Add additional query parameters to the request
|
|
156
|
-
|
|
157
|
-
extra_body: Add additional JSON properties to the request
|
|
158
|
-
|
|
159
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
160
|
-
"""
|
|
161
|
-
if not browser_agent_run_id:
|
|
162
|
-
raise ValueError(
|
|
163
|
-
f"Expected a non-empty value for `browser_agent_run_id` but received {browser_agent_run_id!r}"
|
|
164
|
-
)
|
|
165
|
-
return await self._get(
|
|
166
|
-
f"/api/v2/browser-agents/runs/{browser_agent_run_id}/events",
|
|
167
|
-
options=make_request_options(
|
|
168
|
-
extra_headers=extra_headers,
|
|
169
|
-
extra_query=extra_query,
|
|
170
|
-
extra_body=extra_body,
|
|
171
|
-
timeout=timeout,
|
|
172
|
-
query=await async_maybe_transform(
|
|
173
|
-
{
|
|
174
|
-
"cursor": cursor,
|
|
175
|
-
"limit": limit,
|
|
176
|
-
},
|
|
177
|
-
run_list_events_params.RunListEventsParams,
|
|
178
|
-
),
|
|
179
|
-
),
|
|
180
|
-
cast_to=RunListEventsResponse,
|
|
181
|
-
)
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
class RunsResourceWithRawResponse:
|
|
185
|
-
def __init__(self, runs: RunsResource) -> None:
|
|
186
|
-
self._runs = runs
|
|
187
|
-
|
|
188
|
-
self.list_events = to_raw_response_wrapper(
|
|
189
|
-
runs.list_events,
|
|
190
|
-
)
|
|
191
|
-
|
|
192
|
-
@cached_property
|
|
193
|
-
def help_requests(self) -> HelpRequestsResourceWithRawResponse:
|
|
194
|
-
return HelpRequestsResourceWithRawResponse(self._runs.help_requests)
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
class AsyncRunsResourceWithRawResponse:
|
|
198
|
-
def __init__(self, runs: AsyncRunsResource) -> None:
|
|
199
|
-
self._runs = runs
|
|
200
|
-
|
|
201
|
-
self.list_events = async_to_raw_response_wrapper(
|
|
202
|
-
runs.list_events,
|
|
203
|
-
)
|
|
204
|
-
|
|
205
|
-
@cached_property
|
|
206
|
-
def help_requests(self) -> AsyncHelpRequestsResourceWithRawResponse:
|
|
207
|
-
return AsyncHelpRequestsResourceWithRawResponse(self._runs.help_requests)
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
class RunsResourceWithStreamingResponse:
|
|
211
|
-
def __init__(self, runs: RunsResource) -> None:
|
|
212
|
-
self._runs = runs
|
|
213
|
-
|
|
214
|
-
self.list_events = to_streamed_response_wrapper(
|
|
215
|
-
runs.list_events,
|
|
216
|
-
)
|
|
217
|
-
|
|
218
|
-
@cached_property
|
|
219
|
-
def help_requests(self) -> HelpRequestsResourceWithStreamingResponse:
|
|
220
|
-
return HelpRequestsResourceWithStreamingResponse(self._runs.help_requests)
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
class AsyncRunsResourceWithStreamingResponse:
|
|
224
|
-
def __init__(self, runs: AsyncRunsResource) -> None:
|
|
225
|
-
self._runs = runs
|
|
226
|
-
|
|
227
|
-
self.list_events = async_to_streamed_response_wrapper(
|
|
228
|
-
runs.list_events,
|
|
229
|
-
)
|
|
230
|
-
|
|
231
|
-
@cached_property
|
|
232
|
-
def help_requests(self) -> AsyncHelpRequestsResourceWithStreamingResponse:
|
|
233
|
-
return AsyncHelpRequestsResourceWithStreamingResponse(self._runs.help_requests)
|