samplehc 0.11.0__py3-none-any.whl → 0.13.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 (68) hide show
  1. samplehc/__init__.py +3 -1
  2. samplehc/_base_client.py +9 -9
  3. samplehc/_client.py +8 -8
  4. samplehc/_models.py +10 -4
  5. samplehc/_qs.py +7 -7
  6. samplehc/_types.py +18 -11
  7. samplehc/_utils/_transform.py +2 -2
  8. samplehc/_utils/_utils.py +4 -4
  9. samplehc/_version.py +1 -1
  10. samplehc/resources/v1/v1.py +9 -9
  11. samplehc/resources/v2/async_results.py +13 -13
  12. samplehc/resources/v2/browser_agents/browser_agents.py +5 -5
  13. samplehc/resources/v2/browser_agents/runs/help_requests.py +3 -3
  14. samplehc/resources/v2/browser_agents/runs/runs.py +131 -0
  15. samplehc/resources/v2/browser_automation/availity.py +3 -3
  16. samplehc/resources/v2/clearinghouse/claim.py +29 -29
  17. samplehc/resources/v2/clearinghouse/clearinghouse.py +33 -33
  18. samplehc/resources/v2/clearinghouse/payers.py +5 -5
  19. samplehc/resources/v2/communication.py +29 -29
  20. samplehc/resources/v2/database.py +5 -5
  21. samplehc/resources/v2/documents/documents.py +152 -37
  22. samplehc/resources/v2/documents/formats.py +3 -3
  23. samplehc/resources/v2/documents/legacy.py +91 -6
  24. samplehc/resources/v2/documents/pdf_template.py +3 -3
  25. samplehc/resources/v2/documents/templates.py +27 -27
  26. samplehc/resources/v2/events.py +7 -7
  27. samplehc/resources/v2/hie/adt.py +7 -7
  28. samplehc/resources/v2/hie/documents.py +15 -15
  29. samplehc/resources/v2/integrations/bank/transactions.py +5 -5
  30. samplehc/resources/v2/integrations/careviso.py +29 -29
  31. samplehc/resources/v2/integrations/glidian/glidian.py +13 -13
  32. samplehc/resources/v2/integrations/glidian/prior_authorizations/clinical_questions.py +5 -5
  33. samplehc/resources/v2/integrations/glidian/prior_authorizations/prior_authorizations.py +19 -19
  34. samplehc/resources/v2/integrations/kno2/messages.py +5 -5
  35. samplehc/resources/v2/integrations/salesforce.py +92 -8
  36. samplehc/resources/v2/integrations/snowflake.py +3 -3
  37. samplehc/resources/v2/integrations/xcures.py +7 -7
  38. samplehc/resources/v2/ledger/account.py +10 -11
  39. samplehc/resources/v2/ledger/entry.py +21 -22
  40. samplehc/resources/v2/policies.py +47 -47
  41. samplehc/resources/v2/tasks/state.py +7 -7
  42. samplehc/resources/v2/tasks/tasks.py +125 -16
  43. samplehc/resources/v2/workflow_runs/step.py +3 -3
  44. samplehc/resources/v2/workflow_runs/workflow_runs.py +11 -11
  45. samplehc/resources/v2/workflows.py +13 -13
  46. samplehc/types/v2/__init__.py +3 -0
  47. samplehc/types/v2/browser_agents/__init__.py +3 -0
  48. samplehc/types/v2/browser_agents/run_list_events_params.py +15 -0
  49. samplehc/types/v2/browser_agents/run_list_events_response.py +30 -0
  50. samplehc/types/v2/browser_agents/runs/help_request_resolve_response.py +0 -2
  51. samplehc/types/v2/document_extract_params.py +4 -1
  52. samplehc/types/v2/document_split_params.py +16 -1
  53. samplehc/types/v2/document_unzip_async_response.py +12 -0
  54. samplehc/types/v2/documents/__init__.py +2 -0
  55. samplehc/types/v2/documents/legacy_split_params.py +20 -0
  56. samplehc/types/v2/documents/legacy_split_response.py +12 -0
  57. samplehc/types/v2/documents/template_render_document_params.py +17 -5
  58. samplehc/types/v2/integrations/__init__.py +1 -0
  59. samplehc/types/v2/integrations/salesforce_run_soql_query_params.py +11 -0
  60. samplehc/types/v2/ledger/account_writeoff_params.py +2 -3
  61. samplehc/types/v2/ledger/entry_post_params.py +1 -2
  62. samplehc/types/v2/ledger/entry_reverse_params.py +2 -3
  63. samplehc/types/v2/task_update_column_params.py +16 -0
  64. samplehc/types/v2/task_update_column_response.py +9 -0
  65. {samplehc-0.11.0.dist-info → samplehc-0.13.0.dist-info}/METADATA +1 -1
  66. {samplehc-0.11.0.dist-info → samplehc-0.13.0.dist-info}/RECORD +68 -60
  67. {samplehc-0.11.0.dist-info → samplehc-0.13.0.dist-info}/WHEEL +0 -0
  68. {samplehc-0.11.0.dist-info → samplehc-0.13.0.dist-info}/licenses/LICENSE +0 -0
