asteroid-odyssey 0.1.22__py3-none-any.whl → 0.4.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.
- asteroid_odyssey/__init__.py +28 -34
- asteroid_odyssey/agents_v1_gen/__init__.py +87 -0
- asteroid_odyssey/agents_v1_gen/api/__init__.py +7 -0
- asteroid_odyssey/agents_v1_gen/api/agent_profile_api.py +1696 -0
- asteroid_odyssey/agents_v1_gen/api/api_api.py +516 -0
- asteroid_odyssey/agents_v1_gen/api/execution_api.py +1734 -0
- asteroid_odyssey/agents_v1_gen/api_client.py +801 -0
- asteroid_odyssey/agents_v1_gen/api_response.py +21 -0
- asteroid_odyssey/agents_v1_gen/configuration.py +606 -0
- asteroid_odyssey/agents_v1_gen/exceptions.py +216 -0
- asteroid_odyssey/agents_v1_gen/models/__init__.py +34 -0
- asteroid_odyssey/agents_v1_gen/models/agent_profile.py +118 -0
- asteroid_odyssey/agents_v1_gen/models/browser_session_recording_response.py +87 -0
- asteroid_odyssey/agents_v1_gen/models/country_code.py +44 -0
- asteroid_odyssey/agents_v1_gen/models/create_agent_profile_request.py +112 -0
- asteroid_odyssey/agents_v1_gen/models/credential.py +95 -0
- asteroid_odyssey/agents_v1_gen/models/delete_agent_profile200_response.py +87 -0
- asteroid_odyssey/agents_v1_gen/models/error_response.py +87 -0
- asteroid_odyssey/agents_v1_gen/models/execution_response.py +87 -0
- asteroid_odyssey/agents_v1_gen/models/execution_result.py +101 -0
- asteroid_odyssey/agents_v1_gen/models/execution_result_response.py +100 -0
- asteroid_odyssey/agents_v1_gen/models/execution_status_response.py +95 -0
- asteroid_odyssey/agents_v1_gen/models/health_check200_response.py +87 -0
- asteroid_odyssey/agents_v1_gen/models/health_check500_response.py +87 -0
- asteroid_odyssey/agents_v1_gen/models/proxy_type.py +37 -0
- asteroid_odyssey/agents_v1_gen/models/status.py +43 -0
- asteroid_odyssey/agents_v1_gen/models/structured_agent_execution_request.py +89 -0
- asteroid_odyssey/agents_v1_gen/models/update_agent_profile_request.py +112 -0
- asteroid_odyssey/agents_v1_gen/models/upload_execution_files200_response.py +89 -0
- asteroid_odyssey/agents_v1_gen/rest.py +258 -0
- asteroid_odyssey/agents_v2_gen/__init__.py +99 -0
- asteroid_odyssey/agents_v2_gen/api/__init__.py +5 -0
- asteroid_odyssey/agents_v2_gen/api/execution_api.py +625 -0
- asteroid_odyssey/agents_v2_gen/api_client.py +801 -0
- asteroid_odyssey/agents_v2_gen/api_response.py +21 -0
- asteroid_odyssey/agents_v2_gen/configuration.py +612 -0
- asteroid_odyssey/agents_v2_gen/exceptions.py +216 -0
- asteroid_odyssey/agents_v2_gen/models/__init__.py +42 -0
- asteroid_odyssey/agents_v2_gen/models/activity_payload_union_action_completed.py +100 -0
- asteroid_odyssey/agents_v2_gen/models/activity_payload_union_action_failed.py +100 -0
- asteroid_odyssey/agents_v2_gen/models/activity_payload_union_action_started.py +100 -0
- asteroid_odyssey/agents_v2_gen/models/activity_payload_union_generic.py +100 -0
- asteroid_odyssey/agents_v2_gen/models/activity_payload_union_status_changed.py +100 -0
- asteroid_odyssey/agents_v2_gen/models/activity_payload_union_step_completed.py +100 -0
- asteroid_odyssey/agents_v2_gen/models/activity_payload_union_step_started.py +100 -0
- asteroid_odyssey/agents_v2_gen/models/activity_payload_union_terminal.py +100 -0
- asteroid_odyssey/agents_v2_gen/models/activity_payload_union_transitioned_node.py +100 -0
- asteroid_odyssey/agents_v2_gen/models/activity_payload_union_user_message_received.py +100 -0
- asteroid_odyssey/agents_v2_gen/models/error.py +89 -0
- asteroid_odyssey/agents_v2_gen/models/execution_activity.py +98 -0
- asteroid_odyssey/agents_v2_gen/models/execution_activity_action_completed_payload.py +87 -0
- asteroid_odyssey/agents_v2_gen/models/execution_activity_action_failed_payload.py +87 -0
- asteroid_odyssey/agents_v2_gen/models/execution_activity_action_started_payload.py +87 -0
- asteroid_odyssey/agents_v2_gen/models/execution_activity_generic_payload.py +87 -0
- asteroid_odyssey/agents_v2_gen/models/execution_activity_payload_union.py +252 -0
- asteroid_odyssey/agents_v2_gen/models/execution_activity_status_changed_payload.py +88 -0
- asteroid_odyssey/agents_v2_gen/models/execution_activity_step_completed_payload.py +87 -0
- asteroid_odyssey/agents_v2_gen/models/execution_activity_step_started_payload.py +87 -0
- asteroid_odyssey/agents_v2_gen/models/execution_activity_transitioned_node_payload.py +89 -0
- asteroid_odyssey/agents_v2_gen/models/execution_activity_user_message_received_payload.py +89 -0
- asteroid_odyssey/agents_v2_gen/models/execution_status.py +43 -0
- asteroid_odyssey/agents_v2_gen/models/execution_terminal_payload.py +96 -0
- asteroid_odyssey/agents_v2_gen/models/execution_user_messages_add_text_body.py +87 -0
- asteroid_odyssey/agents_v2_gen/models/versions.py +37 -0
- asteroid_odyssey/agents_v2_gen/rest.py +258 -0
- asteroid_odyssey/client.py +881 -304
- asteroid_odyssey-0.4.0.dist-info/METADATA +213 -0
- asteroid_odyssey-0.4.0.dist-info/RECORD +72 -0
- {asteroid_odyssey-0.1.22.dist-info → asteroid_odyssey-0.4.0.dist-info}/WHEEL +1 -1
- asteroid_odyssey/api/generated/asteroid_agents_api_client/__init__.py +0 -8
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/__init__.py +0 -1
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/agent/get_agents.py +0 -127
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/api/get_open_api.py +0 -79
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/api/health_check.py +0 -131
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/credentials/__init__.py +0 -0
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/credentials/get_credentials_public_key.py +0 -127
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/execution/__init__.py +0 -0
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/execution/delete_execution.py +0 -156
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/execution/get_browser_session.py +0 -154
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/execution/get_execution.py +0 -154
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/execution/get_execution_files.py +0 -159
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/execution/get_execution_progress.py +0 -159
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/execution/get_executions_for_workflow.py +0 -156
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/execution/update_execution_status.py +0 -115
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/notifications/__init__.py +0 -0
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/notifications/set_slack_channel.py +0 -107
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/optimiser/__init__.py +0 -0
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/optimiser/queue_optimisation_job.py +0 -103
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/workflow/__init__.py +0 -0
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/workflow/add_workflow_credential.py +0 -111
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/workflow/create_workflow.py +0 -174
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/workflow/delete_workflow.py +0 -156
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/workflow/delete_workflow_credentials.py +0 -96
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/workflow/execute_workflow.py +0 -179
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/workflow/get_agent_workflow_executions.py +0 -155
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/workflow/get_workflow.py +0 -154
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/workflow/get_workflow_credentials.py +0 -154
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/workflow/get_workflow_versions.py +0 -159
- asteroid_odyssey/api/generated/asteroid_agents_api_client/client.py +0 -268
- asteroid_odyssey/api/generated/asteroid_agents_api_client/errors.py +0 -16
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/__init__.py +0 -61
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/agent.py +0 -90
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/browser_session.py +0 -136
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/create_workflow_request.py +0 -126
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/create_workflow_request_fields.py +0 -48
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/create_workflow_request_provider.py +0 -9
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/credential.py +0 -66
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/credentials_request.py +0 -72
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/credentials_response.py +0 -80
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/delete_execution_response_200.py +0 -58
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/delete_execution_response_404.py +0 -58
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/delete_workflow_response_200.py +0 -58
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/delete_workflow_response_404.py +0 -58
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/execution.py +0 -147
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/execution_dynamic_data.py +0 -48
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/execution_result.py +0 -43
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/execution_status.py +0 -89
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/file.py +0 -127
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/health_check_response_200.py +0 -58
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/health_check_response_500.py +0 -58
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/optimisation_request.py +0 -59
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/progress_update.py +0 -77
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/result_schema.py +0 -51
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/slack_channel_request.py +0 -58
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/status.py +0 -13
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/workflow.py +0 -152
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/workflow_execution.py +0 -82
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/workflow_execution_request.py +0 -48
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/workflow_fields.py +0 -48
- asteroid_odyssey/api/generated/asteroid_agents_api_client/py.typed +0 -1
- asteroid_odyssey/api/generated/asteroid_agents_api_client/types.py +0 -45
- asteroid_odyssey/exceptions.py +0 -15
- asteroid_odyssey-0.1.22.dist-info/METADATA +0 -31
- asteroid_odyssey-0.1.22.dist-info/RECORD +0 -72
- asteroid_odyssey-0.1.22.dist-info/entry_points.txt +0 -2
- /asteroid_odyssey/{api/generated/asteroid_agents_api_client/api/agent/__init__.py → agents_v1_gen/py.typed} +0 -0
- /asteroid_odyssey/{api/generated/asteroid_agents_api_client/api/api/__init__.py → agents_v2_gen/py.typed} +0 -0
- {asteroid_odyssey-0.1.22.dist-info → asteroid_odyssey-0.4.0.dist-info}/top_level.txt +0 -0
asteroid_odyssey/api/generated/asteroid_agents_api_client/api/optimiser/queue_optimisation_job.py
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
from http import HTTPStatus
|
|
2
|
-
from typing import Any, Dict, Optional, Union
|
|
3
|
-
|
|
4
|
-
import httpx
|
|
5
|
-
|
|
6
|
-
from ... import errors
|
|
7
|
-
from ...client import AuthenticatedClient, Client
|
|
8
|
-
from ...models.optimisation_request import OptimisationRequest
|
|
9
|
-
from ...types import Response
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
def _get_kwargs(
|
|
13
|
-
*,
|
|
14
|
-
body: OptimisationRequest,
|
|
15
|
-
) -> Dict[str, Any]:
|
|
16
|
-
headers: Dict[str, Any] = {}
|
|
17
|
-
|
|
18
|
-
_kwargs: Dict[str, Any] = {
|
|
19
|
-
"method": "post",
|
|
20
|
-
"url": "/optimiser",
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
_body = body.to_dict()
|
|
24
|
-
|
|
25
|
-
_kwargs["json"] = _body
|
|
26
|
-
headers["Content-Type"] = "application/json"
|
|
27
|
-
|
|
28
|
-
_kwargs["headers"] = headers
|
|
29
|
-
return _kwargs
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
|
|
33
|
-
if response.status_code == 202:
|
|
34
|
-
return None
|
|
35
|
-
if client.raise_on_unexpected_status:
|
|
36
|
-
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
37
|
-
else:
|
|
38
|
-
return None
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
|
|
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: Union[AuthenticatedClient, Client],
|
|
53
|
-
body: OptimisationRequest,
|
|
54
|
-
) -> Response[Any]:
|
|
55
|
-
"""Queue an optimisation job
|
|
56
|
-
|
|
57
|
-
Args:
|
|
58
|
-
body (OptimisationRequest):
|
|
59
|
-
|
|
60
|
-
Raises:
|
|
61
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
62
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
63
|
-
|
|
64
|
-
Returns:
|
|
65
|
-
Response[Any]
|
|
66
|
-
"""
|
|
67
|
-
|
|
68
|
-
kwargs = _get_kwargs(
|
|
69
|
-
body=body,
|
|
70
|
-
)
|
|
71
|
-
|
|
72
|
-
response = client.get_httpx_client().request(
|
|
73
|
-
**kwargs,
|
|
74
|
-
)
|
|
75
|
-
|
|
76
|
-
return _build_response(client=client, response=response)
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
async def asyncio_detailed(
|
|
80
|
-
*,
|
|
81
|
-
client: Union[AuthenticatedClient, Client],
|
|
82
|
-
body: OptimisationRequest,
|
|
83
|
-
) -> Response[Any]:
|
|
84
|
-
"""Queue an optimisation job
|
|
85
|
-
|
|
86
|
-
Args:
|
|
87
|
-
body (OptimisationRequest):
|
|
88
|
-
|
|
89
|
-
Raises:
|
|
90
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
91
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
92
|
-
|
|
93
|
-
Returns:
|
|
94
|
-
Response[Any]
|
|
95
|
-
"""
|
|
96
|
-
|
|
97
|
-
kwargs = _get_kwargs(
|
|
98
|
-
body=body,
|
|
99
|
-
)
|
|
100
|
-
|
|
101
|
-
response = await client.get_async_httpx_client().request(**kwargs)
|
|
102
|
-
|
|
103
|
-
return _build_response(client=client, response=response)
|
|
File without changes
|
asteroid_odyssey/api/generated/asteroid_agents_api_client/api/workflow/add_workflow_credential.py
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
from http import HTTPStatus
|
|
2
|
-
from typing import Any, Dict, Optional, Union
|
|
3
|
-
from uuid import UUID
|
|
4
|
-
|
|
5
|
-
import httpx
|
|
6
|
-
|
|
7
|
-
from ... import errors
|
|
8
|
-
from ...client import AuthenticatedClient, Client
|
|
9
|
-
from ...models.credentials_request import CredentialsRequest
|
|
10
|
-
from ...types import Response
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
def _get_kwargs(
|
|
14
|
-
workflow_id: UUID,
|
|
15
|
-
*,
|
|
16
|
-
body: CredentialsRequest,
|
|
17
|
-
) -> Dict[str, Any]:
|
|
18
|
-
headers: Dict[str, Any] = {}
|
|
19
|
-
|
|
20
|
-
_kwargs: Dict[str, Any] = {
|
|
21
|
-
"method": "patch",
|
|
22
|
-
"url": f"/workflow/{workflow_id}/credentials",
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
_body = body.to_dict()
|
|
26
|
-
|
|
27
|
-
_kwargs["json"] = _body
|
|
28
|
-
headers["Content-Type"] = "application/json"
|
|
29
|
-
|
|
30
|
-
_kwargs["headers"] = headers
|
|
31
|
-
return _kwargs
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
|
|
35
|
-
if response.status_code == 200:
|
|
36
|
-
return None
|
|
37
|
-
if client.raise_on_unexpected_status:
|
|
38
|
-
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
39
|
-
else:
|
|
40
|
-
return None
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
|
|
44
|
-
return Response(
|
|
45
|
-
status_code=HTTPStatus(response.status_code),
|
|
46
|
-
content=response.content,
|
|
47
|
-
headers=response.headers,
|
|
48
|
-
parsed=_parse_response(client=client, response=response),
|
|
49
|
-
)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
def sync_detailed(
|
|
53
|
-
workflow_id: UUID,
|
|
54
|
-
*,
|
|
55
|
-
client: Union[AuthenticatedClient, Client],
|
|
56
|
-
body: CredentialsRequest,
|
|
57
|
-
) -> Response[Any]:
|
|
58
|
-
"""Add a credential for a workflow
|
|
59
|
-
|
|
60
|
-
Args:
|
|
61
|
-
workflow_id (UUID):
|
|
62
|
-
body (CredentialsRequest):
|
|
63
|
-
|
|
64
|
-
Raises:
|
|
65
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
66
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
67
|
-
|
|
68
|
-
Returns:
|
|
69
|
-
Response[Any]
|
|
70
|
-
"""
|
|
71
|
-
|
|
72
|
-
kwargs = _get_kwargs(
|
|
73
|
-
workflow_id=workflow_id,
|
|
74
|
-
body=body,
|
|
75
|
-
)
|
|
76
|
-
|
|
77
|
-
response = client.get_httpx_client().request(
|
|
78
|
-
**kwargs,
|
|
79
|
-
)
|
|
80
|
-
|
|
81
|
-
return _build_response(client=client, response=response)
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
async def asyncio_detailed(
|
|
85
|
-
workflow_id: UUID,
|
|
86
|
-
*,
|
|
87
|
-
client: Union[AuthenticatedClient, Client],
|
|
88
|
-
body: CredentialsRequest,
|
|
89
|
-
) -> Response[Any]:
|
|
90
|
-
"""Add a credential for a workflow
|
|
91
|
-
|
|
92
|
-
Args:
|
|
93
|
-
workflow_id (UUID):
|
|
94
|
-
body (CredentialsRequest):
|
|
95
|
-
|
|
96
|
-
Raises:
|
|
97
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
98
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
99
|
-
|
|
100
|
-
Returns:
|
|
101
|
-
Response[Any]
|
|
102
|
-
"""
|
|
103
|
-
|
|
104
|
-
kwargs = _get_kwargs(
|
|
105
|
-
workflow_id=workflow_id,
|
|
106
|
-
body=body,
|
|
107
|
-
)
|
|
108
|
-
|
|
109
|
-
response = await client.get_async_httpx_client().request(**kwargs)
|
|
110
|
-
|
|
111
|
-
return _build_response(client=client, response=response)
|
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
from http import HTTPStatus
|
|
2
|
-
from typing import Any, Dict, Optional, Union, cast
|
|
3
|
-
|
|
4
|
-
import httpx
|
|
5
|
-
|
|
6
|
-
from ... import errors
|
|
7
|
-
from ...client import AuthenticatedClient, Client
|
|
8
|
-
from ...models.create_workflow_request import CreateWorkflowRequest
|
|
9
|
-
from ...types import Response
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
def _get_kwargs(
|
|
13
|
-
agent_name: str,
|
|
14
|
-
*,
|
|
15
|
-
body: CreateWorkflowRequest,
|
|
16
|
-
) -> Dict[str, Any]:
|
|
17
|
-
headers: Dict[str, Any] = {}
|
|
18
|
-
|
|
19
|
-
_kwargs: Dict[str, Any] = {
|
|
20
|
-
"method": "post",
|
|
21
|
-
"url": f"/workflow/{agent_name}/create",
|
|
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[Union[Any, str]]:
|
|
36
|
-
if response.status_code == 201:
|
|
37
|
-
response_201 = cast(str, response.json())
|
|
38
|
-
return response_201
|
|
39
|
-
if response.status_code == 400:
|
|
40
|
-
response_400 = cast(Any, None)
|
|
41
|
-
return response_400
|
|
42
|
-
if client.raise_on_unexpected_status:
|
|
43
|
-
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
44
|
-
else:
|
|
45
|
-
return None
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
def _build_response(
|
|
49
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
50
|
-
) -> Response[Union[Any, str]]:
|
|
51
|
-
return Response(
|
|
52
|
-
status_code=HTTPStatus(response.status_code),
|
|
53
|
-
content=response.content,
|
|
54
|
-
headers=response.headers,
|
|
55
|
-
parsed=_parse_response(client=client, response=response),
|
|
56
|
-
)
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
def sync_detailed(
|
|
60
|
-
agent_name: str,
|
|
61
|
-
*,
|
|
62
|
-
client: Union[AuthenticatedClient, Client],
|
|
63
|
-
body: CreateWorkflowRequest,
|
|
64
|
-
) -> Response[Union[Any, str]]:
|
|
65
|
-
"""Create a new workflow for an agent
|
|
66
|
-
|
|
67
|
-
Args:
|
|
68
|
-
agent_name (str):
|
|
69
|
-
body (CreateWorkflowRequest):
|
|
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[Union[Any, str]]
|
|
77
|
-
"""
|
|
78
|
-
|
|
79
|
-
kwargs = _get_kwargs(
|
|
80
|
-
agent_name=agent_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
|
-
agent_name: str,
|
|
93
|
-
*,
|
|
94
|
-
client: Union[AuthenticatedClient, Client],
|
|
95
|
-
body: CreateWorkflowRequest,
|
|
96
|
-
) -> Optional[Union[Any, str]]:
|
|
97
|
-
"""Create a new workflow for an agent
|
|
98
|
-
|
|
99
|
-
Args:
|
|
100
|
-
agent_name (str):
|
|
101
|
-
body (CreateWorkflowRequest):
|
|
102
|
-
|
|
103
|
-
Raises:
|
|
104
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
105
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
106
|
-
|
|
107
|
-
Returns:
|
|
108
|
-
Union[Any, str]
|
|
109
|
-
"""
|
|
110
|
-
|
|
111
|
-
return sync_detailed(
|
|
112
|
-
agent_name=agent_name,
|
|
113
|
-
client=client,
|
|
114
|
-
body=body,
|
|
115
|
-
).parsed
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
async def asyncio_detailed(
|
|
119
|
-
agent_name: str,
|
|
120
|
-
*,
|
|
121
|
-
client: Union[AuthenticatedClient, Client],
|
|
122
|
-
body: CreateWorkflowRequest,
|
|
123
|
-
) -> Response[Union[Any, str]]:
|
|
124
|
-
"""Create a new workflow for an agent
|
|
125
|
-
|
|
126
|
-
Args:
|
|
127
|
-
agent_name (str):
|
|
128
|
-
body (CreateWorkflowRequest):
|
|
129
|
-
|
|
130
|
-
Raises:
|
|
131
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
132
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
133
|
-
|
|
134
|
-
Returns:
|
|
135
|
-
Response[Union[Any, str]]
|
|
136
|
-
"""
|
|
137
|
-
|
|
138
|
-
kwargs = _get_kwargs(
|
|
139
|
-
agent_name=agent_name,
|
|
140
|
-
body=body,
|
|
141
|
-
)
|
|
142
|
-
|
|
143
|
-
response = await client.get_async_httpx_client().request(**kwargs)
|
|
144
|
-
|
|
145
|
-
return _build_response(client=client, response=response)
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
async def asyncio(
|
|
149
|
-
agent_name: str,
|
|
150
|
-
*,
|
|
151
|
-
client: Union[AuthenticatedClient, Client],
|
|
152
|
-
body: CreateWorkflowRequest,
|
|
153
|
-
) -> Optional[Union[Any, str]]:
|
|
154
|
-
"""Create a new workflow for an agent
|
|
155
|
-
|
|
156
|
-
Args:
|
|
157
|
-
agent_name (str):
|
|
158
|
-
body (CreateWorkflowRequest):
|
|
159
|
-
|
|
160
|
-
Raises:
|
|
161
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
162
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
163
|
-
|
|
164
|
-
Returns:
|
|
165
|
-
Union[Any, str]
|
|
166
|
-
"""
|
|
167
|
-
|
|
168
|
-
return (
|
|
169
|
-
await asyncio_detailed(
|
|
170
|
-
agent_name=agent_name,
|
|
171
|
-
client=client,
|
|
172
|
-
body=body,
|
|
173
|
-
)
|
|
174
|
-
).parsed
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
from http import HTTPStatus
|
|
2
|
-
from typing import Any, Dict, Optional, Union
|
|
3
|
-
from uuid import UUID
|
|
4
|
-
|
|
5
|
-
import httpx
|
|
6
|
-
|
|
7
|
-
from ... import errors
|
|
8
|
-
from ...client import AuthenticatedClient, Client
|
|
9
|
-
from ...models.delete_workflow_response_200 import DeleteWorkflowResponse200
|
|
10
|
-
from ...models.delete_workflow_response_404 import DeleteWorkflowResponse404
|
|
11
|
-
from ...types import Response
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
def _get_kwargs(
|
|
15
|
-
workflow_id: UUID,
|
|
16
|
-
) -> Dict[str, Any]:
|
|
17
|
-
_kwargs: Dict[str, Any] = {
|
|
18
|
-
"method": "delete",
|
|
19
|
-
"url": f"/workflow/{workflow_id}",
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
return _kwargs
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
def _parse_response(
|
|
26
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
27
|
-
) -> Optional[Union[DeleteWorkflowResponse200, DeleteWorkflowResponse404]]:
|
|
28
|
-
if response.status_code == 200:
|
|
29
|
-
response_200 = DeleteWorkflowResponse200.from_dict(response.json())
|
|
30
|
-
|
|
31
|
-
return response_200
|
|
32
|
-
if response.status_code == 404:
|
|
33
|
-
response_404 = DeleteWorkflowResponse404.from_dict(response.json())
|
|
34
|
-
|
|
35
|
-
return response_404
|
|
36
|
-
if client.raise_on_unexpected_status:
|
|
37
|
-
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
38
|
-
else:
|
|
39
|
-
return None
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
def _build_response(
|
|
43
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
44
|
-
) -> Response[Union[DeleteWorkflowResponse200, DeleteWorkflowResponse404]]:
|
|
45
|
-
return Response(
|
|
46
|
-
status_code=HTTPStatus(response.status_code),
|
|
47
|
-
content=response.content,
|
|
48
|
-
headers=response.headers,
|
|
49
|
-
parsed=_parse_response(client=client, response=response),
|
|
50
|
-
)
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
def sync_detailed(
|
|
54
|
-
workflow_id: UUID,
|
|
55
|
-
*,
|
|
56
|
-
client: Union[AuthenticatedClient, Client],
|
|
57
|
-
) -> Response[Union[DeleteWorkflowResponse200, DeleteWorkflowResponse404]]:
|
|
58
|
-
"""Delete a workflow
|
|
59
|
-
|
|
60
|
-
Args:
|
|
61
|
-
workflow_id (UUID):
|
|
62
|
-
|
|
63
|
-
Raises:
|
|
64
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
65
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
66
|
-
|
|
67
|
-
Returns:
|
|
68
|
-
Response[Union[DeleteWorkflowResponse200, DeleteWorkflowResponse404]]
|
|
69
|
-
"""
|
|
70
|
-
|
|
71
|
-
kwargs = _get_kwargs(
|
|
72
|
-
workflow_id=workflow_id,
|
|
73
|
-
)
|
|
74
|
-
|
|
75
|
-
response = client.get_httpx_client().request(
|
|
76
|
-
**kwargs,
|
|
77
|
-
)
|
|
78
|
-
|
|
79
|
-
return _build_response(client=client, response=response)
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
def sync(
|
|
83
|
-
workflow_id: UUID,
|
|
84
|
-
*,
|
|
85
|
-
client: Union[AuthenticatedClient, Client],
|
|
86
|
-
) -> Optional[Union[DeleteWorkflowResponse200, DeleteWorkflowResponse404]]:
|
|
87
|
-
"""Delete a workflow
|
|
88
|
-
|
|
89
|
-
Args:
|
|
90
|
-
workflow_id (UUID):
|
|
91
|
-
|
|
92
|
-
Raises:
|
|
93
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
94
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
95
|
-
|
|
96
|
-
Returns:
|
|
97
|
-
Union[DeleteWorkflowResponse200, DeleteWorkflowResponse404]
|
|
98
|
-
"""
|
|
99
|
-
|
|
100
|
-
return sync_detailed(
|
|
101
|
-
workflow_id=workflow_id,
|
|
102
|
-
client=client,
|
|
103
|
-
).parsed
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
async def asyncio_detailed(
|
|
107
|
-
workflow_id: UUID,
|
|
108
|
-
*,
|
|
109
|
-
client: Union[AuthenticatedClient, Client],
|
|
110
|
-
) -> Response[Union[DeleteWorkflowResponse200, DeleteWorkflowResponse404]]:
|
|
111
|
-
"""Delete a workflow
|
|
112
|
-
|
|
113
|
-
Args:
|
|
114
|
-
workflow_id (UUID):
|
|
115
|
-
|
|
116
|
-
Raises:
|
|
117
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
118
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
119
|
-
|
|
120
|
-
Returns:
|
|
121
|
-
Response[Union[DeleteWorkflowResponse200, DeleteWorkflowResponse404]]
|
|
122
|
-
"""
|
|
123
|
-
|
|
124
|
-
kwargs = _get_kwargs(
|
|
125
|
-
workflow_id=workflow_id,
|
|
126
|
-
)
|
|
127
|
-
|
|
128
|
-
response = await client.get_async_httpx_client().request(**kwargs)
|
|
129
|
-
|
|
130
|
-
return _build_response(client=client, response=response)
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
async def asyncio(
|
|
134
|
-
workflow_id: UUID,
|
|
135
|
-
*,
|
|
136
|
-
client: Union[AuthenticatedClient, Client],
|
|
137
|
-
) -> Optional[Union[DeleteWorkflowResponse200, DeleteWorkflowResponse404]]:
|
|
138
|
-
"""Delete a workflow
|
|
139
|
-
|
|
140
|
-
Args:
|
|
141
|
-
workflow_id (UUID):
|
|
142
|
-
|
|
143
|
-
Raises:
|
|
144
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
145
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
146
|
-
|
|
147
|
-
Returns:
|
|
148
|
-
Union[DeleteWorkflowResponse200, DeleteWorkflowResponse404]
|
|
149
|
-
"""
|
|
150
|
-
|
|
151
|
-
return (
|
|
152
|
-
await asyncio_detailed(
|
|
153
|
-
workflow_id=workflow_id,
|
|
154
|
-
client=client,
|
|
155
|
-
)
|
|
156
|
-
).parsed
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
from http import HTTPStatus
|
|
2
|
-
from typing import Any, Dict, Optional, Union
|
|
3
|
-
from uuid import UUID
|
|
4
|
-
|
|
5
|
-
import httpx
|
|
6
|
-
|
|
7
|
-
from ... import errors
|
|
8
|
-
from ...client import AuthenticatedClient, Client
|
|
9
|
-
from ...types import Response
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
def _get_kwargs(
|
|
13
|
-
workflow_id: UUID,
|
|
14
|
-
) -> Dict[str, Any]:
|
|
15
|
-
_kwargs: Dict[str, Any] = {
|
|
16
|
-
"method": "delete",
|
|
17
|
-
"url": f"/workflow/{workflow_id}/credentials",
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
return _kwargs
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
|
|
24
|
-
if response.status_code == 200:
|
|
25
|
-
return None
|
|
26
|
-
if response.status_code == 404:
|
|
27
|
-
return None
|
|
28
|
-
if client.raise_on_unexpected_status:
|
|
29
|
-
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
30
|
-
else:
|
|
31
|
-
return None
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
|
|
35
|
-
return Response(
|
|
36
|
-
status_code=HTTPStatus(response.status_code),
|
|
37
|
-
content=response.content,
|
|
38
|
-
headers=response.headers,
|
|
39
|
-
parsed=_parse_response(client=client, response=response),
|
|
40
|
-
)
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
def sync_detailed(
|
|
44
|
-
workflow_id: UUID,
|
|
45
|
-
*,
|
|
46
|
-
client: Union[AuthenticatedClient, Client],
|
|
47
|
-
) -> Response[Any]:
|
|
48
|
-
"""Delete credentials for a workflow
|
|
49
|
-
|
|
50
|
-
Args:
|
|
51
|
-
workflow_id (UUID):
|
|
52
|
-
|
|
53
|
-
Raises:
|
|
54
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
55
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
56
|
-
|
|
57
|
-
Returns:
|
|
58
|
-
Response[Any]
|
|
59
|
-
"""
|
|
60
|
-
|
|
61
|
-
kwargs = _get_kwargs(
|
|
62
|
-
workflow_id=workflow_id,
|
|
63
|
-
)
|
|
64
|
-
|
|
65
|
-
response = client.get_httpx_client().request(
|
|
66
|
-
**kwargs,
|
|
67
|
-
)
|
|
68
|
-
|
|
69
|
-
return _build_response(client=client, response=response)
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
async def asyncio_detailed(
|
|
73
|
-
workflow_id: UUID,
|
|
74
|
-
*,
|
|
75
|
-
client: Union[AuthenticatedClient, Client],
|
|
76
|
-
) -> Response[Any]:
|
|
77
|
-
"""Delete credentials for a workflow
|
|
78
|
-
|
|
79
|
-
Args:
|
|
80
|
-
workflow_id (UUID):
|
|
81
|
-
|
|
82
|
-
Raises:
|
|
83
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
84
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
85
|
-
|
|
86
|
-
Returns:
|
|
87
|
-
Response[Any]
|
|
88
|
-
"""
|
|
89
|
-
|
|
90
|
-
kwargs = _get_kwargs(
|
|
91
|
-
workflow_id=workflow_id,
|
|
92
|
-
)
|
|
93
|
-
|
|
94
|
-
response = await client.get_async_httpx_client().request(**kwargs)
|
|
95
|
-
|
|
96
|
-
return _build_response(client=client, response=response)
|