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
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from .v1 import (
|
|
4
|
+
V1Resource,
|
|
5
|
+
AsyncV1Resource,
|
|
6
|
+
V1ResourceWithRawResponse,
|
|
7
|
+
AsyncV1ResourceWithRawResponse,
|
|
8
|
+
V1ResourceWithStreamingResponse,
|
|
9
|
+
AsyncV1ResourceWithStreamingResponse,
|
|
10
|
+
)
|
|
11
|
+
from .privilege import (
|
|
12
|
+
PrivilegeResource,
|
|
13
|
+
AsyncPrivilegeResource,
|
|
14
|
+
PrivilegeResourceWithRawResponse,
|
|
15
|
+
AsyncPrivilegeResourceWithRawResponse,
|
|
16
|
+
PrivilegeResourceWithStreamingResponse,
|
|
17
|
+
AsyncPrivilegeResourceWithStreamingResponse,
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
__all__ = [
|
|
21
|
+
"V1Resource",
|
|
22
|
+
"AsyncV1Resource",
|
|
23
|
+
"V1ResourceWithRawResponse",
|
|
24
|
+
"AsyncV1ResourceWithRawResponse",
|
|
25
|
+
"V1ResourceWithStreamingResponse",
|
|
26
|
+
"AsyncV1ResourceWithStreamingResponse",
|
|
27
|
+
"PrivilegeResource",
|
|
28
|
+
"AsyncPrivilegeResource",
|
|
29
|
+
"PrivilegeResourceWithRawResponse",
|
|
30
|
+
"AsyncPrivilegeResourceWithRawResponse",
|
|
31
|
+
"PrivilegeResourceWithStreamingResponse",
|
|
32
|
+
"AsyncPrivilegeResourceWithStreamingResponse",
|
|
33
|
+
]
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .v1 import (
|
|
6
|
+
V1Resource,
|
|
7
|
+
AsyncV1Resource,
|
|
8
|
+
V1ResourceWithRawResponse,
|
|
9
|
+
AsyncV1ResourceWithRawResponse,
|
|
10
|
+
V1ResourceWithStreamingResponse,
|
|
11
|
+
AsyncV1ResourceWithStreamingResponse,
|
|
12
|
+
)
|
|
13
|
+
from ..._compat import cached_property
|
|
14
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
15
|
+
|
|
16
|
+
__all__ = ["PrivilegeResource", "AsyncPrivilegeResource"]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class PrivilegeResource(SyncAPIResource):
|
|
20
|
+
@cached_property
|
|
21
|
+
def v1(self) -> V1Resource:
|
|
22
|
+
return V1Resource(self._client)
|
|
23
|
+
|
|
24
|
+
@cached_property
|
|
25
|
+
def with_raw_response(self) -> PrivilegeResourceWithRawResponse:
|
|
26
|
+
"""
|
|
27
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
28
|
+
the raw response object instead of the parsed content.
|
|
29
|
+
|
|
30
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
|
|
31
|
+
"""
|
|
32
|
+
return PrivilegeResourceWithRawResponse(self)
|
|
33
|
+
|
|
34
|
+
@cached_property
|
|
35
|
+
def with_streaming_response(self) -> PrivilegeResourceWithStreamingResponse:
|
|
36
|
+
"""
|
|
37
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
38
|
+
|
|
39
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
|
|
40
|
+
"""
|
|
41
|
+
return PrivilegeResourceWithStreamingResponse(self)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class AsyncPrivilegeResource(AsyncAPIResource):
|
|
45
|
+
@cached_property
|
|
46
|
+
def v1(self) -> AsyncV1Resource:
|
|
47
|
+
return AsyncV1Resource(self._client)
|
|
48
|
+
|
|
49
|
+
@cached_property
|
|
50
|
+
def with_raw_response(self) -> AsyncPrivilegeResourceWithRawResponse:
|
|
51
|
+
"""
|
|
52
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
53
|
+
the raw response object instead of the parsed content.
|
|
54
|
+
|
|
55
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
|
|
56
|
+
"""
|
|
57
|
+
return AsyncPrivilegeResourceWithRawResponse(self)
|
|
58
|
+
|
|
59
|
+
@cached_property
|
|
60
|
+
def with_streaming_response(self) -> AsyncPrivilegeResourceWithStreamingResponse:
|
|
61
|
+
"""
|
|
62
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
63
|
+
|
|
64
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
|
|
65
|
+
"""
|
|
66
|
+
return AsyncPrivilegeResourceWithStreamingResponse(self)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class PrivilegeResourceWithRawResponse:
|
|
70
|
+
def __init__(self, privilege: PrivilegeResource) -> None:
|
|
71
|
+
self._privilege = privilege
|
|
72
|
+
|
|
73
|
+
@cached_property
|
|
74
|
+
def v1(self) -> V1ResourceWithRawResponse:
|
|
75
|
+
return V1ResourceWithRawResponse(self._privilege.v1)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class AsyncPrivilegeResourceWithRawResponse:
|
|
79
|
+
def __init__(self, privilege: AsyncPrivilegeResource) -> None:
|
|
80
|
+
self._privilege = privilege
|
|
81
|
+
|
|
82
|
+
@cached_property
|
|
83
|
+
def v1(self) -> AsyncV1ResourceWithRawResponse:
|
|
84
|
+
return AsyncV1ResourceWithRawResponse(self._privilege.v1)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
class PrivilegeResourceWithStreamingResponse:
|
|
88
|
+
def __init__(self, privilege: PrivilegeResource) -> None:
|
|
89
|
+
self._privilege = privilege
|
|
90
|
+
|
|
91
|
+
@cached_property
|
|
92
|
+
def v1(self) -> V1ResourceWithStreamingResponse:
|
|
93
|
+
return V1ResourceWithStreamingResponse(self._privilege.v1)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
class AsyncPrivilegeResourceWithStreamingResponse:
|
|
97
|
+
def __init__(self, privilege: AsyncPrivilegeResource) -> None:
|
|
98
|
+
self._privilege = privilege
|
|
99
|
+
|
|
100
|
+
@cached_property
|
|
101
|
+
def v1(self) -> AsyncV1ResourceWithStreamingResponse:
|
|
102
|
+
return AsyncV1ResourceWithStreamingResponse(self._privilege.v1)
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import List
|
|
6
|
+
from typing_extensions import Literal
|
|
7
|
+
|
|
8
|
+
import httpx
|
|
9
|
+
|
|
10
|
+
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
11
|
+
from ..._utils import maybe_transform, async_maybe_transform
|
|
12
|
+
from ..._compat import cached_property
|
|
13
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
14
|
+
from ..._response import (
|
|
15
|
+
to_raw_response_wrapper,
|
|
16
|
+
to_streamed_response_wrapper,
|
|
17
|
+
async_to_raw_response_wrapper,
|
|
18
|
+
async_to_streamed_response_wrapper,
|
|
19
|
+
)
|
|
20
|
+
from ..._base_client import make_request_options
|
|
21
|
+
from ...types.privilege import v1_detect_params
|
|
22
|
+
from ...types.privilege.v1_detect_response import V1DetectResponse
|
|
23
|
+
|
|
24
|
+
__all__ = ["V1Resource", "AsyncV1Resource"]
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class V1Resource(SyncAPIResource):
|
|
28
|
+
@cached_property
|
|
29
|
+
def with_raw_response(self) -> V1ResourceWithRawResponse:
|
|
30
|
+
"""
|
|
31
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
32
|
+
the raw response object instead of the parsed content.
|
|
33
|
+
|
|
34
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
|
|
35
|
+
"""
|
|
36
|
+
return V1ResourceWithRawResponse(self)
|
|
37
|
+
|
|
38
|
+
@cached_property
|
|
39
|
+
def with_streaming_response(self) -> V1ResourceWithStreamingResponse:
|
|
40
|
+
"""
|
|
41
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
42
|
+
|
|
43
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
|
|
44
|
+
"""
|
|
45
|
+
return V1ResourceWithStreamingResponse(self)
|
|
46
|
+
|
|
47
|
+
def detect(
|
|
48
|
+
self,
|
|
49
|
+
*,
|
|
50
|
+
categories: List[Literal["attorney_client", "work_product", "common_interest", "litigation_hold"]]
|
|
51
|
+
| Omit = omit,
|
|
52
|
+
content: str | Omit = omit,
|
|
53
|
+
document_id: str | Omit = omit,
|
|
54
|
+
include_rationale: bool | Omit = omit,
|
|
55
|
+
jurisdiction: Literal["US-Federal"] | Omit = omit,
|
|
56
|
+
model: str | Omit = omit,
|
|
57
|
+
vault_id: str | Omit = omit,
|
|
58
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
59
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
60
|
+
extra_headers: Headers | None = None,
|
|
61
|
+
extra_query: Query | None = None,
|
|
62
|
+
extra_body: Body | None = None,
|
|
63
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
64
|
+
) -> V1DetectResponse:
|
|
65
|
+
"""Analyzes text or vault documents for legal privilege.
|
|
66
|
+
|
|
67
|
+
Detects attorney-client
|
|
68
|
+
privilege, work product doctrine, common interest privilege, and litigation hold
|
|
69
|
+
materials.
|
|
70
|
+
|
|
71
|
+
Returns structured privilege flags with confidence scores and policy-friendly
|
|
72
|
+
rationale suitable for discovery workflows and privilege logs.
|
|
73
|
+
|
|
74
|
+
**Size Limit:** Maximum 200,000 characters (larger documents rejected).
|
|
75
|
+
|
|
76
|
+
**Permissions:** Requires `chat` permission. When using `document_id`, also
|
|
77
|
+
requires `vault` permission.
|
|
78
|
+
|
|
79
|
+
**Note:** When analyzing vault documents, results are automatically stored in
|
|
80
|
+
the document's `privilege_analysis` metadata field.
|
|
81
|
+
|
|
82
|
+
Args:
|
|
83
|
+
categories: Privilege categories to check. Defaults to all: attorney_client, work_product,
|
|
84
|
+
common_interest, litigation_hold
|
|
85
|
+
|
|
86
|
+
content: Text content to analyze (required if document_id not provided)
|
|
87
|
+
|
|
88
|
+
document_id: Vault object ID to analyze (required if content not provided)
|
|
89
|
+
|
|
90
|
+
include_rationale: Include detailed rationale for each category
|
|
91
|
+
|
|
92
|
+
jurisdiction: Jurisdiction for privilege rules
|
|
93
|
+
|
|
94
|
+
model: LLM model to use for analysis
|
|
95
|
+
|
|
96
|
+
vault_id: Vault ID (required when using document_id)
|
|
97
|
+
|
|
98
|
+
extra_headers: Send extra headers
|
|
99
|
+
|
|
100
|
+
extra_query: Add additional query parameters to the request
|
|
101
|
+
|
|
102
|
+
extra_body: Add additional JSON properties to the request
|
|
103
|
+
|
|
104
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
105
|
+
"""
|
|
106
|
+
return self._post(
|
|
107
|
+
"/privilege/v1/detect",
|
|
108
|
+
body=maybe_transform(
|
|
109
|
+
{
|
|
110
|
+
"categories": categories,
|
|
111
|
+
"content": content,
|
|
112
|
+
"document_id": document_id,
|
|
113
|
+
"include_rationale": include_rationale,
|
|
114
|
+
"jurisdiction": jurisdiction,
|
|
115
|
+
"model": model,
|
|
116
|
+
"vault_id": vault_id,
|
|
117
|
+
},
|
|
118
|
+
v1_detect_params.V1DetectParams,
|
|
119
|
+
),
|
|
120
|
+
options=make_request_options(
|
|
121
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
122
|
+
),
|
|
123
|
+
cast_to=V1DetectResponse,
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
class AsyncV1Resource(AsyncAPIResource):
|
|
128
|
+
@cached_property
|
|
129
|
+
def with_raw_response(self) -> AsyncV1ResourceWithRawResponse:
|
|
130
|
+
"""
|
|
131
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
132
|
+
the raw response object instead of the parsed content.
|
|
133
|
+
|
|
134
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
|
|
135
|
+
"""
|
|
136
|
+
return AsyncV1ResourceWithRawResponse(self)
|
|
137
|
+
|
|
138
|
+
@cached_property
|
|
139
|
+
def with_streaming_response(self) -> AsyncV1ResourceWithStreamingResponse:
|
|
140
|
+
"""
|
|
141
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
142
|
+
|
|
143
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
|
|
144
|
+
"""
|
|
145
|
+
return AsyncV1ResourceWithStreamingResponse(self)
|
|
146
|
+
|
|
147
|
+
async def detect(
|
|
148
|
+
self,
|
|
149
|
+
*,
|
|
150
|
+
categories: List[Literal["attorney_client", "work_product", "common_interest", "litigation_hold"]]
|
|
151
|
+
| Omit = omit,
|
|
152
|
+
content: str | Omit = omit,
|
|
153
|
+
document_id: str | Omit = omit,
|
|
154
|
+
include_rationale: bool | Omit = omit,
|
|
155
|
+
jurisdiction: Literal["US-Federal"] | Omit = omit,
|
|
156
|
+
model: str | Omit = omit,
|
|
157
|
+
vault_id: str | Omit = omit,
|
|
158
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
159
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
160
|
+
extra_headers: Headers | None = None,
|
|
161
|
+
extra_query: Query | None = None,
|
|
162
|
+
extra_body: Body | None = None,
|
|
163
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
164
|
+
) -> V1DetectResponse:
|
|
165
|
+
"""Analyzes text or vault documents for legal privilege.
|
|
166
|
+
|
|
167
|
+
Detects attorney-client
|
|
168
|
+
privilege, work product doctrine, common interest privilege, and litigation hold
|
|
169
|
+
materials.
|
|
170
|
+
|
|
171
|
+
Returns structured privilege flags with confidence scores and policy-friendly
|
|
172
|
+
rationale suitable for discovery workflows and privilege logs.
|
|
173
|
+
|
|
174
|
+
**Size Limit:** Maximum 200,000 characters (larger documents rejected).
|
|
175
|
+
|
|
176
|
+
**Permissions:** Requires `chat` permission. When using `document_id`, also
|
|
177
|
+
requires `vault` permission.
|
|
178
|
+
|
|
179
|
+
**Note:** When analyzing vault documents, results are automatically stored in
|
|
180
|
+
the document's `privilege_analysis` metadata field.
|
|
181
|
+
|
|
182
|
+
Args:
|
|
183
|
+
categories: Privilege categories to check. Defaults to all: attorney_client, work_product,
|
|
184
|
+
common_interest, litigation_hold
|
|
185
|
+
|
|
186
|
+
content: Text content to analyze (required if document_id not provided)
|
|
187
|
+
|
|
188
|
+
document_id: Vault object ID to analyze (required if content not provided)
|
|
189
|
+
|
|
190
|
+
include_rationale: Include detailed rationale for each category
|
|
191
|
+
|
|
192
|
+
jurisdiction: Jurisdiction for privilege rules
|
|
193
|
+
|
|
194
|
+
model: LLM model to use for analysis
|
|
195
|
+
|
|
196
|
+
vault_id: Vault ID (required when using document_id)
|
|
197
|
+
|
|
198
|
+
extra_headers: Send extra headers
|
|
199
|
+
|
|
200
|
+
extra_query: Add additional query parameters to the request
|
|
201
|
+
|
|
202
|
+
extra_body: Add additional JSON properties to the request
|
|
203
|
+
|
|
204
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
205
|
+
"""
|
|
206
|
+
return await self._post(
|
|
207
|
+
"/privilege/v1/detect",
|
|
208
|
+
body=await async_maybe_transform(
|
|
209
|
+
{
|
|
210
|
+
"categories": categories,
|
|
211
|
+
"content": content,
|
|
212
|
+
"document_id": document_id,
|
|
213
|
+
"include_rationale": include_rationale,
|
|
214
|
+
"jurisdiction": jurisdiction,
|
|
215
|
+
"model": model,
|
|
216
|
+
"vault_id": vault_id,
|
|
217
|
+
},
|
|
218
|
+
v1_detect_params.V1DetectParams,
|
|
219
|
+
),
|
|
220
|
+
options=make_request_options(
|
|
221
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
222
|
+
),
|
|
223
|
+
cast_to=V1DetectResponse,
|
|
224
|
+
)
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
class V1ResourceWithRawResponse:
|
|
228
|
+
def __init__(self, v1: V1Resource) -> None:
|
|
229
|
+
self._v1 = v1
|
|
230
|
+
|
|
231
|
+
self.detect = to_raw_response_wrapper(
|
|
232
|
+
v1.detect,
|
|
233
|
+
)
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
class AsyncV1ResourceWithRawResponse:
|
|
237
|
+
def __init__(self, v1: AsyncV1Resource) -> None:
|
|
238
|
+
self._v1 = v1
|
|
239
|
+
|
|
240
|
+
self.detect = async_to_raw_response_wrapper(
|
|
241
|
+
v1.detect,
|
|
242
|
+
)
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
class V1ResourceWithStreamingResponse:
|
|
246
|
+
def __init__(self, v1: V1Resource) -> None:
|
|
247
|
+
self._v1 = v1
|
|
248
|
+
|
|
249
|
+
self.detect = to_streamed_response_wrapper(
|
|
250
|
+
v1.detect,
|
|
251
|
+
)
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
class AsyncV1ResourceWithStreamingResponse:
|
|
255
|
+
def __init__(self, v1: AsyncV1Resource) -> None:
|
|
256
|
+
self._v1 = v1
|
|
257
|
+
|
|
258
|
+
self.detect = async_to_streamed_response_wrapper(
|
|
259
|
+
v1.detect,
|
|
260
|
+
)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from .v1 import (
|
|
4
|
+
V1Resource,
|
|
5
|
+
AsyncV1Resource,
|
|
6
|
+
V1ResourceWithRawResponse,
|
|
7
|
+
AsyncV1ResourceWithRawResponse,
|
|
8
|
+
V1ResourceWithStreamingResponse,
|
|
9
|
+
AsyncV1ResourceWithStreamingResponse,
|
|
10
|
+
)
|
|
11
|
+
from .superdoc import (
|
|
12
|
+
SuperdocResource,
|
|
13
|
+
AsyncSuperdocResource,
|
|
14
|
+
SuperdocResourceWithRawResponse,
|
|
15
|
+
AsyncSuperdocResourceWithRawResponse,
|
|
16
|
+
SuperdocResourceWithStreamingResponse,
|
|
17
|
+
AsyncSuperdocResourceWithStreamingResponse,
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
__all__ = [
|
|
21
|
+
"V1Resource",
|
|
22
|
+
"AsyncV1Resource",
|
|
23
|
+
"V1ResourceWithRawResponse",
|
|
24
|
+
"AsyncV1ResourceWithRawResponse",
|
|
25
|
+
"V1ResourceWithStreamingResponse",
|
|
26
|
+
"AsyncV1ResourceWithStreamingResponse",
|
|
27
|
+
"SuperdocResource",
|
|
28
|
+
"AsyncSuperdocResource",
|
|
29
|
+
"SuperdocResourceWithRawResponse",
|
|
30
|
+
"AsyncSuperdocResourceWithRawResponse",
|
|
31
|
+
"SuperdocResourceWithStreamingResponse",
|
|
32
|
+
"AsyncSuperdocResourceWithStreamingResponse",
|
|
33
|
+
]
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .v1 import (
|
|
6
|
+
V1Resource,
|
|
7
|
+
AsyncV1Resource,
|
|
8
|
+
V1ResourceWithRawResponse,
|
|
9
|
+
AsyncV1ResourceWithRawResponse,
|
|
10
|
+
V1ResourceWithStreamingResponse,
|
|
11
|
+
AsyncV1ResourceWithStreamingResponse,
|
|
12
|
+
)
|
|
13
|
+
from ..._compat import cached_property
|
|
14
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
15
|
+
|
|
16
|
+
__all__ = ["SuperdocResource", "AsyncSuperdocResource"]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class SuperdocResource(SyncAPIResource):
|
|
20
|
+
@cached_property
|
|
21
|
+
def v1(self) -> V1Resource:
|
|
22
|
+
return V1Resource(self._client)
|
|
23
|
+
|
|
24
|
+
@cached_property
|
|
25
|
+
def with_raw_response(self) -> SuperdocResourceWithRawResponse:
|
|
26
|
+
"""
|
|
27
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
28
|
+
the raw response object instead of the parsed content.
|
|
29
|
+
|
|
30
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
|
|
31
|
+
"""
|
|
32
|
+
return SuperdocResourceWithRawResponse(self)
|
|
33
|
+
|
|
34
|
+
@cached_property
|
|
35
|
+
def with_streaming_response(self) -> SuperdocResourceWithStreamingResponse:
|
|
36
|
+
"""
|
|
37
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
38
|
+
|
|
39
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
|
|
40
|
+
"""
|
|
41
|
+
return SuperdocResourceWithStreamingResponse(self)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class AsyncSuperdocResource(AsyncAPIResource):
|
|
45
|
+
@cached_property
|
|
46
|
+
def v1(self) -> AsyncV1Resource:
|
|
47
|
+
return AsyncV1Resource(self._client)
|
|
48
|
+
|
|
49
|
+
@cached_property
|
|
50
|
+
def with_raw_response(self) -> AsyncSuperdocResourceWithRawResponse:
|
|
51
|
+
"""
|
|
52
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
53
|
+
the raw response object instead of the parsed content.
|
|
54
|
+
|
|
55
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
|
|
56
|
+
"""
|
|
57
|
+
return AsyncSuperdocResourceWithRawResponse(self)
|
|
58
|
+
|
|
59
|
+
@cached_property
|
|
60
|
+
def with_streaming_response(self) -> AsyncSuperdocResourceWithStreamingResponse:
|
|
61
|
+
"""
|
|
62
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
63
|
+
|
|
64
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
|
|
65
|
+
"""
|
|
66
|
+
return AsyncSuperdocResourceWithStreamingResponse(self)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class SuperdocResourceWithRawResponse:
|
|
70
|
+
def __init__(self, superdoc: SuperdocResource) -> None:
|
|
71
|
+
self._superdoc = superdoc
|
|
72
|
+
|
|
73
|
+
@cached_property
|
|
74
|
+
def v1(self) -> V1ResourceWithRawResponse:
|
|
75
|
+
return V1ResourceWithRawResponse(self._superdoc.v1)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class AsyncSuperdocResourceWithRawResponse:
|
|
79
|
+
def __init__(self, superdoc: AsyncSuperdocResource) -> None:
|
|
80
|
+
self._superdoc = superdoc
|
|
81
|
+
|
|
82
|
+
@cached_property
|
|
83
|
+
def v1(self) -> AsyncV1ResourceWithRawResponse:
|
|
84
|
+
return AsyncV1ResourceWithRawResponse(self._superdoc.v1)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
class SuperdocResourceWithStreamingResponse:
|
|
88
|
+
def __init__(self, superdoc: SuperdocResource) -> None:
|
|
89
|
+
self._superdoc = superdoc
|
|
90
|
+
|
|
91
|
+
@cached_property
|
|
92
|
+
def v1(self) -> V1ResourceWithStreamingResponse:
|
|
93
|
+
return V1ResourceWithStreamingResponse(self._superdoc.v1)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
class AsyncSuperdocResourceWithStreamingResponse:
|
|
97
|
+
def __init__(self, superdoc: AsyncSuperdocResource) -> None:
|
|
98
|
+
self._superdoc = superdoc
|
|
99
|
+
|
|
100
|
+
@cached_property
|
|
101
|
+
def v1(self) -> AsyncV1ResourceWithStreamingResponse:
|
|
102
|
+
return AsyncV1ResourceWithStreamingResponse(self._superdoc.v1)
|