samplehc 0.17.0__py3-none-any.whl → 0.18.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/_client.py +1 -38
- samplehc/_version.py +1 -1
- samplehc/resources/__init__.py +0 -14
- samplehc/resources/v2/__init__.py +0 -98
- samplehc/resources/v2/async_results.py +0 -79
- samplehc/resources/v2/documents/__init__.py +0 -14
- samplehc/resources/v2/documents/documents.py +0 -194
- samplehc/resources/v2/v2.py +0 -224
- samplehc/types/__init__.py +0 -5
- samplehc/types/v2/__init__.py +0 -53
- samplehc/types/v2/documents/__init__.py +0 -3
- {samplehc-0.17.0.dist-info → samplehc-0.18.0.dist-info}/METADATA +22 -27
- samplehc-0.18.0.dist-info/RECORD +92 -0
- samplehc/resources/v1/__init__.py +0 -19
- samplehc/resources/v1/v1.py +0 -298
- samplehc/resources/v2/clearinghouse/__init__.py +0 -47
- samplehc/resources/v2/clearinghouse/claim.py +0 -407
- samplehc/resources/v2/clearinghouse/clearinghouse.py +0 -844
- samplehc/resources/v2/clearinghouse/payers.py +0 -224
- samplehc/resources/v2/documents/pdf_template.py +0 -165
- samplehc/resources/v2/hie/__init__.py +0 -47
- samplehc/resources/v2/hie/adt.py +0 -249
- samplehc/resources/v2/hie/documents.py +0 -390
- samplehc/resources/v2/hie/hie.py +0 -134
- samplehc/resources/v2/integrations/__init__.py +0 -131
- samplehc/resources/v2/integrations/bank/__init__.py +0 -33
- samplehc/resources/v2/integrations/bank/bank.py +0 -102
- samplehc/resources/v2/integrations/bank/transactions.py +0 -185
- samplehc/resources/v2/integrations/careviso.py +0 -372
- samplehc/resources/v2/integrations/glidian/__init__.py +0 -33
- samplehc/resources/v2/integrations/glidian/glidian.py +0 -425
- samplehc/resources/v2/integrations/glidian/prior_authorizations/__init__.py +0 -33
- samplehc/resources/v2/integrations/glidian/prior_authorizations/clinical_questions.py +0 -276
- samplehc/resources/v2/integrations/glidian/prior_authorizations/prior_authorizations.py +0 -527
- samplehc/resources/v2/integrations/integrations.py +0 -326
- samplehc/resources/v2/integrations/kno2/__init__.py +0 -33
- samplehc/resources/v2/integrations/kno2/kno2.py +0 -102
- samplehc/resources/v2/integrations/kno2/messages.py +0 -260
- samplehc/resources/v2/integrations/salesforce.py +0 -277
- samplehc/resources/v2/integrations/snowflake.py +0 -173
- samplehc/resources/v2/integrations/wellsky/__init__.py +0 -33
- samplehc/resources/v2/integrations/wellsky/patients.py +0 -324
- samplehc/resources/v2/integrations/wellsky/wellsky.py +0 -102
- samplehc/resources/v2/integrations/xcures.py +0 -197
- samplehc/resources/v2/policies.py +0 -655
- samplehc/resources/v2/tasks/__init__.py +0 -33
- samplehc/resources/v2/tasks/state.py +0 -266
- samplehc/resources/v2/tasks/tasks.py +0 -754
- samplehc/resources/v2/workflow_runs/__init__.py +0 -33
- samplehc/resources/v2/workflow_runs/step.py +0 -169
- samplehc/resources/v2/workflow_runs/workflow_runs.py +0 -479
- samplehc/resources/v2/workflows.py +0 -377
- samplehc/types/v1/__init__.py +0 -3
- samplehc/types/v1_query_audit_logs_params.py +0 -12
- samplehc/types/v1_query_audit_logs_response.py +0 -16
- samplehc/types/v1_sql_execute_params.py +0 -27
- samplehc/types/v1_sql_execute_response.py +0 -27
- samplehc/types/v2/async_result_retrieve_response.py +0 -18
- samplehc/types/v2/clearinghouse/__init__.py +0 -9
- samplehc/types/v2/clearinghouse/claim_submit_params.py +0 -2693
- samplehc/types/v2/clearinghouse/claim_submit_response.py +0 -23
- samplehc/types/v2/clearinghouse/payer_list_response.py +0 -27
- samplehc/types/v2/clearinghouse/payer_search_params.py +0 -12
- samplehc/types/v2/clearinghouse/payer_search_response.py +0 -33
- samplehc/types/v2/clearinghouse_calculate_patient_cost_params.py +0 -3129
- samplehc/types/v2/clearinghouse_check_claim_status_params.py +0 -41
- samplehc/types/v2/clearinghouse_check_eligibility_params.py +0 -36
- samplehc/types/v2/clearinghouse_check_eligibility_response.py +0 -15
- samplehc/types/v2/clearinghouse_coordination_of_benefits_params.py +0 -35
- samplehc/types/v2/clearinghouse_run_discovery_params.py +0 -59
- samplehc/types/v2/clearinghouse_run_discovery_response.py +0 -13
- samplehc/types/v2/document_unzip_async_response.py +0 -12
- samplehc/types/v2/document_unzip_response.py +0 -20
- samplehc/types/v2/documents/pdf_template_retrieve_metadata_response.py +0 -17
- samplehc/types/v2/hie/__init__.py +0 -8
- samplehc/types/v2/hie/adt_subscribe_params.py +0 -92
- samplehc/types/v2/hie/document_query_params.py +0 -92
- samplehc/types/v2/hie/document_query_response.py +0 -16
- samplehc/types/v2/hie/document_upload_params.py +0 -54
- samplehc/types/v2/integrations/__init__.py +0 -23
- samplehc/types/v2/integrations/bank/__init__.py +0 -6
- samplehc/types/v2/integrations/bank/transaction_sync_params.py +0 -15
- samplehc/types/v2/integrations/bank/transaction_sync_response.py +0 -26
- samplehc/types/v2/integrations/careviso_get_payers_response.py +0 -19
- samplehc/types/v2/integrations/careviso_submit_prior_authorization_params.py +0 -90
- samplehc/types/v2/integrations/glidian/__init__.py +0 -20
- samplehc/types/v2/integrations/glidian/prior_authorization_create_draft_params.py +0 -32
- samplehc/types/v2/integrations/glidian/prior_authorization_create_draft_response.py +0 -24
- samplehc/types/v2/integrations/glidian/prior_authorization_retrieve_record_response.py +0 -13
- samplehc/types/v2/integrations/glidian/prior_authorization_submit_response.py +0 -16
- samplehc/types/v2/integrations/glidian/prior_authorization_update_record_params.py +0 -20
- samplehc/types/v2/integrations/glidian/prior_authorization_update_record_response.py +0 -16
- samplehc/types/v2/integrations/glidian/prior_authorizations/__init__.py +0 -7
- samplehc/types/v2/integrations/glidian/prior_authorizations/clinical_question_list_response.py +0 -42
- samplehc/types/v2/integrations/glidian/prior_authorizations/clinical_question_update_params.py +0 -23
- samplehc/types/v2/integrations/glidian/prior_authorizations/clinical_question_update_response.py +0 -19
- samplehc/types/v2/integrations/glidian_get_submission_requirements_params.py +0 -17
- samplehc/types/v2/integrations/glidian_get_submission_requirements_response.py +0 -31
- samplehc/types/v2/integrations/glidian_list_payers_params.py +0 -11
- samplehc/types/v2/integrations/glidian_list_payers_response.py +0 -17
- samplehc/types/v2/integrations/glidian_list_services_params.py +0 -13
- samplehc/types/v2/integrations/glidian_list_services_response.py +0 -19
- samplehc/types/v2/integrations/kno2/__init__.py +0 -6
- samplehc/types/v2/integrations/kno2/message_get_attachment_response.py +0 -15
- samplehc/types/v2/integrations/kno2/message_retrieve_response.py +0 -13
- samplehc/types/v2/integrations/salesforce_run_crud_action_params.py +0 -22
- samplehc/types/v2/integrations/salesforce_run_soql_query_params.py +0 -11
- samplehc/types/v2/integrations/snowflake_query_params.py +0 -12
- samplehc/types/v2/integrations/snowflake_query_response.py +0 -8
- samplehc/types/v2/integrations/wellsky/__init__.py +0 -6
- samplehc/types/v2/integrations/wellsky/patient_add_params.py +0 -13
- samplehc/types/v2/integrations/wellsky/patient_search_params.py +0 -32
- samplehc/types/v2/integrations/xcure_make_request_params.py +0 -18
- samplehc/types/v2/ledger/__init__.py +0 -3
- samplehc/types/v2/policy_list_companies_params.py +0 -18
- samplehc/types/v2/policy_list_companies_response.py +0 -24
- samplehc/types/v2/policy_list_params.py +0 -47
- samplehc/types/v2/policy_list_plans_params.py +0 -18
- samplehc/types/v2/policy_list_plans_response.py +0 -30
- samplehc/types/v2/policy_list_response.py +0 -67
- samplehc/types/v2/policy_retrieve_presigned_url_response.py +0 -17
- samplehc/types/v2/policy_retrieve_text_response.py +0 -12
- samplehc/types/v2/task_cancel_response.py +0 -12
- samplehc/types/v2/task_complete_params.py +0 -12
- samplehc/types/v2/task_complete_response.py +0 -16
- samplehc/types/v2/task_get_suspended_payload_response.py +0 -8
- samplehc/types/v2/task_retrieve_response.py +0 -22
- samplehc/types/v2/task_retry_response.py +0 -10
- samplehc/types/v2/task_update_column_params.py +0 -19
- samplehc/types/v2/task_update_column_response.py +0 -9
- samplehc/types/v2/task_update_screen_time_params.py +0 -14
- samplehc/types/v2/task_update_screen_time_response.py +0 -8
- samplehc/types/v2/tasks/__init__.py +0 -7
- samplehc/types/v2/tasks/state_get_response.py +0 -8
- samplehc/types/v2/tasks/state_update_params.py +0 -13
- samplehc/types/v2/tasks/state_update_response.py +0 -9
- samplehc/types/v2/workflow_deploy_response.py +0 -12
- samplehc/types/v2/workflow_query_params.py +0 -12
- samplehc/types/v2/workflow_query_response.py +0 -8
- samplehc/types/v2/workflow_run_get_start_data_response.py +0 -14
- samplehc/types/v2/workflow_run_resume_when_complete_params.py +0 -14
- samplehc/types/v2/workflow_run_resume_when_complete_response.py +0 -12
- samplehc/types/v2/workflow_run_retrieve_response.py +0 -16
- samplehc/types/v2/workflow_runs/__init__.py +0 -5
- samplehc/types/v2/workflow_runs/step_get_output_response.py +0 -14
- samplehc/types/v2/workflow_start_params.py +0 -25
- samplehc/types/v2/workflow_start_response.py +0 -25
- samplehc-0.17.0.dist-info/RECORD +0 -226
- {samplehc-0.17.0.dist-info → samplehc-0.18.0.dist-info}/WHEEL +0 -0
- {samplehc-0.17.0.dist-info → samplehc-0.18.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,754 +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 Any, Union, Optional, cast
|
|
6
|
-
from typing_extensions import Literal
|
|
7
|
-
|
|
8
|
-
import httpx
|
|
9
|
-
|
|
10
|
-
from .state import (
|
|
11
|
-
StateResource,
|
|
12
|
-
AsyncStateResource,
|
|
13
|
-
StateResourceWithRawResponse,
|
|
14
|
-
AsyncStateResourceWithRawResponse,
|
|
15
|
-
StateResourceWithStreamingResponse,
|
|
16
|
-
AsyncStateResourceWithStreamingResponse,
|
|
17
|
-
)
|
|
18
|
-
from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
19
|
-
from ...._utils import maybe_transform, async_maybe_transform
|
|
20
|
-
from ...._compat import cached_property
|
|
21
|
-
from ....types.v2 import task_complete_params, task_update_column_params, task_update_screen_time_params
|
|
22
|
-
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
23
|
-
from ...._response import (
|
|
24
|
-
to_raw_response_wrapper,
|
|
25
|
-
to_streamed_response_wrapper,
|
|
26
|
-
async_to_raw_response_wrapper,
|
|
27
|
-
async_to_streamed_response_wrapper,
|
|
28
|
-
)
|
|
29
|
-
from ...._base_client import make_request_options
|
|
30
|
-
from ....types.v2.task_retry_response import TaskRetryResponse
|
|
31
|
-
from ....types.v2.task_cancel_response import TaskCancelResponse
|
|
32
|
-
from ....types.v2.task_complete_response import TaskCompleteResponse
|
|
33
|
-
from ....types.v2.task_retrieve_response import TaskRetrieveResponse
|
|
34
|
-
from ....types.v2.task_update_column_response import TaskUpdateColumnResponse
|
|
35
|
-
from ....types.v2.task_update_screen_time_response import TaskUpdateScreenTimeResponse
|
|
36
|
-
from ....types.v2.task_get_suspended_payload_response import TaskGetSuspendedPayloadResponse
|
|
37
|
-
|
|
38
|
-
__all__ = ["TasksResource", "AsyncTasksResource"]
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
class TasksResource(SyncAPIResource):
|
|
42
|
-
@cached_property
|
|
43
|
-
def state(self) -> StateResource:
|
|
44
|
-
return StateResource(self._client)
|
|
45
|
-
|
|
46
|
-
@cached_property
|
|
47
|
-
def with_raw_response(self) -> TasksResourceWithRawResponse:
|
|
48
|
-
"""
|
|
49
|
-
This property can be used as a prefix for any HTTP method call to return
|
|
50
|
-
the raw response object instead of the parsed content.
|
|
51
|
-
|
|
52
|
-
For more information, see https://www.github.com/samplehc/samplehc-python#accessing-raw-response-data-eg-headers
|
|
53
|
-
"""
|
|
54
|
-
return TasksResourceWithRawResponse(self)
|
|
55
|
-
|
|
56
|
-
@cached_property
|
|
57
|
-
def with_streaming_response(self) -> TasksResourceWithStreamingResponse:
|
|
58
|
-
"""
|
|
59
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
60
|
-
|
|
61
|
-
For more information, see https://www.github.com/samplehc/samplehc-python#with_streaming_response
|
|
62
|
-
"""
|
|
63
|
-
return TasksResourceWithStreamingResponse(self)
|
|
64
|
-
|
|
65
|
-
def retrieve(
|
|
66
|
-
self,
|
|
67
|
-
task_id: str,
|
|
68
|
-
*,
|
|
69
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
70
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
71
|
-
extra_headers: Headers | None = None,
|
|
72
|
-
extra_query: Query | None = None,
|
|
73
|
-
extra_body: Body | None = None,
|
|
74
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
75
|
-
) -> TaskRetrieveResponse:
|
|
76
|
-
"""
|
|
77
|
-
Retrieves the details of a task.
|
|
78
|
-
|
|
79
|
-
Args:
|
|
80
|
-
extra_headers: Send extra headers
|
|
81
|
-
|
|
82
|
-
extra_query: Add additional query parameters to the request
|
|
83
|
-
|
|
84
|
-
extra_body: Add additional JSON properties to the request
|
|
85
|
-
|
|
86
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
87
|
-
"""
|
|
88
|
-
if not task_id:
|
|
89
|
-
raise ValueError(f"Expected a non-empty value for `task_id` but received {task_id!r}")
|
|
90
|
-
return self._get(
|
|
91
|
-
f"/api/v2/tasks/{task_id}",
|
|
92
|
-
options=make_request_options(
|
|
93
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
94
|
-
),
|
|
95
|
-
cast_to=TaskRetrieveResponse,
|
|
96
|
-
)
|
|
97
|
-
|
|
98
|
-
def cancel(
|
|
99
|
-
self,
|
|
100
|
-
task_id: str,
|
|
101
|
-
*,
|
|
102
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
103
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
104
|
-
extra_headers: Headers | None = None,
|
|
105
|
-
extra_query: Query | None = None,
|
|
106
|
-
extra_body: Body | None = None,
|
|
107
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
108
|
-
) -> TaskCancelResponse:
|
|
109
|
-
"""Marks a specified task as cancelled, preventing it from being executed.
|
|
110
|
-
|
|
111
|
-
This
|
|
112
|
-
also halts the execution of any subsequent tasks in the workflow.
|
|
113
|
-
|
|
114
|
-
Args:
|
|
115
|
-
extra_headers: Send extra headers
|
|
116
|
-
|
|
117
|
-
extra_query: Add additional query parameters to the request
|
|
118
|
-
|
|
119
|
-
extra_body: Add additional JSON properties to the request
|
|
120
|
-
|
|
121
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
122
|
-
"""
|
|
123
|
-
if not task_id:
|
|
124
|
-
raise ValueError(f"Expected a non-empty value for `task_id` but received {task_id!r}")
|
|
125
|
-
return self._post(
|
|
126
|
-
f"/api/v2/tasks/{task_id}/cancel",
|
|
127
|
-
options=make_request_options(
|
|
128
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
129
|
-
),
|
|
130
|
-
cast_to=TaskCancelResponse,
|
|
131
|
-
)
|
|
132
|
-
|
|
133
|
-
def complete(
|
|
134
|
-
self,
|
|
135
|
-
task_id: str,
|
|
136
|
-
*,
|
|
137
|
-
result: object | 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
|
-
) -> TaskCompleteResponse:
|
|
145
|
-
"""Marks a specified task as complete, providing the result of its execution.
|
|
146
|
-
|
|
147
|
-
This
|
|
148
|
-
may trigger the next task in the workflow.
|
|
149
|
-
|
|
150
|
-
Args:
|
|
151
|
-
result: The result data from the task's execution.
|
|
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 task_id:
|
|
162
|
-
raise ValueError(f"Expected a non-empty value for `task_id` but received {task_id!r}")
|
|
163
|
-
return self._post(
|
|
164
|
-
f"/api/v2/tasks/{task_id}/complete",
|
|
165
|
-
body=maybe_transform({"result": result}, task_complete_params.TaskCompleteParams),
|
|
166
|
-
options=make_request_options(
|
|
167
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
168
|
-
),
|
|
169
|
-
cast_to=TaskCompleteResponse,
|
|
170
|
-
)
|
|
171
|
-
|
|
172
|
-
def get_suspended_payload(
|
|
173
|
-
self,
|
|
174
|
-
task_id: str,
|
|
175
|
-
*,
|
|
176
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
177
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
178
|
-
extra_headers: Headers | None = None,
|
|
179
|
-
extra_query: Query | None = None,
|
|
180
|
-
extra_body: Body | None = None,
|
|
181
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
182
|
-
) -> TaskGetSuspendedPayloadResponse:
|
|
183
|
-
"""
|
|
184
|
-
Retrieves the payload with which a task was suspended, typically for tasks
|
|
185
|
-
awaiting external interaction or data.
|
|
186
|
-
|
|
187
|
-
Args:
|
|
188
|
-
extra_headers: Send extra headers
|
|
189
|
-
|
|
190
|
-
extra_query: Add additional query parameters to the request
|
|
191
|
-
|
|
192
|
-
extra_body: Add additional JSON properties to the request
|
|
193
|
-
|
|
194
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
195
|
-
"""
|
|
196
|
-
if not task_id:
|
|
197
|
-
raise ValueError(f"Expected a non-empty value for `task_id` but received {task_id!r}")
|
|
198
|
-
return self._get(
|
|
199
|
-
f"/api/v2/tasks/{task_id}/suspended-payload",
|
|
200
|
-
options=make_request_options(
|
|
201
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
202
|
-
),
|
|
203
|
-
cast_to=TaskGetSuspendedPayloadResponse,
|
|
204
|
-
)
|
|
205
|
-
|
|
206
|
-
def retry(
|
|
207
|
-
self,
|
|
208
|
-
task_id: str,
|
|
209
|
-
*,
|
|
210
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
211
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
212
|
-
extra_headers: Headers | None = None,
|
|
213
|
-
extra_query: Query | None = None,
|
|
214
|
-
extra_body: Body | None = None,
|
|
215
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
216
|
-
) -> TaskRetryResponse:
|
|
217
|
-
"""Attempts to retry a failed task.
|
|
218
|
-
|
|
219
|
-
This will re-queue the task for execution.
|
|
220
|
-
|
|
221
|
-
Args:
|
|
222
|
-
extra_headers: Send extra headers
|
|
223
|
-
|
|
224
|
-
extra_query: Add additional query parameters to the request
|
|
225
|
-
|
|
226
|
-
extra_body: Add additional JSON properties to the request
|
|
227
|
-
|
|
228
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
229
|
-
"""
|
|
230
|
-
if not task_id:
|
|
231
|
-
raise ValueError(f"Expected a non-empty value for `task_id` but received {task_id!r}")
|
|
232
|
-
return self._post(
|
|
233
|
-
f"/api/v2/tasks/{task_id}/retry",
|
|
234
|
-
options=make_request_options(
|
|
235
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
236
|
-
),
|
|
237
|
-
cast_to=TaskRetryResponse,
|
|
238
|
-
)
|
|
239
|
-
|
|
240
|
-
def update_column(
|
|
241
|
-
self,
|
|
242
|
-
task_id: str,
|
|
243
|
-
*,
|
|
244
|
-
key: str,
|
|
245
|
-
value: Union[str, float, bool, None],
|
|
246
|
-
type: Literal["string", "number", "boolean", "date", "datetime"] | Omit = omit,
|
|
247
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
248
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
249
|
-
extra_headers: Headers | None = None,
|
|
250
|
-
extra_query: Query | None = None,
|
|
251
|
-
extra_body: Body | None = None,
|
|
252
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
253
|
-
) -> TaskUpdateColumnResponse:
|
|
254
|
-
"""Updates or inserts a column value for a task.
|
|
255
|
-
|
|
256
|
-
If the column key already exists,
|
|
257
|
-
its value will be updated. If it doesn't exist, a new column will be added.
|
|
258
|
-
|
|
259
|
-
Args:
|
|
260
|
-
key: The column key to update or insert.
|
|
261
|
-
|
|
262
|
-
value: The value to set for the column.
|
|
263
|
-
|
|
264
|
-
type: The semantic type of the column. Defaults to string when omitted.
|
|
265
|
-
|
|
266
|
-
extra_headers: Send extra headers
|
|
267
|
-
|
|
268
|
-
extra_query: Add additional query parameters to the request
|
|
269
|
-
|
|
270
|
-
extra_body: Add additional JSON properties to the request
|
|
271
|
-
|
|
272
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
273
|
-
"""
|
|
274
|
-
if not task_id:
|
|
275
|
-
raise ValueError(f"Expected a non-empty value for `task_id` but received {task_id!r}")
|
|
276
|
-
return self._post(
|
|
277
|
-
f"/api/v2/tasks/{task_id}/columns",
|
|
278
|
-
body=maybe_transform(
|
|
279
|
-
{
|
|
280
|
-
"key": key,
|
|
281
|
-
"value": value,
|
|
282
|
-
"type": type,
|
|
283
|
-
},
|
|
284
|
-
task_update_column_params.TaskUpdateColumnParams,
|
|
285
|
-
),
|
|
286
|
-
options=make_request_options(
|
|
287
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
288
|
-
),
|
|
289
|
-
cast_to=TaskUpdateColumnResponse,
|
|
290
|
-
)
|
|
291
|
-
|
|
292
|
-
def update_screen_time(
|
|
293
|
-
self,
|
|
294
|
-
task_id: str,
|
|
295
|
-
*,
|
|
296
|
-
additional_screen_time: float,
|
|
297
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
298
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
299
|
-
extra_headers: Headers | None = None,
|
|
300
|
-
extra_query: Query | None = None,
|
|
301
|
-
extra_body: Body | None = None,
|
|
302
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
303
|
-
) -> Optional[TaskUpdateScreenTimeResponse]:
|
|
304
|
-
"""Adds a specified duration to the total screen time recorded for a task.
|
|
305
|
-
|
|
306
|
-
This is
|
|
307
|
-
typically used for tasks involving user interaction.
|
|
308
|
-
|
|
309
|
-
Args:
|
|
310
|
-
additional_screen_time: The additional screen time in milliseconds to add to the task's total.
|
|
311
|
-
|
|
312
|
-
extra_headers: Send extra headers
|
|
313
|
-
|
|
314
|
-
extra_query: Add additional query parameters to the request
|
|
315
|
-
|
|
316
|
-
extra_body: Add additional JSON properties to the request
|
|
317
|
-
|
|
318
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
319
|
-
"""
|
|
320
|
-
if not task_id:
|
|
321
|
-
raise ValueError(f"Expected a non-empty value for `task_id` but received {task_id!r}")
|
|
322
|
-
return self._post(
|
|
323
|
-
f"/api/v2/tasks/{task_id}/update-screen-time",
|
|
324
|
-
body=maybe_transform(
|
|
325
|
-
{"additional_screen_time": additional_screen_time},
|
|
326
|
-
task_update_screen_time_params.TaskUpdateScreenTimeParams,
|
|
327
|
-
),
|
|
328
|
-
options=make_request_options(
|
|
329
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
330
|
-
),
|
|
331
|
-
cast_to=cast(
|
|
332
|
-
Any, TaskUpdateScreenTimeResponse
|
|
333
|
-
), # Enum types cannot be passed in as arguments in the type system
|
|
334
|
-
)
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
class AsyncTasksResource(AsyncAPIResource):
|
|
338
|
-
@cached_property
|
|
339
|
-
def state(self) -> AsyncStateResource:
|
|
340
|
-
return AsyncStateResource(self._client)
|
|
341
|
-
|
|
342
|
-
@cached_property
|
|
343
|
-
def with_raw_response(self) -> AsyncTasksResourceWithRawResponse:
|
|
344
|
-
"""
|
|
345
|
-
This property can be used as a prefix for any HTTP method call to return
|
|
346
|
-
the raw response object instead of the parsed content.
|
|
347
|
-
|
|
348
|
-
For more information, see https://www.github.com/samplehc/samplehc-python#accessing-raw-response-data-eg-headers
|
|
349
|
-
"""
|
|
350
|
-
return AsyncTasksResourceWithRawResponse(self)
|
|
351
|
-
|
|
352
|
-
@cached_property
|
|
353
|
-
def with_streaming_response(self) -> AsyncTasksResourceWithStreamingResponse:
|
|
354
|
-
"""
|
|
355
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
356
|
-
|
|
357
|
-
For more information, see https://www.github.com/samplehc/samplehc-python#with_streaming_response
|
|
358
|
-
"""
|
|
359
|
-
return AsyncTasksResourceWithStreamingResponse(self)
|
|
360
|
-
|
|
361
|
-
async def retrieve(
|
|
362
|
-
self,
|
|
363
|
-
task_id: str,
|
|
364
|
-
*,
|
|
365
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
366
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
367
|
-
extra_headers: Headers | None = None,
|
|
368
|
-
extra_query: Query | None = None,
|
|
369
|
-
extra_body: Body | None = None,
|
|
370
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
371
|
-
) -> TaskRetrieveResponse:
|
|
372
|
-
"""
|
|
373
|
-
Retrieves the details of a task.
|
|
374
|
-
|
|
375
|
-
Args:
|
|
376
|
-
extra_headers: Send extra headers
|
|
377
|
-
|
|
378
|
-
extra_query: Add additional query parameters to the request
|
|
379
|
-
|
|
380
|
-
extra_body: Add additional JSON properties to the request
|
|
381
|
-
|
|
382
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
383
|
-
"""
|
|
384
|
-
if not task_id:
|
|
385
|
-
raise ValueError(f"Expected a non-empty value for `task_id` but received {task_id!r}")
|
|
386
|
-
return await self._get(
|
|
387
|
-
f"/api/v2/tasks/{task_id}",
|
|
388
|
-
options=make_request_options(
|
|
389
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
390
|
-
),
|
|
391
|
-
cast_to=TaskRetrieveResponse,
|
|
392
|
-
)
|
|
393
|
-
|
|
394
|
-
async def cancel(
|
|
395
|
-
self,
|
|
396
|
-
task_id: str,
|
|
397
|
-
*,
|
|
398
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
399
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
400
|
-
extra_headers: Headers | None = None,
|
|
401
|
-
extra_query: Query | None = None,
|
|
402
|
-
extra_body: Body | None = None,
|
|
403
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
404
|
-
) -> TaskCancelResponse:
|
|
405
|
-
"""Marks a specified task as cancelled, preventing it from being executed.
|
|
406
|
-
|
|
407
|
-
This
|
|
408
|
-
also halts the execution of any subsequent tasks in the workflow.
|
|
409
|
-
|
|
410
|
-
Args:
|
|
411
|
-
extra_headers: Send extra headers
|
|
412
|
-
|
|
413
|
-
extra_query: Add additional query parameters to the request
|
|
414
|
-
|
|
415
|
-
extra_body: Add additional JSON properties to the request
|
|
416
|
-
|
|
417
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
418
|
-
"""
|
|
419
|
-
if not task_id:
|
|
420
|
-
raise ValueError(f"Expected a non-empty value for `task_id` but received {task_id!r}")
|
|
421
|
-
return await self._post(
|
|
422
|
-
f"/api/v2/tasks/{task_id}/cancel",
|
|
423
|
-
options=make_request_options(
|
|
424
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
425
|
-
),
|
|
426
|
-
cast_to=TaskCancelResponse,
|
|
427
|
-
)
|
|
428
|
-
|
|
429
|
-
async def complete(
|
|
430
|
-
self,
|
|
431
|
-
task_id: str,
|
|
432
|
-
*,
|
|
433
|
-
result: object | Omit = omit,
|
|
434
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
435
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
436
|
-
extra_headers: Headers | None = None,
|
|
437
|
-
extra_query: Query | None = None,
|
|
438
|
-
extra_body: Body | None = None,
|
|
439
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
440
|
-
) -> TaskCompleteResponse:
|
|
441
|
-
"""Marks a specified task as complete, providing the result of its execution.
|
|
442
|
-
|
|
443
|
-
This
|
|
444
|
-
may trigger the next task in the workflow.
|
|
445
|
-
|
|
446
|
-
Args:
|
|
447
|
-
result: The result data from the task's execution.
|
|
448
|
-
|
|
449
|
-
extra_headers: Send extra headers
|
|
450
|
-
|
|
451
|
-
extra_query: Add additional query parameters to the request
|
|
452
|
-
|
|
453
|
-
extra_body: Add additional JSON properties to the request
|
|
454
|
-
|
|
455
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
456
|
-
"""
|
|
457
|
-
if not task_id:
|
|
458
|
-
raise ValueError(f"Expected a non-empty value for `task_id` but received {task_id!r}")
|
|
459
|
-
return await self._post(
|
|
460
|
-
f"/api/v2/tasks/{task_id}/complete",
|
|
461
|
-
body=await async_maybe_transform({"result": result}, task_complete_params.TaskCompleteParams),
|
|
462
|
-
options=make_request_options(
|
|
463
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
464
|
-
),
|
|
465
|
-
cast_to=TaskCompleteResponse,
|
|
466
|
-
)
|
|
467
|
-
|
|
468
|
-
async def get_suspended_payload(
|
|
469
|
-
self,
|
|
470
|
-
task_id: str,
|
|
471
|
-
*,
|
|
472
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
473
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
474
|
-
extra_headers: Headers | None = None,
|
|
475
|
-
extra_query: Query | None = None,
|
|
476
|
-
extra_body: Body | None = None,
|
|
477
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
478
|
-
) -> TaskGetSuspendedPayloadResponse:
|
|
479
|
-
"""
|
|
480
|
-
Retrieves the payload with which a task was suspended, typically for tasks
|
|
481
|
-
awaiting external interaction or data.
|
|
482
|
-
|
|
483
|
-
Args:
|
|
484
|
-
extra_headers: Send extra headers
|
|
485
|
-
|
|
486
|
-
extra_query: Add additional query parameters to the request
|
|
487
|
-
|
|
488
|
-
extra_body: Add additional JSON properties to the request
|
|
489
|
-
|
|
490
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
491
|
-
"""
|
|
492
|
-
if not task_id:
|
|
493
|
-
raise ValueError(f"Expected a non-empty value for `task_id` but received {task_id!r}")
|
|
494
|
-
return await self._get(
|
|
495
|
-
f"/api/v2/tasks/{task_id}/suspended-payload",
|
|
496
|
-
options=make_request_options(
|
|
497
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
498
|
-
),
|
|
499
|
-
cast_to=TaskGetSuspendedPayloadResponse,
|
|
500
|
-
)
|
|
501
|
-
|
|
502
|
-
async def retry(
|
|
503
|
-
self,
|
|
504
|
-
task_id: str,
|
|
505
|
-
*,
|
|
506
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
507
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
508
|
-
extra_headers: Headers | None = None,
|
|
509
|
-
extra_query: Query | None = None,
|
|
510
|
-
extra_body: Body | None = None,
|
|
511
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
512
|
-
) -> TaskRetryResponse:
|
|
513
|
-
"""Attempts to retry a failed task.
|
|
514
|
-
|
|
515
|
-
This will re-queue the task for execution.
|
|
516
|
-
|
|
517
|
-
Args:
|
|
518
|
-
extra_headers: Send extra headers
|
|
519
|
-
|
|
520
|
-
extra_query: Add additional query parameters to the request
|
|
521
|
-
|
|
522
|
-
extra_body: Add additional JSON properties to the request
|
|
523
|
-
|
|
524
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
525
|
-
"""
|
|
526
|
-
if not task_id:
|
|
527
|
-
raise ValueError(f"Expected a non-empty value for `task_id` but received {task_id!r}")
|
|
528
|
-
return await self._post(
|
|
529
|
-
f"/api/v2/tasks/{task_id}/retry",
|
|
530
|
-
options=make_request_options(
|
|
531
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
532
|
-
),
|
|
533
|
-
cast_to=TaskRetryResponse,
|
|
534
|
-
)
|
|
535
|
-
|
|
536
|
-
async def update_column(
|
|
537
|
-
self,
|
|
538
|
-
task_id: str,
|
|
539
|
-
*,
|
|
540
|
-
key: str,
|
|
541
|
-
value: Union[str, float, bool, None],
|
|
542
|
-
type: Literal["string", "number", "boolean", "date", "datetime"] | Omit = omit,
|
|
543
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
544
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
545
|
-
extra_headers: Headers | None = None,
|
|
546
|
-
extra_query: Query | None = None,
|
|
547
|
-
extra_body: Body | None = None,
|
|
548
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
549
|
-
) -> TaskUpdateColumnResponse:
|
|
550
|
-
"""Updates or inserts a column value for a task.
|
|
551
|
-
|
|
552
|
-
If the column key already exists,
|
|
553
|
-
its value will be updated. If it doesn't exist, a new column will be added.
|
|
554
|
-
|
|
555
|
-
Args:
|
|
556
|
-
key: The column key to update or insert.
|
|
557
|
-
|
|
558
|
-
value: The value to set for the column.
|
|
559
|
-
|
|
560
|
-
type: The semantic type of the column. Defaults to string when omitted.
|
|
561
|
-
|
|
562
|
-
extra_headers: Send extra headers
|
|
563
|
-
|
|
564
|
-
extra_query: Add additional query parameters to the request
|
|
565
|
-
|
|
566
|
-
extra_body: Add additional JSON properties to the request
|
|
567
|
-
|
|
568
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
569
|
-
"""
|
|
570
|
-
if not task_id:
|
|
571
|
-
raise ValueError(f"Expected a non-empty value for `task_id` but received {task_id!r}")
|
|
572
|
-
return await self._post(
|
|
573
|
-
f"/api/v2/tasks/{task_id}/columns",
|
|
574
|
-
body=await async_maybe_transform(
|
|
575
|
-
{
|
|
576
|
-
"key": key,
|
|
577
|
-
"value": value,
|
|
578
|
-
"type": type,
|
|
579
|
-
},
|
|
580
|
-
task_update_column_params.TaskUpdateColumnParams,
|
|
581
|
-
),
|
|
582
|
-
options=make_request_options(
|
|
583
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
584
|
-
),
|
|
585
|
-
cast_to=TaskUpdateColumnResponse,
|
|
586
|
-
)
|
|
587
|
-
|
|
588
|
-
async def update_screen_time(
|
|
589
|
-
self,
|
|
590
|
-
task_id: str,
|
|
591
|
-
*,
|
|
592
|
-
additional_screen_time: float,
|
|
593
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
594
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
595
|
-
extra_headers: Headers | None = None,
|
|
596
|
-
extra_query: Query | None = None,
|
|
597
|
-
extra_body: Body | None = None,
|
|
598
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
599
|
-
) -> Optional[TaskUpdateScreenTimeResponse]:
|
|
600
|
-
"""Adds a specified duration to the total screen time recorded for a task.
|
|
601
|
-
|
|
602
|
-
This is
|
|
603
|
-
typically used for tasks involving user interaction.
|
|
604
|
-
|
|
605
|
-
Args:
|
|
606
|
-
additional_screen_time: The additional screen time in milliseconds to add to the task's total.
|
|
607
|
-
|
|
608
|
-
extra_headers: Send extra headers
|
|
609
|
-
|
|
610
|
-
extra_query: Add additional query parameters to the request
|
|
611
|
-
|
|
612
|
-
extra_body: Add additional JSON properties to the request
|
|
613
|
-
|
|
614
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
615
|
-
"""
|
|
616
|
-
if not task_id:
|
|
617
|
-
raise ValueError(f"Expected a non-empty value for `task_id` but received {task_id!r}")
|
|
618
|
-
return await self._post(
|
|
619
|
-
f"/api/v2/tasks/{task_id}/update-screen-time",
|
|
620
|
-
body=await async_maybe_transform(
|
|
621
|
-
{"additional_screen_time": additional_screen_time},
|
|
622
|
-
task_update_screen_time_params.TaskUpdateScreenTimeParams,
|
|
623
|
-
),
|
|
624
|
-
options=make_request_options(
|
|
625
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
626
|
-
),
|
|
627
|
-
cast_to=cast(
|
|
628
|
-
Any, TaskUpdateScreenTimeResponse
|
|
629
|
-
), # Enum types cannot be passed in as arguments in the type system
|
|
630
|
-
)
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
class TasksResourceWithRawResponse:
|
|
634
|
-
def __init__(self, tasks: TasksResource) -> None:
|
|
635
|
-
self._tasks = tasks
|
|
636
|
-
|
|
637
|
-
self.retrieve = to_raw_response_wrapper(
|
|
638
|
-
tasks.retrieve,
|
|
639
|
-
)
|
|
640
|
-
self.cancel = to_raw_response_wrapper(
|
|
641
|
-
tasks.cancel,
|
|
642
|
-
)
|
|
643
|
-
self.complete = to_raw_response_wrapper(
|
|
644
|
-
tasks.complete,
|
|
645
|
-
)
|
|
646
|
-
self.get_suspended_payload = to_raw_response_wrapper(
|
|
647
|
-
tasks.get_suspended_payload,
|
|
648
|
-
)
|
|
649
|
-
self.retry = to_raw_response_wrapper(
|
|
650
|
-
tasks.retry,
|
|
651
|
-
)
|
|
652
|
-
self.update_column = to_raw_response_wrapper(
|
|
653
|
-
tasks.update_column,
|
|
654
|
-
)
|
|
655
|
-
self.update_screen_time = to_raw_response_wrapper(
|
|
656
|
-
tasks.update_screen_time,
|
|
657
|
-
)
|
|
658
|
-
|
|
659
|
-
@cached_property
|
|
660
|
-
def state(self) -> StateResourceWithRawResponse:
|
|
661
|
-
return StateResourceWithRawResponse(self._tasks.state)
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
class AsyncTasksResourceWithRawResponse:
|
|
665
|
-
def __init__(self, tasks: AsyncTasksResource) -> None:
|
|
666
|
-
self._tasks = tasks
|
|
667
|
-
|
|
668
|
-
self.retrieve = async_to_raw_response_wrapper(
|
|
669
|
-
tasks.retrieve,
|
|
670
|
-
)
|
|
671
|
-
self.cancel = async_to_raw_response_wrapper(
|
|
672
|
-
tasks.cancel,
|
|
673
|
-
)
|
|
674
|
-
self.complete = async_to_raw_response_wrapper(
|
|
675
|
-
tasks.complete,
|
|
676
|
-
)
|
|
677
|
-
self.get_suspended_payload = async_to_raw_response_wrapper(
|
|
678
|
-
tasks.get_suspended_payload,
|
|
679
|
-
)
|
|
680
|
-
self.retry = async_to_raw_response_wrapper(
|
|
681
|
-
tasks.retry,
|
|
682
|
-
)
|
|
683
|
-
self.update_column = async_to_raw_response_wrapper(
|
|
684
|
-
tasks.update_column,
|
|
685
|
-
)
|
|
686
|
-
self.update_screen_time = async_to_raw_response_wrapper(
|
|
687
|
-
tasks.update_screen_time,
|
|
688
|
-
)
|
|
689
|
-
|
|
690
|
-
@cached_property
|
|
691
|
-
def state(self) -> AsyncStateResourceWithRawResponse:
|
|
692
|
-
return AsyncStateResourceWithRawResponse(self._tasks.state)
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
class TasksResourceWithStreamingResponse:
|
|
696
|
-
def __init__(self, tasks: TasksResource) -> None:
|
|
697
|
-
self._tasks = tasks
|
|
698
|
-
|
|
699
|
-
self.retrieve = to_streamed_response_wrapper(
|
|
700
|
-
tasks.retrieve,
|
|
701
|
-
)
|
|
702
|
-
self.cancel = to_streamed_response_wrapper(
|
|
703
|
-
tasks.cancel,
|
|
704
|
-
)
|
|
705
|
-
self.complete = to_streamed_response_wrapper(
|
|
706
|
-
tasks.complete,
|
|
707
|
-
)
|
|
708
|
-
self.get_suspended_payload = to_streamed_response_wrapper(
|
|
709
|
-
tasks.get_suspended_payload,
|
|
710
|
-
)
|
|
711
|
-
self.retry = to_streamed_response_wrapper(
|
|
712
|
-
tasks.retry,
|
|
713
|
-
)
|
|
714
|
-
self.update_column = to_streamed_response_wrapper(
|
|
715
|
-
tasks.update_column,
|
|
716
|
-
)
|
|
717
|
-
self.update_screen_time = to_streamed_response_wrapper(
|
|
718
|
-
tasks.update_screen_time,
|
|
719
|
-
)
|
|
720
|
-
|
|
721
|
-
@cached_property
|
|
722
|
-
def state(self) -> StateResourceWithStreamingResponse:
|
|
723
|
-
return StateResourceWithStreamingResponse(self._tasks.state)
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
class AsyncTasksResourceWithStreamingResponse:
|
|
727
|
-
def __init__(self, tasks: AsyncTasksResource) -> None:
|
|
728
|
-
self._tasks = tasks
|
|
729
|
-
|
|
730
|
-
self.retrieve = async_to_streamed_response_wrapper(
|
|
731
|
-
tasks.retrieve,
|
|
732
|
-
)
|
|
733
|
-
self.cancel = async_to_streamed_response_wrapper(
|
|
734
|
-
tasks.cancel,
|
|
735
|
-
)
|
|
736
|
-
self.complete = async_to_streamed_response_wrapper(
|
|
737
|
-
tasks.complete,
|
|
738
|
-
)
|
|
739
|
-
self.get_suspended_payload = async_to_streamed_response_wrapper(
|
|
740
|
-
tasks.get_suspended_payload,
|
|
741
|
-
)
|
|
742
|
-
self.retry = async_to_streamed_response_wrapper(
|
|
743
|
-
tasks.retry,
|
|
744
|
-
)
|
|
745
|
-
self.update_column = async_to_streamed_response_wrapper(
|
|
746
|
-
tasks.update_column,
|
|
747
|
-
)
|
|
748
|
-
self.update_screen_time = async_to_streamed_response_wrapper(
|
|
749
|
-
tasks.update_screen_time,
|
|
750
|
-
)
|
|
751
|
-
|
|
752
|
-
@cached_property
|
|
753
|
-
def state(self) -> AsyncStateResourceWithStreamingResponse:
|
|
754
|
-
return AsyncStateResourceWithStreamingResponse(self._tasks.state)
|