samplehc 0.5.0__py3-none-any.whl → 0.7.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.
Files changed (55) hide show
  1. samplehc/_version.py +1 -1
  2. samplehc/resources/v2/__init__.py +14 -0
  3. samplehc/resources/v2/browser_agents.py +177 -0
  4. samplehc/resources/v2/clearinghouse/claim.py +20 -36
  5. samplehc/resources/v2/communication.py +8 -0
  6. samplehc/resources/v2/database.py +19 -9
  7. samplehc/resources/v2/events/__init__.py +33 -0
  8. samplehc/resources/v2/{events.py → events/events.py} +42 -10
  9. samplehc/resources/v2/events/hie/__init__.py +33 -0
  10. samplehc/resources/v2/events/hie/adt.py +249 -0
  11. samplehc/resources/v2/events/hie/hie.py +102 -0
  12. samplehc/resources/v2/integrations/__init__.py +14 -0
  13. samplehc/resources/v2/integrations/glidian/__init__.py +33 -0
  14. samplehc/resources/v2/integrations/glidian/glidian.py +425 -0
  15. samplehc/resources/v2/integrations/glidian/prior_authorizations/__init__.py +33 -0
  16. samplehc/resources/v2/integrations/glidian/prior_authorizations/clinical_questions.py +276 -0
  17. samplehc/resources/v2/integrations/glidian/prior_authorizations/prior_authorizations.py +527 -0
  18. samplehc/resources/v2/integrations/integrations.py +32 -0
  19. samplehc/resources/v2/ledger/ledger.py +152 -0
  20. samplehc/resources/v2/v2.py +40 -8
  21. samplehc/types/v2/__init__.py +8 -0
  22. samplehc/types/v2/browser_agent_invoke_params.py +13 -0
  23. samplehc/types/v2/browser_agent_invoke_response.py +12 -0
  24. samplehc/types/v2/clearinghouse/claim_submit_params.py +1214 -884
  25. samplehc/types/v2/clearinghouse/claim_submit_response.py +10 -1
  26. samplehc/types/v2/communication_send_email_params.py +3 -0
  27. samplehc/types/v2/database_execute_sql_params.py +5 -3
  28. samplehc/types/v2/event_emit_params.py +1 -1
  29. samplehc/types/v2/events/__init__.py +3 -0
  30. samplehc/types/v2/events/hie/__init__.py +5 -0
  31. samplehc/types/v2/events/hie/adt_subscribe_params.py +92 -0
  32. samplehc/types/v2/integrations/__init__.py +10 -0
  33. samplehc/types/v2/integrations/glidian/__init__.py +20 -0
  34. samplehc/types/v2/integrations/glidian/prior_authorization_create_draft_params.py +32 -0
  35. samplehc/types/v2/integrations/glidian/prior_authorization_create_draft_response.py +22 -0
  36. samplehc/types/v2/integrations/glidian/prior_authorization_retrieve_record_response.py +11 -0
  37. samplehc/types/v2/integrations/glidian/prior_authorization_submit_response.py +14 -0
  38. samplehc/types/v2/integrations/glidian/prior_authorization_update_record_params.py +20 -0
  39. samplehc/types/v2/integrations/glidian/prior_authorization_update_record_response.py +14 -0
  40. samplehc/types/v2/integrations/glidian/prior_authorizations/__init__.py +7 -0
  41. samplehc/types/v2/integrations/glidian/prior_authorizations/clinical_question_list_response.py +40 -0
  42. samplehc/types/v2/integrations/glidian/prior_authorizations/clinical_question_update_params.py +22 -0
  43. samplehc/types/v2/integrations/glidian/prior_authorizations/clinical_question_update_response.py +17 -0
  44. samplehc/types/v2/integrations/glidian_get_submission_requirements_params.py +17 -0
  45. samplehc/types/v2/integrations/glidian_get_submission_requirements_response.py +31 -0
  46. samplehc/types/v2/integrations/glidian_list_payers_params.py +11 -0
  47. samplehc/types/v2/integrations/glidian_list_payers_response.py +17 -0
  48. samplehc/types/v2/integrations/glidian_list_services_params.py +13 -0
  49. samplehc/types/v2/integrations/glidian_list_services_response.py +19 -0
  50. samplehc/types/v2/ledger_post_remittance_accepted_params.py +37 -0
  51. samplehc/types/v2/ledger_post_remittance_accepted_response.py +12 -0
  52. {samplehc-0.5.0.dist-info → samplehc-0.7.0.dist-info}/METADATA +1 -1
  53. {samplehc-0.5.0.dist-info → samplehc-0.7.0.dist-info}/RECORD +55 -21
  54. {samplehc-0.5.0.dist-info → samplehc-0.7.0.dist-info}/WHEEL +0 -0
  55. {samplehc-0.5.0.dist-info → samplehc-0.7.0.dist-info}/licenses/LICENSE +0 -0
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.5.0" # x-release-please-version
4
+ __version__ = "0.7.0" # x-release-please-version
@@ -112,6 +112,14 @@ from .workflow_runs import (
112
112
  WorkflowRunsResourceWithStreamingResponse,
113
113
  AsyncWorkflowRunsResourceWithStreamingResponse,
114
114
  )
