asteroid-odyssey 1.0.3__py3-none-any.whl → 1.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. asteroid_odyssey/__init__.py +10 -2
  2. asteroid_odyssey/agents_v1_gen/__init__.py +87 -0
  3. asteroid_odyssey/agents_v1_gen/api/__init__.py +7 -0
  4. asteroid_odyssey/agents_v1_gen/api/agent_profile_api.py +1696 -0
  5. asteroid_odyssey/{openapi_client → agents_v1_gen}/api/api_api.py +4 -4
  6. asteroid_odyssey/{openapi_client/api/sdk_api.py → agents_v1_gen/api/execution_api.py} +314 -14
  7. asteroid_odyssey/{openapi_client → agents_v1_gen}/api_client.py +6 -6
  8. asteroid_odyssey/{openapi_client → agents_v1_gen}/configuration.py +2 -2
  9. asteroid_odyssey/agents_v1_gen/models/__init__.py +34 -0
  10. asteroid_odyssey/agents_v1_gen/models/agent_profile.py +118 -0
  11. asteroid_odyssey/agents_v1_gen/models/country_code.py +44 -0
  12. asteroid_odyssey/agents_v1_gen/models/create_agent_profile_request.py +112 -0
  13. asteroid_odyssey/agents_v1_gen/models/credential.py +95 -0
  14. asteroid_odyssey/agents_v1_gen/models/delete_agent_profile200_response.py +87 -0
  15. asteroid_odyssey/{openapi_client → agents_v1_gen}/models/execution_result_response.py +2 -2
  16. asteroid_odyssey/{openapi_client → agents_v1_gen}/models/execution_status_response.py +1 -1
  17. asteroid_odyssey/agents_v1_gen/models/proxy_type.py +37 -0
  18. asteroid_odyssey/agents_v1_gen/models/update_agent_profile_request.py +112 -0
  19. asteroid_odyssey/{openapi_client → agents_v1_gen}/rest.py +1 -1
  20. asteroid_odyssey/agents_v2_gen/__init__.py +99 -0
  21. asteroid_odyssey/agents_v2_gen/api/__init__.py +5 -0
  22. asteroid_odyssey/agents_v2_gen/api/execution_api.py +625 -0
  23. asteroid_odyssey/agents_v2_gen/api_client.py +801 -0
  24. asteroid_odyssey/agents_v2_gen/api_response.py +21 -0
  25. asteroid_odyssey/agents_v2_gen/configuration.py +612 -0
  26. asteroid_odyssey/agents_v2_gen/exceptions.py +216 -0
  27. asteroid_odyssey/agents_v2_gen/models/__init__.py +42 -0
  28. asteroid_odyssey/agents_v2_gen/models/activity_payload_union_action_completed.py +100 -0
  29. asteroid_odyssey/agents_v2_gen/models/activity_payload_union_action_failed.py +100 -0
  30. asteroid_odyssey/agents_v2_gen/models/activity_payload_union_action_started.py +100 -0
  31. asteroid_odyssey/agents_v2_gen/models/activity_payload_union_generic.py +100 -0
  32. asteroid_odyssey/agents_v2_gen/models/activity_payload_union_status_changed.py +100 -0
  33. asteroid_odyssey/agents_v2_gen/models/activity_payload_union_step_completed.py +100 -0
  34. asteroid_odyssey/agents_v2_gen/models/activity_payload_union_step_started.py +100 -0
  35. asteroid_odyssey/agents_v2_gen/models/activity_payload_union_terminal.py +100 -0
  36. asteroid_odyssey/agents_v2_gen/models/activity_payload_union_transitioned_node.py +100 -0
  37. asteroid_odyssey/agents_v2_gen/models/activity_payload_union_user_message_received.py +100 -0
  38. asteroid_odyssey/agents_v2_gen/models/error.py +89 -0
  39. asteroid_odyssey/agents_v2_gen/models/execution_activity.py +98 -0
  40. asteroid_odyssey/agents_v2_gen/models/execution_activity_action_completed_payload.py +87 -0
  41. asteroid_odyssey/agents_v2_gen/models/execution_activity_action_failed_payload.py +87 -0
  42. asteroid_odyssey/agents_v2_gen/models/execution_activity_action_started_payload.py +87 -0
  43. asteroid_odyssey/agents_v2_gen/models/execution_activity_generic_payload.py +87 -0
  44. asteroid_odyssey/agents_v2_gen/models/execution_activity_payload_union.py +252 -0
  45. asteroid_odyssey/agents_v2_gen/models/execution_activity_status_changed_payload.py +88 -0
  46. asteroid_odyssey/agents_v2_gen/models/execution_activity_step_completed_payload.py +87 -0
  47. asteroid_odyssey/agents_v2_gen/models/execution_activity_step_started_payload.py +87 -0
  48. asteroid_odyssey/agents_v2_gen/models/execution_activity_transitioned_node_payload.py +89 -0
  49. asteroid_odyssey/agents_v2_gen/models/execution_activity_user_message_received_payload.py +89 -0
  50. asteroid_odyssey/agents_v2_gen/models/execution_status.py +43 -0
  51. asteroid_odyssey/agents_v2_gen/models/execution_terminal_payload.py +96 -0
  52. asteroid_odyssey/agents_v2_gen/models/execution_user_messages_add_text_body.py +87 -0
  53. asteroid_odyssey/agents_v2_gen/models/versions.py +37 -0
  54. asteroid_odyssey/agents_v2_gen/py.typed +0 -0
  55. asteroid_odyssey/agents_v2_gen/rest.py +258 -0
  56. asteroid_odyssey/client.py +640 -131
  57. {asteroid_odyssey-1.0.3.dist-info → asteroid_odyssey-1.2.0.dist-info}/METADATA +2 -1
  58. asteroid_odyssey-1.2.0.dist-info/RECORD +72 -0
  59. asteroid_odyssey/openapi_client/__init__.py +0 -73
  60. asteroid_odyssey/openapi_client/api/__init__.py +0 -7
  61. asteroid_odyssey/openapi_client/api/execution_api.py +0 -335
  62. asteroid_odyssey/openapi_client/models/__init__.py +0 -27
  63. asteroid_odyssey-1.0.3.dist-info/RECORD +0 -29
  64. /asteroid_odyssey/{openapi_client → agents_v1_gen}/api_response.py +0 -0
  65. /asteroid_odyssey/{openapi_client → agents_v1_gen}/exceptions.py +0 -0
  66. /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/browser_session_recording_response.py +0 -0
  67. /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/error_response.py +0 -0
  68. /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/execution_response.py +0 -0
  69. /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/execution_result.py +0 -0
  70. /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/health_check200_response.py +0 -0
  71. /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/health_check500_response.py +0 -0
  72. /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/status.py +0 -0
  73. /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/structured_agent_execution_request.py +0 -0
  74. /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/upload_execution_files200_response.py +0 -0
  75. /asteroid_odyssey/{openapi_client → agents_v1_gen}/py.typed +0 -0
  76. {asteroid_odyssey-1.0.3.dist-info → asteroid_odyssey-1.2.0.dist-info}/WHEEL +0 -0
  77. {asteroid_odyssey-1.0.3.dist-info → asteroid_odyssey-1.2.0.dist-info}/top_level.txt +0 -0