@@ -23,7 +23,7 @@ from .formats import (
23
23
  FormatsResourceWithStreamingResponse,
24
24
  AsyncFormatsResourceWithStreamingResponse,
25
25
  )
26
- from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
26
+ from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
27
27
  from ...._utils import maybe_transform, async_maybe_transform
28
28
  from .templates import (
29
29
  TemplatesResource,
@@ -68,6 +68,7 @@ from ....types.v2.document_combine_response import DocumentCombineResponse
68
68
  from ....types.v2.document_extract_response import DocumentExtractResponse
69
69
  from ....types.v2.document_classify_response import DocumentClassifyResponse
70
70
  from ....types.v2.document_retrieve_response import DocumentRetrieveResponse
71
+ from ....types.v2.document_unzip_async_response import DocumentUnzipAsyncResponse
71
72
  from ....types.v2.document_generate_csv_response import DocumentGenerateCsvResponse
72
73
  from ....types.v2.document_retrieve_metadata_response import DocumentRetrieveMetadataResponse
73
74
  from ....types.v2.document_create_from_splits_response import DocumentCreateFromSplitsResponse
@@ -123,7 +124,7 @@ class DocumentsResource(SyncAPIResource):
123
124
  extra_headers: Headers | None = None,
124
125
  extra_query: Query | None = None,
125
126
  extra_body: Body | None = None,
126
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
127
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
127
128
  ) -> DocumentRetrieveResponse:
128
129
  """
129
130
  Retrieves comprehensive details for a specific document, including its content
@@ -163,7 +164,7 @@ class DocumentsResource(SyncAPIResource):
163
164
  extra_headers: Headers | None = None,
164
165
  extra_query: Query | None = None,
165
166
  extra_body: Body | None = None,
166
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
167
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
167
168
  ) -> DocumentClassifyResponse:
168
169
  """
169
170
  Initiates an asynchronous document classification process based on provided
@@ -207,7 +208,7 @@ class DocumentsResource(SyncAPIResource):
207
208
  extra_headers: Headers | None = None,
208
209
  extra_query: Query | None = None,
209
210
  extra_body: Body | None = None,
210
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
211
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
211
212
  ) -> DocumentCombineResponse:
212
213
  """
213
214
  Combines multiple PDF documents into a single PDF and returns the combined
@@ -251,7 +252,7 @@ class DocumentsResource(SyncAPIResource):
251
252
  extra_headers: Headers | None = None,
252
253
  extra_query: Query | None = None,
253
254
  extra_body: Body | None = None,
254
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
255
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
255
256
  ) -> DocumentCreateFromSplitsResponse:
256
257
  """
257
258
  Creates new documents from specified page splits of an existing document.
@@ -291,14 +292,15 @@ class DocumentsResource(SyncAPIResource):
291
292
  documents: Iterable[document_extract_params.Document],
292
293
  prompt: str,
293
294
  response_json_schema: Dict[str, object],
294
- model: Literal["reasoning-3-mini", "reasoning-3"] | NotGiven = NOT_GIVEN,
295
- reasoning_effort: Literal["low", "medium", "high"] | NotGiven = NOT_GIVEN,
295
+ model: Literal["reasoning-3-mini", "reasoning-3", "base-5", "base-5-mini", "base-5-nano"] | Omit = omit,
296
+ priority: Literal["interactive", "non-interactive"] | Omit = omit,
297
+ reasoning_effort: Literal["low", "medium", "high"] | Omit = omit,
296
298
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
297
299
  # The extra values given here take precedence over values defined on the client or passed to this method.
