asteroid-odyssey 0.1.21__py3-none-any.whl → 1.0.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 +20 -34
- asteroid_odyssey/client.py +387 -337
- asteroid_odyssey/openapi_client/__init__.py +73 -0
- asteroid_odyssey/openapi_client/api/__init__.py +7 -0
- asteroid_odyssey/openapi_client/api/api_api.py +516 -0
- asteroid_odyssey/openapi_client/api/execution_api.py +335 -0
- asteroid_odyssey/openapi_client/api/sdk_api.py +1434 -0
- asteroid_odyssey/openapi_client/api_client.py +801 -0
- asteroid_odyssey/openapi_client/api_response.py +21 -0
- asteroid_odyssey/openapi_client/configuration.py +606 -0
- asteroid_odyssey/openapi_client/exceptions.py +216 -0
- asteroid_odyssey/openapi_client/models/__init__.py +27 -0
- asteroid_odyssey/openapi_client/models/browser_session_recording_response.py +87 -0
- asteroid_odyssey/openapi_client/models/error_response.py +87 -0
- asteroid_odyssey/openapi_client/models/execution_response.py +87 -0
- asteroid_odyssey/openapi_client/models/execution_result.py +101 -0
- asteroid_odyssey/openapi_client/models/execution_result_response.py +100 -0
- asteroid_odyssey/openapi_client/models/execution_status_response.py +95 -0
- asteroid_odyssey/openapi_client/models/health_check200_response.py +87 -0
- asteroid_odyssey/openapi_client/models/health_check500_response.py +87 -0
- asteroid_odyssey/openapi_client/models/status.py +43 -0
- asteroid_odyssey/openapi_client/models/structured_agent_execution_request.py +89 -0
- asteroid_odyssey/openapi_client/models/upload_execution_files200_response.py +89 -0
- asteroid_odyssey/openapi_client/rest.py +258 -0
- asteroid_odyssey-1.0.0.dist-info/METADATA +208 -0
- asteroid_odyssey-1.0.0.dist-info/RECORD +29 -0
- {asteroid_odyssey-0.1.21.dist-info → asteroid_odyssey-1.0.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/__init__.py +0 -0
- 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.21.dist-info/METADATA +0 -31
- asteroid_odyssey-0.1.21.dist-info/RECORD +0 -72
- asteroid_odyssey-0.1.21.dist-info/entry_points.txt +0 -2
- /asteroid_odyssey/{api/generated/asteroid_agents_api_client/api/agent/__init__.py → openapi_client/py.typed} +0 -0
- {asteroid_odyssey-0.1.21.dist-info → asteroid_odyssey-1.0.0.dist-info}/top_level.txt +0 -0
asteroid_odyssey/api/generated/asteroid_agents_api_client/api/execution/update_execution_status.py
DELETED
|
@@ -1,115 +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.execution_status import ExecutionStatus
|
|
10
|
-
from ...types import Response
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
def _get_kwargs(
|
|
14
|
-
id: UUID,
|
|
15
|
-
*,
|
|
16
|
-
body: ExecutionStatus,
|
|
17
|
-
) -> Dict[str, Any]:
|
|
18
|
-
headers: Dict[str, Any] = {}
|
|
19
|
-
|
|
20
|
-
_kwargs: Dict[str, Any] = {
|
|
21
|
-
"method": "post",
|
|
22
|
-
"url": f"/execution/{id}/status",
|
|
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 response.status_code == 400:
|
|
38
|
-
return None
|
|
39
|
-
if response.status_code == 404:
|
|
40
|
-
return None
|
|
41
|
-
if client.raise_on_unexpected_status:
|
|
42
|
-
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
43
|
-
else:
|
|
44
|
-
return None
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
|
|
48
|
-
return Response(
|
|
49
|
-
status_code=HTTPStatus(response.status_code),
|
|
50
|
-
content=response.content,
|
|
51
|
-
headers=response.headers,
|
|
52
|
-
parsed=_parse_response(client=client, response=response),
|
|
53
|
-
)
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
def sync_detailed(
|
|
57
|
-
id: UUID,
|
|
58
|
-
*,
|
|
59
|
-
client: Union[AuthenticatedClient, Client],
|
|
60
|
-
body: ExecutionStatus,
|
|
61
|
-
) -> Response[Any]:
|
|
62
|
-
"""Update the status of an execution
|
|
63
|
-
|
|
64
|
-
Args:
|
|
65
|
-
id (UUID):
|
|
66
|
-
body (ExecutionStatus):
|
|
67
|
-
|
|
68
|
-
Raises:
|
|
69
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
70
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
71
|
-
|
|
72
|
-
Returns:
|
|
73
|
-
Response[Any]
|
|
74
|
-
"""
|
|
75
|
-
|
|
76
|
-
kwargs = _get_kwargs(
|
|
77
|
-
id=id,
|
|
78
|
-
body=body,
|
|
79
|
-
)
|
|
80
|
-
|
|
81
|
-
response = client.get_httpx_client().request(
|
|
82
|
-
**kwargs,
|
|
83
|
-
)
|
|
84
|
-
|
|
85
|
-
return _build_response(client=client, response=response)
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
async def asyncio_detailed(
|
|
89
|
-
id: UUID,
|
|
90
|
-
*,
|
|
91
|
-
client: Union[AuthenticatedClient, Client],
|
|
92
|
-
body: ExecutionStatus,
|
|
93
|
-
) -> Response[Any]:
|
|
94
|
-
"""Update the status of an execution
|
|
95
|
-
|
|
96
|
-
Args:
|
|
97
|
-
id (UUID):
|
|
98
|
-
body (ExecutionStatus):
|
|
99
|
-
|
|
100
|
-
Raises:
|
|
101
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
102
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
103
|
-
|
|
104
|
-
Returns:
|
|
105
|
-
Response[Any]
|
|
106
|
-
"""
|
|
107
|
-
|
|
108
|
-
kwargs = _get_kwargs(
|
|
109
|
-
id=id,
|
|
110
|
-
body=body,
|
|
111
|
-
)
|
|
112
|
-
|
|
113
|
-
response = await client.get_async_httpx_client().request(**kwargs)
|
|
114
|
-
|
|
115
|
-
return _build_response(client=client, response=response)
|
|
File without changes
|
asteroid_odyssey/api/generated/asteroid_agents_api_client/api/notifications/set_slack_channel.py
DELETED
|
@@ -1,107 +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.slack_channel_request import SlackChannelRequest
|
|
9
|
-
from ...types import Response
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
def _get_kwargs(
|
|
13
|
-
*,
|
|
14
|
-
body: SlackChannelRequest,
|
|
15
|
-
) -> Dict[str, Any]:
|
|
16
|
-
headers: Dict[str, Any] = {}
|
|
17
|
-
|
|
18
|
-
_kwargs: Dict[str, Any] = {
|
|
19
|
-
"method": "post",
|
|
20
|
-
"url": "/slack_channel",
|
|
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 == 200:
|
|
34
|
-
return None
|
|
35
|
-
if response.status_code == 400:
|
|
36
|
-
return None
|
|
37
|
-
if response.status_code == 404:
|
|
38
|
-
return None
|
|
39
|
-
if client.raise_on_unexpected_status:
|
|
40
|
-
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
41
|
-
else:
|
|
42
|
-
return None
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
|
|
46
|
-
return Response(
|
|
47
|
-
status_code=HTTPStatus(response.status_code),
|
|
48
|
-
content=response.content,
|
|
49
|
-
headers=response.headers,
|
|
50
|
-
parsed=_parse_response(client=client, response=response),
|
|
51
|
-
)
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
def sync_detailed(
|
|
55
|
-
*,
|
|
56
|
-
client: Union[AuthenticatedClient, Client],
|
|
57
|
-
body: SlackChannelRequest,
|
|
58
|
-
) -> Response[Any]:
|
|
59
|
-
"""Set your slack notification channel
|
|
60
|
-
|
|
61
|
-
Args:
|
|
62
|
-
body (SlackChannelRequest):
|
|
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
|
-
body=body,
|
|
74
|
-
)
|
|
75
|
-
|
|
76
|
-
response = client.get_httpx_client().request(
|
|
77
|
-
**kwargs,
|
|
78
|
-
)
|
|
79
|
-
|
|
80
|
-
return _build_response(client=client, response=response)
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
async def asyncio_detailed(
|
|
84
|
-
*,
|
|
85
|
-
client: Union[AuthenticatedClient, Client],
|
|
86
|
-
body: SlackChannelRequest,
|
|
87
|
-
) -> Response[Any]:
|
|
88
|
-
"""Set your slack notification channel
|
|
89
|
-
|
|
90
|
-
Args:
|
|
91
|
-
body (SlackChannelRequest):
|
|
92
|
-
|
|
93
|
-
Raises:
|
|
94
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
95
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
96
|
-
|
|
97
|
-
Returns:
|
|
98
|
-
Response[Any]
|
|
99
|
-
"""
|
|
100
|
-
|
|
101
|
-
kwargs = _get_kwargs(
|
|
102
|
-
body=body,
|
|
103
|
-
)
|
|
104
|
-
|
|
105
|
-
response = await client.get_async_httpx_client().request(**kwargs)
|
|
106
|
-
|
|
107
|
-
return _build_response(client=client, response=response)
|
|
File without changes
|
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
|