samplehc 0.9.0__py3-none-any.whl → 0.11.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 (101) hide show
  1. samplehc/_base_client.py +3 -3
  2. samplehc/_compat.py +48 -48
  3. samplehc/_models.py +41 -41
  4. samplehc/_types.py +35 -1
  5. samplehc/_utils/__init__.py +9 -2
  6. samplehc/_utils/_compat.py +45 -0
  7. samplehc/_utils/_datetime_parse.py +136 -0
  8. samplehc/_utils/_transform.py +11 -1
  9. samplehc/_utils/_typing.py +6 -1
  10. samplehc/_utils/_utils.py +0 -1
  11. samplehc/_version.py +1 -1
  12. samplehc/resources/v2/browser_agents/__init__.py +33 -0
  13. samplehc/resources/v2/{browser_agents.py → browser_agents/browser_agents.py} +40 -8
  14. samplehc/resources/v2/browser_agents/runs/__init__.py +33 -0
  15. samplehc/resources/v2/browser_agents/runs/help_requests.py +191 -0
  16. samplehc/resources/v2/browser_agents/runs/runs.py +102 -0
  17. samplehc/resources/v2/clearinghouse/clearinghouse.py +4 -4
  18. samplehc/resources/v2/clearinghouse/payers.py +18 -20
  19. samplehc/resources/v2/{events/events.py → events.py} +8 -40
  20. samplehc/resources/v2/integrations/__init__.py +28 -0
  21. samplehc/resources/v2/integrations/careviso.py +10 -10
  22. samplehc/resources/v2/integrations/integrations.py +64 -0
  23. samplehc/resources/v2/integrations/salesforce.py +193 -0
  24. samplehc/resources/v2/{events/integrations → integrations}/xcures.py +7 -7
  25. samplehc/resources/v2/ledger/__init__.py +27 -55
  26. samplehc/resources/v2/ledger/{orders.py → account.py} +120 -82
  27. samplehc/resources/v2/ledger/entry.py +382 -0
  28. samplehc/resources/v2/ledger/ledger.py +38 -1560
  29. samplehc/resources/v2/v2.py +16 -16
  30. samplehc/types/v2/__init__.py +0 -28
  31. samplehc/types/v2/browser_agent_invoke_response.py +3 -0
  32. samplehc/types/v2/browser_agents/runs/__init__.py +6 -0
  33. samplehc/types/v2/browser_agents/runs/help_request_resolve_params.py +18 -0
  34. samplehc/types/v2/browser_agents/runs/help_request_resolve_response.py +30 -0
  35. samplehc/types/v2/clearinghouse/__init__.py +2 -2
  36. samplehc/types/v2/clearinghouse/claim_submit_params.py +10 -9
  37. samplehc/types/v2/clearinghouse/{payer_retrieve_search_params.py → payer_search_params.py} +2 -2
  38. samplehc/types/v2/clearinghouse/{payer_retrieve_search_response.py → payer_search_response.py} +2 -2
  39. samplehc/types/v2/clearinghouse_calculate_patient_cost_params.py +3 -2
  40. samplehc/types/v2/clearinghouse_check_eligibility_params.py +2 -2
  41. samplehc/types/v2/communication_send_letter_params.py +4 -3
  42. samplehc/types/v2/document_classify_params.py +3 -2
  43. samplehc/types/v2/document_generate_csv_params.py +3 -2
  44. samplehc/types/v2/documents/legacy_extract_params.py +8 -7
  45. samplehc/types/v2/integrations/__init__.py +2 -0
  46. samplehc/types/v2/integrations/careviso_submit_prior_authorization_params.py +6 -5
  47. samplehc/types/v2/integrations/glidian/prior_authorizations/clinical_question_update_params.py +3 -2
  48. samplehc/types/v2/integrations/salesforce_run_crud_action_params.py +22 -0
  49. samplehc/types/v2/ledger/__init__.py +6 -17
  50. samplehc/types/v2/ledger/account_writeoff_params.py +24 -0
  51. samplehc/types/v2/ledger/account_writeoff_response.py +12 -0
  52. samplehc/types/v2/ledger/entry_post_params.py +61 -0
  53. samplehc/types/v2/ledger/entry_post_response.py +10 -0
  54. samplehc/types/v2/ledger/entry_reverse_params.py +19 -0
  55. samplehc/types/v2/ledger/entry_reverse_response.py +10 -0
  56. {samplehc-0.9.0.dist-info → samplehc-0.11.0.dist-info}/METADATA +1 -1
  57. {samplehc-0.9.0.dist-info → samplehc-0.11.0.dist-info}/RECORD +61 -83
  58. samplehc/resources/v2/events/__init__.py +0 -33
  59. samplehc/resources/v2/events/integrations/__init__.py +0 -33
  60. samplehc/resources/v2/events/integrations/integrations.py +0 -102
  61. samplehc/resources/v2/ledger/institutions/__init__.py +0 -33
  62. samplehc/resources/v2/ledger/institutions/institutions.py +0 -258
  63. samplehc/resources/v2/ledger/institutions/orders.py +0 -169
  64. samplehc/resources/v2/ledger/insurance.py +0 -141
  65. samplehc/resources/v2/ledger/patients.py +0 -141
  66. samplehc/types/v2/events/integrations/__init__.py +0 -5
  67. samplehc/types/v2/ledger/institution_list_outstanding_accounts_response.py +0 -25
  68. samplehc/types/v2/ledger/institution_retrieve_outstanding_orders_response.py +0 -25
  69. samplehc/types/v2/ledger/institutions/__init__.py +0 -5
  70. samplehc/types/v2/ledger/institutions/order_retrieve_balance_response.py +0 -12
  71. samplehc/types/v2/ledger/insurance_list_outstanding_accounts_response.py +0 -25
  72. samplehc/types/v2/ledger/order_retrieve_balances_response.py +0 -31
  73. samplehc/types/v2/ledger/order_retrieve_batch_balances_params.py +0 -15
  74. samplehc/types/v2/ledger/order_retrieve_batch_balances_response.py +0 -38
  75. samplehc/types/v2/ledger/patient_list_outstanding_accounts_response.py +0 -22
  76. samplehc/types/v2/ledger_assign_invoice_params.py +0 -34
  77. samplehc/types/v2/ledger_assign_invoice_response.py +0 -12
  78. samplehc/types/v2/ledger_claim_adjustment_params.py +0 -34
  79. samplehc/types/v2/ledger_claim_adjustment_response.py +0 -12
  80. samplehc/types/v2/ledger_claim_payment_params.py +0 -34
  81. samplehc/types/v2/ledger_claim_payment_response.py +0 -12
  82. samplehc/types/v2/ledger_institution_adjustment_params.py +0 -31
  83. samplehc/types/v2/ledger_institution_adjustment_response.py +0 -12
  84. samplehc/types/v2/ledger_institution_payment_params.py +0 -31
  85. samplehc/types/v2/ledger_institution_payment_response.py +0 -12
  86. samplehc/types/v2/ledger_new_order_params.py +0 -22
  87. samplehc/types/v2/ledger_new_order_response.py +0 -12
  88. samplehc/types/v2/ledger_order_writeoff_params.py +0 -28
  89. samplehc/types/v2/ledger_order_writeoff_response.py +0 -12
  90. samplehc/types/v2/ledger_patient_adjustment_params.py +0 -31
  91. samplehc/types/v2/ledger_patient_adjustment_response.py +0 -12
  92. samplehc/types/v2/ledger_patient_payment_params.py +0 -28
  93. samplehc/types/v2/ledger_patient_payment_response.py +0 -12
  94. samplehc/types/v2/ledger_post_remittance_accepted_params.py +0 -37
  95. samplehc/types/v2/ledger_post_remittance_accepted_response.py +0 -12
  96. samplehc/types/v2/ledger_reverse_entry_params.py +0 -12
  97. samplehc/types/v2/ledger_reverse_entry_response.py +0 -12
  98. /samplehc/types/v2/{events → browser_agents}/__init__.py +0 -0
  99. /samplehc/types/v2/{events/integrations → integrations}/xcure_make_request_params.py +0 -0
  100. {samplehc-0.9.0.dist-info → samplehc-0.11.0.dist-info}/WHEEL +0 -0
  101. {samplehc-0.9.0.dist-info → samplehc-0.11.0.dist-info}/licenses/LICENSE +0 -0