298
300
  extra_headers: Headers | None = None,
299
301
  extra_query: Query | None = None,
300
302
  extra_body: Body | None = None,
301
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
303
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
302
304
  ) -> DocumentExtractResponse:
303
305
  """
304
306
  Initiates a modern, flexible asynchronous data extraction process using a JSON
@@ -313,6 +315,8 @@ class DocumentsResource(SyncAPIResource):
313
315
 
314
316
  model: The model to use for extraction.
315
317
 
318
+ priority: The priority of the extraction task. Non-interactive is lower priority.
319
+
316
320
  reasoning_effort: Optional control over the reasoning effort for extraction.
317
321
 
318
322
  extra_headers: Send extra headers
@@ -331,6 +335,7 @@ class DocumentsResource(SyncAPIResource):
331
335
  "prompt": prompt,
332
336
  "response_json_schema": response_json_schema,
333
337
  "model": model,
338
+ "priority": priority,
334
339
  "reasoning_effort": reasoning_effort,
335
340
  },
336
341
  document_extract_params.DocumentExtractParams,
@@ -346,13 +351,13 @@ class DocumentsResource(SyncAPIResource):
346
351
  *,
347
352
  file_name: str,
348
353
  rows: Iterable[Dict[str, Union[str, float]]],
349
- options: document_generate_csv_params.Options | NotGiven = NOT_GIVEN,
354
+ options: document_generate_csv_params.Options | Omit = omit,
350
355
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
351
356
  # The extra values given here take precedence over values defined on the client or passed to this method.
352
357
  extra_headers: Headers | None = None,
353
358
  extra_query: Query | None = None,
354
359
  extra_body: Body | None = None,
355
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
360
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
356
361
  ) -> DocumentGenerateCsvResponse:
357
362
  """
358
363
  Creates a new CSV document from the provided rows of data and returns the new
@@ -415,7 +420,7 @@ class DocumentsResource(SyncAPIResource):
415
420
  extra_headers: Headers | None = None,
416
421
  extra_query: Query | None = None,
417
422
  extra_body: Body | None = None,
418
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
423
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
419
424
  ) -> DocumentPresignedUploadURLResponse:
420
425
  """
421
426
  Generates a presigned URL that can be used to directly upload a file to storage.
@@ -458,7 +463,7 @@ class DocumentsResource(SyncAPIResource):
458
463
  extra_headers: Headers | None = None,
459
464
  extra_query: Query | None = None,
460
465
  extra_body: Body | None = None,
461
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
466
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
462
467
  ) -> DocumentRetrieveCsvContentResponse:
463
468
  """
464
469
  Retrieves the content of a CSV document as a structured JSON array.
@@ -491,7 +496,7 @@ class DocumentsResource(SyncAPIResource):
491
496
  extra_headers: Headers | None = None,
492
497
  extra_query: Query | None = None,
493
498
  extra_body: Body | None = None,
494
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
499
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
495
500
  ) -> DocumentRetrieveMetadataResponse:
496
501
  """
497
502
  Retrieves metadata for a specific document, including a presigned URL for direct
@@ -526,7 +531,7 @@ class DocumentsResource(SyncAPIResource):
526
531
  extra_headers: Headers | None = None,
527
532
  extra_query: Query | None = None,
528
533
  extra_body: Body | None = None,
529
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
534
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
530
535
  ) -> DocumentSearchResponse:
531
536
  """
532
537
  Performs a search query across a specified set of documents and returns matching
@@ -564,12 +569,14 @@ class DocumentsResource(SyncAPIResource):
564
569
  self,
565
570
  *,
566
571
  document: document_split_params.Document,
572
+ split_description: Iterable[document_split_params.SplitDescription],
573
+ split_rules: str | Omit = omit,
567
574
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
568
575
  # The extra values given here take precedence over values defined on the client or passed to this method.
569
576
  extra_headers: Headers | None = None,
570
577
  extra_query: Query | None = None,
571
578
  extra_body: Body | None = None,
572
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
579
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
573
580
  ) -> DocumentSplitResponse:
574
581
  """Initiates an asynchronous document splitting process.
575
582
 
@@ -579,6 +586,10 @@ class DocumentsResource(SyncAPIResource):
579
586
  Args:
580
587
  document: The document to be split.
581
588
 
589
+ split_description: Split description configuration.
590
+
591
+ split_rules: Optional split rules prompt for the splitter.
592
+
582
593
  extra_headers: Send extra headers
583
594
 
584
595
  extra_query: Add additional query parameters to the request
@@ -589,7 +600,14 @@ class DocumentsResource(SyncAPIResource):
589
600
  """
