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 CHANGED
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "samplehc"
4
- __version__ = "0.12.0" # x-release-please-version
4
+ __version__ = "0.14.0" # x-release-please-version
@@ -2,8 +2,18 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ import httpx
6
+
7
+ from ....._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
8
+ from ....._utils import maybe_transform, async_maybe_transform
5
9
  from ....._compat import cached_property
6
10
  from ....._resource import SyncAPIResource, AsyncAPIResource
11
+ from ....._response import (
12
+ to_raw_response_wrapper,
13
+ to_streamed_response_wrapper,
14
+ async_to_raw_response_wrapper,
15
+ async_to_streamed_response_wrapper,
16
+ )
7
17
  from .help_requests import (
8
18
  HelpRequestsResource,
9
19
  AsyncHelpRequestsResource,
@@ -12,6 +22,9 @@ from .help_requests import (
12
22
  HelpRequestsResourceWithStreamingResponse,
13
23
  AsyncHelpRequestsResourceWithStreamingResponse,
14
24
  )
25
+ from ....._base_client import make_request_options
26
+ from .....types.v2.browser_agents import run_list_events_params
27
+ from .....types.v2.browser_agents.run_list_events_response import RunListEventsResponse
15
28
 
16
29
  __all__ = ["RunsResource", "AsyncRunsResource"]
17
30
 
@@ -40,6 +53,57 @@ class RunsResource(SyncAPIResource):
40
53
  """
41
54
  return RunsResourceWithStreamingResponse(self)
42
55
 
56
+ def list_events(
57
+ self,
58
+ browser_agent_run_id: str,
59
+ *,
60
+ cursor: str | Omit = omit,
61
+ limit: float | Omit = omit,
62
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
63
+ # The extra values given here take precedence over values defined on the client or passed to this method.
64
+ extra_headers: Headers | None = None,
65
+ extra_query: Query | None = None,
66
+ extra_body: Body | None = None,
67
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
68
+ ) -> RunListEventsResponse:
69
+ """
70
+ Get events for a browser agent run.
71
+
72
+ Args:
73
+ cursor: Cursor from previous page
74
+
75
+ limit: Maximum number of events to return
76
+
77
+ extra_headers: Send extra headers
78
+
79
+ extra_query: Add additional query parameters to the request
80
+
81
+ extra_body: Add additional JSON properties to the request
82
+
83
+ timeout: Override the client-level default timeout for this request, in seconds
84
+ """
85
+ if not browser_agent_run_id:
86
+ raise ValueError(
87
+ f"Expected a non-empty value for `browser_agent_run_id` but received {browser_agent_run_id!r}"
88
+ )
89
+ return self._get(
90
+ f"/api/v2/browser-agents/runs/{browser_agent_run_id}/events",
91
+ options=make_request_options(
92
+ extra_headers=extra_headers,
93
+ extra_query=extra_query,
94
+ extra_body=extra_body,
95
+ timeout=timeout,
96
+ query=maybe_transform(
97
+ {
98
+ "cursor": cursor,
99
+ "limit": limit,
100
+ },
101
+ run_list_events_params.RunListEventsParams,
102
+ ),
103
+ ),
104
+ cast_to=RunListEventsResponse,
105
+ )
106
+
43
107
 
44
108
  class AsyncRunsResource(AsyncAPIResource):
45
109
  @cached_property
@@ -65,11 +129,66 @@ class AsyncRunsResource(AsyncAPIResource):
65
129
  """
66
130
  return AsyncRunsResourceWithStreamingResponse(self)
67
131
 
132
+ async def list_events(
133
+ self,
134
+ browser_agent_run_id: str,
135
+ *,
136
+ cursor: str | Omit = omit,
137
+ limit: float | Omit = omit,
138
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
139
+ # The extra values given here take precedence over values defined on the client or passed to this method.
140
+ extra_headers: Headers | None = None,
141
+ extra_query: Query | None = None,
142
+ extra_body: Body | None = None,
143
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
144
+ ) -> RunListEventsResponse:
145
+ """
146
+ Get events for a browser agent run.
147
+
148
+ Args:
149
+ cursor: Cursor from previous page
150
+
151
+ limit: Maximum number of events to return
152
+
153
+ extra_headers: Send extra headers
154
+
155
+ extra_query: Add additional query parameters to the request
156
+
157
+ extra_body: Add additional JSON properties to the request
158
+
159
+ timeout: Override the client-level default timeout for this request, in seconds
160
+ """
161
+ if not browser_agent_run_id:
162
+ raise ValueError(
163
+ f"Expected a non-empty value for `browser_agent_run_id` but received {browser_agent_run_id!r}"
164
+ )
165
+ return await self._get(
166
+ f"/api/v2/browser-agents/runs/{browser_agent_run_id}/events",
167
+ options=make_request_options(
168
+ extra_headers=extra_headers,
169
+ extra_query=extra_query,
170
+ extra_body=extra_body,
171
+ timeout=timeout,
172
+ query=await async_maybe_transform(
173
+ {
174
+ "cursor": cursor,
175
+ "limit": limit,
176
+ },
177
+ run_list_events_params.RunListEventsParams,
178
+ ),
179
+ ),
180
+ cast_to=RunListEventsResponse,
181
+ )
182
+
68
183
 
69
184
  class RunsResourceWithRawResponse:
70
185
  def __init__(self, runs: RunsResource) -> None:
71
186
  self._runs = runs
72
187
 
188
+ self.list_events = to_raw_response_wrapper(
189
+ runs.list_events,
190
+ )
191
+
73
192
  @cached_property
74
193
  def help_requests(self) -> HelpRequestsResourceWithRawResponse:
75
194
  return HelpRequestsResourceWithRawResponse(self._runs.help_requests)
@@ -79,6 +198,10 @@ class AsyncRunsResourceWithRawResponse:
79
198
  def __init__(self, runs: AsyncRunsResource) -> None:
80
199
  self._runs = runs
81
200
 
201
+ self.list_events = async_to_raw_response_wrapper(
202
+ runs.list_events,
203
+ )
204
+
82
205
  @cached_property
83
206
  def help_requests(self) -> AsyncHelpRequestsResourceWithRawResponse:
84
207
  return AsyncHelpRequestsResourceWithRawResponse(self._runs.help_requests)
@@ -88,6 +211,10 @@ class RunsResourceWithStreamingResponse:
88
211
  def __init__(self, runs: RunsResource) -> None:
89
212
  self._runs = runs
90
213
 
214
+ self.list_events = to_streamed_response_wrapper(
215
+ runs.list_events,
216
+ )
217
+
91
218
  @cached_property
92
219
  def help_requests(self) -> HelpRequestsResourceWithStreamingResponse:
93
220
  return HelpRequestsResourceWithStreamingResponse(self._runs.help_requests)
@@ -97,6 +224,10 @@ class AsyncRunsResourceWithStreamingResponse:
97
224
  def __init__(self, runs: AsyncRunsResource) -> None:
98
225
  self._runs = runs
99
226
 
227
+ self.list_events = async_to_streamed_response_wrapper(
228
+ runs.list_events,
229
+ )
230
+
100
231
  @cached_property
101
232
  def help_requests(self) -> AsyncHelpRequestsResourceWithStreamingResponse:
102
233
  return AsyncHelpRequestsResourceWithStreamingResponse(self._runs.help_requests)
@@ -32,6 +32,14 @@ from .glidian import (
32
32
  GlidianResourceWithStreamingResponse,
33
33
  AsyncGlidianResourceWithStreamingResponse,
34
34
  )
35
+ from .wellsky import (
36
+ WellskyResource,
37
+ AsyncWellskyResource,
38
+ WellskyResourceWithRawResponse,
39
+ AsyncWellskyResourceWithRawResponse,
40
+ WellskyResourceWithStreamingResponse,
41
+ AsyncWellskyResourceWithStreamingResponse,
42
+ )
35
43
  from .careviso import (
36
44
  CarevisoResource,
37
45
  AsyncCarevisoResource,
@@ -72,6 +80,12 @@ __all__ = [
72
80
  "AsyncSnowflakeResourceWithRawResponse",
73
81
  "SnowflakeResourceWithStreamingResponse",
74
82
  "AsyncSnowflakeResourceWithStreamingResponse",
83
+ "WellskyResource",
84
+ "AsyncWellskyResource",
85
+ "WellskyResourceWithRawResponse",
86
+ "AsyncWellskyResourceWithRawResponse",
87
+ "WellskyResourceWithStreamingResponse",
88
+ "AsyncWellskyResourceWithStreamingResponse",
75
89
  "BankResource",
76
90
  "AsyncBankResource",
77
91
  "BankResourceWithRawResponse",
@@ -60,6 +60,14 @@ from .glidian.glidian import (
60
60
  GlidianResourceWithStreamingResponse,
61
61
  AsyncGlidianResourceWithStreamingResponse,
62
62
  )
63
+ from .wellsky.wellsky import (
64
+ WellskyResource,
65
+ AsyncWellskyResource,
66
+ WellskyResourceWithRawResponse,
67
+ AsyncWellskyResourceWithRawResponse,
68
+ WellskyResourceWithStreamingResponse,
69
+ AsyncWellskyResourceWithStreamingResponse,
70
+ )
63
71
 
64
72
  __all__ = ["IntegrationsResource", "AsyncIntegrationsResource"]
65
73
 
@@ -69,6 +77,10 @@ class IntegrationsResource(SyncAPIResource):
69
77
  def snowflake(self) -> SnowflakeResource:
70
78
  return SnowflakeResource(self._client)
71
79
 
80
+ @cached_property
81
+ def wellsky(self) -> WellskyResource:
82
+ return WellskyResource(self._client)
83
+
72
84
  @cached_property
73
85
  def bank(self) -> BankResource:
74
86
  return BankResource(self._client)
@@ -118,6 +130,10 @@ class AsyncIntegrationsResource(AsyncAPIResource):
118
130
  def snowflake(self) -> AsyncSnowflakeResource:
119
131
  return AsyncSnowflakeResource(self._client)
120
132
 
133
+ @cached_property
134
+ def wellsky(self) -> AsyncWellskyResource:
135
+ return AsyncWellskyResource(self._client)
136
+
121
137
  @cached_property
122
138
  def bank(self) -> AsyncBankResource:
123
139
  return AsyncBankResource(self._client)
@@ -170,6 +186,10 @@ class IntegrationsResourceWithRawResponse:
170
186
  def snowflake(self) -> SnowflakeResourceWithRawResponse:
171
187
  return SnowflakeResourceWithRawResponse(self._integrations.snowflake)
172
188
 
189
+ @cached_property
190
+ def wellsky(self) -> WellskyResourceWithRawResponse:
191
+ return WellskyResourceWithRawResponse(self._integrations.wellsky)
192
+
173
193
  @cached_property
174
194
  def bank(self) -> BankResourceWithRawResponse:
175
195
  return BankResourceWithRawResponse(self._integrations.bank)
@@ -203,6 +223,10 @@ class AsyncIntegrationsResourceWithRawResponse:
203
223
  def snowflake(self) -> AsyncSnowflakeResourceWithRawResponse:
204
224
  return AsyncSnowflakeResourceWithRawResponse(self._integrations.snowflake)
205
225
 
226
+ @cached_property
227
+ def wellsky(self) -> AsyncWellskyResourceWithRawResponse:
228
+ return AsyncWellskyResourceWithRawResponse(self._integrations.wellsky)
229
+
206
230
  @cached_property
207
231
  def bank(self) -> AsyncBankResourceWithRawResponse:
208
232
  return AsyncBankResourceWithRawResponse(self._integrations.bank)
@@ -236,6 +260,10 @@ class IntegrationsResourceWithStreamingResponse:
236
260
  def snowflake(self) -> SnowflakeResourceWithStreamingResponse:
237
261
  return SnowflakeResourceWithStreamingResponse(self._integrations.snowflake)
238
262
 
263
+ @cached_property
264
+ def wellsky(self) -> WellskyResourceWithStreamingResponse:
265
+ return WellskyResourceWithStreamingResponse(self._integrations.wellsky)
266
+
239
267
  @cached_property
240
268
  def bank(self) -> BankResourceWithStreamingResponse:
241
269
  return BankResourceWithStreamingResponse(self._integrations.bank)
@@ -269,6 +297,10 @@ class AsyncIntegrationsResourceWithStreamingResponse:
269
297
  def snowflake(self) -> AsyncSnowflakeResourceWithStreamingResponse:
270
298
  return AsyncSnowflakeResourceWithStreamingResponse(self._integrations.snowflake)
271
299
 
300
+ @cached_property
301
+ def wellsky(self) -> AsyncWellskyResourceWithStreamingResponse:
302
+ return AsyncWellskyResourceWithStreamingResponse(self._integrations.wellsky)
303
+
272
304
  @cached_property
273
305
  def bank(self) -> AsyncBankResourceWithStreamingResponse:
274
306
  return AsyncBankResourceWithStreamingResponse(self._integrations.bank)
@@ -18,7 +18,7 @@ from ...._response import (
18
18
  async_to_streamed_response_wrapper,
19
19
  )
20
20
  from ...._base_client import make_request_options
21
- from ....types.v2.integrations import salesforce_run_crud_action_params
21
+ from ....types.v2.integrations import salesforce_run_soql_query_params, salesforce_run_crud_action_params
22
22
 
23
23
  __all__ = ["SalesforceResource", "AsyncSalesforceResource"]
24
24
 
@@ -89,6 +89,41 @@ class SalesforceResource(SyncAPIResource):
89
89
  cast_to=object,
90
90
  )
91
91
 
92
+ def run_soql_query(
93
+ self,
94
+ slug: str,
95
+ *,
96
+ query: str,
97
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
98
+ # The extra values given here take precedence over values defined on the client or passed to this method.
99
+ extra_headers: Headers | None = None,
100
+ extra_query: Query | None = None,
101
+ extra_body: Body | None = None,
102
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
103
+ ) -> object:
104
+ """
105
+ Resolve connection by slug and run a SOQL query on Salesforce.
106
+
107
+ Args:
108
+ extra_headers: Send extra headers
109
+
110
+ extra_query: Add additional query parameters to the request
111
+
112
+ extra_body: Add additional JSON properties to the request
113
+
114
+ timeout: Override the client-level default timeout for this request, in seconds
115
+ """
116
+ if not slug:
117
+ raise ValueError(f"Expected a non-empty value for `slug` but received {slug!r}")
118
+ return self._post(
119
+ f"/api/v2/integrations/salesforce/{slug}/soql-query",
120
+ body=maybe_transform({"query": query}, salesforce_run_soql_query_params.SalesforceRunSoqlQueryParams),
121
+ options=make_request_options(
122
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
123
+ ),
124
+ cast_to=object,
125
+ )
126
+
92
127
 
93
128
  class AsyncSalesforceResource(AsyncAPIResource):
94
129
  @cached_property
@@ -156,6 +191,43 @@ class AsyncSalesforceResource(AsyncAPIResource):
156
191
  cast_to=object,
157
192
  )
158
193
 
194
+ async def run_soql_query(
195
+ self,
196
+ slug: str,
197
+ *,
198
+ query: str,
199
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
200
+ # The extra values given here take precedence over values defined on the client or passed to this method.
201
+ extra_headers: Headers | None = None,
202
+ extra_query: Query | None = None,
203
+ extra_body: Body | None = None,
204
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
205
+ ) -> object:
206
+ """
207
+ Resolve connection by slug and run a SOQL query on Salesforce.
208
+
209
+ Args:
210
+ extra_headers: Send extra headers
211
+
212
+ extra_query: Add additional query parameters to the request
213
+
214
+ extra_body: Add additional JSON properties to the request
215
+
216
+ timeout: Override the client-level default timeout for this request, in seconds
217
+ """
218
+ if not slug:
219
+ raise ValueError(f"Expected a non-empty value for `slug` but received {slug!r}")
220
+ return await self._post(
221
+ f"/api/v2/integrations/salesforce/{slug}/soql-query",
222
+ body=await async_maybe_transform(
223
+ {"query": query}, salesforce_run_soql_query_params.SalesforceRunSoqlQueryParams
224
+ ),
225
+ options=make_request_options(
226
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
227
+ ),
228
+ cast_to=object,
229
+ )
230
+
159
231
 
160
232
  class SalesforceResourceWithRawResponse:
161
233
  def __init__(self, salesforce: SalesforceResource) -> None:
@@ -164,6 +236,9 @@ class SalesforceResourceWithRawResponse:
164
236
  self.run_crud_action = to_raw_response_wrapper(
165
237
  salesforce.run_crud_action,
166
238
  )
239
+ self.run_soql_query = to_raw_response_wrapper(
240
+ salesforce.run_soql_query,
241
+ )
167
242
 
168
243
 
169
244
  class AsyncSalesforceResourceWithRawResponse:
@@ -173,6 +248,9 @@ class AsyncSalesforceResourceWithRawResponse:
173
248
  self.run_crud_action = async_to_raw_response_wrapper(
174
249
  salesforce.run_crud_action,
175
250
  )
251
+ self.run_soql_query = async_to_raw_response_wrapper(
252
+ salesforce.run_soql_query,
253
+ )
176
254
 
177
255
 
178
256
  class SalesforceResourceWithStreamingResponse:
@@ -182,6 +260,9 @@ class SalesforceResourceWithStreamingResponse:
182
260
  self.run_crud_action = to_streamed_response_wrapper(
183
261
  salesforce.run_crud_action,
184
262
  )
263
+ self.run_soql_query = to_streamed_response_wrapper(
264
+ salesforce.run_soql_query,
265
+ )
185
266
 
186
267
 
187
268
  class AsyncSalesforceResourceWithStreamingResponse:
@@ -191,3 +272,6 @@ class AsyncSalesforceResourceWithStreamingResponse:
191
272
  self.run_crud_action = async_to_streamed_response_wrapper(
192
273
  salesforce.run_crud_action,
193
274
  )
275
+ self.run_soql_query = async_to_streamed_response_wrapper(
276
+ salesforce.run_soql_query,
277
+ )
@@ -0,0 +1,33 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from .wellsky import (
4
+ WellskyResource,
5
+ AsyncWellskyResource,
6
+ WellskyResourceWithRawResponse,
7
+ AsyncWellskyResourceWithRawResponse,
8
+ WellskyResourceWithStreamingResponse,
9
+ AsyncWellskyResourceWithStreamingResponse,
10
+ )
11
+ from .patients import (
12
+ PatientsResource,
13
+ AsyncPatientsResource,
14
+ PatientsResourceWithRawResponse,
15
+ AsyncPatientsResourceWithRawResponse,
16
+ PatientsResourceWithStreamingResponse,
17
+ AsyncPatientsResourceWithStreamingResponse,
18
+ )
19
+
20
+ __all__ = [
21
+ "PatientsResource",
22
+ "AsyncPatientsResource",
23
+ "PatientsResourceWithRawResponse",
24
+ "AsyncPatientsResourceWithRawResponse",
25
+ "PatientsResourceWithStreamingResponse",
26
+ "AsyncPatientsResourceWithStreamingResponse",
27
+ "WellskyResource",
28
+ "AsyncWellskyResource",
29
+ "WellskyResourceWithRawResponse",
30
+ "AsyncWellskyResourceWithRawResponse",
31
+ "WellskyResourceWithStreamingResponse",
32
+ "AsyncWellskyResourceWithStreamingResponse",
33
+ ]