@@ -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.openapi_client.models.execution_result import ExecutionResult
23
- from asteroid_odyssey.openapi_client.models.status import Status
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.openapi_client.models.status import Status
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
+
@@ -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, Optional
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 UpdateAgentProfileRequest(BaseModel):
30
+ """
31
+ UpdateAgentProfileRequest
32
+ """ # noqa: E501
33
+ name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]] = Field(default=None, description="The name of the agent profile")
34
+ description: Optional[Annotated[str, Field(strict=True, max_length=1000)]] = Field(default=None, description="The description of the agent profile")
35
+ proxy_cc: Optional[CountryCode] = None
36
+ proxy_type: Optional[ProxyType] = None
37
+ captcha_solver_active: Optional[StrictBool] = Field(default=None, description="Whether the captcha solver should be active for this profile")
38
+ sticky_ip: Optional[StrictBool] = Field(default=None, description="Whether the same IP address should be used for all executions of this profile")
39
+ credentials_to_add: Optional[List[Credential]] = Field(default=None, description="List of credentials to add to the profile")
40
+ credentials_to_delete: Optional[List[StrictStr]] = Field(default=None, description="List of credential IDs to delete from the profile")
41
+ __properties: ClassVar[List[str]] = ["name", "description", "proxy_cc", "proxy_type", "captcha_solver_active", "sticky_ip", "credentials_to_add", "credentials_to_delete"]
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 UpdateAgentProfileRequest 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_to_add (list)
83
+ _items = []
84
+ if self.credentials_to_add:
85
+ for _item_credentials_to_add in self.credentials_to_add:
86
+ if _item_credentials_to_add:
87
+ _items.append(_item_credentials_to_add.to_dict())
88
+ _dict['credentials_to_add'] = _items
89
+ return _dict
90
+
91
+ @classmethod
92
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
93
+ """Create an instance of UpdateAgentProfileRequest 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
+ "proxy_cc": obj.get("proxy_cc"),
104
+ "proxy_type": obj.get("proxy_type"),
105
+ "captcha_solver_active": obj.get("captcha_solver_active"),
106
+ "sticky_ip": obj.get("sticky_ip"),
107
+ "credentials_to_add": [Credential.from_dict(_item) for _item in obj["credentials_to_add"]] if obj.get("credentials_to_add") is not None else None,
108
+ "credentials_to_delete": obj.get("credentials_to_delete")
109
+ })
110
+ return _obj
111
+
112
+
@@ -19,7 +19,7 @@ import ssl
19
19
 
20
20
  import urllib3
21
21
 
22
- from asteroid_odyssey.openapi_client.exceptions import ApiException, ApiValueError
22
+ from asteroid_odyssey.agents_v1_gen.exceptions import ApiException, ApiValueError
23
23
 
24
24
  SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"}
25
25
  RESTResponseType = urllib3.HTTPResponse
@@ -0,0 +1,99 @@
1
+ # coding: utf-8
2
+
3
+ # flake8: noqa
4
+
5
+ """
6
+ Agent Service
7
+
8
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
9
+
10
+ The version of the OpenAPI document: v2
11
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
12
+
13
+ Do not edit the class manually.
14
+ """ # noqa: E501
15
+
16
+
17
+ __version__ = "1.0.0"
18
+
19
+ # Define package exports
20
+ __all__ = [
21
+ "ExecutionApi",
22
+ "ApiResponse",
23
+ "ApiClient",
24
+ "Configuration",
25
+ "OpenApiException",
26
+ "ApiTypeError",
27
+ "ApiValueError",
28
+ "ApiKeyError",
29
+ "ApiAttributeError",
30
+ "ApiException",
31
+ "ActivityPayloadUnionActionCompleted",
32
+ "ActivityPayloadUnionActionFailed",
33
+ "ActivityPayloadUnionActionStarted",
34
+ "ActivityPayloadUnionGeneric",
35
+ "ActivityPayloadUnionStatusChanged",
36
+ "ActivityPayloadUnionStepCompleted",
37
+ "ActivityPayloadUnionStepStarted",
38
+ "ActivityPayloadUnionTerminal",
39
+ "ActivityPayloadUnionTransitionedNode",
40
+ "ActivityPayloadUnionUserMessageReceived",
41
+ "Error",
42
+ "ExecutionActivity",
43
+ "ExecutionActivityActionCompletedPayload",
44
+ "ExecutionActivityActionFailedPayload",
45
+ "ExecutionActivityActionStartedPayload",
46
+ "ExecutionActivityGenericPayload",
47
+ "ExecutionActivityPayloadUnion",
48
+ "ExecutionActivityStatusChangedPayload",
49
+ "ExecutionActivityStepCompletedPayload",
50
+ "ExecutionActivityStepStartedPayload",
51
+ "ExecutionActivityTransitionedNodePayload",
52
+ "ExecutionActivityUserMessageReceivedPayload",
53
+ "ExecutionStatus",
54
+ "ExecutionTerminalPayload",
55
+ "ExecutionUserMessagesAddTextBody",
56
+ "Versions",
57
+ ]
58
+
59
+ # import apis into sdk package
60
+ from asteroid_odyssey.agents_v2_gen.api.execution_api import ExecutionApi as ExecutionApi
61
+
62
+ # import ApiClient
63
+ from asteroid_odyssey.agents_v2_gen.api_response import ApiResponse as ApiResponse
64
+ from asteroid_odyssey.agents_v2_gen.api_client import ApiClient as ApiClient
65
+ from asteroid_odyssey.agents_v2_gen.configuration import Configuration as Configuration
66
+ from asteroid_odyssey.agents_v2_gen.exceptions import OpenApiException as OpenApiException
67
+ from asteroid_odyssey.agents_v2_gen.exceptions import ApiTypeError as ApiTypeError
68
+ from asteroid_odyssey.agents_v2_gen.exceptions import ApiValueError as ApiValueError
69
+ from asteroid_odyssey.agents_v2_gen.exceptions import ApiKeyError as ApiKeyError
70
+ from asteroid_odyssey.agents_v2_gen.exceptions import ApiAttributeError as ApiAttributeError
71
+ from asteroid_odyssey.agents_v2_gen.exceptions import ApiException as ApiException
72
+
73
+ # import models into sdk package
74
+ from asteroid_odyssey.agents_v2_gen.models.activity_payload_union_action_completed import ActivityPayloadUnionActionCompleted as ActivityPayloadUnionActionCompleted
75
+ from asteroid_odyssey.agents_v2_gen.models.activity_payload_union_action_failed import ActivityPayloadUnionActionFailed as ActivityPayloadUnionActionFailed
76
+ from asteroid_odyssey.agents_v2_gen.models.activity_payload_union_action_started import ActivityPayloadUnionActionStarted as ActivityPayloadUnionActionStarted
77
+ from asteroid_odyssey.agents_v2_gen.models.activity_payload_union_generic import ActivityPayloadUnionGeneric as ActivityPayloadUnionGeneric
78
+ from asteroid_odyssey.agents_v2_gen.models.activity_payload_union_status_changed import ActivityPayloadUnionStatusChanged as ActivityPayloadUnionStatusChanged
79
+ from asteroid_odyssey.agents_v2_gen.models.activity_payload_union_step_completed import ActivityPayloadUnionStepCompleted as ActivityPayloadUnionStepCompleted
80
+ from asteroid_odyssey.agents_v2_gen.models.activity_payload_union_step_started import ActivityPayloadUnionStepStarted as ActivityPayloadUnionStepStarted
81
+ from asteroid_odyssey.agents_v2_gen.models.activity_payload_union_terminal import ActivityPayloadUnionTerminal as ActivityPayloadUnionTerminal
82
+ from asteroid_odyssey.agents_v2_gen.models.activity_payload_union_transitioned_node import ActivityPayloadUnionTransitionedNode as ActivityPayloadUnionTransitionedNode
83
+ from asteroid_odyssey.agents_v2_gen.models.activity_payload_union_user_message_received import ActivityPayloadUnionUserMessageReceived as ActivityPayloadUnionUserMessageReceived
84
+ from asteroid_odyssey.agents_v2_gen.models.error import Error as Error
85
+ from asteroid_odyssey.agents_v2_gen.models.execution_activity import ExecutionActivity as ExecutionActivity
86
+ from asteroid_odyssey.agents_v2_gen.models.execution_activity_action_completed_payload import ExecutionActivityActionCompletedPayload as ExecutionActivityActionCompletedPayload
87
+ from asteroid_odyssey.agents_v2_gen.models.execution_activity_action_failed_payload import ExecutionActivityActionFailedPayload as ExecutionActivityActionFailedPayload
88
+ from asteroid_odyssey.agents_v2_gen.models.execution_activity_action_started_payload import ExecutionActivityActionStartedPayload as ExecutionActivityActionStartedPayload
89
+ from asteroid_odyssey.agents_v2_gen.models.execution_activity_generic_payload import ExecutionActivityGenericPayload as ExecutionActivityGenericPayload
90
+ from asteroid_odyssey.agents_v2_gen.models.execution_activity_payload_union import ExecutionActivityPayloadUnion as ExecutionActivityPayloadUnion
91
+ from asteroid_odyssey.agents_v2_gen.models.execution_activity_status_changed_payload import ExecutionActivityStatusChangedPayload as ExecutionActivityStatusChangedPayload
92
+ from asteroid_odyssey.agents_v2_gen.models.execution_activity_step_completed_payload import ExecutionActivityStepCompletedPayload as ExecutionActivityStepCompletedPayload
93
+ from asteroid_odyssey.agents_v2_gen.models.execution_activity_step_started_payload import ExecutionActivityStepStartedPayload as ExecutionActivityStepStartedPayload
94
+ from asteroid_odyssey.agents_v2_gen.models.execution_activity_transitioned_node_payload import ExecutionActivityTransitionedNodePayload as ExecutionActivityTransitionedNodePayload
95
+ from asteroid_odyssey.agents_v2_gen.models.execution_activity_user_message_received_payload import ExecutionActivityUserMessageReceivedPayload as ExecutionActivityUserMessageReceivedPayload
96
+ from asteroid_odyssey.agents_v2_gen.models.execution_status import ExecutionStatus as ExecutionStatus
97
+ from asteroid_odyssey.agents_v2_gen.models.execution_terminal_payload import ExecutionTerminalPayload as ExecutionTerminalPayload
98
+ from asteroid_odyssey.agents_v2_gen.models.execution_user_messages_add_text_body import ExecutionUserMessagesAddTextBody as ExecutionUserMessagesAddTextBody
99
+ from asteroid_odyssey.agents_v2_gen.models.versions import Versions as Versions
@@ -0,0 +1,5 @@
1
+ # flake8: noqa
2
+
3
+ # import apis into api package
4
+ from asteroid_odyssey.agents_v2_gen.api.execution_api import ExecutionApi
5
+