anchorbrowser 0.1.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.
- anchorbrowser/__init__.py +100 -0
- anchorbrowser/_base_client.py +1995 -0
- anchorbrowser/_client.py +440 -0
- anchorbrowser/_compat.py +219 -0
- anchorbrowser/_constants.py +14 -0
- anchorbrowser/_exceptions.py +108 -0
- anchorbrowser/_files.py +123 -0
- anchorbrowser/_models.py +829 -0
- anchorbrowser/_qs.py +150 -0
- anchorbrowser/_resource.py +43 -0
- anchorbrowser/_response.py +832 -0
- anchorbrowser/_streaming.py +333 -0
- anchorbrowser/_types.py +219 -0
- anchorbrowser/_utils/__init__.py +57 -0
- anchorbrowser/_utils/_logs.py +25 -0
- anchorbrowser/_utils/_proxy.py +65 -0
- anchorbrowser/_utils/_reflection.py +42 -0
- anchorbrowser/_utils/_resources_proxy.py +24 -0
- anchorbrowser/_utils/_streams.py +12 -0
- anchorbrowser/_utils/_sync.py +86 -0
- anchorbrowser/_utils/_transform.py +447 -0
- anchorbrowser/_utils/_typing.py +151 -0
- anchorbrowser/_utils/_utils.py +422 -0
- anchorbrowser/_version.py +4 -0
- anchorbrowser/lib/.keep +4 -0
- anchorbrowser/lib/agent.py +69 -0
- anchorbrowser/lib/browser.py +186 -0
- anchorbrowser/py.typed +0 -0
- anchorbrowser/resources/__init__.py +61 -0
- anchorbrowser/resources/agent.py +305 -0
- anchorbrowser/resources/browser.py +152 -0
- anchorbrowser/resources/extensions.py +412 -0
- anchorbrowser/resources/profiles.py +553 -0
- anchorbrowser/resources/sessions/__init__.py +89 -0
- anchorbrowser/resources/sessions/all.py +192 -0
- anchorbrowser/resources/sessions/clipboard.py +252 -0
- anchorbrowser/resources/sessions/keyboard.py +298 -0
- anchorbrowser/resources/sessions/mouse.py +651 -0
- anchorbrowser/resources/sessions/recordings/__init__.py +33 -0
- anchorbrowser/resources/sessions/recordings/primary.py +176 -0
- anchorbrowser/resources/sessions/recordings/recordings.py +357 -0
- anchorbrowser/resources/sessions/sessions.py +1122 -0
- anchorbrowser/resources/tools.py +529 -0
- anchorbrowser/types/__init__.py +32 -0
- anchorbrowser/types/extension_delete_response.py +12 -0
- anchorbrowser/types/extension_list_response.py +31 -0
- anchorbrowser/types/extension_manifest.py +28 -0
- anchorbrowser/types/extension_retrieve_response.py +27 -0
- anchorbrowser/types/extension_upload_params.py +17 -0
- anchorbrowser/types/extension_upload_response.py +31 -0
- anchorbrowser/types/profile_create_params.py +31 -0
- anchorbrowser/types/profile_list_response.py +43 -0
- anchorbrowser/types/profile_retrieve_response.py +36 -0
- anchorbrowser/types/profile_update_params.py +27 -0
- anchorbrowser/types/session_copy_response.py +12 -0
- anchorbrowser/types/session_create_params.py +196 -0
- anchorbrowser/types/session_create_response.py +22 -0
- anchorbrowser/types/session_drag_and_drop_params.py +26 -0
- anchorbrowser/types/session_drag_and_drop_response.py +11 -0
- anchorbrowser/types/session_goto_params.py +12 -0
- anchorbrowser/types/session_goto_response.py +11 -0
- anchorbrowser/types/session_paste_params.py +12 -0
- anchorbrowser/types/session_paste_response.py +11 -0
- anchorbrowser/types/session_retrieve_downloads_response.py +51 -0
- anchorbrowser/types/session_scroll_params.py +26 -0
- anchorbrowser/types/session_scroll_response.py +11 -0
- anchorbrowser/types/sessions/__init__.py +25 -0
- anchorbrowser/types/sessions/all_status_response.py +30 -0
- anchorbrowser/types/sessions/clipboard_get_response.py +16 -0
- anchorbrowser/types/sessions/clipboard_set_params.py +12 -0
- anchorbrowser/types/sessions/clipboard_set_response.py +11 -0
- anchorbrowser/types/sessions/keyboard_shortcut_params.py +18 -0
- anchorbrowser/types/sessions/keyboard_shortcut_response.py +11 -0
- anchorbrowser/types/sessions/keyboard_type_params.py +15 -0
- anchorbrowser/types/sessions/keyboard_type_response.py +11 -0
- anchorbrowser/types/sessions/mouse_click_params.py +18 -0
- anchorbrowser/types/sessions/mouse_click_response.py +11 -0
- anchorbrowser/types/sessions/mouse_double_click_params.py +18 -0
- anchorbrowser/types/sessions/mouse_double_click_response.py +11 -0
- anchorbrowser/types/sessions/mouse_down_params.py +18 -0
- anchorbrowser/types/sessions/mouse_down_response.py +11 -0
- anchorbrowser/types/sessions/mouse_move_params.py +15 -0
- anchorbrowser/types/sessions/mouse_move_response.py +11 -0
- anchorbrowser/types/sessions/mouse_up_params.py +18 -0
- anchorbrowser/types/sessions/mouse_up_response.py +11 -0
- anchorbrowser/types/sessions/recording_list_response.py +46 -0
- anchorbrowser/types/sessions/recording_pause_response.py +12 -0
- anchorbrowser/types/sessions/recording_resume_response.py +12 -0
- anchorbrowser/types/sessions/recordings/__init__.py +3 -0
- anchorbrowser/types/shared/__init__.py +3 -0
- anchorbrowser/types/shared/success_response.py +15 -0
- anchorbrowser/types/tool_fetch_webpage_params.py +26 -0
- anchorbrowser/types/tool_fetch_webpage_response.py +7 -0
- anchorbrowser/types/tool_perform_web_task_params.py +30 -0
- anchorbrowser/types/tool_perform_web_task_response.py +16 -0
- anchorbrowser/types/tool_screenshot_webpage_params.py +48 -0
- anchorbrowser-0.1.0.dist-info/METADATA +449 -0
- anchorbrowser-0.1.0.dist-info/RECORD +100 -0
- anchorbrowser-0.1.0.dist-info/WHEEL +4 -0
- anchorbrowser-0.1.0.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from ..._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["ClipboardSetResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ClipboardSetResponse(BaseModel):
|
|
11
|
+
status: Optional[str] = None
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import List
|
|
6
|
+
from typing_extensions import Required, Annotated, TypedDict
|
|
7
|
+
|
|
8
|
+
from ..._utils import PropertyInfo
|
|
9
|
+
|
|
10
|
+
__all__ = ["KeyboardShortcutParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class KeyboardShortcutParams(TypedDict, total=False):
|
|
14
|
+
keys: Required[List[str]]
|
|
15
|
+
"""Array of keys to press simultaneously"""
|
|
16
|
+
|
|
17
|
+
hold_time: Annotated[int, PropertyInfo(alias="holdTime")]
|
|
18
|
+
"""Time to hold the keys down in milliseconds"""
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from ..._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["KeyboardShortcutResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class KeyboardShortcutResponse(BaseModel):
|
|
11
|
+
status: Optional[str] = None
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Required, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["KeyboardTypeParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class KeyboardTypeParams(TypedDict, total=False):
|
|
11
|
+
text: Required[str]
|
|
12
|
+
"""Text to type"""
|
|
13
|
+
|
|
14
|
+
delay: int
|
|
15
|
+
"""Delay between keystrokes in milliseconds"""
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from ..._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["KeyboardTypeResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class KeyboardTypeResponse(BaseModel):
|
|
11
|
+
status: Optional[str] = None
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["MouseClickParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class MouseClickParams(TypedDict, total=False):
|
|
11
|
+
x: Required[int]
|
|
12
|
+
"""X coordinate"""
|
|
13
|
+
|
|
14
|
+
y: Required[int]
|
|
15
|
+
"""Y coordinate"""
|
|
16
|
+
|
|
17
|
+
button: Literal["left", "middle", "right"]
|
|
18
|
+
"""Mouse button to use"""
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from ..._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["MouseClickResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class MouseClickResponse(BaseModel):
|
|
11
|
+
status: Optional[str] = None
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["MouseDoubleClickParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class MouseDoubleClickParams(TypedDict, total=False):
|
|
11
|
+
x: Required[int]
|
|
12
|
+
"""X coordinate"""
|
|
13
|
+
|
|
14
|
+
y: Required[int]
|
|
15
|
+
"""Y coordinate"""
|
|
16
|
+
|
|
17
|
+
button: Literal["left", "middle", "right"]
|
|
18
|
+
"""Mouse button to use"""
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from ..._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["MouseDoubleClickResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class MouseDoubleClickResponse(BaseModel):
|
|
11
|
+
status: Optional[str] = None
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["MouseDownParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class MouseDownParams(TypedDict, total=False):
|
|
11
|
+
x: Required[int]
|
|
12
|
+
"""X coordinate"""
|
|
13
|
+
|
|
14
|
+
y: Required[int]
|
|
15
|
+
"""Y coordinate"""
|
|
16
|
+
|
|
17
|
+
button: Literal["left", "middle", "right"]
|
|
18
|
+
"""Mouse button to use"""
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from ..._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["MouseDownResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class MouseDownResponse(BaseModel):
|
|
11
|
+
status: Optional[str] = None
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Required, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["MouseMoveParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class MouseMoveParams(TypedDict, total=False):
|
|
11
|
+
x: Required[int]
|
|
12
|
+
"""X coordinate"""
|
|
13
|
+
|
|
14
|
+
y: Required[int]
|
|
15
|
+
"""Y coordinate"""
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from ..._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["MouseMoveResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class MouseMoveResponse(BaseModel):
|
|
11
|
+
status: Optional[str] = None
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["MouseUpParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class MouseUpParams(TypedDict, total=False):
|
|
11
|
+
x: Required[int]
|
|
12
|
+
"""X coordinate"""
|
|
13
|
+
|
|
14
|
+
y: Required[int]
|
|
15
|
+
"""Y coordinate"""
|
|
16
|
+
|
|
17
|
+
button: Literal["left", "middle", "right"]
|
|
18
|
+
"""Mouse button to use"""
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from ..._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["MouseUpResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class MouseUpResponse(BaseModel):
|
|
11
|
+
status: Optional[str] = None
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
|
|
6
|
+
from ..._models import BaseModel
|
|
7
|
+
|
|
8
|
+
__all__ = ["RecordingListResponse", "Data", "DataData", "DataDataItem"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class DataDataItem(BaseModel):
|
|
12
|
+
id: Optional[str] = None
|
|
13
|
+
"""Unique identifier for the recording"""
|
|
14
|
+
|
|
15
|
+
created_at: Optional[datetime] = None
|
|
16
|
+
"""Timestamp when the recording was created"""
|
|
17
|
+
|
|
18
|
+
duration: Optional[str] = None
|
|
19
|
+
"""Duration of the recording"""
|
|
20
|
+
|
|
21
|
+
file_link: Optional[str] = None
|
|
22
|
+
"""URL to access the recording file"""
|
|
23
|
+
|
|
24
|
+
is_primary: Optional[bool] = None
|
|
25
|
+
"""Indicates if this is the primary recording"""
|
|
26
|
+
|
|
27
|
+
size: Optional[float] = None
|
|
28
|
+
"""Size of the recording file in bytes"""
|
|
29
|
+
|
|
30
|
+
suggested_file_name: Optional[str] = None
|
|
31
|
+
"""Suggested filename for the recording"""
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class DataData(BaseModel):
|
|
35
|
+
count: Optional[int] = None
|
|
36
|
+
"""Total number of video recordings"""
|
|
37
|
+
|
|
38
|
+
items: Optional[List[DataDataItem]] = None
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class Data(BaseModel):
|
|
42
|
+
data: Optional[DataData] = None
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class RecordingListResponse(BaseModel):
|
|
46
|
+
data: Optional[Data] = None
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from ..._models import BaseModel
|
|
6
|
+
from ..shared.success_response import SuccessResponse
|
|
7
|
+
|
|
8
|
+
__all__ = ["RecordingPauseResponse"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class RecordingPauseResponse(BaseModel):
|
|
12
|
+
data: Optional[SuccessResponse] = None
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from ..._models import BaseModel
|
|
6
|
+
from ..shared.success_response import SuccessResponse
|
|
7
|
+
|
|
8
|
+
__all__ = ["RecordingResumeResponse"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class RecordingResumeResponse(BaseModel):
|
|
12
|
+
data: Optional[SuccessResponse] = None
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from ..._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["SuccessResponse", "Data"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Data(BaseModel):
|
|
11
|
+
status: Optional[str] = None
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class SuccessResponse(BaseModel):
|
|
15
|
+
data: Optional[Data] = None
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal, Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from .._utils import PropertyInfo
|
|
8
|
+
|
|
9
|
+
__all__ = ["ToolFetchWebpageParams"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ToolFetchWebpageParams(TypedDict, total=False):
|
|
13
|
+
session_id: Annotated[str, PropertyInfo(alias="sessionId")]
|
|
14
|
+
"""
|
|
15
|
+
An optional browser session identifier to reference an existing running browser
|
|
16
|
+
session. If provided, the tool will execute within that browser session.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
format: Literal["html", "markdown"]
|
|
20
|
+
"""The output format of the content."""
|
|
21
|
+
|
|
22
|
+
url: str
|
|
23
|
+
"""The URL of the webpage to fetch content from.
|
|
24
|
+
|
|
25
|
+
When left empty, the current webpage is used.
|
|
26
|
+
"""
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Required, Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from .._utils import PropertyInfo
|
|
8
|
+
|
|
9
|
+
__all__ = ["ToolPerformWebTaskParams"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ToolPerformWebTaskParams(TypedDict, total=False):
|
|
13
|
+
prompt: Required[str]
|
|
14
|
+
"""The task to be autonomously completed."""
|
|
15
|
+
|
|
16
|
+
session_id: Annotated[str, PropertyInfo(alias="sessionId")]
|
|
17
|
+
"""
|
|
18
|
+
An optional browser session identifier to reference an existing running browser
|
|
19
|
+
sessions. When passed, the tool will be executed on the provided browser
|
|
20
|
+
session.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
output_schema: object
|
|
24
|
+
"""JSON Schema defining the expected structure of the output data."""
|
|
25
|
+
|
|
26
|
+
url: str
|
|
27
|
+
"""The URL of the webpage.
|
|
28
|
+
|
|
29
|
+
If not provided, the tool will use the current page in the session.
|
|
30
|
+
"""
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, Union, Optional
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["ToolPerformWebTaskResponse", "Data"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Data(BaseModel):
|
|
11
|
+
result: Union[str, Dict[str, object], None] = None
|
|
12
|
+
"""The outcome or answer as a string"""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class ToolPerformWebTaskResponse(BaseModel):
|
|
16
|
+
data: Optional[Data] = None
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from .._utils import PropertyInfo
|
|
8
|
+
|
|
9
|
+
__all__ = ["ToolScreenshotWebpageParams"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ToolScreenshotWebpageParams(TypedDict, total=False):
|
|
13
|
+
session_id: Annotated[str, PropertyInfo(alias="sessionId")]
|
|
14
|
+
"""
|
|
15
|
+
An optional browser session identifier to reference an existing running browser
|
|
16
|
+
sessions. When passed, the tool will be executed on the provided browser
|
|
17
|
+
session.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
capture_full_height: bool
|
|
21
|
+
"""If true, captures the entire height of the page, ignoring the viewport height."""
|
|
22
|
+
|
|
23
|
+
height: int
|
|
24
|
+
"""The height of the browser viewport in pixels."""
|
|
25
|
+
|
|
26
|
+
image_quality: int
|
|
27
|
+
"""Quality of the output image, on the range 1-100.
|
|
28
|
+
|
|
29
|
+
100 will not perform any compression.
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
s3_target_address: str
|
|
33
|
+
"""Presigned S3 url target to upload the image to."""
|
|
34
|
+
|
|
35
|
+
scroll_all_content: bool
|
|
36
|
+
"""If true, scrolls the page and captures all visible content."""
|
|
37
|
+
|
|
38
|
+
url: str
|
|
39
|
+
"""The URL of the webpage to capture."""
|
|
40
|
+
|
|
41
|
+
wait: int
|
|
42
|
+
"""
|
|
43
|
+
Duration in milliseconds to wait after page has loaded, mainly used for sites
|
|
44
|
+
with JS animations.
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
width: int
|
|
48
|
+
"""The width of the browser viewport in pixels."""
|