@@ -15,9 +15,9 @@ from ...._response import (
15
15
  async_to_streamed_response_wrapper,
16
16
  )
17
17
  from ...._base_client import make_request_options
18
- from ....types.v2.clearinghouse import payer_retrieve_search_params
18
+ from ....types.v2.clearinghouse import payer_search_params
19
19
  from ....types.v2.clearinghouse.payer_list_response import PayerListResponse
20
- from ....types.v2.clearinghouse.payer_retrieve_search_response import PayerRetrieveSearchResponse
20
+ from ....types.v2.clearinghouse.payer_search_response import PayerSearchResponse
21
21
 
22
22
  __all__ = ["PayersResource", "AsyncPayersResource"]
23
23
 
@@ -61,7 +61,7 @@ class PayersResource(SyncAPIResource):
61
61
  cast_to=PayerListResponse,
62
62
  )
63
63
 
64
- def retrieve_search(
64
+ def search(
65
65
  self,
66
66
  *,
67
67
  query: str,
@@ -71,7 +71,7 @@ class PayersResource(SyncAPIResource):
71
71
  extra_query: Query | None = None,
72
72
  extra_body: Body | None = None,
73
73
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
74
- ) -> PayerRetrieveSearchResponse:
74
+ ) -> PayerSearchResponse:
75
75
  """
76
76
  Searches for payers based on the provided search criteria.
77
77
 
@@ -93,9 +93,9 @@ class PayersResource(SyncAPIResource):
93
93
  extra_query=extra_query,
94
94
  extra_body=extra_body,
95
95
  timeout=timeout,
96
- query=maybe_transform({"query": query}, payer_retrieve_search_params.PayerRetrieveSearchParams),
96
+ query=maybe_transform({"query": query}, payer_search_params.PayerSearchParams),
97
97
  ),
98
- cast_to=PayerRetrieveSearchResponse,
98
+ cast_to=PayerSearchResponse,
99
99
  )
100
100
 
101
101
 
@@ -138,7 +138,7 @@ class AsyncPayersResource(AsyncAPIResource):
138
138
  cast_to=PayerListResponse,
139
139
  )
140
140
 
141
- async def retrieve_search(
141
+ async def search(
142
142
  self,
143
143
  *,
144
144
  query: str,
@@ -148,7 +148,7 @@ class AsyncPayersResource(AsyncAPIResource):
148
148
  extra_query: Query | None = None,
149
149
  extra_body: Body | None = None,
150
150
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
151
- ) -> PayerRetrieveSearchResponse:
151
+ ) -> PayerSearchResponse:
152
152
  """
