mirascope 2.0.0a4__py3-none-any.whl → 2.0.0a6__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/__init__.py +10 -1
- mirascope/_stubs.py +363 -0
- mirascope/api/__init__.py +8 -0
- mirascope/api/_generated/__init__.py +119 -1
- mirascope/api/_generated/annotations/__init__.py +33 -0
- mirascope/api/_generated/annotations/client.py +474 -0
- mirascope/api/_generated/annotations/raw_client.py +1095 -0
- mirascope/api/_generated/annotations/types/__init__.py +31 -0
- mirascope/api/_generated/annotations/types/annotations_create_request_label.py +5 -0
- mirascope/api/_generated/annotations/types/annotations_create_response.py +35 -0
- mirascope/api/_generated/annotations/types/annotations_create_response_label.py +5 -0
- mirascope/api/_generated/annotations/types/annotations_get_response.py +35 -0
- mirascope/api/_generated/annotations/types/annotations_get_response_label.py +5 -0
- mirascope/api/_generated/annotations/types/annotations_list_request_label.py +5 -0
- mirascope/api/_generated/annotations/types/annotations_list_response.py +21 -0
- mirascope/api/_generated/annotations/types/annotations_list_response_annotations_item.py +35 -0
- mirascope/api/_generated/annotations/types/annotations_list_response_annotations_item_label.py +5 -0
- mirascope/api/_generated/annotations/types/annotations_update_request_label.py +5 -0
- mirascope/api/_generated/annotations/types/annotations_update_response.py +35 -0
- mirascope/api/_generated/annotations/types/annotations_update_response_label.py +5 -0
- mirascope/api/_generated/api_keys/__init__.py +7 -0
- mirascope/api/_generated/api_keys/client.py +429 -0
- mirascope/api/_generated/api_keys/raw_client.py +788 -0
- mirascope/api/_generated/api_keys/types/__init__.py +9 -0
- mirascope/api/_generated/api_keys/types/api_keys_create_response.py +28 -0
- mirascope/api/_generated/api_keys/types/api_keys_get_response.py +27 -0
- mirascope/api/_generated/api_keys/types/api_keys_list_response_item.py +27 -0
- mirascope/api/_generated/client.py +12 -0
- mirascope/api/_generated/core/client_wrapper.py +2 -14
- mirascope/api/_generated/core/datetime_utils.py +1 -3
- mirascope/api/_generated/core/file.py +2 -5
- mirascope/api/_generated/core/http_client.py +36 -112
- mirascope/api/_generated/core/jsonable_encoder.py +1 -3
- mirascope/api/_generated/core/pydantic_utilities.py +19 -74
- mirascope/api/_generated/core/query_encoder.py +1 -3
- mirascope/api/_generated/core/serialization.py +4 -10
- mirascope/api/_generated/docs/client.py +2 -6
- mirascope/api/_generated/docs/raw_client.py +4 -20
- mirascope/api/_generated/environments/__init__.py +17 -0
- mirascope/api/_generated/environments/client.py +500 -0
- mirascope/api/_generated/environments/raw_client.py +999 -0
- mirascope/api/_generated/environments/types/__init__.py +15 -0
- mirascope/api/_generated/environments/types/environments_create_response.py +24 -0
- mirascope/api/_generated/environments/types/environments_get_response.py +24 -0
- mirascope/api/_generated/environments/types/environments_list_response_item.py +24 -0
- mirascope/api/_generated/environments/types/environments_update_response.py +24 -0
- mirascope/api/_generated/errors/__init__.py +2 -0
- mirascope/api/_generated/errors/bad_request_error.py +1 -5
- mirascope/api/_generated/errors/conflict_error.py +1 -5
- mirascope/api/_generated/errors/forbidden_error.py +1 -5
- mirascope/api/_generated/errors/internal_server_error.py +1 -6
- mirascope/api/_generated/errors/not_found_error.py +1 -5
- mirascope/api/_generated/errors/unauthorized_error.py +11 -0
- mirascope/api/_generated/functions/__init__.py +29 -0
- mirascope/api/_generated/functions/client.py +433 -0
- mirascope/api/_generated/functions/raw_client.py +1049 -0
- mirascope/api/_generated/functions/types/__init__.py +29 -0
- mirascope/api/_generated/functions/types/functions_create_request_dependencies_value.py +20 -0
- mirascope/api/_generated/functions/types/functions_create_response.py +37 -0
- mirascope/api/_generated/functions/types/functions_create_response_dependencies_value.py +20 -0
- mirascope/api/_generated/functions/types/functions_find_by_hash_response.py +39 -0
- mirascope/api/_generated/functions/types/functions_find_by_hash_response_dependencies_value.py +20 -0
- mirascope/api/_generated/functions/types/functions_get_response.py +37 -0
- mirascope/api/_generated/functions/types/functions_get_response_dependencies_value.py +20 -0
- mirascope/api/_generated/functions/types/functions_list_response.py +21 -0
- mirascope/api/_generated/functions/types/functions_list_response_functions_item.py +41 -0
- mirascope/api/_generated/functions/types/functions_list_response_functions_item_dependencies_value.py +20 -0
- mirascope/api/_generated/health/client.py +2 -6
- mirascope/api/_generated/health/raw_client.py +5 -23
- mirascope/api/_generated/health/types/health_check_response.py +1 -3
- mirascope/api/_generated/organizations/__init__.py +2 -0
- mirascope/api/_generated/organizations/client.py +94 -27
- mirascope/api/_generated/organizations/raw_client.py +246 -128
- mirascope/api/_generated/organizations/types/__init__.py +2 -0
- mirascope/api/_generated/organizations/types/organizations_create_response.py +5 -3
- mirascope/api/_generated/organizations/types/organizations_create_response_role.py +1 -3
- mirascope/api/_generated/organizations/types/organizations_credits_response.py +19 -0
- mirascope/api/_generated/organizations/types/organizations_get_response.py +5 -3
- mirascope/api/_generated/organizations/types/organizations_get_response_role.py +1 -3
- mirascope/api/_generated/organizations/types/organizations_list_response_item.py +5 -3
- mirascope/api/_generated/organizations/types/organizations_list_response_item_role.py +1 -3
- mirascope/api/_generated/organizations/types/organizations_update_response.py +5 -3
- mirascope/api/_generated/organizations/types/organizations_update_response_role.py +1 -3
- mirascope/api/_generated/projects/__init__.py +2 -12
- mirascope/api/_generated/projects/client.py +38 -68
- mirascope/api/_generated/projects/raw_client.py +92 -163
- mirascope/api/_generated/projects/types/__init__.py +1 -6
- mirascope/api/_generated/projects/types/projects_create_response.py +4 -9
- mirascope/api/_generated/projects/types/projects_get_response.py +4 -9
- mirascope/api/_generated/projects/types/projects_list_response_item.py +4 -9
- mirascope/api/_generated/projects/types/projects_update_response.py +4 -9
- mirascope/api/_generated/reference.md +1862 -70
- mirascope/api/_generated/traces/__init__.py +22 -0
- mirascope/api/_generated/traces/client.py +398 -0
- mirascope/api/_generated/traces/raw_client.py +902 -18
- mirascope/api/_generated/traces/types/__init__.py +32 -0
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item.py +4 -11
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_resource.py +2 -6
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_resource_attributes_item.py +1 -3
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_resource_attributes_item_value.py +8 -24
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_resource_attributes_item_value_array_value.py +2 -6
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_resource_attributes_item_value_kvlist_value.py +3 -9
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_resource_attributes_item_value_kvlist_value_values_item.py +2 -6
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_scope_spans_item.py +3 -9
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_scope_spans_item_scope.py +4 -8
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_scope_spans_item_scope_attributes_item.py +2 -6
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_scope_spans_item_scope_attributes_item_value.py +8 -24
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_scope_spans_item_scope_attributes_item_value_array_value.py +2 -6
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_scope_spans_item_scope_attributes_item_value_kvlist_value.py +3 -9
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_scope_spans_item_scope_attributes_item_value_kvlist_value_values_item.py +1 -3
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_scope_spans_item_spans_item.py +6 -18
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_scope_spans_item_spans_item_attributes_item.py +3 -9
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_scope_spans_item_spans_item_attributes_item_value.py +8 -24
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_scope_spans_item_spans_item_attributes_item_value_array_value.py +2 -6
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_scope_spans_item_spans_item_attributes_item_value_kvlist_value.py +2 -6
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_scope_spans_item_spans_item_attributes_item_value_kvlist_value_values_item.py +1 -3
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_scope_spans_item_spans_item_status.py +2 -6
- mirascope/api/_generated/traces/types/traces_create_response.py +2 -5
- mirascope/api/_generated/traces/types/traces_create_response_partial_success.py +3 -9
- mirascope/api/_generated/traces/types/traces_get_analytics_summary_response.py +54 -0
- mirascope/api/_generated/traces/types/traces_get_analytics_summary_response_top_functions_item.py +24 -0
- mirascope/api/_generated/traces/types/traces_get_analytics_summary_response_top_models_item.py +22 -0
- mirascope/api/_generated/traces/types/traces_get_trace_detail_response.py +33 -0
- mirascope/api/_generated/traces/types/traces_get_trace_detail_response_spans_item.py +90 -0
- mirascope/api/_generated/traces/types/traces_search_request_attribute_filters_item.py +26 -0
- mirascope/api/_generated/traces/types/traces_search_request_attribute_filters_item_operator.py +7 -0
- mirascope/api/_generated/traces/types/traces_search_request_sort_by.py +7 -0
- mirascope/api/_generated/traces/types/traces_search_request_sort_order.py +5 -0
- mirascope/api/_generated/traces/types/traces_search_response.py +26 -0
- mirascope/api/_generated/traces/types/traces_search_response_spans_item.py +41 -0
- mirascope/api/_generated/types/__init__.py +18 -0
- mirascope/api/_generated/types/already_exists_error.py +1 -3
- mirascope/api/_generated/types/click_house_error.py +22 -0
- mirascope/api/_generated/types/database_error.py +1 -3
- mirascope/api/_generated/types/http_api_decode_error.py +1 -3
- mirascope/api/_generated/types/internal_server_error_body.py +49 -0
- mirascope/api/_generated/types/issue.py +1 -3
- mirascope/api/_generated/types/issue_tag.py +1 -8
- mirascope/api/_generated/types/not_found_error_body.py +1 -3
- mirascope/api/_generated/types/number_from_string.py +3 -0
- mirascope/api/_generated/types/permission_denied_error.py +1 -3
- mirascope/api/_generated/types/permission_denied_error_tag.py +1 -3
- mirascope/api/_generated/types/property_key_key.py +1 -3
- mirascope/api/_generated/types/stripe_error.py +20 -0
- mirascope/api/_generated/types/unauthorized_error_body.py +21 -0
- mirascope/api/_generated/types/unauthorized_error_tag.py +5 -0
- mirascope/llm/__init__.py +6 -2
- mirascope/llm/content/tool_call.py +6 -0
- mirascope/llm/exceptions.py +28 -0
- mirascope/llm/formatting/__init__.py +2 -2
- mirascope/llm/formatting/format.py +120 -8
- mirascope/llm/formatting/types.py +1 -56
- mirascope/llm/mcp/__init__.py +2 -2
- mirascope/llm/mcp/mcp_client.py +130 -0
- mirascope/llm/providers/__init__.py +26 -5
- mirascope/llm/providers/anthropic/__init__.py +3 -21
- mirascope/llm/providers/anthropic/_utils/__init__.py +2 -0
- mirascope/llm/providers/anthropic/_utils/beta_decode.py +4 -2
- mirascope/llm/providers/anthropic/_utils/beta_encode.py +13 -12
- mirascope/llm/providers/anthropic/_utils/decode.py +4 -2
- mirascope/llm/providers/anthropic/_utils/encode.py +57 -14
- mirascope/llm/providers/anthropic/_utils/errors.py +46 -0
- mirascope/llm/providers/anthropic/beta_provider.py +6 -0
- mirascope/llm/providers/anthropic/provider.py +5 -0
- mirascope/llm/providers/base/__init__.py +5 -2
- mirascope/llm/providers/base/_utils.py +2 -7
- mirascope/llm/providers/base/base_provider.py +173 -58
- mirascope/llm/providers/base/params.py +63 -34
- mirascope/llm/providers/google/__init__.py +2 -17
- mirascope/llm/providers/google/_utils/__init__.py +2 -0
- mirascope/llm/providers/google/_utils/decode.py +17 -8
- mirascope/llm/providers/google/_utils/encode.py +105 -16
- mirascope/llm/providers/google/_utils/errors.py +49 -0
- mirascope/llm/providers/google/model_info.py +1 -0
- mirascope/llm/providers/google/provider.py +9 -5
- mirascope/llm/providers/mirascope/__init__.py +5 -0
- mirascope/llm/providers/mirascope/_utils.py +77 -0
- mirascope/llm/providers/mirascope/provider.py +318 -0
- mirascope/llm/providers/mlx/__init__.py +2 -17
- mirascope/llm/providers/mlx/_utils.py +9 -2
- mirascope/llm/providers/mlx/provider.py +8 -0
- mirascope/llm/providers/ollama/__init__.py +1 -13
- mirascope/llm/providers/openai/__init__.py +10 -1
- mirascope/llm/providers/openai/_utils/__init__.py +5 -0
- mirascope/llm/providers/openai/_utils/errors.py +46 -0
- mirascope/llm/providers/openai/completions/__init__.py +2 -20
- mirascope/llm/providers/openai/completions/_utils/decode.py +14 -3
- mirascope/llm/providers/openai/completions/_utils/encode.py +15 -12
- mirascope/llm/providers/openai/completions/base_provider.py +6 -6
- mirascope/llm/providers/openai/provider.py +14 -1
- mirascope/llm/providers/openai/responses/__init__.py +1 -17
- mirascope/llm/providers/openai/responses/_utils/decode.py +2 -2
- mirascope/llm/providers/openai/responses/_utils/encode.py +43 -15
- mirascope/llm/providers/openai/responses/provider.py +13 -7
- mirascope/llm/providers/provider_id.py +1 -0
- mirascope/llm/providers/provider_registry.py +59 -3
- mirascope/llm/providers/together/__init__.py +1 -13
- mirascope/llm/responses/base_stream_response.py +24 -20
- mirascope/llm/tools/decorator.py +8 -4
- mirascope/llm/tools/tool_schema.py +33 -6
- mirascope/llm/tools/tools.py +84 -16
- mirascope/ops/__init__.py +60 -109
- mirascope/ops/_internal/closure.py +62 -11
- mirascope/ops/_internal/instrumentation/llm/llm.py +1 -2
- mirascope/ops/_internal/traced_functions.py +23 -4
- mirascope/ops/_internal/versioned_functions.py +54 -43
- {mirascope-2.0.0a4.dist-info → mirascope-2.0.0a6.dist-info}/METADATA +7 -7
- mirascope-2.0.0a6.dist-info/RECORD +316 -0
- mirascope/llm/formatting/_utils.py +0 -78
- mirascope/llm/mcp/client.py +0 -118
- mirascope/llm/providers/_missing_import_stubs.py +0 -49
- mirascope/llm/providers/load_provider.py +0 -54
- mirascope-2.0.0a4.dist-info/RECORD +0 -247
- {mirascope-2.0.0a4.dist-info → mirascope-2.0.0a6.dist-info}/WHEEL +0 -0
- {mirascope-2.0.0a4.dist-info → mirascope-2.0.0a6.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
# isort: skip_file
|
|
4
|
+
|
|
5
|
+
from .functions_create_request_dependencies_value import FunctionsCreateRequestDependenciesValue
|
|
6
|
+
from .functions_create_response import FunctionsCreateResponse
|
|
7
|
+
from .functions_create_response_dependencies_value import FunctionsCreateResponseDependenciesValue
|
|
8
|
+
from .functions_find_by_hash_response import FunctionsFindByHashResponse
|
|
9
|
+
from .functions_find_by_hash_response_dependencies_value import FunctionsFindByHashResponseDependenciesValue
|
|
10
|
+
from .functions_get_response import FunctionsGetResponse
|
|
11
|
+
from .functions_get_response_dependencies_value import FunctionsGetResponseDependenciesValue
|
|
12
|
+
from .functions_list_response import FunctionsListResponse
|
|
13
|
+
from .functions_list_response_functions_item import FunctionsListResponseFunctionsItem
|
|
14
|
+
from .functions_list_response_functions_item_dependencies_value import (
|
|
15
|
+
FunctionsListResponseFunctionsItemDependenciesValue,
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
__all__ = [
|
|
19
|
+
"FunctionsCreateRequestDependenciesValue",
|
|
20
|
+
"FunctionsCreateResponse",
|
|
21
|
+
"FunctionsCreateResponseDependenciesValue",
|
|
22
|
+
"FunctionsFindByHashResponse",
|
|
23
|
+
"FunctionsFindByHashResponseDependenciesValue",
|
|
24
|
+
"FunctionsGetResponse",
|
|
25
|
+
"FunctionsGetResponseDependenciesValue",
|
|
26
|
+
"FunctionsListResponse",
|
|
27
|
+
"FunctionsListResponseFunctionsItem",
|
|
28
|
+
"FunctionsListResponseFunctionsItemDependenciesValue",
|
|
29
|
+
]
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class FunctionsCreateRequestDependenciesValue(UniversalBaseModel):
|
|
10
|
+
version: str
|
|
11
|
+
extras: typing.Optional[typing.List[str]] = None
|
|
12
|
+
|
|
13
|
+
if IS_PYDANTIC_V2:
|
|
14
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
15
|
+
else:
|
|
16
|
+
|
|
17
|
+
class Config:
|
|
18
|
+
frozen = True
|
|
19
|
+
smart_union = True
|
|
20
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
import typing_extensions
|
|
7
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
|
+
from ...core.serialization import FieldMetadata
|
|
9
|
+
from .functions_create_response_dependencies_value import FunctionsCreateResponseDependenciesValue
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class FunctionsCreateResponse(UniversalBaseModel):
|
|
13
|
+
id: str
|
|
14
|
+
hash: str
|
|
15
|
+
signature_hash: typing_extensions.Annotated[str, FieldMetadata(alias="signatureHash")]
|
|
16
|
+
name: str
|
|
17
|
+
description: typing.Optional[str] = None
|
|
18
|
+
version: str
|
|
19
|
+
tags: typing.Optional[typing.List[str]] = None
|
|
20
|
+
metadata: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None
|
|
21
|
+
code: str
|
|
22
|
+
signature: str
|
|
23
|
+
dependencies: typing.Optional[typing.Dict[str, typing.Optional[FunctionsCreateResponseDependenciesValue]]] = None
|
|
24
|
+
environment_id: typing_extensions.Annotated[str, FieldMetadata(alias="environmentId")]
|
|
25
|
+
project_id: typing_extensions.Annotated[str, FieldMetadata(alias="projectId")]
|
|
26
|
+
organization_id: typing_extensions.Annotated[str, FieldMetadata(alias="organizationId")]
|
|
27
|
+
created_at: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="createdAt")] = None
|
|
28
|
+
updated_at: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="updatedAt")] = None
|
|
29
|
+
|
|
30
|
+
if IS_PYDANTIC_V2:
|
|
31
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
32
|
+
else:
|
|
33
|
+
|
|
34
|
+
class Config:
|
|
35
|
+
frozen = True
|
|
36
|
+
smart_union = True
|
|
37
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class FunctionsCreateResponseDependenciesValue(UniversalBaseModel):
|
|
10
|
+
version: str
|
|
11
|
+
extras: typing.Optional[typing.List[str]] = None
|
|
12
|
+
|
|
13
|
+
if IS_PYDANTIC_V2:
|
|
14
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
15
|
+
else:
|
|
16
|
+
|
|
17
|
+
class Config:
|
|
18
|
+
frozen = True
|
|
19
|
+
smart_union = True
|
|
20
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
import typing_extensions
|
|
7
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
|
+
from ...core.serialization import FieldMetadata
|
|
9
|
+
from .functions_find_by_hash_response_dependencies_value import FunctionsFindByHashResponseDependenciesValue
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class FunctionsFindByHashResponse(UniversalBaseModel):
|
|
13
|
+
id: str
|
|
14
|
+
hash: str
|
|
15
|
+
signature_hash: typing_extensions.Annotated[str, FieldMetadata(alias="signatureHash")]
|
|
16
|
+
name: str
|
|
17
|
+
description: typing.Optional[str] = None
|
|
18
|
+
version: str
|
|
19
|
+
tags: typing.Optional[typing.List[str]] = None
|
|
20
|
+
metadata: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None
|
|
21
|
+
code: str
|
|
22
|
+
signature: str
|
|
23
|
+
dependencies: typing.Optional[typing.Dict[str, typing.Optional[FunctionsFindByHashResponseDependenciesValue]]] = (
|
|
24
|
+
None
|
|
25
|
+
)
|
|
26
|
+
environment_id: typing_extensions.Annotated[str, FieldMetadata(alias="environmentId")]
|
|
27
|
+
project_id: typing_extensions.Annotated[str, FieldMetadata(alias="projectId")]
|
|
28
|
+
organization_id: typing_extensions.Annotated[str, FieldMetadata(alias="organizationId")]
|
|
29
|
+
created_at: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="createdAt")] = None
|
|
30
|
+
updated_at: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="updatedAt")] = None
|
|
31
|
+
|
|
32
|
+
if IS_PYDANTIC_V2:
|
|
33
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
34
|
+
else:
|
|
35
|
+
|
|
36
|
+
class Config:
|
|
37
|
+
frozen = True
|
|
38
|
+
smart_union = True
|
|
39
|
+
extra = pydantic.Extra.allow
|
mirascope/api/_generated/functions/types/functions_find_by_hash_response_dependencies_value.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class FunctionsFindByHashResponseDependenciesValue(UniversalBaseModel):
|
|
10
|
+
version: str
|
|
11
|
+
extras: typing.Optional[typing.List[str]] = None
|
|
12
|
+
|
|
13
|
+
if IS_PYDANTIC_V2:
|
|
14
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
15
|
+
else:
|
|
16
|
+
|
|
17
|
+
class Config:
|
|
18
|
+
frozen = True
|
|
19
|
+
smart_union = True
|
|
20
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
import typing_extensions
|
|
7
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
|
+
from ...core.serialization import FieldMetadata
|
|
9
|
+
from .functions_get_response_dependencies_value import FunctionsGetResponseDependenciesValue
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class FunctionsGetResponse(UniversalBaseModel):
|
|
13
|
+
id: str
|
|
14
|
+
hash: str
|
|
15
|
+
signature_hash: typing_extensions.Annotated[str, FieldMetadata(alias="signatureHash")]
|
|
16
|
+
name: str
|
|
17
|
+
description: typing.Optional[str] = None
|
|
18
|
+
version: str
|
|
19
|
+
tags: typing.Optional[typing.List[str]] = None
|
|
20
|
+
metadata: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None
|
|
21
|
+
code: str
|
|
22
|
+
signature: str
|
|
23
|
+
dependencies: typing.Optional[typing.Dict[str, typing.Optional[FunctionsGetResponseDependenciesValue]]] = None
|
|
24
|
+
environment_id: typing_extensions.Annotated[str, FieldMetadata(alias="environmentId")]
|
|
25
|
+
project_id: typing_extensions.Annotated[str, FieldMetadata(alias="projectId")]
|
|
26
|
+
organization_id: typing_extensions.Annotated[str, FieldMetadata(alias="organizationId")]
|
|
27
|
+
created_at: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="createdAt")] = None
|
|
28
|
+
updated_at: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="updatedAt")] = None
|
|
29
|
+
|
|
30
|
+
if IS_PYDANTIC_V2:
|
|
31
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
32
|
+
else:
|
|
33
|
+
|
|
34
|
+
class Config:
|
|
35
|
+
frozen = True
|
|
36
|
+
smart_union = True
|
|
37
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class FunctionsGetResponseDependenciesValue(UniversalBaseModel):
|
|
10
|
+
version: str
|
|
11
|
+
extras: typing.Optional[typing.List[str]] = None
|
|
12
|
+
|
|
13
|
+
if IS_PYDANTIC_V2:
|
|
14
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
15
|
+
else:
|
|
16
|
+
|
|
17
|
+
class Config:
|
|
18
|
+
frozen = True
|
|
19
|
+
smart_union = True
|
|
20
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .functions_list_response_functions_item import FunctionsListResponseFunctionsItem
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class FunctionsListResponse(UniversalBaseModel):
|
|
11
|
+
functions: typing.List[FunctionsListResponseFunctionsItem]
|
|
12
|
+
total: float
|
|
13
|
+
|
|
14
|
+
if IS_PYDANTIC_V2:
|
|
15
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
16
|
+
else:
|
|
17
|
+
|
|
18
|
+
class Config:
|
|
19
|
+
frozen = True
|
|
20
|
+
smart_union = True
|
|
21
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
import typing_extensions
|
|
7
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
|
+
from ...core.serialization import FieldMetadata
|
|
9
|
+
from .functions_list_response_functions_item_dependencies_value import (
|
|
10
|
+
FunctionsListResponseFunctionsItemDependenciesValue,
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class FunctionsListResponseFunctionsItem(UniversalBaseModel):
|
|
15
|
+
id: str
|
|
16
|
+
hash: str
|
|
17
|
+
signature_hash: typing_extensions.Annotated[str, FieldMetadata(alias="signatureHash")]
|
|
18
|
+
name: str
|
|
19
|
+
description: typing.Optional[str] = None
|
|
20
|
+
version: str
|
|
21
|
+
tags: typing.Optional[typing.List[str]] = None
|
|
22
|
+
metadata: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None
|
|
23
|
+
code: str
|
|
24
|
+
signature: str
|
|
25
|
+
dependencies: typing.Optional[
|
|
26
|
+
typing.Dict[str, typing.Optional[FunctionsListResponseFunctionsItemDependenciesValue]]
|
|
27
|
+
] = None
|
|
28
|
+
environment_id: typing_extensions.Annotated[str, FieldMetadata(alias="environmentId")]
|
|
29
|
+
project_id: typing_extensions.Annotated[str, FieldMetadata(alias="projectId")]
|
|
30
|
+
organization_id: typing_extensions.Annotated[str, FieldMetadata(alias="organizationId")]
|
|
31
|
+
created_at: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="createdAt")] = None
|
|
32
|
+
updated_at: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="updatedAt")] = None
|
|
33
|
+
|
|
34
|
+
if IS_PYDANTIC_V2:
|
|
35
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
36
|
+
else:
|
|
37
|
+
|
|
38
|
+
class Config:
|
|
39
|
+
frozen = True
|
|
40
|
+
smart_union = True
|
|
41
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class FunctionsListResponseFunctionsItemDependenciesValue(UniversalBaseModel):
|
|
10
|
+
version: str
|
|
11
|
+
extras: typing.Optional[typing.List[str]] = None
|
|
12
|
+
|
|
13
|
+
if IS_PYDANTIC_V2:
|
|
14
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
15
|
+
else:
|
|
16
|
+
|
|
17
|
+
class Config:
|
|
18
|
+
frozen = True
|
|
19
|
+
smart_union = True
|
|
20
|
+
extra = pydantic.Extra.allow
|
|
@@ -23,9 +23,7 @@ class HealthClient:
|
|
|
23
23
|
"""
|
|
24
24
|
return self._raw_client
|
|
25
25
|
|
|
26
|
-
def check(
|
|
27
|
-
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
28
|
-
) -> HealthCheckResponse:
|
|
26
|
+
def check(self, *, request_options: typing.Optional[RequestOptions] = None) -> HealthCheckResponse:
|
|
29
27
|
"""
|
|
30
28
|
Parameters
|
|
31
29
|
----------
|
|
@@ -63,9 +61,7 @@ class AsyncHealthClient:
|
|
|
63
61
|
"""
|
|
64
62
|
return self._raw_client
|
|
65
63
|
|
|
66
|
-
async def check(
|
|
67
|
-
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
68
|
-
) -> HealthCheckResponse:
|
|
64
|
+
async def check(self, *, request_options: typing.Optional[RequestOptions] = None) -> HealthCheckResponse:
|
|
69
65
|
"""
|
|
70
66
|
Parameters
|
|
71
67
|
----------
|
|
@@ -17,9 +17,7 @@ class RawHealthClient:
|
|
|
17
17
|
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
18
18
|
self._client_wrapper = client_wrapper
|
|
19
19
|
|
|
20
|
-
def check(
|
|
21
|
-
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
22
|
-
) -> HttpResponse[HealthCheckResponse]:
|
|
20
|
+
def check(self, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[HealthCheckResponse]:
|
|
23
21
|
"""
|
|
24
22
|
Parameters
|
|
25
23
|
----------
|
|
@@ -59,16 +57,8 @@ class RawHealthClient:
|
|
|
59
57
|
)
|
|
60
58
|
_response_json = _response.json()
|
|
61
59
|
except JSONDecodeError:
|
|
62
|
-
raise ApiError(
|
|
63
|
-
|
|
64
|
-
headers=dict(_response.headers),
|
|
65
|
-
body=_response.text,
|
|
66
|
-
)
|
|
67
|
-
raise ApiError(
|
|
68
|
-
status_code=_response.status_code,
|
|
69
|
-
headers=dict(_response.headers),
|
|
70
|
-
body=_response_json,
|
|
71
|
-
)
|
|
60
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
61
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
72
62
|
|
|
73
63
|
|
|
74
64
|
class AsyncRawHealthClient:
|
|
@@ -117,13 +107,5 @@ class AsyncRawHealthClient:
|
|
|
117
107
|
)
|
|
118
108
|
_response_json = _response.json()
|
|
119
109
|
except JSONDecodeError:
|
|
120
|
-
raise ApiError(
|
|
121
|
-
|
|
122
|
-
headers=dict(_response.headers),
|
|
123
|
-
body=_response.text,
|
|
124
|
-
)
|
|
125
|
-
raise ApiError(
|
|
126
|
-
status_code=_response.status_code,
|
|
127
|
-
headers=dict(_response.headers),
|
|
128
|
-
body=_response_json,
|
|
129
|
-
)
|
|
110
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
111
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
@@ -13,9 +13,7 @@ class HealthCheckResponse(UniversalBaseModel):
|
|
|
13
13
|
environment: str
|
|
14
14
|
|
|
15
15
|
if IS_PYDANTIC_V2:
|
|
16
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
17
|
-
extra="allow", frozen=True
|
|
18
|
-
) # type: ignore # Pydantic v2
|
|
16
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
19
17
|
else:
|
|
20
18
|
|
|
21
19
|
class Config:
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
from .types import (
|
|
6
6
|
OrganizationsCreateResponse,
|
|
7
7
|
OrganizationsCreateResponseRole,
|
|
8
|
+
OrganizationsCreditsResponse,
|
|
8
9
|
OrganizationsGetResponse,
|
|
9
10
|
OrganizationsGetResponseRole,
|
|
10
11
|
OrganizationsListResponseItem,
|
|
@@ -16,6 +17,7 @@ from .types import (
|
|
|
16
17
|
__all__ = [
|
|
17
18
|
"OrganizationsCreateResponse",
|
|
18
19
|
"OrganizationsCreateResponseRole",
|
|
20
|
+
"OrganizationsCreditsResponse",
|
|
19
21
|
"OrganizationsGetResponse",
|
|
20
22
|
"OrganizationsGetResponseRole",
|
|
21
23
|
"OrganizationsListResponseItem",
|
|
@@ -6,6 +6,7 @@ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
|
6
6
|
from ..core.request_options import RequestOptions
|
|
7
7
|
from .raw_client import AsyncRawOrganizationsClient, RawOrganizationsClient
|
|
8
8
|
from .types.organizations_create_response import OrganizationsCreateResponse
|
|
9
|
+
from .types.organizations_credits_response import OrganizationsCreditsResponse
|
|
9
10
|
from .types.organizations_get_response import OrganizationsGetResponse
|
|
10
11
|
from .types.organizations_list_response_item import OrganizationsListResponseItem
|
|
11
12
|
from .types.organizations_update_response import OrganizationsUpdateResponse
|
|
@@ -54,7 +55,7 @@ class OrganizationsClient:
|
|
|
54
55
|
return _response.data
|
|
55
56
|
|
|
56
57
|
def create(
|
|
57
|
-
self, *, name: str, request_options: typing.Optional[RequestOptions] = None
|
|
58
|
+
self, *, name: str, slug: str, request_options: typing.Optional[RequestOptions] = None
|
|
58
59
|
) -> OrganizationsCreateResponse:
|
|
59
60
|
"""
|
|
60
61
|
Parameters
|
|
@@ -62,6 +63,9 @@ class OrganizationsClient:
|
|
|
62
63
|
name : str
|
|
63
64
|
a string at most 100 character(s) long
|
|
64
65
|
|
|
66
|
+
slug : str
|
|
67
|
+
a string matching the pattern ^[a-z0-9][a-z0-9_-]*[a-z0-9]$
|
|
68
|
+
|
|
65
69
|
request_options : typing.Optional[RequestOptions]
|
|
66
70
|
Request-specific configuration.
|
|
67
71
|
|
|
@@ -77,14 +81,13 @@ class OrganizationsClient:
|
|
|
77
81
|
client = Mirascope()
|
|
78
82
|
client.organizations.create(
|
|
79
83
|
name="name",
|
|
84
|
+
slug="slug",
|
|
80
85
|
)
|
|
81
86
|
"""
|
|
82
|
-
_response = self._raw_client.create(name=name, request_options=request_options)
|
|
87
|
+
_response = self._raw_client.create(name=name, slug=slug, request_options=request_options)
|
|
83
88
|
return _response.data
|
|
84
89
|
|
|
85
|
-
def get(
|
|
86
|
-
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
87
|
-
) -> OrganizationsGetResponse:
|
|
90
|
+
def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> OrganizationsGetResponse:
|
|
88
91
|
"""
|
|
89
92
|
Parameters
|
|
90
93
|
----------
|
|
@@ -114,7 +117,8 @@ class OrganizationsClient:
|
|
|
114
117
|
self,
|
|
115
118
|
id: str,
|
|
116
119
|
*,
|
|
117
|
-
name: str,
|
|
120
|
+
name: typing.Optional[str] = OMIT,
|
|
121
|
+
slug: typing.Optional[str] = OMIT,
|
|
118
122
|
request_options: typing.Optional[RequestOptions] = None,
|
|
119
123
|
) -> OrganizationsUpdateResponse:
|
|
120
124
|
"""
|
|
@@ -122,9 +126,12 @@ class OrganizationsClient:
|
|
|
122
126
|
----------
|
|
123
127
|
id : str
|
|
124
128
|
|
|
125
|
-
name : str
|
|
129
|
+
name : typing.Optional[str]
|
|
126
130
|
a string at most 100 character(s) long
|
|
127
131
|
|
|
132
|
+
slug : typing.Optional[str]
|
|
133
|
+
a string matching the pattern ^[a-z0-9][a-z0-9_-]*[a-z0-9]$
|
|
134
|
+
|
|
128
135
|
request_options : typing.Optional[RequestOptions]
|
|
129
136
|
Request-specific configuration.
|
|
130
137
|
|
|
@@ -140,17 +147,12 @@ class OrganizationsClient:
|
|
|
140
147
|
client = Mirascope()
|
|
141
148
|
client.organizations.update(
|
|
142
149
|
id="id",
|
|
143
|
-
name="name",
|
|
144
150
|
)
|
|
145
151
|
"""
|
|
146
|
-
_response = self._raw_client.update(
|
|
147
|
-
id, name=name, request_options=request_options
|
|
148
|
-
)
|
|
152
|
+
_response = self._raw_client.update(id, name=name, slug=slug, request_options=request_options)
|
|
149
153
|
return _response.data
|
|
150
154
|
|
|
151
|
-
def delete(
|
|
152
|
-
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
153
|
-
) -> None:
|
|
155
|
+
def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
154
156
|
"""
|
|
155
157
|
Parameters
|
|
156
158
|
----------
|
|
@@ -175,6 +177,34 @@ class OrganizationsClient:
|
|
|
175
177
|
_response = self._raw_client.delete(id, request_options=request_options)
|
|
176
178
|
return _response.data
|
|
177
179
|
|
|
180
|
+
def credits(
|
|
181
|
+
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
182
|
+
) -> OrganizationsCreditsResponse:
|
|
183
|
+
"""
|
|
184
|
+
Parameters
|
|
185
|
+
----------
|
|
186
|
+
id : str
|
|
187
|
+
|
|
188
|
+
request_options : typing.Optional[RequestOptions]
|
|
189
|
+
Request-specific configuration.
|
|
190
|
+
|
|
191
|
+
Returns
|
|
192
|
+
-------
|
|
193
|
+
OrganizationsCreditsResponse
|
|
194
|
+
Success
|
|
195
|
+
|
|
196
|
+
Examples
|
|
197
|
+
--------
|
|
198
|
+
from mirascope.api._generated import Mirascope
|
|
199
|
+
|
|
200
|
+
client = Mirascope()
|
|
201
|
+
client.organizations.credits(
|
|
202
|
+
id="id",
|
|
203
|
+
)
|
|
204
|
+
"""
|
|
205
|
+
_response = self._raw_client.credits(id, request_options=request_options)
|
|
206
|
+
return _response.data
|
|
207
|
+
|
|
178
208
|
|
|
179
209
|
class AsyncOrganizationsClient:
|
|
180
210
|
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
@@ -224,7 +254,7 @@ class AsyncOrganizationsClient:
|
|
|
224
254
|
return _response.data
|
|
225
255
|
|
|
226
256
|
async def create(
|
|
227
|
-
self, *, name: str, request_options: typing.Optional[RequestOptions] = None
|
|
257
|
+
self, *, name: str, slug: str, request_options: typing.Optional[RequestOptions] = None
|
|
228
258
|
) -> OrganizationsCreateResponse:
|
|
229
259
|
"""
|
|
230
260
|
Parameters
|
|
@@ -232,6 +262,9 @@ class AsyncOrganizationsClient:
|
|
|
232
262
|
name : str
|
|
233
263
|
a string at most 100 character(s) long
|
|
234
264
|
|
|
265
|
+
slug : str
|
|
266
|
+
a string matching the pattern ^[a-z0-9][a-z0-9_-]*[a-z0-9]$
|
|
267
|
+
|
|
235
268
|
request_options : typing.Optional[RequestOptions]
|
|
236
269
|
Request-specific configuration.
|
|
237
270
|
|
|
@@ -252,14 +285,13 @@ class AsyncOrganizationsClient:
|
|
|
252
285
|
async def main() -> None:
|
|
253
286
|
await client.organizations.create(
|
|
254
287
|
name="name",
|
|
288
|
+
slug="slug",
|
|
255
289
|
)
|
|
256
290
|
|
|
257
291
|
|
|
258
292
|
asyncio.run(main())
|
|
259
293
|
"""
|
|
260
|
-
_response = await self._raw_client.create(
|
|
261
|
-
name=name, request_options=request_options
|
|
262
|
-
)
|
|
294
|
+
_response = await self._raw_client.create(name=name, slug=slug, request_options=request_options)
|
|
263
295
|
return _response.data
|
|
264
296
|
|
|
265
297
|
async def get(
|
|
@@ -302,7 +334,8 @@ class AsyncOrganizationsClient:
|
|
|
302
334
|
self,
|
|
303
335
|
id: str,
|
|
304
336
|
*,
|
|
305
|
-
name: str,
|
|
337
|
+
name: typing.Optional[str] = OMIT,
|
|
338
|
+
slug: typing.Optional[str] = OMIT,
|
|
306
339
|
request_options: typing.Optional[RequestOptions] = None,
|
|
307
340
|
) -> OrganizationsUpdateResponse:
|
|
308
341
|
"""
|
|
@@ -310,9 +343,12 @@ class AsyncOrganizationsClient:
|
|
|
310
343
|
----------
|
|
311
344
|
id : str
|
|
312
345
|
|
|
313
|
-
name : str
|
|
346
|
+
name : typing.Optional[str]
|
|
314
347
|
a string at most 100 character(s) long
|
|
315
348
|
|
|
349
|
+
slug : typing.Optional[str]
|
|
350
|
+
a string matching the pattern ^[a-z0-9][a-z0-9_-]*[a-z0-9]$
|
|
351
|
+
|
|
316
352
|
request_options : typing.Optional[RequestOptions]
|
|
317
353
|
Request-specific configuration.
|
|
318
354
|
|
|
@@ -333,20 +369,15 @@ class AsyncOrganizationsClient:
|
|
|
333
369
|
async def main() -> None:
|
|
334
370
|
await client.organizations.update(
|
|
335
371
|
id="id",
|
|
336
|
-
name="name",
|
|
337
372
|
)
|
|
338
373
|
|
|
339
374
|
|
|
340
375
|
asyncio.run(main())
|
|
341
376
|
"""
|
|
342
|
-
_response = await self._raw_client.update(
|
|
343
|
-
id, name=name, request_options=request_options
|
|
344
|
-
)
|
|
377
|
+
_response = await self._raw_client.update(id, name=name, slug=slug, request_options=request_options)
|
|
345
378
|
return _response.data
|
|
346
379
|
|
|
347
|
-
async def delete(
|
|
348
|
-
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
349
|
-
) -> None:
|
|
380
|
+
async def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
350
381
|
"""
|
|
351
382
|
Parameters
|
|
352
383
|
----------
|
|
@@ -378,3 +409,39 @@ class AsyncOrganizationsClient:
|
|
|
378
409
|
"""
|
|
379
410
|
_response = await self._raw_client.delete(id, request_options=request_options)
|
|
380
411
|
return _response.data
|
|
412
|
+
|
|
413
|
+
async def credits(
|
|
414
|
+
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
415
|
+
) -> OrganizationsCreditsResponse:
|
|
416
|
+
"""
|
|
417
|
+
Parameters
|
|
418
|
+
----------
|
|
419
|
+
id : str
|
|
420
|
+
|
|
421
|
+
request_options : typing.Optional[RequestOptions]
|
|
422
|
+
Request-specific configuration.
|
|
423
|
+
|
|
424
|
+
Returns
|
|
425
|
+
-------
|
|
426
|
+
OrganizationsCreditsResponse
|
|
427
|
+
Success
|
|
428
|
+
|
|
429
|
+
Examples
|
|
430
|
+
--------
|
|
431
|
+
import asyncio
|
|
432
|
+
|
|
433
|
+
from mirascope.api._generated import AsyncMirascope
|
|
434
|
+
|
|
435
|
+
client = AsyncMirascope()
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
async def main() -> None:
|
|
439
|
+
await client.organizations.credits(
|
|
440
|
+
id="id",
|
|
441
|
+
)
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
asyncio.run(main())
|
|
445
|
+
"""
|
|
446
|
+
_response = await self._raw_client.credits(id, request_options=request_options)
|
|
447
|
+
return _response.data
|