-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbrowser_create_response.py
More file actions
142 lines (106 loc) · 5.01 KB
/
Copy pathbrowser_create_response.py
File metadata and controls
142 lines (106 loc) · 5.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Dict, Optional
from datetime import datetime
from typing_extensions import Literal
from .tags import Tags
from .profile import Profile
from .._models import BaseModel
from .browser_proxy import BrowserProxy
from .browser_usage import BrowserUsage
from .browser_memory import BrowserMemory
from .browser_pool_ref import BrowserPoolRef
from .browser_network_config import BrowserNetworkConfig
from .shared.browser_viewport import BrowserViewport
from .browsers.browser_telemetry_config import BrowserTelemetryConfig
__all__ = ["BrowserCreateResponse"]
class BrowserCreateResponse(BaseModel):
cdp_ws_url: str
"""Websocket URL for Chrome DevTools Protocol connections to the browser session"""
created_at: datetime
"""When the browser session was created."""
headless: bool
"""Whether the browser session is running in headless mode."""
memory: BrowserMemory
"""Memory allocated to the browser session."""
region: Literal["us-east", "eu-west"]
"""Geographic region of the browser session. Fixed once the session is created."""
session_id: str
"""Unique identifier for the browser session"""
stealth: bool
"""Whether the browser session is running in stealth mode."""
timeout_seconds: int
"""The number of seconds of inactivity before the browser session is terminated."""
webdriver_ws_url: str
"""Websocket URL for WebDriver BiDi connections to the browser session"""
base_url: Optional[str] = None
"""Metro-API HTTP base URL for this browser session."""
browser_live_view_url: Optional[str] = None
"""Remote URL for live viewing the browser session.
Only available for non-headless browsers.
"""
chrome_policy: Optional[Dict[str, object]] = None
"""
Custom Chrome enterprise policy overrides that were applied to this browser
session, if any. Echoed back for verification. Keys are Chrome enterprise policy
names.
"""
deleted_at: Optional[datetime] = None
"""When the browser session was soft-deleted. Only present for deleted sessions."""
gpu: Optional[bool] = None
"""
Whether GPU acceleration is enabled for the browser session (only supported for
headful sessions).
"""
kiosk_mode: Optional[bool] = None
"""Whether the browser session is running in kiosk mode."""
name: Optional[str] = None
"""Human-readable name of the browser session, if one was set at creation."""
network: Optional[BrowserNetworkConfig] = None
"""Network configuration the session was created with, if any.
Omitted when the session has no network configuration.
"""
pool: Optional[BrowserPoolRef] = None
"""Browser pool this session was acquired from, if any."""
profile: Optional[Profile] = None
"""Browser profile metadata."""
profile_save_changes: Optional[bool] = None
"""
Whether changes made during this browser session are saved back to its profile
when the session ends. Omitted when no profile is attached.
"""
proxy: Optional[BrowserProxy] = None
"""Resolved proxy configuration for this browser session."""
proxy_id: Optional[str] = None
"""ID of the proxy associated with this browser session, if any.
Deprecated in favor of proxy.
"""
start_url: Optional[str] = None
"""URL the session was asked to navigate to on creation, if any.
Recorded for debugging. Navigation is fire-and-forget — the URL is dispatched to
the browser without waiting for it to load, and any errors (DNS failure, bad
status, timeout) are silently dropped. Captures what was requested, not what the
browser actually loaded.
"""
tags: Optional[Tags] = None
"""User-defined key-value tags that were set on this browser session, if any.
Echoed back when present.
"""
telemetry: Optional[BrowserTelemetryConfig] = None
"""Active telemetry configuration for the session, if any."""
usage: Optional[BrowserUsage] = None
"""Session usage metrics."""
viewport: Optional[BrowserViewport] = None
"""
Initial browser window size in pixels with optional refresh rate. If omitted,
image defaults apply (1920x1080@25). For GPU images, the default is
1920x1080@60. Arbitrary viewport dimensions and refresh rates are accepted.
Known-good presets include: 2560x1440@10, 1920x1080@25, 1920x1200@25,
1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60, 768x1024@60, 390x844@60. For
GPU images, recommended presets use one of these resolutions with refresh rates
60, 30, 25, or 10: 800x600, 960x720, 1024x576, 1024x768, 1152x648, 1200x800,
1280x720, 1368x768, 1440x900, 1600x900, 1920x1080, 1920x1200, 390x844, 360x250,
768x1024, 800x1600. Viewports outside this list may exhibit unstable live view
or recording behavior. If refresh_rate is not provided, it will be automatically
determined based on the resolution (higher resolutions use lower refresh rates
to keep bandwidth reasonable).
"""