590
601
  return self._post(
591
602
  "/api/v2/documents/split",
592
- body=maybe_transform({"document": document}, document_split_params.DocumentSplitParams),
603
+ body=maybe_transform(
604
+ {
605
+ "document": document,
606
+ "split_description": split_description,
607
+ "split_rules": split_rules,
608
+ },
609
+ document_split_params.DocumentSplitParams,
610
+ ),
593
611
  options=make_request_options(
594
612
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
595
613
  ),
@@ -599,13 +617,13 @@ class DocumentsResource(SyncAPIResource):
599
617
  def transform_json_to_html(
600
618
  self,
601
619
  *,
602
- json: object | NotGiven = NOT_GIVEN,
620
+ json: object | Omit = omit,
603
621
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
604
622
  # The extra values given here take precedence over values defined on the client or passed to this method.
605
623
  extra_headers: Headers | None = None,
606
624
  extra_query: Query | None = None,
607
625
  extra_body: Body | None = None,
608
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
626
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
609
627
  ) -> DocumentTransformJsonToHTMLResponse:
610
628
  """
611
629
  Transforms a Sample JSON document to HTML
@@ -641,7 +659,7 @@ class DocumentsResource(SyncAPIResource):
641
659
  extra_headers: Headers | None = None,
642
660
  extra_query: Query | None = None,
643
661
  extra_body: Body | None = None,
644
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
662
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
645
663
  ) -> DocumentUnzipResponse:
646
664
  """
647
665
  Given a document ID representing a ZIP file, unzip it, traverse the directory
@@ -666,6 +684,40 @@ class DocumentsResource(SyncAPIResource):
666
684
  cast_to=DocumentUnzipResponse,
667
685
  )
668
686
 
687
+ def unzip_async(
688
+ self,
689
+ document_id: str,
690
+ *,
691
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
692
+ # The extra values given here take precedence over values defined on the client or passed to this method.
693
+ extra_headers: Headers | None = None,
694
+ extra_query: Query | None = None,
695
+ extra_body: Body | None = None,
696
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
697
+ ) -> DocumentUnzipAsyncResponse:
698
+ """
699
+ Given a document ID representing a ZIP file, unzip it, traverse the directory
700
+ structure and return all PDFs found as a list of documents
701
+
702
+ Args:
703
+ extra_headers: Send extra headers
704
+
705
+ extra_query: Add additional query parameters to the request
706
+
707
+ extra_body: Add additional JSON properties to the request
708
+
709
+ timeout: Override the client-level default timeout for this request, in seconds
710
+ """
711
+ if not document_id:
712
+ raise ValueError(f"Expected a non-empty value for `document_id` but received {document_id!r}")
713
+ return self._post(
714
+ f"/api/v2/documents/{document_id}/unzip-async",
715
+ options=make_request_options(
716
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
717
+ ),
718
+ cast_to=DocumentUnzipAsyncResponse,
719
+ )
720
+
669
721
 
670
722
  class AsyncDocumentsResource(AsyncAPIResource):
671
723
  @cached_property
@@ -712,7 +764,7 @@ class AsyncDocumentsResource(AsyncAPIResource):
712
764
  extra_headers: Headers | None = None,
713
765
  extra_query: Query | None = None,
714
766
  extra_body: Body | None = None,
715
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
767
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
716
768
  ) -> DocumentRetrieveResponse:
717
769
  """
718
770
  Retrieves comprehensive details for a specific document, including its content
@@ -752,7 +804,7 @@ class AsyncDocumentsResource(AsyncAPIResource):
752
804
  extra_headers: Headers | None = None,
753
805
  extra_query: Query | None = None,
754
806
  extra_body: Body | None = None,
755
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
807
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
756
808
  ) -> DocumentClassifyResponse:
757
809
  """
758
810
  Initiates an asynchronous document classification process based on provided
@@ -796,7 +848,7 @@ class AsyncDocumentsResource(AsyncAPIResource):
796
848
  extra_headers: Headers | None = None,
797
849
  extra_query: Query | None = None,
798
850
  extra_body: Body | None = None,
