samplehc 0.12.0__py3-none-any.whl → 0.14.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/browser_agents/runs/runs.py +131 -0
- samplehc/resources/v2/integrations/__init__.py +14 -0
- samplehc/resources/v2/integrations/integrations.py +32 -0
- samplehc/resources/v2/integrations/salesforce.py +85 -1
- samplehc/resources/v2/integrations/wellsky/__init__.py +33 -0
- samplehc/resources/v2/integrations/wellsky/patients.py +324 -0
- samplehc/resources/v2/integrations/wellsky/wellsky.py +102 -0
- samplehc/resources/v2/tasks/tasks.py +110 -1
- samplehc/types/v2/__init__.py +2 -0
- samplehc/types/v2/browser_agents/__init__.py +3 -0
- samplehc/types/v2/browser_agents/run_list_events_params.py +15 -0
- samplehc/types/v2/browser_agents/run_list_events_response.py +30 -0
- samplehc/types/v2/integrations/__init__.py +1 -0
- samplehc/types/v2/integrations/salesforce_run_soql_query_params.py +11 -0
- samplehc/types/v2/integrations/wellsky/__init__.py +6 -0
- samplehc/types/v2/integrations/wellsky/patient_add_params.py +13 -0
- samplehc/types/v2/integrations/wellsky/patient_search_params.py +32 -0
- samplehc/types/v2/task_update_column_params.py +16 -0
- samplehc/types/v2/task_update_column_response.py +9 -0
- {samplehc-0.12.0.dist-info → samplehc-0.14.0.dist-info}/METADATA +2 -2
- {samplehc-0.12.0.dist-info → samplehc-0.14.0.dist-info}/RECORD +24 -13
- {samplehc-0.12.0.dist-info → samplehc-0.14.0.dist-info}/WHEEL +0 -0
- {samplehc-0.12.0.dist-info → samplehc-0.14.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict
|
|
6
|
+
|
|
7
|
+
import httpx
|
|
8
|
+
|
|
9
|
+
from ....._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
10
|
+
from ....._utils import maybe_transform, async_maybe_transform
|
|
11
|
+
from ....._compat import cached_property
|
|
12
|
+
from ....._resource import SyncAPIResource, AsyncAPIResource
|
|
13
|
+
from ....._response import (
|
|
14
|
+
to_raw_response_wrapper,
|
|
15
|
+
to_streamed_response_wrapper,
|
|
16
|
+
async_to_raw_response_wrapper,
|
|
17
|
+
async_to_streamed_response_wrapper,
|
|
18
|
+
)
|
|
19
|
+
from ....._base_client import make_request_options
|
|
20
|
+
from .....types.v2.integrations.wellsky import patient_add_params, patient_search_params
|
|
21
|
+
|
|
22
|
+
__all__ = ["PatientsResource", "AsyncPatientsResource"]
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class PatientsResource(SyncAPIResource):
|
|
26
|
+
@cached_property
|
|
27
|
+
def with_raw_response(self) -> PatientsResourceWithRawResponse:
|
|
28
|
+
"""
|
|
29
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
30
|
+
the raw response object instead of the parsed content.
|
|
31
|
+
|
|
32
|
+
For more information, see https://www.github.com/samplehc/samplehc-python#accessing-raw-response-data-eg-headers
|
|
33
|
+
"""
|
|
34
|
+
return PatientsResourceWithRawResponse(self)
|
|
35
|
+
|
|
36
|
+
@cached_property
|
|
37
|
+
def with_streaming_response(self) -> PatientsResourceWithStreamingResponse:
|
|
38
|
+
"""
|
|
39
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
40
|
+
|
|
41
|
+
For more information, see https://www.github.com/samplehc/samplehc-python#with_streaming_response
|
|
42
|
+
"""
|
|
43
|
+
return PatientsResourceWithStreamingResponse(self)
|
|
44
|
+
|
|
45
|
+
def add(
|
|
46
|
+
self,
|
|
47
|
+
slug: str,
|
|
48
|
+
*,
|
|
49
|
+
data: Dict[str, object],
|
|
50
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
51
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
52
|
+
extra_headers: Headers | None = None,
|
|
53
|
+
extra_query: Query | None = None,
|
|
54
|
+
extra_body: Body | None = None,
|
|
55
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
56
|
+
) -> object:
|
|
57
|
+
"""
|
|
58
|
+
Add a patient to WellSky.
|
|
59
|
+
|
|
60
|
+
Args:
|
|
61
|
+
data: The data to add the patient to WellSky.
|
|
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
|
+
if not slug:
|
|
72
|
+
raise ValueError(f"Expected a non-empty value for `slug` but received {slug!r}")
|
|
73
|
+
return self._post(
|
|
74
|
+
f"/api/v2/integrations/wellsky/{slug}/patients",
|
|
75
|
+
body=maybe_transform({"data": data}, patient_add_params.PatientAddParams),
|
|
76
|
+
options=make_request_options(
|
|
77
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
78
|
+
),
|
|
79
|
+
cast_to=object,
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
def search(
|
|
83
|
+
self,
|
|
84
|
+
slug: str,
|
|
85
|
+
*,
|
|
86
|
+
reqdelete: str | Omit = omit,
|
|
87
|
+
reqdispin: str | Omit = omit,
|
|
88
|
+
reqlvl6_in: str | Omit = omit,
|
|
89
|
+
reqnamein: str | Omit = omit,
|
|
90
|
+
reqnonprosp: str | Omit = omit,
|
|
91
|
+
reqprosp: str | Omit = omit,
|
|
92
|
+
reqsortin: str | Omit = omit,
|
|
93
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
94
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
95
|
+
extra_headers: Headers | None = None,
|
|
96
|
+
extra_query: Query | None = None,
|
|
97
|
+
extra_body: Body | None = None,
|
|
98
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
99
|
+
) -> object:
|
|
100
|
+
"""
|
|
101
|
+
Search for patients in WellSky.
|
|
102
|
+
|
|
103
|
+
Args:
|
|
104
|
+
reqdelete: Delete flag (Y/N)
|
|
105
|
+
|
|
106
|
+
reqdispin: Disposition filter
|
|
107
|
+
|
|
108
|
+
reqlvl6_in: Facility ID
|
|
109
|
+
|
|
110
|
+
reqnamein: Patient name to search
|
|
111
|
+
|
|
112
|
+
reqnonprosp: Non-prospect flag (Y/N)
|
|
113
|
+
|
|
114
|
+
reqprosp: Prospect flag (Y/N)
|
|
115
|
+
|
|
116
|
+
reqsortin: Sort field
|
|
117
|
+
|
|
118
|
+
extra_headers: Send extra headers
|
|
119
|
+
|
|
120
|
+
extra_query: Add additional query parameters to the request
|
|
121
|
+
|
|
122
|
+
extra_body: Add additional JSON properties to the request
|
|
123
|
+
|
|
124
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
125
|
+
"""
|
|
126
|
+
if not slug:
|
|
127
|
+
raise ValueError(f"Expected a non-empty value for `slug` but received {slug!r}")
|
|
128
|
+
return self._get(
|
|
129
|
+
f"/api/v2/integrations/wellsky/{slug}/patients",
|
|
130
|
+
options=make_request_options(
|
|
131
|
+
extra_headers=extra_headers,
|
|
132
|
+
extra_query=extra_query,
|
|
133
|
+
extra_body=extra_body,
|
|
134
|
+
timeout=timeout,
|
|
135
|
+
query=maybe_transform(
|
|
136
|
+
{
|
|
137
|
+
"reqdelete": reqdelete,
|
|
138
|
+
"reqdispin": reqdispin,
|
|
139
|
+
"reqlvl6_in": reqlvl6_in,
|
|
140
|
+
"reqnamein": reqnamein,
|
|
141
|
+
"reqnonprosp": reqnonprosp,
|
|
142
|
+
"reqprosp": reqprosp,
|
|
143
|
+
"reqsortin": reqsortin,
|
|
144
|
+
},
|
|
145
|
+
patient_search_params.PatientSearchParams,
|
|
146
|
+
),
|
|
147
|
+
),
|
|
148
|
+
cast_to=object,
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
class AsyncPatientsResource(AsyncAPIResource):
|
|
153
|
+
@cached_property
|
|
154
|
+
def with_raw_response(self) -> AsyncPatientsResourceWithRawResponse:
|
|
155
|
+
"""
|
|
156
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
157
|
+
the raw response object instead of the parsed content.
|
|
158
|
+
|
|
159
|
+
For more information, see https://www.github.com/samplehc/samplehc-python#accessing-raw-response-data-eg-headers
|
|
160
|
+
"""
|
|
161
|
+
return AsyncPatientsResourceWithRawResponse(self)
|
|
162
|
+
|
|
163
|
+
@cached_property
|
|
164
|
+
def with_streaming_response(self) -> AsyncPatientsResourceWithStreamingResponse:
|
|
165
|
+
"""
|
|
166
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
167
|
+
|
|
168
|
+
For more information, see https://www.github.com/samplehc/samplehc-python#with_streaming_response
|
|
169
|
+
"""
|
|
170
|
+
return AsyncPatientsResourceWithStreamingResponse(self)
|
|
171
|
+
|
|
172
|
+
async def add(
|
|
173
|
+
self,
|
|
174
|
+
slug: str,
|
|
175
|
+
*,
|
|
176
|
+
data: Dict[str, object],
|
|
177
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
178
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
179
|
+
extra_headers: Headers | None = None,
|
|
180
|
+
extra_query: Query | None = None,
|
|
181
|
+
extra_body: Body | None = None,
|
|
182
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
183
|
+
) -> object:
|
|
184
|
+
"""
|
|
185
|
+
Add a patient to WellSky.
|
|
186
|
+
|
|
187
|
+
Args:
|
|
188
|
+
data: The data to add the patient to WellSky.
|
|
189
|
+
|
|
190
|
+
extra_headers: Send extra headers
|
|
191
|
+
|
|
192
|
+
extra_query: Add additional query parameters to the request
|
|
193
|
+
|
|
194
|
+
extra_body: Add additional JSON properties to the request
|
|
195
|
+
|
|
196
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
197
|
+
"""
|
|
198
|
+
if not slug:
|
|
199
|
+
raise ValueError(f"Expected a non-empty value for `slug` but received {slug!r}")
|
|
200
|
+
return await self._post(
|
|
201
|
+
f"/api/v2/integrations/wellsky/{slug}/patients",
|
|
202
|
+
body=await async_maybe_transform({"data": data}, patient_add_params.PatientAddParams),
|
|
203
|
+
options=make_request_options(
|
|
204
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
205
|
+
),
|
|
206
|
+
cast_to=object,
|
|
207
|
+
)
|
|
208
|
+
|
|
209
|
+
async def search(
|
|
210
|
+
self,
|
|
211
|
+
slug: str,
|
|
212
|
+
*,
|
|
213
|
+
reqdelete: str | Omit = omit,
|
|
214
|
+
reqdispin: str | Omit = omit,
|
|
215
|
+
reqlvl6_in: str | Omit = omit,
|
|
216
|
+
reqnamein: str | Omit = omit,
|
|
217
|
+
reqnonprosp: str | Omit = omit,
|
|
218
|
+
reqprosp: str | Omit = omit,
|
|
219
|
+
reqsortin: str | Omit = omit,
|
|
220
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
221
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
222
|
+
extra_headers: Headers | None = None,
|
|
223
|
+
extra_query: Query | None = None,
|
|
224
|
+
extra_body: Body | None = None,
|
|
225
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
226
|
+
) -> object:
|
|
227
|
+
"""
|
|
228
|
+
Search for patients in WellSky.
|
|
229
|
+
|
|
230
|
+
Args:
|
|
231
|
+
reqdelete: Delete flag (Y/N)
|
|
232
|
+
|
|
233
|
+
reqdispin: Disposition filter
|
|
234
|
+
|
|
235
|
+
reqlvl6_in: Facility ID
|
|
236
|
+
|
|
237
|
+
reqnamein: Patient name to search
|
|
238
|
+
|
|
239
|
+
reqnonprosp: Non-prospect flag (Y/N)
|
|
240
|
+
|
|
241
|
+
reqprosp: Prospect flag (Y/N)
|
|
242
|
+
|
|
243
|
+
reqsortin: Sort field
|
|
244
|
+
|
|
245
|
+
extra_headers: Send extra headers
|
|
246
|
+
|
|
247
|
+
extra_query: Add additional query parameters to the request
|
|
248
|
+
|
|
249
|
+
extra_body: Add additional JSON properties to the request
|
|
250
|
+
|
|
251
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
252
|
+
"""
|
|
253
|
+
if not slug:
|
|
254
|
+
raise ValueError(f"Expected a non-empty value for `slug` but received {slug!r}")
|
|
255
|
+
return await self._get(
|
|
256
|
+
f"/api/v2/integrations/wellsky/{slug}/patients",
|
|
257
|
+
options=make_request_options(
|
|
258
|
+
extra_headers=extra_headers,
|
|
259
|
+
extra_query=extra_query,
|
|
260
|
+
extra_body=extra_body,
|
|
261
|
+
timeout=timeout,
|
|
262
|
+
query=await async_maybe_transform(
|
|
263
|
+
{
|
|
264
|
+
"reqdelete": reqdelete,
|
|
265
|
+
"reqdispin": reqdispin,
|
|
266
|
+
"reqlvl6_in": reqlvl6_in,
|
|
267
|
+
"reqnamein": reqnamein,
|
|
268
|
+
"reqnonprosp": reqnonprosp,
|
|
269
|
+
"reqprosp": reqprosp,
|
|
270
|
+
"reqsortin": reqsortin,
|
|
271
|
+
},
|
|
272
|
+
patient_search_params.PatientSearchParams,
|
|
273
|
+
),
|
|
274
|
+
),
|
|
275
|
+
cast_to=object,
|
|
276
|
+
)
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
class PatientsResourceWithRawResponse:
|
|
280
|
+
def __init__(self, patients: PatientsResource) -> None:
|
|
281
|
+
self._patients = patients
|
|
282
|
+
|
|
283
|
+
self.add = to_raw_response_wrapper(
|
|
284
|
+
patients.add,
|
|
285
|
+
)
|
|
286
|
+
self.search = to_raw_response_wrapper(
|
|
287
|
+
patients.search,
|
|
288
|
+
)
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
class AsyncPatientsResourceWithRawResponse:
|
|
292
|
+
def __init__(self, patients: AsyncPatientsResource) -> None:
|
|
293
|
+
self._patients = patients
|
|
294
|
+
|
|
295
|
+
self.add = async_to_raw_response_wrapper(
|
|
296
|
+
patients.add,
|
|
297
|
+
)
|
|
298
|
+
self.search = async_to_raw_response_wrapper(
|
|
299
|
+
patients.search,
|
|
300
|
+
)
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
class PatientsResourceWithStreamingResponse:
|
|
304
|
+
def __init__(self, patients: PatientsResource) -> None:
|
|
305
|
+
self._patients = patients
|
|
306
|
+
|
|
307
|
+
self.add = to_streamed_response_wrapper(
|
|
308
|
+
patients.add,
|
|
309
|
+
)
|
|
310
|
+
self.search = to_streamed_response_wrapper(
|
|
311
|
+
patients.search,
|
|
312
|
+
)
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
class AsyncPatientsResourceWithStreamingResponse:
|
|
316
|
+
def __init__(self, patients: AsyncPatientsResource) -> None:
|
|
317
|
+
self._patients = patients
|
|
318
|
+
|
|
319
|
+
self.add = async_to_streamed_response_wrapper(
|
|
320
|
+
patients.add,
|
|
321
|
+
)
|
|
322
|
+
self.search = async_to_streamed_response_wrapper(
|
|
323
|
+
patients.search,
|
|
324
|
+
)
|
|
@@ -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 .patients import (
|
|
6
|
+
PatientsResource,
|
|
7
|
+
AsyncPatientsResource,
|
|
8
|
+
PatientsResourceWithRawResponse,
|
|
9
|
+
AsyncPatientsResourceWithRawResponse,
|
|
10
|
+
PatientsResourceWithStreamingResponse,
|
|
11
|
+
AsyncPatientsResourceWithStreamingResponse,
|
|
12
|
+
)
|
|
13
|
+
from ....._compat import cached_property
|
|
14
|
+
from ....._resource import SyncAPIResource, AsyncAPIResource
|
|
15
|
+
|
|
16
|
+
__all__ = ["WellskyResource", "AsyncWellskyResource"]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class WellskyResource(SyncAPIResource):
|
|
20
|
+
@cached_property
|
|
21
|
+
def patients(self) -> PatientsResource:
|
|
22
|
+
return PatientsResource(self._client)
|
|
23
|
+
|
|
24
|
+
@cached_property
|
|
25
|
+
def with_raw_response(self) -> WellskyResourceWithRawResponse:
|
|
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 WellskyResourceWithRawResponse(self)
|
|
33
|
+
|
|
34
|
+
@cached_property
|
|
35
|
+
def with_streaming_response(self) -> WellskyResourceWithStreamingResponse:
|
|
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 WellskyResourceWithStreamingResponse(self)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class AsyncWellskyResource(AsyncAPIResource):
|
|
45
|
+
@cached_property
|
|
46
|
+
def patients(self) -> AsyncPatientsResource:
|
|
47
|
+
return AsyncPatientsResource(self._client)
|
|
48
|
+
|
|
49
|
+
@cached_property
|
|
50
|
+
def with_raw_response(self) -> AsyncWellskyResourceWithRawResponse:
|
|
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 AsyncWellskyResourceWithRawResponse(self)
|
|
58
|
+
|
|
59
|
+
@cached_property
|
|
60
|
+
def with_streaming_response(self) -> AsyncWellskyResourceWithStreamingResponse:
|
|
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 AsyncWellskyResourceWithStreamingResponse(self)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class WellskyResourceWithRawResponse:
|
|
70
|
+
def __init__(self, wellsky: WellskyResource) -> None:
|
|
71
|
+
self._wellsky = wellsky
|
|
72
|
+
|
|
73
|
+
@cached_property
|
|
74
|
+
def patients(self) -> PatientsResourceWithRawResponse:
|
|
75
|
+
return PatientsResourceWithRawResponse(self._wellsky.patients)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class AsyncWellskyResourceWithRawResponse:
|
|
79
|
+
def __init__(self, wellsky: AsyncWellskyResource) -> None:
|
|
80
|
+
self._wellsky = wellsky
|
|
81
|
+
|
|
82
|
+
@cached_property
|
|
83
|
+
def patients(self) -> AsyncPatientsResourceWithRawResponse:
|
|
84
|
+
return AsyncPatientsResourceWithRawResponse(self._wellsky.patients)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
class WellskyResourceWithStreamingResponse:
|
|
88
|
+
def __init__(self, wellsky: WellskyResource) -> None:
|
|
89
|
+
self._wellsky = wellsky
|
|
90
|
+
|
|
91
|
+
@cached_property
|
|
92
|
+
def patients(self) -> PatientsResourceWithStreamingResponse:
|
|
93
|
+
return PatientsResourceWithStreamingResponse(self._wellsky.patients)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
class AsyncWellskyResourceWithStreamingResponse:
|
|
97
|
+
def __init__(self, wellsky: AsyncWellskyResource) -> None:
|
|
98
|
+
self._wellsky = wellsky
|
|
99
|
+
|
|
100
|
+
@cached_property
|
|
101
|
+
def patients(self) -> AsyncPatientsResourceWithStreamingResponse:
|
|
102
|
+
return AsyncPatientsResourceWithStreamingResponse(self._wellsky.patients)
|
|
@@ -17,7 +17,7 @@ from .state import (
|
|
|
17
17
|
from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
18
18
|
from ...._utils import maybe_transform, async_maybe_transform
|
|
19
19
|
from ...._compat import cached_property
|
|
20
|
-
from ....types.v2 import task_complete_params, task_update_screen_time_params
|
|
20
|
+
from ....types.v2 import task_complete_params, task_update_column_params, task_update_screen_time_params
|
|
21
21
|
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
22
22
|
from ...._response import (
|
|
23
23
|
to_raw_response_wrapper,
|
|
@@ -30,6 +30,7 @@ from ....types.v2.task_retry_response import TaskRetryResponse
|
|
|
30
30
|
from ....types.v2.task_cancel_response import TaskCancelResponse
|
|
31
31
|
from ....types.v2.task_complete_response import TaskCompleteResponse
|
|
32
32
|
from ....types.v2.task_retrieve_response import TaskRetrieveResponse
|
|
33
|
+
from ....types.v2.task_update_column_response import TaskUpdateColumnResponse
|
|
33
34
|
from ....types.v2.task_update_screen_time_response import TaskUpdateScreenTimeResponse
|
|
34
35
|
from ....types.v2.task_get_suspended_payload_response import TaskGetSuspendedPayloadResponse
|
|
35
36
|
|
|
@@ -235,6 +236,54 @@ class TasksResource(SyncAPIResource):
|
|
|
235
236
|
cast_to=TaskRetryResponse,
|
|
236
237
|
)
|
|
237
238
|
|
|
239
|
+
def update_column(
|
|
240
|
+
self,
|
|
241
|
+
task_id: str,
|
|
242
|
+
*,
|
|
243
|
+
key: str,
|
|
244
|
+
value: Optional[str],
|
|
245
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
246
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
247
|
+
extra_headers: Headers | None = None,
|
|
248
|
+
extra_query: Query | None = None,
|
|
249
|
+
extra_body: Body | None = None,
|
|
250
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
251
|
+
) -> TaskUpdateColumnResponse:
|
|
252
|
+
"""Updates or inserts a column value for a task.
|
|
253
|
+
|
|
254
|
+
If the column key already exists,
|
|
255
|
+
its value will be updated. If it doesn't exist, a new column will be added.
|
|
256
|
+
|
|
257
|
+
Args:
|
|
258
|
+
key: The column key to update or insert.
|
|
259
|
+
|
|
260
|
+
value: The value to set for the column.
|
|
261
|
+
|
|
262
|
+
extra_headers: Send extra headers
|
|
263
|
+
|
|
264
|
+
extra_query: Add additional query parameters to the request
|
|
265
|
+
|
|
266
|
+
extra_body: Add additional JSON properties to the request
|
|
267
|
+
|
|
268
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
269
|
+
"""
|
|
270
|
+
if not task_id:
|
|
271
|
+
raise ValueError(f"Expected a non-empty value for `task_id` but received {task_id!r}")
|
|
272
|
+
return self._post(
|
|
273
|
+
f"/api/v2/tasks/{task_id}/columns",
|
|
274
|
+
body=maybe_transform(
|
|
275
|
+
{
|
|
276
|
+
"key": key,
|
|
277
|
+
"value": value,
|
|
278
|
+
},
|
|
279
|
+
task_update_column_params.TaskUpdateColumnParams,
|
|
280
|
+
),
|
|
281
|
+
options=make_request_options(
|
|
282
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
283
|
+
),
|
|
284
|
+
cast_to=TaskUpdateColumnResponse,
|
|
285
|
+
)
|
|
286
|
+
|
|
238
287
|
def update_screen_time(
|
|
239
288
|
self,
|
|
240
289
|
task_id: str,
|
|
@@ -479,6 +528,54 @@ class AsyncTasksResource(AsyncAPIResource):
|
|
|
479
528
|
cast_to=TaskRetryResponse,
|
|
480
529
|
)
|
|
481
530
|
|
|
531
|
+
async def update_column(
|
|
532
|
+
self,
|
|
533
|
+
task_id: str,
|
|
534
|
+
*,
|
|
535
|
+
key: str,
|
|
536
|
+
value: Optional[str],
|
|
537
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
538
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
539
|
+
extra_headers: Headers | None = None,
|
|
540
|
+
extra_query: Query | None = None,
|
|
541
|
+
extra_body: Body | None = None,
|
|
542
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
543
|
+
) -> TaskUpdateColumnResponse:
|
|
544
|
+
"""Updates or inserts a column value for a task.
|
|
545
|
+
|
|
546
|
+
If the column key already exists,
|
|
547
|
+
its value will be updated. If it doesn't exist, a new column will be added.
|
|
548
|
+
|
|
549
|
+
Args:
|
|
550
|
+
key: The column key to update or insert.
|
|
551
|
+
|
|
552
|
+
value: The value to set for the column.
|
|
553
|
+
|
|
554
|
+
extra_headers: Send extra headers
|
|
555
|
+
|
|
556
|
+
extra_query: Add additional query parameters to the request
|
|
557
|
+
|
|
558
|
+
extra_body: Add additional JSON properties to the request
|
|
559
|
+
|
|
560
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
561
|
+
"""
|
|
562
|
+
if not task_id:
|
|
563
|
+
raise ValueError(f"Expected a non-empty value for `task_id` but received {task_id!r}")
|
|
564
|
+
return await self._post(
|
|
565
|
+
f"/api/v2/tasks/{task_id}/columns",
|
|
566
|
+
body=await async_maybe_transform(
|
|
567
|
+
{
|
|
568
|
+
"key": key,
|
|
569
|
+
"value": value,
|
|
570
|
+
},
|
|
571
|
+
task_update_column_params.TaskUpdateColumnParams,
|
|
572
|
+
),
|
|
573
|
+
options=make_request_options(
|
|
574
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
575
|
+
),
|
|
576
|
+
cast_to=TaskUpdateColumnResponse,
|
|
577
|
+
)
|
|
578
|
+
|
|
482
579
|
async def update_screen_time(
|
|
483
580
|
self,
|
|
484
581
|
task_id: str,
|
|
@@ -543,6 +640,9 @@ class TasksResourceWithRawResponse:
|
|
|
543
640
|
self.retry = to_raw_response_wrapper(
|
|
544
641
|
tasks.retry,
|
|
545
642
|
)
|
|
643
|
+
self.update_column = to_raw_response_wrapper(
|
|
644
|
+
tasks.update_column,
|
|
645
|
+
)
|
|
546
646
|
self.update_screen_time = to_raw_response_wrapper(
|
|
547
647
|
tasks.update_screen_time,
|
|
548
648
|
)
|
|
@@ -571,6 +671,9 @@ class AsyncTasksResourceWithRawResponse:
|
|
|
571
671
|
self.retry = async_to_raw_response_wrapper(
|
|
572
672
|
tasks.retry,
|
|
573
673
|
)
|
|
674
|
+
self.update_column = async_to_raw_response_wrapper(
|
|
675
|
+
tasks.update_column,
|
|
676
|
+
)
|
|
574
677
|
self.update_screen_time = async_to_raw_response_wrapper(
|
|
575
678
|
tasks.update_screen_time,
|
|
576
679
|
)
|
|
@@ -599,6 +702,9 @@ class TasksResourceWithStreamingResponse:
|
|
|
599
702
|
self.retry = to_streamed_response_wrapper(
|
|
600
703
|
tasks.retry,
|
|
601
704
|
)
|
|
705
|
+
self.update_column = to_streamed_response_wrapper(
|
|
706
|
+
tasks.update_column,
|
|
707
|
+
)
|
|
602
708
|
self.update_screen_time = to_streamed_response_wrapper(
|
|
603
709
|
tasks.update_screen_time,
|
|
604
710
|
)
|
|
@@ -627,6 +733,9 @@ class AsyncTasksResourceWithStreamingResponse:
|
|
|
627
733
|
self.retry = async_to_streamed_response_wrapper(
|
|
628
734
|
tasks.retry,
|
|
629
735
|
)
|
|
736
|
+
self.update_column = async_to_streamed_response_wrapper(
|
|
737
|
+
tasks.update_column,
|
|
738
|
+
)
|
|
630
739
|
self.update_screen_time = async_to_streamed_response_wrapper(
|
|
631
740
|
tasks.update_screen_time,
|
|
632
741
|
)
|
samplehc/types/v2/__init__.py
CHANGED
|
@@ -28,12 +28,14 @@ from .workflow_deploy_response import WorkflowDeployResponse as WorkflowDeployRe
|
|
|
28
28
|
from .async_result_sleep_params import AsyncResultSleepParams as AsyncResultSleepParams
|
|
29
29
|
from .document_combine_response import DocumentCombineResponse as DocumentCombineResponse
|
|
30
30
|
from .document_extract_response import DocumentExtractResponse as DocumentExtractResponse
|
|
31
|
+
from .task_update_column_params import TaskUpdateColumnParams as TaskUpdateColumnParams
|
|
31
32
|
from .document_classify_response import DocumentClassifyResponse as DocumentClassifyResponse
|
|
32
33
|
from .document_retrieve_response import DocumentRetrieveResponse as DocumentRetrieveResponse
|
|
33
34
|
from .policy_list_plans_response import PolicyListPlansResponse as PolicyListPlansResponse
|
|
34
35
|
from .async_result_sleep_response import AsyncResultSleepResponse as AsyncResultSleepResponse
|
|
35
36
|
from .browser_agent_invoke_params import BrowserAgentInvokeParams as BrowserAgentInvokeParams
|
|
36
37
|
from .database_execute_sql_params import DatabaseExecuteSqlParams as DatabaseExecuteSqlParams
|
|
38
|
+
from .task_update_column_response import TaskUpdateColumnResponse as TaskUpdateColumnResponse
|
|
37
39
|
from .document_generate_csv_params import DocumentGenerateCsvParams as DocumentGenerateCsvParams
|
|
38
40
|
from .policy_list_companies_params import PolicyListCompaniesParams as PolicyListCompaniesParams
|
|
39
41
|
from .browser_agent_invoke_response import BrowserAgentInvokeResponse as BrowserAgentInvokeResponse
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .run_list_events_params import RunListEventsParams as RunListEventsParams
|
|
6
|
+
from .run_list_events_response import RunListEventsResponse as RunListEventsResponse
|
|
@@ -0,0 +1,15 @@
|
|
|
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 TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["RunListEventsParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class RunListEventsParams(TypedDict, total=False):
|
|
11
|
+
cursor: str
|
|
12
|
+
"""Cursor from previous page"""
|
|
13
|
+
|
|
14
|
+
limit: float
|
|
15
|
+
"""Maximum number of events to return"""
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from pydantic import Field as FieldInfo
|
|
8
|
+
|
|
9
|
+
from ...._models import BaseModel
|
|
10
|
+
|
|
11
|
+
__all__ = ["RunListEventsResponse", "Event"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class Event(BaseModel):
|
|
15
|
+
created_at: datetime = FieldInfo(alias="createdAt")
|
|
16
|
+
|
|
17
|
+
type: Literal["log", "help-request"]
|
|
18
|
+
|
|
19
|
+
data: Optional[object] = None
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class RunListEventsResponse(BaseModel):
|
|
23
|
+
events: List[Event]
|
|
24
|
+
"""Events for the browser agent run"""
|
|
25
|
+
|
|
26
|
+
has_more: bool = FieldInfo(alias="hasMore")
|
|
27
|
+
"""Whether more events are available"""
|
|
28
|
+
|
|
29
|
+
next_cursor: Optional[str] = FieldInfo(alias="nextCursor", default=None)
|
|
30
|
+
"""Cursor to fetch the next page"""
|
|
@@ -10,6 +10,7 @@ from .careviso_get_payers_response import CarevisoGetPayersResponse as CarevisoG
|
|
|
10
10
|
from .glidian_list_payers_response import GlidianListPayersResponse as GlidianListPayersResponse
|
|
11
11
|
from .glidian_list_services_params import GlidianListServicesParams as GlidianListServicesParams
|
|
12
12
|
from .glidian_list_services_response import GlidianListServicesResponse as GlidianListServicesResponse
|
|
13
|
+
from .salesforce_run_soql_query_params import SalesforceRunSoqlQueryParams as SalesforceRunSoqlQueryParams
|
|
13
14
|
from .salesforce_run_crud_action_params import SalesforceRunCrudActionParams as SalesforceRunCrudActionParams
|
|
14
15
|
from .careviso_submit_prior_authorization_params import (
|
|
15
16
|
CarevisoSubmitPriorAuthorizationParams as CarevisoSubmitPriorAuthorizationParams,
|
|
@@ -0,0 +1,11 @@
|
|
|
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, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["SalesforceRunSoqlQueryParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class SalesforceRunSoqlQueryParams(TypedDict, total=False):
|
|
11
|
+
query: Required[str]
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .patient_add_params import PatientAddParams as PatientAddParams
|
|
6
|
+
from .patient_search_params import PatientSearchParams as PatientSearchParams
|