samplehc 0.16.0__py3-none-any.whl → 0.18.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 (150) hide show
  1. samplehc/_client.py +1 -38
  2. samplehc/_version.py +1 -1
  3. samplehc/resources/__init__.py +0 -14
  4. samplehc/resources/v2/__init__.py +0 -98
  5. samplehc/resources/v2/async_results.py +0 -79
  6. samplehc/resources/v2/documents/__init__.py +0 -14
  7. samplehc/resources/v2/documents/documents.py +0 -194
  8. samplehc/resources/v2/v2.py +0 -224
  9. samplehc/types/__init__.py +0 -5
  10. samplehc/types/v2/__init__.py +0 -53
  11. samplehc/types/v2/documents/__init__.py +0 -3
  12. {samplehc-0.16.0.dist-info → samplehc-0.18.0.dist-info}/METADATA +22 -27
  13. samplehc-0.18.0.dist-info/RECORD +92 -0
  14. samplehc/resources/v1/__init__.py +0 -19
  15. samplehc/resources/v1/v1.py +0 -298
  16. samplehc/resources/v2/clearinghouse/__init__.py +0 -47
  17. samplehc/resources/v2/clearinghouse/claim.py +0 -407
  18. samplehc/resources/v2/clearinghouse/clearinghouse.py +0 -844
  19. samplehc/resources/v2/clearinghouse/payers.py +0 -224
  20. samplehc/resources/v2/documents/pdf_template.py +0 -165
  21. samplehc/resources/v2/hie/__init__.py +0 -47
  22. samplehc/resources/v2/hie/adt.py +0 -249
  23. samplehc/resources/v2/hie/documents.py +0 -390
  24. samplehc/resources/v2/hie/hie.py +0 -134
  25. samplehc/resources/v2/integrations/__init__.py +0 -131
  26. samplehc/resources/v2/integrations/bank/__init__.py +0 -33
  27. samplehc/resources/v2/integrations/bank/bank.py +0 -102
  28. samplehc/resources/v2/integrations/bank/transactions.py +0 -185
  29. samplehc/resources/v2/integrations/careviso.py +0 -372
  30. samplehc/resources/v2/integrations/glidian/__init__.py +0 -33
  31. samplehc/resources/v2/integrations/glidian/glidian.py +0 -425
  32. samplehc/resources/v2/integrations/glidian/prior_authorizations/__init__.py +0 -33
  33. samplehc/resources/v2/integrations/glidian/prior_authorizations/clinical_questions.py +0 -276
  34. samplehc/resources/v2/integrations/glidian/prior_authorizations/prior_authorizations.py +0 -527
  35. samplehc/resources/v2/integrations/integrations.py +0 -326
  36. samplehc/resources/v2/integrations/kno2/__init__.py +0 -33
  37. samplehc/resources/v2/integrations/kno2/kno2.py +0 -102
  38. samplehc/resources/v2/integrations/kno2/messages.py +0 -260
  39. samplehc/resources/v2/integrations/salesforce.py +0 -277
  40. samplehc/resources/v2/integrations/snowflake.py +0 -173
  41. samplehc/resources/v2/integrations/wellsky/__init__.py +0 -33
  42. samplehc/resources/v2/integrations/wellsky/patients.py +0 -324
  43. samplehc/resources/v2/integrations/wellsky/wellsky.py +0 -102
  44. samplehc/resources/v2/integrations/xcures.py +0 -197
  45. samplehc/resources/v2/policies.py +0 -655
  46. samplehc/resources/v2/tasks/__init__.py +0 -33
  47. samplehc/resources/v2/tasks/state.py +0 -266
  48. samplehc/resources/v2/tasks/tasks.py +0 -754
  49. samplehc/resources/v2/workflow_runs/__init__.py +0 -33
  50. samplehc/resources/v2/workflow_runs/step.py +0 -169
  51. samplehc/resources/v2/workflow_runs/workflow_runs.py +0 -479
  52. samplehc/resources/v2/workflows.py +0 -365
  53. samplehc/types/v1/__init__.py +0 -3
  54. samplehc/types/v1_query_audit_logs_params.py +0 -12
  55. samplehc/types/v1_query_audit_logs_response.py +0 -16
  56. samplehc/types/v1_sql_execute_params.py +0 -27
  57. samplehc/types/v1_sql_execute_response.py +0 -27
  58. samplehc/types/v2/async_result_retrieve_response.py +0 -18
  59. samplehc/types/v2/clearinghouse/__init__.py +0 -9
  60. samplehc/types/v2/clearinghouse/claim_submit_params.py +0 -2693
  61. samplehc/types/v2/clearinghouse/claim_submit_response.py +0 -23
  62. samplehc/types/v2/clearinghouse/payer_list_response.py +0 -27
  63. samplehc/types/v2/clearinghouse/payer_search_params.py +0 -12
  64. samplehc/types/v2/clearinghouse/payer_search_response.py +0 -33
  65. samplehc/types/v2/clearinghouse_calculate_patient_cost_params.py +0 -3129
  66. samplehc/types/v2/clearinghouse_check_claim_status_params.py +0 -41
  67. samplehc/types/v2/clearinghouse_check_eligibility_params.py +0 -36
  68. samplehc/types/v2/clearinghouse_check_eligibility_response.py +0 -15
  69. samplehc/types/v2/clearinghouse_coordination_of_benefits_params.py +0 -35
  70. samplehc/types/v2/clearinghouse_run_discovery_params.py +0 -59
  71. samplehc/types/v2/clearinghouse_run_discovery_response.py +0 -13
  72. samplehc/types/v2/document_unzip_async_response.py +0 -12
  73. samplehc/types/v2/document_unzip_response.py +0 -20
  74. samplehc/types/v2/documents/pdf_template_retrieve_metadata_response.py +0 -17
  75. samplehc/types/v2/hie/__init__.py +0 -8
  76. samplehc/types/v2/hie/adt_subscribe_params.py +0 -92
  77. samplehc/types/v2/hie/document_query_params.py +0 -92
  78. samplehc/types/v2/hie/document_query_response.py +0 -16
  79. samplehc/types/v2/hie/document_upload_params.py +0 -54
  80. samplehc/types/v2/integrations/__init__.py +0 -23
  81. samplehc/types/v2/integrations/bank/__init__.py +0 -6
  82. samplehc/types/v2/integrations/bank/transaction_sync_params.py +0 -15
  83. samplehc/types/v2/integrations/bank/transaction_sync_response.py +0 -26
  84. samplehc/types/v2/integrations/careviso_get_payers_response.py +0 -19
  85. samplehc/types/v2/integrations/careviso_submit_prior_authorization_params.py +0 -90
  86. samplehc/types/v2/integrations/glidian/__init__.py +0 -20
  87. samplehc/types/v2/integrations/glidian/prior_authorization_create_draft_params.py +0 -32
  88. samplehc/types/v2/integrations/glidian/prior_authorization_create_draft_response.py +0 -24
  89. samplehc/types/v2/integrations/glidian/prior_authorization_retrieve_record_response.py +0 -13
  90. samplehc/types/v2/integrations/glidian/prior_authorization_submit_response.py +0 -16
  91. samplehc/types/v2/integrations/glidian/prior_authorization_update_record_params.py +0 -20
  92. samplehc/types/v2/integrations/glidian/prior_authorization_update_record_response.py +0 -16
  93. samplehc/types/v2/integrations/glidian/prior_authorizations/__init__.py +0 -7
  94. samplehc/types/v2/integrations/glidian/prior_authorizations/clinical_question_list_response.py +0 -42
  95. samplehc/types/v2/integrations/glidian/prior_authorizations/clinical_question_update_params.py +0 -23
  96. samplehc/types/v2/integrations/glidian/prior_authorizations/clinical_question_update_response.py +0 -19
  97. samplehc/types/v2/integrations/glidian_get_submission_requirements_params.py +0 -17
  98. samplehc/types/v2/integrations/glidian_get_submission_requirements_response.py +0 -31
  99. samplehc/types/v2/integrations/glidian_list_payers_params.py +0 -11
  100. samplehc/types/v2/integrations/glidian_list_payers_response.py +0 -17
  101. samplehc/types/v2/integrations/glidian_list_services_params.py +0 -13
  102. samplehc/types/v2/integrations/glidian_list_services_response.py +0 -19
  103. samplehc/types/v2/integrations/kno2/__init__.py +0 -6
  104. samplehc/types/v2/integrations/kno2/message_get_attachment_response.py +0 -15
  105. samplehc/types/v2/integrations/kno2/message_retrieve_response.py +0 -13
  106. samplehc/types/v2/integrations/salesforce_run_crud_action_params.py +0 -22
  107. samplehc/types/v2/integrations/salesforce_run_soql_query_params.py +0 -11
  108. samplehc/types/v2/integrations/snowflake_query_params.py +0 -12
  109. samplehc/types/v2/integrations/snowflake_query_response.py +0 -8
  110. samplehc/types/v2/integrations/wellsky/__init__.py +0 -6
  111. samplehc/types/v2/integrations/wellsky/patient_add_params.py +0 -13
  112. samplehc/types/v2/integrations/wellsky/patient_search_params.py +0 -32
  113. samplehc/types/v2/integrations/xcure_make_request_params.py +0 -18
  114. samplehc/types/v2/ledger/__init__.py +0 -3
  115. samplehc/types/v2/policy_list_companies_params.py +0 -18
  116. samplehc/types/v2/policy_list_companies_response.py +0 -24
  117. samplehc/types/v2/policy_list_params.py +0 -47
  118. samplehc/types/v2/policy_list_plans_params.py +0 -18
  119. samplehc/types/v2/policy_list_plans_response.py +0 -30
  120. samplehc/types/v2/policy_list_response.py +0 -67
  121. samplehc/types/v2/policy_retrieve_presigned_url_response.py +0 -17
  122. samplehc/types/v2/policy_retrieve_text_response.py +0 -12
  123. samplehc/types/v2/task_cancel_response.py +0 -12
  124. samplehc/types/v2/task_complete_params.py +0 -12
  125. samplehc/types/v2/task_complete_response.py +0 -16
  126. samplehc/types/v2/task_get_suspended_payload_response.py +0 -8
  127. samplehc/types/v2/task_retrieve_response.py +0 -22
  128. samplehc/types/v2/task_retry_response.py +0 -10
  129. samplehc/types/v2/task_update_column_params.py +0 -19
  130. samplehc/types/v2/task_update_column_response.py +0 -9
  131. samplehc/types/v2/task_update_screen_time_params.py +0 -14
  132. samplehc/types/v2/task_update_screen_time_response.py +0 -8
  133. samplehc/types/v2/tasks/__init__.py +0 -7
  134. samplehc/types/v2/tasks/state_get_response.py +0 -8
  135. samplehc/types/v2/tasks/state_update_params.py +0 -13
  136. samplehc/types/v2/tasks/state_update_response.py +0 -9
  137. samplehc/types/v2/workflow_deploy_response.py +0 -12
  138. samplehc/types/v2/workflow_query_params.py +0 -12
  139. samplehc/types/v2/workflow_query_response.py +0 -8
  140. samplehc/types/v2/workflow_run_get_start_data_response.py +0 -14
  141. samplehc/types/v2/workflow_run_resume_when_complete_params.py +0 -14
  142. samplehc/types/v2/workflow_run_resume_when_complete_response.py +0 -12
  143. samplehc/types/v2/workflow_run_retrieve_response.py +0 -16
  144. samplehc/types/v2/workflow_runs/__init__.py +0 -5
  145. samplehc/types/v2/workflow_runs/step_get_output_response.py +0 -14
  146. samplehc/types/v2/workflow_start_params.py +0 -17
  147. samplehc/types/v2/workflow_start_response.py +0 -25
  148. samplehc-0.16.0.dist-info/RECORD +0 -226
  149. {samplehc-0.16.0.dist-info → samplehc-0.18.0.dist-info}/WHEEL +0 -0
  150. {samplehc-0.16.0.dist-info → samplehc-0.18.0.dist-info}/licenses/LICENSE +0 -0