799
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
851
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
800
852
  ) -> DocumentCombineResponse:
801
853
  """
802
854
  Combines multiple PDF documents into a single PDF and returns the combined
@@ -840,7 +892,7 @@ class AsyncDocumentsResource(AsyncAPIResource):
840
892
  extra_headers: Headers | None = None,
841
893
  extra_query: Query | None = None,
842
894
  extra_body: Body | None = None,
843
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
895
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
844
896
  ) -> DocumentCreateFromSplitsResponse:
845
897
  """
846
898
  Creates new documents from specified page splits of an existing document.
@@ -880,14 +932,15 @@ class AsyncDocumentsResource(AsyncAPIResource):
880
932
  documents: Iterable[document_extract_params.Document],
881
933
  prompt: str,
882
934
  response_json_schema: Dict[str, object],
883
- model: Literal["reasoning-3-mini", "reasoning-3"] | NotGiven = NOT_GIVEN,
884
- reasoning_effort: Literal["low", "medium", "high"] | NotGiven = NOT_GIVEN,
935
+ model: Literal["reasoning-3-mini", "reasoning-3", "base-5", "base-5-mini", "base-5-nano"] | Omit = omit,
936
+ priority: Literal["interactive", "non-interactive"] | Omit = omit,
937
+ reasoning_effort: Literal["low", "medium", "high"] | Omit = omit,
885
938
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
886
939
  # The extra values given here take precedence over values defined on the client or passed to this method.
887
940
  extra_headers: Headers | None = None,
888
941
  extra_query: Query | None = None,
889
942
  extra_body: Body | None = None,
890
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
943
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
891
944
  ) -> DocumentExtractResponse:
892
945
  """
893
946
  Initiates a modern, flexible asynchronous data extraction process using a JSON
@@ -902,6 +955,8 @@ class AsyncDocumentsResource(AsyncAPIResource):
902
955
 
903
956
  model: The model to use for extraction.
904
957
 
958
+ priority: The priority of the extraction task. Non-interactive is lower priority.
959
+
905
960
  reasoning_effort: Optional control over the reasoning effort for extraction.
906
961
 
907
962
  extra_headers: Send extra headers
@@ -920,6 +975,7 @@ class AsyncDocumentsResource(AsyncAPIResource):
920
975
  "prompt": prompt,
921
976
  "response_json_schema": response_json_schema,
922
977
  "model": model,
978
+ "priority": priority,
923
979
  "reasoning_effort": reasoning_effort,
924
980
  },
925
981
  document_extract_params.DocumentExtractParams,
@@ -935,13 +991,13 @@ class AsyncDocumentsResource(AsyncAPIResource):
935
991
  *,
936
992
  file_name: str,
937
993
  rows: Iterable[Dict[str, Union[str, float]]],
938
- options: document_generate_csv_params.Options | NotGiven = NOT_GIVEN,
994
+ options: document_generate_csv_params.Options | Omit = omit,
939
995
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
940
996
  # The extra values given here take precedence over values defined on the client or passed to this method.
941
997
  extra_headers: Headers | None = None,
942
998
  extra_query: Query | None = None,
943
999
  extra_body: Body | None = None,
944
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1000
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
945
1001
  ) -> DocumentGenerateCsvResponse:
946
1002
  """
947
1003
  Creates a new CSV document from the provided rows of data and returns the new
@@ -1004,7 +1060,7 @@ class AsyncDocumentsResource(AsyncAPIResource):
1004
1060
  extra_headers: Headers | None = None,
1005
1061
  extra_query: Query | None = None,
1006
1062
  extra_body: Body | None = None,
1007
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1063
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1008
1064
  ) -> DocumentPresignedUploadURLResponse:
1009
1065
  """
1010
1066
  Generates a presigned URL that can be used to directly upload a file to storage.
@@ -1047,7 +1103,7 @@ class AsyncDocumentsResource(AsyncAPIResource):
1047
1103
  extra_headers: Headers | None = None,
1048
1104
  extra_query: Query | None = None,
1049
1105
  extra_body: Body | None = None,
1050
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1106
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1051
1107
  ) -> DocumentRetrieveCsvContentResponse:
1052
1108
  """
1053
1109
  Retrieves the content of a CSV document as a structured JSON array.
@@ -1080,7 +1136,7 @@ class AsyncDocumentsResource(AsyncAPIResource):
1080
1136
  extra_headers: Headers | None = None,
