samplehc 0.19.0__tar.gz → 0.21.0__tar.gz

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 (140) hide show
  1. samplehc-0.21.0/.release-please-manifest.json +3 -0
  2. {samplehc-0.19.0 → samplehc-0.21.0}/CHANGELOG.md +16 -0
  3. {samplehc-0.19.0 → samplehc-0.21.0}/PKG-INFO +22 -22
  4. {samplehc-0.19.0 → samplehc-0.21.0}/README.md +21 -21
  5. {samplehc-0.19.0 → samplehc-0.21.0}/api.md +12 -0
  6. {samplehc-0.19.0 → samplehc-0.21.0}/pyproject.toml +1 -1
  7. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/_version.py +1 -1
  8. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/resources/v2/__init__.py +14 -0
  9. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/resources/v2/documents/documents.py +6 -2
  10. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/resources/v2/v2.py +32 -0
  11. samplehc-0.21.0/src/samplehc/resources/v2/workflow_runs.py +177 -0
  12. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/__init__.py +6 -0
  13. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/document_extract_params.py +6 -2
  14. samplehc-0.21.0/src/samplehc/types/v2/workflow_run_resume_when_complete_params.py +14 -0
  15. samplehc-0.21.0/src/samplehc/types/v2/workflow_run_resume_when_complete_response.py +12 -0
  16. samplehc-0.21.0/tests/api_resources/v2/test_workflow_runs.py +92 -0
  17. {samplehc-0.19.0 → samplehc-0.21.0}/tests/test_client.py +36 -24
  18. samplehc-0.19.0/.release-please-manifest.json +0 -3
  19. {samplehc-0.19.0 → samplehc-0.21.0}/.gitignore +0 -0
  20. {samplehc-0.19.0 → samplehc-0.21.0}/CONTRIBUTING.md +0 -0
  21. {samplehc-0.19.0 → samplehc-0.21.0}/LICENSE +0 -0
  22. {samplehc-0.19.0 → samplehc-0.21.0}/SECURITY.md +0 -0
  23. {samplehc-0.19.0 → samplehc-0.21.0}/bin/check-release-environment +0 -0
  24. {samplehc-0.19.0 → samplehc-0.21.0}/bin/publish-pypi +0 -0
  25. {samplehc-0.19.0 → samplehc-0.21.0}/examples/.keep +0 -0
  26. {samplehc-0.19.0 → samplehc-0.21.0}/noxfile.py +0 -0
  27. {samplehc-0.19.0 → samplehc-0.21.0}/release-please-config.json +0 -0
  28. {samplehc-0.19.0 → samplehc-0.21.0}/requirements-dev.lock +0 -0
  29. {samplehc-0.19.0 → samplehc-0.21.0}/requirements.lock +0 -0
  30. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/__init__.py +0 -0
  31. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/_base_client.py +0 -0
  32. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/_client.py +0 -0
  33. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/_compat.py +0 -0
  34. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/_constants.py +0 -0
  35. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/_exceptions.py +0 -0
  36. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/_files.py +0 -0
  37. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/_models.py +0 -0
  38. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/_qs.py +0 -0
  39. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/_resource.py +0 -0
  40. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/_response.py +0 -0
  41. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/_streaming.py +0 -0
  42. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/_types.py +0 -0
  43. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/_utils/__init__.py +0 -0
  44. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/_utils/_compat.py +0 -0
  45. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/_utils/_datetime_parse.py +0 -0
  46. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/_utils/_json.py +0 -0
  47. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/_utils/_logs.py +0 -0
  48. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/_utils/_proxy.py +0 -0
  49. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/_utils/_reflection.py +0 -0
  50. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/_utils/_resources_proxy.py +0 -0
  51. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/_utils/_streams.py +0 -0
  52. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/_utils/_sync.py +0 -0
  53. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/_utils/_transform.py +0 -0
  54. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/_utils/_typing.py +0 -0
  55. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/_utils/_utils.py +0 -0
  56. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/lib/.keep +0 -0
  57. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/py.typed +0 -0
  58. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/resources/__init__.py +0 -0
  59. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/resources/v2/async_results.py +0 -0
  60. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/resources/v2/communication.py +0 -0
  61. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/resources/v2/database.py +0 -0
  62. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/resources/v2/documents/__init__.py +0 -0
  63. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/resources/v2/documents/formats.py +0 -0
  64. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/resources/v2/documents/legacy.py +0 -0
  65. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/resources/v2/documents/templates.py +0 -0
  66. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/resources/v2/events.py +0 -0
  67. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/__init__.py +0 -0
  68. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/async_result_sleep_params.py +0 -0
  69. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/async_result_sleep_response.py +0 -0
  70. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/communication_send_email_params.py +0 -0
  71. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/communication_send_email_response.py +0 -0
  72. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/communication_send_fax_params.py +0 -0
  73. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/communication_send_fax_response.py +0 -0
  74. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/communication_send_letter_params.py +0 -0
  75. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/communication_send_letter_response.py +0 -0
  76. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/database_execute_sql_params.py +0 -0
  77. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/database_execute_sql_response.py +0 -0
  78. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/document_classify_params.py +0 -0
  79. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/document_classify_response.py +0 -0
  80. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/document_combine_params.py +0 -0
  81. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/document_combine_response.py +0 -0
  82. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/document_create_from_splits_params.py +0 -0
  83. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/document_create_from_splits_response.py +0 -0
  84. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/document_extract_response.py +0 -0
  85. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/document_generate_csv_params.py +0 -0
  86. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/document_generate_csv_response.py +0 -0
  87. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/document_presigned_upload_url_params.py +0 -0
  88. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/document_presigned_upload_url_response.py +0 -0
  89. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/document_retrieve_csv_content_response.py +0 -0
  90. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/document_retrieve_metadata_response.py +0 -0
  91. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/document_retrieve_response.py +0 -0
  92. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/document_search_params.py +0 -0
  93. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/document_search_response.py +0 -0
  94. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/document_split_params.py +0 -0
  95. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/document_split_response.py +0 -0
  96. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/document_transform_json_to_html_params.py +0 -0
  97. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/document_transform_json_to_html_response.py +0 -0
  98. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/documents/__init__.py +0 -0
  99. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/documents/format_create_pdf_params.py +0 -0
  100. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/documents/format_create_pdf_response.py +0 -0
  101. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/documents/legacy_extract_params.py +0 -0
  102. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/documents/legacy_extract_response.py +0 -0
  103. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/documents/legacy_reason_params.py +0 -0
  104. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/documents/legacy_reason_response.py +0 -0
  105. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/documents/legacy_split_params.py +0 -0
  106. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/documents/legacy_split_response.py +0 -0
  107. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/documents/template_generate_document_async_params.py +0 -0
  108. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/documents/template_generate_document_async_response.py +0 -0
  109. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/documents/template_render_document_params.py +0 -0
  110. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/documents/template_render_document_response.py +0 -0
  111. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/event_emit_params.py +0 -0
  112. {samplehc-0.19.0 → samplehc-0.21.0}/src/samplehc/types/v2/event_emit_response.py +0 -0
  113. {samplehc-0.19.0 → samplehc-0.21.0}/tests/__init__.py +0 -0
  114. {samplehc-0.19.0 → samplehc-0.21.0}/tests/api_resources/__init__.py +0 -0
  115. {samplehc-0.19.0 → samplehc-0.21.0}/tests/api_resources/v2/__init__.py +0 -0
  116. {samplehc-0.19.0 → samplehc-0.21.0}/tests/api_resources/v2/documents/__init__.py +0 -0
  117. {samplehc-0.19.0 → samplehc-0.21.0}/tests/api_resources/v2/documents/test_formats.py +0 -0
  118. {samplehc-0.19.0 → samplehc-0.21.0}/tests/api_resources/v2/documents/test_legacy.py +0 -0
  119. {samplehc-0.19.0 → samplehc-0.21.0}/tests/api_resources/v2/documents/test_templates.py +0 -0
  120. {samplehc-0.19.0 → samplehc-0.21.0}/tests/api_resources/v2/test_async_results.py +0 -0
  121. {samplehc-0.19.0 → samplehc-0.21.0}/tests/api_resources/v2/test_communication.py +0 -0
  122. {samplehc-0.19.0 → samplehc-0.21.0}/tests/api_resources/v2/test_database.py +0 -0
  123. {samplehc-0.19.0 → samplehc-0.21.0}/tests/api_resources/v2/test_documents.py +0 -0
  124. {samplehc-0.19.0 → samplehc-0.21.0}/tests/api_resources/v2/test_events.py +0 -0
  125. {samplehc-0.19.0 → samplehc-0.21.0}/tests/conftest.py +0 -0
  126. {samplehc-0.19.0 → samplehc-0.21.0}/tests/sample_file.txt +0 -0
  127. {samplehc-0.19.0 → samplehc-0.21.0}/tests/test_deepcopy.py +0 -0
  128. {samplehc-0.19.0 → samplehc-0.21.0}/tests/test_extract_files.py +0 -0
  129. {samplehc-0.19.0 → samplehc-0.21.0}/tests/test_files.py +0 -0
  130. {samplehc-0.19.0 → samplehc-0.21.0}/tests/test_models.py +0 -0
  131. {samplehc-0.19.0 → samplehc-0.21.0}/tests/test_qs.py +0 -0
  132. {samplehc-0.19.0 → samplehc-0.21.0}/tests/test_required_args.py +0 -0
  133. {samplehc-0.19.0 → samplehc-0.21.0}/tests/test_response.py +0 -0
  134. {samplehc-0.19.0 → samplehc-0.21.0}/tests/test_streaming.py +0 -0
  135. {samplehc-0.19.0 → samplehc-0.21.0}/tests/test_transform.py +0 -0
  136. {samplehc-0.19.0 → samplehc-0.21.0}/tests/test_utils/test_datetime_parse.py +0 -0
  137. {samplehc-0.19.0 → samplehc-0.21.0}/tests/test_utils/test_json.py +0 -0
  138. {samplehc-0.19.0 → samplehc-0.21.0}/tests/test_utils/test_proxy.py +0 -0
  139. {samplehc-0.19.0 → samplehc-0.21.0}/tests/test_utils/test_typing.py +0 -0
  140. {samplehc-0.19.0 → samplehc-0.21.0}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.21.0"
