mirascope 2.0.0a6__py3-none-any.whl → 2.0.2__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.
- mirascope/_utils.py +34 -0
- mirascope/api/_generated/__init__.py +186 -5
- mirascope/api/_generated/annotations/client.py +38 -6
- mirascope/api/_generated/annotations/raw_client.py +366 -47
- mirascope/api/_generated/annotations/types/annotations_create_response.py +19 -6
- mirascope/api/_generated/annotations/types/annotations_get_response.py +19 -6
- mirascope/api/_generated/annotations/types/annotations_list_response_annotations_item.py +22 -7
- mirascope/api/_generated/annotations/types/annotations_update_response.py +19 -6
- mirascope/api/_generated/api_keys/__init__.py +12 -2
- mirascope/api/_generated/api_keys/client.py +107 -6
- mirascope/api/_generated/api_keys/raw_client.py +486 -38
- mirascope/api/_generated/api_keys/types/__init__.py +7 -1
- mirascope/api/_generated/api_keys/types/api_keys_list_all_for_org_response_item.py +40 -0
- mirascope/api/_generated/client.py +36 -0
- mirascope/api/_generated/docs/raw_client.py +71 -9
- mirascope/api/_generated/environment.py +3 -3
- mirascope/api/_generated/environments/__init__.py +6 -0
- mirascope/api/_generated/environments/client.py +158 -9
- mirascope/api/_generated/environments/raw_client.py +620 -52
- mirascope/api/_generated/environments/types/__init__.py +10 -0
- mirascope/api/_generated/environments/types/environments_get_analytics_response.py +60 -0
- mirascope/api/_generated/environments/types/environments_get_analytics_response_top_functions_item.py +24 -0
- mirascope/api/_generated/{organizations/types/organizations_credits_response.py → environments/types/environments_get_analytics_response_top_models_item.py} +6 -3
- mirascope/api/_generated/errors/__init__.py +6 -0
- mirascope/api/_generated/errors/bad_request_error.py +5 -2
- mirascope/api/_generated/errors/conflict_error.py +5 -2
- mirascope/api/_generated/errors/payment_required_error.py +15 -0
- mirascope/api/_generated/errors/service_unavailable_error.py +14 -0
- mirascope/api/_generated/errors/too_many_requests_error.py +15 -0
- mirascope/api/_generated/functions/__init__.py +10 -0
- mirascope/api/_generated/functions/client.py +222 -8
- mirascope/api/_generated/functions/raw_client.py +975 -134
- mirascope/api/_generated/functions/types/__init__.py +28 -4
- mirascope/api/_generated/functions/types/functions_get_by_env_response.py +53 -0
- mirascope/api/_generated/functions/types/functions_get_by_env_response_dependencies_value.py +22 -0
- mirascope/api/_generated/functions/types/functions_list_by_env_response.py +25 -0
- mirascope/api/_generated/functions/types/functions_list_by_env_response_functions_item.py +56 -0
- mirascope/api/_generated/functions/types/functions_list_by_env_response_functions_item_dependencies_value.py +22 -0
- mirascope/api/_generated/health/raw_client.py +74 -10
- mirascope/api/_generated/organization_invitations/__init__.py +33 -0
- mirascope/api/_generated/organization_invitations/client.py +546 -0
- mirascope/api/_generated/organization_invitations/raw_client.py +1519 -0
- mirascope/api/_generated/organization_invitations/types/__init__.py +53 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_accept_response.py +34 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_accept_response_role.py +7 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_create_request_role.py +7 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_create_response.py +48 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_create_response_role.py +7 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_create_response_status.py +7 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_get_response.py +48 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_get_response_role.py +7 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_get_response_status.py +7 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_list_response_item.py +48 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_list_response_item_role.py +7 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_list_response_item_status.py +7 -0
- mirascope/api/_generated/organization_memberships/__init__.py +19 -0
- mirascope/api/_generated/organization_memberships/client.py +302 -0
- mirascope/api/_generated/organization_memberships/raw_client.py +736 -0
- mirascope/api/_generated/organization_memberships/types/__init__.py +27 -0
- mirascope/api/_generated/organization_memberships/types/organization_memberships_list_response_item.py +33 -0
- mirascope/api/_generated/organization_memberships/types/organization_memberships_list_response_item_role.py +7 -0
- mirascope/api/_generated/organization_memberships/types/organization_memberships_update_request_role.py +7 -0
- mirascope/api/_generated/organization_memberships/types/organization_memberships_update_response.py +31 -0
- mirascope/api/_generated/organization_memberships/types/organization_memberships_update_response_role.py +7 -0
- mirascope/api/_generated/organizations/__init__.py +26 -2
- mirascope/api/_generated/organizations/client.py +442 -20
- mirascope/api/_generated/organizations/raw_client.py +1763 -164
- mirascope/api/_generated/organizations/types/__init__.py +48 -2
- mirascope/api/_generated/organizations/types/organizations_create_payment_intent_response.py +24 -0
- mirascope/api/_generated/organizations/types/organizations_preview_subscription_change_request_target_plan.py +7 -0
- mirascope/api/_generated/organizations/types/organizations_preview_subscription_change_response.py +47 -0
- mirascope/api/_generated/organizations/types/organizations_preview_subscription_change_response_validation_errors_item.py +33 -0
- mirascope/api/_generated/organizations/types/organizations_preview_subscription_change_response_validation_errors_item_resource.py +7 -0
- mirascope/api/_generated/organizations/types/organizations_router_balance_response.py +24 -0
- mirascope/api/_generated/organizations/types/organizations_subscription_response.py +53 -0
- mirascope/api/_generated/organizations/types/organizations_subscription_response_current_plan.py +7 -0
- mirascope/api/_generated/organizations/types/organizations_subscription_response_payment_method.py +26 -0
- mirascope/api/_generated/organizations/types/organizations_subscription_response_scheduled_change.py +34 -0
- mirascope/api/_generated/organizations/types/organizations_subscription_response_scheduled_change_target_plan.py +7 -0
- mirascope/api/_generated/organizations/types/organizations_update_subscription_request_target_plan.py +7 -0
- mirascope/api/_generated/organizations/types/organizations_update_subscription_response.py +35 -0
- mirascope/api/_generated/project_memberships/__init__.py +25 -0
- mirascope/api/_generated/project_memberships/client.py +437 -0
- mirascope/api/_generated/project_memberships/raw_client.py +1039 -0
- mirascope/api/_generated/project_memberships/types/__init__.py +29 -0
- mirascope/api/_generated/project_memberships/types/project_memberships_create_request_role.py +7 -0
- mirascope/api/_generated/project_memberships/types/project_memberships_create_response.py +35 -0
- mirascope/api/_generated/project_memberships/types/project_memberships_create_response_role.py +7 -0
- mirascope/api/_generated/project_memberships/types/project_memberships_list_response_item.py +33 -0
- mirascope/api/_generated/project_memberships/types/project_memberships_list_response_item_role.py +7 -0
- mirascope/api/_generated/project_memberships/types/project_memberships_update_request_role.py +7 -0
- mirascope/api/_generated/project_memberships/types/project_memberships_update_response.py +35 -0
- mirascope/api/_generated/project_memberships/types/project_memberships_update_response_role.py +7 -0
- mirascope/api/_generated/projects/raw_client.py +415 -58
- mirascope/api/_generated/reference.md +2767 -397
- mirascope/api/_generated/tags/__init__.py +19 -0
- mirascope/api/_generated/tags/client.py +504 -0
- mirascope/api/_generated/tags/raw_client.py +1288 -0
- mirascope/api/_generated/tags/types/__init__.py +17 -0
- mirascope/api/_generated/tags/types/tags_create_response.py +41 -0
- mirascope/api/_generated/tags/types/tags_get_response.py +41 -0
- mirascope/api/_generated/tags/types/tags_list_response.py +23 -0
- mirascope/api/_generated/tags/types/tags_list_response_tags_item.py +41 -0
- mirascope/api/_generated/tags/types/tags_update_response.py +41 -0
- mirascope/api/_generated/token_cost/__init__.py +7 -0
- mirascope/api/_generated/token_cost/client.py +160 -0
- mirascope/api/_generated/token_cost/raw_client.py +264 -0
- mirascope/api/_generated/token_cost/types/__init__.py +8 -0
- mirascope/api/_generated/token_cost/types/token_cost_calculate_request_usage.py +54 -0
- mirascope/api/_generated/token_cost/types/token_cost_calculate_response.py +52 -0
- mirascope/api/_generated/traces/__init__.py +20 -0
- mirascope/api/_generated/traces/client.py +543 -0
- mirascope/api/_generated/traces/raw_client.py +1366 -96
- mirascope/api/_generated/traces/types/__init__.py +28 -0
- mirascope/api/_generated/traces/types/traces_get_analytics_summary_response.py +6 -0
- mirascope/api/_generated/traces/types/traces_get_trace_detail_by_env_response.py +33 -0
- mirascope/api/_generated/traces/types/traces_get_trace_detail_by_env_response_spans_item.py +88 -0
- mirascope/api/_generated/traces/types/traces_get_trace_detail_response_spans_item.py +0 -2
- mirascope/api/_generated/traces/types/traces_list_by_function_hash_response.py +25 -0
- mirascope/api/_generated/traces/types/traces_list_by_function_hash_response_traces_item.py +44 -0
- mirascope/api/_generated/traces/types/traces_search_by_env_request_attribute_filters_item.py +26 -0
- mirascope/api/_generated/traces/types/traces_search_by_env_request_attribute_filters_item_operator.py +7 -0
- mirascope/api/_generated/traces/types/traces_search_by_env_request_sort_by.py +7 -0
- mirascope/api/_generated/traces/types/traces_search_by_env_request_sort_order.py +7 -0
- mirascope/api/_generated/traces/types/traces_search_by_env_response.py +26 -0
- mirascope/api/_generated/traces/types/traces_search_by_env_response_spans_item.py +50 -0
- mirascope/api/_generated/traces/types/traces_search_response_spans_item.py +10 -1
- mirascope/api/_generated/types/__init__.py +32 -2
- mirascope/api/_generated/types/bad_request_error_body.py +50 -0
- mirascope/api/_generated/types/date.py +3 -0
- mirascope/api/_generated/types/immutable_resource_error.py +22 -0
- mirascope/api/_generated/types/internal_server_error_body.py +3 -3
- mirascope/api/_generated/types/plan_limit_exceeded_error.py +32 -0
- mirascope/api/_generated/types/plan_limit_exceeded_error_tag.py +7 -0
- mirascope/api/_generated/types/pricing_unavailable_error.py +23 -0
- mirascope/api/_generated/types/rate_limit_error.py +31 -0
- mirascope/api/_generated/types/rate_limit_error_tag.py +5 -0
- mirascope/api/_generated/types/service_unavailable_error_body.py +24 -0
- mirascope/api/_generated/types/service_unavailable_error_tag.py +7 -0
- mirascope/api/_generated/types/subscription_past_due_error.py +31 -0
- mirascope/api/_generated/types/subscription_past_due_error_tag.py +7 -0
- mirascope/api/settings.py +19 -1
- mirascope/llm/__init__.py +53 -10
- mirascope/llm/calls/__init__.py +2 -1
- mirascope/llm/calls/calls.py +29 -20
- mirascope/llm/calls/decorator.py +21 -7
- mirascope/llm/content/tool_output.py +22 -5
- mirascope/llm/exceptions.py +284 -71
- mirascope/llm/formatting/__init__.py +17 -0
- mirascope/llm/formatting/format.py +112 -35
- mirascope/llm/formatting/output_parser.py +178 -0
- mirascope/llm/formatting/partial.py +80 -7
- mirascope/llm/formatting/primitives.py +192 -0
- mirascope/llm/formatting/types.py +20 -8
- mirascope/llm/messages/__init__.py +3 -0
- mirascope/llm/messages/_utils.py +34 -0
- mirascope/llm/models/__init__.py +5 -0
- mirascope/llm/models/models.py +137 -69
- mirascope/llm/{providers/base → models}/params.py +7 -57
- mirascope/llm/models/thinking_config.py +61 -0
- mirascope/llm/prompts/_utils.py +0 -32
- mirascope/llm/prompts/decorator.py +16 -5
- mirascope/llm/prompts/prompts.py +160 -92
- mirascope/llm/providers/__init__.py +1 -4
- mirascope/llm/providers/anthropic/_utils/__init__.py +2 -0
- mirascope/llm/providers/anthropic/_utils/beta_decode.py +18 -9
- mirascope/llm/providers/anthropic/_utils/beta_encode.py +62 -13
- mirascope/llm/providers/anthropic/_utils/decode.py +18 -9
- mirascope/llm/providers/anthropic/_utils/encode.py +26 -7
- mirascope/llm/providers/anthropic/_utils/errors.py +2 -2
- mirascope/llm/providers/anthropic/beta_provider.py +64 -18
- mirascope/llm/providers/anthropic/provider.py +91 -33
- mirascope/llm/providers/base/__init__.py +0 -4
- mirascope/llm/providers/base/_utils.py +55 -6
- mirascope/llm/providers/base/base_provider.py +116 -37
- mirascope/llm/providers/google/_utils/__init__.py +2 -0
- mirascope/llm/providers/google/_utils/decode.py +20 -7
- mirascope/llm/providers/google/_utils/encode.py +26 -7
- mirascope/llm/providers/google/_utils/errors.py +3 -2
- mirascope/llm/providers/google/provider.py +64 -18
- mirascope/llm/providers/mirascope/_utils.py +13 -17
- mirascope/llm/providers/mirascope/provider.py +49 -18
- mirascope/llm/providers/mlx/_utils.py +7 -2
- mirascope/llm/providers/mlx/encoding/base.py +5 -2
- mirascope/llm/providers/mlx/encoding/transformers.py +5 -2
- mirascope/llm/providers/mlx/mlx.py +23 -6
- mirascope/llm/providers/mlx/provider.py +42 -13
- mirascope/llm/providers/openai/_utils/errors.py +2 -2
- mirascope/llm/providers/openai/completions/_utils/encode.py +20 -16
- mirascope/llm/providers/openai/completions/base_provider.py +40 -11
- mirascope/llm/providers/openai/provider.py +40 -10
- mirascope/llm/providers/openai/responses/_utils/__init__.py +2 -0
- mirascope/llm/providers/openai/responses/_utils/decode.py +19 -6
- mirascope/llm/providers/openai/responses/_utils/encode.py +22 -10
- mirascope/llm/providers/openai/responses/provider.py +56 -18
- mirascope/llm/providers/provider_registry.py +93 -19
- mirascope/llm/responses/__init__.py +6 -1
- mirascope/llm/responses/_utils.py +102 -12
- mirascope/llm/responses/base_response.py +5 -2
- mirascope/llm/responses/base_stream_response.py +115 -25
- mirascope/llm/responses/response.py +2 -1
- mirascope/llm/responses/root_response.py +89 -17
- mirascope/llm/responses/stream_response.py +6 -9
- mirascope/llm/tools/decorator.py +9 -4
- mirascope/llm/tools/tool_schema.py +17 -6
- mirascope/llm/tools/toolkit.py +35 -27
- mirascope/llm/tools/tools.py +45 -20
- mirascope/ops/__init__.py +4 -0
- mirascope/ops/_internal/closure.py +4 -1
- mirascope/ops/_internal/configuration.py +82 -31
- mirascope/ops/_internal/exporters/exporters.py +55 -35
- mirascope/ops/_internal/exporters/utils.py +37 -0
- mirascope/ops/_internal/instrumentation/llm/common.py +530 -0
- mirascope/ops/_internal/instrumentation/llm/cost.py +190 -0
- mirascope/ops/_internal/instrumentation/llm/encode.py +1 -1
- mirascope/ops/_internal/instrumentation/llm/llm.py +116 -1242
- mirascope/ops/_internal/instrumentation/llm/model.py +1798 -0
- mirascope/ops/_internal/instrumentation/llm/response.py +521 -0
- mirascope/ops/_internal/instrumentation/llm/serialize.py +300 -0
- mirascope/ops/_internal/protocols.py +83 -1
- mirascope/ops/_internal/traced_calls.py +18 -0
- mirascope/ops/_internal/traced_functions.py +125 -10
- mirascope/ops/_internal/tracing.py +78 -1
- mirascope/ops/_internal/utils.py +60 -4
- mirascope/ops/_internal/versioned_functions.py +1 -1
- {mirascope-2.0.0a6.dist-info → mirascope-2.0.2.dist-info}/METADATA +12 -11
- mirascope-2.0.2.dist-info/RECORD +424 -0
- {mirascope-2.0.0a6.dist-info → mirascope-2.0.2.dist-info}/licenses/LICENSE +1 -1
- mirascope-2.0.0a6.dist-info/RECORD +0 -316
- {mirascope-2.0.0a6.dist-info → mirascope-2.0.2.dist-info}/WHEEL +0 -0
|
@@ -14,10 +14,13 @@ from ..errors.conflict_error import ConflictError
|
|
|
14
14
|
from ..errors.forbidden_error import ForbiddenError
|
|
15
15
|
from ..errors.internal_server_error import InternalServerError
|
|
16
16
|
from ..errors.not_found_error import NotFoundError
|
|
17
|
-
from ..
|
|
18
|
-
from ..
|
|
17
|
+
from ..errors.payment_required_error import PaymentRequiredError
|
|
18
|
+
from ..errors.service_unavailable_error import ServiceUnavailableError
|
|
19
|
+
from ..errors.too_many_requests_error import TooManyRequestsError
|
|
19
20
|
from ..types.not_found_error_body import NotFoundErrorBody
|
|
20
21
|
from ..types.permission_denied_error import PermissionDeniedError
|
|
22
|
+
from ..types.plan_limit_exceeded_error import PlanLimitExceededError
|
|
23
|
+
from ..types.rate_limit_error import RateLimitError
|
|
21
24
|
from .types.projects_create_response import ProjectsCreateResponse
|
|
22
25
|
from .types.projects_get_response import ProjectsGetResponse
|
|
23
26
|
from .types.projects_list_response_item import ProjectsListResponseItem
|
|
@@ -32,7 +35,10 @@ class RawProjectsClient:
|
|
|
32
35
|
self._client_wrapper = client_wrapper
|
|
33
36
|
|
|
34
37
|
def list(
|
|
35
|
-
self,
|
|
38
|
+
self,
|
|
39
|
+
organization_id: str,
|
|
40
|
+
*,
|
|
41
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
36
42
|
) -> HttpResponse[typing.List[ProjectsListResponseItem]]:
|
|
37
43
|
"""
|
|
38
44
|
Parameters
|
|
@@ -66,9 +72,9 @@ class RawProjectsClient:
|
|
|
66
72
|
raise BadRequestError(
|
|
67
73
|
headers=dict(_response.headers),
|
|
68
74
|
body=typing.cast(
|
|
69
|
-
|
|
75
|
+
typing.Optional[typing.Any],
|
|
70
76
|
parse_obj_as(
|
|
71
|
-
type_=
|
|
77
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
72
78
|
object_=_response.json(),
|
|
73
79
|
),
|
|
74
80
|
),
|
|
@@ -95,6 +101,17 @@ class RawProjectsClient:
|
|
|
95
101
|
),
|
|
96
102
|
),
|
|
97
103
|
)
|
|
104
|
+
if _response.status_code == 429:
|
|
105
|
+
raise TooManyRequestsError(
|
|
106
|
+
headers=dict(_response.headers),
|
|
107
|
+
body=typing.cast(
|
|
108
|
+
RateLimitError,
|
|
109
|
+
parse_obj_as(
|
|
110
|
+
type_=RateLimitError, # type: ignore
|
|
111
|
+
object_=_response.json(),
|
|
112
|
+
),
|
|
113
|
+
),
|
|
114
|
+
)
|
|
98
115
|
if _response.status_code == 500:
|
|
99
116
|
raise InternalServerError(
|
|
100
117
|
headers=dict(_response.headers),
|
|
@@ -106,13 +123,37 @@ class RawProjectsClient:
|
|
|
106
123
|
),
|
|
107
124
|
),
|
|
108
125
|
)
|
|
126
|
+
if _response.status_code == 503:
|
|
127
|
+
raise ServiceUnavailableError(
|
|
128
|
+
headers=dict(_response.headers),
|
|
129
|
+
body=typing.cast(
|
|
130
|
+
typing.Optional[typing.Any],
|
|
131
|
+
parse_obj_as(
|
|
132
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
133
|
+
object_=_response.json(),
|
|
134
|
+
),
|
|
135
|
+
),
|
|
136
|
+
)
|
|
109
137
|
_response_json = _response.json()
|
|
110
138
|
except JSONDecodeError:
|
|
111
|
-
raise ApiError(
|
|
112
|
-
|
|
139
|
+
raise ApiError(
|
|
140
|
+
status_code=_response.status_code,
|
|
141
|
+
headers=dict(_response.headers),
|
|
142
|
+
body=_response.text,
|
|
143
|
+
)
|
|
144
|
+
raise ApiError(
|
|
145
|
+
status_code=_response.status_code,
|
|
146
|
+
headers=dict(_response.headers),
|
|
147
|
+
body=_response_json,
|
|
148
|
+
)
|
|
113
149
|
|
|
114
150
|
def create(
|
|
115
|
-
self,
|
|
151
|
+
self,
|
|
152
|
+
organization_id: str,
|
|
153
|
+
*,
|
|
154
|
+
name: str,
|
|
155
|
+
slug: str,
|
|
156
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
116
157
|
) -> HttpResponse[ProjectsCreateResponse]:
|
|
117
158
|
"""
|
|
118
159
|
Parameters
|
|
@@ -160,9 +201,20 @@ class RawProjectsClient:
|
|
|
160
201
|
raise BadRequestError(
|
|
161
202
|
headers=dict(_response.headers),
|
|
162
203
|
body=typing.cast(
|
|
163
|
-
|
|
204
|
+
typing.Optional[typing.Any],
|
|
205
|
+
parse_obj_as(
|
|
206
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
207
|
+
object_=_response.json(),
|
|
208
|
+
),
|
|
209
|
+
),
|
|
210
|
+
)
|
|
211
|
+
if _response.status_code == 402:
|
|
212
|
+
raise PaymentRequiredError(
|
|
213
|
+
headers=dict(_response.headers),
|
|
214
|
+
body=typing.cast(
|
|
215
|
+
PlanLimitExceededError,
|
|
164
216
|
parse_obj_as(
|
|
165
|
-
type_=
|
|
217
|
+
type_=PlanLimitExceededError, # type: ignore
|
|
166
218
|
object_=_response.json(),
|
|
167
219
|
),
|
|
168
220
|
),
|
|
@@ -193,9 +245,20 @@ class RawProjectsClient:
|
|
|
193
245
|
raise ConflictError(
|
|
194
246
|
headers=dict(_response.headers),
|
|
195
247
|
body=typing.cast(
|
|
196
|
-
|
|
248
|
+
typing.Optional[typing.Any],
|
|
249
|
+
parse_obj_as(
|
|
250
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
251
|
+
object_=_response.json(),
|
|
252
|
+
),
|
|
253
|
+
),
|
|
254
|
+
)
|
|
255
|
+
if _response.status_code == 429:
|
|
256
|
+
raise TooManyRequestsError(
|
|
257
|
+
headers=dict(_response.headers),
|
|
258
|
+
body=typing.cast(
|
|
259
|
+
RateLimitError,
|
|
197
260
|
parse_obj_as(
|
|
198
|
-
type_=
|
|
261
|
+
type_=RateLimitError, # type: ignore
|
|
199
262
|
object_=_response.json(),
|
|
200
263
|
),
|
|
201
264
|
),
|
|
@@ -211,13 +274,36 @@ class RawProjectsClient:
|
|
|
211
274
|
),
|
|
212
275
|
),
|
|
213
276
|
)
|
|
277
|
+
if _response.status_code == 503:
|
|
278
|
+
raise ServiceUnavailableError(
|
|
279
|
+
headers=dict(_response.headers),
|
|
280
|
+
body=typing.cast(
|
|
281
|
+
typing.Optional[typing.Any],
|
|
282
|
+
parse_obj_as(
|
|
283
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
284
|
+
object_=_response.json(),
|
|
285
|
+
),
|
|
286
|
+
),
|
|
287
|
+
)
|
|
214
288
|
_response_json = _response.json()
|
|
215
289
|
except JSONDecodeError:
|
|
216
|
-
raise ApiError(
|
|
217
|
-
|
|
290
|
+
raise ApiError(
|
|
291
|
+
status_code=_response.status_code,
|
|
292
|
+
headers=dict(_response.headers),
|
|
293
|
+
body=_response.text,
|
|
294
|
+
)
|
|
295
|
+
raise ApiError(
|
|
296
|
+
status_code=_response.status_code,
|
|
297
|
+
headers=dict(_response.headers),
|
|
298
|
+
body=_response_json,
|
|
299
|
+
)
|
|
218
300
|
|
|
219
301
|
def get(
|
|
220
|
-
self,
|
|
302
|
+
self,
|
|
303
|
+
organization_id: str,
|
|
304
|
+
project_id: str,
|
|
305
|
+
*,
|
|
306
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
221
307
|
) -> HttpResponse[ProjectsGetResponse]:
|
|
222
308
|
"""
|
|
223
309
|
Parameters
|
|
@@ -253,9 +339,9 @@ class RawProjectsClient:
|
|
|
253
339
|
raise BadRequestError(
|
|
254
340
|
headers=dict(_response.headers),
|
|
255
341
|
body=typing.cast(
|
|
256
|
-
|
|
342
|
+
typing.Optional[typing.Any],
|
|
257
343
|
parse_obj_as(
|
|
258
|
-
type_=
|
|
344
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
259
345
|
object_=_response.json(),
|
|
260
346
|
),
|
|
261
347
|
),
|
|
@@ -282,6 +368,17 @@ class RawProjectsClient:
|
|
|
282
368
|
),
|
|
283
369
|
),
|
|
284
370
|
)
|
|
371
|
+
if _response.status_code == 429:
|
|
372
|
+
raise TooManyRequestsError(
|
|
373
|
+
headers=dict(_response.headers),
|
|
374
|
+
body=typing.cast(
|
|
375
|
+
RateLimitError,
|
|
376
|
+
parse_obj_as(
|
|
377
|
+
type_=RateLimitError, # type: ignore
|
|
378
|
+
object_=_response.json(),
|
|
379
|
+
),
|
|
380
|
+
),
|
|
381
|
+
)
|
|
285
382
|
if _response.status_code == 500:
|
|
286
383
|
raise InternalServerError(
|
|
287
384
|
headers=dict(_response.headers),
|
|
@@ -293,10 +390,29 @@ class RawProjectsClient:
|
|
|
293
390
|
),
|
|
294
391
|
),
|
|
295
392
|
)
|
|
393
|
+
if _response.status_code == 503:
|
|
394
|
+
raise ServiceUnavailableError(
|
|
395
|
+
headers=dict(_response.headers),
|
|
396
|
+
body=typing.cast(
|
|
397
|
+
typing.Optional[typing.Any],
|
|
398
|
+
parse_obj_as(
|
|
399
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
400
|
+
object_=_response.json(),
|
|
401
|
+
),
|
|
402
|
+
),
|
|
403
|
+
)
|
|
296
404
|
_response_json = _response.json()
|
|
297
405
|
except JSONDecodeError:
|
|
298
|
-
raise ApiError(
|
|
299
|
-
|
|
406
|
+
raise ApiError(
|
|
407
|
+
status_code=_response.status_code,
|
|
408
|
+
headers=dict(_response.headers),
|
|
409
|
+
body=_response.text,
|
|
410
|
+
)
|
|
411
|
+
raise ApiError(
|
|
412
|
+
status_code=_response.status_code,
|
|
413
|
+
headers=dict(_response.headers),
|
|
414
|
+
body=_response_json,
|
|
415
|
+
)
|
|
300
416
|
|
|
301
417
|
def update(
|
|
302
418
|
self,
|
|
@@ -355,9 +471,9 @@ class RawProjectsClient:
|
|
|
355
471
|
raise BadRequestError(
|
|
356
472
|
headers=dict(_response.headers),
|
|
357
473
|
body=typing.cast(
|
|
358
|
-
|
|
474
|
+
typing.Optional[typing.Any],
|
|
359
475
|
parse_obj_as(
|
|
360
|
-
type_=
|
|
476
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
361
477
|
object_=_response.json(),
|
|
362
478
|
),
|
|
363
479
|
),
|
|
@@ -388,9 +504,20 @@ class RawProjectsClient:
|
|
|
388
504
|
raise ConflictError(
|
|
389
505
|
headers=dict(_response.headers),
|
|
390
506
|
body=typing.cast(
|
|
391
|
-
|
|
507
|
+
typing.Optional[typing.Any],
|
|
392
508
|
parse_obj_as(
|
|
393
|
-
type_=
|
|
509
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
510
|
+
object_=_response.json(),
|
|
511
|
+
),
|
|
512
|
+
),
|
|
513
|
+
)
|
|
514
|
+
if _response.status_code == 429:
|
|
515
|
+
raise TooManyRequestsError(
|
|
516
|
+
headers=dict(_response.headers),
|
|
517
|
+
body=typing.cast(
|
|
518
|
+
RateLimitError,
|
|
519
|
+
parse_obj_as(
|
|
520
|
+
type_=RateLimitError, # type: ignore
|
|
394
521
|
object_=_response.json(),
|
|
395
522
|
),
|
|
396
523
|
),
|
|
@@ -406,13 +533,36 @@ class RawProjectsClient:
|
|
|
406
533
|
),
|
|
407
534
|
),
|
|
408
535
|
)
|
|
536
|
+
if _response.status_code == 503:
|
|
537
|
+
raise ServiceUnavailableError(
|
|
538
|
+
headers=dict(_response.headers),
|
|
539
|
+
body=typing.cast(
|
|
540
|
+
typing.Optional[typing.Any],
|
|
541
|
+
parse_obj_as(
|
|
542
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
543
|
+
object_=_response.json(),
|
|
544
|
+
),
|
|
545
|
+
),
|
|
546
|
+
)
|
|
409
547
|
_response_json = _response.json()
|
|
410
548
|
except JSONDecodeError:
|
|
411
|
-
raise ApiError(
|
|
412
|
-
|
|
549
|
+
raise ApiError(
|
|
550
|
+
status_code=_response.status_code,
|
|
551
|
+
headers=dict(_response.headers),
|
|
552
|
+
body=_response.text,
|
|
553
|
+
)
|
|
554
|
+
raise ApiError(
|
|
555
|
+
status_code=_response.status_code,
|
|
556
|
+
headers=dict(_response.headers),
|
|
557
|
+
body=_response_json,
|
|
558
|
+
)
|
|
413
559
|
|
|
414
560
|
def delete(
|
|
415
|
-
self,
|
|
561
|
+
self,
|
|
562
|
+
organization_id: str,
|
|
563
|
+
project_id: str,
|
|
564
|
+
*,
|
|
565
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
416
566
|
) -> HttpResponse[None]:
|
|
417
567
|
"""
|
|
418
568
|
Parameters
|
|
@@ -440,9 +590,9 @@ class RawProjectsClient:
|
|
|
440
590
|
raise BadRequestError(
|
|
441
591
|
headers=dict(_response.headers),
|
|
442
592
|
body=typing.cast(
|
|
443
|
-
|
|
593
|
+
typing.Optional[typing.Any],
|
|
444
594
|
parse_obj_as(
|
|
445
|
-
type_=
|
|
595
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
446
596
|
object_=_response.json(),
|
|
447
597
|
),
|
|
448
598
|
),
|
|
@@ -469,6 +619,17 @@ class RawProjectsClient:
|
|
|
469
619
|
),
|
|
470
620
|
),
|
|
471
621
|
)
|
|
622
|
+
if _response.status_code == 429:
|
|
623
|
+
raise TooManyRequestsError(
|
|
624
|
+
headers=dict(_response.headers),
|
|
625
|
+
body=typing.cast(
|
|
626
|
+
RateLimitError,
|
|
627
|
+
parse_obj_as(
|
|
628
|
+
type_=RateLimitError, # type: ignore
|
|
629
|
+
object_=_response.json(),
|
|
630
|
+
),
|
|
631
|
+
),
|
|
632
|
+
)
|
|
472
633
|
if _response.status_code == 500:
|
|
473
634
|
raise InternalServerError(
|
|
474
635
|
headers=dict(_response.headers),
|
|
@@ -480,10 +641,29 @@ class RawProjectsClient:
|
|
|
480
641
|
),
|
|
481
642
|
),
|
|
482
643
|
)
|
|
644
|
+
if _response.status_code == 503:
|
|
645
|
+
raise ServiceUnavailableError(
|
|
646
|
+
headers=dict(_response.headers),
|
|
647
|
+
body=typing.cast(
|
|
648
|
+
typing.Optional[typing.Any],
|
|
649
|
+
parse_obj_as(
|
|
650
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
651
|
+
object_=_response.json(),
|
|
652
|
+
),
|
|
653
|
+
),
|
|
654
|
+
)
|
|
483
655
|
_response_json = _response.json()
|
|
484
656
|
except JSONDecodeError:
|
|
485
|
-
raise ApiError(
|
|
486
|
-
|
|
657
|
+
raise ApiError(
|
|
658
|
+
status_code=_response.status_code,
|
|
659
|
+
headers=dict(_response.headers),
|
|
660
|
+
body=_response.text,
|
|
661
|
+
)
|
|
662
|
+
raise ApiError(
|
|
663
|
+
status_code=_response.status_code,
|
|
664
|
+
headers=dict(_response.headers),
|
|
665
|
+
body=_response_json,
|
|
666
|
+
)
|
|
487
667
|
|
|
488
668
|
|
|
489
669
|
class AsyncRawProjectsClient:
|
|
@@ -491,7 +671,10 @@ class AsyncRawProjectsClient:
|
|
|
491
671
|
self._client_wrapper = client_wrapper
|
|
492
672
|
|
|
493
673
|
async def list(
|
|
494
|
-
self,
|
|
674
|
+
self,
|
|
675
|
+
organization_id: str,
|
|
676
|
+
*,
|
|
677
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
495
678
|
) -> AsyncHttpResponse[typing.List[ProjectsListResponseItem]]:
|
|
496
679
|
"""
|
|
497
680
|
Parameters
|
|
@@ -525,9 +708,9 @@ class AsyncRawProjectsClient:
|
|
|
525
708
|
raise BadRequestError(
|
|
526
709
|
headers=dict(_response.headers),
|
|
527
710
|
body=typing.cast(
|
|
528
|
-
|
|
711
|
+
typing.Optional[typing.Any],
|
|
529
712
|
parse_obj_as(
|
|
530
|
-
type_=
|
|
713
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
531
714
|
object_=_response.json(),
|
|
532
715
|
),
|
|
533
716
|
),
|
|
@@ -554,6 +737,17 @@ class AsyncRawProjectsClient:
|
|
|
554
737
|
),
|
|
555
738
|
),
|
|
556
739
|
)
|
|
740
|
+
if _response.status_code == 429:
|
|
741
|
+
raise TooManyRequestsError(
|
|
742
|
+
headers=dict(_response.headers),
|
|
743
|
+
body=typing.cast(
|
|
744
|
+
RateLimitError,
|
|
745
|
+
parse_obj_as(
|
|
746
|
+
type_=RateLimitError, # type: ignore
|
|
747
|
+
object_=_response.json(),
|
|
748
|
+
),
|
|
749
|
+
),
|
|
750
|
+
)
|
|
557
751
|
if _response.status_code == 500:
|
|
558
752
|
raise InternalServerError(
|
|
559
753
|
headers=dict(_response.headers),
|
|
@@ -565,13 +759,37 @@ class AsyncRawProjectsClient:
|
|
|
565
759
|
),
|
|
566
760
|
),
|
|
567
761
|
)
|
|
762
|
+
if _response.status_code == 503:
|
|
763
|
+
raise ServiceUnavailableError(
|
|
764
|
+
headers=dict(_response.headers),
|
|
765
|
+
body=typing.cast(
|
|
766
|
+
typing.Optional[typing.Any],
|
|
767
|
+
parse_obj_as(
|
|
768
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
769
|
+
object_=_response.json(),
|
|
770
|
+
),
|
|
771
|
+
),
|
|
772
|
+
)
|
|
568
773
|
_response_json = _response.json()
|
|
569
774
|
except JSONDecodeError:
|
|
570
|
-
raise ApiError(
|
|
571
|
-
|
|
775
|
+
raise ApiError(
|
|
776
|
+
status_code=_response.status_code,
|
|
777
|
+
headers=dict(_response.headers),
|
|
778
|
+
body=_response.text,
|
|
779
|
+
)
|
|
780
|
+
raise ApiError(
|
|
781
|
+
status_code=_response.status_code,
|
|
782
|
+
headers=dict(_response.headers),
|
|
783
|
+
body=_response_json,
|
|
784
|
+
)
|
|
572
785
|
|
|
573
786
|
async def create(
|
|
574
|
-
self,
|
|
787
|
+
self,
|
|
788
|
+
organization_id: str,
|
|
789
|
+
*,
|
|
790
|
+
name: str,
|
|
791
|
+
slug: str,
|
|
792
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
575
793
|
) -> AsyncHttpResponse[ProjectsCreateResponse]:
|
|
576
794
|
"""
|
|
577
795
|
Parameters
|
|
@@ -619,9 +837,20 @@ class AsyncRawProjectsClient:
|
|
|
619
837
|
raise BadRequestError(
|
|
620
838
|
headers=dict(_response.headers),
|
|
621
839
|
body=typing.cast(
|
|
622
|
-
|
|
840
|
+
typing.Optional[typing.Any],
|
|
841
|
+
parse_obj_as(
|
|
842
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
843
|
+
object_=_response.json(),
|
|
844
|
+
),
|
|
845
|
+
),
|
|
846
|
+
)
|
|
847
|
+
if _response.status_code == 402:
|
|
848
|
+
raise PaymentRequiredError(
|
|
849
|
+
headers=dict(_response.headers),
|
|
850
|
+
body=typing.cast(
|
|
851
|
+
PlanLimitExceededError,
|
|
623
852
|
parse_obj_as(
|
|
624
|
-
type_=
|
|
853
|
+
type_=PlanLimitExceededError, # type: ignore
|
|
625
854
|
object_=_response.json(),
|
|
626
855
|
),
|
|
627
856
|
),
|
|
@@ -652,9 +881,20 @@ class AsyncRawProjectsClient:
|
|
|
652
881
|
raise ConflictError(
|
|
653
882
|
headers=dict(_response.headers),
|
|
654
883
|
body=typing.cast(
|
|
655
|
-
|
|
884
|
+
typing.Optional[typing.Any],
|
|
885
|
+
parse_obj_as(
|
|
886
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
887
|
+
object_=_response.json(),
|
|
888
|
+
),
|
|
889
|
+
),
|
|
890
|
+
)
|
|
891
|
+
if _response.status_code == 429:
|
|
892
|
+
raise TooManyRequestsError(
|
|
893
|
+
headers=dict(_response.headers),
|
|
894
|
+
body=typing.cast(
|
|
895
|
+
RateLimitError,
|
|
656
896
|
parse_obj_as(
|
|
657
|
-
type_=
|
|
897
|
+
type_=RateLimitError, # type: ignore
|
|
658
898
|
object_=_response.json(),
|
|
659
899
|
),
|
|
660
900
|
),
|
|
@@ -670,13 +910,36 @@ class AsyncRawProjectsClient:
|
|
|
670
910
|
),
|
|
671
911
|
),
|
|
672
912
|
)
|
|
913
|
+
if _response.status_code == 503:
|
|
914
|
+
raise ServiceUnavailableError(
|
|
915
|
+
headers=dict(_response.headers),
|
|
916
|
+
body=typing.cast(
|
|
917
|
+
typing.Optional[typing.Any],
|
|
918
|
+
parse_obj_as(
|
|
919
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
920
|
+
object_=_response.json(),
|
|
921
|
+
),
|
|
922
|
+
),
|
|
923
|
+
)
|
|
673
924
|
_response_json = _response.json()
|
|
674
925
|
except JSONDecodeError:
|
|
675
|
-
raise ApiError(
|
|
676
|
-
|
|
926
|
+
raise ApiError(
|
|
927
|
+
status_code=_response.status_code,
|
|
928
|
+
headers=dict(_response.headers),
|
|
929
|
+
body=_response.text,
|
|
930
|
+
)
|
|
931
|
+
raise ApiError(
|
|
932
|
+
status_code=_response.status_code,
|
|
933
|
+
headers=dict(_response.headers),
|
|
934
|
+
body=_response_json,
|
|
935
|
+
)
|
|
677
936
|
|
|
678
937
|
async def get(
|
|
679
|
-
self,
|
|
938
|
+
self,
|
|
939
|
+
organization_id: str,
|
|
940
|
+
project_id: str,
|
|
941
|
+
*,
|
|
942
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
680
943
|
) -> AsyncHttpResponse[ProjectsGetResponse]:
|
|
681
944
|
"""
|
|
682
945
|
Parameters
|
|
@@ -712,9 +975,9 @@ class AsyncRawProjectsClient:
|
|
|
712
975
|
raise BadRequestError(
|
|
713
976
|
headers=dict(_response.headers),
|
|
714
977
|
body=typing.cast(
|
|
715
|
-
|
|
978
|
+
typing.Optional[typing.Any],
|
|
716
979
|
parse_obj_as(
|
|
717
|
-
type_=
|
|
980
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
718
981
|
object_=_response.json(),
|
|
719
982
|
),
|
|
720
983
|
),
|
|
@@ -741,6 +1004,17 @@ class AsyncRawProjectsClient:
|
|
|
741
1004
|
),
|
|
742
1005
|
),
|
|
743
1006
|
)
|
|
1007
|
+
if _response.status_code == 429:
|
|
1008
|
+
raise TooManyRequestsError(
|
|
1009
|
+
headers=dict(_response.headers),
|
|
1010
|
+
body=typing.cast(
|
|
1011
|
+
RateLimitError,
|
|
1012
|
+
parse_obj_as(
|
|
1013
|
+
type_=RateLimitError, # type: ignore
|
|
1014
|
+
object_=_response.json(),
|
|
1015
|
+
),
|
|
1016
|
+
),
|
|
1017
|
+
)
|
|
744
1018
|
if _response.status_code == 500:
|
|
745
1019
|
raise InternalServerError(
|
|
746
1020
|
headers=dict(_response.headers),
|
|
@@ -752,10 +1026,29 @@ class AsyncRawProjectsClient:
|
|
|
752
1026
|
),
|
|
753
1027
|
),
|
|
754
1028
|
)
|
|
1029
|
+
if _response.status_code == 503:
|
|
1030
|
+
raise ServiceUnavailableError(
|
|
1031
|
+
headers=dict(_response.headers),
|
|
1032
|
+
body=typing.cast(
|
|
1033
|
+
typing.Optional[typing.Any],
|
|
1034
|
+
parse_obj_as(
|
|
1035
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1036
|
+
object_=_response.json(),
|
|
1037
|
+
),
|
|
1038
|
+
),
|
|
1039
|
+
)
|
|
755
1040
|
_response_json = _response.json()
|
|
756
1041
|
except JSONDecodeError:
|
|
757
|
-
raise ApiError(
|
|
758
|
-
|
|
1042
|
+
raise ApiError(
|
|
1043
|
+
status_code=_response.status_code,
|
|
1044
|
+
headers=dict(_response.headers),
|
|
1045
|
+
body=_response.text,
|
|
1046
|
+
)
|
|
1047
|
+
raise ApiError(
|
|
1048
|
+
status_code=_response.status_code,
|
|
1049
|
+
headers=dict(_response.headers),
|
|
1050
|
+
body=_response_json,
|
|
1051
|
+
)
|
|
759
1052
|
|
|
760
1053
|
async def update(
|
|
761
1054
|
self,
|
|
@@ -814,9 +1107,9 @@ class AsyncRawProjectsClient:
|
|
|
814
1107
|
raise BadRequestError(
|
|
815
1108
|
headers=dict(_response.headers),
|
|
816
1109
|
body=typing.cast(
|
|
817
|
-
|
|
1110
|
+
typing.Optional[typing.Any],
|
|
818
1111
|
parse_obj_as(
|
|
819
|
-
type_=
|
|
1112
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
820
1113
|
object_=_response.json(),
|
|
821
1114
|
),
|
|
822
1115
|
),
|
|
@@ -847,9 +1140,20 @@ class AsyncRawProjectsClient:
|
|
|
847
1140
|
raise ConflictError(
|
|
848
1141
|
headers=dict(_response.headers),
|
|
849
1142
|
body=typing.cast(
|
|
850
|
-
|
|
1143
|
+
typing.Optional[typing.Any],
|
|
851
1144
|
parse_obj_as(
|
|
852
|
-
type_=
|
|
1145
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1146
|
+
object_=_response.json(),
|
|
1147
|
+
),
|
|
1148
|
+
),
|
|
1149
|
+
)
|
|
1150
|
+
if _response.status_code == 429:
|
|
1151
|
+
raise TooManyRequestsError(
|
|
1152
|
+
headers=dict(_response.headers),
|
|
1153
|
+
body=typing.cast(
|
|
1154
|
+
RateLimitError,
|
|
1155
|
+
parse_obj_as(
|
|
1156
|
+
type_=RateLimitError, # type: ignore
|
|
853
1157
|
object_=_response.json(),
|
|
854
1158
|
),
|
|
855
1159
|
),
|
|
@@ -865,13 +1169,36 @@ class AsyncRawProjectsClient:
|
|
|
865
1169
|
),
|
|
866
1170
|
),
|
|
867
1171
|
)
|
|
1172
|
+
if _response.status_code == 503:
|
|
1173
|
+
raise ServiceUnavailableError(
|
|
1174
|
+
headers=dict(_response.headers),
|
|
1175
|
+
body=typing.cast(
|
|
1176
|
+
typing.Optional[typing.Any],
|
|
1177
|
+
parse_obj_as(
|
|
1178
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1179
|
+
object_=_response.json(),
|
|
1180
|
+
),
|
|
1181
|
+
),
|
|
1182
|
+
)
|
|
868
1183
|
_response_json = _response.json()
|
|
869
1184
|
except JSONDecodeError:
|
|
870
|
-
raise ApiError(
|
|
871
|
-
|
|
1185
|
+
raise ApiError(
|
|
1186
|
+
status_code=_response.status_code,
|
|
1187
|
+
headers=dict(_response.headers),
|
|
1188
|
+
body=_response.text,
|
|
1189
|
+
)
|
|
1190
|
+
raise ApiError(
|
|
1191
|
+
status_code=_response.status_code,
|
|
1192
|
+
headers=dict(_response.headers),
|
|
1193
|
+
body=_response_json,
|
|
1194
|
+
)
|
|
872
1195
|
|
|
873
1196
|
async def delete(
|
|
874
|
-
self,
|
|
1197
|
+
self,
|
|
1198
|
+
organization_id: str,
|
|
1199
|
+
project_id: str,
|
|
1200
|
+
*,
|
|
1201
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
875
1202
|
) -> AsyncHttpResponse[None]:
|
|
876
1203
|
"""
|
|
877
1204
|
Parameters
|
|
@@ -899,9 +1226,9 @@ class AsyncRawProjectsClient:
|
|
|
899
1226
|
raise BadRequestError(
|
|
900
1227
|
headers=dict(_response.headers),
|
|
901
1228
|
body=typing.cast(
|
|
902
|
-
|
|
1229
|
+
typing.Optional[typing.Any],
|
|
903
1230
|
parse_obj_as(
|
|
904
|
-
type_=
|
|
1231
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
905
1232
|
object_=_response.json(),
|
|
906
1233
|
),
|
|
907
1234
|
),
|
|
@@ -928,6 +1255,17 @@ class AsyncRawProjectsClient:
|
|
|
928
1255
|
),
|
|
929
1256
|
),
|
|
930
1257
|
)
|
|
1258
|
+
if _response.status_code == 429:
|
|
1259
|
+
raise TooManyRequestsError(
|
|
1260
|
+
headers=dict(_response.headers),
|
|
1261
|
+
body=typing.cast(
|
|
1262
|
+
RateLimitError,
|
|
1263
|
+
parse_obj_as(
|
|
1264
|
+
type_=RateLimitError, # type: ignore
|
|
1265
|
+
object_=_response.json(),
|
|
1266
|
+
),
|
|
1267
|
+
),
|
|
1268
|
+
)
|
|
931
1269
|
if _response.status_code == 500:
|
|
932
1270
|
raise InternalServerError(
|
|
933
1271
|
headers=dict(_response.headers),
|
|
@@ -939,7 +1277,26 @@ class AsyncRawProjectsClient:
|
|
|
939
1277
|
),
|
|
940
1278
|
),
|
|
941
1279
|
)
|
|
1280
|
+
if _response.status_code == 503:
|
|
1281
|
+
raise ServiceUnavailableError(
|
|
1282
|
+
headers=dict(_response.headers),
|
|
1283
|
+
body=typing.cast(
|
|
1284
|
+
typing.Optional[typing.Any],
|
|
1285
|
+
parse_obj_as(
|
|
1286
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1287
|
+
object_=_response.json(),
|
|
1288
|
+
),
|
|
1289
|
+
),
|
|
1290
|
+
)
|
|
942
1291
|
_response_json = _response.json()
|
|
943
1292
|
except JSONDecodeError:
|
|
944
|
-
raise ApiError(
|
|
945
|
-
|
|
1293
|
+
raise ApiError(
|
|
1294
|
+
status_code=_response.status_code,
|
|
1295
|
+
headers=dict(_response.headers),
|
|
1296
|
+
body=_response.text,
|
|
1297
|
+
)
|
|
1298
|
+
raise ApiError(
|
|
1299
|
+
status_code=_response.status_code,
|
|
1300
|
+
headers=dict(_response.headers),
|
|
1301
|
+
body=_response_json,
|
|
1302
|
+
)
|