11# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22
3- from typing import Optional
3+ from typing import List , Optional
44from datetime import datetime
55
66from .._models import BaseModel
7- from .browser_pool_request import BrowserPoolRequest
7+ from .shared .browser_profile import BrowserProfile
8+ from .shared .browser_viewport import BrowserViewport
9+ from .shared .browser_extension import BrowserExtension
810
9- __all__ = ["BrowserPool" ]
11+ __all__ = ["BrowserPool" , "BrowserPoolConfig" ]
12+
13+
14+ class BrowserPoolConfig (BaseModel ):
15+ """Configuration used to create all browsers in this pool"""
16+
17+ size : int
18+ """Number of browsers to create in the pool"""
19+
20+ extensions : Optional [List [BrowserExtension ]] = None
21+ """List of browser extensions to load into the session.
22+
23+ Provide each by id or name.
24+ """
25+
26+ fill_rate_per_minute : Optional [int ] = None
27+ """Percentage of the pool to fill per minute. Defaults to 10%."""
28+
29+ headless : Optional [bool ] = None
30+ """If true, launches the browser using a headless image. Defaults to false."""
31+
32+ kiosk_mode : Optional [bool ] = None
33+ """
34+ If true, launches the browser in kiosk mode to hide address bar and tabs in live
35+ view.
36+ """
37+
38+ name : Optional [str ] = None
39+ """Optional name for the browser pool. Must be unique within the organization."""
40+
41+ profile : Optional [BrowserProfile ] = None
42+ """Profile selection for the browser session.
43+
44+ Provide either id or name. If specified, the matching profile will be loaded
45+ into the browser session. Profiles must be created beforehand.
46+ """
47+
48+ proxy_id : Optional [str ] = None
49+ """Optional proxy to associate to the browser session.
50+
51+ Must reference a proxy belonging to the caller's org.
52+ """
53+
54+ stealth : Optional [bool ] = None
55+ """
56+ If true, launches the browser in stealth mode to reduce detection by anti-bot
57+ mechanisms.
58+ """
59+
60+ timeout_seconds : Optional [int ] = None
61+ """
62+ Default idle timeout in seconds for browsers acquired from this pool before they
63+ are destroyed. Defaults to 600 seconds if not specified
64+ """
65+
66+ viewport : Optional [BrowserViewport ] = None
67+ """Initial browser window size in pixels with optional refresh rate.
68+
69+ If omitted, image defaults apply (1920x1080@25). Only specific viewport
70+ configurations are supported. The server will reject unsupported combinations.
71+ Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
72+ 1440x900@25, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
73+ be automatically determined from the width and height if they match a supported
74+ configuration exactly. Note: Higher resolutions may affect the responsiveness of
75+ live view browser
76+ """
1077
1178
1279class BrowserPool (BaseModel ):
@@ -21,7 +88,7 @@ class BrowserPool(BaseModel):
2188 available_count : int
2289 """Number of browsers currently available in the pool"""
2390
24- browser_pool_config : BrowserPoolRequest
91+ browser_pool_config : BrowserPoolConfig
2592 """Configuration used to create all browsers in this pool"""
2693
2794 created_at : datetime
0 commit comments