@@ -3,66 +3,34 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from .event_emit_params import EventEmitParams as EventEmitParams
6
- from .policy_list_params import PolicyListParams as PolicyListParams
7
6
  from .event_emit_response import EventEmitResponse as EventEmitResponse
8
- from .task_retry_response import TaskRetryResponse as TaskRetryResponse
9
- from .policy_list_response import PolicyListResponse as PolicyListResponse
10
- from .task_cancel_response import TaskCancelResponse as TaskCancelResponse
11
- from .task_complete_params import TaskCompleteParams as TaskCompleteParams
12
7
  from .document_split_params import DocumentSplitParams as DocumentSplitParams
13
- from .workflow_query_params import WorkflowQueryParams as WorkflowQueryParams
14
- from .workflow_start_params import WorkflowStartParams as WorkflowStartParams
15
8
  from .document_search_params import DocumentSearchParams as DocumentSearchParams
16
- from .task_complete_response import TaskCompleteResponse as TaskCompleteResponse
17
- from .task_retrieve_response import TaskRetrieveResponse as TaskRetrieveResponse
18
9
  from .document_combine_params import DocumentCombineParams as DocumentCombineParams
19
10
  from .document_extract_params import DocumentExtractParams as DocumentExtractParams
20
11
  from .document_split_response import DocumentSplitResponse as DocumentSplitResponse
