alchemy-python 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. alchemy/.fern/metadata.json +18 -0
  2. alchemy/CONTRIBUTING.md +125 -0
  3. alchemy/__init__.py +380 -0
  4. alchemy/_default_clients.py +30 -0
  5. alchemy/auth/__init__.py +4 -0
  6. alchemy/auth/client.py +767 -0
  7. alchemy/auth/raw_client.py +866 -0
  8. alchemy/client.py +717 -0
  9. alchemy/core/__init__.py +127 -0
  10. alchemy/core/api_error.py +23 -0
  11. alchemy/core/client_wrapper.py +155 -0
  12. alchemy/core/datetime_utils.py +70 -0
  13. alchemy/core/file.py +67 -0
  14. alchemy/core/force_multipart.py +18 -0
  15. alchemy/core/http_client.py +940 -0
  16. alchemy/core/http_response.py +63 -0
  17. alchemy/core/http_sse/__init__.py +42 -0
  18. alchemy/core/http_sse/_api.py +455 -0
  19. alchemy/core/http_sse/_decoders.py +74 -0
  20. alchemy/core/http_sse/_exceptions.py +7 -0
  21. alchemy/core/http_sse/_models.py +17 -0
  22. alchemy/core/jsonable_encoder.py +133 -0
  23. alchemy/core/logging.py +107 -0
  24. alchemy/core/oauth_token_provider.py +73 -0
  25. alchemy/core/parse_error.py +36 -0
  26. alchemy/core/pydantic_utilities.py +486 -0
  27. alchemy/core/query_encoder.py +58 -0
  28. alchemy/core/remove_none_from_dict.py +11 -0
  29. alchemy/core/request_options.py +40 -0
  30. alchemy/core/serialization.py +347 -0
  31. alchemy/environment.py +7 -0
  32. alchemy/function/__init__.py +34 -0
  33. alchemy/function/client.py +808 -0
  34. alchemy/function/raw_client.py +903 -0
  35. alchemy/function/version/__init__.py +4 -0
  36. alchemy/function/version/client.py +364 -0
  37. alchemy/function/version/raw_client.py +410 -0
  38. alchemy/host/__init__.py +4 -0
  39. alchemy/host/client.py +227 -0
  40. alchemy/host/raw_client.py +242 -0
  41. alchemy/instance/__init__.py +4 -0
  42. alchemy/instance/client.py +136 -0
  43. alchemy/instance/raw_client.py +141 -0
  44. alchemy/invocation/__init__.py +4 -0
  45. alchemy/invocation/client.py +570 -0
  46. alchemy/invocation/raw_client.py +636 -0
  47. alchemy/member/__init__.py +4 -0
  48. alchemy/member/client.py +441 -0
  49. alchemy/member/raw_client.py +504 -0
  50. alchemy/metrics/__init__.py +4 -0
  51. alchemy/metrics/client.py +428 -0
  52. alchemy/metrics/raw_client.py +478 -0
  53. alchemy/py.typed +0 -0
  54. alchemy/raw_client.py +138 -0
  55. alchemy/reference.md +3300 -0
  56. alchemy/runtime/__init__.py +4 -0
  57. alchemy/runtime/client.py +141 -0
  58. alchemy/runtime/raw_client.py +140 -0
  59. alchemy/service_account/__init__.py +4 -0
  60. alchemy/service_account/client.py +429 -0
  61. alchemy/service_account/raw_client.py +490 -0
  62. alchemy/template/__init__.py +4 -0
  63. alchemy/template/client.py +141 -0
  64. alchemy/template/raw_client.py +140 -0
  65. alchemy/types/__init__.py +344 -0
  66. alchemy/types/auth_v1accept_invite_response.py +5 -0
  67. alchemy/types/auth_v1create_service_account_response.py +34 -0
  68. alchemy/types/auth_v1get_auth_config_request.py +5 -0
  69. alchemy/types/auth_v1get_auth_config_response.py +53 -0
  70. alchemy/types/auth_v1get_session_request.py +9 -0
  71. alchemy/types/auth_v1get_session_response.py +28 -0
  72. alchemy/types/auth_v1get_token_response.py +29 -0
  73. alchemy/types/auth_v1invite_member_response.py +29 -0
  74. alchemy/types/auth_v1list_members_request.py +5 -0
  75. alchemy/types/auth_v1list_members_response.py +34 -0
  76. alchemy/types/auth_v1list_service_accounts_request.py +5 -0
  77. alchemy/types/auth_v1list_service_accounts_response.py +29 -0
  78. alchemy/types/auth_v1login_response.py +5 -0
  79. alchemy/types/auth_v1logout_request.py +8 -0
  80. alchemy/types/auth_v1logout_response.py +5 -0
  81. alchemy/types/auth_v1member.py +31 -0
  82. alchemy/types/auth_v1register_response.py +23 -0
  83. alchemy/types/auth_v1remove_member_response.py +5 -0
  84. alchemy/types/auth_v1remove_service_account_response.py +5 -0
  85. alchemy/types/auth_v1role.py +5 -0
  86. alchemy/types/auth_v1rotate_service_account_secret_response.py +31 -0
  87. alchemy/types/auth_v1service_account.py +35 -0
  88. alchemy/types/auth_v1set_member_role_response.py +5 -0
  89. alchemy/types/connect_error.py +38 -0
  90. alchemy/types/connect_error_code.py +25 -0
  91. alchemy/types/connect_error_details_any.py +36 -0
  92. alchemy/types/connect_protocol_version.py +5 -0
  93. alchemy/types/connect_timeout_header.py +6 -0
  94. alchemy/types/functions_v1arrow_contract.py +50 -0
  95. alchemy/types/functions_v1contract.py +8 -0
  96. alchemy/types/functions_v1contract_arrow.py +20 -0
  97. alchemy/types/functions_v1contract_json_schema.py +26 -0
  98. alchemy/types/functions_v1contract_violation.py +32 -0
  99. alchemy/types/functions_v1create_function_response.py +22 -0
  100. alchemy/types/functions_v1create_function_version_response.py +20 -0
  101. alchemy/types/functions_v1delete_function_response.py +5 -0
  102. alchemy/types/functions_v1function.py +100 -0
  103. alchemy/types/functions_v1function_error.py +30 -0
  104. alchemy/types/functions_v1function_error_kind.py +15 -0
  105. alchemy/types/functions_v1function_spec.py +58 -0
  106. alchemy/types/functions_v1function_version.py +81 -0
  107. alchemy/types/functions_v1function_version_status.py +13 -0
  108. alchemy/types/functions_v1get_function_response.py +20 -0
  109. alchemy/types/functions_v1get_function_version_response.py +20 -0
  110. alchemy/types/functions_v1get_host_request.py +5 -0
  111. alchemy/types/functions_v1get_host_response.py +20 -0
  112. alchemy/types/functions_v1get_invocation_logs_request.py +31 -0
  113. alchemy/types/functions_v1get_invocation_logs_response.py +24 -0
  114. alchemy/types/functions_v1get_invocation_response.py +20 -0
  115. alchemy/types/functions_v1get_version_request.py +5 -0
  116. alchemy/types/functions_v1get_version_response.py +25 -0
  117. alchemy/types/functions_v1host.py +58 -0
  118. alchemy/types/functions_v1instance.py +54 -0
  119. alchemy/types/functions_v1instance_status.py +14 -0
  120. alchemy/types/functions_v1invocation.py +106 -0
  121. alchemy/types/functions_v1invocation_protocol.py +8 -0
  122. alchemy/types/functions_v1invocation_stats.py +41 -0
  123. alchemy/types/functions_v1invocation_status.py +18 -0
  124. alchemy/types/functions_v1invoke_async_response.py +34 -0
  125. alchemy/types/functions_v1invoke_response.py +8 -0
  126. alchemy/types/functions_v1invoke_response_error.py +20 -0
  127. alchemy/types/functions_v1invoke_response_output.py +19 -0
  128. alchemy/types/functions_v1json_schema_contract.py +28 -0
  129. alchemy/types/functions_v1list_function_versions_response.py +22 -0
  130. alchemy/types/functions_v1list_functions_response.py +22 -0
  131. alchemy/types/functions_v1list_hosts_request.py +5 -0
  132. alchemy/types/functions_v1list_hosts_response.py +23 -0
  133. alchemy/types/functions_v1list_instances_response.py +20 -0
  134. alchemy/types/functions_v1list_invocations_response.py +22 -0
  135. alchemy/types/functions_v1list_runtimes_request.py +5 -0
  136. alchemy/types/functions_v1list_runtimes_response.py +22 -0
  137. alchemy/types/functions_v1list_templates_request.py +5 -0
  138. alchemy/types/functions_v1list_templates_response.py +20 -0
  139. alchemy/types/functions_v1network.py +5 -0
  140. alchemy/types/functions_v1pagination_request.py +31 -0
  141. alchemy/types/functions_v1pagination_response.py +33 -0
  142. alchemy/types/functions_v1resources.py +28 -0
  143. alchemy/types/functions_v1runtime.py +59 -0
  144. alchemy/types/functions_v1runtime_starters.py +29 -0
  145. alchemy/types/functions_v1source.py +31 -0
  146. alchemy/types/functions_v1source_file.py +28 -0
  147. alchemy/types/functions_v1source_layer.py +27 -0
  148. alchemy/types/functions_v1source_limits.py +30 -0
  149. alchemy/types/functions_v1start_kind.py +8 -0
  150. alchemy/types/functions_v1tail_invocations_request.py +32 -0
  151. alchemy/types/functions_v1tail_invocations_response.py +34 -0
  152. alchemy/types/functions_v1template.py +94 -0
  153. alchemy/types/functions_v1template_source.py +27 -0
  154. alchemy/types/functions_v1update_function_response.py +20 -0
  155. alchemy/types/google_protobuf_list_value.py +10 -0
  156. alchemy/types/google_protobuf_null_value.py +5 -0
  157. alchemy/types/google_protobuf_struct.py +10 -0
  158. alchemy/types/google_protobuf_value.py +5 -0
  159. alchemy/types/metrics_v1aggregate_row.py +24 -0
  160. alchemy/types/metrics_v1get_queue_response.py +25 -0
  161. alchemy/types/metrics_v1metric.py +16 -0
  162. alchemy/types/metrics_v1metric_dimension.py +14 -0
  163. alchemy/types/metrics_v1metric_filter.py +26 -0
  164. alchemy/types/metrics_v1metric_granularity.py +13 -0
  165. alchemy/types/metrics_v1query_aggregate_response.py +20 -0
  166. alchemy/types/metrics_v1query_timeseries_response.py +20 -0
  167. alchemy/types/metrics_v1timeseries.py +28 -0
  168. alchemy/types/metrics_v1timeseries_point.py +28 -0
  169. alchemy_python-0.1.0.dist-info/METADATA +196 -0
  170. alchemy_python-0.1.0.dist-info/RECORD +172 -0
  171. alchemy_python-0.1.0.dist-info/WHEEL +4 -0
  172. alchemy_python-0.1.0.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,140 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+ from json.decoder import JSONDecodeError
