@@ -162,7 +162,7 @@ export interface BrowserPool {
162162 /**
163163 * Configuration used to create all browsers in this pool
164164 */
165- browser_pool_config : BrowserPoolRequest ;
165+ browser_pool_config : BrowserPool . BrowserPoolConfig ;
166166
167167 /**
168168 * Timestamp when the browser pool was created
@@ -175,118 +175,79 @@ export interface BrowserPool {
175175 name ?: string ;
176176}
177177
178- /**
179- * Request body for acquiring a browser from the pool.
180- */
181- export interface BrowserPoolAcquireRequest {
182- /**
183- * Maximum number of seconds to wait for a browser to be available. Defaults to the
184- * calculated time it would take to fill the pool at the currently configured fill
185- * rate.
186- */
187- acquire_timeout_seconds ?: number ;
188- }
189-
190- /**
191- * Request body for releasing a browser back to the pool.
192- */
193- export interface BrowserPoolReleaseRequest {
194- /**
195- * Browser session ID to release back to the pool
196- */
197- session_id : string ;
198-
199- /**
200- * Whether to reuse the browser instance or destroy it and create a new one.
201- * Defaults to true.
202- */
203- reuse ?: boolean ;
204- }
205-
206- /**
207- * Parameters for creating a browser pool. All browsers in the pool will be created
208- * with the same configuration.
209- */
210- export interface BrowserPoolRequest {
211- /**
212- * Number of browsers to create in the pool
213- */
214- size : number ;
215-
216- /**
217- * List of browser extensions to load into the session. Provide each by id or name.
218- */
219- extensions ?: Array < Shared . BrowserExtension > ;
220-
221- /**
222- * Percentage of the pool to fill per minute. Defaults to 10%.
223- */
224- fill_rate_per_minute ?: number ;
225-
226- /**
227- * If true, launches the browser using a headless image. Defaults to false.
228- */
229- headless ?: boolean ;
230-
231- /**
232- * If true, launches the browser in kiosk mode to hide address bar and tabs in live
233- * view.
234- */
235- kiosk_mode ?: boolean ;
236-
237- /**
238- * Optional name for the browser pool. Must be unique within the organization.
239- */
240- name ?: string ;
241-
242- /**
243- * Profile selection for the browser session. Provide either id or name. If
244- * specified, the matching profile will be loaded into the browser session.
245- * Profiles must be created beforehand.
246- */
247- profile ?: Shared . BrowserProfile ;
248-
178+ export namespace BrowserPool {
249179 /**
250- * Optional proxy to associate to the browser session. Must reference a proxy
251- * belonging to the caller's org.
252- */
253- proxy_id ?: string ;
254-
255- /**
256- * If true, launches the browser in stealth mode to reduce detection by anti-bot
257- * mechanisms.
258- */
259- stealth ?: boolean ;
260-
261- /**
262- * Default idle timeout in seconds for browsers acquired from this pool before they
263- * are destroyed. Defaults to 600 seconds if not specified
264- */
265- timeout_seconds ?: number ;
266-
267- /**
268- * Initial browser window size in pixels with optional refresh rate. If omitted,
269- * image defaults apply (1920x1080@25). Only specific viewport configurations are
270- * supported. The server will reject unsupported combinations. Supported
271- * resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
272- * 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will be
273- * automatically determined from the width and height if they match a supported
274- * configuration exactly. Note: Higher resolutions may affect the responsiveness of
275- * live view browser
276- */
277- viewport ?: Shared . BrowserViewport ;
278- }
279-
280- /**
281- * Parameters for updating a browser pool. All browsers in the pool will be created
282- * with the same configuration.
283- */
284- export interface BrowserPoolUpdateRequest extends BrowserPoolRequest {
285- /**
286- * Whether to discard all idle browsers and rebuild the pool immediately. Defaults
287- * to false.
180+ * Configuration used to create all browsers in this pool
288181 */
289- discard_all_idle ?: boolean ;
182+ export interface BrowserPoolConfig {
183+ /**
184+ * Number of browsers to create in the pool
185+ */
186+ size : number ;
187+
188+ /**
189+ * List of browser extensions to load into the session. Provide each by id or name.
190+ */
191+ extensions ?: Array < Shared . BrowserExtension > ;
192+
193+ /**
194+ * Percentage of the pool to fill per minute. Defaults to 10%.
195+ */
196+ fill_rate_per_minute ?: number ;
197+
198+ /**
199+ * If true, launches the browser using a headless image. Defaults to false.
200+ */
201+ headless ?: boolean ;
202+
203+ /**
204+ * If true, launches the browser in kiosk mode to hide address bar and tabs in live
205+ * view.
206+ */
207+ kiosk_mode ?: boolean ;
208+
209+ /**
210+ * Optional name for the browser pool. Must be unique within the organization.
211+ */
212+ name ?: string ;
213+
214+ /**
215+ * Profile selection for the browser session. Provide either id or name. If
216+ * specified, the matching profile will be loaded into the browser session.
217+ * Profiles must be created beforehand.
218+ */
219+ profile ?: Shared . BrowserProfile ;
220+
221+ /**
222+ * Optional proxy to associate to the browser session. Must reference a proxy
223+ * belonging to the caller's org.
224+ */
225+ proxy_id ?: string ;
226+
227+ /**
228+ * If true, launches the browser in stealth mode to reduce detection by anti-bot
229+ * mechanisms.
230+ */
231+ stealth ?: boolean ;
232+
233+ /**
234+ * Default idle timeout in seconds for browsers acquired from this pool before they
235+ * are destroyed. Defaults to 600 seconds if not specified
236+ */
237+ timeout_seconds ?: number ;
238+
239+ /**
240+ * Initial browser window size in pixels with optional refresh rate. If omitted,
241+ * image defaults apply (1920x1080@25). Only specific viewport configurations are
242+ * supported. The server will reject unsupported combinations. Supported
243+ * resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
244+ * 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will be
245+ * automatically determined from the width and height if they match a supported
246+ * configuration exactly. Note: Higher resolutions may affect the responsiveness of
247+ * live view browser
248+ */
249+ viewport ?: Shared . BrowserViewport ;
250+ }
290251}
291252
292253export type BrowserPoolListResponse = Array < BrowserPool > ;
@@ -546,10 +507,6 @@ export interface BrowserPoolReleaseParams {
546507export declare namespace BrowserPools {
547508 export {
548509 type BrowserPool as BrowserPool ,
549- type BrowserPoolAcquireRequest as BrowserPoolAcquireRequest ,
550- type BrowserPoolReleaseRequest as BrowserPoolReleaseRequest ,
551- type BrowserPoolRequest as BrowserPoolRequest ,
552- type BrowserPoolUpdateRequest as BrowserPoolUpdateRequest ,
553510 type BrowserPoolListResponse as BrowserPoolListResponse ,
554511 type BrowserPoolAcquireResponse as BrowserPoolAcquireResponse ,
555512 type BrowserPoolCreateParams as BrowserPoolCreateParams ,
0 commit comments