beamlit 0.0.18__py3-none-any.whl → 0.0.20__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- beamlit/agents/__init__.py +4 -0
- beamlit/agents/chat.py +87 -0
- beamlit/agents/decorator.py +147 -0
- beamlit/api/agents/create_agent.py +14 -9
- beamlit/api/agents/delete_agent_history.py +159 -0
- beamlit/api/agents/get_agent_deployment_logs.py +11 -11
- beamlit/api/{authentication_providers/list_organizations_for_authentication_provider.py → agents/get_agent_environment_logs.py} +30 -42
- beamlit/api/{authentication_providers/get_model_with_repo_for_authentication_provider.py → agents/get_agent_history.py} +43 -68
- beamlit/api/agents/list_agent_deployment_history.py +11 -11
- beamlit/api/agents/list_agent_deployments.py +11 -11
- beamlit/api/agents/list_agent_history.py +151 -0
- beamlit/api/agents/list_agents.py +11 -11
- beamlit/api/agents/put_agent_history.py +185 -0
- beamlit/api/agents/update_agent.py +14 -9
- beamlit/api/environments/list_environments.py +11 -11
- beamlit/api/functions/create_function.py +14 -9
- beamlit/api/functions/get_function_deployment_logs.py +11 -11
- beamlit/api/functions/get_function_environment_logs.py +151 -0
- beamlit/api/functions/list_function_deployments.py +11 -11
- beamlit/api/functions/list_functions.py +11 -11
- beamlit/api/functions/update_function.py +14 -9
- beamlit/api/history/get_agents_history.py +11 -11
- beamlit/api/history/list_agents_history.py +11 -11
- beamlit/api/integrations/create_integration_connection.py +167 -0
- beamlit/api/integrations/delete_integration_connection.py +158 -0
- beamlit/api/integrations/get_integration.py +97 -0
- beamlit/api/integrations/get_integration_connection.py +154 -0
- beamlit/api/integrations/get_integration_connection_model.py +97 -0
- beamlit/api/integrations/get_integration_model.py +97 -0
- beamlit/api/integrations/list_integration_connection_models.py +97 -0
- beamlit/api/integrations/list_integration_connections.py +139 -0
- beamlit/api/integrations/list_integration_models.py +97 -0
- beamlit/api/integrations/update_integration_connection.py +180 -0
- beamlit/api/invitations/list_all_pending_invitations.py +11 -11
- beamlit/api/locations/list_locations.py +11 -11
- beamlit/api/model_providers/list_model_providers.py +11 -11
- beamlit/api/models/get_model_deployment_logs.py +11 -11
- beamlit/api/{authentication_providers/list_models_for_authentication_provider.py → models/get_model_environment_logs.py} +30 -38
- beamlit/api/models/list_model_deployments.py +11 -11
- beamlit/api/models/list_models.py +11 -11
- beamlit/api/policies/list_policies.py +11 -11
- beamlit/api/service_accounts/get_workspace_service_accounts.py +11 -11
- beamlit/api/service_accounts/list_api_keys_for_service_account.py +11 -11
- beamlit/api/store/list_store_agents.py +11 -11
- beamlit/api/store/list_store_functions.py +11 -11
- beamlit/api/workspaces/list_workspace_users.py +11 -11
- beamlit/api/workspaces/list_workspaces.py +11 -11
- beamlit/authentication/__init__.py +29 -8
- beamlit/authentication/apikey.py +8 -2
- beamlit/authentication/authentication.py +66 -3
- beamlit/authentication/clientcredentials.py +108 -0
- beamlit/authentication/credentials.py +22 -8
- beamlit/authentication/device_mode.py +23 -13
- beamlit/common/__init__.py +13 -0
- beamlit/common/generate.py +183 -0
- beamlit/common/logger.py +29 -0
- beamlit/common/secrets.py +11 -0
- beamlit/common/settings.py +156 -0
- beamlit/common/utils.py +15 -0
- beamlit/functions/__init__.py +5 -0
- beamlit/functions/decorator.py +90 -0
- beamlit/functions/github/__init__.py +3 -0
- beamlit/functions/github/github.py +21 -0
- beamlit/functions/github/kit/__init__.py +7 -0
- beamlit/functions/github/kit/pull_request.py +51 -0
- beamlit/functions/math/__init__.py +3 -0
- beamlit/functions/math/math.py +40 -0
- beamlit/functions/search/__init__.py +3 -0
- beamlit/functions/search/search.py +15 -0
- beamlit/models/__init__.py +24 -0
- beamlit/models/acl.py +4 -2
- beamlit/models/agent.py +5 -3
- beamlit/models/agent_chain.py +4 -2
- beamlit/models/agent_configuration.py +4 -2
- beamlit/models/agent_deployment.py +41 -28
- beamlit/models/agent_deployment_configuration.py +4 -2
- beamlit/models/agent_deployment_configuration_type_0.py +43 -0
- beamlit/models/agent_deployment_history.py +7 -5
- beamlit/models/agent_deployment_history_event.py +11 -9
- beamlit/models/agent_deployment_pod_template.py +4 -2
- beamlit/models/agent_deployment_pod_template_type_0.py +43 -0
- beamlit/models/agent_history.py +165 -0
- beamlit/models/agent_history_event.py +131 -0
- beamlit/models/agent_metadata.py +144 -0
- beamlit/models/agent_release.py +4 -2
- beamlit/models/agent_spec.py +248 -0
- beamlit/models/agent_with_deployments.py +176 -0
- beamlit/models/api_key.py +4 -2
- beamlit/models/authentication_provider_model.py +8 -6
- beamlit/models/authentication_provider_organization.py +4 -2
- beamlit/models/configuration.py +12 -10
- beamlit/models/continent.py +4 -2
- beamlit/models/core_spec.py +185 -0
- beamlit/models/country.py +4 -2
- beamlit/models/create_api_key_for_service_account_body.py +4 -2
- beamlit/models/create_workspace_service_account_body.py +4 -2
- beamlit/models/create_workspace_service_account_response_200.py +4 -2
- beamlit/models/delete_workspace_service_account_response_200.py +4 -2
- beamlit/models/deployment_configuration.py +4 -2
- beamlit/models/deployment_configurations.py +22 -7
- beamlit/models/deployment_serverless_config.py +4 -2
- beamlit/models/deployment_serverless_config_type_0.py +220 -0
- beamlit/models/environment.py +9 -7
- beamlit/models/environment_metrics.py +26 -5
- beamlit/models/environment_spec.py +61 -0
- beamlit/models/flavor.py +11 -9
- beamlit/models/function.py +5 -3
- beamlit/models/function_configuration.py +4 -2
- beamlit/models/function_deployment.py +33 -20
- beamlit/models/function_deployment_configuration.py +4 -2
- beamlit/models/function_deployment_configuration_type_0.py +43 -0
- beamlit/models/function_deployment_pod_template.py +4 -2
- beamlit/models/function_deployment_pod_template_type_0.py +43 -0
- beamlit/models/function_kit.py +7 -5
- beamlit/models/function_metadata.py +144 -0
- beamlit/models/function_provider_ref.py +4 -2
- beamlit/models/function_release.py +4 -2
- beamlit/models/function_spec.py +246 -0
- beamlit/models/function_with_deployments.py +176 -0
- beamlit/models/get_workspace_service_accounts_response_200_item.py +4 -2
- beamlit/models/increase_and_rate_metric.py +104 -0
- beamlit/models/integration.py +198 -0
- beamlit/models/integration_config.py +45 -0
- beamlit/models/integration_connection.py +198 -0
- beamlit/models/integration_connection_config.py +45 -0
- beamlit/models/integration_connection_secret.py +61 -0
- beamlit/models/integration_connection_spec.py +99 -0
- beamlit/models/integration_model.py +144 -0
- beamlit/models/integration_secret.py +61 -0
- beamlit/models/invite_workspace_user_body.py +4 -2
- beamlit/models/labels_type_0.py +4 -2
- beamlit/models/location.py +7 -5
- beamlit/models/location_response.py +7 -5
- beamlit/models/metadata.py +135 -0
- beamlit/models/{labels.py → metadata_labels.py} +5 -5
- beamlit/models/metric.py +4 -2
- beamlit/models/metrics.py +68 -25
- beamlit/models/model.py +5 -3
- beamlit/models/model_deployment.py +27 -14
- beamlit/models/model_deployment_log.py +4 -2
- beamlit/models/model_deployment_metrics.py +11 -9
- beamlit/models/model_deployment_metrics_inference_per_second_per_region.py +7 -5
- beamlit/models/model_deployment_metrics_query_per_second_per_region_per_code.py +5 -3
- beamlit/models/model_deployment_pod_template.py +4 -2
- beamlit/models/model_deployment_pod_template_type_0.py +43 -0
- beamlit/models/model_metadata.py +144 -0
- beamlit/models/model_metrics.py +8 -6
- beamlit/models/model_provider.py +13 -11
- beamlit/models/model_provider_ref.py +4 -2
- beamlit/models/model_release.py +4 -2
- beamlit/models/model_spec.py +194 -0
- beamlit/models/model_with_deployments.py +8 -6
- beamlit/models/owner_fields.py +68 -0
- beamlit/models/pending_invitation.py +4 -2
- beamlit/models/pending_invitation_accept.py +5 -3
- beamlit/models/pending_invitation_render.py +7 -5
- beamlit/models/pending_invitation_render_invited_by.py +4 -2
- beamlit/models/pending_invitation_render_workspace.py +4 -2
- beamlit/models/pending_invitation_workspace_details.py +8 -6
- beamlit/models/pod_template_spec.py +43 -0
- beamlit/models/policy.py +22 -20
- beamlit/models/policy_location.py +11 -9
- beamlit/models/policy_spec.py +125 -0
- beamlit/models/provider_config.py +9 -16
- beamlit/models/qps.py +4 -2
- beamlit/models/resource_deployment_log.py +4 -2
- beamlit/models/resource_deployment_metrics.py +119 -9
- beamlit/models/resource_deployment_metrics_inference_per_region.py +77 -0
- beamlit/models/resource_deployment_metrics_inference_per_region_type_0.py +79 -0
- beamlit/models/resource_deployment_metrics_inference_per_second_per_region.py +7 -5
- beamlit/models/resource_deployment_metrics_inference_per_second_per_region_type_0.py +79 -0
- beamlit/models/resource_deployment_metrics_query_per_region_per_code.py +75 -0
- beamlit/models/resource_deployment_metrics_query_per_region_per_code_type_0.py +73 -0
- beamlit/models/resource_deployment_metrics_query_per_second_per_region_per_code.py +5 -3
- beamlit/models/resource_deployment_metrics_query_per_second_per_region_per_code_type_0.py +73 -0
- beamlit/models/resource_environment_metrics.py +210 -0
- beamlit/models/resource_environment_metrics_inference_per_second_per_region.py +79 -0
- beamlit/models/resource_environment_metrics_query_per_second_per_region_per_code.py +73 -0
- beamlit/models/resource_log.py +68 -0
- beamlit/models/resource_metrics.py +44 -6
- beamlit/models/runtime.py +25 -23
- beamlit/models/runtime_readiness_probe.py +4 -2
- beamlit/models/runtime_readiness_probe_type_0.py +43 -0
- beamlit/models/runtime_resources.py +4 -2
- beamlit/models/runtime_type_0.py +111 -0
- beamlit/models/runtime_type_0_readiness_probe.py +43 -0
- beamlit/models/runtime_type_0_readiness_probe_type_0.py +43 -0
- beamlit/models/runtime_type_0_resources.py +59 -0
- beamlit/models/serverless_config.py +4 -2
- beamlit/models/spec_configuration.py +68 -0
- beamlit/models/standard_fields_dynamo_db.py +4 -2
- beamlit/models/store_agent.py +8 -6
- beamlit/models/store_agent_configuration.py +4 -2
- beamlit/models/store_agent_labels.py +4 -2
- beamlit/models/store_agent_labels_type_0.py +43 -0
- beamlit/models/store_configuration.py +18 -16
- beamlit/models/store_configuration_option.py +4 -2
- beamlit/models/store_function.py +14 -12
- beamlit/models/store_function_configuration.py +4 -2
- beamlit/models/store_function_kit.py +7 -5
- beamlit/models/store_function_labels.py +4 -2
- beamlit/models/store_function_labels_type_0.py +43 -0
- beamlit/models/store_function_parameter.py +11 -9
- beamlit/models/time_fields.py +68 -0
- beamlit/models/update_workspace_service_account_body.py +4 -2
- beamlit/models/update_workspace_service_account_response_200.py +4 -2
- beamlit/models/update_workspace_user_role_body.py +4 -2
- beamlit/models/websocket_channel.py +86 -0
- beamlit/models/workspace.py +5 -3
- beamlit/models/workspace_labels.py +4 -2
- beamlit/models/workspace_user.py +4 -2
- beamlit/run.py +49 -0
- beamlit/serve/app.py +78 -0
- beamlit/serve/middlewares/__init__.py +4 -0
- beamlit/serve/middlewares/accesslog.py +14 -0
- beamlit/serve/middlewares/processtime.py +12 -0
- {beamlit-0.0.18.dist-info → beamlit-0.0.20.dist-info}/METADATA +11 -2
- beamlit-0.0.20.dist-info/RECORD +301 -0
- beamlit-0.0.18.dist-info/RECORD +0 -211
- /beamlit/api/{authentication_providers → integrations}/__init__.py +0 -0
- {beamlit-0.0.18.dist-info → beamlit-0.0.20.dist-info}/WHEEL +0 -0
@@ -0,0 +1,97 @@
|
|
1
|
+
from http import HTTPStatus
|
2
|
+
from typing import Any, Optional, Union
|
3
|
+
|
4
|
+
import httpx
|
5
|
+
|
6
|
+
from ... import errors
|
7
|
+
from ...client import AuthenticatedClient, Client
|
8
|
+
from ...types import Response
|
9
|
+
|
10
|
+
|
11
|
+
def _get_kwargs(
|
12
|
+
integration_name: str,
|
13
|
+
) -> dict[str, Any]:
|
14
|
+
_kwargs: dict[str, Any] = {
|
15
|
+
"method": "get",
|
16
|
+
"url": f"/integrations/{integration_name}/models/*modelId",
|
17
|
+
}
|
18
|
+
|
19
|
+
return _kwargs
|
20
|
+
|
21
|
+
|
22
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
|
23
|
+
if response.status_code == 200:
|
24
|
+
return None
|
25
|
+
if client.raise_on_unexpected_status:
|
26
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
27
|
+
else:
|
28
|
+
return None
|
29
|
+
|
30
|
+
|
31
|
+
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
|
32
|
+
return Response(
|
33
|
+
status_code=HTTPStatus(response.status_code),
|
34
|
+
content=response.content,
|
35
|
+
headers=response.headers,
|
36
|
+
parsed=_parse_response(client=client, response=response),
|
37
|
+
)
|
38
|
+
|
39
|
+
|
40
|
+
def sync_detailed(
|
41
|
+
integration_name: str,
|
42
|
+
*,
|
43
|
+
client: AuthenticatedClient,
|
44
|
+
) -> Response[Any]:
|
45
|
+
"""Get integration model
|
46
|
+
|
47
|
+
Returns a model for an integration by ID.
|
48
|
+
|
49
|
+
Args:
|
50
|
+
integration_name (str):
|
51
|
+
|
52
|
+
Raises:
|
53
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
54
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
55
|
+
|
56
|
+
Returns:
|
57
|
+
Response[Any]
|
58
|
+
"""
|
59
|
+
|
60
|
+
kwargs = _get_kwargs(
|
61
|
+
integration_name=integration_name,
|
62
|
+
)
|
63
|
+
|
64
|
+
response = client.get_httpx_client().request(
|
65
|
+
**kwargs,
|
66
|
+
)
|
67
|
+
|
68
|
+
return _build_response(client=client, response=response)
|
69
|
+
|
70
|
+
|
71
|
+
async def asyncio_detailed(
|
72
|
+
integration_name: str,
|
73
|
+
*,
|
74
|
+
client: AuthenticatedClient,
|
75
|
+
) -> Response[Any]:
|
76
|
+
"""Get integration model
|
77
|
+
|
78
|
+
Returns a model for an integration by ID.
|
79
|
+
|
80
|
+
Args:
|
81
|
+
integration_name (str):
|
82
|
+
|
83
|
+
Raises:
|
84
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
85
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
86
|
+
|
87
|
+
Returns:
|
88
|
+
Response[Any]
|
89
|
+
"""
|
90
|
+
|
91
|
+
kwargs = _get_kwargs(
|
92
|
+
integration_name=integration_name,
|
93
|
+
)
|
94
|
+
|
95
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
96
|
+
|
97
|
+
return _build_response(client=client, response=response)
|
@@ -0,0 +1,97 @@
|
|
1
|
+
from http import HTTPStatus
|
2
|
+
from typing import Any, Optional, Union
|
3
|
+
|
4
|
+
import httpx
|
5
|
+
|
6
|
+
from ... import errors
|
7
|
+
from ...client import AuthenticatedClient, Client
|
8
|
+
from ...types import Response
|
9
|
+
|
10
|
+
|
11
|
+
def _get_kwargs(
|
12
|
+
connection_name: str,
|
13
|
+
) -> dict[str, Any]:
|
14
|
+
_kwargs: dict[str, Any] = {
|
15
|
+
"method": "get",
|
16
|
+
"url": f"/integrations/connections/{connection_name}/models",
|
17
|
+
}
|
18
|
+
|
19
|
+
return _kwargs
|
20
|
+
|
21
|
+
|
22
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
|
23
|
+
if response.status_code == 200:
|
24
|
+
return None
|
25
|
+
if client.raise_on_unexpected_status:
|
26
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
27
|
+
else:
|
28
|
+
return None
|
29
|
+
|
30
|
+
|
31
|
+
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
|
32
|
+
return Response(
|
33
|
+
status_code=HTTPStatus(response.status_code),
|
34
|
+
content=response.content,
|
35
|
+
headers=response.headers,
|
36
|
+
parsed=_parse_response(client=client, response=response),
|
37
|
+
)
|
38
|
+
|
39
|
+
|
40
|
+
def sync_detailed(
|
41
|
+
connection_name: str,
|
42
|
+
*,
|
43
|
+
client: AuthenticatedClient,
|
44
|
+
) -> Response[Any]:
|
45
|
+
"""List integration connection models
|
46
|
+
|
47
|
+
Returns a list of all models for an integration connection.
|
48
|
+
|
49
|
+
Args:
|
50
|
+
connection_name (str):
|
51
|
+
|
52
|
+
Raises:
|
53
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
54
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
55
|
+
|
56
|
+
Returns:
|
57
|
+
Response[Any]
|
58
|
+
"""
|
59
|
+
|
60
|
+
kwargs = _get_kwargs(
|
61
|
+
connection_name=connection_name,
|
62
|
+
)
|
63
|
+
|
64
|
+
response = client.get_httpx_client().request(
|
65
|
+
**kwargs,
|
66
|
+
)
|
67
|
+
|
68
|
+
return _build_response(client=client, response=response)
|
69
|
+
|
70
|
+
|
71
|
+
async def asyncio_detailed(
|
72
|
+
connection_name: str,
|
73
|
+
*,
|
74
|
+
client: AuthenticatedClient,
|
75
|
+
) -> Response[Any]:
|
76
|
+
"""List integration connection models
|
77
|
+
|
78
|
+
Returns a list of all models for an integration connection.
|
79
|
+
|
80
|
+
Args:
|
81
|
+
connection_name (str):
|
82
|
+
|
83
|
+
Raises:
|
84
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
85
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
86
|
+
|
87
|
+
Returns:
|
88
|
+
Response[Any]
|
89
|
+
"""
|
90
|
+
|
91
|
+
kwargs = _get_kwargs(
|
92
|
+
connection_name=connection_name,
|
93
|
+
)
|
94
|
+
|
95
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
96
|
+
|
97
|
+
return _build_response(client=client, response=response)
|
@@ -0,0 +1,139 @@
|
|
1
|
+
from http import HTTPStatus
|
2
|
+
from typing import Any, Optional, Union
|
3
|
+
|
4
|
+
import httpx
|
5
|
+
|
6
|
+
from ... import errors
|
7
|
+
from ...client import AuthenticatedClient, Client
|
8
|
+
from ...models.integration_connection import IntegrationConnection
|
9
|
+
from ...types import Response
|
10
|
+
|
11
|
+
|
12
|
+
def _get_kwargs() -> dict[str, Any]:
|
13
|
+
_kwargs: dict[str, Any] = {
|
14
|
+
"method": "get",
|
15
|
+
"url": "/integrations/connections",
|
16
|
+
}
|
17
|
+
|
18
|
+
return _kwargs
|
19
|
+
|
20
|
+
|
21
|
+
def _parse_response(
|
22
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
23
|
+
) -> Optional[list["IntegrationConnection"]]:
|
24
|
+
if response.status_code == 200:
|
25
|
+
response_200 = []
|
26
|
+
_response_200 = response.json()
|
27
|
+
for response_200_item_data in _response_200:
|
28
|
+
response_200_item = IntegrationConnection.from_dict(response_200_item_data)
|
29
|
+
|
30
|
+
response_200.append(response_200_item)
|
31
|
+
|
32
|
+
return response_200
|
33
|
+
if client.raise_on_unexpected_status:
|
34
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
35
|
+
else:
|
36
|
+
return None
|
37
|
+
|
38
|
+
|
39
|
+
def _build_response(
|
40
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
41
|
+
) -> Response[list["IntegrationConnection"]]:
|
42
|
+
return Response(
|
43
|
+
status_code=HTTPStatus(response.status_code),
|
44
|
+
content=response.content,
|
45
|
+
headers=response.headers,
|
46
|
+
parsed=_parse_response(client=client, response=response),
|
47
|
+
)
|
48
|
+
|
49
|
+
|
50
|
+
def sync_detailed(
|
51
|
+
*,
|
52
|
+
client: AuthenticatedClient,
|
53
|
+
) -> Response[list["IntegrationConnection"]]:
|
54
|
+
"""List integrations connections
|
55
|
+
|
56
|
+
Returns a list of all connections integrations in the workspace.
|
57
|
+
|
58
|
+
Raises:
|
59
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
60
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
61
|
+
|
62
|
+
Returns:
|
63
|
+
Response[list['IntegrationConnection']]
|
64
|
+
"""
|
65
|
+
|
66
|
+
kwargs = _get_kwargs()
|
67
|
+
|
68
|
+
response = client.get_httpx_client().request(
|
69
|
+
**kwargs,
|
70
|
+
)
|
71
|
+
|
72
|
+
return _build_response(client=client, response=response)
|
73
|
+
|
74
|
+
|
75
|
+
def sync(
|
76
|
+
*,
|
77
|
+
client: AuthenticatedClient,
|
78
|
+
) -> Optional[list["IntegrationConnection"]]:
|
79
|
+
"""List integrations connections
|
80
|
+
|
81
|
+
Returns a list of all connections integrations in the workspace.
|
82
|
+
|
83
|
+
Raises:
|
84
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
85
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
86
|
+
|
87
|
+
Returns:
|
88
|
+
list['IntegrationConnection']
|
89
|
+
"""
|
90
|
+
|
91
|
+
return sync_detailed(
|
92
|
+
client=client,
|
93
|
+
).parsed
|
94
|
+
|
95
|
+
|
96
|
+
async def asyncio_detailed(
|
97
|
+
*,
|
98
|
+
client: AuthenticatedClient,
|
99
|
+
) -> Response[list["IntegrationConnection"]]:
|
100
|
+
"""List integrations connections
|
101
|
+
|
102
|
+
Returns a list of all connections integrations in the workspace.
|
103
|
+
|
104
|
+
Raises:
|
105
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
106
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
107
|
+
|
108
|
+
Returns:
|
109
|
+
Response[list['IntegrationConnection']]
|
110
|
+
"""
|
111
|
+
|
112
|
+
kwargs = _get_kwargs()
|
113
|
+
|
114
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
115
|
+
|
116
|
+
return _build_response(client=client, response=response)
|
117
|
+
|
118
|
+
|
119
|
+
async def asyncio(
|
120
|
+
*,
|
121
|
+
client: AuthenticatedClient,
|
122
|
+
) -> Optional[list["IntegrationConnection"]]:
|
123
|
+
"""List integrations connections
|
124
|
+
|
125
|
+
Returns a list of all connections integrations in the workspace.
|
126
|
+
|
127
|
+
Raises:
|
128
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
129
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
130
|
+
|
131
|
+
Returns:
|
132
|
+
list['IntegrationConnection']
|
133
|
+
"""
|
134
|
+
|
135
|
+
return (
|
136
|
+
await asyncio_detailed(
|
137
|
+
client=client,
|
138
|
+
)
|
139
|
+
).parsed
|
@@ -0,0 +1,97 @@
|
|
1
|
+
from http import HTTPStatus
|
2
|
+
from typing import Any, Optional, Union
|
3
|
+
|
4
|
+
import httpx
|
5
|
+
|
6
|
+
from ... import errors
|
7
|
+
from ...client import AuthenticatedClient, Client
|
8
|
+
from ...types import Response
|
9
|
+
|
10
|
+
|
11
|
+
def _get_kwargs(
|
12
|
+
integration_name: str,
|
13
|
+
) -> dict[str, Any]:
|
14
|
+
_kwargs: dict[str, Any] = {
|
15
|
+
"method": "get",
|
16
|
+
"url": f"/integrations/{integration_name}/models",
|
17
|
+
}
|
18
|
+
|
19
|
+
return _kwargs
|
20
|
+
|
21
|
+
|
22
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
|
23
|
+
if response.status_code == 200:
|
24
|
+
return None
|
25
|
+
if client.raise_on_unexpected_status:
|
26
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
27
|
+
else:
|
28
|
+
return None
|
29
|
+
|
30
|
+
|
31
|
+
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
|
32
|
+
return Response(
|
33
|
+
status_code=HTTPStatus(response.status_code),
|
34
|
+
content=response.content,
|
35
|
+
headers=response.headers,
|
36
|
+
parsed=_parse_response(client=client, response=response),
|
37
|
+
)
|
38
|
+
|
39
|
+
|
40
|
+
def sync_detailed(
|
41
|
+
integration_name: str,
|
42
|
+
*,
|
43
|
+
client: AuthenticatedClient,
|
44
|
+
) -> Response[Any]:
|
45
|
+
"""List integration models
|
46
|
+
|
47
|
+
Returns a list of all models for an integration.
|
48
|
+
|
49
|
+
Args:
|
50
|
+
integration_name (str):
|
51
|
+
|
52
|
+
Raises:
|
53
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
54
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
55
|
+
|
56
|
+
Returns:
|
57
|
+
Response[Any]
|
58
|
+
"""
|
59
|
+
|
60
|
+
kwargs = _get_kwargs(
|
61
|
+
integration_name=integration_name,
|
62
|
+
)
|
63
|
+
|
64
|
+
response = client.get_httpx_client().request(
|
65
|
+
**kwargs,
|
66
|
+
)
|
67
|
+
|
68
|
+
return _build_response(client=client, response=response)
|
69
|
+
|
70
|
+
|
71
|
+
async def asyncio_detailed(
|
72
|
+
integration_name: str,
|
73
|
+
*,
|
74
|
+
client: AuthenticatedClient,
|
75
|
+
) -> Response[Any]:
|
76
|
+
"""List integration models
|
77
|
+
|
78
|
+
Returns a list of all models for an integration.
|
79
|
+
|
80
|
+
Args:
|
81
|
+
integration_name (str):
|
82
|
+
|
83
|
+
Raises:
|
84
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
85
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
86
|
+
|
87
|
+
Returns:
|
88
|
+
Response[Any]
|
89
|
+
"""
|
90
|
+
|
91
|
+
kwargs = _get_kwargs(
|
92
|
+
integration_name=integration_name,
|
93
|
+
)
|
94
|
+
|
95
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
96
|
+
|
97
|
+
return _build_response(client=client, response=response)
|
@@ -0,0 +1,180 @@
|
|
1
|
+
from http import HTTPStatus
|
2
|
+
from typing import Any, Optional, Union
|
3
|
+
|
4
|
+
import httpx
|
5
|
+
|
6
|
+
from ... import errors
|
7
|
+
from ...client import AuthenticatedClient, Client
|
8
|
+
from ...models.integration_connection import IntegrationConnection
|
9
|
+
from ...types import Response
|
10
|
+
|
11
|
+
|
12
|
+
def _get_kwargs(
|
13
|
+
connection_name: str,
|
14
|
+
*,
|
15
|
+
body: IntegrationConnection,
|
16
|
+
) -> dict[str, Any]:
|
17
|
+
headers: dict[str, Any] = {}
|
18
|
+
|
19
|
+
_kwargs: dict[str, Any] = {
|
20
|
+
"method": "put",
|
21
|
+
"url": f"/integrations/connections/{connection_name}",
|
22
|
+
}
|
23
|
+
|
24
|
+
_body = body.to_dict()
|
25
|
+
|
26
|
+
_kwargs["json"] = _body
|
27
|
+
headers["Content-Type"] = "application/json"
|
28
|
+
|
29
|
+
_kwargs["headers"] = headers
|
30
|
+
return _kwargs
|
31
|
+
|
32
|
+
|
33
|
+
def _parse_response(
|
34
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
35
|
+
) -> Optional[IntegrationConnection]:
|
36
|
+
if response.status_code == 200:
|
37
|
+
response_200 = IntegrationConnection.from_dict(response.json())
|
38
|
+
|
39
|
+
return response_200
|
40
|
+
if client.raise_on_unexpected_status:
|
41
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
42
|
+
else:
|
43
|
+
return None
|
44
|
+
|
45
|
+
|
46
|
+
def _build_response(
|
47
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
48
|
+
) -> Response[IntegrationConnection]:
|
49
|
+
return Response(
|
50
|
+
status_code=HTTPStatus(response.status_code),
|
51
|
+
content=response.content,
|
52
|
+
headers=response.headers,
|
53
|
+
parsed=_parse_response(client=client, response=response),
|
54
|
+
)
|
55
|
+
|
56
|
+
|
57
|
+
def sync_detailed(
|
58
|
+
connection_name: str,
|
59
|
+
*,
|
60
|
+
client: Union[AuthenticatedClient, Client],
|
61
|
+
body: IntegrationConnection,
|
62
|
+
) -> Response[IntegrationConnection]:
|
63
|
+
"""Update integration connection
|
64
|
+
|
65
|
+
Update an integration connection by integration name and connection name.
|
66
|
+
|
67
|
+
Args:
|
68
|
+
connection_name (str):
|
69
|
+
body (IntegrationConnection): Integration Connection
|
70
|
+
|
71
|
+
Raises:
|
72
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
73
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
74
|
+
|
75
|
+
Returns:
|
76
|
+
Response[IntegrationConnection]
|
77
|
+
"""
|
78
|
+
|
79
|
+
kwargs = _get_kwargs(
|
80
|
+
connection_name=connection_name,
|
81
|
+
body=body,
|
82
|
+
)
|
83
|
+
|
84
|
+
response = client.get_httpx_client().request(
|
85
|
+
**kwargs,
|
86
|
+
)
|
87
|
+
|
88
|
+
return _build_response(client=client, response=response)
|
89
|
+
|
90
|
+
|
91
|
+
def sync(
|
92
|
+
connection_name: str,
|
93
|
+
*,
|
94
|
+
client: Union[AuthenticatedClient, Client],
|
95
|
+
body: IntegrationConnection,
|
96
|
+
) -> Optional[IntegrationConnection]:
|
97
|
+
"""Update integration connection
|
98
|
+
|
99
|
+
Update an integration connection by integration name and connection name.
|
100
|
+
|
101
|
+
Args:
|
102
|
+
connection_name (str):
|
103
|
+
body (IntegrationConnection): Integration Connection
|
104
|
+
|
105
|
+
Raises:
|
106
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
107
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
108
|
+
|
109
|
+
Returns:
|
110
|
+
IntegrationConnection
|
111
|
+
"""
|
112
|
+
|
113
|
+
return sync_detailed(
|
114
|
+
connection_name=connection_name,
|
115
|
+
client=client,
|
116
|
+
body=body,
|
117
|
+
).parsed
|
118
|
+
|
119
|
+
|
120
|
+
async def asyncio_detailed(
|
121
|
+
connection_name: str,
|
122
|
+
*,
|
123
|
+
client: Union[AuthenticatedClient, Client],
|
124
|
+
body: IntegrationConnection,
|
125
|
+
) -> Response[IntegrationConnection]:
|
126
|
+
"""Update integration connection
|
127
|
+
|
128
|
+
Update an integration connection by integration name and connection name.
|
129
|
+
|
130
|
+
Args:
|
131
|
+
connection_name (str):
|
132
|
+
body (IntegrationConnection): Integration Connection
|
133
|
+
|
134
|
+
Raises:
|
135
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
136
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
137
|
+
|
138
|
+
Returns:
|
139
|
+
Response[IntegrationConnection]
|
140
|
+
"""
|
141
|
+
|
142
|
+
kwargs = _get_kwargs(
|
143
|
+
connection_name=connection_name,
|
144
|
+
body=body,
|
145
|
+
)
|
146
|
+
|
147
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
148
|
+
|
149
|
+
return _build_response(client=client, response=response)
|
150
|
+
|
151
|
+
|
152
|
+
async def asyncio(
|
153
|
+
connection_name: str,
|
154
|
+
*,
|
155
|
+
client: Union[AuthenticatedClient, Client],
|
156
|
+
body: IntegrationConnection,
|
157
|
+
) -> Optional[IntegrationConnection]:
|
158
|
+
"""Update integration connection
|
159
|
+
|
160
|
+
Update an integration connection by integration name and connection name.
|
161
|
+
|
162
|
+
Args:
|
163
|
+
connection_name (str):
|
164
|
+
body (IntegrationConnection): Integration Connection
|
165
|
+
|
166
|
+
Raises:
|
167
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
168
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
169
|
+
|
170
|
+
Returns:
|
171
|
+
IntegrationConnection
|
172
|
+
"""
|
173
|
+
|
174
|
+
return (
|
175
|
+
await asyncio_detailed(
|
176
|
+
connection_name=connection_name,
|
177
|
+
client=client,
|
178
|
+
body=body,
|
179
|
+
)
|
180
|
+
).parsed
|
@@ -1,5 +1,5 @@
|
|
1
1
|
from http import HTTPStatus
|
2
|
-
from typing import Any,
|
2
|
+
from typing import Any, Optional, Union, cast
|
3
3
|
|
4
4
|
import httpx
|
5
5
|
|
@@ -20,7 +20,7 @@ def _get_kwargs() -> dict[str, Any]:
|
|
20
20
|
|
21
21
|
def _parse_response(
|
22
22
|
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
23
|
-
) -> Optional[Union[Any,
|
23
|
+
) -> Optional[Union[Any, list["PendingInvitationRender"]]]:
|
24
24
|
if response.status_code == 200:
|
25
25
|
response_200 = []
|
26
26
|
_response_200 = response.json()
|
@@ -41,7 +41,7 @@ def _parse_response(
|
|
41
41
|
|
42
42
|
def _build_response(
|
43
43
|
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
44
|
-
) -> Response[Union[Any,
|
44
|
+
) -> Response[Union[Any, list["PendingInvitationRender"]]]:
|
45
45
|
return Response(
|
46
46
|
status_code=HTTPStatus(response.status_code),
|
47
47
|
content=response.content,
|
@@ -53,7 +53,7 @@ def _build_response(
|
|
53
53
|
def sync_detailed(
|
54
54
|
*,
|
55
55
|
client: AuthenticatedClient,
|
56
|
-
) -> Response[Union[Any,
|
56
|
+
) -> Response[Union[Any, list["PendingInvitationRender"]]]:
|
57
57
|
"""List pending invitations
|
58
58
|
|
59
59
|
Returns a list of all pending invitations in the workspace.
|
@@ -63,7 +63,7 @@ def sync_detailed(
|
|
63
63
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
64
64
|
|
65
65
|
Returns:
|
66
|
-
Response[Union[Any,
|
66
|
+
Response[Union[Any, list['PendingInvitationRender']]]
|
67
67
|
"""
|
68
68
|
|
69
69
|
kwargs = _get_kwargs()
|
@@ -78,7 +78,7 @@ def sync_detailed(
|
|
78
78
|
def sync(
|
79
79
|
*,
|
80
80
|
client: AuthenticatedClient,
|
81
|
-
) -> Optional[Union[Any,
|
81
|
+
) -> Optional[Union[Any, list["PendingInvitationRender"]]]:
|
82
82
|
"""List pending invitations
|
83
83
|
|
84
84
|
Returns a list of all pending invitations in the workspace.
|
@@ -88,7 +88,7 @@ def sync(
|
|
88
88
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
89
89
|
|
90
90
|
Returns:
|
91
|
-
Union[Any,
|
91
|
+
Union[Any, list['PendingInvitationRender']]
|
92
92
|
"""
|
93
93
|
|
94
94
|
return sync_detailed(
|
@@ -99,7 +99,7 @@ def sync(
|
|
99
99
|
async def asyncio_detailed(
|
100
100
|
*,
|
101
101
|
client: AuthenticatedClient,
|
102
|
-
) -> Response[Union[Any,
|
102
|
+
) -> Response[Union[Any, list["PendingInvitationRender"]]]:
|
103
103
|
"""List pending invitations
|
104
104
|
|
105
105
|
Returns a list of all pending invitations in the workspace.
|
@@ -109,7 +109,7 @@ async def asyncio_detailed(
|
|
109
109
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
110
110
|
|
111
111
|
Returns:
|
112
|
-
Response[Union[Any,
|
112
|
+
Response[Union[Any, list['PendingInvitationRender']]]
|
113
113
|
"""
|
114
114
|
|
115
115
|
kwargs = _get_kwargs()
|
@@ -122,7 +122,7 @@ async def asyncio_detailed(
|
|
122
122
|
async def asyncio(
|
123
123
|
*,
|
124
124
|
client: AuthenticatedClient,
|
125
|
-
) -> Optional[Union[Any,
|
125
|
+
) -> Optional[Union[Any, list["PendingInvitationRender"]]]:
|
126
126
|
"""List pending invitations
|
127
127
|
|
128
128
|
Returns a list of all pending invitations in the workspace.
|
@@ -132,7 +132,7 @@ async def asyncio(
|
|
132
132
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
133
133
|
|
134
134
|
Returns:
|
135
|
-
Union[Any,
|
135
|
+
Union[Any, list['PendingInvitationRender']]
|
136
136
|
"""
|
137
137
|
|
138
138
|
return (
|