tzafon 2.3.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.
Potentially problematic release.
This version of tzafon might be problematic. Click here for more details.
- tzafon/__init__.py +102 -0
- tzafon/_base_client.py +1995 -0
- tzafon/_client.py +403 -0
- tzafon/_compat.py +219 -0
- tzafon/_constants.py +14 -0
- tzafon/_exceptions.py +108 -0
- tzafon/_files.py +123 -0
- tzafon/_models.py +835 -0
- tzafon/_qs.py +150 -0
- tzafon/_resource.py +43 -0
- tzafon/_response.py +830 -0
- tzafon/_streaming.py +331 -0
- tzafon/_types.py +260 -0
- tzafon/_utils/__init__.py +64 -0
- tzafon/_utils/_compat.py +45 -0
- tzafon/_utils/_datetime_parse.py +136 -0
- tzafon/_utils/_logs.py +25 -0
- tzafon/_utils/_proxy.py +65 -0
- tzafon/_utils/_reflection.py +42 -0
- tzafon/_utils/_resources_proxy.py +24 -0
- tzafon/_utils/_streams.py +12 -0
- tzafon/_utils/_sync.py +86 -0
- tzafon/_utils/_transform.py +457 -0
- tzafon/_utils/_typing.py +156 -0
- tzafon/_utils/_utils.py +421 -0
- tzafon/_version.py +4 -0
- tzafon/lib/.keep +4 -0
- tzafon/py.typed +0 -0
- tzafon/resources/__init__.py +19 -0
- tzafon/resources/computers.py +2051 -0
- tzafon/types/__init__.py +24 -0
- tzafon/types/action_result.py +19 -0
- tzafon/types/computer_capture_screenshot_params.py +11 -0
- tzafon/types/computer_click_params.py +13 -0
- tzafon/types/computer_create_params.py +36 -0
- tzafon/types/computer_debug_params.py +15 -0
- tzafon/types/computer_double_click_params.py +13 -0
- tzafon/types/computer_drag_params.py +17 -0
- tzafon/types/computer_execute_action_params.py +72 -0
- tzafon/types/computer_execute_batch_params.py +73 -0
- tzafon/types/computer_execute_batch_response.py +8 -0
- tzafon/types/computer_get_html_params.py +11 -0
- tzafon/types/computer_keep_alive_response.py +8 -0
- tzafon/types/computer_list_response.py +10 -0
- tzafon/types/computer_navigate_params.py +11 -0
- tzafon/types/computer_press_hotkey_params.py +13 -0
- tzafon/types/computer_response.py +19 -0
- tzafon/types/computer_right_click_params.py +13 -0
- tzafon/types/computer_scroll_viewport_params.py +17 -0
- tzafon/types/computer_set_viewport_params.py +15 -0
- tzafon/types/computer_type_text_params.py +11 -0
- tzafon-2.3.0.dist-info/METADATA +429 -0
- tzafon-2.3.0.dist-info/RECORD +55 -0
- tzafon-2.3.0.dist-info/WHEEL +4 -0
- tzafon-2.3.0.dist-info/licenses/LICENSE +7 -0
tzafon/types/__init__.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .action_result import ActionResult as ActionResult
|
|
6
|
+
from .computer_response import ComputerResponse as ComputerResponse
|
|
7
|
+
from .computer_drag_params import ComputerDragParams as ComputerDragParams
|
|
8
|
+
from .computer_click_params import ComputerClickParams as ComputerClickParams
|
|
9
|
+
from .computer_debug_params import ComputerDebugParams as ComputerDebugParams
|
|
10
|
+
from .computer_create_params import ComputerCreateParams as ComputerCreateParams
|
|
11
|
+
from .computer_list_response import ComputerListResponse as ComputerListResponse
|
|
12
|
+
from .computer_get_html_params import ComputerGetHTMLParams as ComputerGetHTMLParams
|
|
13
|
+
from .computer_navigate_params import ComputerNavigateParams as ComputerNavigateParams
|
|
14
|
+
from .computer_type_text_params import ComputerTypeTextParams as ComputerTypeTextParams
|
|
15
|
+
from .computer_right_click_params import ComputerRightClickParams as ComputerRightClickParams
|
|
16
|
+
from .computer_double_click_params import ComputerDoubleClickParams as ComputerDoubleClickParams
|
|
17
|
+
from .computer_keep_alive_response import ComputerKeepAliveResponse as ComputerKeepAliveResponse
|
|
18
|
+
from .computer_press_hotkey_params import ComputerPressHotkeyParams as ComputerPressHotkeyParams
|
|
19
|
+
from .computer_set_viewport_params import ComputerSetViewportParams as ComputerSetViewportParams
|
|
20
|
+
from .computer_execute_batch_params import ComputerExecuteBatchParams as ComputerExecuteBatchParams
|
|
21
|
+
from .computer_execute_action_params import ComputerExecuteActionParams as ComputerExecuteActionParams
|
|
22
|
+
from .computer_execute_batch_response import ComputerExecuteBatchResponse as ComputerExecuteBatchResponse
|
|
23
|
+
from .computer_scroll_viewport_params import ComputerScrollViewportParams as ComputerScrollViewportParams
|
|
24
|
+
from .computer_capture_screenshot_params import ComputerCaptureScreenshotParams as ComputerCaptureScreenshotParams
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, Optional
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["ActionResult"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ActionResult(BaseModel):
|
|
11
|
+
error_message: Optional[str] = None
|
|
12
|
+
|
|
13
|
+
request_id: Optional[str] = None
|
|
14
|
+
|
|
15
|
+
result: Optional[Dict[str, object]] = None
|
|
16
|
+
|
|
17
|
+
status: Optional[str] = None
|
|
18
|
+
|
|
19
|
+
timestamp: Optional[str] = None
|
|
@@ -0,0 +1,11 @@
|
|
|
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 TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["ComputerCaptureScreenshotParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ComputerCaptureScreenshotParams(TypedDict, total=False):
|
|
11
|
+
base64: bool
|
|
@@ -0,0 +1,13 @@
|
|
|
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 TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["ComputerClickParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ComputerClickParams(TypedDict, total=False):
|
|
11
|
+
x: float
|
|
12
|
+
|
|
13
|
+
y: float
|
|
@@ -0,0 +1,36 @@
|
|
|
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 TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["ComputerCreateParams", "Display"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ComputerCreateParams(TypedDict, total=False):
|
|
11
|
+
auto_kill: bool
|
|
12
|
+
"""If true (default), kill session after inactivity.
|
|
13
|
+
|
|
14
|
+
If false, only kill on explicit stop or max_lifetime
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
context_id: str
|
|
18
|
+
|
|
19
|
+
display: Display
|
|
20
|
+
"""TODO: implement"""
|
|
21
|
+
|
|
22
|
+
kind: str
|
|
23
|
+
"""\"browser"|"desktop"|"code" etc"""
|
|
24
|
+
|
|
25
|
+
stealth: object
|
|
26
|
+
"""TODO: implement"""
|
|
27
|
+
|
|
28
|
+
timeout_seconds: int
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class Display(TypedDict, total=False):
|
|
32
|
+
height: int
|
|
33
|
+
|
|
34
|
+
scale: float
|
|
35
|
+
|
|
36
|
+
width: int
|
|
@@ -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 TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["ComputerDebugParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ComputerDebugParams(TypedDict, total=False):
|
|
11
|
+
command: str
|
|
12
|
+
|
|
13
|
+
max_output_length: int
|
|
14
|
+
|
|
15
|
+
timeout_seconds: int
|
|
@@ -0,0 +1,13 @@
|
|
|
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 TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["ComputerDoubleClickParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ComputerDoubleClickParams(TypedDict, total=False):
|
|
11
|
+
x: float
|
|
12
|
+
|
|
13
|
+
y: float
|
|
@@ -0,0 +1,17 @@
|
|
|
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 TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["ComputerDragParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ComputerDragParams(TypedDict, total=False):
|
|
11
|
+
x1: float
|
|
12
|
+
|
|
13
|
+
x2: float
|
|
14
|
+
|
|
15
|
+
y1: float
|
|
16
|
+
|
|
17
|
+
y2: float
|
|
@@ -0,0 +1,72 @@
|
|
|
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 TypedDict
|
|
6
|
+
|
|
7
|
+
from .._types import SequenceNotStr
|
|
8
|
+
|
|
9
|
+
__all__ = ["ComputerExecuteActionParams", "Action", "ActionDebug"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ComputerExecuteActionParams(TypedDict, total=False):
|
|
13
|
+
action: Action
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class ActionDebug(TypedDict, total=False):
|
|
17
|
+
command: str
|
|
18
|
+
|
|
19
|
+
max_output_length: int
|
|
20
|
+
|
|
21
|
+
timeout_seconds: int
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class Action(TypedDict, total=False):
|
|
25
|
+
auto_detect_encoding: bool
|
|
26
|
+
"""For get_html_content"""
|
|
27
|
+
|
|
28
|
+
base64: bool
|
|
29
|
+
"""For screenshot"""
|
|
30
|
+
|
|
31
|
+
button: str
|
|
32
|
+
|
|
33
|
+
debug: ActionDebug
|
|
34
|
+
|
|
35
|
+
dx: float
|
|
36
|
+
"""For scrolling"""
|
|
37
|
+
|
|
38
|
+
dy: float
|
|
39
|
+
|
|
40
|
+
height: int
|
|
41
|
+
|
|
42
|
+
keys: SequenceNotStr[str]
|
|
43
|
+
|
|
44
|
+
ms: int
|
|
45
|
+
|
|
46
|
+
scale_factor: float
|
|
47
|
+
|
|
48
|
+
text: str
|
|
49
|
+
|
|
50
|
+
type: str
|
|
51
|
+
"""
|
|
52
|
+
click|double_click|right_click|drag|type|keypress|scroll|wait|screenshot|go_to_url|debug|get_html_content|set_viewport
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
url: str
|
|
56
|
+
|
|
57
|
+
width: int
|
|
58
|
+
"""For set_viewport"""
|
|
59
|
+
|
|
60
|
+
x: float
|
|
61
|
+
|
|
62
|
+
x1: float
|
|
63
|
+
"""For dragging/scrolling"""
|
|
64
|
+
|
|
65
|
+
x2: float
|
|
66
|
+
"""For dragging"""
|
|
67
|
+
|
|
68
|
+
y: float
|
|
69
|
+
|
|
70
|
+
y1: float
|
|
71
|
+
|
|
72
|
+
y2: float
|
|
@@ -0,0 +1,73 @@
|
|
|
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 Iterable
|
|
6
|
+
from typing_extensions import TypedDict
|
|
7
|
+
|
|
8
|
+
from .._types import SequenceNotStr
|
|
9
|
+
|
|
10
|
+
__all__ = ["ComputerExecuteBatchParams", "Action", "ActionDebug"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ComputerExecuteBatchParams(TypedDict, total=False):
|
|
14
|
+
actions: Iterable[Action]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class ActionDebug(TypedDict, total=False):
|
|
18
|
+
command: str
|
|
19
|
+
|
|
20
|
+
max_output_length: int
|
|
21
|
+
|
|
22
|
+
timeout_seconds: int
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class Action(TypedDict, total=False):
|
|
26
|
+
auto_detect_encoding: bool
|
|
27
|
+
"""For get_html_content"""
|
|
28
|
+
|
|
29
|
+
base64: bool
|
|
30
|
+
"""For screenshot"""
|
|
31
|
+
|
|
32
|
+
button: str
|
|
33
|
+
|
|
34
|
+
debug: ActionDebug
|
|
35
|
+
|
|
36
|
+
dx: float
|
|
37
|
+
"""For scrolling"""
|
|
38
|
+
|
|
39
|
+
dy: float
|
|
40
|
+
|
|
41
|
+
height: int
|
|
42
|
+
|
|
43
|
+
keys: SequenceNotStr[str]
|
|
44
|
+
|
|
45
|
+
ms: int
|
|
46
|
+
|
|
47
|
+
scale_factor: float
|
|
48
|
+
|
|
49
|
+
text: str
|
|
50
|
+
|
|
51
|
+
type: str
|
|
52
|
+
"""
|
|
53
|
+
click|double_click|right_click|drag|type|keypress|scroll|wait|screenshot|go_to_url|debug|get_html_content|set_viewport
|
|
54
|
+
"""
|
|
55
|
+
|
|
56
|
+
url: str
|
|
57
|
+
|
|
58
|
+
width: int
|
|
59
|
+
"""For set_viewport"""
|
|
60
|
+
|
|
61
|
+
x: float
|
|
62
|
+
|
|
63
|
+
x1: float
|
|
64
|
+
"""For dragging/scrolling"""
|
|
65
|
+
|
|
66
|
+
x2: float
|
|
67
|
+
"""For dragging"""
|
|
68
|
+
|
|
69
|
+
y: float
|
|
70
|
+
|
|
71
|
+
y1: float
|
|
72
|
+
|
|
73
|
+
y2: float
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict
|
|
4
|
+
from typing_extensions import TypeAlias
|
|
5
|
+
|
|
6
|
+
__all__ = ["ComputerExecuteBatchResponse"]
|
|
7
|
+
|
|
8
|
+
ComputerExecuteBatchResponse: TypeAlias = Dict[str, object]
|
|
@@ -0,0 +1,11 @@
|
|
|
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 TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["ComputerGetHTMLParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ComputerGetHTMLParams(TypedDict, total=False):
|
|
11
|
+
auto_detect_encoding: bool
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
from typing_extensions import TypeAlias
|
|
5
|
+
|
|
6
|
+
from .computer_response import ComputerResponse
|
|
7
|
+
|
|
8
|
+
__all__ = ["ComputerListResponse"]
|
|
9
|
+
|
|
10
|
+
ComputerListResponse: TypeAlias = List[ComputerResponse]
|
|
@@ -0,0 +1,11 @@
|
|
|
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 TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["ComputerNavigateParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ComputerNavigateParams(TypedDict, total=False):
|
|
11
|
+
url: str
|
|
@@ -0,0 +1,13 @@
|
|
|
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 TypedDict
|
|
6
|
+
|
|
7
|
+
from .._types import SequenceNotStr
|
|
8
|
+
|
|
9
|
+
__all__ = ["ComputerPressHotkeyParams"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ComputerPressHotkeyParams(TypedDict, total=False):
|
|
13
|
+
keys: SequenceNotStr[str]
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, Optional
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["ComputerResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ComputerResponse(BaseModel):
|
|
11
|
+
id: Optional[str] = None
|
|
12
|
+
|
|
13
|
+
created_at: Optional[str] = None
|
|
14
|
+
|
|
15
|
+
endpoints: Optional[Dict[str, str]] = None
|
|
16
|
+
|
|
17
|
+
status: Optional[str] = None
|
|
18
|
+
|
|
19
|
+
type: Optional[str] = None
|
|
@@ -0,0 +1,13 @@
|
|
|
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 TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["ComputerRightClickParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ComputerRightClickParams(TypedDict, total=False):
|
|
11
|
+
x: float
|
|
12
|
+
|
|
13
|
+
y: float
|
|
@@ -0,0 +1,17 @@
|
|
|
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 TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["ComputerScrollViewportParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ComputerScrollViewportParams(TypedDict, total=False):
|
|
11
|
+
dx: float
|
|
12
|
+
|
|
13
|
+
dy: float
|
|
14
|
+
|
|
15
|
+
x: float
|
|
16
|
+
|
|
17
|
+
y: float
|
|
@@ -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 TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["ComputerSetViewportParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ComputerSetViewportParams(TypedDict, total=False):
|
|
11
|
+
height: int
|
|
12
|
+
|
|
13
|
+
scale_factor: float
|
|
14
|
+
|
|
15
|
+
width: int
|
|
@@ -0,0 +1,11 @@
|
|
|
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 TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["ComputerTypeTextParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ComputerTypeTextParams(TypedDict, total=False):
|
|
11
|
+
text: str
|