1081
1137
  extra_query: Query | None = None,
1082
1138
  extra_body: Body | None = None,
1083
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1139
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1084
1140
  ) -> DocumentRetrieveMetadataResponse:
1085
1141
  """
1086
1142
  Retrieves metadata for a specific document, including a presigned URL for direct
@@ -1115,7 +1171,7 @@ class AsyncDocumentsResource(AsyncAPIResource):
1115
1171
  extra_headers: Headers | None = None,
1116
1172
  extra_query: Query | None = None,
1117
1173
  extra_body: Body | None = None,
1118
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1174
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1119
1175
  ) -> DocumentSearchResponse:
1120
1176
  """
1121
1177
  Performs a search query across a specified set of documents and returns matching
@@ -1153,12 +1209,14 @@ class AsyncDocumentsResource(AsyncAPIResource):
1153
1209
  self,
1154
1210
  *,
1155
1211
  document: document_split_params.Document,
1212
+ split_description: Iterable[document_split_params.SplitDescription],
1213
+ split_rules: str | Omit = omit,
1156
1214
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1157
1215
  # The extra values given here take precedence over values defined on the client or passed to this method.
1158
1216
  extra_headers: Headers | None = None,
1159
1217
  extra_query: Query | None = None,
1160
1218
  extra_body: Body | None = None,
1161
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1219
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1162
1220
  ) -> DocumentSplitResponse:
1163
1221
  """Initiates an asynchronous document splitting process.
1164
1222
 
@@ -1168,6 +1226,10 @@ class AsyncDocumentsResource(AsyncAPIResource):
1168
1226
  Args:
1169
1227
  document: The document to be split.
1170
1228
 
1229
+ split_description: Split description configuration.
1230
+
1231
+ split_rules: Optional split rules prompt for the splitter.
1232
+
1171
1233
  extra_headers: Send extra headers
1172
1234
 
1173
1235
  extra_query: Add additional query parameters to the request
@@ -1178,7 +1240,14 @@ class AsyncDocumentsResource(AsyncAPIResource):
1178
1240
  """
1179
1241
  return await self._post(
1180
1242
  "/api/v2/documents/split",
1181
- body=await async_maybe_transform({"document": document}, document_split_params.DocumentSplitParams),
1243
+ body=await async_maybe_transform(
1244
+ {
1245
+ "document": document,
1246
+ "split_description": split_description,
1247
+ "split_rules": split_rules,
1248
+ },
1249
+ document_split_params.DocumentSplitParams,
1250
+ ),
1182
1251
  options=make_request_options(
1183
1252
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
1184
1253
  ),
@@ -1188,13 +1257,13 @@ class AsyncDocumentsResource(AsyncAPIResource):
1188
1257
  async def transform_json_to_html(
1189
1258
  self,
1190
1259
  *,
1191
- json: object | NotGiven = NOT_GIVEN,
1260
+ json: object | Omit = omit,
1192
1261
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1193
1262
  # The extra values given here take precedence over values defined on the client or passed to this method.
1194
1263
  extra_headers: Headers | None = None,
1195
1264
  extra_query: Query | None = None,
1196
1265
  extra_body: Body | None = None,
1197
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1266
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1198
1267
  ) -> DocumentTransformJsonToHTMLResponse:
1199
1268
  """
1200
1269
  Transforms a Sample JSON document to HTML
@@ -1230,7 +1299,7 @@ class AsyncDocumentsResource(AsyncAPIResource):
1230
1299
  extra_headers: Headers | None = None,
1231
1300
  extra_query: Query | None = None,
1232
1301
  extra_body: Body | None = None,
1233
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1302
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1234
1303
  ) -> DocumentUnzipResponse:
1235
1304
  """
1236
1305
  Given a document ID representing a ZIP file, unzip it, traverse the directory
@@ -1255,6 +1324,40 @@ class AsyncDocumentsResource(AsyncAPIResource):
1255
1324
  cast_to=DocumentUnzipResponse,
1256
1325
  )
1257
1326
 