21
- from .document_unzip_response import DocumentUnzipResponse as DocumentUnzipResponse
22
- from .workflow_query_response import WorkflowQueryResponse as WorkflowQueryResponse
23
- from .workflow_start_response import WorkflowStartResponse as WorkflowStartResponse
24
12
  from .document_classify_params import DocumentClassifyParams as DocumentClassifyParams
25
13
  from .document_search_response import DocumentSearchResponse as DocumentSearchResponse
26
- from .policy_list_plans_params import PolicyListPlansParams as PolicyListPlansParams
27
- from .workflow_deploy_response import WorkflowDeployResponse as WorkflowDeployResponse
28
14
  from .async_result_sleep_params import AsyncResultSleepParams as AsyncResultSleepParams
29
15
  from .document_combine_response import DocumentCombineResponse as DocumentCombineResponse
30
16
  from .document_extract_response import DocumentExtractResponse as DocumentExtractResponse
31
- from .task_update_column_params import TaskUpdateColumnParams as TaskUpdateColumnParams
32
17
  from .document_classify_response import DocumentClassifyResponse as DocumentClassifyResponse
33
18
  from .document_retrieve_response import DocumentRetrieveResponse as DocumentRetrieveResponse
34
- from .policy_list_plans_response import PolicyListPlansResponse as PolicyListPlansResponse
35
19
  from .async_result_sleep_response import AsyncResultSleepResponse as AsyncResultSleepResponse
36
20
  from .database_execute_sql_params import DatabaseExecuteSqlParams as DatabaseExecuteSqlParams
37
- from .task_update_column_response import TaskUpdateColumnResponse as TaskUpdateColumnResponse
38
21
  from .document_generate_csv_params import DocumentGenerateCsvParams as DocumentGenerateCsvParams
39
- from .policy_list_companies_params import PolicyListCompaniesParams as PolicyListCompaniesParams
40
22
  from .communication_send_fax_params import CommunicationSendFaxParams as CommunicationSendFaxParams
41
23
  from .database_execute_sql_response import DatabaseExecuteSqlResponse as DatabaseExecuteSqlResponse
42
- from .document_unzip_async_response import DocumentUnzipAsyncResponse as DocumentUnzipAsyncResponse
43
- from .policy_retrieve_text_response import PolicyRetrieveTextResponse as PolicyRetrieveTextResponse
44
- from .async_result_retrieve_response import AsyncResultRetrieveResponse as AsyncResultRetrieveResponse
45
24
  from .document_generate_csv_response import DocumentGenerateCsvResponse as DocumentGenerateCsvResponse
46
- from .policy_list_companies_response import PolicyListCompaniesResponse as PolicyListCompaniesResponse
47
- from .task_update_screen_time_params import TaskUpdateScreenTimeParams as TaskUpdateScreenTimeParams
48
- from .workflow_run_retrieve_response import WorkflowRunRetrieveResponse as WorkflowRunRetrieveResponse
49
25
  from .communication_send_email_params import CommunicationSendEmailParams as CommunicationSendEmailParams
50
26
  from .communication_send_fax_response import CommunicationSendFaxResponse as CommunicationSendFaxResponse
51
27
  from .communication_send_letter_params import CommunicationSendLetterParams as CommunicationSendLetterParams
52
- from .task_update_screen_time_response import TaskUpdateScreenTimeResponse as TaskUpdateScreenTimeResponse
53
28
  from .communication_send_email_response import CommunicationSendEmailResponse as CommunicationSendEmailResponse
54
- from .clearinghouse_run_discovery_params import ClearinghouseRunDiscoveryParams as ClearinghouseRunDiscoveryParams
55
29
  from .communication_send_letter_response import CommunicationSendLetterResponse as CommunicationSendLetterResponse
56
30
  from .document_create_from_splits_params import DocumentCreateFromSplitsParams as DocumentCreateFromSplitsParams
57
31
  from .document_retrieve_metadata_response import DocumentRetrieveMetadataResponse as DocumentRetrieveMetadataResponse
58
- from .task_get_suspended_payload_response import TaskGetSuspendedPayloadResponse as TaskGetSuspendedPayloadResponse
59
- from .clearinghouse_run_discovery_response import ClearinghouseRunDiscoveryResponse as ClearinghouseRunDiscoveryResponse
60
32
  from .document_create_from_splits_response import DocumentCreateFromSplitsResponse as DocumentCreateFromSplitsResponse
61
33
  from .document_presigned_upload_url_params import DocumentPresignedUploadURLParams as DocumentPresignedUploadURLParams
62
- from .workflow_run_get_start_data_response import WorkflowRunGetStartDataResponse as WorkflowRunGetStartDataResponse
63
- from .clearinghouse_check_eligibility_params import (
64
- ClearinghouseCheckEligibilityParams as ClearinghouseCheckEligibilityParams,
65
- )
66
34
  from .document_presigned_upload_url_response import (
67
35
  DocumentPresignedUploadURLResponse as DocumentPresignedUploadURLResponse,
68
36
  )