115
+ from .browser_agents import (
116
+ BrowserAgentsResource,
117
+ AsyncBrowserAgentsResource,
118
+ BrowserAgentsResourceWithRawResponse,
119
+ AsyncBrowserAgentsResourceWithRawResponse,
120
+ BrowserAgentsResourceWithStreamingResponse,
121
+ AsyncBrowserAgentsResourceWithStreamingResponse,
122
+ )
115
123
  from .browser_automation import (
116
124
  BrowserAutomationResource,
117
125
  AsyncBrowserAutomationResource,
@@ -182,6 +190,12 @@ __all__ = [
182
190
  "AsyncEventsResourceWithRawResponse",
183
191
  "EventsResourceWithStreamingResponse",
184
192
  "AsyncEventsResourceWithStreamingResponse",
193
+ "BrowserAgentsResource",
194
+ "AsyncBrowserAgentsResource",
195
+ "BrowserAgentsResourceWithRawResponse",
196
+ "AsyncBrowserAgentsResourceWithRawResponse",
197
+ "BrowserAgentsResourceWithStreamingResponse",
198
+ "AsyncBrowserAgentsResourceWithStreamingResponse",
185
199
  "PoliciesResource",
186
200
  "AsyncPoliciesResource",
187
201
  "PoliciesResourceWithRawResponse",
@@ -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
+ from typing import Dict
6
+
7
+ import httpx
8
+
9
+ from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
10
+ from ..._utils import maybe_transform, async_maybe_transform
11
+ from ..._compat import cached_property
12
+ from ...types.v2 import browser_agent_invoke_params
13
+ from ..._resource import SyncAPIResource, AsyncAPIResource
14
+ from ..._response import (
15
+ to_raw_response_wrapper,
16
+ to_streamed_response_wrapper,
17
+ async_to_raw_response_wrapper,
18
+ async_to_streamed_response_wrapper,
19
+ )
20
+ from ..._base_client import make_request_options
21
+ from ...types.v2.browser_agent_invoke_response import BrowserAgentInvokeResponse
22
+
23
+ __all__ = ["BrowserAgentsResource", "AsyncBrowserAgentsResource"]
24
+
25
+
26
+ class BrowserAgentsResource(SyncAPIResource):
27
+ @cached_property
28
+ def with_raw_response(self) -> BrowserAgentsResourceWithRawResponse:
29
+ """
30
+ This property can be used as a prefix for any HTTP method call to return
31
+ the raw response object instead of the parsed content.
32
+
33
+ For more information, see https://www.github.com/samplehc/samplehc-python#accessing-raw-response-data-eg-headers
34
+ """
35
+ return BrowserAgentsResourceWithRawResponse(self)
36
+
37
+ @cached_property
38
+ def with_streaming_response(self) -> BrowserAgentsResourceWithStreamingResponse:
39
+ """
40
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
41
+
42
+ For more information, see https://www.github.com/samplehc/samplehc-python#with_streaming_response
43
+ """
44
+ return BrowserAgentsResourceWithStreamingResponse(self)
45
+
46
+ def invoke(
47
+ self,
48
+ slug: str,
49
+ *,
50
+ variables: Dict[str, object] | NotGiven = NOT_GIVEN,
51
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
52
+ # The extra values given here take precedence over values defined on the client or passed to this method.
53
+ extra_headers: Headers | None = None,
54
+ extra_query: Query | None = None,
55
+ extra_body: Body | None = None,
56
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
57
+ ) -> BrowserAgentInvokeResponse:
58
+ """
59
+ Start execution of a browser agent with optional variables.
60
+
61
+ Args:
62
+ variables: Variables to pass to the browser agent
63
+
64
+ extra_headers: Send extra headers
65
+
66
+ extra_query: Add additional query parameters to the request
67
+
68
+ extra_body: Add additional JSON properties to the request
69
+
70
+ timeout: Override the client-level default timeout for this request, in seconds
71
+ """
72
+ if not slug:
73
+ raise ValueError(f"Expected a non-empty value for `slug` but received {slug!r}")
74
+ return self._post(
75
+ f"/api/v2/browser-agents/{slug}/invoke",
76
+ body=maybe_transform({"variables": variables}, browser_agent_invoke_params.BrowserAgentInvokeParams),
77
+ options=make_request_options(
78
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
79
+ ),
80
+ cast_to=BrowserAgentInvokeResponse,
81
+ )
82
+
83
+
84
+ class AsyncBrowserAgentsResource(AsyncAPIResource):
85
+ @cached_property
86
+ def with_raw_response(self) -> AsyncBrowserAgentsResourceWithRawResponse:
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 AsyncBrowserAgentsResourceWithRawResponse(self)
94
+
95
+ @cached_property
96
+ def with_streaming_response(self) -> AsyncBrowserAgentsResourceWithStreamingResponse:
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 AsyncBrowserAgentsResourceWithStreamingResponse(self)
103
+
104
+ async def invoke(
105
+ self,
106
+ slug: str,
107
+ *,
108
+ variables: Dict[str, object] | NotGiven = NOT_GIVEN,
109
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
110
+ # The extra values given here take precedence over values defined on the client or passed to this method.
111
+ extra_headers: Headers | None = None,
112
+ extra_query: Query | None = None,
113
+ extra_body: Body | None = None,
114
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
115
+ ) -> BrowserAgentInvokeResponse:
116
+ """
117
+ Start execution of a browser agent with optional variables.
118
+
119
+ Args:
120
+ variables: Variables to pass to the browser agent
121
+
122
+ extra_headers: Send extra headers
123
+
124
+ extra_query: Add additional query parameters to the request
125
+
126
+ extra_body: Add additional JSON properties to the request
127
+
128
+ timeout: Override the client-level default timeout for this request, in seconds
129
+ """
130
+ if not slug:
131
+ raise ValueError(f"Expected a non-empty value for `slug` but received {slug!r}")
132
+ return await self._post(
133
+ f"/api/v2/browser-agents/{slug}/invoke",
134
+ body=await async_maybe_transform(
135
+ {"variables": variables}, browser_agent_invoke_params.BrowserAgentInvokeParams
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=BrowserAgentInvokeResponse,
141
+ )
142
+
143
+
144
+ class BrowserAgentsResourceWithRawResponse:
145
+ def __init__(self, browser_agents: BrowserAgentsResource) -> None:
146
+ self._browser_agents = browser_agents
147
+
148
+ self.invoke = to_raw_response_wrapper(
149
+ browser_agents.invoke,
150
+ )
151
+
152
+
153
+ class AsyncBrowserAgentsResourceWithRawResponse:
154
+ def __init__(self, browser_agents: AsyncBrowserAgentsResource) -> None:
155
+ self._browser_agents = browser_agents
156
+
157
+ self.invoke = async_to_raw_response_wrapper(
158
+ browser_agents.invoke,
159
+ )
160
+
161
+
162
+ class BrowserAgentsResourceWithStreamingResponse:
163
+ def __init__(self, browser_agents: BrowserAgentsResource) -> None:
164
+ self._browser_agents = browser_agents
165
+
166
+ self.invoke = to_streamed_response_wrapper(
167
+ browser_agents.invoke,
168
+ )
169
+
170
+
171
+ class AsyncBrowserAgentsResourceWithStreamingResponse:
172
+ def __init__(self, browser_agents: AsyncBrowserAgentsResource) -> None:
173
+ self._browser_agents = browser_agents
174
+
175
+ self.invoke = async_to_streamed_response_wrapper(
176
+ browser_agents.invoke,
177
+ )
@@ -113,27 +113,23 @@ class ClaimResource(SyncAPIResource):
113
113
  def submit(
114
114
  self,
115
115
  *,
116
+ billing: claim_submit_params.Billing,
116
117
  claim_information: claim_submit_params.ClaimInformation,
117
- idempotency_key: str,
118
118
  is_testing: bool,
119
119
  receiver: claim_submit_params.Receiver,
120
120
  submitter: claim_submit_params.Submitter,
121
121
  subscriber: claim_submit_params.Subscriber,
122
122
  trading_partner_service_id: str,
123
- attending: claim_submit_params.Attending | NotGiven = NOT_GIVEN,
124
- billing: claim_submit_params.Billing | NotGiven = NOT_GIVEN,
125
- billing_pay_to_address_name: claim_submit_params.BillingPayToAddressName | NotGiven = NOT_GIVEN,
126
- billing_pay_to_plan_name: claim_submit_params.BillingPayToPlanName | NotGiven = NOT_GIVEN,
127
123
  control_number: str | NotGiven = NOT_GIVEN,
128
- correlation_id: str | NotGiven = NOT_GIVEN,
129
124
  dependent: claim_submit_params.Dependent | NotGiven = NOT_GIVEN,
130
- event_mapping: claim_submit_params.EventMapping | NotGiven = NOT_GIVEN,
131
- operating_physician: claim_submit_params.OperatingPhysician | NotGiven = NOT_GIVEN,
132
- other_operating_physician: claim_submit_params.OtherOperatingPhysician | NotGiven = NOT_GIVEN,
125
+ ordering: claim_submit_params.Ordering | NotGiven = NOT_GIVEN,
133
126
  payer_address: claim_submit_params.PayerAddress | NotGiven = NOT_GIVEN,
127
+ pay_to_address: claim_submit_params.PayToAddress | NotGiven = NOT_GIVEN,
128
+ pay_to_plan: claim_submit_params.PayToPlan | NotGiven = NOT_GIVEN,
134
129
  providers: Iterable[claim_submit_params.Provider] | NotGiven = NOT_GIVEN,
135
130
  referring: claim_submit_params.Referring | NotGiven = NOT_GIVEN,
136
131
  rendering: claim_submit_params.Rendering | NotGiven = NOT_GIVEN,
132
+ supervising: claim_submit_params.Supervising | NotGiven = NOT_GIVEN,
137
133
  trading_partner_name: str | NotGiven = NOT_GIVEN,
138
134
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
139
135
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -161,27 +157,23 @@ class ClaimResource(SyncAPIResource):
161
157
  "/api/v2/clearinghouse/claim",
162
158
  body=maybe_transform(
163
159
  {
160
+ "billing": billing,
164
161
  "claim_information": claim_information,
165
- "idempotency_key": idempotency_key,
166
162
  "is_testing": is_testing,
167
163
  "receiver": receiver,
168
164
  "submitter": submitter,
169
165
  "subscriber": subscriber,
170
166
  "trading_partner_service_id": trading_partner_service_id,
171
- "attending": attending,
172
- "billing": billing,
173
- "billing_pay_to_address_name": billing_pay_to_address_name,
174
- "billing_pay_to_plan_name": billing_pay_to_plan_name,
175
167
  "control_number": control_number,
176
- "correlation_id": correlation_id,
177
168
  "dependent": dependent,
178
- "event_mapping": event_mapping,
179
- "operating_physician": operating_physician,
180
- "other_operating_physician": other_operating_physician,
169
+ "ordering": ordering,
181
170
  "payer_address": payer_address,
171
+ "pay_to_address": pay_to_address,
172
+ "pay_to_plan": pay_to_plan,
182
173
  "providers": providers,
183
174
  "referring": referring,
184
175
  "rendering": rendering,
176
+ "supervising": supervising,
185
177
  "trading_partner_name": trading_partner_name,
186
178
  },
187
179
  claim_submit_params.ClaimSubmitParams,
@@ -283,27 +275,23 @@ class AsyncClaimResource(AsyncAPIResource):
283
275
  async def submit(
284
276
  self,
285
277
  *,
278
+ billing: claim_submit_params.Billing,
286
279
  claim_information: claim_submit_params.ClaimInformation,
287
- idempotency_key: str,
288
280
  is_testing: bool,
289
281
  receiver: claim_submit_params.Receiver,
290
282
  submitter: claim_submit_params.Submitter,
291
283
  subscriber: claim_submit_params.Subscriber,
292
284
  trading_partner_service_id: str,
293
- attending: claim_submit_params.Attending | NotGiven = NOT_GIVEN,
294
- billing: claim_submit_params.Billing | NotGiven = NOT_GIVEN,
295
- billing_pay_to_address_name: claim_submit_params.BillingPayToAddressName | NotGiven = NOT_GIVEN,
296
- billing_pay_to_plan_name: claim_submit_params.BillingPayToPlanName | NotGiven = NOT_GIVEN,
297
285
  control_number: str | NotGiven = NOT_GIVEN,
298
- correlation_id: str | NotGiven = NOT_GIVEN,
299
286
  dependent: claim_submit_params.Dependent | NotGiven = NOT_GIVEN,
300
- event_mapping: claim_submit_params.EventMapping | NotGiven = NOT_GIVEN,
301
- operating_physician: claim_submit_params.OperatingPhysician | NotGiven = NOT_GIVEN,
302
- other_operating_physician: claim_submit_params.OtherOperatingPhysician | NotGiven = NOT_GIVEN,
287
+ ordering: claim_submit_params.Ordering | NotGiven = NOT_GIVEN,
303
288
  payer_address: claim_submit_params.PayerAddress | NotGiven = NOT_GIVEN,
289
+ pay_to_address: claim_submit_params.PayToAddress | NotGiven = NOT_GIVEN,
290
+ pay_to_plan: claim_submit_params.PayToPlan | NotGiven = NOT_GIVEN,
304
291
  providers: Iterable[claim_submit_params.Provider] | NotGiven = NOT_GIVEN,
305
292
  referring: claim_submit_params.Referring | NotGiven = NOT_GIVEN,
306
293
  rendering: claim_submit_params.Rendering | NotGiven = NOT_GIVEN,
294
+ supervising: claim_submit_params.Supervising | NotGiven = NOT_GIVEN,
307
295
  trading_partner_name: str | NotGiven = NOT_GIVEN,
308
296
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
309
297
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -331,27 +319,23 @@ class AsyncClaimResource(AsyncAPIResource):
331
319
  "/api/v2/clearinghouse/claim",
332
320
  body=await async_maybe_transform(
333
321
  {
322
+ "billing": billing,
334
323
  "claim_information": claim_information,
335
- "idempotency_key": idempotency_key,
336
324
  "is_testing": is_testing,
337
325
  "receiver": receiver,
338
326
  "submitter": submitter,
339
327
  "subscriber": subscriber,
340
328
  "trading_partner_service_id": trading_partner_service_id,
341
- "attending": attending,
342
- "billing": billing,
343
- "billing_pay_to_address_name": billing_pay_to_address_name,
344
- "billing_pay_to_plan_name": billing_pay_to_plan_name,
345
329
  "control_number": control_number,
346
- "correlation_id": correlation_id,
347
330
  "dependent": dependent,
348
- "event_mapping": event_mapping,
349
- "operating_physician": operating_physician,
350
- "other_operating_physician": other_operating_physician,
331
+ "ordering": ordering,
351
332
  "payer_address": payer_address,
333
+ "pay_to_address": pay_to_address,
334
+ "pay_to_plan": pay_to_plan,
352
335
  "providers": providers,
353
336
  "referring": referring,
354
337
  "rendering": rendering,
338
+ "supervising": supervising,
355
339
  "trading_partner_name": trading_partner_name,
356
340
  },
357
341
  claim_submit_params.ClaimSubmitParams,
@@ -53,6 +53,7 @@ class CommunicationResource(SyncAPIResource):
53
53
  attach_as_files: bool | NotGiven = NOT_GIVEN,
54
54
  attachments: Iterable[communication_send_email_params.Attachment] | NotGiven = NOT_GIVEN,
55
55
  enable_encryption: bool | NotGiven = NOT_GIVEN,
56
+ from_: str | NotGiven = NOT_GIVEN,
56
57
  zip_attachments: bool | NotGiven = NOT_GIVEN,
57
58
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
58
59
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -84,6 +85,8 @@ class CommunicationResource(SyncAPIResource):
84
85
  enable_encryption: Whether to encrypt the email content and send a secure link instead. Note that
85
86
  encrypted emails do not support attachments.
86
87
 
88
+ from_: The email address of the sender
89
+
87
90
  zip_attachments: Whether to compress all attachments into a single zip file before sending
88
91
 
89
92
  extra_headers: Send extra headers
@@ -104,6 +107,7 @@ class CommunicationResource(SyncAPIResource):
104
107
  "attach_as_files": attach_as_files,
105
108
  "attachments": attachments,
106
109
  "enable_encryption": enable_encryption,
110
+ "from_": from_,
107
111
  "zip_attachments": zip_attachments,
108
112
  },
109
113
  communication_send_email_params.CommunicationSendEmailParams,
@@ -260,6 +264,7 @@ class AsyncCommunicationResource(AsyncAPIResource):
260
264
  attach_as_files: bool | NotGiven = NOT_GIVEN,
261
265
  attachments: Iterable[communication_send_email_params.Attachment] | NotGiven = NOT_GIVEN,
262
266
  enable_encryption: bool | NotGiven = NOT_GIVEN,
267
+ from_: str | NotGiven = NOT_GIVEN,
263
268
  zip_attachments: bool | NotGiven = NOT_GIVEN,
264
269
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
265
270
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -291,6 +296,8 @@ class AsyncCommunicationResource(AsyncAPIResource):
291
296
  enable_encryption: Whether to encrypt the email content and send a secure link instead. Note that
292
297
  encrypted emails do not support attachments.
293
298
 
299
+ from_: The email address of the sender
300
+
294
301
  zip_attachments: Whether to compress all attachments into a single zip file before sending
295
302
 
296
303
  extra_headers: Send extra headers
@@ -311,6 +318,7 @@ class AsyncCommunicationResource(AsyncAPIResource):
311
318
  "attach_as_files": attach_as_files,
312
319
  "attachments": attachments,
313
320
  "enable_encryption": enable_encryption,
321
+ "from_": from_,
314
322
  "zip_attachments": zip_attachments,
315
323
  },
316
324
  communication_send_email_params.CommunicationSendEmailParams,
@@ -2,7 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import List, Union, Optional
5
+ from typing import Dict, List, Union, Iterable, Optional
6
6
  from typing_extensions import Literal
7
7
 
8
8
  import httpx
@@ -48,7 +48,8 @@ class DatabaseResource(SyncAPIResource):
48
48
  self,
49
49
  *,
50
50
  query: str,
51
- params: List[Union[str, float, bool, Optional[Literal["null"]]]] | NotGiven = NOT_GIVEN,
51
+ params: List[Union[str, float, bool, Optional[Literal["null"]], Iterable[object], Dict[str, object]]]
52
+ | NotGiven = NOT_GIVEN,
52
53
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
53
54
  # The extra values given here take precedence over values defined on the client or passed to this method.
54
55
  extra_headers: Headers | None = None,
@@ -59,13 +60,17 @@ class DatabaseResource(SyncAPIResource):
59
60
  """Allows execution of arbitrary SQL queries against the Sample database.
60
61
 
61
62
  Supports
62
- parameterized queries.
63
+ parameterized queries with complex data types including arrays, objects, and
64
+ nested structures. Examples: arrays can be used with ANY/ALL operators, objects
65
+ as structs for complex filtering.
63
66
 
64
67
  Args:
65
68
  query: The SQL query to execute.
66
69
 
67
- params: An array of parameters to be used in the SQL query. Use placeholders like $1,
68
- $2, etc. in the query string.
70
+ params: An array of parameters to be used in the SQL query. Supports primitive types
71
+ (string, number, boolean, null), arrays, and objects. Use placeholders like $1,
72
+ $2, etc. in the query string. Examples: ["hello", 123, [1,2,3], {"name": "John",
73
+ "age": 30}]
69
74
 
70
75
  extra_headers: Send extra headers
71
76
 
@@ -115,7 +120,8 @@ class AsyncDatabaseResource(AsyncAPIResource):
115
120
  self,
116
121
  *,
117
122
  query: str,
118
- params: List[Union[str, float, bool, Optional[Literal["null"]]]] | NotGiven = NOT_GIVEN,
123
+ params: List[Union[str, float, bool, Optional[Literal["null"]], Iterable[object], Dict[str, object]]]
124
+ | NotGiven = NOT_GIVEN,
119
125
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
120
126
  # The extra values given here take precedence over values defined on the client or passed to this method.
121
127
  extra_headers: Headers | None = None,
@@ -126,13 +132,17 @@ class AsyncDatabaseResource(AsyncAPIResource):
126
132
  """Allows execution of arbitrary SQL queries against the Sample database.
127
133
 
128
134
  Supports
129
- parameterized queries.
135
+ parameterized queries with complex data types including arrays, objects, and
136
+ nested structures. Examples: arrays can be used with ANY/ALL operators, objects
137
+ as structs for complex filtering.
130
138
 
131
139
  Args:
132
140
  query: The SQL query to execute.
133
141
 
134
- params: An array of parameters to be used in the SQL query. Use placeholders like $1,
135
- $2, etc. in the query string.
142
+ params: An array of parameters to be used in the SQL query. Supports primitive types
143
+ (string, number, boolean, null), arrays, and objects. Use placeholders like $1,
144
+ $2, etc. in the query string. Examples: ["hello", 123, [1,2,3], {"name": "John",
145
+ "age": 30}]
136
146
 
137
147
  extra_headers: Send extra headers
138
148
 
@@ -0,0 +1,33 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from .hie import (
4
+ HieResource,
5
+ AsyncHieResource,
6
+ HieResourceWithRawResponse,
7
+ AsyncHieResourceWithRawResponse,
8
+ HieResourceWithStreamingResponse,
9
+ AsyncHieResourceWithStreamingResponse,
10
+ )
11
+ from .events import (
12
+ EventsResource,
13
+ AsyncEventsResource,
14
+ EventsResourceWithRawResponse,
15
+ AsyncEventsResourceWithRawResponse,
16
+ EventsResourceWithStreamingResponse,
17
+ AsyncEventsResourceWithStreamingResponse,
18
+ )
19
+
20
+ __all__ = [
21
+ "HieResource",
22
+ "AsyncHieResource",
23
+ "HieResourceWithRawResponse",
24
+ "AsyncHieResourceWithRawResponse",
25
+ "HieResourceWithStreamingResponse",
26
+ "AsyncHieResourceWithStreamingResponse",
27
+ "EventsResource",
28
+ "AsyncEventsResource",
29
+ "EventsResourceWithRawResponse",
30
+ "AsyncEventsResourceWithRawResponse",
31
+ "EventsResourceWithStreamingResponse",
32
+ "AsyncEventsResourceWithStreamingResponse",
33
+ ]
@@ -4,24 +4,36 @@ from __future__ import annotations
4
4
 
5
5
  import httpx
6
6
 
7
- from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
8
- from ..._utils import maybe_transform, strip_not_given, async_maybe_transform
9
- from ..._compat import cached_property
10
- from ...types.v2 import event_emit_params
11
- from ..._resource import SyncAPIResource, AsyncAPIResource
12
- from ..._response import (
7
+ from .hie.hie import (
8
+ HieResource,
9
+ AsyncHieResource,
10
+ HieResourceWithRawResponse,
11
+ AsyncHieResourceWithRawResponse,
12
+ HieResourceWithStreamingResponse,
13
+ AsyncHieResourceWithStreamingResponse,
14
+ )
15
+ from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
16
+ from ...._utils import maybe_transform, strip_not_given, async_maybe_transform
17
+ from ...._compat import cached_property
18
+ from ....types.v2 import event_emit_params
19
+ from ...._resource import SyncAPIResource, AsyncAPIResource
20
+ from ...._response import (
13
21
  to_raw_response_wrapper,
14
22
  to_streamed_response_wrapper,
15
23
  async_to_raw_response_wrapper,
16
24
  async_to_streamed_response_wrapper,
17
25
  )
18
- from ..._base_client import make_request_options
19
- from ...types.v2.event_emit_response import EventEmitResponse
26
+ from ...._base_client import make_request_options
27
+ from ....types.v2.event_emit_response import EventEmitResponse
20
28
 
21
29
  __all__ = ["EventsResource", "AsyncEventsResource"]
22
30
 
23
31
 
24
32
  class EventsResource(SyncAPIResource):
33
+ @cached_property
34
+ def hie(self) -> HieResource:
35
+ return HieResource(self._client)
36
+
25
37
  @cached_property
26
38
  def with_raw_response(self) -> EventsResourceWithRawResponse:
27
39
  """
@@ -70,7 +82,7 @@ class EventsResource(SyncAPIResource):
70
82
 
71
83
  timeout: Override the client-level default timeout for this request, in seconds
72
84
  """
73
- extra_headers = {**strip_not_given({"Idempotency-Key": idempotency_key}), **(extra_headers or {})}
85
+ extra_headers = {**strip_not_given({"idempotency-key": idempotency_key}), **(extra_headers or {})}
74
86
  return self._post(
75
87
  "/api/v2/events/",
76
88
  body=maybe_transform(
@@ -88,6 +100,10 @@ class EventsResource(SyncAPIResource):
88
100
 
89
101
 
90
102
  class AsyncEventsResource(AsyncAPIResource):
103
+ @cached_property
104
+ def hie(self) -> AsyncHieResource:
105
+ return AsyncHieResource(self._client)
106
+
91
107
  @cached_property
92
108
  def with_raw_response(self) -> AsyncEventsResourceWithRawResponse:
93
109
  """
@@ -136,7 +152,7 @@ class AsyncEventsResource(AsyncAPIResource):
136
152
 
137
153
  timeout: Override the client-level default timeout for this request, in seconds
138
154
  """
139
- extra_headers = {**strip_not_given({"Idempotency-Key": idempotency_key}), **(extra_headers or {})}
155
+ extra_headers = {**strip_not_given({"idempotency-key": idempotency_key}), **(extra_headers or {})}
140
156
  return await self._post(
141
157
  "/api/v2/events/",
142
158
  body=await async_maybe_transform(
@@ -161,6 +177,10 @@ class EventsResourceWithRawResponse:
161
177
  events.emit,
162
178
  )
163
179
 
180
+ @cached_property
181
+ def hie(self) -> HieResourceWithRawResponse:
182
+ return HieResourceWithRawResponse(self._events.hie)
183
+
164
184
 
165
185
  class AsyncEventsResourceWithRawResponse:
166
186
  def __init__(self, events: AsyncEventsResource) -> None:
@@ -170,6 +190,10 @@ class AsyncEventsResourceWithRawResponse:
170
190
  events.emit,
171
191
  )
172
192
 
193
+ @cached_property
194
+ def hie(self) -> AsyncHieResourceWithRawResponse:
195
+ return AsyncHieResourceWithRawResponse(self._events.hie)
196
+
173
197
 
174
198
  class EventsResourceWithStreamingResponse:
175
199
  def __init__(self, events: EventsResource) -> None:
@@ -179,6 +203,10 @@ class EventsResourceWithStreamingResponse:
179
203
  events.emit,
180
204
  )
181
205
 
206
+ @cached_property
207
+ def hie(self) -> HieResourceWithStreamingResponse:
208
+ return HieResourceWithStreamingResponse(self._events.hie)
209
+
182
210
 
183
211
  class AsyncEventsResourceWithStreamingResponse:
184
212
  def __init__(self, events: AsyncEventsResource) -> None:
@@ -187,3 +215,7 @@ class AsyncEventsResourceWithStreamingResponse:
187
215
  self.emit = async_to_streamed_response_wrapper(
188
216
  events.emit,
189
217
  )
218
+
219
+ @cached_property
220
+ def hie(self) -> AsyncHieResourceWithStreamingResponse:
221
+ return AsyncHieResourceWithStreamingResponse(self._events.hie)
@@ -0,0 +1,33 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from .adt import (
4
+ AdtResource,
5
+ AsyncAdtResource,
6
+ AdtResourceWithRawResponse,
7
+ AsyncAdtResourceWithRawResponse,
8
+ AdtResourceWithStreamingResponse,
9
+ AsyncAdtResourceWithStreamingResponse,
10
+ )
11
+ from .hie import (
12
+ HieResource,
13
+ AsyncHieResource,
14
+ HieResourceWithRawResponse,
15
+ AsyncHieResourceWithRawResponse,
16
+ HieResourceWithStreamingResponse,
17
+ AsyncHieResourceWithStreamingResponse,
18
+ )
19
+
20
+ __all__ = [
21
+ "AdtResource",
22
+ "AsyncAdtResource",
23
+ "AdtResourceWithRawResponse",
24
+ "AsyncAdtResourceWithRawResponse",
25
+ "AdtResourceWithStreamingResponse",
26
+ "AsyncAdtResourceWithStreamingResponse",
27
+ "HieResource",
28
+ "AsyncHieResource",
29
+ "HieResourceWithRawResponse",
30
+ "AsyncHieResourceWithRawResponse",
31
+ "HieResourceWithStreamingResponse",
32
+ "AsyncHieResourceWithStreamingResponse",
33
+ ]