5
+
6
+ from ..core.api_error import ApiError
7
+ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
8
+ from ..core.http_response import AsyncHttpResponse, HttpResponse
9
+ from ..core.parse_error import ParsingError
10
+ from ..core.pydantic_utilities import parse_obj_as
11
+ from ..core.request_options import RequestOptions
12
+ from ..types.connect_timeout_header import ConnectTimeoutHeader
13
+ from ..types.functions_v1list_templates_request import FunctionsV1ListTemplatesRequest
14
+ from ..types.functions_v1list_templates_response import FunctionsV1ListTemplatesResponse
15
+ from pydantic import ValidationError
16
+
17
+ # this is used as the default value for optional parameters
18
+ OMIT = typing.cast(typing.Any, ...)
19
+
20
+
21
+ class RawTemplateClient:
22
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
23
+ self._client_wrapper = client_wrapper
24
+
25
+ def list(
26
+ self,
27
+ *,
28
+ request: FunctionsV1ListTemplatesRequest,
29
+ connect_timeout_ms: typing.Optional[ConnectTimeoutHeader] = None,
30
+ request_options: typing.Optional[RequestOptions] = None,
31
+ ) -> HttpResponse[FunctionsV1ListTemplatesResponse]:
32
+ """
33
+ Templates a function can be built from, each with a handler and a sample
34
+ contract per contract kind.
35
+
36
+ Parameters
37
+ ----------
38
+ request : FunctionsV1ListTemplatesRequest
39
+
40
+ connect_timeout_ms : typing.Optional[ConnectTimeoutHeader]
41
+ Define the timeout, in ms
42
+
43
+ request_options : typing.Optional[RequestOptions]
44
+ Request-specific configuration.
45
+
46
+ Returns
47
+ -------
48
+ HttpResponse[FunctionsV1ListTemplatesResponse]
49
+ Success
50
+ """
51
+ _response = self._client_wrapper.httpx_client.request(
52
+ "functions.v1.FunctionsService/ListTemplates",
53
+ method="POST",
54
+ json=request,
55
+ headers={
56
+ "content-type": "application/json",
57
+ "Connect-Timeout-Ms": str(connect_timeout_ms) if connect_timeout_ms is not None else None,
58
+ },
59
+ request_options=request_options,
60
+ omit=OMIT,
61
+ )
62
+ try:
63
+ if 200 <= _response.status_code < 300:
64
+ _data = typing.cast(
65
+ FunctionsV1ListTemplatesResponse,
66
+ parse_obj_as(
67
+ type_=FunctionsV1ListTemplatesResponse, # type: ignore
68
+ object_=_response.json(),
69
+ ),
70
+ )
71
+ return HttpResponse(response=_response, data=_data)
72
+ _response_json = _response.json()
73
+ except JSONDecodeError:
74
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
75
+ except ValidationError as e:
76
+ raise ParsingError(
77
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
78
+ )
79
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
80
+
81
+
82
+ class AsyncRawTemplateClient:
83
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
84
+ self._client_wrapper = client_wrapper
85
+
86
+ async def list(
87
+ self,
88
+ *,
89
+ request: FunctionsV1ListTemplatesRequest,
90
+ connect_timeout_ms: typing.Optional[ConnectTimeoutHeader] = None,
91
+ request_options: typing.Optional[RequestOptions] = None,
92
+ ) -> AsyncHttpResponse[FunctionsV1ListTemplatesResponse]:
93
+ """
94
+ Templates a function can be built from, each with a handler and a sample
95
+ contract per contract kind.
96
+
97
+ Parameters
98
+ ----------
99
+ request : FunctionsV1ListTemplatesRequest
100
+
101
+ connect_timeout_ms : typing.Optional[ConnectTimeoutHeader]
102
+ Define the timeout, in ms
103
+
104
+ request_options : typing.Optional[RequestOptions]
105
+ Request-specific configuration.
106
+
107
+ Returns
108
+ -------
109
+ AsyncHttpResponse[FunctionsV1ListTemplatesResponse]
110
+ Success
111
+ """
112
+ _response = await self._client_wrapper.httpx_client.request(
113
+ "functions.v1.FunctionsService/ListTemplates",
114
+ method="POST",
115
+ json=request,
116
+ headers={
117
+ "content-type": "application/json",
118
+ "Connect-Timeout-Ms": str(connect_timeout_ms) if connect_timeout_ms is not None else None,
119
+ },
120
+ request_options=request_options,
121
+ omit=OMIT,
122
+ )
123
+ try:
124
+ if 200 <= _response.status_code < 300:
125
+ _data = typing.cast(
126
+ FunctionsV1ListTemplatesResponse,
127
+ parse_obj_as(
128
+ type_=FunctionsV1ListTemplatesResponse, # type: ignore
129
+ object_=_response.json(),
130
+ ),
131
+ )
132
+ return AsyncHttpResponse(response=_response, data=_data)
133
+ _response_json = _response.json()
134
+ except JSONDecodeError:
135
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
136
+ except ValidationError as e:
137
+ raise ParsingError(
138
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
139
+ )
140
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
@@ -0,0 +1,344 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ # isort: skip_file
4
+
5
+ import typing
6
+ from importlib import import_module
7
+
8
+ if typing.TYPE_CHECKING:
9
+ from .auth_v1accept_invite_response import AuthV1AcceptInviteResponse
10
+ from .auth_v1create_service_account_response import AuthV1CreateServiceAccountResponse
11
+ from .auth_v1get_auth_config_request import AuthV1GetAuthConfigRequest
12
+ from .auth_v1get_auth_config_response import AuthV1GetAuthConfigResponse
13
+ from .auth_v1get_session_request import AuthV1GetSessionRequest
14
+ from .auth_v1get_session_response import AuthV1GetSessionResponse
15
+ from .auth_v1get_token_response import AuthV1GetTokenResponse
16
+ from .auth_v1invite_member_response import AuthV1InviteMemberResponse
17
+ from .auth_v1list_members_request import AuthV1ListMembersRequest
18
+ from .auth_v1list_members_response import AuthV1ListMembersResponse
19
+ from .auth_v1list_service_accounts_request import AuthV1ListServiceAccountsRequest
20
+ from .auth_v1list_service_accounts_response import AuthV1ListServiceAccountsResponse
21
+ from .auth_v1login_response import AuthV1LoginResponse
22
+ from .auth_v1logout_request import AuthV1LogoutRequest
23
+ from .auth_v1logout_response import AuthV1LogoutResponse
24
+ from .auth_v1member import AuthV1Member
25
+ from .auth_v1register_response import AuthV1RegisterResponse
26
+ from .auth_v1remove_member_response import AuthV1RemoveMemberResponse
27
+ from .auth_v1remove_service_account_response import AuthV1RemoveServiceAccountResponse
28
+ from .auth_v1role import AuthV1Role
29
+ from .auth_v1rotate_service_account_secret_response import AuthV1RotateServiceAccountSecretResponse
30
+ from .auth_v1service_account import AuthV1ServiceAccount
31
+ from .auth_v1set_member_role_response import AuthV1SetMemberRoleResponse
32
+ from .connect_error import ConnectError
33
+ from .connect_error_code import ConnectErrorCode
34
+ from .connect_error_details_any import ConnectErrorDetailsAny
35
+ from .connect_protocol_version import ConnectProtocolVersion
36
+ from .connect_timeout_header import ConnectTimeoutHeader
37
+ from .functions_v1arrow_contract import FunctionsV1ArrowContract
38
+ from .functions_v1contract import FunctionsV1Contract
39
+ from .functions_v1contract_arrow import FunctionsV1ContractArrow
40
+ from .functions_v1contract_json_schema import FunctionsV1ContractJsonSchema
41
+ from .functions_v1contract_violation import FunctionsV1ContractViolation
42
+ from .functions_v1create_function_response import FunctionsV1CreateFunctionResponse
43
+ from .functions_v1create_function_version_response import FunctionsV1CreateFunctionVersionResponse
44
+ from .functions_v1delete_function_response import FunctionsV1DeleteFunctionResponse
45
+ from .functions_v1function import FunctionsV1Function
46
+ from .functions_v1function_error import FunctionsV1FunctionError
47
+ from .functions_v1function_error_kind import FunctionsV1FunctionErrorKind
48
+ from .functions_v1function_spec import FunctionsV1FunctionSpec
49
+ from .functions_v1function_version import FunctionsV1FunctionVersion
50
+ from .functions_v1function_version_status import FunctionsV1FunctionVersionStatus
51
+ from .functions_v1get_function_response import FunctionsV1GetFunctionResponse
52
+ from .functions_v1get_function_version_response import FunctionsV1GetFunctionVersionResponse
53
+ from .functions_v1get_host_request import FunctionsV1GetHostRequest
54
+ from .functions_v1get_host_response import FunctionsV1GetHostResponse
55
+ from .functions_v1get_invocation_logs_request import FunctionsV1GetInvocationLogsRequest
56
+ from .functions_v1get_invocation_logs_response import FunctionsV1GetInvocationLogsResponse
57
+ from .functions_v1get_invocation_response import FunctionsV1GetInvocationResponse
58
+ from .functions_v1get_version_request import FunctionsV1GetVersionRequest
59
+ from .functions_v1get_version_response import FunctionsV1GetVersionResponse
60
+ from .functions_v1host import FunctionsV1Host
61
+ from .functions_v1instance import FunctionsV1Instance
62
+ from .functions_v1instance_status import FunctionsV1InstanceStatus
63
+ from .functions_v1invocation import FunctionsV1Invocation
64
+ from .functions_v1invocation_protocol import FunctionsV1InvocationProtocol
65
+ from .functions_v1invocation_stats import FunctionsV1InvocationStats
66
+ from .functions_v1invocation_status import FunctionsV1InvocationStatus
67
+ from .functions_v1invoke_async_response import FunctionsV1InvokeAsyncResponse
68
+ from .functions_v1invoke_response import FunctionsV1InvokeResponse
69
+ from .functions_v1invoke_response_error import FunctionsV1InvokeResponseError
70
+ from .functions_v1invoke_response_output import FunctionsV1InvokeResponseOutput
71
+ from .functions_v1json_schema_contract import FunctionsV1JsonSchemaContract
72
+ from .functions_v1list_function_versions_response import FunctionsV1ListFunctionVersionsResponse
73
+ from .functions_v1list_functions_response import FunctionsV1ListFunctionsResponse
74
+ from .functions_v1list_hosts_request import FunctionsV1ListHostsRequest
75
+ from .functions_v1list_hosts_response import FunctionsV1ListHostsResponse
76
+ from .functions_v1list_instances_response import FunctionsV1ListInstancesResponse
77
+ from .functions_v1list_invocations_response import FunctionsV1ListInvocationsResponse
78
+ from .functions_v1list_runtimes_request import FunctionsV1ListRuntimesRequest
79
+ from .functions_v1list_runtimes_response import FunctionsV1ListRuntimesResponse
80
+ from .functions_v1list_templates_request import FunctionsV1ListTemplatesRequest
81
+ from .functions_v1list_templates_response import FunctionsV1ListTemplatesResponse
82
+ from .functions_v1network import FunctionsV1Network
83
+ from .functions_v1pagination_request import FunctionsV1PaginationRequest
84
+ from .functions_v1pagination_response import FunctionsV1PaginationResponse
85
+ from .functions_v1resources import FunctionsV1Resources
86
+ from .functions_v1runtime import FunctionsV1Runtime
87
+ from .functions_v1runtime_starters import FunctionsV1RuntimeStarters
88
+ from .functions_v1source import FunctionsV1Source
89
+ from .functions_v1source_file import FunctionsV1SourceFile
90
+ from .functions_v1source_layer import FunctionsV1SourceLayer
91
+ from .functions_v1source_limits import FunctionsV1SourceLimits
92
+ from .functions_v1start_kind import FunctionsV1StartKind
93
+ from .functions_v1tail_invocations_request import FunctionsV1TailInvocationsRequest
94
+ from .functions_v1tail_invocations_response import FunctionsV1TailInvocationsResponse
95
+ from .functions_v1template import FunctionsV1Template
96
+ from .functions_v1template_source import FunctionsV1TemplateSource
97
+ from .functions_v1update_function_response import FunctionsV1UpdateFunctionResponse
98
+ from .google_protobuf_list_value import GoogleProtobufListValue
99
+ from .google_protobuf_null_value import GoogleProtobufNullValue
100
+ from .google_protobuf_struct import GoogleProtobufStruct
101
+ from .google_protobuf_value import GoogleProtobufValue
102
+ from .metrics_v1aggregate_row import MetricsV1AggregateRow
103
+ from .metrics_v1get_queue_response import MetricsV1GetQueueResponse
104
+ from .metrics_v1metric import MetricsV1Metric
105
+ from .metrics_v1metric_dimension import MetricsV1MetricDimension
106
+ from .metrics_v1metric_filter import MetricsV1MetricFilter
107
+ from .metrics_v1metric_granularity import MetricsV1MetricGranularity
108
+ from .metrics_v1query_aggregate_response import MetricsV1QueryAggregateResponse
109
+ from .metrics_v1query_timeseries_response import MetricsV1QueryTimeseriesResponse
110
+ from .metrics_v1timeseries import MetricsV1Timeseries
111
+ from .metrics_v1timeseries_point import MetricsV1TimeseriesPoint
112
+ _dynamic_imports: typing.Dict[str, str] = {
113
+ "AuthV1AcceptInviteResponse": ".auth_v1accept_invite_response",
114
+ "AuthV1CreateServiceAccountResponse": ".auth_v1create_service_account_response",
115
+ "AuthV1GetAuthConfigRequest": ".auth_v1get_auth_config_request",
116
+ "AuthV1GetAuthConfigResponse": ".auth_v1get_auth_config_response",
117
+ "AuthV1GetSessionRequest": ".auth_v1get_session_request",
118
+ "AuthV1GetSessionResponse": ".auth_v1get_session_response",
119
+ "AuthV1GetTokenResponse": ".auth_v1get_token_response",
120
+ "AuthV1InviteMemberResponse": ".auth_v1invite_member_response",
121
+ "AuthV1ListMembersRequest": ".auth_v1list_members_request",
122
+ "AuthV1ListMembersResponse": ".auth_v1list_members_response",
123
+ "AuthV1ListServiceAccountsRequest": ".auth_v1list_service_accounts_request",
124
+ "AuthV1ListServiceAccountsResponse": ".auth_v1list_service_accounts_response",
125
+ "AuthV1LoginResponse": ".auth_v1login_response",
126
+ "AuthV1LogoutRequest": ".auth_v1logout_request",
127
+ "AuthV1LogoutResponse": ".auth_v1logout_response",
128
+ "AuthV1Member": ".auth_v1member",
129
+ "AuthV1RegisterResponse": ".auth_v1register_response",
130
+ "AuthV1RemoveMemberResponse": ".auth_v1remove_member_response",
131
+ "AuthV1RemoveServiceAccountResponse": ".auth_v1remove_service_account_response",
132
+ "AuthV1Role": ".auth_v1role",
133
+ "AuthV1RotateServiceAccountSecretResponse": ".auth_v1rotate_service_account_secret_response",
134
+ "AuthV1ServiceAccount": ".auth_v1service_account",
135
+ "AuthV1SetMemberRoleResponse": ".auth_v1set_member_role_response",
136
+ "ConnectError": ".connect_error",
137
+ "ConnectErrorCode": ".connect_error_code",
138
+ "ConnectErrorDetailsAny": ".connect_error_details_any",
139
+ "ConnectProtocolVersion": ".connect_protocol_version",
140
+ "ConnectTimeoutHeader": ".connect_timeout_header",
141
+ "FunctionsV1ArrowContract": ".functions_v1arrow_contract",
142
+ "FunctionsV1Contract": ".functions_v1contract",
143
+ "FunctionsV1ContractArrow": ".functions_v1contract_arrow",
144
+ "FunctionsV1ContractJsonSchema": ".functions_v1contract_json_schema",
145
+ "FunctionsV1ContractViolation": ".functions_v1contract_violation",
146
+ "FunctionsV1CreateFunctionResponse": ".functions_v1create_function_response",
147
+ "FunctionsV1CreateFunctionVersionResponse": ".functions_v1create_function_version_response",
148
+ "FunctionsV1DeleteFunctionResponse": ".functions_v1delete_function_response",
149
+ "FunctionsV1Function": ".functions_v1function",
150
+ "FunctionsV1FunctionError": ".functions_v1function_error",
151
+ "FunctionsV1FunctionErrorKind": ".functions_v1function_error_kind",
152
+ "FunctionsV1FunctionSpec": ".functions_v1function_spec",
153
+ "FunctionsV1FunctionVersion": ".functions_v1function_version",
154
+ "FunctionsV1FunctionVersionStatus": ".functions_v1function_version_status",
155
+ "FunctionsV1GetFunctionResponse": ".functions_v1get_function_response",
156
+ "FunctionsV1GetFunctionVersionResponse": ".functions_v1get_function_version_response",
157
+ "FunctionsV1GetHostRequest": ".functions_v1get_host_request",
158
+ "FunctionsV1GetHostResponse": ".functions_v1get_host_response",
159
+ "FunctionsV1GetInvocationLogsRequest": ".functions_v1get_invocation_logs_request",
160
+ "FunctionsV1GetInvocationLogsResponse": ".functions_v1get_invocation_logs_response",
161
+ "FunctionsV1GetInvocationResponse": ".functions_v1get_invocation_response",
162
+ "FunctionsV1GetVersionRequest": ".functions_v1get_version_request",
163
+ "FunctionsV1GetVersionResponse": ".functions_v1get_version_response",
164
+ "FunctionsV1Host": ".functions_v1host",
165
+ "FunctionsV1Instance": ".functions_v1instance",
166
+ "FunctionsV1InstanceStatus": ".functions_v1instance_status",
167
+ "FunctionsV1Invocation": ".functions_v1invocation",
168
+ "FunctionsV1InvocationProtocol": ".functions_v1invocation_protocol",
169
+ "FunctionsV1InvocationStats": ".functions_v1invocation_stats",
170
+ "FunctionsV1InvocationStatus": ".functions_v1invocation_status",
171
+ "FunctionsV1InvokeAsyncResponse": ".functions_v1invoke_async_response",
172
+ "FunctionsV1InvokeResponse": ".functions_v1invoke_response",
173
+ "FunctionsV1InvokeResponseError": ".functions_v1invoke_response_error",
174
+ "FunctionsV1InvokeResponseOutput": ".functions_v1invoke_response_output",
175
+ "FunctionsV1JsonSchemaContract": ".functions_v1json_schema_contract",
176
+ "FunctionsV1ListFunctionVersionsResponse": ".functions_v1list_function_versions_response",
177
+ "FunctionsV1ListFunctionsResponse": ".functions_v1list_functions_response",
178
+ "FunctionsV1ListHostsRequest": ".functions_v1list_hosts_request",
179
+ "FunctionsV1ListHostsResponse": ".functions_v1list_hosts_response",
180
+ "FunctionsV1ListInstancesResponse": ".functions_v1list_instances_response",
181
+ "FunctionsV1ListInvocationsResponse": ".functions_v1list_invocations_response",
182
+ "FunctionsV1ListRuntimesRequest": ".functions_v1list_runtimes_request",
183
+ "FunctionsV1ListRuntimesResponse": ".functions_v1list_runtimes_response",
184
+ "FunctionsV1ListTemplatesRequest": ".functions_v1list_templates_request",
185
+ "FunctionsV1ListTemplatesResponse": ".functions_v1list_templates_response",
186
+ "FunctionsV1Network": ".functions_v1network",
187
+ "FunctionsV1PaginationRequest": ".functions_v1pagination_request",
188
+ "FunctionsV1PaginationResponse": ".functions_v1pagination_response",
189
+ "FunctionsV1Resources": ".functions_v1resources",
190
+ "FunctionsV1Runtime": ".functions_v1runtime",
191
+ "FunctionsV1RuntimeStarters": ".functions_v1runtime_starters",
192
+ "FunctionsV1Source": ".functions_v1source",
193
+ "FunctionsV1SourceFile": ".functions_v1source_file",
194
+ "FunctionsV1SourceLayer": ".functions_v1source_layer",
195
+ "FunctionsV1SourceLimits": ".functions_v1source_limits",
196
+ "FunctionsV1StartKind": ".functions_v1start_kind",
197
+ "FunctionsV1TailInvocationsRequest": ".functions_v1tail_invocations_request",
198
+ "FunctionsV1TailInvocationsResponse": ".functions_v1tail_invocations_response",
199
+ "FunctionsV1Template": ".functions_v1template",
200
+ "FunctionsV1TemplateSource": ".functions_v1template_source",
201
+ "FunctionsV1UpdateFunctionResponse": ".functions_v1update_function_response",
202
+ "GoogleProtobufListValue": ".google_protobuf_list_value",
203
+ "GoogleProtobufNullValue": ".google_protobuf_null_value",
204
+ "GoogleProtobufStruct": ".google_protobuf_struct",
205
+ "GoogleProtobufValue": ".google_protobuf_value",
206
+ "MetricsV1AggregateRow": ".metrics_v1aggregate_row",
207
+ "MetricsV1GetQueueResponse": ".metrics_v1get_queue_response",
208
+ "MetricsV1Metric": ".metrics_v1metric",
209
+ "MetricsV1MetricDimension": ".metrics_v1metric_dimension",
210
+ "MetricsV1MetricFilter": ".metrics_v1metric_filter",
211
+ "MetricsV1MetricGranularity": ".metrics_v1metric_granularity",
212
+ "MetricsV1QueryAggregateResponse": ".metrics_v1query_aggregate_response",
213
+ "MetricsV1QueryTimeseriesResponse": ".metrics_v1query_timeseries_response",
214
+ "MetricsV1Timeseries": ".metrics_v1timeseries",
215
+ "MetricsV1TimeseriesPoint": ".metrics_v1timeseries_point",
216
+ }
217
+
218
+
219
+ def __getattr__(attr_name: str) -> typing.Any:
220
+ module_name = _dynamic_imports.get(attr_name)
221
+ if module_name is None:
222
+ raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
223
+ try:
224
+ module = import_module(module_name, __package__)
225
+ if module_name == f".{attr_name}":
226
+ return module
227
+ else:
228
+ return getattr(module, attr_name)
229
+ except ImportError as e:
230
+ raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
231
+ except AttributeError as e:
232
+ raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
233
+
234
+
235
+ def __dir__():
236
+ lazy_attrs = list(_dynamic_imports.keys())
237
+ return sorted(lazy_attrs)
238
+
239
+
240
+ __all__ = [
241
+ "AuthV1AcceptInviteResponse",
242
+ "AuthV1CreateServiceAccountResponse",
243
+ "AuthV1GetAuthConfigRequest",
244
+ "AuthV1GetAuthConfigResponse",
245
+ "AuthV1GetSessionRequest",
246
+ "AuthV1GetSessionResponse",
247
+ "AuthV1GetTokenResponse",
248
+ "AuthV1InviteMemberResponse",
249
+ "AuthV1ListMembersRequest",
250
+ "AuthV1ListMembersResponse",
251
+ "AuthV1ListServiceAccountsRequest",
252
+ "AuthV1ListServiceAccountsResponse",
253
+ "AuthV1LoginResponse",
254
+ "AuthV1LogoutRequest",
255
+ "AuthV1LogoutResponse",
256
+ "AuthV1Member",
257
+ "AuthV1RegisterResponse",
258
+ "AuthV1RemoveMemberResponse",
259
+ "AuthV1RemoveServiceAccountResponse",
260
+ "AuthV1Role",
261
+ "AuthV1RotateServiceAccountSecretResponse",
262
+ "AuthV1ServiceAccount",
263
+ "AuthV1SetMemberRoleResponse",
264
+ "ConnectError",
265
+ "ConnectErrorCode",
266
+ "ConnectErrorDetailsAny",
267
+ "ConnectProtocolVersion",
268
+ "ConnectTimeoutHeader",
269
+ "FunctionsV1ArrowContract",
270
+ "FunctionsV1Contract",
271
+ "FunctionsV1ContractArrow",
272
+ "FunctionsV1ContractJsonSchema",
273
+ "FunctionsV1ContractViolation",
274
+ "FunctionsV1CreateFunctionResponse",
275
+ "FunctionsV1CreateFunctionVersionResponse",
276
+ "FunctionsV1DeleteFunctionResponse",
277
+ "FunctionsV1Function",
278
+ "FunctionsV1FunctionError",
279
+ "FunctionsV1FunctionErrorKind",
280
+ "FunctionsV1FunctionSpec",
281
+ "FunctionsV1FunctionVersion",
282
+ "FunctionsV1FunctionVersionStatus",
283
+ "FunctionsV1GetFunctionResponse",
284
+ "FunctionsV1GetFunctionVersionResponse",
285
+ "FunctionsV1GetHostRequest",
286
+ "FunctionsV1GetHostResponse",
287
+ "FunctionsV1GetInvocationLogsRequest",
288
+ "FunctionsV1GetInvocationLogsResponse",
289
+ "FunctionsV1GetInvocationResponse",
290
+ "FunctionsV1GetVersionRequest",
291
+ "FunctionsV1GetVersionResponse",
292
+ "FunctionsV1Host",
293
+ "FunctionsV1Instance",
294
+ "FunctionsV1InstanceStatus",
295
+ "FunctionsV1Invocation",
296
+ "FunctionsV1InvocationProtocol",
297
+ "FunctionsV1InvocationStats",
298
+ "FunctionsV1InvocationStatus",
299
+ "FunctionsV1InvokeAsyncResponse",
300
+ "FunctionsV1InvokeResponse",
301
+ "FunctionsV1InvokeResponseError",
302
+ "FunctionsV1InvokeResponseOutput",
303
+ "FunctionsV1JsonSchemaContract",
304
+ "FunctionsV1ListFunctionVersionsResponse",
305
+ "FunctionsV1ListFunctionsResponse",
306
+ "FunctionsV1ListHostsRequest",
307
+ "FunctionsV1ListHostsResponse",
308
+ "FunctionsV1ListInstancesResponse",
309
+ "FunctionsV1ListInvocationsResponse",
310
+ "FunctionsV1ListRuntimesRequest",
311
+ "FunctionsV1ListRuntimesResponse",
312
+ "FunctionsV1ListTemplatesRequest",
313
+ "FunctionsV1ListTemplatesResponse",
314
+ "FunctionsV1Network",
315
+ "FunctionsV1PaginationRequest",
316
+ "FunctionsV1PaginationResponse",
317
+ "FunctionsV1Resources",
318
+ "FunctionsV1Runtime",
319
+ "FunctionsV1RuntimeStarters",
320
+ "FunctionsV1Source",
321
+ "FunctionsV1SourceFile",
322
+ "FunctionsV1SourceLayer",
323
+ "FunctionsV1SourceLimits",
324
+ "FunctionsV1StartKind",
325
+ "FunctionsV1TailInvocationsRequest",
326
+ "FunctionsV1TailInvocationsResponse",
327
+ "FunctionsV1Template",
328
+ "FunctionsV1TemplateSource",
329
+ "FunctionsV1UpdateFunctionResponse",
330
+ "GoogleProtobufListValue",
331
+ "GoogleProtobufNullValue",
332
+ "GoogleProtobufStruct",
333
+ "GoogleProtobufValue",
334
+ "MetricsV1AggregateRow",
335
+ "MetricsV1GetQueueResponse",
336
+ "MetricsV1Metric",
337
+ "MetricsV1MetricDimension",
338
+ "MetricsV1MetricFilter",
339
+ "MetricsV1MetricGranularity",
340
+ "MetricsV1QueryAggregateResponse",
341
+ "MetricsV1QueryTimeseriesResponse",
342
+ "MetricsV1Timeseries",
343
+ "MetricsV1TimeseriesPoint",
344
+ ]
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ AuthV1AcceptInviteResponse = typing.Dict[str, typing.Any]
@@ -0,0 +1,34 @@
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 .auth_v1service_account import AuthV1ServiceAccount
10
+
11
+
12
+ class AuthV1CreateServiceAccountResponse(UniversalBaseModel):
13
+ """
14
+ CreateServiceAccountResponse returns client_secret exactly once. The app
15
+ does not persist it and Zitadel cannot retrieve it again.
16
+ """
17
+
18
+ service_account: typing_extensions.Annotated[
19
+ typing.Optional[AuthV1ServiceAccount],
20
+ FieldMetadata(alias="serviceAccount"),
21
+ pydantic.Field(alias="serviceAccount"),
22
+ ] = None
23
+ client_secret: typing_extensions.Annotated[
24
+ typing.Optional[str], FieldMetadata(alias="clientSecret"), pydantic.Field(alias="clientSecret")
25
+ ] = None
26
+
27
+ if IS_PYDANTIC_V2:
28
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
29
+ else:
30
+
31
+ class Config:
32
+ frozen = True
33
+ smart_union = True
34
+ extra = pydantic.Extra.allow
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ AuthV1GetAuthConfigRequest = typing.Dict[str, typing.Any]
@@ -0,0 +1,53 @@
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
+
10
+
11
+ class AuthV1GetAuthConfigResponse(UniversalBaseModel):
12
+ """
13
+ GetAuthConfigResponse tells clients how to authenticate. An empty issuer
14
+ means no provider is configured: the UI renders without a session and every
15
+ other AuthService RPC is unimplemented.
16
+ """
17
+
18
+ issuer: typing.Optional[str] = None
19
+ service_account_scopes: typing_extensions.Annotated[
20
+ typing.Optional[typing.List[str]],
21
+ FieldMetadata(alias="serviceAccountScopes"),
22
+ pydantic.Field(
23
+ alias="serviceAccountScopes",
24
+ description="service_account_scopes are requested by non-interactive clients. The\n provider owns these values so clients do not need provider-specific\n project IDs or reserved scope knowledge.",
25
+ ),
26
+ ] = None
27
+ """
28
+ service_account_scopes are requested by non-interactive clients. The
29
+ provider owns these values so clients do not need provider-specific
30
+ project IDs or reserved scope knowledge.
31
+ """
32
+
33
+ invite_only: typing_extensions.Annotated[
34
+ typing.Optional[bool],
35
+ FieldMetadata(alias="inviteOnly"),
36
+ pydantic.Field(
37
+ alias="inviteOnly",
38
+ description="invite_only means sign-up is closed: Register is refused and the UI\n offers no way to create an organization. People join by invitation.",
39
+ ),
40
+ ] = None
41
+ """
42
+ invite_only means sign-up is closed: Register is refused and the UI
43
+ offers no way to create an organization. People join by invitation.
44
+ """
45
+
46
+ if IS_PYDANTIC_V2:
47
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
48
+ else:
49
+
50
+ class Config:
51
+ frozen = True
52
+ smart_union = True
53
+ extra = pydantic.Extra.allow
@@ -0,0 +1,9 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ AuthV1GetSessionRequest = typing.Dict[str, typing.Any]
6
+ """
7
+ GetSessionRequest resolves the caller behind the session cookie. It is the
8
+ UI's sign-in check: unauthenticated means show the login page.
9
+ """
@@ -0,0 +1,28 @@
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
+
10
+
11
+ class AuthV1GetSessionResponse(UniversalBaseModel):
12
+ user_id: typing_extensions.Annotated[
13
+ typing.Optional[str], FieldMetadata(alias="userId"), pydantic.Field(alias="userId")
14
+ ] = None
15
+ name: typing.Optional[str] = None
16
+ email: typing.Optional[str] = None
17
+ avatar_url: typing_extensions.Annotated[
18
+ typing.Optional[str], FieldMetadata(alias="avatarUrl"), pydantic.Field(alias="avatarUrl")
19
+ ] = None
20
+
21
+ if IS_PYDANTIC_V2:
22
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
23
+ else:
24
+
25
+ class Config:
26
+ frozen = True
27
+ smart_union = True
28
+ extra = pydantic.Extra.allow
@@ -0,0 +1,29 @@
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
+
10
+
11
+ class AuthV1GetTokenResponse(UniversalBaseModel):
12
+ """
13
+ GetTokenResponse carries a bearer token and its lifetime in seconds.
14
+ Clients mint again as it nears expiry.
15
+ """
16
+
17
+ access_token: typing_extensions.Annotated[
18
+ str, FieldMetadata(alias="accessToken"), pydantic.Field(alias="accessToken")
19
+ ]
20
+ expires_in: typing_extensions.Annotated[int, FieldMetadata(alias="expiresIn"), pydantic.Field(alias="expiresIn")]
21
+
22
+ if IS_PYDANTIC_V2:
23
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
24
+ else:
25
+
26
+ class Config:
27
+ frozen = True
28
+ smart_union = True
29
+ extra = pydantic.Extra.allow