@@ -72,27 +40,6 @@ from .document_retrieve_csv_content_response import (
72
40
  from .document_transform_json_to_html_params import (
73
41
  DocumentTransformJsonToHTMLParams as DocumentTransformJsonToHTMLParams,
74
42
  )
75
- from .policy_retrieve_presigned_url_response import (
76
- PolicyRetrievePresignedURLResponse as PolicyRetrievePresignedURLResponse,
77
- )
78
- from .clearinghouse_check_claim_status_params import (
79
- ClearinghouseCheckClaimStatusParams as ClearinghouseCheckClaimStatusParams,
80
- )
81
- from .clearinghouse_check_eligibility_response import (
82
- ClearinghouseCheckEligibilityResponse as ClearinghouseCheckEligibilityResponse,
83
- )
84
43
  from .document_transform_json_to_html_response import (
85
44
  DocumentTransformJsonToHTMLResponse as DocumentTransformJsonToHTMLResponse,
86
45
  )
87
- from .workflow_run_resume_when_complete_params import (
88
- WorkflowRunResumeWhenCompleteParams as WorkflowRunResumeWhenCompleteParams,
89
- )
90
- from .workflow_run_resume_when_complete_response import (
91
- WorkflowRunResumeWhenCompleteResponse as WorkflowRunResumeWhenCompleteResponse,
92
- )
93
- from .clearinghouse_calculate_patient_cost_params import (
94
- ClearinghouseCalculatePatientCostParams as ClearinghouseCalculatePatientCostParams,
95
- )
96
- from .clearinghouse_coordination_of_benefits_params import (
97
- ClearinghouseCoordinationOfBenefitsParams as ClearinghouseCoordinationOfBenefitsParams,
98
- )
@@ -12,9 +12,6 @@ from .format_create_pdf_params import FormatCreatePdfParams as FormatCreatePdfPa
12
12
  from .format_create_pdf_response import FormatCreatePdfResponse as FormatCreatePdfResponse
13
13
  from .template_render_document_params import TemplateRenderDocumentParams as TemplateRenderDocumentParams
14
14
  from .template_render_document_response import TemplateRenderDocumentResponse as TemplateRenderDocumentResponse
15
- from .pdf_template_retrieve_metadata_response import (
16
- PdfTemplateRetrieveMetadataResponse as PdfTemplateRetrieveMetadataResponse,
17
- )
18
15
  from .template_generate_document_async_params import (
19
16
  TemplateGenerateDocumentAsyncParams as TemplateGenerateDocumentAsyncParams,
20
17
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: samplehc
3
- Version: 0.16.0
3
+ Version: 0.18.0
4
4
  Summary: The official Python library for the Sample Healthcare API
5
5
  Project-URL: Homepage, https://github.com/samplehc/samplehc-python
6
6
  Project-URL: Repository, https://github.com/samplehc/samplehc-python
@@ -67,10 +67,10 @@ client = SampleHealthcare(
67
67
  api_key=os.environ.get("SAMPLEHC_API_KEY"), # This is the default and can be omitted
68
68
  )
69
69
 
70
- response = client.v1.sql_execute(
71
- query="REPLACE_ME",
72
- params=[{}],
70
+ response = client.v2.async_results.sleep(
71
+ delay=1,
73
72
  )
73
+ print(response.async_result_id)
74
74
  ```
75
75
 
76
76
  While you can provide an `api_key` keyword argument,
@@ -93,10 +93,10 @@ client = AsyncSampleHealthcare(
93
93
 
94
94
 
95
95
  async def main() -> None:
96
- response = await client.v1.sql_execute(
97
- query="REPLACE_ME",
98
- params=[{}],
96
+ response = await client.v2.async_results.sleep(
97
+ delay=1,
99
98
  )
99
+ print(response.async_result_id)
100
100
 
101
101
 
102
102
  asyncio.run(main())
@@ -129,10 +129,10 @@ async def main() -> None:
129
129
  api_key=os.environ.get("SAMPLEHC_API_KEY"), # This is the default and can be omitted
130
130
  http_client=DefaultAioHttpClient(),
131
131
  ) as client:
132
- response = await client.v1.sql_execute(
133
- query="REPLACE_ME",
134
- params=[{}],
132
+ response = await client.v2.async_results.sleep(
133
+ delay=1,
135
134
  )
135
+ print(response.async_result_id)
136
136
 
137
137
 
138
138
  asyncio.run(main())
@@ -182,9 +182,8 @@ from samplehc import SampleHealthcare
182
182
  client = SampleHealthcare()
183
183
 
184
184
  try:
185
- client.v1.sql_execute(
186
- query="REPLACE_ME",
187
- params=[{}],
185
+ client.v2.async_results.sleep(
186
+ delay=1,
188
187
  )
189
188
  except samplehc.APIConnectionError as e:
190
189
  print("The server could not be reached")
@@ -228,9 +227,8 @@ client = SampleHealthcare(
228
227
  )
229
228
 
230
229
  # Or, configure per-request:
231
- client.with_options(max_retries=5).v1.sql_execute(
232
- query="REPLACE_ME",
233
- params=[{}],
230
+ client.with_options(max_retries=5).v2.async_results.sleep(
231
+ delay=1,
234
232
  )
235
233
  ```
236
234
 
@@ -254,9 +252,8 @@ client = SampleHealthcare(
254
252
  )
255
253
 
256
254
  # Override per-request:
257
- client.with_options(timeout=5.0).v1.sql_execute(
258
- query="REPLACE_ME",
259
- params=[{}],
255
+ client.with_options(timeout=5.0).v2.async_results.sleep(
256
+ delay=1,
260
257
  )
261
258
  ```
262
259
 
@@ -298,14 +295,13 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
298
295
  from samplehc import SampleHealthcare
299
296
 
300
297
  client = SampleHealthcare()
301
- response = client.v1.with_raw_response.sql_execute(
302
- query="REPLACE_ME",
303
- params=[{}],
298
+ response = client.v2.async_results.with_raw_response.sleep(
299
+ delay=1,
304
300
  )
305
301
  print(response.headers.get('X-My-Header'))
306
302
 
307
- v1 = response.parse() # get the object that `v1.sql_execute()` would have returned
308
- print(v1)
303
+ async_result = response.parse() # get the object that `v2.async_results.sleep()` would have returned
304
+ print(async_result.async_result_id)
309
305
  ```
310
306
 
311
307
  These methods return an [`APIResponse`](https://github.com/samplehc/samplehc-python/tree/main/src/samplehc/_response.py) object.
@@ -319,9 +315,8 @@ The above interface eagerly reads the full response body when you make the reque
319
315
  To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.
320
316
 
321
317
  ```python
322
- with client.v1.with_streaming_response.sql_execute(
323
- query="REPLACE_ME",
324
- params=[{}],
318
+ with client.v2.async_results.with_streaming_response.sleep(
319
+ delay=1,
325
320
  ) as response:
326
321
  print(response.headers.get("X-My-Header"))
327
322
 
@@ -0,0 +1,92 @@
1
+ samplehc/__init__.py,sha256=Kze-TKDp8j_TYknemcBAyGIxn7a_RUlisf07X8IYIVI,2731
2
+ samplehc/_base_client.py,sha256=ooaPntKjp5cnswE1QYfWraRZ2j7m2ctk3ypSUQZyfqQ,73411
3
+ samplehc/_client.py,sha256=-VgT2RjwwXmWayeZy98IhH_F-AkMOt6zOidBZIbrHCE,16714
4
+ samplehc/_compat.py,sha256=DQBVORjFb33zch24jzkhM14msvnzY7mmSmgDLaVFUM8,6562
5
+ samplehc/_constants.py,sha256=S14PFzyN9-I31wiV7SmIlL5Ga0MLHxdvegInGdXH7tM,462
6
+ samplehc/_exceptions.py,sha256=MxVd0pThtjM7aV1xjQcQ6nGSfxJMa5xPhoLsmtSxQgU,3240
7
+ samplehc/_files.py,sha256=KnEzGi_O756MvKyJ4fOCW_u3JhOeWPQ4RsmDvqihDQU,3545
8
+ samplehc/_models.py,sha256=R3MpO2z4XhTAnD3ObEks32suRXleF1g7BEgQTOLIxTs,32112
9
+ samplehc/_qs.py,sha256=craIKyvPktJ94cvf9zn8j8ekG9dWJzhWv0ob34lIOv4,4828
10
+ samplehc/_resource.py,sha256=Mdg6fhf_5wYd2K2JZ4BQIJMPqJOWetqpJE3h3MmGZJE,1160
11
+ samplehc/_response.py,sha256=UzsuYRbic274gcdUWq9ShPkdRt7VrzkjaqwSwdxqWIs,28816
12
+ samplehc/_streaming.py,sha256=Wsd0pUQJT1ZW9v_iBIFKDS9lukt3M0X96f3Enqx1PYY,10261
13
+ samplehc/_types.py,sha256=j9OfrgjmrZOU2T8RbK9QKC0plnD1UCUWuH5oRR2oY3c,7596
14
+ samplehc/_version.py,sha256=6eoQXV_WNfNVXJINJgx0fIOBOKFngeWrIJuGHHiq7Og,161
15
+ samplehc/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
+ samplehc/_utils/__init__.py,sha256=7fch0GT9zpNnErbciSpUNa-SjTxxjY6kxHxKMOM4AGs,2305
17
+ samplehc/_utils/_compat.py,sha256=D8gtAvjJQrDWt9upS0XaG9Rr5l1QhiAx_I_1utT_tt0,1195
18
+ samplehc/_utils/_datetime_parse.py,sha256=bABTs0Bc6rabdFvnIwXjEhWL15TcRgWZ_6XGTqN8xUk,4204
19
+ samplehc/_utils/_logs.py,sha256=EEt3P1dtoGlkVTZOwVml4xf3j9DvdDTzG2TpBjcQINc,789
20
+ samplehc/_utils/_proxy.py,sha256=aglnj2yBTDyGX9Akk2crZHrl10oqRmceUy2Zp008XEs,1975
21
+ samplehc/_utils/_reflection.py,sha256=ZmGkIgT_PuwedyNBrrKGbxoWtkpytJNU1uU4QHnmEMU,1364
22
+ samplehc/_utils/_resources_proxy.py,sha256=NejY5ZPSVISf1S6P7a-AHToRY85AllNZg7ukouCdCjU,599
23
+ samplehc/_utils/_streams.py,sha256=SMC90diFFecpEg_zgDRVbdR3hSEIgVVij4taD-noMLM,289
24
+ samplehc/_utils/_sync.py,sha256=HBnZkkBnzxtwOZe0212C4EyoRvxhTVtTrLFDz2_xVCg,1589
25
+ samplehc/_utils/_transform.py,sha256=NjCzmnfqYrsAikUHQig6N9QfuTVbKipuP3ur9mcNF-E,15951
26
+ samplehc/_utils/_typing.py,sha256=N_5PPuFNsaygbtA_npZd98SVN1LQQvFTKL6bkWPBZGU,4786
27
+ samplehc/_utils/_utils.py,sha256=ugfUaneOK7I8h9b3656flwf5u_kthY0gvNuqvgOLoSU,12252
28
+ samplehc/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
29
+ samplehc/resources/__init__.py,sha256=ADMc9HzQlsVyP-m8qS4BV71h91vHtlVqhZnJVOAI2Og,500
30
+ samplehc/resources/v2/__init__.py,sha256=YPfxz80s9XhSRRH9RUq0K4TFrwXDz73P6ogRbTV-0uE,2985
31
+ samplehc/resources/v2/async_results.py,sha256=cZ-PWCSo7dM0y9FD1P-LwkvsMIp9e6_gSc5jl7T3d60,10353
32
+ samplehc/resources/v2/communication.py,sha256=fHM2kBpKvOpzROfVKIx2Nmuw-iSs6nSH-IZJZdte3M8,21239
33
+ samplehc/resources/v2/database.py,sha256=lFLepM70TzkRBaejyfU5GmE3PfgIaBi_liRTpJs2lzM,7950
34
+ samplehc/resources/v2/events.py,sha256=Kdx2fSNGr21YA7fAHvs9huMGDRra8bsvnxiO1B1ZlSE,6658
35
+ samplehc/resources/v2/v2.py,sha256=9cVu2WRE07VCDJrQZIhdjJkzcvuyLrWHLamWGhZnNiY,8210
36
+ samplehc/resources/v2/documents/__init__.py,sha256=wGPR6hdfmDxt-nXn0cDIud1eZAEs_j3kZd4KrxnuoEg,1993
37
+ samplehc/resources/v2/documents/documents.py,sha256=rto1sIAT1Oz_FbgB3rwBXsXaGOAT353wRP6_4l4doys,56630
38
+ samplehc/resources/v2/documents/formats.py,sha256=lB60NUBPBceC1XUbL04lsGIsyVWlqsOE8kQkw5oKIM0,6993
39
+ samplehc/resources/v2/documents/legacy.py,sha256=CbDfHJK_U-sDW1rIp8Hj7pTKKHscwmdijSx4mWALQk8,14095
40
+ samplehc/resources/v2/documents/templates.py,sha256=P6gbC8JxEKXN05yCO2NUXGv-ooLBkwQvDpOy4KccprY,17115
41
+ samplehc/types/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekDUge2o_4pXQ,122
42
+ samplehc/types/v2/__init__.py,sha256=e2G4aZMEyN94eF5XkH0G7yDB30-KawWnxqywESEW75s,3443
43
+ samplehc/types/v2/async_result_sleep_params.py,sha256=vdhEdUP6vA9Y44waJBU2p_PEC-rzWBOr4RkE1F2eTHs,729
44
+ samplehc/types/v2/async_result_sleep_response.py,sha256=nAUL4IVyG9RjVZtNyMnn_sp1mcwatJCEBjBCDf6bDtM,366
45
+ samplehc/types/v2/communication_send_email_params.py,sha256=thNaWdxK4JwOk4JQ0zvb3rab9AlOfkDbaweP_7vXsIg,1638
46
+ samplehc/types/v2/communication_send_email_response.py,sha256=0MFpU0BjZymL6dkOnxZ7wo-lUGy0l1eMjJ_vQxotejQ,665
47
+ samplehc/types/v2/communication_send_fax_params.py,sha256=QysQOLT_Rj4Cd_Q-YApgHoa6SOlTpFlXpTipwYJ9d-E,1595
48
+ samplehc/types/v2/communication_send_fax_response.py,sha256=BPXrsTZPB2rMVdkToQC1y69i-9eN-X830gRit10SRwY,427
49
+ samplehc/types/v2/communication_send_letter_params.py,sha256=rr_Ys_-WYo4ihzEyYZWyI9_-agL37zlRoJSW-7Dm5Yw,2136
50
+ samplehc/types/v2/communication_send_letter_response.py,sha256=uCq0J35m9BhzKOUO7DyS4lKCy9q44zgiWhrMkZ_HtMw,404
51
+ samplehc/types/v2/database_execute_sql_params.py,sha256=9JhgbItnJenQAP4VQPuM7CW4P3ONTWbdor9x5Gn1ZWo,783
52
+ samplehc/types/v2/database_execute_sql_response.py,sha256=2C0U5VC94Rvvkxk13KbNwefOYaPBJ3hK3ix-KKxyHVg,468
53
+ samplehc/types/v2/document_classify_params.py,sha256=R8m_hhpmb48itQrqOdUD5oYxWO8Yorl_PFgFE-8J9wg,942
54
+ samplehc/types/v2/document_classify_response.py,sha256=A6aHbd9vBrFcAga4-_TEgSvRLacS86mdAqpy7hKdxII,434
55
+ samplehc/types/v2/document_combine_params.py,sha256=U4VK6S19oy0n8-ZF6jWFWwwQweWjqqEtASyp5G9OlHw,785
56
+ samplehc/types/v2/document_combine_response.py,sha256=SVnRhWvEA-p2MuRJiJLiaVnutlw185xAAwcCp5-xP3w,559
57
+ samplehc/types/v2/document_create_from_splits_params.py,sha256=XVmvzvrYPQY_Z8omsLnFx0zeMvPcKnA9chC_KLTIpkc,878
58
+ samplehc/types/v2/document_create_from_splits_response.py,sha256=VJQCsIWz839BeXyht8fVSmrvfknMiXJDPt7ZAclGKP4,900
59
+ samplehc/types/v2/document_extract_params.py,sha256=CSsMnbzknkT81zLpxIL_Wb_4FidzyIr_ek0NwWbcKTc,2393
60
+ samplehc/types/v2/document_extract_response.py,sha256=k4nKL53ZSLoAmMdlCPZIpjkTdRuOGqG3u-qJyW1kmD4,424
61
+ samplehc/types/v2/document_generate_csv_params.py,sha256=N_GL20AyXcSG0QAkIJBbtyoq9ZW7RESAyhURmagzOTc,1063
62
+ samplehc/types/v2/document_generate_csv_response.py,sha256=n8jk3gbEU6rASKTVNCtY7Z9dDxYOWFm4nqFgbfBOcJM,539
63
+ samplehc/types/v2/document_presigned_upload_url_params.py,sha256=GUooEmi6zACjwCaao3_SP6IqLwfnwKTUxYzVTfRT4rw,1283
64
+ samplehc/types/v2/document_presigned_upload_url_response.py,sha256=Xf1WvhKXxvQhz3u_9wA-k2yeYh8f-Ip3BxXZJRkRvQg,465
65
+ samplehc/types/v2/document_retrieve_csv_content_response.py,sha256=0frl9rH6WRnDVLKxop22B1hqqjgPG1C9TVX7ZwyKTUY,414
66
+ samplehc/types/v2/document_retrieve_metadata_response.py,sha256=ImzbvYJ3GSEZXVypmLx3uaYSoL8GXUajog6en2eRhYM,435
67
+ samplehc/types/v2/document_retrieve_response.py,sha256=AVViza-zUVA3E13VPZug-3u13PVrZQdta5Lbxgx1A_g,1519
68
+ samplehc/types/v2/document_search_params.py,sha256=lJ7IpiBDoBRcm5SZzhSZflFlQGJ_7h_T2H7eX8gMX-g,651
69
+ samplehc/types/v2/document_search_response.py,sha256=8vOHI-5fl5lelBlhbGWCppl9klcyboXS0FPe2IoTOq0,379
70
+ samplehc/types/v2/document_split_params.py,sha256=SXk8xEILeB-nO-WwkR-NgzYGGxpdhac-lg2idfZXYUM,1066
71
+ samplehc/types/v2/document_split_response.py,sha256=1NID9LtcYYLUJ0sq7q1h_2dw9CMjr5cjR6_lM0aWfpM,418
72
+ samplehc/types/v2/document_transform_json_to_html_params.py,sha256=0bRUKlxD2-JB5VQ0DFDfDX1MaanOR1b0PhsD2x1YYAI,336
73
+ samplehc/types/v2/document_transform_json_to_html_response.py,sha256=ca5EIuwV1pywWDnIgy2e6vW_QunxA-PDHh69jurvcS0,268
74
+ samplehc/types/v2/event_emit_params.py,sha256=SU1pC9tVh84OmyXWsEjxmBMnkTHqHQXQaMZihEZoX2w,506
75
+ samplehc/types/v2/event_emit_response.py,sha256=Md9mWenySbRoqz2tWrY4jyXS-oWirz5VVdpg9W2gPM8,263
76
+ samplehc/types/v2/documents/__init__.py,sha256=m-DTAbY9msEuebxJrffYI5vi_m8baFX7im5aCucdUUk,1265
77
+ samplehc/types/v2/documents/format_create_pdf_params.py,sha256=OgteE7CfhVP-CAw5RGZlSoXz50rdfxohA-9fJA_9t0Q,458
78
+ samplehc/types/v2/documents/format_create_pdf_response.py,sha256=XBhC9fjEEbWeDnioXh43z_ySNJKEIycxipucZLDCoPY,362
79
+ samplehc/types/v2/documents/legacy_extract_params.py,sha256=OcutLFkSUgJ_4ZezMMZEtCmhsU-GXRzluIrceaKmDMQ,3228
80
+ samplehc/types/v2/documents/legacy_extract_response.py,sha256=2TVEWbb1LvUAUfQOS79oum1WY44Stf9IkvMAafQj7ZE,426
81
+ samplehc/types/v2/documents/legacy_reason_params.py,sha256=vfBpWWWNqTQ0u6QCL2moqHwnIrT-IrENYkFQb1-KjJg,1971
82
+ samplehc/types/v2/documents/legacy_reason_response.py,sha256=zZMpY7Pu3fXqMqCrLcM4DP8e3dNOIu78bfdaES2e4zA,415
83
+ samplehc/types/v2/documents/legacy_split_params.py,sha256=ohQXKaEZCoApDxVhtgxD-oZLJ1MG7qkWqrv82BC-Bi0,560
84
+ samplehc/types/v2/documents/legacy_split_response.py,sha256=ZxoveeffOYJEBen04VPB19sDtjzWJaWpyh-JjGsmRqM,415
85
+ samplehc/types/v2/documents/template_generate_document_async_params.py,sha256=5ajpeJbd9F8QYjb7Ac_qtj1YtUtK4vJHzO_6VEoRJFk,1273
86
+ samplehc/types/v2/documents/template_generate_document_async_response.py,sha256=xFivOxAB8jahS6vKcr-3TGR4IhF0INDH37nivTVoHSk,402
87
+ samplehc/types/v2/documents/template_render_document_params.py,sha256=egYW79gF_UNjE8wTmiwtbgOozqVDa6i8Db0yjwt5IXE,905
88
+ samplehc/types/v2/documents/template_render_document_response.py,sha256=yN2JLDHszpaA9RZq8INdJIue_JkrLON3xqWMh-z3MCc,367
89
+ samplehc-0.18.0.dist-info/METADATA,sha256=jdA0us5nK5NL0MxjbbpVdpPDLX0-F2R5qy2c-BbTylI,14336
90
+ samplehc-0.18.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
91
+ samplehc-0.18.0.dist-info/licenses/LICENSE,sha256=ll_q1imgsIlRXL5pk6VmrO0f_L0thzOlPI2cc7qcqc0,11347
92
+ samplehc-0.18.0.dist-info/RECORD,,
@@ -1,19 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from .v1 import (
4
- V1Resource,
5
- AsyncV1Resource,
6
- V1ResourceWithRawResponse,
7
- AsyncV1ResourceWithRawResponse,
8
- V1ResourceWithStreamingResponse,
9
- AsyncV1ResourceWithStreamingResponse,
10
- )
11
-
12
- __all__ = [
13
- "V1Resource",
14
- "AsyncV1Resource",
15
- "V1ResourceWithRawResponse",
16
- "AsyncV1ResourceWithRawResponse",
17
- "V1ResourceWithStreamingResponse",
18
- "AsyncV1ResourceWithStreamingResponse",
19
- ]
@@ -1,298 +0,0 @@
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 Any, Iterable, cast
6
-
7
- import httpx
8
-
9
- from ...types import v1_sql_execute_params, v1_query_audit_logs_params
10
- from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
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.v1_sql_execute_response import V1SqlExecuteResponse
22
- from ...types.v1_query_audit_logs_response import V1QueryAuditLogsResponse
23
-
24
- __all__ = ["V1Resource", "AsyncV1Resource"]
25
-
26
-
27
- class V1Resource(SyncAPIResource):
28
- @cached_property
29
- def with_raw_response(self) -> V1ResourceWithRawResponse:
30
- """
31
- This property can be used as a prefix for any HTTP method call to return
32
- the raw response object instead of the parsed content.
33
-
34
- For more information, see https://www.github.com/samplehc/samplehc-python#accessing-raw-response-data-eg-headers
35
- """
36
- return V1ResourceWithRawResponse(self)
37
-
38
- @cached_property
39
- def with_streaming_response(self) -> V1ResourceWithStreamingResponse:
40
- """
41
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
42
-
43
- For more information, see https://www.github.com/samplehc/samplehc-python#with_streaming_response
44
- """
45
- return V1ResourceWithStreamingResponse(self)
46
-
47
- def query_audit_logs(
48
- self,
49
- *,
50
- query: str,
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
- ) -> V1QueryAuditLogsResponse:
58
- """Retrieves audit logs.
59
-
60
- Allows for filtering and searching through historical
61
- audit data.
62
-
63
- Args:
64
- query: The query string to filter audit logs.
65
-
66
- extra_headers: Send extra headers
67
-
68
- extra_query: Add additional query parameters to the request
69
-
70
- extra_body: Add additional JSON properties to the request
71
-
72
- timeout: Override the client-level default timeout for this request, in seconds
73
- """
74
- return self._post(
75
- "/api/v1/audit-logs",
76
- body=maybe_transform({"query": query}, v1_query_audit_logs_params.V1QueryAuditLogsParams),
77
- options=make_request_options(
78
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
79
- ),
80
- cast_to=V1QueryAuditLogsResponse,
81
- )
82
-
83
- def sql_execute(
84
- self,
85
- *,
86
- query: str,
87
- array_mode: bool | Omit = omit,
88
- params: Iterable[object] | Omit = omit,
89
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
90
- # The extra values given here take precedence over values defined on the client or passed to this method.
91
- extra_headers: Headers | None = None,
92
- extra_query: Query | None = None,
93
- extra_body: Body | None = None,
94
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
95
- ) -> V1SqlExecuteResponse:
96
- """Allows execution of arbitrary SQL queries against the Sample database.
97
-
98
- Supports
99
- parameterized queries.
100
-
101
- Args:
102
- query: The SQL query to execute.
103
-
104
- array_mode: If true, rows will be returned as arrays of values instead of objects. Defaults
105
- to false.
106
-
107
- params: An array of parameters to be used in the SQL query. Use placeholders like $1,
108
- $2, etc. in the query string.
109
-
110
- extra_headers: Send extra headers
111
-
112
- extra_query: Add additional query parameters to the request
113
-
114
- extra_body: Add additional JSON properties to the request
115
-
116
- timeout: Override the client-level default timeout for this request, in seconds
117
- """
118
- return cast(
119
- V1SqlExecuteResponse,
120
- self._post(
121
- "/api/v1/sql",
122
- body=maybe_transform(
123
- {
124
- "query": query,
125
- "array_mode": array_mode,
126
- "params": params,
127
- },
128
- v1_sql_execute_params.V1SqlExecuteParams,
129
- ),
130
- options=make_request_options(
131
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
132
- ),
133
- cast_to=cast(
134
- Any, V1SqlExecuteResponse
135
- ), # Union types cannot be passed in as arguments in the type system
136
- ),
137
- )
138
-
139
-
140
- class AsyncV1Resource(AsyncAPIResource):
141
- @cached_property
142
- def with_raw_response(self) -> AsyncV1ResourceWithRawResponse:
143
- """
144
- This property can be used as a prefix for any HTTP method call to return
145
- the raw response object instead of the parsed content.
146
-
147
- For more information, see https://www.github.com/samplehc/samplehc-python#accessing-raw-response-data-eg-headers
148
- """
149
- return AsyncV1ResourceWithRawResponse(self)
150
-
151
- @cached_property
152
- def with_streaming_response(self) -> AsyncV1ResourceWithStreamingResponse:
153
- """
154
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
155
-
156
- For more information, see https://www.github.com/samplehc/samplehc-python#with_streaming_response
157
- """
158
- return AsyncV1ResourceWithStreamingResponse(self)
159
-
160
- async def query_audit_logs(
161
- self,
162
- *,
163
- query: str,
164
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
165
- # The extra values given here take precedence over values defined on the client or passed to this method.
166
- extra_headers: Headers | None = None,
167
- extra_query: Query | None = None,
168
- extra_body: Body | None = None,
169
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
170
- ) -> V1QueryAuditLogsResponse:
171
- """Retrieves audit logs.
172
-
173
- Allows for filtering and searching through historical
174
- audit data.
175
-
176
- Args:
177
- query: The query string to filter audit logs.
178
-
179
- extra_headers: Send extra headers
180
-
181
- extra_query: Add additional query parameters to the request
182
-
183
- extra_body: Add additional JSON properties to the request
184
-
185
- timeout: Override the client-level default timeout for this request, in seconds
186
- """
187
- return await self._post(
188
- "/api/v1/audit-logs",
189
- body=await async_maybe_transform({"query": query}, v1_query_audit_logs_params.V1QueryAuditLogsParams),
190
- options=make_request_options(
191
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
192
- ),
193
- cast_to=V1QueryAuditLogsResponse,
194
- )
195
-
196
- async def sql_execute(
197
- self,
198
- *,
199
- query: str,
200
- array_mode: bool | Omit = omit,
201
- params: Iterable[object] | Omit = omit,
202
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
203
- # The extra values given here take precedence over values defined on the client or passed to this method.
204
- extra_headers: Headers | None = None,
205
- extra_query: Query | None = None,
206
- extra_body: Body | None = None,
207
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
208
- ) -> V1SqlExecuteResponse:
209
- """Allows execution of arbitrary SQL queries against the Sample database.
210
-
211
- Supports
212
- parameterized queries.
213
-
214
- Args:
215
- query: The SQL query to execute.
216
-
217
- array_mode: If true, rows will be returned as arrays of values instead of objects. Defaults
218
- to false.
219
-
220
- params: An array of parameters to be used in the SQL query. Use placeholders like $1,
221
- $2, etc. in the query string.
222
-
223
- extra_headers: Send extra headers
224
-
225
- extra_query: Add additional query parameters to the request
226
-
227
- extra_body: Add additional JSON properties to the request
228
-
229
- timeout: Override the client-level default timeout for this request, in seconds
230
- """
231
- return cast(
232
- V1SqlExecuteResponse,
233
- await self._post(
234
- "/api/v1/sql",
235
- body=await async_maybe_transform(
236
- {
237
- "query": query,
238
- "array_mode": array_mode,
239
- "params": params,
240
- },
241
- v1_sql_execute_params.V1SqlExecuteParams,
242
- ),
243
- options=make_request_options(
244
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
245
- ),
246
- cast_to=cast(
247
- Any, V1SqlExecuteResponse
248
- ), # Union types cannot be passed in as arguments in the type system
249
- ),
250
- )
251
-
252
-
253
- class V1ResourceWithRawResponse:
254
- def __init__(self, v1: V1Resource) -> None:
255
- self._v1 = v1
256
-
257
- self.query_audit_logs = to_raw_response_wrapper(
258
- v1.query_audit_logs,
259
- )
260
- self.sql_execute = to_raw_response_wrapper(
261
- v1.sql_execute,
262
- )
263
-
264
-
265
- class AsyncV1ResourceWithRawResponse:
266
- def __init__(self, v1: AsyncV1Resource) -> None:
267
- self._v1 = v1
268
-
269
- self.query_audit_logs = async_to_raw_response_wrapper(
270
- v1.query_audit_logs,
271
- )
272
- self.sql_execute = async_to_raw_response_wrapper(
273
- v1.sql_execute,
274
- )
275
-
276
-
277
- class V1ResourceWithStreamingResponse:
278
- def __init__(self, v1: V1Resource) -> None:
279
- self._v1 = v1
280
-
281
- self.query_audit_logs = to_streamed_response_wrapper(
282
- v1.query_audit_logs,
283
- )
284
- self.sql_execute = to_streamed_response_wrapper(
285
- v1.sql_execute,
286
- )
287
-
288
-
289
- class AsyncV1ResourceWithStreamingResponse:
290
- def __init__(self, v1: AsyncV1Resource) -> None:
291
- self._v1 = v1
292
-
293
- self.query_audit_logs = async_to_streamed_response_wrapper(
294
- v1.query_audit_logs,
295
- )
296
- self.sql_execute = async_to_streamed_response_wrapper(
297
- v1.sql_execute,
298
- )