casedev 0.2.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.
Files changed (157) hide show
  1. casedev/_base_client.py +5 -2
  2. casedev/_client.py +275 -1
  3. casedev/_compat.py +3 -3
  4. casedev/_utils/_json.py +35 -0
  5. casedev/_version.py +1 -1
  6. casedev/resources/__init__.py +98 -0
  7. casedev/resources/applications/__init__.py +33 -0
  8. casedev/resources/applications/applications.py +102 -0
  9. casedev/resources/applications/v1/__init__.py +61 -0
  10. casedev/resources/applications/v1/deployments.py +867 -0
  11. casedev/resources/applications/v1/projects.py +1377 -0
  12. casedev/resources/applications/v1/v1.py +166 -0
  13. casedev/resources/applications/v1/workflows.py +182 -0
  14. casedev/resources/compute/v1/__init__.py +28 -0
  15. casedev/resources/compute/v1/instance_types.py +145 -0
  16. casedev/resources/compute/v1/instances.py +448 -0
  17. casedev/resources/compute/v1/v1.py +64 -0
  18. casedev/resources/database/__init__.py +33 -0
  19. casedev/resources/database/database.py +102 -0
  20. casedev/resources/database/v1/__init__.py +33 -0
  21. casedev/resources/database/v1/projects.py +771 -0
  22. casedev/resources/database/v1/v1.py +175 -0
  23. casedev/resources/legal/__init__.py +33 -0
  24. casedev/resources/legal/legal.py +102 -0
  25. casedev/resources/legal/v1.py +924 -0
  26. casedev/resources/memory/__init__.py +33 -0
  27. casedev/resources/memory/memory.py +102 -0
  28. casedev/resources/memory/v1.py +1100 -0
  29. casedev/resources/ocr/v1.py +2 -2
  30. casedev/resources/privilege/__init__.py +33 -0
  31. casedev/resources/privilege/privilege.py +102 -0
  32. casedev/resources/privilege/v1.py +260 -0
  33. casedev/resources/superdoc/__init__.py +33 -0
  34. casedev/resources/superdoc/superdoc.py +102 -0
  35. casedev/resources/superdoc/v1.py +349 -0
  36. casedev/resources/translate/__init__.py +33 -0
  37. casedev/resources/translate/translate.py +102 -0
  38. casedev/resources/translate/v1.py +418 -0
  39. casedev/resources/vault/__init__.py +14 -0
  40. casedev/resources/vault/graphrag.py +91 -0
  41. casedev/resources/vault/multipart.py +549 -0
  42. casedev/resources/vault/objects.py +481 -1
  43. casedev/resources/vault/vault.py +264 -5
  44. casedev/resources/voice/streaming.py +2 -2
  45. casedev/types/__init__.py +4 -0
  46. casedev/types/applications/v1/__init__.py +20 -0
  47. casedev/types/applications/v1/deployment_cancel_params.py +14 -0
  48. casedev/types/applications/v1/deployment_create_params.py +20 -0
  49. casedev/types/applications/v1/deployment_get_logs_params.py +14 -0
  50. casedev/types/applications/v1/deployment_list_params.py +23 -0
  51. casedev/types/applications/v1/deployment_retrieve_params.py +17 -0
  52. casedev/types/applications/v1/deployment_stream_params.py +17 -0
  53. casedev/types/applications/v1/project_create_deployment_params.py +29 -0
  54. casedev/types/applications/v1/project_create_domain_params.py +17 -0
  55. casedev/types/applications/v1/project_create_env_params.py +27 -0
  56. casedev/types/applications/v1/project_create_params.py +53 -0
  57. casedev/types/applications/v1/project_delete_params.py +14 -0
  58. casedev/types/applications/v1/project_get_runtime_logs_params.py +12 -0
  59. casedev/types/applications/v1/project_list_deployments_params.py +18 -0
  60. casedev/types/applications/v1/project_list_env_params.py +12 -0
  61. casedev/types/applications/v1/project_list_response.py +45 -0
  62. casedev/types/applications/v1/workflow_get_status_params.py +14 -0
  63. casedev/types/compute/v1/__init__.py +6 -0
  64. casedev/types/compute/v1/instance_create_params.py +28 -0
  65. casedev/types/compute/v1/instance_create_response.py +35 -0
  66. casedev/types/compute/v1/instance_delete_response.py +23 -0
  67. casedev/types/compute/v1/instance_list_response.py +45 -0
  68. casedev/types/compute/v1/instance_retrieve_response.py +55 -0
  69. casedev/types/compute/v1/instance_type_list_response.py +46 -0
  70. casedev/types/database/__init__.py +5 -0
  71. casedev/types/database/v1/__init__.py +14 -0
  72. casedev/types/database/v1/project_create_branch_params.py +17 -0
  73. casedev/types/database/v1/project_create_branch_response.py +30 -0
  74. casedev/types/database/v1/project_create_params.py +27 -0
  75. casedev/types/database/v1/project_create_response.py +47 -0
  76. casedev/types/database/v1/project_delete_response.py +13 -0
  77. casedev/types/database/v1/project_get_connection_params.py +15 -0
  78. casedev/types/database/v1/project_get_connection_response.py +18 -0
  79. casedev/types/database/v1/project_list_branches_response.py +37 -0
  80. casedev/types/database/v1/project_list_response.py +64 -0
  81. casedev/types/database/v1/project_retrieve_response.py +100 -0
  82. casedev/types/database/v1_get_usage_response.py +116 -0
  83. casedev/types/legal/__init__.py +20 -0
  84. casedev/types/legal/v1_find_params.py +23 -0
  85. casedev/types/legal/v1_find_response.py +37 -0
  86. casedev/types/legal/v1_get_citations_from_url_params.py +12 -0
  87. casedev/types/legal/v1_get_citations_from_url_response.py +69 -0
  88. casedev/types/legal/v1_get_citations_params.py +16 -0
  89. casedev/types/legal/v1_get_citations_response.py +60 -0
  90. casedev/types/legal/v1_get_full_text_params.py +23 -0
  91. casedev/types/legal/v1_get_full_text_response.py +35 -0
  92. casedev/types/legal/v1_list_jurisdictions_params.py +12 -0
  93. casedev/types/legal/v1_list_jurisdictions_response.py +35 -0
  94. casedev/types/legal/v1_research_params.py +27 -0
  95. casedev/types/legal/v1_research_response.py +51 -0
  96. casedev/types/legal/v1_similar_params.py +25 -0
  97. casedev/types/legal/v1_similar_response.py +42 -0
  98. casedev/types/legal/v1_verify_params.py +16 -0
  99. casedev/types/legal/v1_verify_response.py +92 -0
  100. casedev/types/memory/__init__.py +14 -0
  101. casedev/types/memory/v1_create_params.py +69 -0
  102. casedev/types/memory/v1_create_response.py +23 -0
  103. casedev/types/memory/v1_delete_all_params.py +45 -0
  104. casedev/types/memory/v1_delete_all_response.py +12 -0
  105. casedev/types/memory/v1_delete_response.py +13 -0
  106. casedev/types/memory/v1_list_params.py +54 -0
  107. casedev/types/memory/v1_list_response.py +29 -0
  108. casedev/types/memory/v1_retrieve_response.py +23 -0
  109. casedev/types/memory/v1_search_params.py +54 -0
  110. casedev/types/memory/v1_search_response.py +61 -0
  111. casedev/types/ocr/v1_process_params.py +21 -13
  112. casedev/types/ocr/v1_retrieve_response.py +7 -7
  113. casedev/types/privilege/__init__.py +6 -0
  114. casedev/types/privilege/v1_detect_params.py +34 -0
  115. casedev/types/privilege/v1_detect_response.py +41 -0
  116. casedev/types/superdoc/__init__.py +6 -0
  117. casedev/types/superdoc/v1_annotate_params.py +56 -0
  118. casedev/types/superdoc/v1_convert_params.py +23 -0
  119. casedev/types/translate/__init__.py +10 -0
  120. casedev/types/translate/v1_detect_params.py +18 -0
  121. casedev/types/translate/v1_detect_response.py +28 -0
  122. casedev/types/translate/v1_list_languages_params.py +18 -0
  123. casedev/types/translate/v1_list_languages_response.py +23 -0
  124. casedev/types/translate/v1_translate_params.py +30 -0
  125. casedev/types/translate/v1_translate_response.py +28 -0
  126. casedev/types/vault/__init__.py +14 -0
  127. casedev/types/vault/graphrag_process_object_response.py +45 -0
  128. casedev/types/vault/multipart_abort_params.py +15 -0
  129. casedev/types/vault/multipart_complete_params.py +26 -0
  130. casedev/types/vault/multipart_get_part_urls_params.py +24 -0
  131. casedev/types/vault/multipart_get_part_urls_response.py +19 -0
  132. casedev/types/vault/multipart_init_params.py +32 -0
  133. casedev/types/vault/multipart_init_response.py +23 -0
  134. casedev/types/vault/object_create_presigned_url_params.py +6 -0
  135. casedev/types/vault/object_delete_params.py +17 -0
  136. casedev/types/vault/object_delete_response.py +29 -0
  137. casedev/types/vault/object_get_ocr_words_params.py +28 -0
  138. casedev/types/vault/object_get_ocr_words_response.py +48 -0
  139. casedev/types/vault/object_get_summarize_job_response.py +40 -0
  140. casedev/types/vault/object_get_text_response.py +10 -10
  141. casedev/types/vault/object_list_response.py +13 -13
  142. casedev/types/vault/object_retrieve_response.py +13 -13
  143. casedev/types/vault/object_update_params.py +24 -0
  144. casedev/types/vault/object_update_response.py +39 -0
  145. casedev/types/vault_delete_params.py +17 -0
  146. casedev/types/vault_delete_response.py +30 -0
  147. casedev/types/vault_retrieve_response.py +13 -13
  148. casedev/types/vault_search_response.py +14 -0
  149. casedev/types/vault_update_params.py +21 -0
  150. casedev/types/vault_update_response.py +60 -0
  151. casedev/types/vault_upload_params.py +5 -2
  152. {casedev-0.2.0.dist-info → casedev-0.4.0.dist-info}/METADATA +1 -1
  153. casedev-0.4.0.dist-info/RECORD +275 -0
  154. casedev-0.2.0.dist-info/RECORD +0 -149
  155. /casedev/types/{webhooks → applications}/__init__.py +0 -0
  156. {casedev-0.2.0.dist-info → casedev-0.4.0.dist-info}/WHEEL +0 -0
  157. {casedev-0.2.0.dist-info → casedev-0.4.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,349 @@
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 Mapping, Iterable, cast
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 extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform
12
+ from ..._compat import cached_property
13
+ from ..._resource import SyncAPIResource, AsyncAPIResource
14
+ from ..._response import (
15
+ BinaryAPIResponse,
16
+ AsyncBinaryAPIResponse,
17
+ StreamedBinaryAPIResponse,
18
+ AsyncStreamedBinaryAPIResponse,
19
+ to_custom_raw_response_wrapper,
20
+ to_custom_streamed_response_wrapper,
21
+ async_to_custom_raw_response_wrapper,
22
+ async_to_custom_streamed_response_wrapper,
23
+ )
24
+ from ..._base_client import make_request_options
25
+ from ...types.superdoc import v1_convert_params, v1_annotate_params
26
+
27
+ __all__ = ["V1Resource", "AsyncV1Resource"]
28
+
29
+
30
+ class V1Resource(SyncAPIResource):
31
+ @cached_property
32
+ def with_raw_response(self) -> V1ResourceWithRawResponse:
33
+ """
34
+ This property can be used as a prefix for any HTTP method call to return
35
+ the raw response object instead of the parsed content.
36
+
37
+ For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
38
+ """
39
+ return V1ResourceWithRawResponse(self)
40
+
41
+ @cached_property
42
+ def with_streaming_response(self) -> V1ResourceWithStreamingResponse:
43
+ """
44
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
45
+
46
+ For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
47
+ """
48
+ return V1ResourceWithStreamingResponse(self)
49
+
50
+ def annotate(
51
+ self,
52
+ *,
53
+ document: v1_annotate_params.Document,
54
+ fields: Iterable[v1_annotate_params.Field],
55
+ output_format: Literal["docx", "pdf"] | Omit = omit,
56
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
57
+ # The extra values given here take precedence over values defined on the client or passed to this method.
58
+ extra_headers: Headers | None = None,
59
+ extra_query: Query | None = None,
60
+ extra_body: Body | None = None,
61
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
62
+ ) -> BinaryAPIResponse:
63
+ """Populate fields inside a DOCX template using SuperDoc annotations.
64
+
65
+ Supports
66
+ text, images, dates, and numbers. Can target individual fields by ID or multiple
67
+ fields by group.
68
+
69
+ Args:
70
+ document: Document source - provide either URL or base64
71
+
72
+ fields: Fields to populate in the template
73
+
74
+ output_format: Output format for the annotated document
75
+
76
+ extra_headers: Send extra headers
77
+
78
+ extra_query: Add additional query parameters to the request
79
+
80
+ extra_body: Add additional JSON properties to the request
81
+
82
+ timeout: Override the client-level default timeout for this request, in seconds
83
+ """
84
+ extra_headers = {"Accept": "application/pdf", **(extra_headers or {})}
85
+ return self._post(
86
+ "/superdoc/v1/annotate",
87
+ body=maybe_transform(
88
+ {
89
+ "document": document,
90
+ "fields": fields,
91
+ "output_format": output_format,
92
+ },
93
+ v1_annotate_params.V1AnnotateParams,
94
+ ),
95
+ options=make_request_options(
96
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
97
+ ),
98
+ cast_to=BinaryAPIResponse,
99
+ )
100
+
101
+ def convert(
102
+ self,
103
+ *,
104
+ from_: Literal["docx", "md", "html"],
105
+ document_base64: str | Omit = omit,
106
+ document_url: str | Omit = omit,
107
+ to: Literal["pdf", "docx"] | Omit = omit,
108
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
109
+ # The extra values given here take precedence over values defined on the client or passed to this method.
110
+ extra_headers: Headers | None = None,
111
+ extra_query: Query | None = None,
112
+ extra_body: Body | None = None,
113
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
114
+ ) -> BinaryAPIResponse:
115
+ """Convert documents between formats using SuperDoc.
116
+
117
+ Supports DOCX to PDF, Markdown
118
+ to DOCX, and HTML to DOCX conversions.
119
+
120
+ Args:
121
+ from_: Source format of the document
122
+
123
+ document_base64: Base64-encoded document content
124
+
125
+ document_url: URL to the document to convert
126
+
127
+ to: Target format for conversion
128
+
129
+ extra_headers: Send extra headers
130
+
131
+ extra_query: Add additional query parameters to the request
132
+
133
+ extra_body: Add additional JSON properties to the request
134
+
135
+ timeout: Override the client-level default timeout for this request, in seconds
136
+ """
137
+ extra_headers = {"Accept": "application/pdf", **(extra_headers or {})}
138
+ body = deepcopy_minimal(
139
+ {
140
+ "from_": from_,
141
+ "document_base64": document_base64,
142
+ "document_url": document_url,
143
+ "to": to,
144
+ }
145
+ )
146
+ files = extract_files(cast(Mapping[str, object], body), paths=[["file"]])
147
+ if files:
148
+ # It should be noted that the actual Content-Type header that will be
149
+ # sent to the server will contain a `boundary` parameter, e.g.
150
+ # multipart/form-data; boundary=---abc--
151
+ extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
152
+ return self._post(
153
+ "/superdoc/v1/convert",
154
+ body=maybe_transform(body, v1_convert_params.V1ConvertParams),
155
+ files=files,
156
+ options=make_request_options(
157
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
158
+ ),
159
+ cast_to=BinaryAPIResponse,
160
+ )
161
+
162
+
163
+ class AsyncV1Resource(AsyncAPIResource):
164
+ @cached_property
165
+ def with_raw_response(self) -> AsyncV1ResourceWithRawResponse:
166
+ """
167
+ This property can be used as a prefix for any HTTP method call to return
168
+ the raw response object instead of the parsed content.
169
+
170
+ For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
171
+ """
172
+ return AsyncV1ResourceWithRawResponse(self)
173
+
174
+ @cached_property
175
+ def with_streaming_response(self) -> AsyncV1ResourceWithStreamingResponse:
176
+ """
177
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
178
+
179
+ For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
180
+ """
181
+ return AsyncV1ResourceWithStreamingResponse(self)
182
+
183
+ async def annotate(
184
+ self,
185
+ *,
186
+ document: v1_annotate_params.Document,
187
+ fields: Iterable[v1_annotate_params.Field],
188
+ output_format: Literal["docx", "pdf"] | Omit = omit,
189
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
190
+ # The extra values given here take precedence over values defined on the client or passed to this method.
191
+ extra_headers: Headers | None = None,
192
+ extra_query: Query | None = None,
193
+ extra_body: Body | None = None,
194
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
195
+ ) -> AsyncBinaryAPIResponse:
196
+ """Populate fields inside a DOCX template using SuperDoc annotations.
197
+
198
+ Supports
199
+ text, images, dates, and numbers. Can target individual fields by ID or multiple
200
+ fields by group.
201
+
202
+ Args:
203
+ document: Document source - provide either URL or base64
204
+
205
+ fields: Fields to populate in the template
206
+
207
+ output_format: Output format for the annotated document
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
+ extra_headers = {"Accept": "application/pdf", **(extra_headers or {})}
218
+ return await self._post(
219
+ "/superdoc/v1/annotate",
220
+ body=await async_maybe_transform(
221
+ {
222
+ "document": document,
223
+ "fields": fields,
224
+ "output_format": output_format,
225
+ },
226
+ v1_annotate_params.V1AnnotateParams,
227
+ ),
228
+ options=make_request_options(
229
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
230
+ ),
231
+ cast_to=AsyncBinaryAPIResponse,
232
+ )
233
+
234
+ async def convert(
235
+ self,
236
+ *,
237
+ from_: Literal["docx", "md", "html"],
238
+ document_base64: str | Omit = omit,
239
+ document_url: str | Omit = omit,
240
+ to: Literal["pdf", "docx"] | Omit = omit,
241
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
242
+ # The extra values given here take precedence over values defined on the client or passed to this method.
243
+ extra_headers: Headers | None = None,
244
+ extra_query: Query | None = None,
245
+ extra_body: Body | None = None,
246
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
247
+ ) -> AsyncBinaryAPIResponse:
248
+ """Convert documents between formats using SuperDoc.
249
+
250
+ Supports DOCX to PDF, Markdown
251
+ to DOCX, and HTML to DOCX conversions.
252
+
253
+ Args:
254
+ from_: Source format of the document
255
+
256
+ document_base64: Base64-encoded document content
257
+
258
+ document_url: URL to the document to convert
259
+
260
+ to: Target format for conversion
261
+
262
+ extra_headers: Send extra headers
263
+
264
+ extra_query: Add additional query parameters to the request
265
+
266
+ extra_body: Add additional JSON properties to the request
267
+
268
+ timeout: Override the client-level default timeout for this request, in seconds
269
+ """
270
+ extra_headers = {"Accept": "application/pdf", **(extra_headers or {})}
271
+ body = deepcopy_minimal(
272
+ {
273
+ "from_": from_,
274
+ "document_base64": document_base64,
275
+ "document_url": document_url,
276
+ "to": to,
277
+ }
278
+ )
279
+ files = extract_files(cast(Mapping[str, object], body), paths=[["file"]])
280
+ if files:
281
+ # It should be noted that the actual Content-Type header that will be
282
+ # sent to the server will contain a `boundary` parameter, e.g.
283
+ # multipart/form-data; boundary=---abc--
284
+ extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
285
+ return await self._post(
286
+ "/superdoc/v1/convert",
287
+ body=await async_maybe_transform(body, v1_convert_params.V1ConvertParams),
288
+ files=files,
289
+ options=make_request_options(
290
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
291
+ ),
292
+ cast_to=AsyncBinaryAPIResponse,
293
+ )
294
+
295
+
296
+ class V1ResourceWithRawResponse:
297
+ def __init__(self, v1: V1Resource) -> None:
298
+ self._v1 = v1
299
+
300
+ self.annotate = to_custom_raw_response_wrapper(
301
+ v1.annotate,
302
+ BinaryAPIResponse,
303
+ )
304
+ self.convert = to_custom_raw_response_wrapper(
305
+ v1.convert,
306
+ BinaryAPIResponse,
307
+ )
308
+
309
+
310
+ class AsyncV1ResourceWithRawResponse:
311
+ def __init__(self, v1: AsyncV1Resource) -> None:
312
+ self._v1 = v1
313
+
314
+ self.annotate = async_to_custom_raw_response_wrapper(
315
+ v1.annotate,
316
+ AsyncBinaryAPIResponse,
317
+ )
318
+ self.convert = async_to_custom_raw_response_wrapper(
319
+ v1.convert,
320
+ AsyncBinaryAPIResponse,
321
+ )
322
+
323
+
324
+ class V1ResourceWithStreamingResponse:
325
+ def __init__(self, v1: V1Resource) -> None:
326
+ self._v1 = v1
327
+
328
+ self.annotate = to_custom_streamed_response_wrapper(
329
+ v1.annotate,
330
+ StreamedBinaryAPIResponse,
331
+ )
332
+ self.convert = to_custom_streamed_response_wrapper(
333
+ v1.convert,
334
+ StreamedBinaryAPIResponse,
335
+ )
336
+
337
+
338
+ class AsyncV1ResourceWithStreamingResponse:
339
+ def __init__(self, v1: AsyncV1Resource) -> None:
340
+ self._v1 = v1
341
+
342
+ self.annotate = async_to_custom_streamed_response_wrapper(
343
+ v1.annotate,
344
+ AsyncStreamedBinaryAPIResponse,
345
+ )
346
+ self.convert = async_to_custom_streamed_response_wrapper(
347
+ v1.convert,
348
+ AsyncStreamedBinaryAPIResponse,
349
+ )
@@ -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 .translate import (
12
+ TranslateResource,
13
+ AsyncTranslateResource,
14
+ TranslateResourceWithRawResponse,
15
+ AsyncTranslateResourceWithRawResponse,
16
+ TranslateResourceWithStreamingResponse,
17
+ AsyncTranslateResourceWithStreamingResponse,
18
+ )
19
+
20
+ __all__ = [
21
+ "V1Resource",
22
+ "AsyncV1Resource",
23
+ "V1ResourceWithRawResponse",
24
+ "AsyncV1ResourceWithRawResponse",
25
+ "V1ResourceWithStreamingResponse",
26
+ "AsyncV1ResourceWithStreamingResponse",
27
+ "TranslateResource",
28
+ "AsyncTranslateResource",
29
+ "TranslateResourceWithRawResponse",
30
+ "AsyncTranslateResourceWithRawResponse",
31
+ "TranslateResourceWithStreamingResponse",
32
+ "AsyncTranslateResourceWithStreamingResponse",
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__ = ["TranslateResource", "AsyncTranslateResource"]
17
+
18
+
19
+ class TranslateResource(SyncAPIResource):
20
+ @cached_property
21
+ def v1(self) -> V1Resource:
22
+ return V1Resource(self._client)
23
+
24
+ @cached_property
25
+ def with_raw_response(self) -> TranslateResourceWithRawResponse:
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 TranslateResourceWithRawResponse(self)
33
+
34
+ @cached_property
35
+ def with_streaming_response(self) -> TranslateResourceWithStreamingResponse:
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 TranslateResourceWithStreamingResponse(self)
42
+
43
+
44
+ class AsyncTranslateResource(AsyncAPIResource):
45
+ @cached_property
46
+ def v1(self) -> AsyncV1Resource:
47
+ return AsyncV1Resource(self._client)
48
+
49
+ @cached_property
50
+ def with_raw_response(self) -> AsyncTranslateResourceWithRawResponse:
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 AsyncTranslateResourceWithRawResponse(self)
58
+
59
+ @cached_property
60
+ def with_streaming_response(self) -> AsyncTranslateResourceWithStreamingResponse:
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 AsyncTranslateResourceWithStreamingResponse(self)
67
+
68
+
69
+ class TranslateResourceWithRawResponse:
70
+ def __init__(self, translate: TranslateResource) -> None:
71
+ self._translate = translate
72
+
73
+ @cached_property
74
+ def v1(self) -> V1ResourceWithRawResponse:
75
+ return V1ResourceWithRawResponse(self._translate.v1)
76
+
77
+
78
+ class AsyncTranslateResourceWithRawResponse:
79
+ def __init__(self, translate: AsyncTranslateResource) -> None:
80
+ self._translate = translate
81
+
82
+ @cached_property
83
+ def v1(self) -> AsyncV1ResourceWithRawResponse:
84
+ return AsyncV1ResourceWithRawResponse(self._translate.v1)
85
+
86
+
87
+ class TranslateResourceWithStreamingResponse:
88
+ def __init__(self, translate: TranslateResource) -> None:
89
+ self._translate = translate
90
+
91
+ @cached_property
92
+ def v1(self) -> V1ResourceWithStreamingResponse:
93
+ return V1ResourceWithStreamingResponse(self._translate.v1)
94
+
95
+
96
+ class AsyncTranslateResourceWithStreamingResponse:
97
+ def __init__(self, translate: AsyncTranslateResource) -> None:
98
+ self._translate = translate
99
+
100
+ @cached_property
101
+ def v1(self) -> AsyncV1ResourceWithStreamingResponse:
102
+ return AsyncV1ResourceWithStreamingResponse(self._translate.v1)