asteroid-odyssey 1.3.12__py3-none-any.whl → 1.6.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 +254 -48
- asteroid_odyssey/api/__init__.py +8 -0
- asteroid_odyssey/{agents_v1_gen/api/agent_profile_api.py → api/agent_profiles_api.py} +414 -281
- asteroid_odyssey/{agents_v2_gen/api → api}/agents_api.py +30 -30
- asteroid_odyssey/{agents_v2_gen/api → api}/execution_api.py +32 -49
- asteroid_odyssey/{agents_v2_gen/api → api}/files_api.py +5 -5
- asteroid_odyssey/{agents_v2_gen/api_client.py → api_client.py} +10 -6
- asteroid_odyssey/{agents_v2_gen/configuration.py → configuration.py} +11 -4
- asteroid_odyssey/models/__init__.py +118 -0
- asteroid_odyssey/{agents_v2_gen/models → models}/agent_list200_response.py +1 -1
- asteroid_odyssey/models/agent_profile_clear_browser_cache200_response.py +87 -0
- asteroid_odyssey/models/agent_profiles_list200_response.py +101 -0
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_agent_base.py +3 -3
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_agent_execute_agent_request.py +7 -5
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_activity.py +4 -4
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_activity_action_completed_info.py +65 -37
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_activity_action_completed_payload.py +8 -8
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_activity_action_failed_payload.py +9 -9
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_activity_action_started_info.py +50 -22
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_activity_action_started_payload.py +10 -10
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_activity_file_added_payload.py +6 -6
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_activity_payload_union.py +14 -14
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_activity_playwright_script_generated_payload.py +9 -9
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_activity_status_changed_payload.py +19 -19
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_activity_transitioned_node_payload.py +6 -6
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_activity_workflow_updated_payload.py +1 -1
- asteroid_odyssey/models/agents_execution_agent_query_context_completed_details.py +98 -0
- asteroid_odyssey/models/agents_execution_agent_query_context_started_details.py +96 -0
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_cancelled_payload.py +1 -1
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_comment.py +10 -10
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_completed_payload.py +4 -4
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_execution_result.py +6 -6
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_ext_api_call_completed_details.py +6 -6
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_failed_payload.py +5 -5
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_file_read_completed_details.py +3 -3
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_human_label.py +7 -7
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_list_item.py +33 -37
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_llm_call_started_details.py +1 -1
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_obs_snapshot_with_selectors_completed_details.py +4 -4
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_scratchpad_write_completed_details.py +7 -7
- asteroid_odyssey/models/agents_execution_script_eval_completed_details.py +101 -0
- asteroid_odyssey/models/agents_execution_script_eval_started_details.py +100 -0
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_script_hybrid_playwright_completed_details.py +6 -6
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_script_pad_run_function_completed_details.py +6 -6
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_script_playwright_completed_details.py +6 -6
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_scriptpad_read_started_details.py +4 -4
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_scriptpad_run_function_started_details.py +4 -4
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_scriptpad_search_replace_completed_details.py +5 -5
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_scriptpad_search_replace_started_details.py +4 -4
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_scriptpad_write_completed_details.py +4 -4
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_terminal_payload.py +4 -4
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_util_get_datetime_completed_details.py +4 -4
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_workflow_update.py +13 -13
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_files_file.py +11 -11
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_files_temp_files_response.py +1 -1
- asteroid_odyssey/{agents_v2_gen/models → models}/agents_graph_models_nodes_properties_playwright_script_llm_var.py +5 -5
- asteroid_odyssey/{agents_v1_gen/models/agent_profile.py → models/agents_profile_agent_profile.py} +37 -32
- asteroid_odyssey/{agents_v1_gen/models/cookie.py → models/agents_profile_cookie.py} +21 -26
- asteroid_odyssey/{agents_v1_gen/models/country_code.py → models/agents_profile_country_code.py} +5 -5
- asteroid_odyssey/{agents_v1_gen/models/create_agent_profile_request.py → models/agents_profile_create_agent_profile_request.py} +33 -28
- asteroid_odyssey/{agents_v1_gen/models/credential.py → models/agents_profile_credential.py} +13 -13
- asteroid_odyssey/models/agents_profile_operating_system.py +37 -0
- asteroid_odyssey/models/agents_profile_proxy_type.py +38 -0
- asteroid_odyssey/models/agents_profile_same_site.py +38 -0
- asteroid_odyssey/models/agents_profile_sort_field.py +38 -0
- asteroid_odyssey/models/agents_profile_update_agent_profile_request.py +129 -0
- asteroid_odyssey/{agents_v2_gen/models → models}/executions_list200_response.py +1 -1
- asteroid_odyssey/{agents_v2_gen/rest.py → rest.py} +2 -1
- asteroid_odyssey-1.6.0.dist-info/METADATA +65 -0
- asteroid_odyssey-1.6.0.dist-info/RECORD +119 -0
- asteroid_odyssey/agents_v1_gen/__init__.py +0 -53
- asteroid_odyssey/agents_v1_gen/api/__init__.py +0 -7
- asteroid_odyssey/agents_v1_gen/api/api_api.py +0 -516
- asteroid_odyssey/agents_v1_gen/api/execution_api.py +0 -1449
- asteroid_odyssey/agents_v1_gen/api_client.py +0 -797
- asteroid_odyssey/agents_v1_gen/configuration.py +0 -599
- asteroid_odyssey/agents_v1_gen/exceptions.py +0 -216
- asteroid_odyssey/agents_v1_gen/models/__init__.py +0 -34
- asteroid_odyssey/agents_v1_gen/models/browser_session_recording_response.py +0 -87
- asteroid_odyssey/agents_v1_gen/models/delete_agent_profile200_response.py +0 -87
- asteroid_odyssey/agents_v1_gen/models/error_response.py +0 -87
- asteroid_odyssey/agents_v1_gen/models/execution_response.py +0 -87
- asteroid_odyssey/agents_v1_gen/models/execution_result.py +0 -101
- asteroid_odyssey/agents_v1_gen/models/execution_result_response.py +0 -100
- asteroid_odyssey/agents_v1_gen/models/execution_status_response.py +0 -95
- asteroid_odyssey/agents_v1_gen/models/health_check200_response.py +0 -87
- asteroid_odyssey/agents_v1_gen/models/health_check500_response.py +0 -87
- asteroid_odyssey/agents_v1_gen/models/proxy_type.py +0 -38
- asteroid_odyssey/agents_v1_gen/models/status.py +0 -43
- asteroid_odyssey/agents_v1_gen/models/structured_agent_execution_request.py +0 -89
- asteroid_odyssey/agents_v1_gen/models/update_agent_profile_request.py +0 -126
- asteroid_odyssey/agents_v1_gen/rest.py +0 -257
- asteroid_odyssey/agents_v2_gen/__init__.py +0 -121
- asteroid_odyssey/agents_v2_gen/api/__init__.py +0 -7
- asteroid_odyssey/agents_v2_gen/api_response.py +0 -21
- asteroid_odyssey/agents_v2_gen/models/__init__.py +0 -102
- asteroid_odyssey/agents_v2_gen/py.typed +0 -0
- asteroid_odyssey/client.py +0 -1629
- asteroid_odyssey-1.3.12.dist-info/METADATA +0 -214
- asteroid_odyssey-1.3.12.dist-info/RECORD +0 -134
- /asteroid_odyssey/{agents_v1_gen/api_response.py → api_response.py} +0 -0
- /asteroid_odyssey/{agents_v2_gen/exceptions.py → exceptions.py} +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_agent_execute_agent_response.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_agent_sort_field.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_action_name.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_activity_generic_payload.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_activity_reasoning_payload.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_activity_step_completed_payload.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_activity_step_started_payload.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_activity_user_message_received_payload.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_awaiting_confirmation_payload.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_cancel_reason.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_element_file_upload_completed_details.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_ext_get_mail_completed_details.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_file_list_completed_details.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_file_stage_completed_details.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_llm_call_purpose.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_nav_to_completed_details.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_nav_to_started_details.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_node_details.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_paused_payload.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_rules_details.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_scratchpad_read_completed_details.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_scratchpad_read_started_details.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_scratchpad_write_started_details.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_script_hybrid_playwright_started_details.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_script_playwright_started_details.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_scriptpad_read_completed_details.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_sort_field.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_status.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_transition_details.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_update_type.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_user_messages_add_text_body.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_util_get_datetime_started_details.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_files_temp_file.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_graph_models_nodes_properties_playwright_script_llm_var_type.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/agents_graph_models_transitions_transition_type.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/common_bad_request_error_body.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/common_error.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/common_forbidden_error_body.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/common_internal_server_error_body.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/common_not_found_error_body.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/common_os_error.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/common_sort_direction.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/common_unauthorized_error_body.py +0 -0
- /asteroid_odyssey/{agents_v2_gen/models → models}/version.py +0 -0
- /asteroid_odyssey/{agents_v1_gen/py.typed → py.typed} +0 -0
- {asteroid_odyssey-1.3.12.dist-info → asteroid_odyssey-1.6.0.dist-info}/WHEEL +0 -0
- {asteroid_odyssey-1.3.12.dist-info → asteroid_odyssey-1.6.0.dist-info}/top_level.txt +0 -0
|
@@ -27,11 +27,11 @@ class AgentsExecutionScriptPadRunFunctionCompletedDetails(BaseModel):
|
|
|
27
27
|
AgentsExecutionScriptPadRunFunctionCompletedDetails
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
action_name: StrictStr = Field(alias="actionName")
|
|
30
|
+
success: StrictBool
|
|
31
|
+
result: StrictStr
|
|
30
32
|
console_logs: List[StrictStr] = Field(alias="consoleLogs")
|
|
31
33
|
failed_line: Optional[StrictInt] = Field(default=None, alias="failedLine")
|
|
32
|
-
|
|
33
|
-
success: StrictBool
|
|
34
|
-
__properties: ClassVar[List[str]] = ["actionName", "consoleLogs", "failedLine", "result", "success"]
|
|
34
|
+
__properties: ClassVar[List[str]] = ["actionName", "success", "result", "consoleLogs", "failedLine"]
|
|
35
35
|
|
|
36
36
|
@field_validator('action_name')
|
|
37
37
|
def action_name_validate_enum(cls, value):
|
|
@@ -92,10 +92,10 @@ class AgentsExecutionScriptPadRunFunctionCompletedDetails(BaseModel):
|
|
|
92
92
|
|
|
93
93
|
_obj = cls.model_validate({
|
|
94
94
|
"actionName": obj.get("actionName"),
|
|
95
|
-
"
|
|
96
|
-
"failedLine": obj.get("failedLine"),
|
|
95
|
+
"success": obj.get("success"),
|
|
97
96
|
"result": obj.get("result"),
|
|
98
|
-
"
|
|
97
|
+
"consoleLogs": obj.get("consoleLogs"),
|
|
98
|
+
"failedLine": obj.get("failedLine")
|
|
99
99
|
})
|
|
100
100
|
return _obj
|
|
101
101
|
|
|
@@ -27,11 +27,11 @@ class AgentsExecutionScriptPlaywrightCompletedDetails(BaseModel):
|
|
|
27
27
|
AgentsExecutionScriptPlaywrightCompletedDetails
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
action_name: StrictStr = Field(alias="actionName")
|
|
30
|
+
success: StrictBool
|
|
31
|
+
result: StrictStr
|
|
30
32
|
console_logs: List[StrictStr] = Field(alias="consoleLogs")
|
|
31
33
|
failed_line: Optional[StrictInt] = Field(default=None, alias="failedLine")
|
|
32
|
-
|
|
33
|
-
success: StrictBool
|
|
34
|
-
__properties: ClassVar[List[str]] = ["actionName", "consoleLogs", "failedLine", "result", "success"]
|
|
34
|
+
__properties: ClassVar[List[str]] = ["actionName", "success", "result", "consoleLogs", "failedLine"]
|
|
35
35
|
|
|
36
36
|
@field_validator('action_name')
|
|
37
37
|
def action_name_validate_enum(cls, value):
|
|
@@ -92,10 +92,10 @@ class AgentsExecutionScriptPlaywrightCompletedDetails(BaseModel):
|
|
|
92
92
|
|
|
93
93
|
_obj = cls.model_validate({
|
|
94
94
|
"actionName": obj.get("actionName"),
|
|
95
|
-
"
|
|
96
|
-
"failedLine": obj.get("failedLine"),
|
|
95
|
+
"success": obj.get("success"),
|
|
97
96
|
"result": obj.get("result"),
|
|
98
|
-
"
|
|
97
|
+
"consoleLogs": obj.get("consoleLogs"),
|
|
98
|
+
"failedLine": obj.get("failedLine")
|
|
99
99
|
})
|
|
100
100
|
return _obj
|
|
101
101
|
|
asteroid_odyssey/{agents_v2_gen/models → models}/agents_execution_scriptpad_read_started_details.py
RENAMED
|
@@ -27,9 +27,9 @@ class AgentsExecutionScriptpadReadStartedDetails(BaseModel):
|
|
|
27
27
|
AgentsExecutionScriptpadReadStartedDetails
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
action_name: StrictStr = Field(alias="actionName")
|
|
30
|
-
limit: StrictInt
|
|
31
30
|
offset: StrictInt
|
|
32
|
-
|
|
31
|
+
limit: StrictInt
|
|
32
|
+
__properties: ClassVar[List[str]] = ["actionName", "offset", "limit"]
|
|
33
33
|
|
|
34
34
|
@field_validator('action_name')
|
|
35
35
|
def action_name_validate_enum(cls, value):
|
|
@@ -90,8 +90,8 @@ class AgentsExecutionScriptpadReadStartedDetails(BaseModel):
|
|
|
90
90
|
|
|
91
91
|
_obj = cls.model_validate({
|
|
92
92
|
"actionName": obj.get("actionName"),
|
|
93
|
-
"
|
|
94
|
-
"
|
|
93
|
+
"offset": obj.get("offset"),
|
|
94
|
+
"limit": obj.get("limit")
|
|
95
95
|
})
|
|
96
96
|
return _obj
|
|
97
97
|
|
|
@@ -27,9 +27,9 @@ class AgentsExecutionScriptpadRunFunctionStartedDetails(BaseModel):
|
|
|
27
27
|
AgentsExecutionScriptpadRunFunctionStartedDetails
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
action_name: StrictStr = Field(alias="actionName")
|
|
30
|
-
arguments: Optional[Any]
|
|
31
30
|
function_name: StrictStr = Field(alias="functionName")
|
|
32
|
-
|
|
31
|
+
arguments: Optional[Any]
|
|
32
|
+
__properties: ClassVar[List[str]] = ["actionName", "functionName", "arguments"]
|
|
33
33
|
|
|
34
34
|
@field_validator('action_name')
|
|
35
35
|
def action_name_validate_enum(cls, value):
|
|
@@ -95,8 +95,8 @@ class AgentsExecutionScriptpadRunFunctionStartedDetails(BaseModel):
|
|
|
95
95
|
|
|
96
96
|
_obj = cls.model_validate({
|
|
97
97
|
"actionName": obj.get("actionName"),
|
|
98
|
-
"
|
|
99
|
-
"
|
|
98
|
+
"functionName": obj.get("functionName"),
|
|
99
|
+
"arguments": obj.get("arguments")
|
|
100
100
|
})
|
|
101
101
|
return _obj
|
|
102
102
|
|
|
@@ -29,11 +29,11 @@ class AgentsExecutionScriptpadSearchReplaceCompletedDetails(BaseModel):
|
|
|
29
29
|
action_name: StrictStr = Field(alias="actionName")
|
|
30
30
|
lines_replaced: StrictInt = Field(alias="linesReplaced")
|
|
31
31
|
lines_replaced_with: StrictInt = Field(alias="linesReplacedWith")
|
|
32
|
-
|
|
32
|
+
old_total_lines: StrictInt = Field(alias="oldTotalLines")
|
|
33
33
|
new_total_lines: StrictInt = Field(alias="newTotalLines")
|
|
34
34
|
old_scriptpad: Optional[StrictStr] = Field(default=None, alias="oldScriptpad")
|
|
35
|
-
|
|
36
|
-
__properties: ClassVar[List[str]] = ["actionName", "linesReplaced", "linesReplacedWith", "
|
|
35
|
+
new_scriptpad: Optional[StrictStr] = Field(default=None, alias="newScriptpad")
|
|
36
|
+
__properties: ClassVar[List[str]] = ["actionName", "linesReplaced", "linesReplacedWith", "oldTotalLines", "newTotalLines", "oldScriptpad", "newScriptpad"]
|
|
37
37
|
|
|
38
38
|
@field_validator('action_name')
|
|
39
39
|
def action_name_validate_enum(cls, value):
|
|
@@ -96,10 +96,10 @@ class AgentsExecutionScriptpadSearchReplaceCompletedDetails(BaseModel):
|
|
|
96
96
|
"actionName": obj.get("actionName"),
|
|
97
97
|
"linesReplaced": obj.get("linesReplaced"),
|
|
98
98
|
"linesReplacedWith": obj.get("linesReplacedWith"),
|
|
99
|
-
"
|
|
99
|
+
"oldTotalLines": obj.get("oldTotalLines"),
|
|
100
100
|
"newTotalLines": obj.get("newTotalLines"),
|
|
101
101
|
"oldScriptpad": obj.get("oldScriptpad"),
|
|
102
|
-
"
|
|
102
|
+
"newScriptpad": obj.get("newScriptpad")
|
|
103
103
|
})
|
|
104
104
|
return _obj
|
|
105
105
|
|
|
@@ -27,10 +27,10 @@ class AgentsExecutionScriptpadSearchReplaceStartedDetails(BaseModel):
|
|
|
27
27
|
AgentsExecutionScriptpadSearchReplaceStartedDetails
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
action_name: StrictStr = Field(alias="actionName")
|
|
30
|
+
search: StrictStr
|
|
30
31
|
replace: StrictStr
|
|
31
32
|
replace_all: StrictBool = Field(alias="replaceAll")
|
|
32
|
-
|
|
33
|
-
__properties: ClassVar[List[str]] = ["actionName", "replace", "replaceAll", "search"]
|
|
33
|
+
__properties: ClassVar[List[str]] = ["actionName", "search", "replace", "replaceAll"]
|
|
34
34
|
|
|
35
35
|
@field_validator('action_name')
|
|
36
36
|
def action_name_validate_enum(cls, value):
|
|
@@ -91,9 +91,9 @@ class AgentsExecutionScriptpadSearchReplaceStartedDetails(BaseModel):
|
|
|
91
91
|
|
|
92
92
|
_obj = cls.model_validate({
|
|
93
93
|
"actionName": obj.get("actionName"),
|
|
94
|
+
"search": obj.get("search"),
|
|
94
95
|
"replace": obj.get("replace"),
|
|
95
|
-
"replaceAll": obj.get("replaceAll")
|
|
96
|
-
"search": obj.get("search")
|
|
96
|
+
"replaceAll": obj.get("replaceAll")
|
|
97
97
|
})
|
|
98
98
|
return _obj
|
|
99
99
|
|
|
@@ -28,10 +28,10 @@ class AgentsExecutionScriptpadWriteCompletedDetails(BaseModel):
|
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
action_name: StrictStr = Field(alias="actionName")
|
|
30
30
|
lines_changed: StrictInt = Field(alias="linesChanged")
|
|
31
|
+
total_lines: StrictInt = Field(alias="totalLines")
|
|
31
32
|
patches_applied: StrictInt = Field(alias="patchesApplied")
|
|
32
33
|
scriptpad: Optional[StrictStr] = None
|
|
33
|
-
|
|
34
|
-
__properties: ClassVar[List[str]] = ["actionName", "linesChanged", "patchesApplied", "scriptpad", "totalLines"]
|
|
34
|
+
__properties: ClassVar[List[str]] = ["actionName", "linesChanged", "totalLines", "patchesApplied", "scriptpad"]
|
|
35
35
|
|
|
36
36
|
@field_validator('action_name')
|
|
37
37
|
def action_name_validate_enum(cls, value):
|
|
@@ -93,9 +93,9 @@ class AgentsExecutionScriptpadWriteCompletedDetails(BaseModel):
|
|
|
93
93
|
_obj = cls.model_validate({
|
|
94
94
|
"actionName": obj.get("actionName"),
|
|
95
95
|
"linesChanged": obj.get("linesChanged"),
|
|
96
|
+
"totalLines": obj.get("totalLines"),
|
|
96
97
|
"patchesApplied": obj.get("patchesApplied"),
|
|
97
|
-
"scriptpad": obj.get("scriptpad")
|
|
98
|
-
"totalLines": obj.get("totalLines")
|
|
98
|
+
"scriptpad": obj.get("scriptpad")
|
|
99
99
|
})
|
|
100
100
|
return _obj
|
|
101
101
|
|
|
@@ -27,9 +27,9 @@ class AgentsExecutionTerminalPayload(BaseModel):
|
|
|
27
27
|
AgentsExecutionTerminalPayload
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
activity_type: StrictStr = Field(alias="activityType")
|
|
30
|
-
message: Optional[StrictStr] = None
|
|
31
30
|
reason: StrictStr
|
|
32
|
-
|
|
31
|
+
message: Optional[StrictStr] = None
|
|
32
|
+
__properties: ClassVar[List[str]] = ["activityType", "reason", "message"]
|
|
33
33
|
|
|
34
34
|
@field_validator('activity_type')
|
|
35
35
|
def activity_type_validate_enum(cls, value):
|
|
@@ -97,8 +97,8 @@ class AgentsExecutionTerminalPayload(BaseModel):
|
|
|
97
97
|
|
|
98
98
|
_obj = cls.model_validate({
|
|
99
99
|
"activityType": obj.get("activityType"),
|
|
100
|
-
"
|
|
101
|
-
"
|
|
100
|
+
"reason": obj.get("reason"),
|
|
101
|
+
"message": obj.get("message")
|
|
102
102
|
})
|
|
103
103
|
return _obj
|
|
104
104
|
|
|
@@ -28,10 +28,10 @@ class AgentsExecutionUtilGetDatetimeCompletedDetails(BaseModel):
|
|
|
28
28
|
AgentsExecutionUtilGetDatetimeCompletedDetails
|
|
29
29
|
""" # noqa: E501
|
|
30
30
|
action_name: StrictStr = Field(alias="actionName")
|
|
31
|
+
used_browser_timezone: StrictBool = Field(alias="usedBrowserTimezone")
|
|
31
32
|
datetime: datetime
|
|
32
33
|
tz_timezone_identifier: StrictStr = Field(alias="tzTimezoneIdentifier")
|
|
33
|
-
|
|
34
|
-
__properties: ClassVar[List[str]] = ["actionName", "datetime", "tzTimezoneIdentifier", "usedBrowserTimezone"]
|
|
34
|
+
__properties: ClassVar[List[str]] = ["actionName", "usedBrowserTimezone", "datetime", "tzTimezoneIdentifier"]
|
|
35
35
|
|
|
36
36
|
@field_validator('action_name')
|
|
37
37
|
def action_name_validate_enum(cls, value):
|
|
@@ -92,9 +92,9 @@ class AgentsExecutionUtilGetDatetimeCompletedDetails(BaseModel):
|
|
|
92
92
|
|
|
93
93
|
_obj = cls.model_validate({
|
|
94
94
|
"actionName": obj.get("actionName"),
|
|
95
|
+
"usedBrowserTimezone": obj.get("usedBrowserTimezone"),
|
|
95
96
|
"datetime": obj.get("datetime"),
|
|
96
|
-
"tzTimezoneIdentifier": obj.get("tzTimezoneIdentifier")
|
|
97
|
-
"usedBrowserTimezone": obj.get("usedBrowserTimezone")
|
|
97
|
+
"tzTimezoneIdentifier": obj.get("tzTimezoneIdentifier")
|
|
98
98
|
})
|
|
99
99
|
return _obj
|
|
100
100
|
|
|
@@ -19,10 +19,10 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from asteroid_odyssey.
|
|
23
|
-
from asteroid_odyssey.
|
|
24
|
-
from asteroid_odyssey.
|
|
25
|
-
from asteroid_odyssey.
|
|
22
|
+
from asteroid_odyssey.models.agents_execution_node_details import AgentsExecutionNodeDetails
|
|
23
|
+
from asteroid_odyssey.models.agents_execution_rules_details import AgentsExecutionRulesDetails
|
|
24
|
+
from asteroid_odyssey.models.agents_execution_transition_details import AgentsExecutionTransitionDetails
|
|
25
|
+
from asteroid_odyssey.models.agents_execution_update_type import AgentsExecutionUpdateType
|
|
26
26
|
from typing import Optional, Set
|
|
27
27
|
from typing_extensions import Self
|
|
28
28
|
|
|
@@ -30,11 +30,11 @@ class AgentsExecutionWorkflowUpdate(BaseModel):
|
|
|
30
30
|
"""
|
|
31
31
|
AgentsExecutionWorkflowUpdate
|
|
32
32
|
""" # noqa: E501
|
|
33
|
-
|
|
33
|
+
update_type: AgentsExecutionUpdateType = Field(alias="updateType")
|
|
34
34
|
rules_details: Optional[AgentsExecutionRulesDetails] = Field(default=None, alias="rulesDetails")
|
|
35
|
+
node_details: Optional[AgentsExecutionNodeDetails] = Field(default=None, alias="nodeDetails")
|
|
35
36
|
transition_details: Optional[AgentsExecutionTransitionDetails] = Field(default=None, alias="transitionDetails")
|
|
36
|
-
|
|
37
|
-
__properties: ClassVar[List[str]] = ["nodeDetails", "rulesDetails", "transitionDetails", "updateType"]
|
|
37
|
+
__properties: ClassVar[List[str]] = ["updateType", "rulesDetails", "nodeDetails", "transitionDetails"]
|
|
38
38
|
|
|
39
39
|
model_config = ConfigDict(
|
|
40
40
|
populate_by_name=True,
|
|
@@ -75,12 +75,12 @@ class AgentsExecutionWorkflowUpdate(BaseModel):
|
|
|
75
75
|
exclude=excluded_fields,
|
|
76
76
|
exclude_none=True,
|
|
77
77
|
)
|
|
78
|
-
# override the default output from pydantic by calling `to_dict()` of node_details
|
|
79
|
-
if self.node_details:
|
|
80
|
-
_dict['nodeDetails'] = self.node_details.to_dict()
|
|
81
78
|
# override the default output from pydantic by calling `to_dict()` of rules_details
|
|
82
79
|
if self.rules_details:
|
|
83
80
|
_dict['rulesDetails'] = self.rules_details.to_dict()
|
|
81
|
+
# override the default output from pydantic by calling `to_dict()` of node_details
|
|
82
|
+
if self.node_details:
|
|
83
|
+
_dict['nodeDetails'] = self.node_details.to_dict()
|
|
84
84
|
# override the default output from pydantic by calling `to_dict()` of transition_details
|
|
85
85
|
if self.transition_details:
|
|
86
86
|
_dict['transitionDetails'] = self.transition_details.to_dict()
|
|
@@ -96,10 +96,10 @@ class AgentsExecutionWorkflowUpdate(BaseModel):
|
|
|
96
96
|
return cls.model_validate(obj)
|
|
97
97
|
|
|
98
98
|
_obj = cls.model_validate({
|
|
99
|
-
"
|
|
99
|
+
"updateType": obj.get("updateType"),
|
|
100
100
|
"rulesDetails": AgentsExecutionRulesDetails.from_dict(obj["rulesDetails"]) if obj.get("rulesDetails") is not None else None,
|
|
101
|
-
"
|
|
102
|
-
"
|
|
101
|
+
"nodeDetails": AgentsExecutionNodeDetails.from_dict(obj["nodeDetails"]) if obj.get("nodeDetails") is not None else None,
|
|
102
|
+
"transitionDetails": AgentsExecutionTransitionDetails.from_dict(obj["transitionDetails"]) if obj.get("transitionDetails") is not None else None
|
|
103
103
|
})
|
|
104
104
|
return _obj
|
|
105
105
|
|
|
@@ -27,18 +27,18 @@ class AgentsFilesFile(BaseModel):
|
|
|
27
27
|
"""
|
|
28
28
|
AgentsFilesFile
|
|
29
29
|
""" # noqa: E501
|
|
30
|
-
|
|
31
|
-
created_at: datetime = Field(alias="createdAt")
|
|
30
|
+
id: StrictStr
|
|
32
31
|
execution_id: StrictStr = Field(alias="executionId")
|
|
33
|
-
|
|
34
|
-
file_name: StrictStr = Field(alias="fileName")
|
|
32
|
+
agent_id: StrictStr = Field(alias="agentId")
|
|
35
33
|
file_path: StrictStr = Field(alias="filePath")
|
|
34
|
+
file_name: StrictStr = Field(alias="fileName")
|
|
35
|
+
file_ext: StrictStr = Field(alias="fileExt")
|
|
36
36
|
file_size: StrictInt = Field(alias="fileSize")
|
|
37
37
|
file_type: StrictStr = Field(alias="fileType")
|
|
38
|
-
id: StrictStr
|
|
39
38
|
mime_type: StrictStr = Field(alias="mimeType")
|
|
39
|
+
created_at: datetime = Field(alias="createdAt")
|
|
40
40
|
signed_url: StrictStr = Field(alias="signedUrl")
|
|
41
|
-
__properties: ClassVar[List[str]] = ["
|
|
41
|
+
__properties: ClassVar[List[str]] = ["id", "executionId", "agentId", "filePath", "fileName", "fileExt", "fileSize", "fileType", "mimeType", "createdAt", "signedUrl"]
|
|
42
42
|
|
|
43
43
|
model_config = ConfigDict(
|
|
44
44
|
populate_by_name=True,
|
|
@@ -91,16 +91,16 @@ class AgentsFilesFile(BaseModel):
|
|
|
91
91
|
return cls.model_validate(obj)
|
|
92
92
|
|
|
93
93
|
_obj = cls.model_validate({
|
|
94
|
-
"
|
|
95
|
-
"createdAt": obj.get("createdAt"),
|
|
94
|
+
"id": obj.get("id"),
|
|
96
95
|
"executionId": obj.get("executionId"),
|
|
97
|
-
"
|
|
98
|
-
"fileName": obj.get("fileName"),
|
|
96
|
+
"agentId": obj.get("agentId"),
|
|
99
97
|
"filePath": obj.get("filePath"),
|
|
98
|
+
"fileName": obj.get("fileName"),
|
|
99
|
+
"fileExt": obj.get("fileExt"),
|
|
100
100
|
"fileSize": obj.get("fileSize"),
|
|
101
101
|
"fileType": obj.get("fileType"),
|
|
102
|
-
"id": obj.get("id"),
|
|
103
102
|
"mimeType": obj.get("mimeType"),
|
|
103
|
+
"createdAt": obj.get("createdAt"),
|
|
104
104
|
"signedUrl": obj.get("signedUrl")
|
|
105
105
|
})
|
|
106
106
|
return _obj
|
|
@@ -19,7 +19,7 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field
|
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
|
22
|
-
from asteroid_odyssey.
|
|
22
|
+
from asteroid_odyssey.models.agents_files_temp_file import AgentsFilesTempFile
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
25
|
|
|
@@ -19,7 +19,7 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
|
22
|
-
from asteroid_odyssey.
|
|
22
|
+
from asteroid_odyssey.models.agents_graph_models_nodes_properties_playwright_script_llm_var_type import AgentsGraphModelsNodesPropertiesPlaywrightScriptLLMVarType
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
25
|
|
|
@@ -27,10 +27,10 @@ class AgentsGraphModelsNodesPropertiesPlaywrightScriptLLMVar(BaseModel):
|
|
|
27
27
|
"""
|
|
28
28
|
AgentsGraphModelsNodesPropertiesPlaywrightScriptLLMVar
|
|
29
29
|
""" # noqa: E501
|
|
30
|
-
description: StrictStr
|
|
31
30
|
name: StrictStr
|
|
32
31
|
type: AgentsGraphModelsNodesPropertiesPlaywrightScriptLLMVarType
|
|
33
|
-
|
|
32
|
+
description: StrictStr
|
|
33
|
+
__properties: ClassVar[List[str]] = ["name", "type", "description"]
|
|
34
34
|
|
|
35
35
|
model_config = ConfigDict(
|
|
36
36
|
populate_by_name=True,
|
|
@@ -83,9 +83,9 @@ class AgentsGraphModelsNodesPropertiesPlaywrightScriptLLMVar(BaseModel):
|
|
|
83
83
|
return cls.model_validate(obj)
|
|
84
84
|
|
|
85
85
|
_obj = cls.model_validate({
|
|
86
|
-
"description": obj.get("description"),
|
|
87
86
|
"name": obj.get("name"),
|
|
88
|
-
"type": obj.get("type")
|
|
87
|
+
"type": obj.get("type"),
|
|
88
|
+
"description": obj.get("description")
|
|
89
89
|
})
|
|
90
90
|
return _obj
|
|
91
91
|
|
asteroid_odyssey/{agents_v1_gen/models/agent_profile.py → models/agents_profile_agent_profile.py}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
|
|
3
3
|
"""
|
|
4
|
-
|
|
4
|
+
Agent Service
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document: v1
|
|
8
|
+
The version of the OpenAPI document: v1
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
11
|
Do not edit the class manually.
|
|
@@ -20,31 +20,34 @@ import json
|
|
|
20
20
|
from datetime import datetime
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
-
from asteroid_odyssey.
|
|
24
|
-
from asteroid_odyssey.
|
|
25
|
-
from asteroid_odyssey.
|
|
26
|
-
from asteroid_odyssey.
|
|
23
|
+
from asteroid_odyssey.models.agents_profile_cookie import AgentsProfileCookie
|
|
24
|
+
from asteroid_odyssey.models.agents_profile_country_code import AgentsProfileCountryCode
|
|
25
|
+
from asteroid_odyssey.models.agents_profile_credential import AgentsProfileCredential
|
|
26
|
+
from asteroid_odyssey.models.agents_profile_operating_system import AgentsProfileOperatingSystem
|
|
27
|
+
from asteroid_odyssey.models.agents_profile_proxy_type import AgentsProfileProxyType
|
|
27
28
|
from typing import Optional, Set
|
|
28
29
|
from typing_extensions import Self
|
|
29
30
|
|
|
30
|
-
class
|
|
31
|
+
class AgentsProfileAgentProfile(BaseModel):
|
|
31
32
|
"""
|
|
32
|
-
|
|
33
|
+
An agent profile containing browser configuration and credentials
|
|
33
34
|
""" # noqa: E501
|
|
34
35
|
id: StrictStr = Field(description="Unique identifier for the agent profile")
|
|
35
36
|
name: StrictStr = Field(description="Name of the agent profile (unique within organization)")
|
|
36
37
|
description: StrictStr = Field(description="Description of the agent profile")
|
|
37
|
-
organization_id: StrictStr = Field(description="The ID of the organization that
|
|
38
|
-
proxy_cc: Optional[
|
|
39
|
-
proxy_type: Optional[
|
|
40
|
-
captcha_solver_active: StrictBool = Field(description="Whether the captcha solver is active for this profile")
|
|
41
|
-
sticky_ip: StrictBool = Field(description="Whether the same IP address
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
38
|
+
organization_id: StrictStr = Field(description="The ID of the organization that owns this profile", alias="organizationId")
|
|
39
|
+
proxy_cc: Optional[AgentsProfileCountryCode] = Field(default=None, description="Country code for proxy location", alias="proxyCC")
|
|
40
|
+
proxy_type: Optional[AgentsProfileProxyType] = Field(default=None, description="Type of proxy to use", alias="proxyType")
|
|
41
|
+
captcha_solver_active: StrictBool = Field(description="Whether the captcha solver is active for this profile", alias="captchaSolverActive")
|
|
42
|
+
sticky_ip: StrictBool = Field(description="Whether to use the same IP address for all executions", alias="stickyIP")
|
|
43
|
+
operating_system: Optional[AgentsProfileOperatingSystem] = Field(default=None, description="Operating system to emulate", alias="operatingSystem")
|
|
44
|
+
extra_stealth: StrictBool = Field(description="Whether extra stealth mode is enabled", alias="extraStealth")
|
|
45
|
+
cache_persistence: StrictBool = Field(description="Whether to persist browser cache between sessions", alias="cachePersistence")
|
|
46
|
+
credentials: List[AgentsProfileCredential] = Field(description="List of credentials associated with this profile")
|
|
47
|
+
cookies: List[AgentsProfileCookie] = Field(description="List of cookies associated with this profile")
|
|
48
|
+
created_at: datetime = Field(description="When the profile was created", alias="createdAt")
|
|
49
|
+
updated_at: datetime = Field(description="When the profile was last updated", alias="updatedAt")
|
|
50
|
+
__properties: ClassVar[List[str]] = ["id", "name", "description", "organizationId", "proxyCC", "proxyType", "captchaSolverActive", "stickyIP", "operatingSystem", "extraStealth", "cachePersistence", "credentials", "cookies", "createdAt", "updatedAt"]
|
|
48
51
|
|
|
49
52
|
model_config = ConfigDict(
|
|
50
53
|
populate_by_name=True,
|
|
@@ -64,7 +67,7 @@ class AgentProfile(BaseModel):
|
|
|
64
67
|
|
|
65
68
|
@classmethod
|
|
66
69
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
67
|
-
"""Create an instance of
|
|
70
|
+
"""Create an instance of AgentsProfileAgentProfile from a JSON string"""
|
|
68
71
|
return cls.from_dict(json.loads(json_str))
|
|
69
72
|
|
|
70
73
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -103,7 +106,7 @@ class AgentProfile(BaseModel):
|
|
|
103
106
|
|
|
104
107
|
@classmethod
|
|
105
108
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
106
|
-
"""Create an instance of
|
|
109
|
+
"""Create an instance of AgentsProfileAgentProfile from a dict"""
|
|
107
110
|
if obj is None:
|
|
108
111
|
return None
|
|
109
112
|
|
|
@@ -114,16 +117,18 @@ class AgentProfile(BaseModel):
|
|
|
114
117
|
"id": obj.get("id"),
|
|
115
118
|
"name": obj.get("name"),
|
|
116
119
|
"description": obj.get("description"),
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"
|
|
126
|
-
"
|
|
120
|
+
"organizationId": obj.get("organizationId"),
|
|
121
|
+
"proxyCC": obj.get("proxyCC"),
|
|
122
|
+
"proxyType": obj.get("proxyType"),
|
|
123
|
+
"captchaSolverActive": obj.get("captchaSolverActive"),
|
|
124
|
+
"stickyIP": obj.get("stickyIP"),
|
|
125
|
+
"operatingSystem": obj.get("operatingSystem"),
|
|
126
|
+
"extraStealth": obj.get("extraStealth"),
|
|
127
|
+
"cachePersistence": obj.get("cachePersistence"),
|
|
128
|
+
"credentials": [AgentsProfileCredential.from_dict(_item) for _item in obj["credentials"]] if obj.get("credentials") is not None else None,
|
|
129
|
+
"cookies": [AgentsProfileCookie.from_dict(_item) for _item in obj["cookies"]] if obj.get("cookies") is not None else None,
|
|
130
|
+
"createdAt": obj.get("createdAt"),
|
|
131
|
+
"updatedAt": obj.get("updatedAt")
|
|
127
132
|
})
|
|
128
133
|
return _obj
|
|
129
134
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
|
|
3
3
|
"""
|
|
4
|
-
|
|
4
|
+
Agent Service
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document: v1
|
|
8
|
+
The version of the OpenAPI document: v1
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
11
|
Do not edit the class manually.
|
|
@@ -18,33 +18,28 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
from datetime import datetime
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing_extensions import Annotated
|
|
24
|
+
from asteroid_odyssey.models.agents_profile_same_site import AgentsProfileSameSite
|
|
23
25
|
from typing import Optional, Set
|
|
24
26
|
from typing_extensions import Self
|
|
25
27
|
|
|
26
|
-
class
|
|
28
|
+
class AgentsProfileCookie(BaseModel):
|
|
27
29
|
"""
|
|
28
|
-
|
|
30
|
+
A browser cookie stored for an agent profile
|
|
29
31
|
""" # noqa: E501
|
|
30
32
|
id: Optional[StrictStr] = Field(default=None, description="Unique identifier for the cookie")
|
|
31
|
-
name:
|
|
32
|
-
key:
|
|
33
|
-
value:
|
|
33
|
+
name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Display name for the cookie")
|
|
34
|
+
key: Annotated[str, Field(min_length=1, strict=True)] = Field(description="The cookie key/name as sent in HTTP headers")
|
|
35
|
+
value: Annotated[str, Field(min_length=1, strict=True)] = Field(description="The cookie value")
|
|
34
36
|
expiry: Optional[datetime] = Field(default=None, description="When the cookie expires (optional)")
|
|
35
|
-
domain:
|
|
37
|
+
domain: Annotated[str, Field(min_length=1, strict=True)] = Field(description="The domain for which the cookie is valid")
|
|
36
38
|
secure: StrictBool = Field(description="Whether the cookie should only be sent over HTTPS")
|
|
37
|
-
same_site:
|
|
38
|
-
http_only: StrictBool = Field(description="Whether the cookie should be accessible only via HTTP(S)")
|
|
39
|
-
created_at: datetime = Field(description="When the cookie was created")
|
|
40
|
-
__properties: ClassVar[List[str]] = ["id", "name", "key", "value", "expiry", "domain", "secure", "
|
|
41
|
-
|
|
42
|
-
@field_validator('same_site')
|
|
43
|
-
def same_site_validate_enum(cls, value):
|
|
44
|
-
"""Validates the enum"""
|
|
45
|
-
if value not in set(['Strict', 'Lax', 'None']):
|
|
46
|
-
raise ValueError("must be one of enum values ('Strict', 'Lax', 'None')")
|
|
47
|
-
return value
|
|
39
|
+
same_site: AgentsProfileSameSite = Field(description="SameSite attribute for the cookie", alias="sameSite")
|
|
40
|
+
http_only: StrictBool = Field(description="Whether the cookie should be accessible only via HTTP(S)", alias="httpOnly")
|
|
41
|
+
created_at: Optional[datetime] = Field(default=None, description="When the cookie was created", alias="createdAt")
|
|
42
|
+
__properties: ClassVar[List[str]] = ["id", "name", "key", "value", "expiry", "domain", "secure", "sameSite", "httpOnly", "createdAt"]
|
|
48
43
|
|
|
49
44
|
model_config = ConfigDict(
|
|
50
45
|
populate_by_name=True,
|
|
@@ -64,7 +59,7 @@ class Cookie(BaseModel):
|
|
|
64
59
|
|
|
65
60
|
@classmethod
|
|
66
61
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
67
|
-
"""Create an instance of
|
|
62
|
+
"""Create an instance of AgentsProfileCookie from a JSON string"""
|
|
68
63
|
return cls.from_dict(json.loads(json_str))
|
|
69
64
|
|
|
70
65
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -89,7 +84,7 @@ class Cookie(BaseModel):
|
|
|
89
84
|
|
|
90
85
|
@classmethod
|
|
91
86
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
92
|
-
"""Create an instance of
|
|
87
|
+
"""Create an instance of AgentsProfileCookie from a dict"""
|
|
93
88
|
if obj is None:
|
|
94
89
|
return None
|
|
95
90
|
|
|
@@ -104,9 +99,9 @@ class Cookie(BaseModel):
|
|
|
104
99
|
"expiry": obj.get("expiry"),
|
|
105
100
|
"domain": obj.get("domain"),
|
|
106
101
|
"secure": obj.get("secure"),
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"
|
|
102
|
+
"sameSite": obj.get("sameSite"),
|
|
103
|
+
"httpOnly": obj.get("httpOnly"),
|
|
104
|
+
"createdAt": obj.get("createdAt")
|
|
110
105
|
})
|
|
111
106
|
return _obj
|
|
112
107
|
|