casedev 0.3.0__py3-none-any.whl → 0.4.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.
- casedev/_client.py +275 -1
- casedev/_version.py +1 -1
- casedev/resources/__init__.py +98 -0
- casedev/resources/applications/__init__.py +33 -0
- casedev/resources/applications/applications.py +102 -0
- casedev/resources/applications/v1/__init__.py +61 -0
- casedev/resources/applications/v1/deployments.py +867 -0
- casedev/resources/applications/v1/projects.py +1377 -0
- casedev/resources/applications/v1/v1.py +166 -0
- casedev/resources/applications/v1/workflows.py +182 -0
- casedev/resources/compute/v1/__init__.py +28 -0
- casedev/resources/compute/v1/instance_types.py +145 -0
- casedev/resources/compute/v1/instances.py +448 -0
- casedev/resources/compute/v1/v1.py +64 -0
- casedev/resources/database/__init__.py +33 -0
- casedev/resources/database/database.py +102 -0
- casedev/resources/database/v1/__init__.py +33 -0
- casedev/resources/database/v1/projects.py +771 -0
- casedev/resources/database/v1/v1.py +175 -0
- casedev/resources/legal/__init__.py +33 -0
- casedev/resources/legal/legal.py +102 -0
- casedev/resources/legal/v1.py +924 -0
- casedev/resources/memory/__init__.py +33 -0
- casedev/resources/memory/memory.py +102 -0
- casedev/resources/memory/v1.py +1100 -0
- casedev/resources/privilege/__init__.py +33 -0
- casedev/resources/privilege/privilege.py +102 -0
- casedev/resources/privilege/v1.py +260 -0
- casedev/resources/superdoc/__init__.py +33 -0
- casedev/resources/superdoc/superdoc.py +102 -0
- casedev/resources/superdoc/v1.py +349 -0
- casedev/resources/translate/__init__.py +33 -0
- casedev/resources/translate/translate.py +102 -0
- casedev/resources/translate/v1.py +418 -0
- casedev/resources/vault/__init__.py +14 -0
- casedev/resources/vault/graphrag.py +91 -0
- casedev/resources/vault/multipart.py +549 -0
- casedev/resources/vault/objects.py +475 -5
- casedev/resources/vault/vault.py +262 -5
- casedev/types/__init__.py +4 -0
- casedev/types/applications/v1/__init__.py +20 -0
- casedev/types/applications/v1/deployment_cancel_params.py +14 -0
- casedev/types/applications/v1/deployment_create_params.py +20 -0
- casedev/types/applications/v1/deployment_get_logs_params.py +14 -0
- casedev/types/applications/v1/deployment_list_params.py +23 -0
- casedev/types/applications/v1/deployment_retrieve_params.py +17 -0
- casedev/types/applications/v1/deployment_stream_params.py +17 -0
- casedev/types/applications/v1/project_create_deployment_params.py +29 -0
- casedev/types/applications/v1/project_create_domain_params.py +17 -0
- casedev/types/applications/v1/project_create_env_params.py +27 -0
- casedev/types/applications/v1/project_create_params.py +53 -0
- casedev/types/applications/v1/project_delete_params.py +14 -0
- casedev/types/applications/v1/project_get_runtime_logs_params.py +12 -0
- casedev/types/applications/v1/project_list_deployments_params.py +18 -0
- casedev/types/applications/v1/project_list_env_params.py +12 -0
- casedev/types/applications/v1/project_list_response.py +45 -0
- casedev/types/applications/v1/workflow_get_status_params.py +14 -0
- casedev/types/compute/v1/__init__.py +6 -0
- casedev/types/compute/v1/instance_create_params.py +28 -0
- casedev/types/compute/v1/instance_create_response.py +35 -0
- casedev/types/compute/v1/instance_delete_response.py +23 -0
- casedev/types/compute/v1/instance_list_response.py +45 -0
- casedev/types/compute/v1/instance_retrieve_response.py +55 -0
- casedev/types/compute/v1/instance_type_list_response.py +46 -0
- casedev/types/database/__init__.py +5 -0
- casedev/types/database/v1/__init__.py +14 -0
- casedev/types/database/v1/project_create_branch_params.py +17 -0
- casedev/types/database/v1/project_create_branch_response.py +30 -0
- casedev/types/database/v1/project_create_params.py +27 -0
- casedev/types/database/v1/project_create_response.py +47 -0
- casedev/types/database/v1/project_delete_response.py +13 -0
- casedev/types/database/v1/project_get_connection_params.py +15 -0
- casedev/types/database/v1/project_get_connection_response.py +18 -0
- casedev/types/database/v1/project_list_branches_response.py +37 -0
- casedev/types/database/v1/project_list_response.py +64 -0
- casedev/types/database/v1/project_retrieve_response.py +100 -0
- casedev/types/database/v1_get_usage_response.py +116 -0
- casedev/types/legal/__init__.py +20 -0
- casedev/types/legal/v1_find_params.py +23 -0
- casedev/types/legal/v1_find_response.py +37 -0
- casedev/types/legal/v1_get_citations_from_url_params.py +12 -0
- casedev/types/legal/v1_get_citations_from_url_response.py +69 -0
- casedev/types/legal/v1_get_citations_params.py +16 -0
- casedev/types/legal/v1_get_citations_response.py +60 -0
- casedev/types/legal/v1_get_full_text_params.py +23 -0
- casedev/types/legal/v1_get_full_text_response.py +35 -0
- casedev/types/legal/v1_list_jurisdictions_params.py +12 -0
- casedev/types/legal/v1_list_jurisdictions_response.py +35 -0
- casedev/types/legal/v1_research_params.py +27 -0
- casedev/types/legal/v1_research_response.py +51 -0
- casedev/types/legal/v1_similar_params.py +25 -0
- casedev/types/legal/v1_similar_response.py +42 -0
- casedev/types/legal/v1_verify_params.py +16 -0
- casedev/types/legal/v1_verify_response.py +92 -0
- casedev/types/memory/__init__.py +14 -0
- casedev/types/memory/v1_create_params.py +69 -0
- casedev/types/memory/v1_create_response.py +23 -0
- casedev/types/memory/v1_delete_all_params.py +45 -0
- casedev/types/memory/v1_delete_all_response.py +12 -0
- casedev/types/memory/v1_delete_response.py +13 -0
- casedev/types/memory/v1_list_params.py +54 -0
- casedev/types/memory/v1_list_response.py +29 -0
- casedev/types/memory/v1_retrieve_response.py +23 -0
- casedev/types/memory/v1_search_params.py +54 -0
- casedev/types/memory/v1_search_response.py +61 -0
- casedev/types/privilege/__init__.py +6 -0
- casedev/types/privilege/v1_detect_params.py +34 -0
- casedev/types/privilege/v1_detect_response.py +41 -0
- casedev/types/superdoc/__init__.py +6 -0
- casedev/types/superdoc/v1_annotate_params.py +56 -0
- casedev/types/superdoc/v1_convert_params.py +23 -0
- casedev/types/translate/__init__.py +10 -0
- casedev/types/translate/v1_detect_params.py +18 -0
- casedev/types/translate/v1_detect_response.py +28 -0
- casedev/types/translate/v1_list_languages_params.py +18 -0
- casedev/types/translate/v1_list_languages_response.py +23 -0
- casedev/types/translate/v1_translate_params.py +30 -0
- casedev/types/translate/v1_translate_response.py +28 -0
- casedev/types/vault/__init__.py +14 -0
- casedev/types/vault/graphrag_process_object_response.py +45 -0
- casedev/types/vault/multipart_abort_params.py +15 -0
- casedev/types/vault/multipart_complete_params.py +26 -0
- casedev/types/vault/multipart_get_part_urls_params.py +24 -0
- casedev/types/vault/multipart_get_part_urls_response.py +19 -0
- casedev/types/vault/multipart_init_params.py +32 -0
- casedev/types/vault/multipart_init_response.py +23 -0
- casedev/types/vault/object_create_presigned_url_params.py +1 -1
- casedev/types/vault/object_delete_params.py +17 -0
- casedev/types/vault/object_delete_response.py +29 -0
- casedev/types/vault/object_get_ocr_words_params.py +28 -0
- casedev/types/vault/object_get_ocr_words_response.py +48 -0
- casedev/types/vault/object_get_summarize_job_response.py +40 -0
- casedev/types/vault/object_update_params.py +24 -0
- casedev/types/vault/object_update_response.py +39 -0
- casedev/types/vault_delete_params.py +17 -0
- casedev/types/vault_delete_response.py +30 -0
- casedev/types/vault_update_params.py +21 -0
- casedev/types/vault_update_response.py +60 -0
- casedev/types/vault_upload_params.py +1 -1
- {casedev-0.3.0.dist-info → casedev-0.4.0.dist-info}/METADATA +1 -1
- casedev-0.4.0.dist-info/RECORD +275 -0
- casedev-0.3.0.dist-info/RECORD +0 -150
- /casedev/types/{webhooks → applications}/__init__.py +0 -0
- {casedev-0.3.0.dist-info → casedev-0.4.0.dist-info}/WHEEL +0 -0
- {casedev-0.3.0.dist-info → casedev-0.4.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
from typing import Optional
|
|
5
6
|
from typing_extensions import Literal
|
|
6
7
|
|
|
7
8
|
import httpx
|
|
@@ -16,11 +17,20 @@ from ..._response import (
|
|
|
16
17
|
async_to_raw_response_wrapper,
|
|
17
18
|
async_to_streamed_response_wrapper,
|
|
18
19
|
)
|
|
19
|
-
from ...types.vault import
|
|
20
|
+
from ...types.vault import (
|
|
21
|
+
object_delete_params,
|
|
22
|
+
object_update_params,
|
|
23
|
+
object_get_ocr_words_params,
|
|
24
|
+
object_create_presigned_url_params,
|
|
25
|
+
)
|
|
20
26
|
from ..._base_client import make_request_options
|
|
21
27
|
from ...types.vault.object_list_response import ObjectListResponse
|
|
28
|
+
from ...types.vault.object_delete_response import ObjectDeleteResponse
|
|
29
|
+
from ...types.vault.object_update_response import ObjectUpdateResponse
|
|
22
30
|
from ...types.vault.object_get_text_response import ObjectGetTextResponse
|
|
23
31
|
from ...types.vault.object_retrieve_response import ObjectRetrieveResponse
|
|
32
|
+
from ...types.vault.object_get_ocr_words_response import ObjectGetOcrWordsResponse
|
|
33
|
+
from ...types.vault.object_get_summarize_job_response import ObjectGetSummarizeJobResponse
|
|
24
34
|
from ...types.vault.object_create_presigned_url_response import ObjectCreatePresignedURLResponse
|
|
25
35
|
|
|
26
36
|
__all__ = ["ObjectsResource", "AsyncObjectsResource"]
|
|
@@ -84,6 +94,63 @@ class ObjectsResource(SyncAPIResource):
|
|
|
84
94
|
cast_to=ObjectRetrieveResponse,
|
|
85
95
|
)
|
|
86
96
|
|
|
97
|
+
def update(
|
|
98
|
+
self,
|
|
99
|
+
object_id: str,
|
|
100
|
+
*,
|
|
101
|
+
id: str,
|
|
102
|
+
filename: str | Omit = omit,
|
|
103
|
+
metadata: object | Omit = omit,
|
|
104
|
+
path: Optional[str] | Omit = omit,
|
|
105
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
106
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
107
|
+
extra_headers: Headers | None = None,
|
|
108
|
+
extra_query: Query | None = None,
|
|
109
|
+
extra_body: Body | None = None,
|
|
110
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
111
|
+
) -> ObjectUpdateResponse:
|
|
112
|
+
"""Update a document's filename, path, or metadata.
|
|
113
|
+
|
|
114
|
+
Use this to rename files or
|
|
115
|
+
organize them into virtual folders. The path is stored in metadata.path and can
|
|
116
|
+
be used to build folder hierarchies in your application.
|
|
117
|
+
|
|
118
|
+
Args:
|
|
119
|
+
filename: New filename for the document (affects display name and downloads)
|
|
120
|
+
|
|
121
|
+
metadata: Additional metadata to merge with existing metadata
|
|
122
|
+
|
|
123
|
+
path: Folder path for hierarchy preservation (e.g., '/Discovery/Depositions'). Set to
|
|
124
|
+
null or empty string to remove.
|
|
125
|
+
|
|
126
|
+
extra_headers: Send extra headers
|
|
127
|
+
|
|
128
|
+
extra_query: Add additional query parameters to the request
|
|
129
|
+
|
|
130
|
+
extra_body: Add additional JSON properties to the request
|
|
131
|
+
|
|
132
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
133
|
+
"""
|
|
134
|
+
if not id:
|
|
135
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
136
|
+
if not object_id:
|
|
137
|
+
raise ValueError(f"Expected a non-empty value for `object_id` but received {object_id!r}")
|
|
138
|
+
return self._patch(
|
|
139
|
+
f"/vault/{id}/objects/{object_id}",
|
|
140
|
+
body=maybe_transform(
|
|
141
|
+
{
|
|
142
|
+
"filename": filename,
|
|
143
|
+
"metadata": metadata,
|
|
144
|
+
"path": path,
|
|
145
|
+
},
|
|
146
|
+
object_update_params.ObjectUpdateParams,
|
|
147
|
+
),
|
|
148
|
+
options=make_request_options(
|
|
149
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
150
|
+
),
|
|
151
|
+
cast_to=ObjectUpdateResponse,
|
|
152
|
+
)
|
|
153
|
+
|
|
87
154
|
def list(
|
|
88
155
|
self,
|
|
89
156
|
id: str,
|
|
@@ -118,6 +185,51 @@ class ObjectsResource(SyncAPIResource):
|
|
|
118
185
|
cast_to=ObjectListResponse,
|
|
119
186
|
)
|
|
120
187
|
|
|
188
|
+
def delete(
|
|
189
|
+
self,
|
|
190
|
+
object_id: str,
|
|
191
|
+
*,
|
|
192
|
+
id: str,
|
|
193
|
+
force: Literal["true"] | Omit = omit,
|
|
194
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
195
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
196
|
+
extra_headers: Headers | None = None,
|
|
197
|
+
extra_query: Query | None = None,
|
|
198
|
+
extra_body: Body | None = None,
|
|
199
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
200
|
+
) -> ObjectDeleteResponse:
|
|
201
|
+
"""
|
|
202
|
+
Permanently deletes a document from the vault including all associated vectors,
|
|
203
|
+
chunks, graph data, and the original file. This operation cannot be undone.
|
|
204
|
+
|
|
205
|
+
Args:
|
|
206
|
+
force: Force delete a stuck document that is still in 'processing' state. Use this if a
|
|
207
|
+
document got stuck during ingestion (e.g., OCR timeout).
|
|
208
|
+
|
|
209
|
+
extra_headers: Send extra headers
|
|
210
|
+
|
|
211
|
+
extra_query: Add additional query parameters to the request
|
|
212
|
+
|
|
213
|
+
extra_body: Add additional JSON properties to the request
|
|
214
|
+
|
|
215
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
216
|
+
"""
|
|
217
|
+
if not id:
|
|
218
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
219
|
+
if not object_id:
|
|
220
|
+
raise ValueError(f"Expected a non-empty value for `object_id` but received {object_id!r}")
|
|
221
|
+
return self._delete(
|
|
222
|
+
f"/vault/{id}/objects/{object_id}",
|
|
223
|
+
options=make_request_options(
|
|
224
|
+
extra_headers=extra_headers,
|
|
225
|
+
extra_query=extra_query,
|
|
226
|
+
extra_body=extra_body,
|
|
227
|
+
timeout=timeout,
|
|
228
|
+
query=maybe_transform({"force": force}, object_delete_params.ObjectDeleteParams),
|
|
229
|
+
),
|
|
230
|
+
cast_to=ObjectDeleteResponse,
|
|
231
|
+
)
|
|
232
|
+
|
|
121
233
|
def create_presigned_url(
|
|
122
234
|
self,
|
|
123
235
|
object_id: str,
|
|
@@ -147,8 +259,8 @@ class ObjectsResource(SyncAPIResource):
|
|
|
147
259
|
|
|
148
260
|
operation: The S3 operation to generate URL for
|
|
149
261
|
|
|
150
|
-
size_bytes: File size in bytes (optional, max
|
|
151
|
-
enforces exact file size at S3 level.
|
|
262
|
+
size_bytes: File size in bytes (optional, max 5GB for single PUT uploads). When provided for
|
|
263
|
+
PUT operations, enforces exact file size at S3 level.
|
|
152
264
|
|
|
153
265
|
extra_headers: Send extra headers
|
|
154
266
|
|
|
@@ -219,6 +331,110 @@ class ObjectsResource(SyncAPIResource):
|
|
|
219
331
|
cast_to=str,
|
|
220
332
|
)
|
|
221
333
|
|
|
334
|
+
def get_ocr_words(
|
|
335
|
+
self,
|
|
336
|
+
object_id: str,
|
|
337
|
+
*,
|
|
338
|
+
id: str,
|
|
339
|
+
page: int | Omit = omit,
|
|
340
|
+
word_end: int | Omit = omit,
|
|
341
|
+
word_start: int | Omit = omit,
|
|
342
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
343
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
344
|
+
extra_headers: Headers | None = None,
|
|
345
|
+
extra_query: Query | None = None,
|
|
346
|
+
extra_body: Body | None = None,
|
|
347
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
348
|
+
) -> ObjectGetOcrWordsResponse:
|
|
349
|
+
"""Retrieves word-level OCR bounding box data for a processed PDF document.
|
|
350
|
+
|
|
351
|
+
Each
|
|
352
|
+
word includes its text, normalized bounding box coordinates (0-1 range),
|
|
353
|
+
confidence score, and global word index. Use this data to highlight specific
|
|
354
|
+
text ranges in a PDF viewer based on word indices from search results.
|
|
355
|
+
|
|
356
|
+
Args:
|
|
357
|
+
page: Filter to a specific page number (1-indexed). If omitted, returns all pages.
|
|
358
|
+
|
|
359
|
+
word_end: Filter to words ending at this index (inclusive). Useful for retrieving words
|
|
360
|
+
for a specific chunk.
|
|
361
|
+
|
|
362
|
+
word_start: Filter to words starting at this index (inclusive). Useful for retrieving words
|
|
363
|
+
for a specific chunk.
|
|
364
|
+
|
|
365
|
+
extra_headers: Send extra headers
|
|
366
|
+
|
|
367
|
+
extra_query: Add additional query parameters to the request
|
|
368
|
+
|
|
369
|
+
extra_body: Add additional JSON properties to the request
|
|
370
|
+
|
|
371
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
372
|
+
"""
|
|
373
|
+
if not id:
|
|
374
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
375
|
+
if not object_id:
|
|
376
|
+
raise ValueError(f"Expected a non-empty value for `object_id` but received {object_id!r}")
|
|
377
|
+
return self._get(
|
|
378
|
+
f"/vault/{id}/objects/{object_id}/ocr-words",
|
|
379
|
+
options=make_request_options(
|
|
380
|
+
extra_headers=extra_headers,
|
|
381
|
+
extra_query=extra_query,
|
|
382
|
+
extra_body=extra_body,
|
|
383
|
+
timeout=timeout,
|
|
384
|
+
query=maybe_transform(
|
|
385
|
+
{
|
|
386
|
+
"page": page,
|
|
387
|
+
"word_end": word_end,
|
|
388
|
+
"word_start": word_start,
|
|
389
|
+
},
|
|
390
|
+
object_get_ocr_words_params.ObjectGetOcrWordsParams,
|
|
391
|
+
),
|
|
392
|
+
),
|
|
393
|
+
cast_to=ObjectGetOcrWordsResponse,
|
|
394
|
+
)
|
|
395
|
+
|
|
396
|
+
def get_summarize_job(
|
|
397
|
+
self,
|
|
398
|
+
job_id: str,
|
|
399
|
+
*,
|
|
400
|
+
id: str,
|
|
401
|
+
object_id: str,
|
|
402
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
403
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
404
|
+
extra_headers: Headers | None = None,
|
|
405
|
+
extra_query: Query | None = None,
|
|
406
|
+
extra_body: Body | None = None,
|
|
407
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
408
|
+
) -> ObjectGetSummarizeJobResponse:
|
|
409
|
+
"""Get the status of a CaseMark summary workflow job.
|
|
410
|
+
|
|
411
|
+
If the job has been
|
|
412
|
+
processing for too long, this endpoint will poll CaseMark directly to recover
|
|
413
|
+
stuck jobs.
|
|
414
|
+
|
|
415
|
+
Args:
|
|
416
|
+
extra_headers: Send extra headers
|
|
417
|
+
|
|
418
|
+
extra_query: Add additional query parameters to the request
|
|
419
|
+
|
|
420
|
+
extra_body: Add additional JSON properties to the request
|
|
421
|
+
|
|
422
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
423
|
+
"""
|
|
424
|
+
if not id:
|
|
425
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
426
|
+
if not object_id:
|
|
427
|
+
raise ValueError(f"Expected a non-empty value for `object_id` but received {object_id!r}")
|
|
428
|
+
if not job_id:
|
|
429
|
+
raise ValueError(f"Expected a non-empty value for `job_id` but received {job_id!r}")
|
|
430
|
+
return self._get(
|
|
431
|
+
f"/vault/{id}/objects/{object_id}/summarize/{job_id}",
|
|
432
|
+
options=make_request_options(
|
|
433
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
434
|
+
),
|
|
435
|
+
cast_to=ObjectGetSummarizeJobResponse,
|
|
436
|
+
)
|
|
437
|
+
|
|
222
438
|
def get_text(
|
|
223
439
|
self,
|
|
224
440
|
object_id: str,
|
|
@@ -317,6 +533,63 @@ class AsyncObjectsResource(AsyncAPIResource):
|
|
|
317
533
|
cast_to=ObjectRetrieveResponse,
|
|
318
534
|
)
|
|
319
535
|
|
|
536
|
+
async def update(
|
|
537
|
+
self,
|
|
538
|
+
object_id: str,
|
|
539
|
+
*,
|
|
540
|
+
id: str,
|
|
541
|
+
filename: str | Omit = omit,
|
|
542
|
+
metadata: object | Omit = omit,
|
|
543
|
+
path: Optional[str] | Omit = omit,
|
|
544
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
545
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
546
|
+
extra_headers: Headers | None = None,
|
|
547
|
+
extra_query: Query | None = None,
|
|
548
|
+
extra_body: Body | None = None,
|
|
549
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
550
|
+
) -> ObjectUpdateResponse:
|
|
551
|
+
"""Update a document's filename, path, or metadata.
|
|
552
|
+
|
|
553
|
+
Use this to rename files or
|
|
554
|
+
organize them into virtual folders. The path is stored in metadata.path and can
|
|
555
|
+
be used to build folder hierarchies in your application.
|
|
556
|
+
|
|
557
|
+
Args:
|
|
558
|
+
filename: New filename for the document (affects display name and downloads)
|
|
559
|
+
|
|
560
|
+
metadata: Additional metadata to merge with existing metadata
|
|
561
|
+
|
|
562
|
+
path: Folder path for hierarchy preservation (e.g., '/Discovery/Depositions'). Set to
|
|
563
|
+
null or empty string to remove.
|
|
564
|
+
|
|
565
|
+
extra_headers: Send extra headers
|
|
566
|
+
|
|
567
|
+
extra_query: Add additional query parameters to the request
|
|
568
|
+
|
|
569
|
+
extra_body: Add additional JSON properties to the request
|
|
570
|
+
|
|
571
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
572
|
+
"""
|
|
573
|
+
if not id:
|
|
574
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
575
|
+
if not object_id:
|
|
576
|
+
raise ValueError(f"Expected a non-empty value for `object_id` but received {object_id!r}")
|
|
577
|
+
return await self._patch(
|
|
578
|
+
f"/vault/{id}/objects/{object_id}",
|
|
579
|
+
body=await async_maybe_transform(
|
|
580
|
+
{
|
|
581
|
+
"filename": filename,
|
|
582
|
+
"metadata": metadata,
|
|
583
|
+
"path": path,
|
|
584
|
+
},
|
|
585
|
+
object_update_params.ObjectUpdateParams,
|
|
586
|
+
),
|
|
587
|
+
options=make_request_options(
|
|
588
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
589
|
+
),
|
|
590
|
+
cast_to=ObjectUpdateResponse,
|
|
591
|
+
)
|
|
592
|
+
|
|
320
593
|
async def list(
|
|
321
594
|
self,
|
|
322
595
|
id: str,
|
|
@@ -351,6 +624,51 @@ class AsyncObjectsResource(AsyncAPIResource):
|
|
|
351
624
|
cast_to=ObjectListResponse,
|
|
352
625
|
)
|
|
353
626
|
|
|
627
|
+
async def delete(
|
|
628
|
+
self,
|
|
629
|
+
object_id: str,
|
|
630
|
+
*,
|
|
631
|
+
id: str,
|
|
632
|
+
force: Literal["true"] | Omit = omit,
|
|
633
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
634
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
635
|
+
extra_headers: Headers | None = None,
|
|
636
|
+
extra_query: Query | None = None,
|
|
637
|
+
extra_body: Body | None = None,
|
|
638
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
639
|
+
) -> ObjectDeleteResponse:
|
|
640
|
+
"""
|
|
641
|
+
Permanently deletes a document from the vault including all associated vectors,
|
|
642
|
+
chunks, graph data, and the original file. This operation cannot be undone.
|
|
643
|
+
|
|
644
|
+
Args:
|
|
645
|
+
force: Force delete a stuck document that is still in 'processing' state. Use this if a
|
|
646
|
+
document got stuck during ingestion (e.g., OCR timeout).
|
|
647
|
+
|
|
648
|
+
extra_headers: Send extra headers
|
|
649
|
+
|
|
650
|
+
extra_query: Add additional query parameters to the request
|
|
651
|
+
|
|
652
|
+
extra_body: Add additional JSON properties to the request
|
|
653
|
+
|
|
654
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
655
|
+
"""
|
|
656
|
+
if not id:
|
|
657
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
658
|
+
if not object_id:
|
|
659
|
+
raise ValueError(f"Expected a non-empty value for `object_id` but received {object_id!r}")
|
|
660
|
+
return await self._delete(
|
|
661
|
+
f"/vault/{id}/objects/{object_id}",
|
|
662
|
+
options=make_request_options(
|
|
663
|
+
extra_headers=extra_headers,
|
|
664
|
+
extra_query=extra_query,
|
|
665
|
+
extra_body=extra_body,
|
|
666
|
+
timeout=timeout,
|
|
667
|
+
query=await async_maybe_transform({"force": force}, object_delete_params.ObjectDeleteParams),
|
|
668
|
+
),
|
|
669
|
+
cast_to=ObjectDeleteResponse,
|
|
670
|
+
)
|
|
671
|
+
|
|
354
672
|
async def create_presigned_url(
|
|
355
673
|
self,
|
|
356
674
|
object_id: str,
|
|
@@ -380,8 +698,8 @@ class AsyncObjectsResource(AsyncAPIResource):
|
|
|
380
698
|
|
|
381
699
|
operation: The S3 operation to generate URL for
|
|
382
700
|
|
|
383
|
-
size_bytes: File size in bytes (optional, max
|
|
384
|
-
enforces exact file size at S3 level.
|
|
701
|
+
size_bytes: File size in bytes (optional, max 5GB for single PUT uploads). When provided for
|
|
702
|
+
PUT operations, enforces exact file size at S3 level.
|
|
385
703
|
|
|
386
704
|
extra_headers: Send extra headers
|
|
387
705
|
|
|
@@ -452,6 +770,110 @@ class AsyncObjectsResource(AsyncAPIResource):
|
|
|
452
770
|
cast_to=str,
|
|
453
771
|
)
|
|
454
772
|
|
|
773
|
+
async def get_ocr_words(
|
|
774
|
+
self,
|
|
775
|
+
object_id: str,
|
|
776
|
+
*,
|
|
777
|
+
id: str,
|
|
778
|
+
page: int | Omit = omit,
|
|
779
|
+
word_end: int | Omit = omit,
|
|
780
|
+
word_start: int | Omit = omit,
|
|
781
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
782
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
783
|
+
extra_headers: Headers | None = None,
|
|
784
|
+
extra_query: Query | None = None,
|
|
785
|
+
extra_body: Body | None = None,
|
|
786
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
787
|
+
) -> ObjectGetOcrWordsResponse:
|
|
788
|
+
"""Retrieves word-level OCR bounding box data for a processed PDF document.
|
|
789
|
+
|
|
790
|
+
Each
|
|
791
|
+
word includes its text, normalized bounding box coordinates (0-1 range),
|
|
792
|
+
confidence score, and global word index. Use this data to highlight specific
|
|
793
|
+
text ranges in a PDF viewer based on word indices from search results.
|
|
794
|
+
|
|
795
|
+
Args:
|
|
796
|
+
page: Filter to a specific page number (1-indexed). If omitted, returns all pages.
|
|
797
|
+
|
|
798
|
+
word_end: Filter to words ending at this index (inclusive). Useful for retrieving words
|
|
799
|
+
for a specific chunk.
|
|
800
|
+
|
|
801
|
+
word_start: Filter to words starting at this index (inclusive). Useful for retrieving words
|
|
802
|
+
for a specific chunk.
|
|
803
|
+
|
|
804
|
+
extra_headers: Send extra headers
|
|
805
|
+
|
|
806
|
+
extra_query: Add additional query parameters to the request
|
|
807
|
+
|
|
808
|
+
extra_body: Add additional JSON properties to the request
|
|
809
|
+
|
|
810
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
811
|
+
"""
|
|
812
|
+
if not id:
|
|
813
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
814
|
+
if not object_id:
|
|
815
|
+
raise ValueError(f"Expected a non-empty value for `object_id` but received {object_id!r}")
|
|
816
|
+
return await self._get(
|
|
817
|
+
f"/vault/{id}/objects/{object_id}/ocr-words",
|
|
818
|
+
options=make_request_options(
|
|
819
|
+
extra_headers=extra_headers,
|
|
820
|
+
extra_query=extra_query,
|
|
821
|
+
extra_body=extra_body,
|
|
822
|
+
timeout=timeout,
|
|
823
|
+
query=await async_maybe_transform(
|
|
824
|
+
{
|
|
825
|
+
"page": page,
|
|
826
|
+
"word_end": word_end,
|
|
827
|
+
"word_start": word_start,
|
|
828
|
+
},
|
|
829
|
+
object_get_ocr_words_params.ObjectGetOcrWordsParams,
|
|
830
|
+
),
|
|
831
|
+
),
|
|
832
|
+
cast_to=ObjectGetOcrWordsResponse,
|
|
833
|
+
)
|
|
834
|
+
|
|
835
|
+
async def get_summarize_job(
|
|
836
|
+
self,
|
|
837
|
+
job_id: str,
|
|
838
|
+
*,
|
|
839
|
+
id: str,
|
|
840
|
+
object_id: str,
|
|
841
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
842
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
843
|
+
extra_headers: Headers | None = None,
|
|
844
|
+
extra_query: Query | None = None,
|
|
845
|
+
extra_body: Body | None = None,
|
|
846
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
847
|
+
) -> ObjectGetSummarizeJobResponse:
|
|
848
|
+
"""Get the status of a CaseMark summary workflow job.
|
|
849
|
+
|
|
850
|
+
If the job has been
|
|
851
|
+
processing for too long, this endpoint will poll CaseMark directly to recover
|
|
852
|
+
stuck jobs.
|
|
853
|
+
|
|
854
|
+
Args:
|
|
855
|
+
extra_headers: Send extra headers
|
|
856
|
+
|
|
857
|
+
extra_query: Add additional query parameters to the request
|
|
858
|
+
|
|
859
|
+
extra_body: Add additional JSON properties to the request
|
|
860
|
+
|
|
861
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
862
|
+
"""
|
|
863
|
+
if not id:
|
|
864
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
865
|
+
if not object_id:
|
|
866
|
+
raise ValueError(f"Expected a non-empty value for `object_id` but received {object_id!r}")
|
|
867
|
+
if not job_id:
|
|
868
|
+
raise ValueError(f"Expected a non-empty value for `job_id` but received {job_id!r}")
|
|
869
|
+
return await self._get(
|
|
870
|
+
f"/vault/{id}/objects/{object_id}/summarize/{job_id}",
|
|
871
|
+
options=make_request_options(
|
|
872
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
873
|
+
),
|
|
874
|
+
cast_to=ObjectGetSummarizeJobResponse,
|
|
875
|
+
)
|
|
876
|
+
|
|
455
877
|
async def get_text(
|
|
456
878
|
self,
|
|
457
879
|
object_id: str,
|
|
@@ -499,15 +921,27 @@ class ObjectsResourceWithRawResponse:
|
|
|
499
921
|
self.retrieve = to_raw_response_wrapper(
|
|
500
922
|
objects.retrieve,
|
|
501
923
|
)
|
|
924
|
+
self.update = to_raw_response_wrapper(
|
|
925
|
+
objects.update,
|
|
926
|
+
)
|
|
502
927
|
self.list = to_raw_response_wrapper(
|
|
503
928
|
objects.list,
|
|
504
929
|
)
|
|
930
|
+
self.delete = to_raw_response_wrapper(
|
|
931
|
+
objects.delete,
|
|
932
|
+
)
|
|
505
933
|
self.create_presigned_url = to_raw_response_wrapper(
|
|
506
934
|
objects.create_presigned_url,
|
|
507
935
|
)
|
|
508
936
|
self.download = to_raw_response_wrapper(
|
|
509
937
|
objects.download,
|
|
510
938
|
)
|
|
939
|
+
self.get_ocr_words = to_raw_response_wrapper(
|
|
940
|
+
objects.get_ocr_words,
|
|
941
|
+
)
|
|
942
|
+
self.get_summarize_job = to_raw_response_wrapper(
|
|
943
|
+
objects.get_summarize_job,
|
|
944
|
+
)
|
|
511
945
|
self.get_text = to_raw_response_wrapper(
|
|
512
946
|
objects.get_text,
|
|
513
947
|
)
|
|
@@ -520,15 +954,27 @@ class AsyncObjectsResourceWithRawResponse:
|
|
|
520
954
|
self.retrieve = async_to_raw_response_wrapper(
|
|
521
955
|
objects.retrieve,
|
|
522
956
|
)
|
|
957
|
+
self.update = async_to_raw_response_wrapper(
|
|
958
|
+
objects.update,
|
|
959
|
+
)
|
|
523
960
|
self.list = async_to_raw_response_wrapper(
|
|
524
961
|
objects.list,
|
|
525
962
|
)
|
|
963
|
+
self.delete = async_to_raw_response_wrapper(
|
|
964
|
+
objects.delete,
|
|
965
|
+
)
|
|
526
966
|
self.create_presigned_url = async_to_raw_response_wrapper(
|
|
527
967
|
objects.create_presigned_url,
|
|
528
968
|
)
|
|
529
969
|
self.download = async_to_raw_response_wrapper(
|
|
530
970
|
objects.download,
|
|
531
971
|
)
|
|
972
|
+
self.get_ocr_words = async_to_raw_response_wrapper(
|
|
973
|
+
objects.get_ocr_words,
|
|
974
|
+
)
|
|
975
|
+
self.get_summarize_job = async_to_raw_response_wrapper(
|
|
976
|
+
objects.get_summarize_job,
|
|
977
|
+
)
|
|
532
978
|
self.get_text = async_to_raw_response_wrapper(
|
|
533
979
|
objects.get_text,
|
|
534
980
|
)
|
|
@@ -541,15 +987,27 @@ class ObjectsResourceWithStreamingResponse:
|
|
|
541
987
|
self.retrieve = to_streamed_response_wrapper(
|
|
542
988
|
objects.retrieve,
|
|
543
989
|
)
|
|
990
|
+
self.update = to_streamed_response_wrapper(
|
|
991
|
+
objects.update,
|
|
992
|
+
)
|
|
544
993
|
self.list = to_streamed_response_wrapper(
|
|
545
994
|
objects.list,
|
|
546
995
|
)
|
|
996
|
+
self.delete = to_streamed_response_wrapper(
|
|
997
|
+
objects.delete,
|
|
998
|
+
)
|
|
547
999
|
self.create_presigned_url = to_streamed_response_wrapper(
|
|
548
1000
|
objects.create_presigned_url,
|
|
549
1001
|
)
|
|
550
1002
|
self.download = to_streamed_response_wrapper(
|
|
551
1003
|
objects.download,
|
|
552
1004
|
)
|
|
1005
|
+
self.get_ocr_words = to_streamed_response_wrapper(
|
|
1006
|
+
objects.get_ocr_words,
|
|
1007
|
+
)
|
|
1008
|
+
self.get_summarize_job = to_streamed_response_wrapper(
|
|
1009
|
+
objects.get_summarize_job,
|
|
1010
|
+
)
|
|
553
1011
|
self.get_text = to_streamed_response_wrapper(
|
|
554
1012
|
objects.get_text,
|
|
555
1013
|
)
|
|
@@ -562,15 +1020,27 @@ class AsyncObjectsResourceWithStreamingResponse:
|
|
|
562
1020
|
self.retrieve = async_to_streamed_response_wrapper(
|
|
563
1021
|
objects.retrieve,
|
|
564
1022
|
)
|
|
1023
|
+
self.update = async_to_streamed_response_wrapper(
|
|
1024
|
+
objects.update,
|
|
1025
|
+
)
|
|
565
1026
|
self.list = async_to_streamed_response_wrapper(
|
|
566
1027
|
objects.list,
|
|
567
1028
|
)
|
|
1029
|
+
self.delete = async_to_streamed_response_wrapper(
|
|
1030
|
+
objects.delete,
|
|
1031
|
+
)
|
|
568
1032
|
self.create_presigned_url = async_to_streamed_response_wrapper(
|
|
569
1033
|
objects.create_presigned_url,
|
|
570
1034
|
)
|
|
571
1035
|
self.download = async_to_streamed_response_wrapper(
|
|
572
1036
|
objects.download,
|
|
573
1037
|
)
|
|
1038
|
+
self.get_ocr_words = async_to_streamed_response_wrapper(
|
|
1039
|
+
objects.get_ocr_words,
|
|
1040
|
+
)
|
|
1041
|
+
self.get_summarize_job = async_to_streamed_response_wrapper(
|
|
1042
|
+
objects.get_summarize_job,
|
|
1043
|
+
)
|
|
574
1044
|
self.get_text = async_to_streamed_response_wrapper(
|
|
575
1045
|
objects.get_text,
|
|
576
1046
|
)
|