3
+ }
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.21.0 (2026-02-04)
4
+
5
+ Full Changelog: [v0.20.0...v0.21.0](https://github.com/samplehc/samplehc-python/compare/v0.20.0...v0.21.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([a07b6dd](https://github.com/samplehc/samplehc-python/commit/a07b6dd010210f5e76dfb05122155344de5d378e))
10
+
11
+ ## 0.20.0 (2026-02-03)
12
+
13
+ Full Changelog: [v0.19.0...v0.20.0](https://github.com/samplehc/samplehc-python/compare/v0.19.0...v0.20.0)
14
+
15
+ ### Features
16
+
17
+ * **api:** manual updates ([e398ad8](https://github.com/samplehc/samplehc-python/commit/e398ad8aee71fc730ccd91aa2d9db5bbe74e15f6))
18
+
3
19
  ## 0.19.0 (2026-02-03)
4
20
 
5
21
  Full Changelog: [v0.18.0...v0.19.0](https://github.com/samplehc/samplehc-python/compare/v0.18.0...v0.19.0)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: samplehc
3
- Version: 0.19.0
3
+ Version: 0.21.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.v2.async_results.sleep(
71
- delay=1,
70
+ response = client.v2.workflow_runs.resume_when_complete(
71
+ async_result_id="asyncResultId",
72
72
  )
73
- print(response.async_result_id)
73
+ print(response.message)
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.v2.async_results.sleep(
97
- delay=1,
96
+ response = await client.v2.workflow_runs.resume_when_complete(
97
+ async_result_id="asyncResultId",
98
98
  )
99
- print(response.async_result_id)
99
+ print(response.message)
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.v2.async_results.sleep(
133
- delay=1,
132
+ response = await client.v2.workflow_runs.resume_when_complete(
133
+ async_result_id="asyncResultId",
134
134
  )
135
- print(response.async_result_id)
135
+ print(response.message)
136
136
 
137
137
 
138
138
  asyncio.run(main())
@@ -182,8 +182,8 @@ from samplehc import SampleHealthcare
182
182
  client = SampleHealthcare()
183
183
 
184
184
  try:
185
- client.v2.async_results.sleep(
186
- delay=1,
185
+ client.v2.workflow_runs.resume_when_complete(
186
+ async_result_id="asyncResultId",
187
187
  )
188
188
  except samplehc.APIConnectionError as e:
189
189
  print("The server could not be reached")
@@ -227,8 +227,8 @@ client = SampleHealthcare(
227
227
  )
228
228
 
229
229
  # Or, configure per-request:
230
- client.with_options(max_retries=5).v2.async_results.sleep(
231
- delay=1,
230
+ client.with_options(max_retries=5).v2.workflow_runs.resume_when_complete(
231
+ async_result_id="asyncResultId",
232
232
  )
233
233
  ```
234
234
 
@@ -252,8 +252,8 @@ client = SampleHealthcare(
252
252
  )
253
253
 
254
254
  # Override per-request:
255
- client.with_options(timeout=5.0).v2.async_results.sleep(
256
- delay=1,
255
+ client.with_options(timeout=5.0).v2.workflow_runs.resume_when_complete(
256
+ async_result_id="asyncResultId",
257
257
  )
258
258
  ```
259
259
 
@@ -295,13 +295,13 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
295
295
  from samplehc import SampleHealthcare
296
296
 
297
297
  client = SampleHealthcare()
298
- response = client.v2.async_results.with_raw_response.sleep(
299
- delay=1,
298
+ response = client.v2.workflow_runs.with_raw_response.resume_when_complete(
299
+ async_result_id="asyncResultId",
300
300
  )
301
301
  print(response.headers.get('X-My-Header'))
302
302
 
303
- async_result = response.parse() # get the object that `v2.async_results.sleep()` would have returned
304
- print(async_result.async_result_id)
303
+ workflow_run = response.parse() # get the object that `v2.workflow_runs.resume_when_complete()` would have returned
304
+ print(workflow_run.message)
305
305
  ```
306
306
 
307
307
  These methods return an [`APIResponse`](https://github.com/samplehc/samplehc-python/tree/main/src/samplehc/_response.py) object.
@@ -315,8 +315,8 @@ The above interface eagerly reads the full response body when you make the reque
315
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.
316
316
 
317
317
  ```python
318
- with client.v2.async_results.with_streaming_response.sleep(
319
- delay=1,
318
+ with client.v2.workflow_runs.with_streaming_response.resume_when_complete(
319
+ async_result_id="asyncResultId",
320
320
  ) as response:
321
321
  print(response.headers.get("X-My-Header"))
322
322
 
@@ -32,10 +32,10 @@ client = SampleHealthcare(
32
32
  api_key=os.environ.get("SAMPLEHC_API_KEY"), # This is the default and can be omitted
33
33
  )
34
34
 
35
- response = client.v2.async_results.sleep(
36
- delay=1,
35
+ response = client.v2.workflow_runs.resume_when_complete(
36
+ async_result_id="asyncResultId",
37
37
  )
38
- print(response.async_result_id)
38
+ print(response.message)
39
39
  ```
40
40
 
41
41
  While you can provide an `api_key` keyword argument,
@@ -58,10 +58,10 @@ client = AsyncSampleHealthcare(
58
58
 
59
59
 
60
60
  async def main() -> None:
61
- response = await client.v2.async_results.sleep(
62
- delay=1,
61
+ response = await client.v2.workflow_runs.resume_when_complete(
62
+ async_result_id="asyncResultId",
63
63
  )
64
- print(response.async_result_id)
64
+ print(response.message)
65
65
 
66
66
 
67
67
  asyncio.run(main())
@@ -94,10 +94,10 @@ async def main() -> None:
94
94
  api_key=os.environ.get("SAMPLEHC_API_KEY"), # This is the default and can be omitted
95
95
  http_client=DefaultAioHttpClient(),
96
96
  ) as client:
97
- response = await client.v2.async_results.sleep(
98
- delay=1,
97
+ response = await client.v2.workflow_runs.resume_when_complete(
98
+ async_result_id="asyncResultId",
99
99
  )
100
- print(response.async_result_id)
100
+ print(response.message)
101
101
 
102
102
 
103
103
  asyncio.run(main())
@@ -147,8 +147,8 @@ from samplehc import SampleHealthcare
147
147
  client = SampleHealthcare()
148
148
 
149
149
  try:
150
- client.v2.async_results.sleep(
151
- delay=1,
150
+ client.v2.workflow_runs.resume_when_complete(
151
+ async_result_id="asyncResultId",
152
152
  )
153
153
  except samplehc.APIConnectionError as e:
154
154
  print("The server could not be reached")
@@ -192,8 +192,8 @@ client = SampleHealthcare(
192
192
  )
193
193
 
194
194
  # Or, configure per-request:
195
- client.with_options(max_retries=5).v2.async_results.sleep(
196
- delay=1,
195
+ client.with_options(max_retries=5).v2.workflow_runs.resume_when_complete(
196
+ async_result_id="asyncResultId",
197
197
  )
198
198
  ```
199
199
 
@@ -217,8 +217,8 @@ client = SampleHealthcare(
217
217
  )
218
218
 
219
219
  # Override per-request:
220
- client.with_options(timeout=5.0).v2.async_results.sleep(
221
- delay=1,
220
+ client.with_options(timeout=5.0).v2.workflow_runs.resume_when_complete(
221
+ async_result_id="asyncResultId",
222
222
  )
223
223
  ```
224
224
 
@@ -260,13 +260,13 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
260
260
  from samplehc import SampleHealthcare
261
261
 
262
262
  client = SampleHealthcare()
263
- response = client.v2.async_results.with_raw_response.sleep(
264
- delay=1,
263
+ response = client.v2.workflow_runs.with_raw_response.resume_when_complete(
264
+ async_result_id="asyncResultId",
265
265
  )
266
266
  print(response.headers.get('X-My-Header'))
267
267
 
268
- async_result = response.parse() # get the object that `v2.async_results.sleep()` would have returned
269
- print(async_result.async_result_id)
268
+ workflow_run = response.parse() # get the object that `v2.workflow_runs.resume_when_complete()` would have returned
269
+ print(workflow_run.message)
270
270
  ```
271
271
 
272
272
  These methods return an [`APIResponse`](https://github.com/samplehc/samplehc-python/tree/main/src/samplehc/_response.py) object.
@@ -280,8 +280,8 @@ The above interface eagerly reads the full response body when you make the reque
280
280
  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.
281
281
 
282
282
  ```python
283
- with client.v2.async_results.with_streaming_response.sleep(
284
- delay=1,
283
+ with client.v2.workflow_runs.with_streaming_response.resume_when_complete(
284
+ async_result_id="asyncResultId",
285
285
  ) as response:
286
286
  print(response.headers.get("X-My-Header"))
287
287
 
@@ -1,5 +1,17 @@
1
1
  # V2
2
2
 
3
+ ## WorkflowRuns
4
+
5
+ Types:
6
+
7
+ ```python
8
+ from samplehc.types.v2 import WorkflowRunResumeWhenCompleteResponse
9
+ ```
10
+
11
+ Methods:
12
+
13
+ - <code title="post /api/v2/workflow-runs/resume-when-complete">client.v2.workflow_runs.<a href="./src/samplehc/resources/v2/workflow_runs.py">resume_when_complete</a>(\*\*<a href="src/samplehc/types/v2/workflow_run_resume_when_complete_params.py">params</a>) -> <a href="./src/samplehc/types/v2/workflow_run_resume_when_complete_response.py">WorkflowRunResumeWhenCompleteResponse</a></code>
14
+
3
15
  ## AsyncResults
4
16
 
5
17
  Types:
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "samplehc"
3
- version = "0.19.0"
3
+ version = "0.21.0"
4
4
  description = "The official Python library for the Sample Healthcare API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -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.19.0" # x-release-please-version
4
+ __version__ = "0.21.0" # x-release-please-version
@@ -48,8 +48,22 @@ from .communication import (
48
48
  CommunicationResourceWithStreamingResponse,
49
49
  AsyncCommunicationResourceWithStreamingResponse,
50
50
  )
51
+ from .workflow_runs import (
52
+ WorkflowRunsResource,
53
+ AsyncWorkflowRunsResource,
54
+ WorkflowRunsResourceWithRawResponse,
55
+ AsyncWorkflowRunsResourceWithRawResponse,
56
+ WorkflowRunsResourceWithStreamingResponse,
57
+ AsyncWorkflowRunsResourceWithStreamingResponse,
58
+ )
51
59
 
52
60
  __all__ = [
61
+ "WorkflowRunsResource",
62
+ "AsyncWorkflowRunsResource",
63
+ "WorkflowRunsResourceWithRawResponse",
64
+ "AsyncWorkflowRunsResourceWithRawResponse",
65
+ "WorkflowRunsResourceWithStreamingResponse",
66
+ "AsyncWorkflowRunsResourceWithStreamingResponse",
53
67
  "AsyncResultsResource",
54
68
  "AsyncAsyncResultsResource",
55
69
  "AsyncResultsResourceWithRawResponse",
@@ -298,7 +298,7 @@ class DocumentsResource(SyncAPIResource):
298
298
  | Omit = omit,
299
299
  ocr_enhance: document_extract_params.OcrEnhance | Omit = omit,
300
300
  ocr_quality: Literal["high", "low"] | Omit = omit,
301
- priority: Literal["interactive", "non-interactive"] | Omit = omit,
301
+ priority: Literal["interactive", "non-interactive", "background"] | Omit = omit,
302
302
  reasoning_effort: Literal["low", "medium", "high"] | Omit = omit,
303
303
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
304
304
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -325,6 +325,8 @@ class DocumentsResource(SyncAPIResource):
325
325
  ocr_quality: OCR quality setting
326
326
 
327
327
  priority: The priority of the extraction task. Non-interactive is lower priority.
328
+ Background are tasks that can be run in the background while the user is doing
329
+ other things.
328
330
 
329
331
  reasoning_effort: Optional control over the reasoning effort for extraction.
330
332
 
@@ -891,7 +893,7 @@ class AsyncDocumentsResource(AsyncAPIResource):
891
893
  | Omit = omit,
892
894
  ocr_enhance: document_extract_params.OcrEnhance | Omit = omit,
893
895
  ocr_quality: Literal["high", "low"] | Omit = omit,
894
- priority: Literal["interactive", "non-interactive"] | Omit = omit,
896
+ priority: Literal["interactive", "non-interactive", "background"] | Omit = omit,
895
897
  reasoning_effort: Literal["low", "medium", "high"] | Omit = omit,
896
898
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
897
899
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -918,6 +920,8 @@ class AsyncDocumentsResource(AsyncAPIResource):
918
920
  ocr_quality: OCR quality setting
919
921
 
920
922
  priority: The priority of the extraction task. Non-interactive is lower priority.
923
+ Background are tasks that can be run in the background while the user is doing
924
+ other things.
921
925
 
922
926
  reasoning_effort: Optional control over the reasoning effort for extraction.
923
927
 
@@ -36,6 +36,14 @@ from .communication import (
36
36
  CommunicationResourceWithStreamingResponse,
37
37
  AsyncCommunicationResourceWithStreamingResponse,
38
38
  )
39
+ from .workflow_runs import (
40
+ WorkflowRunsResource,
41
+ AsyncWorkflowRunsResource,
42
+ WorkflowRunsResourceWithRawResponse,
43
+ AsyncWorkflowRunsResourceWithRawResponse,
44
+ WorkflowRunsResourceWithStreamingResponse,
45
+ AsyncWorkflowRunsResourceWithStreamingResponse,
46
+ )
39
47
  from .documents.documents import (
40
48
  DocumentsResource,
41
49
  AsyncDocumentsResource,
@@ -49,6 +57,10 @@ __all__ = ["V2Resource", "AsyncV2Resource"]
49
57
 
50
58
 
51
59
  class V2Resource(SyncAPIResource):
60
+ @cached_property
61
+ def workflow_runs(self) -> WorkflowRunsResource:
62
+ return WorkflowRunsResource(self._client)
63
+
52
64
  @cached_property
53
65
  def async_results(self) -> AsyncResultsResource:
54
66
  return AsyncResultsResource(self._client)
@@ -90,6 +102,10 @@ class V2Resource(SyncAPIResource):
90
102
 
91
103
 
92
104
  class AsyncV2Resource(AsyncAPIResource):
105
+ @cached_property
106
+ def workflow_runs(self) -> AsyncWorkflowRunsResource:
107
+ return AsyncWorkflowRunsResource(self._client)
108
+
93
109
  @cached_property
94
110
  def async_results(self) -> AsyncAsyncResultsResource:
95
111
  return AsyncAsyncResultsResource(self._client)
@@ -134,6 +150,10 @@ class V2ResourceWithRawResponse:
134
150
  def __init__(self, v2: V2Resource) -> None:
135
151
  self._v2 = v2
136
152
 
153
+ @cached_property
154
+ def workflow_runs(self) -> WorkflowRunsResourceWithRawResponse:
155
+ return WorkflowRunsResourceWithRawResponse(self._v2.workflow_runs)
156
+
137
157
  @cached_property
138
158
  def async_results(self) -> AsyncResultsResourceWithRawResponse:
139
159
  return AsyncResultsResourceWithRawResponse(self._v2.async_results)
@@ -159,6 +179,10 @@ class AsyncV2ResourceWithRawResponse:
159
179
  def __init__(self, v2: AsyncV2Resource) -> None:
160
180
  self._v2 = v2
161
181
 
182
+ @cached_property
183
+ def workflow_runs(self) -> AsyncWorkflowRunsResourceWithRawResponse:
184
+ return AsyncWorkflowRunsResourceWithRawResponse(self._v2.workflow_runs)
185
+
162
186
  @cached_property
163
187
  def async_results(self) -> AsyncAsyncResultsResourceWithRawResponse:
164
188
  return AsyncAsyncResultsResourceWithRawResponse(self._v2.async_results)
@@ -184,6 +208,10 @@ class V2ResourceWithStreamingResponse:
184
208
  def __init__(self, v2: V2Resource) -> None:
185
209
  self._v2 = v2
186
210
 
211
+ @cached_property
212
+ def workflow_runs(self) -> WorkflowRunsResourceWithStreamingResponse:
213
+ return WorkflowRunsResourceWithStreamingResponse(self._v2.workflow_runs)
214
+
187
215
  @cached_property
188
216
  def async_results(self) -> AsyncResultsResourceWithStreamingResponse:
189
217
  return AsyncResultsResourceWithStreamingResponse(self._v2.async_results)
@@ -209,6 +237,10 @@ class AsyncV2ResourceWithStreamingResponse:
209
237
  def __init__(self, v2: AsyncV2Resource) -> None:
210
238
  self._v2 = v2
211
239
 
240
+ @cached_property
241
+ def workflow_runs(self) -> AsyncWorkflowRunsResourceWithStreamingResponse:
242
+ return AsyncWorkflowRunsResourceWithStreamingResponse(self._v2.workflow_runs)
243
+
212
244
  @cached_property
213
245
  def async_results(self) -> AsyncAsyncResultsResourceWithStreamingResponse:
214
246
  return AsyncAsyncResultsResourceWithStreamingResponse(self._v2.async_results)
@@ -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
+ import httpx
6
+
7
+ from ..._types import Body, Query, Headers, NotGiven, not_given
8
+ from ..._utils import maybe_transform, async_maybe_transform
9
+ from ..._compat import cached_property
10
+ from ...types.v2 import workflow_run_resume_when_complete_params
11
+ from ..._resource import SyncAPIResource, AsyncAPIResource
12
+ from ..._response import (
13
+ to_raw_response_wrapper,
14
+ to_streamed_response_wrapper,
15
+ async_to_raw_response_wrapper,
16
+ async_to_streamed_response_wrapper,
17
+ )
18
+ from ..._base_client import make_request_options
19
+ from ...types.v2.workflow_run_resume_when_complete_response import WorkflowRunResumeWhenCompleteResponse
20
+
21
+ __all__ = ["WorkflowRunsResource", "AsyncWorkflowRunsResource"]
22
+
23
+
24
+ class WorkflowRunsResource(SyncAPIResource):
25
+ @cached_property
26
+ def with_raw_response(self) -> WorkflowRunsResourceWithRawResponse:
27
+ """
28
+ This property can be used as a prefix for any HTTP method call to return
29
+ the raw response object instead of the parsed content.
30
+
31
+ For more information, see https://www.github.com/samplehc/samplehc-python#accessing-raw-response-data-eg-headers
32
+ """
33
+ return WorkflowRunsResourceWithRawResponse(self)
34
+
35
+ @cached_property
36
+ def with_streaming_response(self) -> WorkflowRunsResourceWithStreamingResponse:
37
+ """
38
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
39
+
40
+ For more information, see https://www.github.com/samplehc/samplehc-python#with_streaming_response
41
+ """
42
+ return WorkflowRunsResourceWithStreamingResponse(self)
43
+
44
+ def resume_when_complete(
45
+ self,
46
+ *,
47
+ async_result_id: str,
48
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
49
+ # The extra values given here take precedence over values defined on the client or passed to this method.
50
+ extra_headers: Headers | None = None,
51
+ extra_query: Query | None = None,
52
+ extra_body: Body | None = None,
53
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
54
+ ) -> WorkflowRunResumeWhenCompleteResponse:
55
+ """
56
+ Registers an asynchronous task's result ID to resume a workflow run upon its
57
+ completion. This endpoint requires an ExecuteStepRequestContext with
58
+ `workflowRunId` and `stepAddr`.
59
+
60
+ Args:
61
+ async_result_id: The unique identifier of the asynchronous result to monitor before resuming.
62
+
63
+ extra_headers: Send extra headers
64
+
65
+ extra_query: Add additional query parameters to the request
66
+
67
+ extra_body: Add additional JSON properties to the request
68
+
69
+ timeout: Override the client-level default timeout for this request, in seconds
70
+ """
71
+ return self._post(
72
+ "/api/v2/workflow-runs/resume-when-complete",
73
+ body=maybe_transform(
74
+ {"async_result_id": async_result_id},
75
+ workflow_run_resume_when_complete_params.WorkflowRunResumeWhenCompleteParams,
76
+ ),
77
+ options=make_request_options(
78
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
79
+ ),
80
+ cast_to=WorkflowRunResumeWhenCompleteResponse,
81
+ )
82
+
83
+
84
+ class AsyncWorkflowRunsResource(AsyncAPIResource):
85
+ @cached_property
86
+ def with_raw_response(self) -> AsyncWorkflowRunsResourceWithRawResponse:
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 AsyncWorkflowRunsResourceWithRawResponse(self)
94
+
95
+ @cached_property
96
+ def with_streaming_response(self) -> AsyncWorkflowRunsResourceWithStreamingResponse:
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 AsyncWorkflowRunsResourceWithStreamingResponse(self)
103
+
104
+ async def resume_when_complete(
105
+ self,
106
+ *,
107
+ async_result_id: str,
108
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
109
+ # The extra values given here take precedence over values defined on the client or passed to this method.
110
+ extra_headers: Headers | None = None,
111
+ extra_query: Query | None = None,
112
+ extra_body: Body | None = None,
113
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
114
+ ) -> WorkflowRunResumeWhenCompleteResponse:
115
+ """
116
+ Registers an asynchronous task's result ID to resume a workflow run upon its
117
+ completion. This endpoint requires an ExecuteStepRequestContext with
118
+ `workflowRunId` and `stepAddr`.
119
+
120
+ Args:
121
+ async_result_id: The unique identifier of the asynchronous result to monitor before resuming.
122
+
123
+ extra_headers: Send extra headers
124
+
125
+ extra_query: Add additional query parameters to the request
126
+
127
+ extra_body: Add additional JSON properties to the request
128
+
129
+ timeout: Override the client-level default timeout for this request, in seconds
130
+ """
131
+ return await self._post(
132
+ "/api/v2/workflow-runs/resume-when-complete",
133
+ body=await async_maybe_transform(
134
+ {"async_result_id": async_result_id},
135
+ workflow_run_resume_when_complete_params.WorkflowRunResumeWhenCompleteParams,
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=WorkflowRunResumeWhenCompleteResponse,
141
+ )
142
+
143
+
144
+ class WorkflowRunsResourceWithRawResponse:
145
+ def __init__(self, workflow_runs: WorkflowRunsResource) -> None:
146
+ self._workflow_runs = workflow_runs
147
+
148
+ self.resume_when_complete = to_raw_response_wrapper(
149
+ workflow_runs.resume_when_complete,
150
+ )
151
+
152
+
153
+ class AsyncWorkflowRunsResourceWithRawResponse:
154
+ def __init__(self, workflow_runs: AsyncWorkflowRunsResource) -> None:
155
+ self._workflow_runs = workflow_runs
156
+
157
+ self.resume_when_complete = async_to_raw_response_wrapper(
158
+ workflow_runs.resume_when_complete,
159
+ )
160
+
161
+
162
+ class WorkflowRunsResourceWithStreamingResponse:
163
+ def __init__(self, workflow_runs: WorkflowRunsResource) -> None:
164
+ self._workflow_runs = workflow_runs
165
+
166
+ self.resume_when_complete = to_streamed_response_wrapper(
167
+ workflow_runs.resume_when_complete,
168
+ )
169
+
170
+
171
+ class AsyncWorkflowRunsResourceWithStreamingResponse:
172
+ def __init__(self, workflow_runs: AsyncWorkflowRunsResource) -> None:
173
+ self._workflow_runs = workflow_runs
174
+
175
+ self.resume_when_complete = async_to_streamed_response_wrapper(
176
+ workflow_runs.resume_when_complete,
177
+ )
@@ -43,3 +43,9 @@ from .document_transform_json_to_html_params import (
43
43
  from .document_transform_json_to_html_response import (
44
44
  DocumentTransformJsonToHTMLResponse as DocumentTransformJsonToHTMLResponse,
45
45
  )
46
+ from .workflow_run_resume_when_complete_params import (
47
+ WorkflowRunResumeWhenCompleteParams as WorkflowRunResumeWhenCompleteParams,
48
+ )
49
+ from .workflow_run_resume_when_complete_response import (
50
+ WorkflowRunResumeWhenCompleteResponse as WorkflowRunResumeWhenCompleteResponse,
51
+ )
@@ -52,8 +52,12 @@ class DocumentExtractParams(TypedDict, total=False):
52
52
  ocr_quality: Annotated[Literal["high", "low"], PropertyInfo(alias="ocrQuality")]
53
53
  """OCR quality setting"""
54
54
 
55
- priority: Literal["interactive", "non-interactive"]
56
- """The priority of the extraction task. Non-interactive is lower priority."""
55
+ priority: Literal["interactive", "non-interactive", "background"]
56
+ """The priority of the extraction task.
57
+
58
+ Non-interactive is lower priority. Background are tasks that can be run in the
59
+ background while the user is doing other things.
60
+ """
57
61
 
58
62
  reasoning_effort: Annotated[Literal["low", "medium", "high"], PropertyInfo(alias="reasoningEffort")]
59
63
  """Optional control over the reasoning effort for extraction."""
@@ -0,0 +1,14 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Required, Annotated, TypedDict
6
+
7
+ from ..._utils import PropertyInfo
8
+
9
+ __all__ = ["WorkflowRunResumeWhenCompleteParams"]
10
+
11
+
12
+ class WorkflowRunResumeWhenCompleteParams(TypedDict, total=False):
13
+ async_result_id: Required[Annotated[str, PropertyInfo(alias="asyncResultId")]]
14
+ """The unique identifier of the asynchronous result to monitor before resuming."""
@@ -0,0 +1,12 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from ..._models import BaseModel
4
+
5
+ __all__ = ["WorkflowRunResumeWhenCompleteResponse"]
6
+
7
+
8
+ class WorkflowRunResumeWhenCompleteResponse(BaseModel):
9
+ """Request accepted, processing to resume workflow has been initiated."""
10
+
11
+ message: str
12
+ """A message indicating the request has been accepted for processing."""