mirascope 2.0.0a6__py3-none-any.whl → 2.0.1__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/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 +3 -1
- 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 +131 -68
- 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 +12 -6
- mirascope/llm/tools/toolkit.py +35 -27
- mirascope/llm/tools/tools.py +45 -20
- mirascope/ops/__init__.py +4 -0
- mirascope/ops/_internal/configuration.py +82 -31
- mirascope/ops/_internal/exporters/exporters.py +64 -11
- 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 +4 -0
- mirascope/ops/_internal/traced_functions.py +118 -8
- mirascope/ops/_internal/tracing.py +78 -1
- mirascope/ops/_internal/utils.py +52 -4
- {mirascope-2.0.0a6.dist-info → mirascope-2.0.1.dist-info}/METADATA +12 -11
- mirascope-2.0.1.dist-info/RECORD +423 -0
- {mirascope-2.0.0a6.dist-info → mirascope-2.0.1.dist-info}/licenses/LICENSE +1 -1
- mirascope-2.0.0a6.dist-info/RECORD +0 -316
- {mirascope-2.0.0a6.dist-info → mirascope-2.0.1.dist-info}/WHEEL +0 -0
|
@@ -5,11 +5,29 @@ import typing
|
|
|
5
5
|
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
6
|
from ..core.request_options import RequestOptions
|
|
7
7
|
from .raw_client import AsyncRawOrganizationsClient, RawOrganizationsClient
|
|
8
|
+
from .types.organizations_create_payment_intent_response import (
|
|
9
|
+
OrganizationsCreatePaymentIntentResponse,
|
|
10
|
+
)
|
|
8
11
|
from .types.organizations_create_response import OrganizationsCreateResponse
|
|
9
|
-
from .types.organizations_credits_response import OrganizationsCreditsResponse
|
|
10
12
|
from .types.organizations_get_response import OrganizationsGetResponse
|
|
11
13
|
from .types.organizations_list_response_item import OrganizationsListResponseItem
|
|
14
|
+
from .types.organizations_preview_subscription_change_request_target_plan import (
|
|
15
|
+
OrganizationsPreviewSubscriptionChangeRequestTargetPlan,
|
|
16
|
+
)
|
|
17
|
+
from .types.organizations_preview_subscription_change_response import (
|
|
18
|
+
OrganizationsPreviewSubscriptionChangeResponse,
|
|
19
|
+
)
|
|
20
|
+
from .types.organizations_router_balance_response import (
|
|
21
|
+
OrganizationsRouterBalanceResponse,
|
|
22
|
+
)
|
|
23
|
+
from .types.organizations_subscription_response import OrganizationsSubscriptionResponse
|
|
12
24
|
from .types.organizations_update_response import OrganizationsUpdateResponse
|
|
25
|
+
from .types.organizations_update_subscription_request_target_plan import (
|
|
26
|
+
OrganizationsUpdateSubscriptionRequestTargetPlan,
|
|
27
|
+
)
|
|
28
|
+
from .types.organizations_update_subscription_response import (
|
|
29
|
+
OrganizationsUpdateSubscriptionResponse,
|
|
30
|
+
)
|
|
13
31
|
|
|
14
32
|
# this is used as the default value for optional parameters
|
|
15
33
|
OMIT = typing.cast(typing.Any, ...)
|
|
@@ -55,7 +73,11 @@ class OrganizationsClient:
|
|
|
55
73
|
return _response.data
|
|
56
74
|
|
|
57
75
|
def create(
|
|
58
|
-
self,
|
|
76
|
+
self,
|
|
77
|
+
*,
|
|
78
|
+
name: str,
|
|
79
|
+
slug: str,
|
|
80
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
59
81
|
) -> OrganizationsCreateResponse:
|
|
60
82
|
"""
|
|
61
83
|
Parameters
|
|
@@ -84,10 +106,14 @@ class OrganizationsClient:
|
|
|
84
106
|
slug="slug",
|
|
85
107
|
)
|
|
86
108
|
"""
|
|
87
|
-
_response = self._raw_client.create(
|
|
109
|
+
_response = self._raw_client.create(
|
|
110
|
+
name=name, slug=slug, request_options=request_options
|
|
111
|
+
)
|
|
88
112
|
return _response.data
|
|
89
113
|
|
|
90
|
-
def get(
|
|
114
|
+
def get(
|
|
115
|
+
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
116
|
+
) -> OrganizationsGetResponse:
|
|
91
117
|
"""
|
|
92
118
|
Parameters
|
|
93
119
|
----------
|
|
@@ -149,10 +175,14 @@ class OrganizationsClient:
|
|
|
149
175
|
id="id",
|
|
150
176
|
)
|
|
151
177
|
"""
|
|
152
|
-
_response = self._raw_client.update(
|
|
178
|
+
_response = self._raw_client.update(
|
|
179
|
+
id, name=name, slug=slug, request_options=request_options
|
|
180
|
+
)
|
|
153
181
|
return _response.data
|
|
154
182
|
|
|
155
|
-
def delete(
|
|
183
|
+
def delete(
|
|
184
|
+
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
185
|
+
) -> None:
|
|
156
186
|
"""
|
|
157
187
|
Parameters
|
|
158
188
|
----------
|
|
@@ -177,9 +207,75 @@ class OrganizationsClient:
|
|
|
177
207
|
_response = self._raw_client.delete(id, request_options=request_options)
|
|
178
208
|
return _response.data
|
|
179
209
|
|
|
180
|
-
def
|
|
210
|
+
def routerbalance(
|
|
211
|
+
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
212
|
+
) -> OrganizationsRouterBalanceResponse:
|
|
213
|
+
"""
|
|
214
|
+
Parameters
|
|
215
|
+
----------
|
|
216
|
+
id : str
|
|
217
|
+
|
|
218
|
+
request_options : typing.Optional[RequestOptions]
|
|
219
|
+
Request-specific configuration.
|
|
220
|
+
|
|
221
|
+
Returns
|
|
222
|
+
-------
|
|
223
|
+
OrganizationsRouterBalanceResponse
|
|
224
|
+
Success
|
|
225
|
+
|
|
226
|
+
Examples
|
|
227
|
+
--------
|
|
228
|
+
from mirascope.api._generated import Mirascope
|
|
229
|
+
|
|
230
|
+
client = Mirascope()
|
|
231
|
+
client.organizations.routerbalance(
|
|
232
|
+
id="id",
|
|
233
|
+
)
|
|
234
|
+
"""
|
|
235
|
+
_response = self._raw_client.routerbalance(id, request_options=request_options)
|
|
236
|
+
return _response.data
|
|
237
|
+
|
|
238
|
+
def createpaymentintent(
|
|
239
|
+
self,
|
|
240
|
+
id: str,
|
|
241
|
+
*,
|
|
242
|
+
amount: float,
|
|
243
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
244
|
+
) -> OrganizationsCreatePaymentIntentResponse:
|
|
245
|
+
"""
|
|
246
|
+
Parameters
|
|
247
|
+
----------
|
|
248
|
+
id : str
|
|
249
|
+
|
|
250
|
+
amount : float
|
|
251
|
+
a positive number
|
|
252
|
+
|
|
253
|
+
request_options : typing.Optional[RequestOptions]
|
|
254
|
+
Request-specific configuration.
|
|
255
|
+
|
|
256
|
+
Returns
|
|
257
|
+
-------
|
|
258
|
+
OrganizationsCreatePaymentIntentResponse
|
|
259
|
+
Success
|
|
260
|
+
|
|
261
|
+
Examples
|
|
262
|
+
--------
|
|
263
|
+
from mirascope.api._generated import Mirascope
|
|
264
|
+
|
|
265
|
+
client = Mirascope()
|
|
266
|
+
client.organizations.createpaymentintent(
|
|
267
|
+
id="id",
|
|
268
|
+
amount=1.1,
|
|
269
|
+
)
|
|
270
|
+
"""
|
|
271
|
+
_response = self._raw_client.createpaymentintent(
|
|
272
|
+
id, amount=amount, request_options=request_options
|
|
273
|
+
)
|
|
274
|
+
return _response.data
|
|
275
|
+
|
|
276
|
+
def subscription(
|
|
181
277
|
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
182
|
-
) ->
|
|
278
|
+
) -> OrganizationsSubscriptionResponse:
|
|
183
279
|
"""
|
|
184
280
|
Parameters
|
|
185
281
|
----------
|
|
@@ -190,7 +286,7 @@ class OrganizationsClient:
|
|
|
190
286
|
|
|
191
287
|
Returns
|
|
192
288
|
-------
|
|
193
|
-
|
|
289
|
+
OrganizationsSubscriptionResponse
|
|
194
290
|
Success
|
|
195
291
|
|
|
196
292
|
Examples
|
|
@@ -198,11 +294,114 @@ class OrganizationsClient:
|
|
|
198
294
|
from mirascope.api._generated import Mirascope
|
|
199
295
|
|
|
200
296
|
client = Mirascope()
|
|
201
|
-
client.organizations.
|
|
297
|
+
client.organizations.subscription(
|
|
202
298
|
id="id",
|
|
203
299
|
)
|
|
204
300
|
"""
|
|
205
|
-
_response = self._raw_client.
|
|
301
|
+
_response = self._raw_client.subscription(id, request_options=request_options)
|
|
302
|
+
return _response.data
|
|
303
|
+
|
|
304
|
+
def previewsubscriptionchange(
|
|
305
|
+
self,
|
|
306
|
+
id: str,
|
|
307
|
+
*,
|
|
308
|
+
target_plan: OrganizationsPreviewSubscriptionChangeRequestTargetPlan,
|
|
309
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
310
|
+
) -> OrganizationsPreviewSubscriptionChangeResponse:
|
|
311
|
+
"""
|
|
312
|
+
Parameters
|
|
313
|
+
----------
|
|
314
|
+
id : str
|
|
315
|
+
|
|
316
|
+
target_plan : OrganizationsPreviewSubscriptionChangeRequestTargetPlan
|
|
317
|
+
|
|
318
|
+
request_options : typing.Optional[RequestOptions]
|
|
319
|
+
Request-specific configuration.
|
|
320
|
+
|
|
321
|
+
Returns
|
|
322
|
+
-------
|
|
323
|
+
OrganizationsPreviewSubscriptionChangeResponse
|
|
324
|
+
Success
|
|
325
|
+
|
|
326
|
+
Examples
|
|
327
|
+
--------
|
|
328
|
+
from mirascope.api._generated import Mirascope
|
|
329
|
+
|
|
330
|
+
client = Mirascope()
|
|
331
|
+
client.organizations.previewsubscriptionchange(
|
|
332
|
+
id="id",
|
|
333
|
+
target_plan="free",
|
|
334
|
+
)
|
|
335
|
+
"""
|
|
336
|
+
_response = self._raw_client.previewsubscriptionchange(
|
|
337
|
+
id, target_plan=target_plan, request_options=request_options
|
|
338
|
+
)
|
|
339
|
+
return _response.data
|
|
340
|
+
|
|
341
|
+
def updatesubscription(
|
|
342
|
+
self,
|
|
343
|
+
id: str,
|
|
344
|
+
*,
|
|
345
|
+
target_plan: OrganizationsUpdateSubscriptionRequestTargetPlan,
|
|
346
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
347
|
+
) -> OrganizationsUpdateSubscriptionResponse:
|
|
348
|
+
"""
|
|
349
|
+
Parameters
|
|
350
|
+
----------
|
|
351
|
+
id : str
|
|
352
|
+
|
|
353
|
+
target_plan : OrganizationsUpdateSubscriptionRequestTargetPlan
|
|
354
|
+
|
|
355
|
+
request_options : typing.Optional[RequestOptions]
|
|
356
|
+
Request-specific configuration.
|
|
357
|
+
|
|
358
|
+
Returns
|
|
359
|
+
-------
|
|
360
|
+
OrganizationsUpdateSubscriptionResponse
|
|
361
|
+
Success
|
|
362
|
+
|
|
363
|
+
Examples
|
|
364
|
+
--------
|
|
365
|
+
from mirascope.api._generated import Mirascope
|
|
366
|
+
|
|
367
|
+
client = Mirascope()
|
|
368
|
+
client.organizations.updatesubscription(
|
|
369
|
+
id="id",
|
|
370
|
+
target_plan="free",
|
|
371
|
+
)
|
|
372
|
+
"""
|
|
373
|
+
_response = self._raw_client.updatesubscription(
|
|
374
|
+
id, target_plan=target_plan, request_options=request_options
|
|
375
|
+
)
|
|
376
|
+
return _response.data
|
|
377
|
+
|
|
378
|
+
def cancelscheduleddowngrade(
|
|
379
|
+
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
380
|
+
) -> None:
|
|
381
|
+
"""
|
|
382
|
+
Parameters
|
|
383
|
+
----------
|
|
384
|
+
id : str
|
|
385
|
+
|
|
386
|
+
request_options : typing.Optional[RequestOptions]
|
|
387
|
+
Request-specific configuration.
|
|
388
|
+
|
|
389
|
+
Returns
|
|
390
|
+
-------
|
|
391
|
+
None
|
|
392
|
+
|
|
393
|
+
Examples
|
|
394
|
+
--------
|
|
395
|
+
from mirascope.api._generated import Mirascope
|
|
396
|
+
|
|
397
|
+
client = Mirascope()
|
|
398
|
+
client.organizations.cancelscheduleddowngrade(
|
|
399
|
+
id="id",
|
|
400
|
+
)
|
|
401
|
+
"""
|
|
402
|
+
_response = self._raw_client.cancelscheduleddowngrade(
|
|
403
|
+
id, request_options=request_options
|
|
404
|
+
)
|
|
206
405
|
return _response.data
|
|
207
406
|
|
|
208
407
|
|
|
@@ -254,7 +453,11 @@ class AsyncOrganizationsClient:
|
|
|
254
453
|
return _response.data
|
|
255
454
|
|
|
256
455
|
async def create(
|
|
257
|
-
self,
|
|
456
|
+
self,
|
|
457
|
+
*,
|
|
458
|
+
name: str,
|
|
459
|
+
slug: str,
|
|
460
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
258
461
|
) -> OrganizationsCreateResponse:
|
|
259
462
|
"""
|
|
260
463
|
Parameters
|
|
@@ -291,7 +494,9 @@ class AsyncOrganizationsClient:
|
|
|
291
494
|
|
|
292
495
|
asyncio.run(main())
|
|
293
496
|
"""
|
|
294
|
-
_response = await self._raw_client.create(
|
|
497
|
+
_response = await self._raw_client.create(
|
|
498
|
+
name=name, slug=slug, request_options=request_options
|
|
499
|
+
)
|
|
295
500
|
return _response.data
|
|
296
501
|
|
|
297
502
|
async def get(
|
|
@@ -374,10 +579,14 @@ class AsyncOrganizationsClient:
|
|
|
374
579
|
|
|
375
580
|
asyncio.run(main())
|
|
376
581
|
"""
|
|
377
|
-
_response = await self._raw_client.update(
|
|
582
|
+
_response = await self._raw_client.update(
|
|
583
|
+
id, name=name, slug=slug, request_options=request_options
|
|
584
|
+
)
|
|
378
585
|
return _response.data
|
|
379
586
|
|
|
380
|
-
async def delete(
|
|
587
|
+
async def delete(
|
|
588
|
+
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
589
|
+
) -> None:
|
|
381
590
|
"""
|
|
382
591
|
Parameters
|
|
383
592
|
----------
|
|
@@ -410,9 +619,93 @@ class AsyncOrganizationsClient:
|
|
|
410
619
|
_response = await self._raw_client.delete(id, request_options=request_options)
|
|
411
620
|
return _response.data
|
|
412
621
|
|
|
413
|
-
async def
|
|
622
|
+
async def routerbalance(
|
|
623
|
+
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
624
|
+
) -> OrganizationsRouterBalanceResponse:
|
|
625
|
+
"""
|
|
626
|
+
Parameters
|
|
627
|
+
----------
|
|
628
|
+
id : str
|
|
629
|
+
|
|
630
|
+
request_options : typing.Optional[RequestOptions]
|
|
631
|
+
Request-specific configuration.
|
|
632
|
+
|
|
633
|
+
Returns
|
|
634
|
+
-------
|
|
635
|
+
OrganizationsRouterBalanceResponse
|
|
636
|
+
Success
|
|
637
|
+
|
|
638
|
+
Examples
|
|
639
|
+
--------
|
|
640
|
+
import asyncio
|
|
641
|
+
|
|
642
|
+
from mirascope.api._generated import AsyncMirascope
|
|
643
|
+
|
|
644
|
+
client = AsyncMirascope()
|
|
645
|
+
|
|
646
|
+
|
|
647
|
+
async def main() -> None:
|
|
648
|
+
await client.organizations.routerbalance(
|
|
649
|
+
id="id",
|
|
650
|
+
)
|
|
651
|
+
|
|
652
|
+
|
|
653
|
+
asyncio.run(main())
|
|
654
|
+
"""
|
|
655
|
+
_response = await self._raw_client.routerbalance(
|
|
656
|
+
id, request_options=request_options
|
|
657
|
+
)
|
|
658
|
+
return _response.data
|
|
659
|
+
|
|
660
|
+
async def createpaymentintent(
|
|
661
|
+
self,
|
|
662
|
+
id: str,
|
|
663
|
+
*,
|
|
664
|
+
amount: float,
|
|
665
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
666
|
+
) -> OrganizationsCreatePaymentIntentResponse:
|
|
667
|
+
"""
|
|
668
|
+
Parameters
|
|
669
|
+
----------
|
|
670
|
+
id : str
|
|
671
|
+
|
|
672
|
+
amount : float
|
|
673
|
+
a positive number
|
|
674
|
+
|
|
675
|
+
request_options : typing.Optional[RequestOptions]
|
|
676
|
+
Request-specific configuration.
|
|
677
|
+
|
|
678
|
+
Returns
|
|
679
|
+
-------
|
|
680
|
+
OrganizationsCreatePaymentIntentResponse
|
|
681
|
+
Success
|
|
682
|
+
|
|
683
|
+
Examples
|
|
684
|
+
--------
|
|
685
|
+
import asyncio
|
|
686
|
+
|
|
687
|
+
from mirascope.api._generated import AsyncMirascope
|
|
688
|
+
|
|
689
|
+
client = AsyncMirascope()
|
|
690
|
+
|
|
691
|
+
|
|
692
|
+
async def main() -> None:
|
|
693
|
+
await client.organizations.createpaymentintent(
|
|
694
|
+
id="id",
|
|
695
|
+
amount=1.1,
|
|
696
|
+
)
|
|
697
|
+
|
|
698
|
+
|
|
699
|
+
asyncio.run(main())
|
|
700
|
+
"""
|
|
701
|
+
_response = await self._raw_client.createpaymentintent(
|
|
702
|
+
id, amount=amount, request_options=request_options
|
|
703
|
+
)
|
|
704
|
+
return _response.data
|
|
705
|
+
|
|
706
|
+
async def subscription(
|
|
414
707
|
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
415
|
-
) ->
|
|
708
|
+
) -> OrganizationsSubscriptionResponse:
|
|
416
709
|
"""
|
|
417
710
|
Parameters
|
|
418
711
|
----------
|
|
@@ -423,7 +716,7 @@ class AsyncOrganizationsClient:
|
|
|
423
716
|
|
|
424
717
|
Returns
|
|
425
718
|
-------
|
|
426
|
-
|
|
719
|
+
OrganizationsSubscriptionResponse
|
|
427
720
|
Success
|
|
428
721
|
|
|
429
722
|
Examples
|
|
@@ -436,12 +729,141 @@ class AsyncOrganizationsClient:
|
|
|
436
729
|
|
|
437
730
|
|
|
438
731
|
async def main() -> None:
|
|
439
|
-
await client.organizations.
|
|
732
|
+
await client.organizations.subscription(
|
|
440
733
|
id="id",
|
|
441
734
|
)
|
|
442
735
|
|
|
443
736
|
|
|
444
737
|
asyncio.run(main())
|
|
445
738
|
"""
|
|
446
|
-
_response = await self._raw_client.
|
|
739
|
+
_response = await self._raw_client.subscription(
|
|
740
|
+
id, request_options=request_options
|
|
741
|
+
)
|
|
742
|
+
return _response.data
|
|
743
|
+
|
|
744
|
+
async def previewsubscriptionchange(
|
|
745
|
+
self,
|
|
746
|
+
id: str,
|
|
747
|
+
*,
|
|
748
|
+
target_plan: OrganizationsPreviewSubscriptionChangeRequestTargetPlan,
|
|
749
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
750
|
+
) -> OrganizationsPreviewSubscriptionChangeResponse:
|
|
751
|
+
"""
|
|
752
|
+
Parameters
|
|
753
|
+
----------
|
|
754
|
+
id : str
|
|
755
|
+
|
|
756
|
+
target_plan : OrganizationsPreviewSubscriptionChangeRequestTargetPlan
|
|
757
|
+
|
|
758
|
+
request_options : typing.Optional[RequestOptions]
|
|
759
|
+
Request-specific configuration.
|
|
760
|
+
|
|
761
|
+
Returns
|
|
762
|
+
-------
|
|
763
|
+
OrganizationsPreviewSubscriptionChangeResponse
|
|
764
|
+
Success
|
|
765
|
+
|
|
766
|
+
Examples
|
|
767
|
+
--------
|
|
768
|
+
import asyncio
|
|
769
|
+
|
|
770
|
+
from mirascope.api._generated import AsyncMirascope
|
|
771
|
+
|
|
772
|
+
client = AsyncMirascope()
|
|
773
|
+
|
|
774
|
+
|
|
775
|
+
async def main() -> None:
|
|
776
|
+
await client.organizations.previewsubscriptionchange(
|
|
777
|
+
id="id",
|
|
778
|
+
target_plan="free",
|
|
779
|
+
)
|
|
780
|
+
|
|
781
|
+
|
|
782
|
+
asyncio.run(main())
|
|
783
|
+
"""
|
|
784
|
+
_response = await self._raw_client.previewsubscriptionchange(
|
|
785
|
+
id, target_plan=target_plan, request_options=request_options
|
|
786
|
+
)
|
|
787
|
+
return _response.data
|
|
788
|
+
|
|
789
|
+
async def updatesubscription(
|
|
790
|
+
self,
|
|
791
|
+
id: str,
|
|
792
|
+
*,
|
|
793
|
+
target_plan: OrganizationsUpdateSubscriptionRequestTargetPlan,
|
|
794
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
795
|
+
) -> OrganizationsUpdateSubscriptionResponse:
|
|
796
|
+
"""
|
|
797
|
+
Parameters
|
|
798
|
+
----------
|
|
799
|
+
id : str
|
|
800
|
+
|
|
801
|
+
target_plan : OrganizationsUpdateSubscriptionRequestTargetPlan
|
|
802
|
+
|
|
803
|
+
request_options : typing.Optional[RequestOptions]
|
|
804
|
+
Request-specific configuration.
|
|
805
|
+
|
|
806
|
+
Returns
|
|
807
|
+
-------
|
|
808
|
+
OrganizationsUpdateSubscriptionResponse
|
|
809
|
+
Success
|
|
810
|
+
|
|
811
|
+
Examples
|
|
812
|
+
--------
|
|
813
|
+
import asyncio
|
|
814
|
+
|
|
815
|
+
from mirascope.api._generated import AsyncMirascope
|
|
816
|
+
|
|
817
|
+
client = AsyncMirascope()
|
|
818
|
+
|
|
819
|
+
|
|
820
|
+
async def main() -> None:
|
|
821
|
+
await client.organizations.updatesubscription(
|
|
822
|
+
id="id",
|
|
823
|
+
target_plan="free",
|
|
824
|
+
)
|
|
825
|
+
|
|
826
|
+
|
|
827
|
+
asyncio.run(main())
|
|
828
|
+
"""
|
|
829
|
+
_response = await self._raw_client.updatesubscription(
|
|
830
|
+
id, target_plan=target_plan, request_options=request_options
|
|
831
|
+
)
|
|
832
|
+
return _response.data
|
|
833
|
+
|
|
834
|
+
async def cancelscheduleddowngrade(
|
|
835
|
+
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
836
|
+
) -> None:
|
|
837
|
+
"""
|
|
838
|
+
Parameters
|
|
839
|
+
----------
|
|
840
|
+
id : str
|
|
841
|
+
|
|
842
|
+
request_options : typing.Optional[RequestOptions]
|
|
843
|
+
Request-specific configuration.
|
|
844
|
+
|
|
845
|
+
Returns
|
|
846
|
+
-------
|
|
847
|
+
None
|
|
848
|
+
|
|
849
|
+
Examples
|
|
850
|
+
--------
|
|
851
|
+
import asyncio
|
|
852
|
+
|
|
853
|
+
from mirascope.api._generated import AsyncMirascope
|
|
854
|
+
|
|
855
|
+
client = AsyncMirascope()
|
|
856
|
+
|
|
857
|
+
|
|
858
|
+
async def main() -> None:
|
|
859
|
+
await client.organizations.cancelscheduleddowngrade(
|
|
860
|
+
id="id",
|
|
861
|
+
)
|
|
862
|
+
|
|
863
|
+
|
|
864
|
+
asyncio.run(main())
|
|
865
|
+
"""
|
|
866
|
+
_response = await self._raw_client.cancelscheduleddowngrade(
|
|
867
|
+
id, request_options=request_options
|
|
868
|
+
)
|
|
447
869
|
return _response.data
|