asteroid-odyssey 1.1.0__py3-none-any.whl → 1.2.1__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 +10 -2
- 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/{openapi_client → agents_v1_gen}/api/api_api.py +4 -4
- asteroid_odyssey/{openapi_client → agents_v1_gen}/api/execution_api.py +10 -10
- asteroid_odyssey/{openapi_client → agents_v1_gen}/api_client.py +6 -6
- asteroid_odyssey/{openapi_client → agents_v1_gen}/configuration.py +2 -2
- 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/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/{openapi_client → agents_v1_gen}/models/execution_result_response.py +2 -2
- asteroid_odyssey/{openapi_client → agents_v1_gen}/models/execution_status_response.py +1 -1
- asteroid_odyssey/agents_v1_gen/models/proxy_type.py +37 -0
- asteroid_odyssey/agents_v1_gen/models/update_agent_profile_request.py +112 -0
- asteroid_odyssey/{openapi_client → agents_v1_gen}/rest.py +1 -1
- 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/py.typed +0 -0
- asteroid_odyssey/agents_v2_gen/rest.py +258 -0
- asteroid_odyssey/client.py +635 -123
- {asteroid_odyssey-1.1.0.dist-info → asteroid_odyssey-1.2.1.dist-info}/METADATA +2 -1
- asteroid_odyssey-1.2.1.dist-info/RECORD +72 -0
- asteroid_odyssey/openapi_client/__init__.py +0 -71
- asteroid_odyssey/openapi_client/api/__init__.py +0 -6
- asteroid_odyssey/openapi_client/models/__init__.py +0 -27
- asteroid_odyssey-1.1.0.dist-info/RECORD +0 -28
- /asteroid_odyssey/{openapi_client → agents_v1_gen}/api_response.py +0 -0
- /asteroid_odyssey/{openapi_client → agents_v1_gen}/exceptions.py +0 -0
- /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/browser_session_recording_response.py +0 -0
- /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/error_response.py +0 -0
- /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/execution_response.py +0 -0
- /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/execution_result.py +0 -0
- /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/health_check200_response.py +0 -0
- /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/health_check500_response.py +0 -0
- /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/status.py +0 -0
- /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/structured_agent_execution_request.py +0 -0
- /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/upload_execution_files200_response.py +0 -0
- /asteroid_odyssey/{openapi_client → agents_v1_gen}/py.typed +0 -0
- {asteroid_odyssey-1.1.0.dist-info → asteroid_odyssey-1.2.1.dist-info}/WHEEL +0 -0
- {asteroid_odyssey-1.1.0.dist-info → asteroid_odyssey-1.2.1.dist-info}/top_level.txt +0 -0
|
@@ -16,11 +16,11 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
|
16
16
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
17
|
from typing_extensions import Annotated
|
|
18
18
|
|
|
19
|
-
from asteroid_odyssey.
|
|
19
|
+
from asteroid_odyssey.agents_v1_gen.models.health_check200_response import HealthCheck200Response
|
|
20
20
|
|
|
21
|
-
from asteroid_odyssey.
|
|
22
|
-
from asteroid_odyssey.
|
|
23
|
-
from asteroid_odyssey.
|
|
21
|
+
from asteroid_odyssey.agents_v1_gen.api_client import ApiClient, RequestSerialized
|
|
22
|
+
from asteroid_odyssey.agents_v1_gen.api_response import ApiResponse
|
|
23
|
+
from asteroid_odyssey.agents_v1_gen.rest import RESTResponseType
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
class APIApi:
|
|
@@ -19,16 +19,16 @@ from typing_extensions import Annotated
|
|
|
19
19
|
from pydantic import Field, StrictBytes, StrictStr
|
|
20
20
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
21
21
|
from typing_extensions import Annotated
|
|
22
|
-
from asteroid_odyssey.
|
|
23
|
-
from asteroid_odyssey.
|
|
24
|
-
from asteroid_odyssey.
|
|
25
|
-
from asteroid_odyssey.
|
|
26
|
-
from asteroid_odyssey.
|
|
27
|
-
from asteroid_odyssey.
|
|
22
|
+
from asteroid_odyssey.agents_v1_gen.models.browser_session_recording_response import BrowserSessionRecordingResponse
|
|
23
|
+
from asteroid_odyssey.agents_v1_gen.models.execution_response import ExecutionResponse
|
|
24
|
+
from asteroid_odyssey.agents_v1_gen.models.execution_result_response import ExecutionResultResponse
|
|
25
|
+
from asteroid_odyssey.agents_v1_gen.models.execution_status_response import ExecutionStatusResponse
|
|
26
|
+
from asteroid_odyssey.agents_v1_gen.models.structured_agent_execution_request import StructuredAgentExecutionRequest
|
|
27
|
+
from asteroid_odyssey.agents_v1_gen.models.upload_execution_files200_response import UploadExecutionFiles200Response
|
|
28
28
|
|
|
29
|
-
from asteroid_odyssey.
|
|
30
|
-
from asteroid_odyssey.
|
|
31
|
-
from asteroid_odyssey.
|
|
29
|
+
from asteroid_odyssey.agents_v1_gen.api_client import ApiClient, RequestSerialized
|
|
30
|
+
from asteroid_odyssey.agents_v1_gen.api_response import ApiResponse
|
|
31
|
+
from asteroid_odyssey.agents_v1_gen.rest import RESTResponseType
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
class ExecutionApi:
|
|
@@ -560,7 +560,7 @@ class ExecutionApi:
|
|
|
560
560
|
*_param,
|
|
561
561
|
_request_timeout=_request_timeout
|
|
562
562
|
)
|
|
563
|
-
return response_data.
|
|
563
|
+
return response_data.response
|
|
564
564
|
|
|
565
565
|
|
|
566
566
|
def _execute_agent_structured_serialize(
|
|
@@ -26,11 +26,11 @@ from urllib.parse import quote
|
|
|
26
26
|
from typing import Tuple, Optional, List, Dict, Union
|
|
27
27
|
from pydantic import SecretStr
|
|
28
28
|
|
|
29
|
-
from asteroid_odyssey.
|
|
30
|
-
from asteroid_odyssey.
|
|
31
|
-
import asteroid_odyssey.
|
|
32
|
-
from asteroid_odyssey.
|
|
33
|
-
from asteroid_odyssey.
|
|
29
|
+
from asteroid_odyssey.agents_v1_gen.configuration import Configuration
|
|
30
|
+
from asteroid_odyssey.agents_v1_gen.api_response import ApiResponse, T as ApiResponseT
|
|
31
|
+
import asteroid_odyssey.agents_v1_gen.models
|
|
32
|
+
from asteroid_odyssey.agents_v1_gen import rest
|
|
33
|
+
from asteroid_odyssey.agents_v1_gen.exceptions import (
|
|
34
34
|
ApiValueError,
|
|
35
35
|
ApiException,
|
|
36
36
|
BadRequestException,
|
|
@@ -453,7 +453,7 @@ class ApiClient:
|
|
|
453
453
|
if klass in self.NATIVE_TYPES_MAPPING:
|
|
454
454
|
klass = self.NATIVE_TYPES_MAPPING[klass]
|
|
455
455
|
else:
|
|
456
|
-
klass = getattr(asteroid_odyssey.
|
|
456
|
+
klass = getattr(asteroid_odyssey.agents_v1_gen.models, klass)
|
|
457
457
|
|
|
458
458
|
if klass in self.PRIMITIVE_TYPES:
|
|
459
459
|
return self.__deserialize_primitive(data, klass)
|
|
@@ -177,7 +177,7 @@ class Configuration:
|
|
|
177
177
|
|
|
178
178
|
You can programmatically set the cookie:
|
|
179
179
|
|
|
180
|
-
conf = asteroid_odyssey.
|
|
180
|
+
conf = asteroid_odyssey.agents_v1_gen.Configuration(
|
|
181
181
|
api_key={'cookieAuth': 'abc123'}
|
|
182
182
|
api_key_prefix={'cookieAuth': 'JSESSIONID'}
|
|
183
183
|
)
|
|
@@ -252,7 +252,7 @@ conf = asteroid_odyssey.openapi_client.Configuration(
|
|
|
252
252
|
self.logger = {}
|
|
253
253
|
"""Logging Settings
|
|
254
254
|
"""
|
|
255
|
-
self.logger["package_logger"] = logging.getLogger("asteroid_odyssey.
|
|
255
|
+
self.logger["package_logger"] = logging.getLogger("asteroid_odyssey.agents_v1_gen")
|
|
256
256
|
self.logger["urllib3_logger"] = logging.getLogger("urllib3")
|
|
257
257
|
self.logger_format = '%(asctime)s %(levelname)s %(message)s'
|
|
258
258
|
"""Log format
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
# flake8: noqa
|
|
4
|
+
"""
|
|
5
|
+
Asteroid Agents API
|
|
6
|
+
|
|
7
|
+
Version 1 of the Asteroid Agents API
|
|
8
|
+
|
|
9
|
+
The version of the OpenAPI document: v1.0.0
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# import models into model package
|
|
17
|
+
from asteroid_odyssey.agents_v1_gen.models.agent_profile import AgentProfile
|
|
18
|
+
from asteroid_odyssey.agents_v1_gen.models.browser_session_recording_response import BrowserSessionRecordingResponse
|
|
19
|
+
from asteroid_odyssey.agents_v1_gen.models.country_code import CountryCode
|
|
20
|
+
from asteroid_odyssey.agents_v1_gen.models.create_agent_profile_request import CreateAgentProfileRequest
|
|
21
|
+
from asteroid_odyssey.agents_v1_gen.models.credential import Credential
|
|
22
|
+
from asteroid_odyssey.agents_v1_gen.models.delete_agent_profile200_response import DeleteAgentProfile200Response
|
|
23
|
+
from asteroid_odyssey.agents_v1_gen.models.error_response import ErrorResponse
|
|
24
|
+
from asteroid_odyssey.agents_v1_gen.models.execution_response import ExecutionResponse
|
|
25
|
+
from asteroid_odyssey.agents_v1_gen.models.execution_result import ExecutionResult
|
|
26
|
+
from asteroid_odyssey.agents_v1_gen.models.execution_result_response import ExecutionResultResponse
|
|
27
|
+
from asteroid_odyssey.agents_v1_gen.models.execution_status_response import ExecutionStatusResponse
|
|
28
|
+
from asteroid_odyssey.agents_v1_gen.models.health_check200_response import HealthCheck200Response
|
|
29
|
+
from asteroid_odyssey.agents_v1_gen.models.health_check500_response import HealthCheck500Response
|
|
30
|
+
from asteroid_odyssey.agents_v1_gen.models.proxy_type import ProxyType
|
|
31
|
+
from asteroid_odyssey.agents_v1_gen.models.status import Status
|
|
32
|
+
from asteroid_odyssey.agents_v1_gen.models.structured_agent_execution_request import StructuredAgentExecutionRequest
|
|
33
|
+
from asteroid_odyssey.agents_v1_gen.models.update_agent_profile_request import UpdateAgentProfileRequest
|
|
34
|
+
from asteroid_odyssey.agents_v1_gen.models.upload_execution_files200_response import UploadExecutionFiles200Response
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Asteroid Agents API
|
|
5
|
+
|
|
6
|
+
Version 1 of the Asteroid Agents API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from datetime import datetime
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
|
23
|
+
from asteroid_odyssey.agents_v1_gen.models.country_code import CountryCode
|
|
24
|
+
from asteroid_odyssey.agents_v1_gen.models.credential import Credential
|
|
25
|
+
from asteroid_odyssey.agents_v1_gen.models.proxy_type import ProxyType
|
|
26
|
+
from typing import Optional, Set
|
|
27
|
+
from typing_extensions import Self
|
|
28
|
+
|
|
29
|
+
class AgentProfile(BaseModel):
|
|
30
|
+
"""
|
|
31
|
+
AgentProfile
|
|
32
|
+
""" # noqa: E501
|
|
33
|
+
id: StrictStr = Field(description="Unique identifier for the agent profile")
|
|
34
|
+
name: StrictStr = Field(description="Name of the agent profile (unique within organization)")
|
|
35
|
+
description: StrictStr = Field(description="Description of the agent profile")
|
|
36
|
+
organization_id: StrictStr = Field(description="The ID of the organization that the agent profile belongs to")
|
|
37
|
+
proxy_cc: CountryCode
|
|
38
|
+
proxy_type: ProxyType
|
|
39
|
+
captcha_solver_active: StrictBool = Field(description="Whether the captcha solver is active for this profile")
|
|
40
|
+
sticky_ip: StrictBool = Field(description="Whether the same IP address should be used for all executions of this profile")
|
|
41
|
+
credentials: List[Credential] = Field(description="List of credentials associated with this agent profile")
|
|
42
|
+
created_at: datetime = Field(description="The date and time the agent profile was created")
|
|
43
|
+
updated_at: datetime = Field(description="The last update time of the agent profile")
|
|
44
|
+
__properties: ClassVar[List[str]] = ["id", "name", "description", "organization_id", "proxy_cc", "proxy_type", "captcha_solver_active", "sticky_ip", "credentials", "created_at", "updated_at"]
|
|
45
|
+
|
|
46
|
+
model_config = ConfigDict(
|
|
47
|
+
populate_by_name=True,
|
|
48
|
+
validate_assignment=True,
|
|
49
|
+
protected_namespaces=(),
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def to_str(self) -> str:
|
|
54
|
+
"""Returns the string representation of the model using alias"""
|
|
55
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
56
|
+
|
|
57
|
+
def to_json(self) -> str:
|
|
58
|
+
"""Returns the JSON representation of the model using alias"""
|
|
59
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
60
|
+
return json.dumps(self.to_dict())
|
|
61
|
+
|
|
62
|
+
@classmethod
|
|
63
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
64
|
+
"""Create an instance of AgentProfile from a JSON string"""
|
|
65
|
+
return cls.from_dict(json.loads(json_str))
|
|
66
|
+
|
|
67
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
68
|
+
"""Return the dictionary representation of the model using alias.
|
|
69
|
+
|
|
70
|
+
This has the following differences from calling pydantic's
|
|
71
|
+
`self.model_dump(by_alias=True)`:
|
|
72
|
+
|
|
73
|
+
* `None` is only added to the output dict for nullable fields that
|
|
74
|
+
were set at model initialization. Other fields with value `None`
|
|
75
|
+
are ignored.
|
|
76
|
+
"""
|
|
77
|
+
excluded_fields: Set[str] = set([
|
|
78
|
+
])
|
|
79
|
+
|
|
80
|
+
_dict = self.model_dump(
|
|
81
|
+
by_alias=True,
|
|
82
|
+
exclude=excluded_fields,
|
|
83
|
+
exclude_none=True,
|
|
84
|
+
)
|
|
85
|
+
# override the default output from pydantic by calling `to_dict()` of each item in credentials (list)
|
|
86
|
+
_items = []
|
|
87
|
+
if self.credentials:
|
|
88
|
+
for _item_credentials in self.credentials:
|
|
89
|
+
if _item_credentials:
|
|
90
|
+
_items.append(_item_credentials.to_dict())
|
|
91
|
+
_dict['credentials'] = _items
|
|
92
|
+
return _dict
|
|
93
|
+
|
|
94
|
+
@classmethod
|
|
95
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
96
|
+
"""Create an instance of AgentProfile from a dict"""
|
|
97
|
+
if obj is None:
|
|
98
|
+
return None
|
|
99
|
+
|
|
100
|
+
if not isinstance(obj, dict):
|
|
101
|
+
return cls.model_validate(obj)
|
|
102
|
+
|
|
103
|
+
_obj = cls.model_validate({
|
|
104
|
+
"id": obj.get("id"),
|
|
105
|
+
"name": obj.get("name"),
|
|
106
|
+
"description": obj.get("description"),
|
|
107
|
+
"organization_id": obj.get("organization_id"),
|
|
108
|
+
"proxy_cc": obj.get("proxy_cc"),
|
|
109
|
+
"proxy_type": obj.get("proxy_type"),
|
|
110
|
+
"captcha_solver_active": obj.get("captcha_solver_active"),
|
|
111
|
+
"sticky_ip": obj.get("sticky_ip"),
|
|
112
|
+
"credentials": [Credential.from_dict(_item) for _item in obj["credentials"]] if obj.get("credentials") is not None else None,
|
|
113
|
+
"created_at": obj.get("created_at"),
|
|
114
|
+
"updated_at": obj.get("updated_at")
|
|
115
|
+
})
|
|
116
|
+
return _obj
|
|
117
|
+
|
|
118
|
+
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Asteroid Agents API
|
|
5
|
+
|
|
6
|
+
Version 1 of the Asteroid Agents API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import json
|
|
17
|
+
from enum import Enum
|
|
18
|
+
from typing_extensions import Self
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class CountryCode(str, Enum):
|
|
22
|
+
"""
|
|
23
|
+
Two-letter country code for proxy location
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
allowed enum values
|
|
28
|
+
"""
|
|
29
|
+
US = 'us'
|
|
30
|
+
UK = 'uk'
|
|
31
|
+
FR = 'fr'
|
|
32
|
+
IT = 'it'
|
|
33
|
+
JP = 'jp'
|
|
34
|
+
AU = 'au'
|
|
35
|
+
DE = 'de'
|
|
36
|
+
FI = 'fi'
|
|
37
|
+
CA = 'ca'
|
|
38
|
+
|
|
39
|
+
@classmethod
|
|
40
|
+
def from_json(cls, json_str: str) -> Self:
|
|
41
|
+
"""Create an instance of CountryCode from a JSON string"""
|
|
42
|
+
return cls(json.loads(json_str))
|
|
43
|
+
|
|
44
|
+
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Asteroid Agents API
|
|
5
|
+
|
|
6
|
+
Version 1 of the Asteroid Agents API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing_extensions import Annotated
|
|
23
|
+
from asteroid_odyssey.agents_v1_gen.models.country_code import CountryCode
|
|
24
|
+
from asteroid_odyssey.agents_v1_gen.models.credential import Credential
|
|
25
|
+
from asteroid_odyssey.agents_v1_gen.models.proxy_type import ProxyType
|
|
26
|
+
from typing import Optional, Set
|
|
27
|
+
from typing_extensions import Self
|
|
28
|
+
|
|
29
|
+
class CreateAgentProfileRequest(BaseModel):
|
|
30
|
+
"""
|
|
31
|
+
CreateAgentProfileRequest
|
|
32
|
+
""" # noqa: E501
|
|
33
|
+
name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Name of the agent profile (must be unique within organization)")
|
|
34
|
+
description: Annotated[str, Field(strict=True, max_length=1000)] = Field(description="Description of the agent profile")
|
|
35
|
+
organization_id: StrictStr = Field(description="The ID of the organization that the agent profile belongs to")
|
|
36
|
+
proxy_cc: CountryCode
|
|
37
|
+
proxy_type: ProxyType
|
|
38
|
+
captcha_solver_active: StrictBool = Field(description="Whether the captcha solver should be active for this profile")
|
|
39
|
+
sticky_ip: StrictBool = Field(description="Whether the same IP address should be used for all executions of this profile")
|
|
40
|
+
credentials: List[Credential] = Field(description="Optional list of credentials to create with the profile")
|
|
41
|
+
__properties: ClassVar[List[str]] = ["name", "description", "organization_id", "proxy_cc", "proxy_type", "captcha_solver_active", "sticky_ip", "credentials"]
|
|
42
|
+
|
|
43
|
+
model_config = ConfigDict(
|
|
44
|
+
populate_by_name=True,
|
|
45
|
+
validate_assignment=True,
|
|
46
|
+
protected_namespaces=(),
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def to_str(self) -> str:
|
|
51
|
+
"""Returns the string representation of the model using alias"""
|
|
52
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
53
|
+
|
|
54
|
+
def to_json(self) -> str:
|
|
55
|
+
"""Returns the JSON representation of the model using alias"""
|
|
56
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
57
|
+
return json.dumps(self.to_dict())
|
|
58
|
+
|
|
59
|
+
@classmethod
|
|
60
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
61
|
+
"""Create an instance of CreateAgentProfileRequest from a JSON string"""
|
|
62
|
+
return cls.from_dict(json.loads(json_str))
|
|
63
|
+
|
|
64
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
65
|
+
"""Return the dictionary representation of the model using alias.
|
|
66
|
+
|
|
67
|
+
This has the following differences from calling pydantic's
|
|
68
|
+
`self.model_dump(by_alias=True)`:
|
|
69
|
+
|
|
70
|
+
* `None` is only added to the output dict for nullable fields that
|
|
71
|
+
were set at model initialization. Other fields with value `None`
|
|
72
|
+
are ignored.
|
|
73
|
+
"""
|
|
74
|
+
excluded_fields: Set[str] = set([
|
|
75
|
+
])
|
|
76
|
+
|
|
77
|
+
_dict = self.model_dump(
|
|
78
|
+
by_alias=True,
|
|
79
|
+
exclude=excluded_fields,
|
|
80
|
+
exclude_none=True,
|
|
81
|
+
)
|
|
82
|
+
# override the default output from pydantic by calling `to_dict()` of each item in credentials (list)
|
|
83
|
+
_items = []
|
|
84
|
+
if self.credentials:
|
|
85
|
+
for _item_credentials in self.credentials:
|
|
86
|
+
if _item_credentials:
|
|
87
|
+
_items.append(_item_credentials.to_dict())
|
|
88
|
+
_dict['credentials'] = _items
|
|
89
|
+
return _dict
|
|
90
|
+
|
|
91
|
+
@classmethod
|
|
92
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
93
|
+
"""Create an instance of CreateAgentProfileRequest from a dict"""
|
|
94
|
+
if obj is None:
|
|
95
|
+
return None
|
|
96
|
+
|
|
97
|
+
if not isinstance(obj, dict):
|
|
98
|
+
return cls.model_validate(obj)
|
|
99
|
+
|
|
100
|
+
_obj = cls.model_validate({
|
|
101
|
+
"name": obj.get("name"),
|
|
102
|
+
"description": obj.get("description"),
|
|
103
|
+
"organization_id": obj.get("organization_id"),
|
|
104
|
+
"proxy_cc": obj.get("proxy_cc"),
|
|
105
|
+
"proxy_type": obj.get("proxy_type"),
|
|
106
|
+
"captcha_solver_active": obj.get("captcha_solver_active") if obj.get("captcha_solver_active") is not None else False,
|
|
107
|
+
"sticky_ip": obj.get("sticky_ip") if obj.get("sticky_ip") is not None else False,
|
|
108
|
+
"credentials": [Credential.from_dict(_item) for _item in obj["credentials"]] if obj.get("credentials") is not None else None
|
|
109
|
+
})
|
|
110
|
+
return _obj
|
|
111
|
+
|
|
112
|
+
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Asteroid Agents API
|
|
5
|
+
|
|
6
|
+
Version 1 of the Asteroid Agents API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from datetime import datetime
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing_extensions import Annotated
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class Credential(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
Credential
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
id: Optional[StrictStr] = Field(default=None, description="The unique identifier for this credential")
|
|
32
|
+
name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="The credential name")
|
|
33
|
+
data: Annotated[str, Field(min_length=1, strict=True)] = Field(description="The encrypted credential")
|
|
34
|
+
created_at: Optional[datetime] = Field(default=None, description="When the credential was created")
|
|
35
|
+
__properties: ClassVar[List[str]] = ["id", "name", "data", "created_at"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
+
return json.dumps(self.to_dict())
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of Credential from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
return _dict
|
|
77
|
+
|
|
78
|
+
@classmethod
|
|
79
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
80
|
+
"""Create an instance of Credential from a dict"""
|
|
81
|
+
if obj is None:
|
|
82
|
+
return None
|
|
83
|
+
|
|
84
|
+
if not isinstance(obj, dict):
|
|
85
|
+
return cls.model_validate(obj)
|
|
86
|
+
|
|
87
|
+
_obj = cls.model_validate({
|
|
88
|
+
"id": obj.get("id"),
|
|
89
|
+
"name": obj.get("name"),
|
|
90
|
+
"data": obj.get("data"),
|
|
91
|
+
"created_at": obj.get("created_at")
|
|
92
|
+
})
|
|
93
|
+
return _obj
|
|
94
|
+
|
|
95
|
+
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Asteroid Agents API
|
|
5
|
+
|
|
6
|
+
Version 1 of the Asteroid Agents API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class DeleteAgentProfile200Response(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
DeleteAgentProfile200Response
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
message: Optional[StrictStr] = None
|
|
30
|
+
__properties: ClassVar[List[str]] = ["message"]
|
|
31
|
+
|
|
32
|
+
model_config = ConfigDict(
|
|
33
|
+
populate_by_name=True,
|
|
34
|
+
validate_assignment=True,
|
|
35
|
+
protected_namespaces=(),
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def to_str(self) -> str:
|
|
40
|
+
"""Returns the string representation of the model using alias"""
|
|
41
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
42
|
+
|
|
43
|
+
def to_json(self) -> str:
|
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
|
45
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
46
|
+
return json.dumps(self.to_dict())
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
50
|
+
"""Create an instance of DeleteAgentProfile200Response from a JSON string"""
|
|
51
|
+
return cls.from_dict(json.loads(json_str))
|
|
52
|
+
|
|
53
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
54
|
+
"""Return the dictionary representation of the model using alias.
|
|
55
|
+
|
|
56
|
+
This has the following differences from calling pydantic's
|
|
57
|
+
`self.model_dump(by_alias=True)`:
|
|
58
|
+
|
|
59
|
+
* `None` is only added to the output dict for nullable fields that
|
|
60
|
+
were set at model initialization. Other fields with value `None`
|
|
61
|
+
are ignored.
|
|
62
|
+
"""
|
|
63
|
+
excluded_fields: Set[str] = set([
|
|
64
|
+
])
|
|
65
|
+
|
|
66
|
+
_dict = self.model_dump(
|
|
67
|
+
by_alias=True,
|
|
68
|
+
exclude=excluded_fields,
|
|
69
|
+
exclude_none=True,
|
|
70
|
+
)
|
|
71
|
+
return _dict
|
|
72
|
+
|
|
73
|
+
@classmethod
|
|
74
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
75
|
+
"""Create an instance of DeleteAgentProfile200Response from a dict"""
|
|
76
|
+
if obj is None:
|
|
77
|
+
return None
|
|
78
|
+
|
|
79
|
+
if not isinstance(obj, dict):
|
|
80
|
+
return cls.model_validate(obj)
|
|
81
|
+
|
|
82
|
+
_obj = cls.model_validate({
|
|
83
|
+
"message": obj.get("message")
|
|
84
|
+
})
|
|
85
|
+
return _obj
|
|
86
|
+
|
|
87
|
+
|
|
@@ -19,8 +19,8 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from asteroid_odyssey.
|
|
23
|
-
from asteroid_odyssey.
|
|
22
|
+
from asteroid_odyssey.agents_v1_gen.models.execution_result import ExecutionResult
|
|
23
|
+
from asteroid_odyssey.agents_v1_gen.models.status import Status
|
|
24
24
|
from typing import Optional, Set
|
|
25
25
|
from typing_extensions import Self
|
|
26
26
|
|
|
@@ -20,7 +20,7 @@ import json
|
|
|
20
20
|
from datetime import datetime
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
-
from asteroid_odyssey.
|
|
23
|
+
from asteroid_odyssey.agents_v1_gen.models.status import Status
|
|
24
24
|
from typing import Optional, Set
|
|
25
25
|
from typing_extensions import Self
|
|
26
26
|
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Asteroid Agents API
|
|
5
|
+
|
|
6
|
+
Version 1 of the Asteroid Agents API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import json
|
|
17
|
+
from enum import Enum
|
|
18
|
+
from typing_extensions import Self
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class ProxyType(str, Enum):
|
|
22
|
+
"""
|
|
23
|
+
Type of proxy to use
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
allowed enum values
|
|
28
|
+
"""
|
|
29
|
+
RESIDENTIAL = 'residential'
|
|
30
|
+
MOBILE = 'mobile'
|
|
31
|
+
|
|
32
|
+
@classmethod
|
|
33
|
+
def from_json(cls, json_str: str) -> Self:
|
|
34
|
+
"""Create an instance of ProxyType from a JSON string"""
|
|
35
|
+
return cls(json.loads(json_str))
|
|
36
|
+
|
|
37
|
+
|