153
153
  Searches for payers based on the provided search criteria.
154
154
 
@@ -170,11 +170,9 @@ class AsyncPayersResource(AsyncAPIResource):
170
170
  extra_query=extra_query,
171
171
  extra_body=extra_body,
172
172
  timeout=timeout,
173
- query=await async_maybe_transform(
174
- {"query": query}, payer_retrieve_search_params.PayerRetrieveSearchParams
175
- ),
173
+ query=await async_maybe_transform({"query": query}, payer_search_params.PayerSearchParams),
176
174
  ),
177
- cast_to=PayerRetrieveSearchResponse,
175
+ cast_to=PayerSearchResponse,
178
176
  )
179
177
 
180
178
 
@@ -185,8 +183,8 @@ class PayersResourceWithRawResponse:
185
183
  self.list = to_raw_response_wrapper(
186
184
  payers.list,
187
185
  )
188
- self.retrieve_search = to_raw_response_wrapper(
189
- payers.retrieve_search,
186
+ self.search = to_raw_response_wrapper(
187
+ payers.search,
190
188
  )
191
189
 
192
190
 
@@ -197,8 +195,8 @@ class AsyncPayersResourceWithRawResponse:
197
195
  self.list = async_to_raw_response_wrapper(
198
196
  payers.list,
199
197
  )
200
- self.retrieve_search = async_to_raw_response_wrapper(
201
- payers.retrieve_search,
198
+ self.search = async_to_raw_response_wrapper(
199
+ payers.search,
202
200
  )
203
201
 
204
202
 
@@ -209,8 +207,8 @@ class PayersResourceWithStreamingResponse:
209
207
  self.list = to_streamed_response_wrapper(
210
208
  payers.list,
211
209
  )
212
- self.retrieve_search = to_streamed_response_wrapper(
213
- payers.retrieve_search,
210
+ self.search = to_streamed_response_wrapper(
211
+ payers.search,
214
212
  )
215
213
 
216
214
 
@@ -221,6 +219,6 @@ class AsyncPayersResourceWithStreamingResponse:
221
219
  self.list = async_to_streamed_response_wrapper(
222
220
  payers.list,
223
221
  )
224
- self.retrieve_search = async_to_streamed_response_wrapper(
225
- payers.retrieve_search,
222
+ self.search = async_to_streamed_response_wrapper(
223
+ payers.search,
226
224
  )
@@ -4,36 +4,24 @@ 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 ..._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 (
13
13
  to_raw_response_wrapper,
14
14
  to_streamed_response_wrapper,
15
15
  async_to_raw_response_wrapper,
16
16
  async_to_streamed_response_wrapper,
17
17
  )
18
- from ...._base_client import make_request_options
19
- from .integrations.integrations import (
20
- IntegrationsResource,
21
- AsyncIntegrationsResource,
22
- IntegrationsResourceWithRawResponse,
23
- AsyncIntegrationsResourceWithRawResponse,
24
- IntegrationsResourceWithStreamingResponse,
25
- AsyncIntegrationsResourceWithStreamingResponse,
26
- )
27
- from ....types.v2.event_emit_response import EventEmitResponse
18
+ from ..._base_client import make_request_options
19
+ from ...types.v2.event_emit_response import EventEmitResponse
28
20
 
29
21
  __all__ = ["EventsResource", "AsyncEventsResource"]
30
22
 
31
23
 
32
24
  class EventsResource(SyncAPIResource):
33
- @cached_property
34
- def integrations(self) -> IntegrationsResource:
35
- return IntegrationsResource(self._client)
36
-
37
25
  @cached_property
38
26
  def with_raw_response(self) -> EventsResourceWithRawResponse:
39
27
  """
@@ -100,10 +88,6 @@ class EventsResource(SyncAPIResource):
100
88
 
101
89
 
102
90
  class AsyncEventsResource(AsyncAPIResource):
103
- @cached_property
104
- def integrations(self) -> AsyncIntegrationsResource:
105
- return AsyncIntegrationsResource(self._client)
106
-
107
91
  @cached_property
108
92
  def with_raw_response(self) -> AsyncEventsResourceWithRawResponse:
109
93
  """
@@ -177,10 +161,6 @@ class EventsResourceWithRawResponse:
177
161
  events.emit,
178
162
  )
179
163
 
180
- @cached_property
181
- def integrations(self) -> IntegrationsResourceWithRawResponse:
182
- return IntegrationsResourceWithRawResponse(self._events.integrations)
183
-
184
164
 
185
165
  class AsyncEventsResourceWithRawResponse:
186
166
  def __init__(self, events: AsyncEventsResource) -> None:
@@ -190,10 +170,6 @@ class AsyncEventsResourceWithRawResponse:
190
170
  events.emit,
191
171
  )
192
172
 
193
- @cached_property
194
- def integrations(self) -> AsyncIntegrationsResourceWithRawResponse:
195
- return AsyncIntegrationsResourceWithRawResponse(self._events.integrations)
196
-
197
173
 
198
174
  class EventsResourceWithStreamingResponse:
199
175
  def __init__(self, events: EventsResource) -> None:
@@ -203,10 +179,6 @@ class EventsResourceWithStreamingResponse:
203
179
  events.emit,
204
180
  )
205
181
 
206
- @cached_property
207
- def integrations(self) -> IntegrationsResourceWithStreamingResponse:
208
- return IntegrationsResourceWithStreamingResponse(self._events.integrations)
209
-
210
182
 
211
183
  class AsyncEventsResourceWithStreamingResponse:
212
184
  def __init__(self, events: AsyncEventsResource) -> None:
@@ -215,7 +187,3 @@ class AsyncEventsResourceWithStreamingResponse:
215
187
  self.emit = async_to_streamed_response_wrapper(
216
188
  events.emit,
217
189
  )
218
-
219
- @cached_property
220
- def integrations(self) -> AsyncIntegrationsResourceWithStreamingResponse:
221
- return AsyncIntegrationsResourceWithStreamingResponse(self._events.integrations)
@@ -16,6 +16,14 @@ from .kno2 import (
16
16
  Kno2ResourceWithStreamingResponse,
17
17
  AsyncKno2ResourceWithStreamingResponse,
18
18
  )
19
+ from .xcures import (
20
+ XcuresResource,
21
+ AsyncXcuresResource,
22
+ XcuresResourceWithRawResponse,
23
+ AsyncXcuresResourceWithRawResponse,
24
+ XcuresResourceWithStreamingResponse,
25
+ AsyncXcuresResourceWithStreamingResponse,
26
+ )
19
27
  from .glidian import (
20
28
  GlidianResource,
21
29
  AsyncGlidianResource,
@@ -40,6 +48,14 @@ from .snowflake import (
40
48
  SnowflakeResourceWithStreamingResponse,
41
49
  AsyncSnowflakeResourceWithStreamingResponse,
42
50
  )
51
+ from .salesforce import (
52
+ SalesforceResource,
53
+ AsyncSalesforceResource,
54
+ SalesforceResourceWithRawResponse,
55
+ AsyncSalesforceResourceWithRawResponse,
56
+ SalesforceResourceWithStreamingResponse,
57
+ AsyncSalesforceResourceWithStreamingResponse,
58
+ )
43
59
  from .integrations import (
44
60
  IntegrationsResource,
45
61
  AsyncIntegrationsResource,
@@ -80,6 +96,18 @@ __all__ = [
80
96
  "AsyncGlidianResourceWithRawResponse",
81
97
  "GlidianResourceWithStreamingResponse",
82
98
  "AsyncGlidianResourceWithStreamingResponse",
99
+ "XcuresResource",
100
+ "AsyncXcuresResource",
101
+ "XcuresResourceWithRawResponse",
102
+ "AsyncXcuresResourceWithRawResponse",
103
+ "XcuresResourceWithStreamingResponse",
104
+ "AsyncXcuresResourceWithStreamingResponse",
105
+ "SalesforceResource",
106
+ "AsyncSalesforceResource",
107
+ "SalesforceResourceWithRawResponse",
108
+ "AsyncSalesforceResourceWithRawResponse",
109
+ "SalesforceResourceWithStreamingResponse",
110
+ "AsyncSalesforceResourceWithStreamingResponse",
83
111
  "IntegrationsResource",
84
112
  "AsyncIntegrationsResource",
85
113
  "IntegrationsResourceWithRawResponse",
@@ -2,12 +2,12 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import List, Iterable
5
+ from typing import Iterable
6
6
  from typing_extensions import Literal
7
7
 
8
8
  import httpx
9
9
 
10
- from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
10
+ from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
11
11
  from ...._utils import maybe_transform, async_maybe_transform
12
12
  from ...._compat import cached_property
13
13
  from ...._resource import SyncAPIResource, AsyncAPIResource
@@ -69,9 +69,9 @@ class CarevisoResource(SyncAPIResource):
69
69
  *,
70
70
  attachments: Iterable[careviso_submit_prior_authorization_params.Attachment],
71
71
  case_type: Literal["prior_auth_request", "benefits_investigation"],
72
- cpt_codes: List[str],
72
+ cpt_codes: SequenceNotStr[str],
73
73
  group_id: str,
74
- icd10_codes: List[str],
74
+ icd10_codes: SequenceNotStr[str],
75
75
  insurance_name: str,
76
76
  lab_order_id: str,
77
77
  member_id: str,
@@ -87,7 +87,7 @@ class CarevisoResource(SyncAPIResource):
87
87
  provider_npi: str,
88
88
  provider_phone: str,
89
89
  service_date: str,
90
- test_names: List[str],
90
+ test_names: SequenceNotStr[str],
91
91
  accession_date: str | NotGiven = NOT_GIVEN,
92
92
  collection_date: str | NotGiven = NOT_GIVEN,
93
93
  collection_type: str | NotGiven = NOT_GIVEN,
@@ -98,7 +98,7 @@ class CarevisoResource(SyncAPIResource):
98
98
  patient_street: str | NotGiven = NOT_GIVEN,
99
99
  patient_street2: str | NotGiven = NOT_GIVEN,
100
100
  patient_zip: str | NotGiven = NOT_GIVEN,
101
- test_identifiers: List[str] | NotGiven = NOT_GIVEN,
101
+ test_identifiers: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
102
102
  test_type: str | NotGiven = NOT_GIVEN,
103
103
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
104
104
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -219,9 +219,9 @@ class AsyncCarevisoResource(AsyncAPIResource):
219
219
  *,
220
220
  attachments: Iterable[careviso_submit_prior_authorization_params.Attachment],
221
221
  case_type: Literal["prior_auth_request", "benefits_investigation"],
222
- cpt_codes: List[str],
222
+ cpt_codes: SequenceNotStr[str],
223
223
  group_id: str,
224
- icd10_codes: List[str],
224
+ icd10_codes: SequenceNotStr[str],
225
225
  insurance_name: str,
226
226
  lab_order_id: str,
227
227
  member_id: str,
@@ -237,7 +237,7 @@ class AsyncCarevisoResource(AsyncAPIResource):
237
237
  provider_npi: str,
238
238
  provider_phone: str,
239
239
  service_date: str,
240
- test_names: List[str],
240
+ test_names: SequenceNotStr[str],
241
241
  accession_date: str | NotGiven = NOT_GIVEN,
242
242
  collection_date: str | NotGiven = NOT_GIVEN,
243
243
  collection_type: str | NotGiven = NOT_GIVEN,
@@ -248,7 +248,7 @@ class AsyncCarevisoResource(AsyncAPIResource):
248
248
  patient_street: str | NotGiven = NOT_GIVEN,
249
249
  patient_street2: str | NotGiven = NOT_GIVEN,
250
250
  patient_zip: str | NotGiven = NOT_GIVEN,
251
- test_identifiers: List[str] | NotGiven = NOT_GIVEN,
251
+ test_identifiers: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
252
252
  test_type: str | NotGiven = NOT_GIVEN,
253
253
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
254
254
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -2,6 +2,14 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ from .xcures import (
6
+ XcuresResource,
7
+ AsyncXcuresResource,
8
+ XcuresResourceWithRawResponse,
9
+ AsyncXcuresResourceWithRawResponse,
10
+ XcuresResourceWithStreamingResponse,
11
+ AsyncXcuresResourceWithStreamingResponse,
12
+ )
5
13
  from .careviso import (
6
14
  CarevisoResource,
7
15
  AsyncCarevisoResource,
@@ -35,6 +43,14 @@ from .snowflake import (
35
43
  AsyncSnowflakeResourceWithStreamingResponse,
36
44
  )
37
45
  from ...._compat import cached_property
46
+ from .salesforce import (
47
+ SalesforceResource,
48
+ AsyncSalesforceResource,
49
+ SalesforceResourceWithRawResponse,
50
+ AsyncSalesforceResourceWithRawResponse,
51
+ SalesforceResourceWithStreamingResponse,
52
+ AsyncSalesforceResourceWithStreamingResponse,
53
+ )
38
54
  from ...._resource import SyncAPIResource, AsyncAPIResource
39
55
  from .glidian.glidian import (
40
56
  GlidianResource,
@@ -69,6 +85,14 @@ class IntegrationsResource(SyncAPIResource):
69
85
  def glidian(self) -> GlidianResource:
70
86
  return GlidianResource(self._client)
71
87
 
88
+ @cached_property
89
+ def xcures(self) -> XcuresResource:
90
+ return XcuresResource(self._client)
91
+
92
+ @cached_property
93
+ def salesforce(self) -> SalesforceResource:
94
+ return SalesforceResource(self._client)
95
+
72
96
  @cached_property
73
97
  def with_raw_response(self) -> IntegrationsResourceWithRawResponse:
74
98
  """
@@ -110,6 +134,14 @@ class AsyncIntegrationsResource(AsyncAPIResource):
110
134
  def glidian(self) -> AsyncGlidianResource:
111
135
  return AsyncGlidianResource(self._client)
112
136
 
137
+ @cached_property
138
+ def xcures(self) -> AsyncXcuresResource:
139
+ return AsyncXcuresResource(self._client)
140
+
141
+ @cached_property
142
+ def salesforce(self) -> AsyncSalesforceResource:
143
+ return AsyncSalesforceResource(self._client)
144
+
113
145
  @cached_property
114
146
  def with_raw_response(self) -> AsyncIntegrationsResourceWithRawResponse:
115
147
  """
@@ -154,6 +186,14 @@ class IntegrationsResourceWithRawResponse:
154
186
  def glidian(self) -> GlidianResourceWithRawResponse:
155
187
  return GlidianResourceWithRawResponse(self._integrations.glidian)
156
188
 
189
+ @cached_property
190
+ def xcures(self) -> XcuresResourceWithRawResponse:
191
+ return XcuresResourceWithRawResponse(self._integrations.xcures)
192
+
193
+ @cached_property
194
+ def salesforce(self) -> SalesforceResourceWithRawResponse:
195
+ return SalesforceResourceWithRawResponse(self._integrations.salesforce)
196
+
157
197
 
158
198
  class AsyncIntegrationsResourceWithRawResponse:
159
199
  def __init__(self, integrations: AsyncIntegrationsResource) -> None:
@@ -179,6 +219,14 @@ class AsyncIntegrationsResourceWithRawResponse:
179
219
  def glidian(self) -> AsyncGlidianResourceWithRawResponse:
180
220
  return AsyncGlidianResourceWithRawResponse(self._integrations.glidian)
181
221
 
222
+ @cached_property
223
+ def xcures(self) -> AsyncXcuresResourceWithRawResponse:
224
+ return AsyncXcuresResourceWithRawResponse(self._integrations.xcures)
225
+
226
+ @cached_property
227
+ def salesforce(self) -> AsyncSalesforceResourceWithRawResponse:
228
+ return AsyncSalesforceResourceWithRawResponse(self._integrations.salesforce)
229
+
182
230
 
183
231
  class IntegrationsResourceWithStreamingResponse:
184
232
  def __init__(self, integrations: IntegrationsResource) -> None:
@@ -204,6 +252,14 @@ class IntegrationsResourceWithStreamingResponse:
204
252
  def glidian(self) -> GlidianResourceWithStreamingResponse:
205
253
  return GlidianResourceWithStreamingResponse(self._integrations.glidian)
206
254
 
255
+ @cached_property
256
+ def xcures(self) -> XcuresResourceWithStreamingResponse:
257
+ return XcuresResourceWithStreamingResponse(self._integrations.xcures)
258
+
259
+ @cached_property
260
+ def salesforce(self) -> SalesforceResourceWithStreamingResponse:
261
+ return SalesforceResourceWithStreamingResponse(self._integrations.salesforce)
262
+
207
263
 
208
264
  class AsyncIntegrationsResourceWithStreamingResponse:
209
265
  def __init__(self, integrations: AsyncIntegrationsResource) -> None:
@@ -228,3 +284,11 @@ class AsyncIntegrationsResourceWithStreamingResponse:
228
284
  @cached_property
229
285
  def glidian(self) -> AsyncGlidianResourceWithStreamingResponse:
230
286
  return AsyncGlidianResourceWithStreamingResponse(self._integrations.glidian)
287
+
288
+ @cached_property
289
+ def xcures(self) -> AsyncXcuresResourceWithStreamingResponse:
290
+ return AsyncXcuresResourceWithStreamingResponse(self._integrations.xcures)
291
+
292
+ @cached_property
293
+ def salesforce(self) -> AsyncSalesforceResourceWithStreamingResponse:
294
+ return AsyncSalesforceResourceWithStreamingResponse(self._integrations.salesforce)
@@ -0,0 +1,193 @@
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
+ from typing_extensions import Literal
7
+
8
+ import httpx
9
+
10
+ from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
11
+ from ...._utils import maybe_transform, async_maybe_transform
12
+ from ...._compat import cached_property
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.integrations import salesforce_run_crud_action_params
22
+
23
+ __all__ = ["SalesforceResource", "AsyncSalesforceResource"]
24
+
25
+
26
+ class SalesforceResource(SyncAPIResource):
27
+ @cached_property
28
+ def with_raw_response(self) -> SalesforceResourceWithRawResponse:
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 SalesforceResourceWithRawResponse(self)
36
+
37
+ @cached_property
38
+ def with_streaming_response(self) -> SalesforceResourceWithStreamingResponse:
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 SalesforceResourceWithStreamingResponse(self)
45
+
46
+ def run_crud_action(
47
+ self,
48
+ slug: str,
49
+ *,
50
+ crud_action_type: Literal["create", "update", "upsert", "delete", "retrieve"],
51
+ resource_type: str,
52
+ resource_body: Dict[str, object] | NotGiven = NOT_GIVEN,
53
+ resource_id: str | NotGiven = NOT_GIVEN,
54
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
55
+ # The extra values given here take precedence over values defined on the client or passed to this method.
56
+ extra_headers: Headers | None = None,
57
+ extra_query: Query | None = None,
58
+ extra_body: Body | None = None,
59
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
60
+ ) -> object:
61
+ """
62
+ Resolve connection by slug and run a CRUD action on a Salesforce sObject.
63
+
64
+ Args:
65
+ extra_headers: Send extra headers
66
+
67
+ extra_query: Add additional query parameters to the request
68
+
69
+ extra_body: Add additional JSON properties to the request
70
+
71
+ timeout: Override the client-level default timeout for this request, in seconds
72
+ """
73
+ if not slug:
74
+ raise ValueError(f"Expected a non-empty value for `slug` but received {slug!r}")
75
+ return self._post(
76
+ f"/api/v2/integrations/salesforce/{slug}/crud-action",
77
+ body=maybe_transform(
78
+ {
79
+ "crud_action_type": crud_action_type,
80
+ "resource_type": resource_type,
81
+ "resource_body": resource_body,
82
+ "resource_id": resource_id,
83
+ },
84
+ salesforce_run_crud_action_params.SalesforceRunCrudActionParams,
85
+ ),
86
+ options=make_request_options(
87
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
88
+ ),
89
+ cast_to=object,
90
+ )
91
+
92
+
93
+ class AsyncSalesforceResource(AsyncAPIResource):
94
+ @cached_property
95
+ def with_raw_response(self) -> AsyncSalesforceResourceWithRawResponse:
96
+ """
97
+ This property can be used as a prefix for any HTTP method call to return
98
+ the raw response object instead of the parsed content.
99
+
100
+ For more information, see https://www.github.com/samplehc/samplehc-python#accessing-raw-response-data-eg-headers
101
+ """
102
+ return AsyncSalesforceResourceWithRawResponse(self)
103
+
104
+ @cached_property
105
+ def with_streaming_response(self) -> AsyncSalesforceResourceWithStreamingResponse:
106
+ """
107
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
108
+
109
+ For more information, see https://www.github.com/samplehc/samplehc-python#with_streaming_response
110
+ """
111
+ return AsyncSalesforceResourceWithStreamingResponse(self)
112
+
113
+ async def run_crud_action(
114
+ self,
115
+ slug: str,
116
+ *,
117
+ crud_action_type: Literal["create", "update", "upsert", "delete", "retrieve"],
118
+ resource_type: str,
119
+ resource_body: Dict[str, object] | NotGiven = NOT_GIVEN,
120
+ resource_id: str | NotGiven = NOT_GIVEN,
121
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
122
+ # The extra values given here take precedence over values defined on the client or passed to this method.
123
+ extra_headers: Headers | None = None,
124
+ extra_query: Query | None = None,
125
+ extra_body: Body | None = None,
126
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
127
+ ) -> object:
128
+ """
129
+ Resolve connection by slug and run a CRUD action on a Salesforce sObject.
130
+
131
+ Args:
132
+ extra_headers: Send extra headers
133
+
134
+ extra_query: Add additional query parameters to the request
135
+
136
+ extra_body: Add additional JSON properties to the request
137
+
138
+ timeout: Override the client-level default timeout for this request, in seconds
139
+ """
140
+ if not slug:
141
+ raise ValueError(f"Expected a non-empty value for `slug` but received {slug!r}")
142
+ return await self._post(
143
+ f"/api/v2/integrations/salesforce/{slug}/crud-action",
144
+ body=await async_maybe_transform(
145
+ {
146
+ "crud_action_type": crud_action_type,
147
+ "resource_type": resource_type,
148
+ "resource_body": resource_body,
149
+ "resource_id": resource_id,
150
+ },
151
+ salesforce_run_crud_action_params.SalesforceRunCrudActionParams,
152
+ ),
153
+ options=make_request_options(
154
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
155
+ ),
156
+ cast_to=object,
157
+ )
158
+
159
+
160
+ class SalesforceResourceWithRawResponse:
161
+ def __init__(self, salesforce: SalesforceResource) -> None:
162
+ self._salesforce = salesforce
163
+
164
+ self.run_crud_action = to_raw_response_wrapper(
165
+ salesforce.run_crud_action,
166
+ )
167
+
168
+
169
+ class AsyncSalesforceResourceWithRawResponse:
170
+ def __init__(self, salesforce: AsyncSalesforceResource) -> None:
171
+ self._salesforce = salesforce
172
+
173
+ self.run_crud_action = async_to_raw_response_wrapper(
174
+ salesforce.run_crud_action,
175
+ )
176
+
177
+
178
+ class SalesforceResourceWithStreamingResponse:
179
+ def __init__(self, salesforce: SalesforceResource) -> None:
180
+ self._salesforce = salesforce
181
+
182
+ self.run_crud_action = to_streamed_response_wrapper(
183
+ salesforce.run_crud_action,
184
+ )
185
+
186
+
187
+ class AsyncSalesforceResourceWithStreamingResponse:
188
+ def __init__(self, salesforce: AsyncSalesforceResource) -> None:
189
+ self._salesforce = salesforce
190
+
191
+ self.run_crud_action = async_to_streamed_response_wrapper(
192
+ salesforce.run_crud_action,
193
+ )
@@ -7,18 +7,18 @@ from typing_extensions import Literal
7
7
 
8
8
  import httpx
9
9
 
10
- from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven
11
- from ....._utils import maybe_transform, async_maybe_transform
12
- from ....._compat import cached_property
13
- from ....._resource import SyncAPIResource, AsyncAPIResource
14
- from ....._response import (
10
+ from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
11
+ from ...._utils import maybe_transform, async_maybe_transform
12
+ from ...._compat import cached_property
13
+ from ...._resource import SyncAPIResource, AsyncAPIResource
14
+ from ...._response import (
15
15
  to_raw_response_wrapper,
16
16
  to_streamed_response_wrapper,
17
17
  async_to_raw_response_wrapper,
18
18
  async_to_streamed_response_wrapper,
19
19
  )
20
- from ....._base_client import make_request_options
21
- from .....types.v2.events.integrations import xcure_make_request_params
20
+ from ...._base_client import make_request_options
21
+ from ....types.v2.integrations import xcure_make_request_params
22
22
 
23
23
  __all__ = ["XcuresResource", "AsyncXcuresResource"]
24
24