samplehc 0.10.0__py3-none-any.whl → 0.11.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 +3 -3
- samplehc/_compat.py +48 -48
- samplehc/_models.py +40 -40
- samplehc/_types.py +35 -1
- samplehc/_utils/__init__.py +9 -2
- samplehc/_utils/_compat.py +45 -0
- samplehc/_utils/_datetime_parse.py +136 -0
- samplehc/_utils/_transform.py +11 -1
- samplehc/_utils/_typing.py +6 -1
- samplehc/_utils/_utils.py +0 -1
- samplehc/_version.py +1 -1
- samplehc/resources/v2/browser_agents/__init__.py +33 -0
- samplehc/resources/v2/{browser_agents.py → browser_agents/browser_agents.py} +40 -8
- samplehc/resources/v2/browser_agents/runs/__init__.py +33 -0
- samplehc/resources/v2/browser_agents/runs/help_requests.py +191 -0
- samplehc/resources/v2/browser_agents/runs/runs.py +102 -0
- samplehc/resources/v2/clearinghouse/clearinghouse.py +4 -4
- samplehc/resources/v2/{events/events.py → events.py} +8 -40
- samplehc/resources/v2/integrations/__init__.py +28 -0
- samplehc/resources/v2/integrations/careviso.py +10 -10
- samplehc/resources/v2/integrations/integrations.py +64 -0
- samplehc/resources/v2/integrations/salesforce.py +193 -0
- samplehc/resources/v2/{events/integrations → integrations}/xcures.py +7 -7
- samplehc/resources/v2/ledger/__init__.py +27 -55
- samplehc/resources/v2/ledger/{orders.py → account.py} +120 -82
- samplehc/resources/v2/ledger/entry.py +382 -0
- samplehc/resources/v2/ledger/ledger.py +38 -1560
- samplehc/resources/v2/v2.py +16 -16
- samplehc/types/v2/__init__.py +0 -28
- samplehc/types/v2/browser_agents/runs/__init__.py +6 -0
- samplehc/types/v2/browser_agents/runs/help_request_resolve_params.py +18 -0
- samplehc/types/v2/browser_agents/runs/help_request_resolve_response.py +30 -0
- samplehc/types/v2/clearinghouse/claim_submit_params.py +10 -9
- samplehc/types/v2/clearinghouse_calculate_patient_cost_params.py +3 -2
- samplehc/types/v2/clearinghouse_check_eligibility_params.py +2 -2
- samplehc/types/v2/communication_send_letter_params.py +4 -3
- samplehc/types/v2/document_classify_params.py +3 -2
- samplehc/types/v2/document_generate_csv_params.py +3 -2
- samplehc/types/v2/documents/legacy_extract_params.py +8 -7
- samplehc/types/v2/integrations/__init__.py +2 -0
- samplehc/types/v2/integrations/careviso_submit_prior_authorization_params.py +6 -5
- samplehc/types/v2/integrations/glidian/prior_authorizations/clinical_question_update_params.py +3 -2
- samplehc/types/v2/integrations/salesforce_run_crud_action_params.py +22 -0
- samplehc/types/v2/ledger/__init__.py +6 -17
- samplehc/types/v2/ledger/account_writeoff_params.py +24 -0
- samplehc/types/v2/ledger/account_writeoff_response.py +12 -0
- samplehc/types/v2/ledger/entry_post_params.py +61 -0
- samplehc/types/v2/ledger/entry_post_response.py +10 -0
- samplehc/types/v2/ledger/entry_reverse_params.py +19 -0
- samplehc/types/v2/ledger/entry_reverse_response.py +10 -0
- {samplehc-0.10.0.dist-info → samplehc-0.11.0.dist-info}/METADATA +1 -1
- {samplehc-0.10.0.dist-info → samplehc-0.11.0.dist-info}/RECORD +56 -78
- samplehc/resources/v2/events/__init__.py +0 -33
- samplehc/resources/v2/events/integrations/__init__.py +0 -33
- samplehc/resources/v2/events/integrations/integrations.py +0 -102
- samplehc/resources/v2/ledger/institutions/__init__.py +0 -33
- samplehc/resources/v2/ledger/institutions/institutions.py +0 -258
- samplehc/resources/v2/ledger/institutions/orders.py +0 -169
- samplehc/resources/v2/ledger/insurance.py +0 -141
- samplehc/resources/v2/ledger/patients.py +0 -141
- samplehc/types/v2/events/integrations/__init__.py +0 -5
- samplehc/types/v2/ledger/institution_list_outstanding_accounts_response.py +0 -25
- samplehc/types/v2/ledger/institution_retrieve_outstanding_orders_response.py +0 -25
- samplehc/types/v2/ledger/institutions/__init__.py +0 -5
- samplehc/types/v2/ledger/institutions/order_retrieve_balance_response.py +0 -12
- samplehc/types/v2/ledger/insurance_list_outstanding_accounts_response.py +0 -25
- samplehc/types/v2/ledger/order_retrieve_balances_response.py +0 -31
- samplehc/types/v2/ledger/order_retrieve_batch_balances_params.py +0 -15
- samplehc/types/v2/ledger/order_retrieve_batch_balances_response.py +0 -38
- samplehc/types/v2/ledger/patient_list_outstanding_accounts_response.py +0 -22
- samplehc/types/v2/ledger_assign_invoice_params.py +0 -34
- samplehc/types/v2/ledger_assign_invoice_response.py +0 -12
- samplehc/types/v2/ledger_claim_adjustment_params.py +0 -34
- samplehc/types/v2/ledger_claim_adjustment_response.py +0 -12
- samplehc/types/v2/ledger_claim_payment_params.py +0 -34
- samplehc/types/v2/ledger_claim_payment_response.py +0 -12
- samplehc/types/v2/ledger_institution_adjustment_params.py +0 -31
- samplehc/types/v2/ledger_institution_adjustment_response.py +0 -12
- samplehc/types/v2/ledger_institution_payment_params.py +0 -31
- samplehc/types/v2/ledger_institution_payment_response.py +0 -12
- samplehc/types/v2/ledger_new_order_params.py +0 -22
- samplehc/types/v2/ledger_new_order_response.py +0 -12
- samplehc/types/v2/ledger_order_writeoff_params.py +0 -28
- samplehc/types/v2/ledger_order_writeoff_response.py +0 -12
- samplehc/types/v2/ledger_patient_adjustment_params.py +0 -31
- samplehc/types/v2/ledger_patient_adjustment_response.py +0 -12
- samplehc/types/v2/ledger_patient_payment_params.py +0 -28
- samplehc/types/v2/ledger_patient_payment_response.py +0 -12
- samplehc/types/v2/ledger_post_remittance_accepted_params.py +0 -37
- samplehc/types/v2/ledger_post_remittance_accepted_response.py +0 -12
- samplehc/types/v2/ledger_reverse_entry_params.py +0 -12
- samplehc/types/v2/ledger_reverse_entry_response.py +0 -12
- /samplehc/types/v2/{events → browser_agents}/__init__.py +0 -0
- /samplehc/types/v2/{events/integrations → integrations}/xcure_make_request_params.py +0 -0
- {samplehc-0.10.0.dist-info → samplehc-0.11.0.dist-info}/WHEEL +0 -0
- {samplehc-0.10.0.dist-info → samplehc-0.11.0.dist-info}/licenses/LICENSE +0 -0
samplehc/_utils/_transform.py
CHANGED
|
@@ -16,18 +16,20 @@ from ._utils import (
|
|
|
16
16
|
lru_cache,
|
|
17
17
|
is_mapping,
|
|
18
18
|
is_iterable,
|
|
19
|
+
is_sequence,
|
|
19
20
|
)
|
|
20
21
|
from .._files import is_base64_file_input
|
|
22
|
+
from ._compat import get_origin, is_typeddict
|
|
21
23
|
from ._typing import (
|
|
22
24
|
is_list_type,
|
|
23
25
|
is_union_type,
|
|
24
26
|
extract_type_arg,
|
|
25
27
|
is_iterable_type,
|
|
26
28
|
is_required_type,
|
|
29
|
+
is_sequence_type,
|
|
27
30
|
is_annotated_type,
|
|
28
31
|
strip_annotated_type,
|
|
29
32
|
)
|
|
30
|
-
from .._compat import get_origin, model_dump, is_typeddict
|
|
31
33
|
|
|
32
34
|
_T = TypeVar("_T")
|
|
33
35
|
|
|
@@ -167,6 +169,8 @@ def _transform_recursive(
|
|
|
167
169
|
|
|
168
170
|
Defaults to the same value as the `annotation` argument.
|
|
169
171
|
"""
|
|
172
|
+
from .._compat import model_dump
|
|
173
|
+
|
|
170
174
|
if inner_type is None:
|
|
171
175
|
inner_type = annotation
|
|
172
176
|
|
|
@@ -184,6 +188,8 @@ def _transform_recursive(
|
|
|
184
188
|
(is_list_type(stripped_type) and is_list(data))
|
|
185
189
|
# Iterable[T]
|
|
186
190
|
or (is_iterable_type(stripped_type) and is_iterable(data) and not isinstance(data, str))
|
|
191
|
+
# Sequence[T]
|
|
192
|
+
or (is_sequence_type(stripped_type) and is_sequence(data) and not isinstance(data, str))
|
|
187
193
|
):
|
|
188
194
|
# dicts are technically iterable, but it is an iterable on the keys of the dict and is not usually
|
|
189
195
|
# intended as an iterable, so we don't transform it.
|
|
@@ -329,6 +335,8 @@ async def _async_transform_recursive(
|
|
|
329
335
|
|
|
330
336
|
Defaults to the same value as the `annotation` argument.
|
|
331
337
|
"""
|
|
338
|
+
from .._compat import model_dump
|
|
339
|
+
|
|
332
340
|
if inner_type is None:
|
|
333
341
|
inner_type = annotation
|
|
334
342
|
|
|
@@ -346,6 +354,8 @@ async def _async_transform_recursive(
|
|
|
346
354
|
(is_list_type(stripped_type) and is_list(data))
|
|
347
355
|
# Iterable[T]
|
|
348
356
|
or (is_iterable_type(stripped_type) and is_iterable(data) and not isinstance(data, str))
|
|
357
|
+
# Sequence[T]
|
|
358
|
+
or (is_sequence_type(stripped_type) and is_sequence(data) and not isinstance(data, str))
|
|
349
359
|
):
|
|
350
360
|
# dicts are technically iterable, but it is an iterable on the keys of the dict and is not usually
|
|
351
361
|
# intended as an iterable, so we don't transform it.
|
samplehc/_utils/_typing.py
CHANGED
|
@@ -15,7 +15,7 @@ from typing_extensions import (
|
|
|
15
15
|
|
|
16
16
|
from ._utils import lru_cache
|
|
17
17
|
from .._types import InheritsGeneric
|
|
18
|
-
from
|
|
18
|
+
from ._compat import is_union as _is_union
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
def is_annotated_type(typ: type) -> bool:
|
|
@@ -26,6 +26,11 @@ def is_list_type(typ: type) -> bool:
|
|
|
26
26
|
return (get_origin(typ) or typ) == list
|
|
27
27
|
|
|
28
28
|
|
|
29
|
+
def is_sequence_type(typ: type) -> bool:
|
|
30
|
+
origin = get_origin(typ) or typ
|
|
31
|
+
return origin == typing_extensions.Sequence or origin == typing.Sequence or origin == _c_abc.Sequence
|
|
32
|
+
|
|
33
|
+
|
|
29
34
|
def is_iterable_type(typ: type) -> bool:
|
|
30
35
|
"""If the given type is `typing.Iterable[T]`"""
|
|
31
36
|
origin = get_origin(typ) or typ
|
samplehc/_utils/_utils.py
CHANGED
|
@@ -22,7 +22,6 @@ from typing_extensions import TypeGuard
|
|
|
22
22
|
import sniffio
|
|
23
23
|
|
|
24
24
|
from .._types import NotGiven, FileTypes, NotGivenOr, HeadersLike
|
|
25
|
-
from .._compat import parse_date as parse_date, parse_datetime as parse_datetime
|
|
26
25
|
|
|
27
26
|
_T = TypeVar("_T")
|
|
28
27
|
_TupleT = TypeVar("_TupleT", bound=Tuple[object, ...])
|
samplehc/_version.py
CHANGED
|
@@ -0,0 +1,33 @@
|
|
|
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 .browser_agents import (
|
|
12
|
+
BrowserAgentsResource,
|
|
13
|
+
AsyncBrowserAgentsResource,
|
|
14
|
+
BrowserAgentsResourceWithRawResponse,
|
|
15
|
+
AsyncBrowserAgentsResourceWithRawResponse,
|
|
16
|
+
BrowserAgentsResourceWithStreamingResponse,
|
|
17
|
+
AsyncBrowserAgentsResourceWithStreamingResponse,
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
__all__ = [
|
|
21
|
+
"RunsResource",
|
|
22
|
+
"AsyncRunsResource",
|
|
23
|
+
"RunsResourceWithRawResponse",
|
|
24
|
+
"AsyncRunsResourceWithRawResponse",
|
|
25
|
+
"RunsResourceWithStreamingResponse",
|
|
26
|
+
"AsyncRunsResourceWithStreamingResponse",
|
|
27
|
+
"BrowserAgentsResource",
|
|
28
|
+
"AsyncBrowserAgentsResource",
|
|
29
|
+
"BrowserAgentsResourceWithRawResponse",
|
|
30
|
+
"AsyncBrowserAgentsResourceWithRawResponse",
|
|
31
|
+
"BrowserAgentsResourceWithStreamingResponse",
|
|
32
|
+
"AsyncBrowserAgentsResourceWithStreamingResponse",
|
|
33
|
+
]
|
|
@@ -6,24 +6,36 @@ from typing import Dict
|
|
|
6
6
|
|
|
7
7
|
import httpx
|
|
8
8
|
|
|
9
|
-
from
|
|
10
|
-
from
|
|
11
|
-
from
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
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 (
|
|
15
23
|
to_raw_response_wrapper,
|
|
16
24
|
to_streamed_response_wrapper,
|
|
17
25
|
async_to_raw_response_wrapper,
|
|
18
26
|
async_to_streamed_response_wrapper,
|
|
19
27
|
)
|
|
20
|
-
from
|
|
21
|
-
from
|
|
28
|
+
from ...._base_client import make_request_options
|
|
29
|
+
from ....types.v2.browser_agent_invoke_response import BrowserAgentInvokeResponse
|
|
22
30
|
|
|
23
31
|
__all__ = ["BrowserAgentsResource", "AsyncBrowserAgentsResource"]
|
|
24
32
|
|
|
25
33
|
|
|
26
34
|
class BrowserAgentsResource(SyncAPIResource):
|
|
35
|
+
@cached_property
|
|
36
|
+
def runs(self) -> RunsResource:
|
|
37
|
+
return RunsResource(self._client)
|
|
38
|
+
|
|
27
39
|
@cached_property
|
|
28
40
|
def with_raw_response(self) -> BrowserAgentsResourceWithRawResponse:
|
|
29
41
|
"""
|
|
@@ -82,6 +94,10 @@ class BrowserAgentsResource(SyncAPIResource):
|
|
|
82
94
|
|
|
83
95
|
|
|
84
96
|
class AsyncBrowserAgentsResource(AsyncAPIResource):
|
|
97
|
+
@cached_property
|
|
98
|
+
def runs(self) -> AsyncRunsResource:
|
|
99
|
+
return AsyncRunsResource(self._client)
|
|
100
|
+
|
|
85
101
|
@cached_property
|
|
86
102
|
def with_raw_response(self) -> AsyncBrowserAgentsResourceWithRawResponse:
|
|
87
103
|
"""
|
|
@@ -149,6 +165,10 @@ class BrowserAgentsResourceWithRawResponse:
|
|
|
149
165
|
browser_agents.invoke,
|
|
150
166
|
)
|
|
151
167
|
|
|
168
|
+
@cached_property
|
|
169
|
+
def runs(self) -> RunsResourceWithRawResponse:
|
|
170
|
+
return RunsResourceWithRawResponse(self._browser_agents.runs)
|
|
171
|
+
|
|
152
172
|
|
|
153
173
|
class AsyncBrowserAgentsResourceWithRawResponse:
|
|
154
174
|
def __init__(self, browser_agents: AsyncBrowserAgentsResource) -> None:
|
|
@@ -158,6 +178,10 @@ class AsyncBrowserAgentsResourceWithRawResponse:
|
|
|
158
178
|
browser_agents.invoke,
|
|
159
179
|
)
|
|
160
180
|
|
|
181
|
+
@cached_property
|
|
182
|
+
def runs(self) -> AsyncRunsResourceWithRawResponse:
|
|
183
|
+
return AsyncRunsResourceWithRawResponse(self._browser_agents.runs)
|
|
184
|
+
|
|
161
185
|
|
|
162
186
|
class BrowserAgentsResourceWithStreamingResponse:
|
|
163
187
|
def __init__(self, browser_agents: BrowserAgentsResource) -> None:
|
|
@@ -167,6 +191,10 @@ class BrowserAgentsResourceWithStreamingResponse:
|
|
|
167
191
|
browser_agents.invoke,
|
|
168
192
|
)
|
|
169
193
|
|
|
194
|
+
@cached_property
|
|
195
|
+
def runs(self) -> RunsResourceWithStreamingResponse:
|
|
196
|
+
return RunsResourceWithStreamingResponse(self._browser_agents.runs)
|
|
197
|
+
|
|
170
198
|
|
|
171
199
|
class AsyncBrowserAgentsResourceWithStreamingResponse:
|
|
172
200
|
def __init__(self, browser_agents: AsyncBrowserAgentsResource) -> None:
|
|
@@ -175,3 +203,7 @@ class AsyncBrowserAgentsResourceWithStreamingResponse:
|
|
|
175
203
|
self.invoke = async_to_streamed_response_wrapper(
|
|
176
204
|
browser_agents.invoke,
|
|
177
205
|
)
|
|
206
|
+
|
|
207
|
+
@cached_property
|
|
208
|
+
def runs(self) -> AsyncRunsResourceWithStreamingResponse:
|
|
209
|
+
return AsyncRunsResourceWithStreamingResponse(self._browser_agents.runs)
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
]
|
|
@@ -0,0 +1,191 @@
|
|
|
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 NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
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
|
+
)
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from ....._compat import cached_property
|
|
6
|
+
from ....._resource import SyncAPIResource, AsyncAPIResource
|
|
7
|
+
from .help_requests import (
|
|
8
|
+
HelpRequestsResource,
|
|
9
|
+
AsyncHelpRequestsResource,
|
|
10
|
+
HelpRequestsResourceWithRawResponse,
|
|
11
|
+
AsyncHelpRequestsResourceWithRawResponse,
|
|
12
|
+
HelpRequestsResourceWithStreamingResponse,
|
|
13
|
+
AsyncHelpRequestsResourceWithStreamingResponse,
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
__all__ = ["RunsResource", "AsyncRunsResource"]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class RunsResource(SyncAPIResource):
|
|
20
|
+
@cached_property
|
|
21
|
+
def help_requests(self) -> HelpRequestsResource:
|
|
22
|
+
return HelpRequestsResource(self._client)
|
|
23
|
+
|
|
24
|
+
@cached_property
|
|
25
|
+
def with_raw_response(self) -> RunsResourceWithRawResponse:
|
|
26
|
+
"""
|
|
27
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
28
|
+
the raw response object instead of the parsed content.
|
|
29
|
+
|
|
30
|
+
For more information, see https://www.github.com/samplehc/samplehc-python#accessing-raw-response-data-eg-headers
|
|
31
|
+
"""
|
|
32
|
+
return RunsResourceWithRawResponse(self)
|
|
33
|
+
|
|
34
|
+
@cached_property
|
|
35
|
+
def with_streaming_response(self) -> RunsResourceWithStreamingResponse:
|
|
36
|
+
"""
|
|
37
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
38
|
+
|
|
39
|
+
For more information, see https://www.github.com/samplehc/samplehc-python#with_streaming_response
|
|
40
|
+
"""
|
|
41
|
+
return RunsResourceWithStreamingResponse(self)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class AsyncRunsResource(AsyncAPIResource):
|
|
45
|
+
@cached_property
|
|
46
|
+
def help_requests(self) -> AsyncHelpRequestsResource:
|
|
47
|
+
return AsyncHelpRequestsResource(self._client)
|
|
48
|
+
|
|
49
|
+
@cached_property
|
|
50
|
+
def with_raw_response(self) -> AsyncRunsResourceWithRawResponse:
|
|
51
|
+
"""
|
|
52
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
53
|
+
the raw response object instead of the parsed content.
|
|
54
|
+
|
|
55
|
+
For more information, see https://www.github.com/samplehc/samplehc-python#accessing-raw-response-data-eg-headers
|
|
56
|
+
"""
|
|
57
|
+
return AsyncRunsResourceWithRawResponse(self)
|
|
58
|
+
|
|
59
|
+
@cached_property
|
|
60
|
+
def with_streaming_response(self) -> AsyncRunsResourceWithStreamingResponse:
|
|
61
|
+
"""
|
|
62
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
63
|
+
|
|
64
|
+
For more information, see https://www.github.com/samplehc/samplehc-python#with_streaming_response
|
|
65
|
+
"""
|
|
66
|
+
return AsyncRunsResourceWithStreamingResponse(self)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class RunsResourceWithRawResponse:
|
|
70
|
+
def __init__(self, runs: RunsResource) -> None:
|
|
71
|
+
self._runs = runs
|
|
72
|
+
|
|
73
|
+
@cached_property
|
|
74
|
+
def help_requests(self) -> HelpRequestsResourceWithRawResponse:
|
|
75
|
+
return HelpRequestsResourceWithRawResponse(self._runs.help_requests)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class AsyncRunsResourceWithRawResponse:
|
|
79
|
+
def __init__(self, runs: AsyncRunsResource) -> None:
|
|
80
|
+
self._runs = runs
|
|
81
|
+
|
|
82
|
+
@cached_property
|
|
83
|
+
def help_requests(self) -> AsyncHelpRequestsResourceWithRawResponse:
|
|
84
|
+
return AsyncHelpRequestsResourceWithRawResponse(self._runs.help_requests)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
class RunsResourceWithStreamingResponse:
|
|
88
|
+
def __init__(self, runs: RunsResource) -> None:
|
|
89
|
+
self._runs = runs
|
|
90
|
+
|
|
91
|
+
@cached_property
|
|
92
|
+
def help_requests(self) -> HelpRequestsResourceWithStreamingResponse:
|
|
93
|
+
return HelpRequestsResourceWithStreamingResponse(self._runs.help_requests)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
class AsyncRunsResourceWithStreamingResponse:
|
|
97
|
+
def __init__(self, runs: AsyncRunsResource) -> None:
|
|
98
|
+
self._runs = runs
|
|
99
|
+
|
|
100
|
+
@cached_property
|
|
101
|
+
def help_requests(self) -> AsyncHelpRequestsResourceWithStreamingResponse:
|
|
102
|
+
return AsyncHelpRequestsResourceWithStreamingResponse(self._runs.help_requests)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import
|
|
5
|
+
from typing import Iterable
|
|
6
6
|
|
|
7
7
|
import httpx
|
|
8
8
|
|
|
@@ -22,7 +22,7 @@ from .payers import (
|
|
|
22
22
|
PayersResourceWithStreamingResponse,
|
|
23
23
|
AsyncPayersResourceWithStreamingResponse,
|
|
24
24
|
)
|
|
25
|
-
from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
|
25
|
+
from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven, SequenceNotStr
|
|
26
26
|
from ...._utils import maybe_transform, strip_not_given, async_maybe_transform
|
|
27
27
|
from ...._compat import cached_property
|
|
28
28
|
from ....types.v2 import (
|
|
@@ -199,7 +199,7 @@ class ClearinghouseResource(SyncAPIResource):
|
|
|
199
199
|
*,
|
|
200
200
|
provider_identifier: str,
|
|
201
201
|
provider_name: str,
|
|
202
|
-
service_type_codes:
|
|
202
|
+
service_type_codes: SequenceNotStr[str],
|
|
203
203
|
subscriber_date_of_birth: str,
|
|
204
204
|
subscriber_first_name: str,
|
|
205
205
|
subscriber_last_name: str,
|
|
@@ -540,7 +540,7 @@ class AsyncClearinghouseResource(AsyncAPIResource):
|
|
|
540
540
|
*,
|
|
541
541
|
provider_identifier: str,
|
|
542
542
|
provider_name: str,
|
|
543
|
-
service_type_codes:
|
|
543
|
+
service_type_codes: SequenceNotStr[str],
|
|
544
544
|
subscriber_date_of_birth: str,
|
|
545
545
|
subscriber_first_name: str,
|
|
546
546
|
subscriber_last_name: str,
|
|
@@ -4,36 +4,24 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import httpx
|
|
6
6
|
|
|
7
|
-
from
|
|
8
|
-
from
|
|
9
|
-
from
|
|
10
|
-
from
|
|
11
|
-
from
|
|
12
|
-
from
|
|
7
|
+
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
8
|
+
from ..._utils import maybe_transform, strip_not_given, async_maybe_transform
|
|
9
|
+
from ..._compat import cached_property
|
|
10
|
+
from ...types.v2 import event_emit_params
|
|
11
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
12
|
+
from ..._response import (
|
|
13
13
|
to_raw_response_wrapper,
|
|
14
14
|
to_streamed_response_wrapper,
|
|
15
15
|
async_to_raw_response_wrapper,
|
|
16
16
|
async_to_streamed_response_wrapper,
|
|
17
17
|
)
|
|
18
|
-
from
|
|
19
|
-
from .
|
|
20
|
-
IntegrationsResource,
|
|
21
|
-
AsyncIntegrationsResource,
|
|
22
|
-
IntegrationsResourceWithRawResponse,
|
|
23
|
-
AsyncIntegrationsResourceWithRawResponse,
|
|
24
|
-
IntegrationsResourceWithStreamingResponse,
|
|
25
|
-
AsyncIntegrationsResourceWithStreamingResponse,
|
|
26
|
-
)
|
|
27
|
-
from ....types.v2.event_emit_response import EventEmitResponse
|
|
18
|
+
from ..._base_client import make_request_options
|
|
19
|
+
from ...types.v2.event_emit_response import EventEmitResponse
|
|
28
20
|
|
|
29
21
|
__all__ = ["EventsResource", "AsyncEventsResource"]
|
|
30
22
|
|
|
31
23
|
|
|
32
24
|
class EventsResource(SyncAPIResource):
|
|
33
|
-
@cached_property
|
|
34
|
-
def integrations(self) -> IntegrationsResource:
|
|
35
|
-
return IntegrationsResource(self._client)
|
|
36
|
-
|
|
37
25
|
@cached_property
|
|
38
26
|
def with_raw_response(self) -> EventsResourceWithRawResponse:
|
|
39
27
|
"""
|
|
@@ -100,10 +88,6 @@ class EventsResource(SyncAPIResource):
|
|
|
100
88
|
|
|
101
89
|
|
|
102
90
|
class AsyncEventsResource(AsyncAPIResource):
|
|
103
|
-
@cached_property
|
|
104
|
-
def integrations(self) -> AsyncIntegrationsResource:
|
|
105
|
-
return AsyncIntegrationsResource(self._client)
|
|
106
|
-
|
|
107
91
|
@cached_property
|
|
108
92
|
def with_raw_response(self) -> AsyncEventsResourceWithRawResponse:
|
|
109
93
|
"""
|
|
@@ -177,10 +161,6 @@ class EventsResourceWithRawResponse:
|
|
|
177
161
|
events.emit,
|
|
178
162
|
)
|
|
179
163
|
|
|
180
|
-
@cached_property
|
|
181
|
-
def integrations(self) -> IntegrationsResourceWithRawResponse:
|
|
182
|
-
return IntegrationsResourceWithRawResponse(self._events.integrations)
|
|
183
|
-
|
|
184
164
|
|
|
185
165
|
class AsyncEventsResourceWithRawResponse:
|
|
186
166
|
def __init__(self, events: AsyncEventsResource) -> None:
|
|
@@ -190,10 +170,6 @@ class AsyncEventsResourceWithRawResponse:
|
|
|
190
170
|
events.emit,
|
|
191
171
|
)
|
|
192
172
|
|
|
193
|
-
@cached_property
|
|
194
|
-
def integrations(self) -> AsyncIntegrationsResourceWithRawResponse:
|
|
195
|
-
return AsyncIntegrationsResourceWithRawResponse(self._events.integrations)
|
|
196
|
-
|
|
197
173
|
|
|
198
174
|
class EventsResourceWithStreamingResponse:
|
|
199
175
|
def __init__(self, events: EventsResource) -> None:
|
|
@@ -203,10 +179,6 @@ class EventsResourceWithStreamingResponse:
|
|
|
203
179
|
events.emit,
|
|
204
180
|
)
|
|
205
181
|
|
|
206
|
-
@cached_property
|
|
207
|
-
def integrations(self) -> IntegrationsResourceWithStreamingResponse:
|
|
208
|
-
return IntegrationsResourceWithStreamingResponse(self._events.integrations)
|
|
209
|
-
|
|
210
182
|
|
|
211
183
|
class AsyncEventsResourceWithStreamingResponse:
|
|
212
184
|
def __init__(self, events: AsyncEventsResource) -> None:
|
|
@@ -215,7 +187,3 @@ class AsyncEventsResourceWithStreamingResponse:
|
|
|
215
187
|
self.emit = async_to_streamed_response_wrapper(
|
|
216
188
|
events.emit,
|
|
217
189
|
)
|
|
218
|
-
|
|
219
|
-
@cached_property
|
|
220
|
-
def integrations(self) -> AsyncIntegrationsResourceWithStreamingResponse:
|
|
221
|
-
return AsyncIntegrationsResourceWithStreamingResponse(self._events.integrations)
|