1327
+ async def unzip_async(
1328
+ self,
1329
+ document_id: str,
1330
+ *,
1331
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1332
+ # The extra values given here take precedence over values defined on the client or passed to this method.
1333
+ extra_headers: Headers | None = None,
1334
+ extra_query: Query | None = None,
1335
+ extra_body: Body | None = None,
1336
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1337
+ ) -> DocumentUnzipAsyncResponse:
1338
+ """
1339
+ Given a document ID representing a ZIP file, unzip it, traverse the directory
1340
+ structure and return all PDFs found as a list of documents
1341
+
1342
+ Args:
1343
+ extra_headers: Send extra headers
1344
+
1345
+ extra_query: Add additional query parameters to the request
1346
+
1347
+ extra_body: Add additional JSON properties to the request
1348
+
1349
+ timeout: Override the client-level default timeout for this request, in seconds
1350
+ """
1351
+ if not document_id:
1352
+ raise ValueError(f"Expected a non-empty value for `document_id` but received {document_id!r}")
1353
+ return await self._post(
1354
+ f"/api/v2/documents/{document_id}/unzip-async",
1355
+ options=make_request_options(
1356
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
1357
+ ),
1358
+ cast_to=DocumentUnzipAsyncResponse,
1359
+ )
1360
+
1258
1361
 
1259
1362
  class DocumentsResourceWithRawResponse:
1260
1363
  def __init__(self, documents: DocumentsResource) -> None:
@@ -1299,6 +1402,9 @@ class DocumentsResourceWithRawResponse:
1299
1402
  self.unzip = to_raw_response_wrapper(
1300
1403
  documents.unzip,
1301
1404
  )
1405
+ self.unzip_async = to_raw_response_wrapper(
1406
+ documents.unzip_async,
1407
+ )
1302
1408
 
1303
1409
  @cached_property
1304
1410
  def legacy(self) -> LegacyResourceWithRawResponse:
@@ -1360,6 +1466,9 @@ class AsyncDocumentsResourceWithRawResponse:
1360
1466
  self.unzip = async_to_raw_response_wrapper(
1361
1467
  documents.unzip,
1362
1468
  )
1469
+ self.unzip_async = async_to_raw_response_wrapper(
1470
+ documents.unzip_async,
1471
+ )
1363
1472
 
1364
1473
  @cached_property
1365
1474
  def legacy(self) -> AsyncLegacyResourceWithRawResponse:
@@ -1421,6 +1530,9 @@ class DocumentsResourceWithStreamingResponse:
1421
1530
  self.unzip = to_streamed_response_wrapper(
1422
1531
  documents.unzip,
1423
1532
  )
1533
+ self.unzip_async = to_streamed_response_wrapper(
1534
+ documents.unzip_async,
1535
+ )
1424
1536
 
1425
1537
  @cached_property
1426
1538
  def legacy(self) -> LegacyResourceWithStreamingResponse:
@@ -1482,6 +1594,9 @@ class AsyncDocumentsResourceWithStreamingResponse:
1482
1594
  self.unzip = async_to_streamed_response_wrapper(
1483
1595
  documents.unzip,
1484
1596
  )
1597
+ self.unzip_async = async_to_streamed_response_wrapper(
1598
+ documents.unzip_async,
1599
+ )
1485
1600
 
1486
1601
  @cached_property
1487
1602
  def legacy(self) -> AsyncLegacyResourceWithStreamingResponse:
@@ -4,7 +4,7 @@ from __future__ import annotations
4
4
 
5
5
  import httpx
6
6
 
7
- from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
7
+ from ...._types import Body, Query, Headers, NotGiven, not_given
8
8
  from ...._utils import maybe_transform, async_maybe_transform
9
9
  from ...._compat import cached_property
10
10
  from ...._resource import SyncAPIResource, AsyncAPIResource
@@ -52,7 +52,7 @@ class FormatsResource(SyncAPIResource):
52
52
  extra_headers: Headers | None = None,
53
53
  extra_query: Query | None = None,
54
54
  extra_body: Body | None = None,
55
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
55
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
56
56
  ) -> FormatCreatePdfResponse:
57
57
  """
58
58
  Converts an uploaded Word document (.doc, .docx) to a PDF file by creating a new
@@ -116,7 +116,7 @@ class AsyncFormatsResource(AsyncAPIResource):
116
116
  extra_headers: Headers | None = None,
117
117
  extra_query: Query | None = None,
118
118
  extra_body: Body | None = None,
119
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
119
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
120
120
  ) -> FormatCreatePdfResponse:
121
121
  """
122
122
  Converts an uploaded Word document (.doc, .docx) to a PDF file by creating a new