samplehc 0.19.0__py3-none-any.whl → 0.20.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/_version.py +1 -1
- samplehc/resources/v2/__init__.py +14 -0
- samplehc/resources/v2/v2.py +32 -0
- samplehc/resources/v2/workflow_runs.py +177 -0
- samplehc/types/v2/__init__.py +6 -0
- samplehc/types/v2/workflow_run_resume_when_complete_params.py +14 -0
- samplehc/types/v2/workflow_run_resume_when_complete_response.py +12 -0
- {samplehc-0.19.0.dist-info → samplehc-0.20.0.dist-info}/METADATA +22 -22
- {samplehc-0.19.0.dist-info → samplehc-0.20.0.dist-info}/RECORD +11 -8
- {samplehc-0.19.0.dist-info → samplehc-0.20.0.dist-info}/WHEEL +0 -0
- {samplehc-0.19.0.dist-info → samplehc-0.20.0.dist-info}/licenses/LICENSE +0 -0
samplehc/_version.py
CHANGED
|
@@ -48,8 +48,22 @@ from .communication import (
|
|
|
48
48
|
CommunicationResourceWithStreamingResponse,
|
|
49
49
|
AsyncCommunicationResourceWithStreamingResponse,
|
|
50
50
|
)
|
|
51
|
+
from .workflow_runs import (
|
|
52
|
+
WorkflowRunsResource,
|
|
53
|
+
AsyncWorkflowRunsResource,
|
|
54
|
+
WorkflowRunsResourceWithRawResponse,
|
|
55
|
+
AsyncWorkflowRunsResourceWithRawResponse,
|
|
56
|
+
WorkflowRunsResourceWithStreamingResponse,
|
|
57
|
+
AsyncWorkflowRunsResourceWithStreamingResponse,
|
|
58
|
+
)
|
|
51
59
|
|
|
52
60
|
__all__ = [
|
|
61
|
+
"WorkflowRunsResource",
|
|
62
|
+
"AsyncWorkflowRunsResource",
|
|
63
|
+
"WorkflowRunsResourceWithRawResponse",
|
|
64
|
+
"AsyncWorkflowRunsResourceWithRawResponse",
|
|
65
|
+
"WorkflowRunsResourceWithStreamingResponse",
|
|
66
|
+
"AsyncWorkflowRunsResourceWithStreamingResponse",
|
|
53
67
|
"AsyncResultsResource",
|
|
54
68
|
"AsyncAsyncResultsResource",
|
|
55
69
|
"AsyncResultsResourceWithRawResponse",
|
samplehc/resources/v2/v2.py
CHANGED
|
@@ -36,6 +36,14 @@ from .communication import (
|
|
|
36
36
|
CommunicationResourceWithStreamingResponse,
|
|
37
37
|
AsyncCommunicationResourceWithStreamingResponse,
|
|
38
38
|
)
|
|
39
|
+
from .workflow_runs import (
|
|
40
|
+
WorkflowRunsResource,
|
|
41
|
+
AsyncWorkflowRunsResource,
|
|
42
|
+
WorkflowRunsResourceWithRawResponse,
|
|
43
|
+
AsyncWorkflowRunsResourceWithRawResponse,
|
|
44
|
+
WorkflowRunsResourceWithStreamingResponse,
|
|
45
|
+
AsyncWorkflowRunsResourceWithStreamingResponse,
|
|
46
|
+
)
|
|
39
47
|
from .documents.documents import (
|
|
40
48
|
DocumentsResource,
|
|
41
49
|
AsyncDocumentsResource,
|
|
@@ -49,6 +57,10 @@ __all__ = ["V2Resource", "AsyncV2Resource"]
|
|
|
49
57
|
|
|
50
58
|
|
|
51
59
|
class V2Resource(SyncAPIResource):
|
|
60
|
+
@cached_property
|
|
61
|
+
def workflow_runs(self) -> WorkflowRunsResource:
|
|
62
|
+
return WorkflowRunsResource(self._client)
|
|
63
|
+
|
|
52
64
|
@cached_property
|
|
53
65
|
def async_results(self) -> AsyncResultsResource:
|
|
54
66
|
return AsyncResultsResource(self._client)
|
|
@@ -90,6 +102,10 @@ class V2Resource(SyncAPIResource):
|
|
|
90
102
|
|
|
91
103
|
|
|
92
104
|
class AsyncV2Resource(AsyncAPIResource):
|
|
105
|
+
@cached_property
|
|
106
|
+
def workflow_runs(self) -> AsyncWorkflowRunsResource:
|
|
107
|
+
return AsyncWorkflowRunsResource(self._client)
|
|
108
|
+
|
|
93
109
|
@cached_property
|
|
94
110
|
def async_results(self) -> AsyncAsyncResultsResource:
|
|
95
111
|
return AsyncAsyncResultsResource(self._client)
|
|
@@ -134,6 +150,10 @@ class V2ResourceWithRawResponse:
|
|
|
134
150
|
def __init__(self, v2: V2Resource) -> None:
|
|
135
151
|
self._v2 = v2
|
|
136
152
|
|
|
153
|
+
@cached_property
|
|
154
|
+
def workflow_runs(self) -> WorkflowRunsResourceWithRawResponse:
|
|
155
|
+
return WorkflowRunsResourceWithRawResponse(self._v2.workflow_runs)
|
|
156
|
+
|
|
137
157
|
@cached_property
|
|
138
158
|
def async_results(self) -> AsyncResultsResourceWithRawResponse:
|
|
139
159
|
return AsyncResultsResourceWithRawResponse(self._v2.async_results)
|
|
@@ -159,6 +179,10 @@ class AsyncV2ResourceWithRawResponse:
|
|
|
159
179
|
def __init__(self, v2: AsyncV2Resource) -> None:
|
|
160
180
|
self._v2 = v2
|
|
161
181
|
|
|
182
|
+
@cached_property
|
|
183
|
+
def workflow_runs(self) -> AsyncWorkflowRunsResourceWithRawResponse:
|
|
184
|
+
return AsyncWorkflowRunsResourceWithRawResponse(self._v2.workflow_runs)
|
|
185
|
+
|
|
162
186
|
@cached_property
|
|
163
187
|
def async_results(self) -> AsyncAsyncResultsResourceWithRawResponse:
|
|
164
188
|
return AsyncAsyncResultsResourceWithRawResponse(self._v2.async_results)
|
|
@@ -184,6 +208,10 @@ class V2ResourceWithStreamingResponse:
|
|
|
184
208
|
def __init__(self, v2: V2Resource) -> None:
|
|
185
209
|
self._v2 = v2
|
|
186
210
|
|
|
211
|
+
@cached_property
|
|
212
|
+
def workflow_runs(self) -> WorkflowRunsResourceWithStreamingResponse:
|
|
213
|
+
return WorkflowRunsResourceWithStreamingResponse(self._v2.workflow_runs)
|
|
214
|
+
|
|
187
215
|
@cached_property
|
|
188
216
|
def async_results(self) -> AsyncResultsResourceWithStreamingResponse:
|
|
189
217
|
return AsyncResultsResourceWithStreamingResponse(self._v2.async_results)
|
|
@@ -209,6 +237,10 @@ class AsyncV2ResourceWithStreamingResponse:
|
|
|
209
237
|
def __init__(self, v2: AsyncV2Resource) -> None:
|
|
210
238
|
self._v2 = v2
|
|
211
239
|
|
|
240
|
+
@cached_property
|
|
241
|
+
def workflow_runs(self) -> AsyncWorkflowRunsResourceWithStreamingResponse:
|
|
242
|
+
return AsyncWorkflowRunsResourceWithStreamingResponse(self._v2.workflow_runs)
|
|
243
|
+
|
|
212
244
|
@cached_property
|
|
213
245
|
def async_results(self) -> AsyncAsyncResultsResourceWithStreamingResponse:
|
|
214
246
|
return AsyncAsyncResultsResourceWithStreamingResponse(self._v2.async_results)
|
|
@@ -0,0 +1,177 @@
|
|
|
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 ...types.v2 import workflow_run_resume_when_complete_params
|
|
11
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
12
|
+
from ..._response import (
|
|
13
|
+
to_raw_response_wrapper,
|
|
14
|
+
to_streamed_response_wrapper,
|
|
15
|
+
async_to_raw_response_wrapper,
|
|
16
|
+
async_to_streamed_response_wrapper,
|
|
17
|
+
)
|
|
18
|
+
from ..._base_client import make_request_options
|
|
19
|
+
from ...types.v2.workflow_run_resume_when_complete_response import WorkflowRunResumeWhenCompleteResponse
|
|
20
|
+
|
|
21
|
+
__all__ = ["WorkflowRunsResource", "AsyncWorkflowRunsResource"]
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class WorkflowRunsResource(SyncAPIResource):
|
|
25
|
+
@cached_property
|
|
26
|
+
def with_raw_response(self) -> WorkflowRunsResourceWithRawResponse:
|
|
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 WorkflowRunsResourceWithRawResponse(self)
|
|
34
|
+
|
|
35
|
+
@cached_property
|
|
36
|
+
def with_streaming_response(self) -> WorkflowRunsResourceWithStreamingResponse:
|
|
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 WorkflowRunsResourceWithStreamingResponse(self)
|
|
43
|
+
|
|
44
|
+
def resume_when_complete(
|
|
45
|
+
self,
|
|
46
|
+
*,
|
|
47
|
+
async_result_id: str,
|
|
48
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
49
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
50
|
+
extra_headers: Headers | None = None,
|
|
51
|
+
extra_query: Query | None = None,
|
|
52
|
+
extra_body: Body | None = None,
|
|
53
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
54
|
+
) -> WorkflowRunResumeWhenCompleteResponse:
|
|
55
|
+
"""
|
|
56
|
+
Registers an asynchronous task's result ID to resume a workflow run upon its
|
|
57
|
+
completion. This endpoint requires an ExecuteStepRequestContext with
|
|
58
|
+
`workflowRunId` and `stepAddr`.
|
|
59
|
+
|
|
60
|
+
Args:
|
|
61
|
+
async_result_id: The unique identifier of the asynchronous result to monitor before resuming.
|
|
62
|
+
|
|
63
|
+
extra_headers: Send extra headers
|
|
64
|
+
|
|
65
|
+
extra_query: Add additional query parameters to the request
|
|
66
|
+
|
|
67
|
+
extra_body: Add additional JSON properties to the request
|
|
68
|
+
|
|
69
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
70
|
+
"""
|
|
71
|
+
return self._post(
|
|
72
|
+
"/api/v2/workflow-runs/resume-when-complete",
|
|
73
|
+
body=maybe_transform(
|
|
74
|
+
{"async_result_id": async_result_id},
|
|
75
|
+
workflow_run_resume_when_complete_params.WorkflowRunResumeWhenCompleteParams,
|
|
76
|
+
),
|
|
77
|
+
options=make_request_options(
|
|
78
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
79
|
+
),
|
|
80
|
+
cast_to=WorkflowRunResumeWhenCompleteResponse,
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
class AsyncWorkflowRunsResource(AsyncAPIResource):
|
|
85
|
+
@cached_property
|
|
86
|
+
def with_raw_response(self) -> AsyncWorkflowRunsResourceWithRawResponse:
|
|
87
|
+
"""
|
|
88
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
89
|
+
the raw response object instead of the parsed content.
|
|
90
|
+
|
|
91
|
+
For more information, see https://www.github.com/samplehc/samplehc-python#accessing-raw-response-data-eg-headers
|
|
92
|
+
"""
|
|
93
|
+
return AsyncWorkflowRunsResourceWithRawResponse(self)
|
|
94
|
+
|
|
95
|
+
@cached_property
|
|
96
|
+
def with_streaming_response(self) -> AsyncWorkflowRunsResourceWithStreamingResponse:
|
|
97
|
+
"""
|
|
98
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
99
|
+
|
|
100
|
+
For more information, see https://www.github.com/samplehc/samplehc-python#with_streaming_response
|
|
101
|
+
"""
|
|
102
|
+
return AsyncWorkflowRunsResourceWithStreamingResponse(self)
|
|
103
|
+
|
|
104
|
+
async def resume_when_complete(
|
|
105
|
+
self,
|
|
106
|
+
*,
|
|
107
|
+
async_result_id: str,
|
|
108
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
109
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
110
|
+
extra_headers: Headers | None = None,
|
|
111
|
+
extra_query: Query | None = None,
|
|
112
|
+
extra_body: Body | None = None,
|
|
113
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
114
|
+
) -> WorkflowRunResumeWhenCompleteResponse:
|
|
115
|
+
"""
|
|
116
|
+
Registers an asynchronous task's result ID to resume a workflow run upon its
|
|
117
|
+
completion. This endpoint requires an ExecuteStepRequestContext with
|
|
118
|
+
`workflowRunId` and `stepAddr`.
|
|
119
|
+
|
|
120
|
+
Args:
|
|
121
|
+
async_result_id: The unique identifier of the asynchronous result to monitor before resuming.
|
|
122
|
+
|
|
123
|
+
extra_headers: Send extra headers
|
|
124
|
+
|
|
125
|
+
extra_query: Add additional query parameters to the request
|
|
126
|
+
|
|
127
|
+
extra_body: Add additional JSON properties to the request
|
|
128
|
+
|
|
129
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
130
|
+
"""
|
|
131
|
+
return await self._post(
|
|
132
|
+
"/api/v2/workflow-runs/resume-when-complete",
|
|
133
|
+
body=await async_maybe_transform(
|
|
134
|
+
{"async_result_id": async_result_id},
|
|
135
|
+
workflow_run_resume_when_complete_params.WorkflowRunResumeWhenCompleteParams,
|
|
136
|
+
),
|
|
137
|
+
options=make_request_options(
|
|
138
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
139
|
+
),
|
|
140
|
+
cast_to=WorkflowRunResumeWhenCompleteResponse,
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
class WorkflowRunsResourceWithRawResponse:
|
|
145
|
+
def __init__(self, workflow_runs: WorkflowRunsResource) -> None:
|
|
146
|
+
self._workflow_runs = workflow_runs
|
|
147
|
+
|
|
148
|
+
self.resume_when_complete = to_raw_response_wrapper(
|
|
149
|
+
workflow_runs.resume_when_complete,
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
class AsyncWorkflowRunsResourceWithRawResponse:
|
|
154
|
+
def __init__(self, workflow_runs: AsyncWorkflowRunsResource) -> None:
|
|
155
|
+
self._workflow_runs = workflow_runs
|
|
156
|
+
|
|
157
|
+
self.resume_when_complete = async_to_raw_response_wrapper(
|
|
158
|
+
workflow_runs.resume_when_complete,
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
class WorkflowRunsResourceWithStreamingResponse:
|
|
163
|
+
def __init__(self, workflow_runs: WorkflowRunsResource) -> None:
|
|
164
|
+
self._workflow_runs = workflow_runs
|
|
165
|
+
|
|
166
|
+
self.resume_when_complete = to_streamed_response_wrapper(
|
|
167
|
+
workflow_runs.resume_when_complete,
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
class AsyncWorkflowRunsResourceWithStreamingResponse:
|
|
172
|
+
def __init__(self, workflow_runs: AsyncWorkflowRunsResource) -> None:
|
|
173
|
+
self._workflow_runs = workflow_runs
|
|
174
|
+
|
|
175
|
+
self.resume_when_complete = async_to_streamed_response_wrapper(
|
|
176
|
+
workflow_runs.resume_when_complete,
|
|
177
|
+
)
|
samplehc/types/v2/__init__.py
CHANGED
|
@@ -43,3 +43,9 @@ from .document_transform_json_to_html_params import (
|
|
|
43
43
|
from .document_transform_json_to_html_response import (
|
|
44
44
|
DocumentTransformJsonToHTMLResponse as DocumentTransformJsonToHTMLResponse,
|
|
45
45
|
)
|
|
46
|
+
from .workflow_run_resume_when_complete_params import (
|
|
47
|
+
WorkflowRunResumeWhenCompleteParams as WorkflowRunResumeWhenCompleteParams,
|
|
48
|
+
)
|
|
49
|
+
from .workflow_run_resume_when_complete_response import (
|
|
50
|
+
WorkflowRunResumeWhenCompleteResponse as WorkflowRunResumeWhenCompleteResponse,
|
|
51
|
+
)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Required, Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from ..._utils import PropertyInfo
|
|
8
|
+
|
|
9
|
+
__all__ = ["WorkflowRunResumeWhenCompleteParams"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class WorkflowRunResumeWhenCompleteParams(TypedDict, total=False):
|
|
13
|
+
async_result_id: Required[Annotated[str, PropertyInfo(alias="asyncResultId")]]
|
|
14
|
+
"""The unique identifier of the asynchronous result to monitor before resuming."""
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from ..._models import BaseModel
|
|
4
|
+
|
|
5
|
+
__all__ = ["WorkflowRunResumeWhenCompleteResponse"]
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class WorkflowRunResumeWhenCompleteResponse(BaseModel):
|
|
9
|
+
"""Request accepted, processing to resume workflow has been initiated."""
|
|
10
|
+
|
|
11
|
+
message: str
|
|
12
|
+
"""A message indicating the request has been accepted for processing."""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: samplehc
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.20.0
|
|
4
4
|
Summary: The official Python library for the Sample Healthcare API
|
|
5
5
|
Project-URL: Homepage, https://github.com/samplehc/samplehc-python
|
|
6
6
|
Project-URL: Repository, https://github.com/samplehc/samplehc-python
|
|
@@ -67,10 +67,10 @@ client = SampleHealthcare(
|
|
|
67
67
|
api_key=os.environ.get("SAMPLEHC_API_KEY"), # This is the default and can be omitted
|
|
68
68
|
)
|
|
69
69
|
|
|
70
|
-
response = client.v2.
|
|
71
|
-
|
|
70
|
+
response = client.v2.workflow_runs.resume_when_complete(
|
|
71
|
+
async_result_id="asyncResultId",
|
|
72
72
|
)
|
|
73
|
-
print(response.
|
|
73
|
+
print(response.message)
|
|
74
74
|
```
|
|
75
75
|
|
|
76
76
|
While you can provide an `api_key` keyword argument,
|
|
@@ -93,10 +93,10 @@ client = AsyncSampleHealthcare(
|
|
|
93
93
|
|
|
94
94
|
|
|
95
95
|
async def main() -> None:
|
|
96
|
-
response = await client.v2.
|
|
97
|
-
|
|
96
|
+
response = await client.v2.workflow_runs.resume_when_complete(
|
|
97
|
+
async_result_id="asyncResultId",
|
|
98
98
|
)
|
|
99
|
-
print(response.
|
|
99
|
+
print(response.message)
|
|
100
100
|
|
|
101
101
|
|
|
102
102
|
asyncio.run(main())
|
|
@@ -129,10 +129,10 @@ async def main() -> None:
|
|
|
129
129
|
api_key=os.environ.get("SAMPLEHC_API_KEY"), # This is the default and can be omitted
|
|
130
130
|
http_client=DefaultAioHttpClient(),
|
|
131
131
|
) as client:
|
|
132
|
-
response = await client.v2.
|
|
133
|
-
|
|
132
|
+
response = await client.v2.workflow_runs.resume_when_complete(
|
|
133
|
+
async_result_id="asyncResultId",
|
|
134
134
|
)
|
|
135
|
-
print(response.
|
|
135
|
+
print(response.message)
|
|
136
136
|
|
|
137
137
|
|
|
138
138
|
asyncio.run(main())
|
|
@@ -182,8 +182,8 @@ from samplehc import SampleHealthcare
|
|
|
182
182
|
client = SampleHealthcare()
|
|
183
183
|
|
|
184
184
|
try:
|
|
185
|
-
client.v2.
|
|
186
|
-
|
|
185
|
+
client.v2.workflow_runs.resume_when_complete(
|
|
186
|
+
async_result_id="asyncResultId",
|
|
187
187
|
)
|
|
188
188
|
except samplehc.APIConnectionError as e:
|
|
189
189
|
print("The server could not be reached")
|
|
@@ -227,8 +227,8 @@ client = SampleHealthcare(
|
|
|
227
227
|
)
|
|
228
228
|
|
|
229
229
|
# Or, configure per-request:
|
|
230
|
-
client.with_options(max_retries=5).v2.
|
|
231
|
-
|
|
230
|
+
client.with_options(max_retries=5).v2.workflow_runs.resume_when_complete(
|
|
231
|
+
async_result_id="asyncResultId",
|
|
232
232
|
)
|
|
233
233
|
```
|
|
234
234
|
|
|
@@ -252,8 +252,8 @@ client = SampleHealthcare(
|
|
|
252
252
|
)
|
|
253
253
|
|
|
254
254
|
# Override per-request:
|
|
255
|
-
client.with_options(timeout=5.0).v2.
|
|
256
|
-
|
|
255
|
+
client.with_options(timeout=5.0).v2.workflow_runs.resume_when_complete(
|
|
256
|
+
async_result_id="asyncResultId",
|
|
257
257
|
)
|
|
258
258
|
```
|
|
259
259
|
|
|
@@ -295,13 +295,13 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
|
|
|
295
295
|
from samplehc import SampleHealthcare
|
|
296
296
|
|
|
297
297
|
client = SampleHealthcare()
|
|
298
|
-
response = client.v2.
|
|
299
|
-
|
|
298
|
+
response = client.v2.workflow_runs.with_raw_response.resume_when_complete(
|
|
299
|
+
async_result_id="asyncResultId",
|
|
300
300
|
)
|
|
301
301
|
print(response.headers.get('X-My-Header'))
|
|
302
302
|
|
|
303
|
-
|
|
304
|
-
print(
|
|
303
|
+
workflow_run = response.parse() # get the object that `v2.workflow_runs.resume_when_complete()` would have returned
|
|
304
|
+
print(workflow_run.message)
|
|
305
305
|
```
|
|
306
306
|
|
|
307
307
|
These methods return an [`APIResponse`](https://github.com/samplehc/samplehc-python/tree/main/src/samplehc/_response.py) object.
|
|
@@ -315,8 +315,8 @@ The above interface eagerly reads the full response body when you make the reque
|
|
|
315
315
|
To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.
|
|
316
316
|
|
|
317
317
|
```python
|
|
318
|
-
with client.v2.
|
|
319
|
-
|
|
318
|
+
with client.v2.workflow_runs.with_streaming_response.resume_when_complete(
|
|
319
|
+
async_result_id="asyncResultId",
|
|
320
320
|
) as response:
|
|
321
321
|
print(response.headers.get("X-My-Header"))
|
|
322
322
|
|
|
@@ -11,7 +11,7 @@ samplehc/_resource.py,sha256=Mdg6fhf_5wYd2K2JZ4BQIJMPqJOWetqpJE3h3MmGZJE,1160
|
|
|
11
11
|
samplehc/_response.py,sha256=UzsuYRbic274gcdUWq9ShPkdRt7VrzkjaqwSwdxqWIs,28816
|
|
12
12
|
samplehc/_streaming.py,sha256=Wsd0pUQJT1ZW9v_iBIFKDS9lukt3M0X96f3Enqx1PYY,10261
|
|
13
13
|
samplehc/_types.py,sha256=j9OfrgjmrZOU2T8RbK9QKC0plnD1UCUWuH5oRR2oY3c,7596
|
|
14
|
-
samplehc/_version.py,sha256=
|
|
14
|
+
samplehc/_version.py,sha256=M3icE_EQYuYD5NmqCpfuaQ098PViLuEof6OJY1aRSMM,161
|
|
15
15
|
samplehc/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
samplehc/_utils/__init__.py,sha256=7fch0GT9zpNnErbciSpUNa-SjTxxjY6kxHxKMOM4AGs,2305
|
|
17
17
|
samplehc/_utils/_compat.py,sha256=D8gtAvjJQrDWt9upS0XaG9Rr5l1QhiAx_I_1utT_tt0,1195
|
|
@@ -28,19 +28,20 @@ samplehc/_utils/_typing.py,sha256=N_5PPuFNsaygbtA_npZd98SVN1LQQvFTKL6bkWPBZGU,47
|
|
|
28
28
|
samplehc/_utils/_utils.py,sha256=ugfUaneOK7I8h9b3656flwf5u_kthY0gvNuqvgOLoSU,12252
|
|
29
29
|
samplehc/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
|
|
30
30
|
samplehc/resources/__init__.py,sha256=ADMc9HzQlsVyP-m8qS4BV71h91vHtlVqhZnJVOAI2Og,500
|
|
31
|
-
samplehc/resources/v2/__init__.py,sha256=
|
|
31
|
+
samplehc/resources/v2/__init__.py,sha256=lGOMXNr9qaoABUxk9f42NLo7nRyEiQObPKAUzqNXUNQ,3514
|
|
32
32
|
samplehc/resources/v2/async_results.py,sha256=cZ-PWCSo7dM0y9FD1P-LwkvsMIp9e6_gSc5jl7T3d60,10353
|
|
33
33
|
samplehc/resources/v2/communication.py,sha256=fHM2kBpKvOpzROfVKIx2Nmuw-iSs6nSH-IZJZdte3M8,21239
|
|
34
34
|
samplehc/resources/v2/database.py,sha256=lFLepM70TzkRBaejyfU5GmE3PfgIaBi_liRTpJs2lzM,7950
|
|
35
35
|
samplehc/resources/v2/events.py,sha256=Kdx2fSNGr21YA7fAHvs9huMGDRra8bsvnxiO1B1ZlSE,6658
|
|
36
|
-
samplehc/resources/v2/v2.py,sha256=
|
|
36
|
+
samplehc/resources/v2/v2.py,sha256=V3BaQH2AZCEEvv3jQTzzTnP9CrK4GpSU0MTeZmxnZNI,9448
|
|
37
|
+
samplehc/resources/v2/workflow_runs.py,sha256=vF06ASKOr4ldWvAGGSyoG5_P6gUHWxmHeYuqKq3tkdM,7203
|
|
37
38
|
samplehc/resources/v2/documents/__init__.py,sha256=wGPR6hdfmDxt-nXn0cDIud1eZAEs_j3kZd4KrxnuoEg,1993
|
|
38
39
|
samplehc/resources/v2/documents/documents.py,sha256=5bp9x9SZ4mOqnYgwv9l7CWlUsCxcURFgDcpkAiXdWqk,57688
|
|
39
40
|
samplehc/resources/v2/documents/formats.py,sha256=lB60NUBPBceC1XUbL04lsGIsyVWlqsOE8kQkw5oKIM0,6993
|
|
40
41
|
samplehc/resources/v2/documents/legacy.py,sha256=CbDfHJK_U-sDW1rIp8Hj7pTKKHscwmdijSx4mWALQk8,14095
|
|
41
42
|
samplehc/resources/v2/documents/templates.py,sha256=P6gbC8JxEKXN05yCO2NUXGv-ooLBkwQvDpOy4KccprY,17115
|
|
42
43
|
samplehc/types/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekDUge2o_4pXQ,122
|
|
43
|
-
samplehc/types/v2/__init__.py,sha256=
|
|
44
|
+
samplehc/types/v2/__init__.py,sha256=lP7SzZN0S-FDGj7uT-neDuLe1cOVurm3r9MpiZDSoHk,3725
|
|
44
45
|
samplehc/types/v2/async_result_sleep_params.py,sha256=vdhEdUP6vA9Y44waJBU2p_PEC-rzWBOr4RkE1F2eTHs,729
|
|
45
46
|
samplehc/types/v2/async_result_sleep_response.py,sha256=nAUL4IVyG9RjVZtNyMnn_sp1mcwatJCEBjBCDf6bDtM,366
|
|
46
47
|
samplehc/types/v2/communication_send_email_params.py,sha256=thNaWdxK4JwOk4JQ0zvb3rab9AlOfkDbaweP_7vXsIg,1638
|
|
@@ -74,6 +75,8 @@ samplehc/types/v2/document_transform_json_to_html_params.py,sha256=0bRUKlxD2-JB5
|
|
|
74
75
|
samplehc/types/v2/document_transform_json_to_html_response.py,sha256=ca5EIuwV1pywWDnIgy2e6vW_QunxA-PDHh69jurvcS0,268
|
|
75
76
|
samplehc/types/v2/event_emit_params.py,sha256=SU1pC9tVh84OmyXWsEjxmBMnkTHqHQXQaMZihEZoX2w,506
|
|
76
77
|
samplehc/types/v2/event_emit_response.py,sha256=Md9mWenySbRoqz2tWrY4jyXS-oWirz5VVdpg9W2gPM8,263
|
|
78
|
+
samplehc/types/v2/workflow_run_resume_when_complete_params.py,sha256=2EhKTL1vPZnnAF6t6s4iTen5EzGzc25D0VFQwdlFE9A,510
|
|
79
|
+
samplehc/types/v2/workflow_run_resume_when_complete_response.py,sha256=JkBz04MX9Ka6FE1IHVhyE39W48-bprNbmcBg0elS3us,404
|
|
77
80
|
samplehc/types/v2/documents/__init__.py,sha256=m-DTAbY9msEuebxJrffYI5vi_m8baFX7im5aCucdUUk,1265
|
|
78
81
|
samplehc/types/v2/documents/format_create_pdf_params.py,sha256=OgteE7CfhVP-CAw5RGZlSoXz50rdfxohA-9fJA_9t0Q,458
|
|
79
82
|
samplehc/types/v2/documents/format_create_pdf_response.py,sha256=XBhC9fjEEbWeDnioXh43z_ySNJKEIycxipucZLDCoPY,362
|
|
@@ -87,7 +90,7 @@ samplehc/types/v2/documents/template_generate_document_async_params.py,sha256=5a
|
|
|
87
90
|
samplehc/types/v2/documents/template_generate_document_async_response.py,sha256=xFivOxAB8jahS6vKcr-3TGR4IhF0INDH37nivTVoHSk,402
|
|
88
91
|
samplehc/types/v2/documents/template_render_document_params.py,sha256=egYW79gF_UNjE8wTmiwtbgOozqVDa6i8Db0yjwt5IXE,905
|
|
89
92
|
samplehc/types/v2/documents/template_render_document_response.py,sha256=yN2JLDHszpaA9RZq8INdJIue_JkrLON3xqWMh-z3MCc,367
|
|
90
|
-
samplehc-0.
|
|
91
|
-
samplehc-0.
|
|
92
|
-
samplehc-0.
|
|
93
|
-
samplehc-0.
|
|
93
|
+
samplehc-0.20.0.dist-info/METADATA,sha256=8qRxyAYZdPM7h5eTnoQ0S7KMCw1d1ub_mLO9l5jmNX0,14631
|
|
94
|
+
samplehc-0.20.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
95
|
+
samplehc-0.20.0.dist-info/licenses/LICENSE,sha256=ll_q1imgsIlRXL5pk6VmrO0f_L0thzOlPI2cc7qcqc0,11347
|
|
96
|
+
samplehc-0.20.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|