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.
- casedev/_base_client.py +5 -2
- casedev/_client.py +275 -1
- casedev/_compat.py +3 -3
- casedev/_utils/_json.py +35 -0
- 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/ocr/v1.py +2 -2
- 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 +481 -1
- casedev/resources/vault/vault.py +264 -5
- casedev/resources/voice/streaming.py +2 -2
- 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/ocr/v1_process_params.py +21 -13
- casedev/types/ocr/v1_retrieve_response.py +7 -7
- 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 +6 -0
- 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_get_text_response.py +10 -10
- casedev/types/vault/object_list_response.py +13 -13
- casedev/types/vault/object_retrieve_response.py +13 -13
- 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_retrieve_response.py +13 -13
- casedev/types/vault_search_response.py +14 -0
- casedev/types/vault_update_params.py +21 -0
- casedev/types/vault_update_response.py +60 -0
- casedev/types/vault_upload_params.py +5 -2
- {casedev-0.2.0.dist-info → casedev-0.4.0.dist-info}/METADATA +1 -1
- casedev-0.4.0.dist-info/RECORD +275 -0
- casedev-0.2.0.dist-info/RECORD +0 -149
- /casedev/types/{webhooks → applications}/__init__.py +0 -0
- {casedev-0.2.0.dist-info → casedev-0.4.0.dist-info}/WHEEL +0 -0
- {casedev-0.2.0.dist-info → casedev-0.4.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,867 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
import httpx
|
|
8
|
+
|
|
9
|
+
from ...._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given
|
|
10
|
+
from ...._utils import maybe_transform, async_maybe_transform
|
|
11
|
+
from ...._compat import cached_property
|
|
12
|
+
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
13
|
+
from ...._response import (
|
|
14
|
+
to_raw_response_wrapper,
|
|
15
|
+
to_streamed_response_wrapper,
|
|
16
|
+
async_to_raw_response_wrapper,
|
|
17
|
+
async_to_streamed_response_wrapper,
|
|
18
|
+
)
|
|
19
|
+
from ...._base_client import make_request_options
|
|
20
|
+
from ....types.applications.v1 import (
|
|
21
|
+
deployment_list_params,
|
|
22
|
+
deployment_cancel_params,
|
|
23
|
+
deployment_create_params,
|
|
24
|
+
deployment_stream_params,
|
|
25
|
+
deployment_get_logs_params,
|
|
26
|
+
deployment_retrieve_params,
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
__all__ = ["DeploymentsResource", "AsyncDeploymentsResource"]
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class DeploymentsResource(SyncAPIResource):
|
|
33
|
+
@cached_property
|
|
34
|
+
def with_raw_response(self) -> DeploymentsResourceWithRawResponse:
|
|
35
|
+
"""
|
|
36
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
37
|
+
the raw response object instead of the parsed content.
|
|
38
|
+
|
|
39
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
|
|
40
|
+
"""
|
|
41
|
+
return DeploymentsResourceWithRawResponse(self)
|
|
42
|
+
|
|
43
|
+
@cached_property
|
|
44
|
+
def with_streaming_response(self) -> DeploymentsResourceWithStreamingResponse:
|
|
45
|
+
"""
|
|
46
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
47
|
+
|
|
48
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
|
|
49
|
+
"""
|
|
50
|
+
return DeploymentsResourceWithStreamingResponse(self)
|
|
51
|
+
|
|
52
|
+
def create(
|
|
53
|
+
self,
|
|
54
|
+
*,
|
|
55
|
+
project_id: str,
|
|
56
|
+
ref: str | Omit = omit,
|
|
57
|
+
target: Literal["production", "preview"] | 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
|
+
) -> None:
|
|
65
|
+
"""
|
|
66
|
+
Trigger a new deployment for a project
|
|
67
|
+
|
|
68
|
+
Args:
|
|
69
|
+
project_id: Project ID
|
|
70
|
+
|
|
71
|
+
ref: Git ref (branch, tag, or commit) to deploy
|
|
72
|
+
|
|
73
|
+
target: Deployment target
|
|
74
|
+
|
|
75
|
+
extra_headers: Send extra headers
|
|
76
|
+
|
|
77
|
+
extra_query: Add additional query parameters to the request
|
|
78
|
+
|
|
79
|
+
extra_body: Add additional JSON properties to the request
|
|
80
|
+
|
|
81
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
82
|
+
"""
|
|
83
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
84
|
+
return self._post(
|
|
85
|
+
"/applications/v1/deployments",
|
|
86
|
+
body=maybe_transform(
|
|
87
|
+
{
|
|
88
|
+
"project_id": project_id,
|
|
89
|
+
"ref": ref,
|
|
90
|
+
"target": target,
|
|
91
|
+
},
|
|
92
|
+
deployment_create_params.DeploymentCreateParams,
|
|
93
|
+
),
|
|
94
|
+
options=make_request_options(
|
|
95
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
96
|
+
),
|
|
97
|
+
cast_to=NoneType,
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
def retrieve(
|
|
101
|
+
self,
|
|
102
|
+
id: str,
|
|
103
|
+
*,
|
|
104
|
+
project_id: str,
|
|
105
|
+
include_logs: bool | Omit = omit,
|
|
106
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
107
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
108
|
+
extra_headers: Headers | None = None,
|
|
109
|
+
extra_query: Query | None = None,
|
|
110
|
+
extra_body: Body | None = None,
|
|
111
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
112
|
+
) -> None:
|
|
113
|
+
"""
|
|
114
|
+
Get details of a specific deployment including build logs
|
|
115
|
+
|
|
116
|
+
Args:
|
|
117
|
+
project_id: Project ID (for authorization)
|
|
118
|
+
|
|
119
|
+
include_logs: Include build logs
|
|
120
|
+
|
|
121
|
+
extra_headers: Send extra headers
|
|
122
|
+
|
|
123
|
+
extra_query: Add additional query parameters to the request
|
|
124
|
+
|
|
125
|
+
extra_body: Add additional JSON properties to the request
|
|
126
|
+
|
|
127
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
128
|
+
"""
|
|
129
|
+
if not id:
|
|
130
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
131
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
132
|
+
return self._get(
|
|
133
|
+
f"/applications/v1/deployments/{id}",
|
|
134
|
+
options=make_request_options(
|
|
135
|
+
extra_headers=extra_headers,
|
|
136
|
+
extra_query=extra_query,
|
|
137
|
+
extra_body=extra_body,
|
|
138
|
+
timeout=timeout,
|
|
139
|
+
query=maybe_transform(
|
|
140
|
+
{
|
|
141
|
+
"project_id": project_id,
|
|
142
|
+
"include_logs": include_logs,
|
|
143
|
+
},
|
|
144
|
+
deployment_retrieve_params.DeploymentRetrieveParams,
|
|
145
|
+
),
|
|
146
|
+
),
|
|
147
|
+
cast_to=NoneType,
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
def list(
|
|
151
|
+
self,
|
|
152
|
+
*,
|
|
153
|
+
project_id: str,
|
|
154
|
+
limit: float | Omit = omit,
|
|
155
|
+
state: str | Omit = omit,
|
|
156
|
+
target: Literal["production", "staging"] | Omit = omit,
|
|
157
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
158
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
159
|
+
extra_headers: Headers | None = None,
|
|
160
|
+
extra_query: Query | None = None,
|
|
161
|
+
extra_body: Body | None = None,
|
|
162
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
163
|
+
) -> None:
|
|
164
|
+
"""
|
|
165
|
+
List deployments for a project
|
|
166
|
+
|
|
167
|
+
Args:
|
|
168
|
+
project_id: Project ID
|
|
169
|
+
|
|
170
|
+
limit: Maximum number of deployments to return
|
|
171
|
+
|
|
172
|
+
state: Filter by deployment state
|
|
173
|
+
|
|
174
|
+
target: Filter by deployment target
|
|
175
|
+
|
|
176
|
+
extra_headers: Send extra headers
|
|
177
|
+
|
|
178
|
+
extra_query: Add additional query parameters to the request
|
|
179
|
+
|
|
180
|
+
extra_body: Add additional JSON properties to the request
|
|
181
|
+
|
|
182
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
183
|
+
"""
|
|
184
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
185
|
+
return self._get(
|
|
186
|
+
"/applications/v1/deployments",
|
|
187
|
+
options=make_request_options(
|
|
188
|
+
extra_headers=extra_headers,
|
|
189
|
+
extra_query=extra_query,
|
|
190
|
+
extra_body=extra_body,
|
|
191
|
+
timeout=timeout,
|
|
192
|
+
query=maybe_transform(
|
|
193
|
+
{
|
|
194
|
+
"project_id": project_id,
|
|
195
|
+
"limit": limit,
|
|
196
|
+
"state": state,
|
|
197
|
+
"target": target,
|
|
198
|
+
},
|
|
199
|
+
deployment_list_params.DeploymentListParams,
|
|
200
|
+
),
|
|
201
|
+
),
|
|
202
|
+
cast_to=NoneType,
|
|
203
|
+
)
|
|
204
|
+
|
|
205
|
+
def cancel(
|
|
206
|
+
self,
|
|
207
|
+
id: str,
|
|
208
|
+
*,
|
|
209
|
+
project_id: str,
|
|
210
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
211
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
212
|
+
extra_headers: Headers | None = None,
|
|
213
|
+
extra_query: Query | None = None,
|
|
214
|
+
extra_body: Body | None = None,
|
|
215
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
216
|
+
) -> None:
|
|
217
|
+
"""
|
|
218
|
+
Cancel a running deployment
|
|
219
|
+
|
|
220
|
+
Args:
|
|
221
|
+
project_id: Project ID (for authorization)
|
|
222
|
+
|
|
223
|
+
extra_headers: Send extra headers
|
|
224
|
+
|
|
225
|
+
extra_query: Add additional query parameters to the request
|
|
226
|
+
|
|
227
|
+
extra_body: Add additional JSON properties to the request
|
|
228
|
+
|
|
229
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
230
|
+
"""
|
|
231
|
+
if not id:
|
|
232
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
233
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
234
|
+
return self._post(
|
|
235
|
+
f"/applications/v1/deployments/{id}/cancel",
|
|
236
|
+
body=maybe_transform({"project_id": project_id}, deployment_cancel_params.DeploymentCancelParams),
|
|
237
|
+
options=make_request_options(
|
|
238
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
239
|
+
),
|
|
240
|
+
cast_to=NoneType,
|
|
241
|
+
)
|
|
242
|
+
|
|
243
|
+
def create_from_files(
|
|
244
|
+
self,
|
|
245
|
+
*,
|
|
246
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
247
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
248
|
+
extra_headers: Headers | None = None,
|
|
249
|
+
extra_query: Query | None = None,
|
|
250
|
+
extra_body: Body | None = None,
|
|
251
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
252
|
+
) -> None:
|
|
253
|
+
"""Create a deployment from raw file contents (for Thurgood sandbox deployments)"""
|
|
254
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
255
|
+
return self._post(
|
|
256
|
+
"/applications/v1/deployments/from-files",
|
|
257
|
+
options=make_request_options(
|
|
258
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
259
|
+
),
|
|
260
|
+
cast_to=NoneType,
|
|
261
|
+
)
|
|
262
|
+
|
|
263
|
+
def get_logs(
|
|
264
|
+
self,
|
|
265
|
+
id: str,
|
|
266
|
+
*,
|
|
267
|
+
project_id: str,
|
|
268
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
269
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
270
|
+
extra_headers: Headers | None = None,
|
|
271
|
+
extra_query: Query | None = None,
|
|
272
|
+
extra_body: Body | None = None,
|
|
273
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
274
|
+
) -> None:
|
|
275
|
+
"""
|
|
276
|
+
Get build logs for a specific deployment
|
|
277
|
+
|
|
278
|
+
Args:
|
|
279
|
+
project_id: Project ID (for authorization)
|
|
280
|
+
|
|
281
|
+
extra_headers: Send extra headers
|
|
282
|
+
|
|
283
|
+
extra_query: Add additional query parameters to the request
|
|
284
|
+
|
|
285
|
+
extra_body: Add additional JSON properties to the request
|
|
286
|
+
|
|
287
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
288
|
+
"""
|
|
289
|
+
if not id:
|
|
290
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
291
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
292
|
+
return self._get(
|
|
293
|
+
f"/applications/v1/deployments/{id}/logs",
|
|
294
|
+
options=make_request_options(
|
|
295
|
+
extra_headers=extra_headers,
|
|
296
|
+
extra_query=extra_query,
|
|
297
|
+
extra_body=extra_body,
|
|
298
|
+
timeout=timeout,
|
|
299
|
+
query=maybe_transform({"project_id": project_id}, deployment_get_logs_params.DeploymentGetLogsParams),
|
|
300
|
+
),
|
|
301
|
+
cast_to=NoneType,
|
|
302
|
+
)
|
|
303
|
+
|
|
304
|
+
def get_status(
|
|
305
|
+
self,
|
|
306
|
+
id: str,
|
|
307
|
+
*,
|
|
308
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
309
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
310
|
+
extra_headers: Headers | None = None,
|
|
311
|
+
extra_query: Query | None = None,
|
|
312
|
+
extra_body: Body | None = None,
|
|
313
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
314
|
+
) -> None:
|
|
315
|
+
"""
|
|
316
|
+
Get the current status of a deployment
|
|
317
|
+
|
|
318
|
+
Args:
|
|
319
|
+
extra_headers: Send extra headers
|
|
320
|
+
|
|
321
|
+
extra_query: Add additional query parameters to the request
|
|
322
|
+
|
|
323
|
+
extra_body: Add additional JSON properties to the request
|
|
324
|
+
|
|
325
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
326
|
+
"""
|
|
327
|
+
if not id:
|
|
328
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
329
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
330
|
+
return self._get(
|
|
331
|
+
f"/applications/v1/deployments/{id}/status",
|
|
332
|
+
options=make_request_options(
|
|
333
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
334
|
+
),
|
|
335
|
+
cast_to=NoneType,
|
|
336
|
+
)
|
|
337
|
+
|
|
338
|
+
def stream(
|
|
339
|
+
self,
|
|
340
|
+
id: str,
|
|
341
|
+
*,
|
|
342
|
+
project_id: str,
|
|
343
|
+
start_index: float | Omit = omit,
|
|
344
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
345
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
346
|
+
extra_headers: Headers | None = None,
|
|
347
|
+
extra_query: Query | None = None,
|
|
348
|
+
extra_body: Body | None = None,
|
|
349
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
350
|
+
) -> None:
|
|
351
|
+
"""
|
|
352
|
+
Stream real-time deployment progress events via Server-Sent Events
|
|
353
|
+
|
|
354
|
+
Args:
|
|
355
|
+
project_id: Project ID (for authorization)
|
|
356
|
+
|
|
357
|
+
start_index: Resume stream from this index (for reconnection)
|
|
358
|
+
|
|
359
|
+
extra_headers: Send extra headers
|
|
360
|
+
|
|
361
|
+
extra_query: Add additional query parameters to the request
|
|
362
|
+
|
|
363
|
+
extra_body: Add additional JSON properties to the request
|
|
364
|
+
|
|
365
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
366
|
+
"""
|
|
367
|
+
if not id:
|
|
368
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
369
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
370
|
+
return self._get(
|
|
371
|
+
f"/applications/v1/deployments/{id}/stream",
|
|
372
|
+
options=make_request_options(
|
|
373
|
+
extra_headers=extra_headers,
|
|
374
|
+
extra_query=extra_query,
|
|
375
|
+
extra_body=extra_body,
|
|
376
|
+
timeout=timeout,
|
|
377
|
+
query=maybe_transform(
|
|
378
|
+
{
|
|
379
|
+
"project_id": project_id,
|
|
380
|
+
"start_index": start_index,
|
|
381
|
+
},
|
|
382
|
+
deployment_stream_params.DeploymentStreamParams,
|
|
383
|
+
),
|
|
384
|
+
),
|
|
385
|
+
cast_to=NoneType,
|
|
386
|
+
)
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
class AsyncDeploymentsResource(AsyncAPIResource):
|
|
390
|
+
@cached_property
|
|
391
|
+
def with_raw_response(self) -> AsyncDeploymentsResourceWithRawResponse:
|
|
392
|
+
"""
|
|
393
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
394
|
+
the raw response object instead of the parsed content.
|
|
395
|
+
|
|
396
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
|
|
397
|
+
"""
|
|
398
|
+
return AsyncDeploymentsResourceWithRawResponse(self)
|
|
399
|
+
|
|
400
|
+
@cached_property
|
|
401
|
+
def with_streaming_response(self) -> AsyncDeploymentsResourceWithStreamingResponse:
|
|
402
|
+
"""
|
|
403
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
404
|
+
|
|
405
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
|
|
406
|
+
"""
|
|
407
|
+
return AsyncDeploymentsResourceWithStreamingResponse(self)
|
|
408
|
+
|
|
409
|
+
async def create(
|
|
410
|
+
self,
|
|
411
|
+
*,
|
|
412
|
+
project_id: str,
|
|
413
|
+
ref: str | Omit = omit,
|
|
414
|
+
target: Literal["production", "preview"] | Omit = omit,
|
|
415
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
416
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
417
|
+
extra_headers: Headers | None = None,
|
|
418
|
+
extra_query: Query | None = None,
|
|
419
|
+
extra_body: Body | None = None,
|
|
420
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
421
|
+
) -> None:
|
|
422
|
+
"""
|
|
423
|
+
Trigger a new deployment for a project
|
|
424
|
+
|
|
425
|
+
Args:
|
|
426
|
+
project_id: Project ID
|
|
427
|
+
|
|
428
|
+
ref: Git ref (branch, tag, or commit) to deploy
|
|
429
|
+
|
|
430
|
+
target: Deployment target
|
|
431
|
+
|
|
432
|
+
extra_headers: Send extra headers
|
|
433
|
+
|
|
434
|
+
extra_query: Add additional query parameters to the request
|
|
435
|
+
|
|
436
|
+
extra_body: Add additional JSON properties to the request
|
|
437
|
+
|
|
438
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
439
|
+
"""
|
|
440
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
441
|
+
return await self._post(
|
|
442
|
+
"/applications/v1/deployments",
|
|
443
|
+
body=await async_maybe_transform(
|
|
444
|
+
{
|
|
445
|
+
"project_id": project_id,
|
|
446
|
+
"ref": ref,
|
|
447
|
+
"target": target,
|
|
448
|
+
},
|
|
449
|
+
deployment_create_params.DeploymentCreateParams,
|
|
450
|
+
),
|
|
451
|
+
options=make_request_options(
|
|
452
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
453
|
+
),
|
|
454
|
+
cast_to=NoneType,
|
|
455
|
+
)
|
|
456
|
+
|
|
457
|
+
async def retrieve(
|
|
458
|
+
self,
|
|
459
|
+
id: str,
|
|
460
|
+
*,
|
|
461
|
+
project_id: str,
|
|
462
|
+
include_logs: bool | Omit = omit,
|
|
463
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
464
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
465
|
+
extra_headers: Headers | None = None,
|
|
466
|
+
extra_query: Query | None = None,
|
|
467
|
+
extra_body: Body | None = None,
|
|
468
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
469
|
+
) -> None:
|
|
470
|
+
"""
|
|
471
|
+
Get details of a specific deployment including build logs
|
|
472
|
+
|
|
473
|
+
Args:
|
|
474
|
+
project_id: Project ID (for authorization)
|
|
475
|
+
|
|
476
|
+
include_logs: Include build logs
|
|
477
|
+
|
|
478
|
+
extra_headers: Send extra headers
|
|
479
|
+
|
|
480
|
+
extra_query: Add additional query parameters to the request
|
|
481
|
+
|
|
482
|
+
extra_body: Add additional JSON properties to the request
|
|
483
|
+
|
|
484
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
485
|
+
"""
|
|
486
|
+
if not id:
|
|
487
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
488
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
489
|
+
return await self._get(
|
|
490
|
+
f"/applications/v1/deployments/{id}",
|
|
491
|
+
options=make_request_options(
|
|
492
|
+
extra_headers=extra_headers,
|
|
493
|
+
extra_query=extra_query,
|
|
494
|
+
extra_body=extra_body,
|
|
495
|
+
timeout=timeout,
|
|
496
|
+
query=await async_maybe_transform(
|
|
497
|
+
{
|
|
498
|
+
"project_id": project_id,
|
|
499
|
+
"include_logs": include_logs,
|
|
500
|
+
},
|
|
501
|
+
deployment_retrieve_params.DeploymentRetrieveParams,
|
|
502
|
+
),
|
|
503
|
+
),
|
|
504
|
+
cast_to=NoneType,
|
|
505
|
+
)
|
|
506
|
+
|
|
507
|
+
async def list(
|
|
508
|
+
self,
|
|
509
|
+
*,
|
|
510
|
+
project_id: str,
|
|
511
|
+
limit: float | Omit = omit,
|
|
512
|
+
state: str | Omit = omit,
|
|
513
|
+
target: Literal["production", "staging"] | Omit = omit,
|
|
514
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
515
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
516
|
+
extra_headers: Headers | None = None,
|
|
517
|
+
extra_query: Query | None = None,
|
|
518
|
+
extra_body: Body | None = None,
|
|
519
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
520
|
+
) -> None:
|
|
521
|
+
"""
|
|
522
|
+
List deployments for a project
|
|
523
|
+
|
|
524
|
+
Args:
|
|
525
|
+
project_id: Project ID
|
|
526
|
+
|
|
527
|
+
limit: Maximum number of deployments to return
|
|
528
|
+
|
|
529
|
+
state: Filter by deployment state
|
|
530
|
+
|
|
531
|
+
target: Filter by deployment target
|
|
532
|
+
|
|
533
|
+
extra_headers: Send extra headers
|
|
534
|
+
|
|
535
|
+
extra_query: Add additional query parameters to the request
|
|
536
|
+
|
|
537
|
+
extra_body: Add additional JSON properties to the request
|
|
538
|
+
|
|
539
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
540
|
+
"""
|
|
541
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
542
|
+
return await self._get(
|
|
543
|
+
"/applications/v1/deployments",
|
|
544
|
+
options=make_request_options(
|
|
545
|
+
extra_headers=extra_headers,
|
|
546
|
+
extra_query=extra_query,
|
|
547
|
+
extra_body=extra_body,
|
|
548
|
+
timeout=timeout,
|
|
549
|
+
query=await async_maybe_transform(
|
|
550
|
+
{
|
|
551
|
+
"project_id": project_id,
|
|
552
|
+
"limit": limit,
|
|
553
|
+
"state": state,
|
|
554
|
+
"target": target,
|
|
555
|
+
},
|
|
556
|
+
deployment_list_params.DeploymentListParams,
|
|
557
|
+
),
|
|
558
|
+
),
|
|
559
|
+
cast_to=NoneType,
|
|
560
|
+
)
|
|
561
|
+
|
|
562
|
+
async def cancel(
|
|
563
|
+
self,
|
|
564
|
+
id: str,
|
|
565
|
+
*,
|
|
566
|
+
project_id: str,
|
|
567
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
568
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
569
|
+
extra_headers: Headers | None = None,
|
|
570
|
+
extra_query: Query | None = None,
|
|
571
|
+
extra_body: Body | None = None,
|
|
572
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
573
|
+
) -> None:
|
|
574
|
+
"""
|
|
575
|
+
Cancel a running deployment
|
|
576
|
+
|
|
577
|
+
Args:
|
|
578
|
+
project_id: Project ID (for authorization)
|
|
579
|
+
|
|
580
|
+
extra_headers: Send extra headers
|
|
581
|
+
|
|
582
|
+
extra_query: Add additional query parameters to the request
|
|
583
|
+
|
|
584
|
+
extra_body: Add additional JSON properties to the request
|
|
585
|
+
|
|
586
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
587
|
+
"""
|
|
588
|
+
if not id:
|
|
589
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
590
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
591
|
+
return await self._post(
|
|
592
|
+
f"/applications/v1/deployments/{id}/cancel",
|
|
593
|
+
body=await async_maybe_transform(
|
|
594
|
+
{"project_id": project_id}, deployment_cancel_params.DeploymentCancelParams
|
|
595
|
+
),
|
|
596
|
+
options=make_request_options(
|
|
597
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
598
|
+
),
|
|
599
|
+
cast_to=NoneType,
|
|
600
|
+
)
|
|
601
|
+
|
|
602
|
+
async def create_from_files(
|
|
603
|
+
self,
|
|
604
|
+
*,
|
|
605
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
606
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
607
|
+
extra_headers: Headers | None = None,
|
|
608
|
+
extra_query: Query | None = None,
|
|
609
|
+
extra_body: Body | None = None,
|
|
610
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
611
|
+
) -> None:
|
|
612
|
+
"""Create a deployment from raw file contents (for Thurgood sandbox deployments)"""
|
|
613
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
614
|
+
return await self._post(
|
|
615
|
+
"/applications/v1/deployments/from-files",
|
|
616
|
+
options=make_request_options(
|
|
617
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
618
|
+
),
|
|
619
|
+
cast_to=NoneType,
|
|
620
|
+
)
|
|
621
|
+
|
|
622
|
+
async def get_logs(
|
|
623
|
+
self,
|
|
624
|
+
id: str,
|
|
625
|
+
*,
|
|
626
|
+
project_id: str,
|
|
627
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
628
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
629
|
+
extra_headers: Headers | None = None,
|
|
630
|
+
extra_query: Query | None = None,
|
|
631
|
+
extra_body: Body | None = None,
|
|
632
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
633
|
+
) -> None:
|
|
634
|
+
"""
|
|
635
|
+
Get build logs for a specific deployment
|
|
636
|
+
|
|
637
|
+
Args:
|
|
638
|
+
project_id: Project ID (for authorization)
|
|
639
|
+
|
|
640
|
+
extra_headers: Send extra headers
|
|
641
|
+
|
|
642
|
+
extra_query: Add additional query parameters to the request
|
|
643
|
+
|
|
644
|
+
extra_body: Add additional JSON properties to the request
|
|
645
|
+
|
|
646
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
647
|
+
"""
|
|
648
|
+
if not id:
|
|
649
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
650
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
651
|
+
return await self._get(
|
|
652
|
+
f"/applications/v1/deployments/{id}/logs",
|
|
653
|
+
options=make_request_options(
|
|
654
|
+
extra_headers=extra_headers,
|
|
655
|
+
extra_query=extra_query,
|
|
656
|
+
extra_body=extra_body,
|
|
657
|
+
timeout=timeout,
|
|
658
|
+
query=await async_maybe_transform(
|
|
659
|
+
{"project_id": project_id}, deployment_get_logs_params.DeploymentGetLogsParams
|
|
660
|
+
),
|
|
661
|
+
),
|
|
662
|
+
cast_to=NoneType,
|
|
663
|
+
)
|
|
664
|
+
|
|
665
|
+
async def get_status(
|
|
666
|
+
self,
|
|
667
|
+
id: str,
|
|
668
|
+
*,
|
|
669
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
670
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
671
|
+
extra_headers: Headers | None = None,
|
|
672
|
+
extra_query: Query | None = None,
|
|
673
|
+
extra_body: Body | None = None,
|
|
674
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
675
|
+
) -> None:
|
|
676
|
+
"""
|
|
677
|
+
Get the current status of a deployment
|
|
678
|
+
|
|
679
|
+
Args:
|
|
680
|
+
extra_headers: Send extra headers
|
|
681
|
+
|
|
682
|
+
extra_query: Add additional query parameters to the request
|
|
683
|
+
|
|
684
|
+
extra_body: Add additional JSON properties to the request
|
|
685
|
+
|
|
686
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
687
|
+
"""
|
|
688
|
+
if not id:
|
|
689
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
690
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
691
|
+
return await self._get(
|
|
692
|
+
f"/applications/v1/deployments/{id}/status",
|
|
693
|
+
options=make_request_options(
|
|
694
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
695
|
+
),
|
|
696
|
+
cast_to=NoneType,
|
|
697
|
+
)
|
|
698
|
+
|
|
699
|
+
async def stream(
|
|
700
|
+
self,
|
|
701
|
+
id: str,
|
|
702
|
+
*,
|
|
703
|
+
project_id: str,
|
|
704
|
+
start_index: float | Omit = omit,
|
|
705
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
706
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
707
|
+
extra_headers: Headers | None = None,
|
|
708
|
+
extra_query: Query | None = None,
|
|
709
|
+
extra_body: Body | None = None,
|
|
710
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
711
|
+
) -> None:
|
|
712
|
+
"""
|
|
713
|
+
Stream real-time deployment progress events via Server-Sent Events
|
|
714
|
+
|
|
715
|
+
Args:
|
|
716
|
+
project_id: Project ID (for authorization)
|
|
717
|
+
|
|
718
|
+
start_index: Resume stream from this index (for reconnection)
|
|
719
|
+
|
|
720
|
+
extra_headers: Send extra headers
|
|
721
|
+
|
|
722
|
+
extra_query: Add additional query parameters to the request
|
|
723
|
+
|
|
724
|
+
extra_body: Add additional JSON properties to the request
|
|
725
|
+
|
|
726
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
727
|
+
"""
|
|
728
|
+
if not id:
|
|
729
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
730
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
731
|
+
return await self._get(
|
|
732
|
+
f"/applications/v1/deployments/{id}/stream",
|
|
733
|
+
options=make_request_options(
|
|
734
|
+
extra_headers=extra_headers,
|
|
735
|
+
extra_query=extra_query,
|
|
736
|
+
extra_body=extra_body,
|
|
737
|
+
timeout=timeout,
|
|
738
|
+
query=await async_maybe_transform(
|
|
739
|
+
{
|
|
740
|
+
"project_id": project_id,
|
|
741
|
+
"start_index": start_index,
|
|
742
|
+
},
|
|
743
|
+
deployment_stream_params.DeploymentStreamParams,
|
|
744
|
+
),
|
|
745
|
+
),
|
|
746
|
+
cast_to=NoneType,
|
|
747
|
+
)
|
|
748
|
+
|
|
749
|
+
|
|
750
|
+
class DeploymentsResourceWithRawResponse:
|
|
751
|
+
def __init__(self, deployments: DeploymentsResource) -> None:
|
|
752
|
+
self._deployments = deployments
|
|
753
|
+
|
|
754
|
+
self.create = to_raw_response_wrapper(
|
|
755
|
+
deployments.create,
|
|
756
|
+
)
|
|
757
|
+
self.retrieve = to_raw_response_wrapper(
|
|
758
|
+
deployments.retrieve,
|
|
759
|
+
)
|
|
760
|
+
self.list = to_raw_response_wrapper(
|
|
761
|
+
deployments.list,
|
|
762
|
+
)
|
|
763
|
+
self.cancel = to_raw_response_wrapper(
|
|
764
|
+
deployments.cancel,
|
|
765
|
+
)
|
|
766
|
+
self.create_from_files = to_raw_response_wrapper(
|
|
767
|
+
deployments.create_from_files,
|
|
768
|
+
)
|
|
769
|
+
self.get_logs = to_raw_response_wrapper(
|
|
770
|
+
deployments.get_logs,
|
|
771
|
+
)
|
|
772
|
+
self.get_status = to_raw_response_wrapper(
|
|
773
|
+
deployments.get_status,
|
|
774
|
+
)
|
|
775
|
+
self.stream = to_raw_response_wrapper(
|
|
776
|
+
deployments.stream,
|
|
777
|
+
)
|
|
778
|
+
|
|
779
|
+
|
|
780
|
+
class AsyncDeploymentsResourceWithRawResponse:
|
|
781
|
+
def __init__(self, deployments: AsyncDeploymentsResource) -> None:
|
|
782
|
+
self._deployments = deployments
|
|
783
|
+
|
|
784
|
+
self.create = async_to_raw_response_wrapper(
|
|
785
|
+
deployments.create,
|
|
786
|
+
)
|
|
787
|
+
self.retrieve = async_to_raw_response_wrapper(
|
|
788
|
+
deployments.retrieve,
|
|
789
|
+
)
|
|
790
|
+
self.list = async_to_raw_response_wrapper(
|
|
791
|
+
deployments.list,
|
|
792
|
+
)
|
|
793
|
+
self.cancel = async_to_raw_response_wrapper(
|
|
794
|
+
deployments.cancel,
|
|
795
|
+
)
|
|
796
|
+
self.create_from_files = async_to_raw_response_wrapper(
|
|
797
|
+
deployments.create_from_files,
|
|
798
|
+
)
|
|
799
|
+
self.get_logs = async_to_raw_response_wrapper(
|
|
800
|
+
deployments.get_logs,
|
|
801
|
+
)
|
|
802
|
+
self.get_status = async_to_raw_response_wrapper(
|
|
803
|
+
deployments.get_status,
|
|
804
|
+
)
|
|
805
|
+
self.stream = async_to_raw_response_wrapper(
|
|
806
|
+
deployments.stream,
|
|
807
|
+
)
|
|
808
|
+
|
|
809
|
+
|
|
810
|
+
class DeploymentsResourceWithStreamingResponse:
|
|
811
|
+
def __init__(self, deployments: DeploymentsResource) -> None:
|
|
812
|
+
self._deployments = deployments
|
|
813
|
+
|
|
814
|
+
self.create = to_streamed_response_wrapper(
|
|
815
|
+
deployments.create,
|
|
816
|
+
)
|
|
817
|
+
self.retrieve = to_streamed_response_wrapper(
|
|
818
|
+
deployments.retrieve,
|
|
819
|
+
)
|
|
820
|
+
self.list = to_streamed_response_wrapper(
|
|
821
|
+
deployments.list,
|
|
822
|
+
)
|
|
823
|
+
self.cancel = to_streamed_response_wrapper(
|
|
824
|
+
deployments.cancel,
|
|
825
|
+
)
|
|
826
|
+
self.create_from_files = to_streamed_response_wrapper(
|
|
827
|
+
deployments.create_from_files,
|
|
828
|
+
)
|
|
829
|
+
self.get_logs = to_streamed_response_wrapper(
|
|
830
|
+
deployments.get_logs,
|
|
831
|
+
)
|
|
832
|
+
self.get_status = to_streamed_response_wrapper(
|
|
833
|
+
deployments.get_status,
|
|
834
|
+
)
|
|
835
|
+
self.stream = to_streamed_response_wrapper(
|
|
836
|
+
deployments.stream,
|
|
837
|
+
)
|
|
838
|
+
|
|
839
|
+
|
|
840
|
+
class AsyncDeploymentsResourceWithStreamingResponse:
|
|
841
|
+
def __init__(self, deployments: AsyncDeploymentsResource) -> None:
|
|
842
|
+
self._deployments = deployments
|
|
843
|
+
|
|
844
|
+
self.create = async_to_streamed_response_wrapper(
|
|
845
|
+
deployments.create,
|
|
846
|
+
)
|
|
847
|
+
self.retrieve = async_to_streamed_response_wrapper(
|
|
848
|
+
deployments.retrieve,
|
|
849
|
+
)
|
|
850
|
+
self.list = async_to_streamed_response_wrapper(
|
|
851
|
+
deployments.list,
|
|
852
|
+
)
|
|
853
|
+
self.cancel = async_to_streamed_response_wrapper(
|
|
854
|
+
deployments.cancel,
|
|
855
|
+
)
|
|
856
|
+
self.create_from_files = async_to_streamed_response_wrapper(
|
|
857
|
+
deployments.create_from_files,
|
|
858
|
+
)
|
|
859
|
+
self.get_logs = async_to_streamed_response_wrapper(
|
|
860
|
+
deployments.get_logs,
|
|
861
|
+
)
|
|
862
|
+
self.get_status = async_to_streamed_response_wrapper(
|
|
863
|
+
deployments.get_status,
|
|
864
|
+
)
|
|
865
|
+
self.stream = async_to_streamed_response_wrapper(
|
|
866
|
+
deployments.stream,
|
|
867
|
+
)
|