@@ -15,7 +15,10 @@ import { path } from '../internal/utils/path';
1515 */
1616export class BrowserPools extends APIResource {
1717 /**
18- * Create a new browser pool with the specified configuration and size.
18+ * Create a new browser pool with the specified configuration and size. Pooled
19+ * browsers load their profile read-only: any save_changes on the profile is
20+ * ignored (not rejected), so pooled browsers never persist changes back to the
21+ * profile.
1922 *
2023 * @example
2124 * ```ts
@@ -43,7 +46,9 @@ export class BrowserPools extends APIResource {
4346 }
4447
4548 /**
46- * Updates the configuration used to create browsers in the pool.
49+ * Updates the configuration used to create browsers in the pool. As with creation,
50+ * save_changes on the pool profile is ignored (not rejected); pooled browsers
51+ * never persist changes back to the profile.
4752 *
4853 * @example
4954 * ```ts
@@ -236,11 +241,14 @@ export namespace BrowserPool {
236241 name ?: string ;
237242
238243 /**
239- * Profile selection for the browser session. Provide either id or name. If
240- * specified, the matching profile will be loaded into the browser session.
241- * Profiles must be created beforehand.
244+ * Profile selection for browsers in a pool. Provide either id or name. The
245+ * matching profile is loaded into every browser in the pool. Profiles must be
246+ * created beforehand. Unlike single browser sessions, pools load the profile
247+ * read-only and never persist changes back to it, so save_changes is omitted here.
248+ * Any save_changes value sent on a pool profile is silently ignored rather than
249+ * rejected, so callers reusing a single-session profile object will not error.
242250 */
243- profile ?: Shared . BrowserProfile ;
251+ profile ?: BrowserPoolConfig . Profile ;
244252
245253 /**
246254 * Optional proxy to associate to the browser session. Must reference a proxy in
@@ -285,6 +293,29 @@ export namespace BrowserPool {
285293 */
286294 viewport ?: Shared . BrowserViewport ;
287295 }
296+
297+ export namespace BrowserPoolConfig {
298+ /**
299+ * Profile selection for browsers in a pool. Provide either id or name. The
300+ * matching profile is loaded into every browser in the pool. Profiles must be
301+ * created beforehand. Unlike single browser sessions, pools load the profile
302+ * read-only and never persist changes back to it, so save_changes is omitted here.
303+ * Any save_changes value sent on a pool profile is silently ignored rather than
304+ * rejected, so callers reusing a single-session profile object will not error.
305+ */
306+ export interface Profile {
307+ /**
308+ * Profile ID to load for browsers in this pool
309+ */
310+ id ?: string ;
311+
312+ /**
313+ * Profile name to load for browsers in this pool (instead of id). Must be 1-255
314+ * characters, using letters, numbers, dots, underscores, or hyphens.
315+ */
316+ name ?: string ;
317+ }
318+ }
288319}
289320
290321export interface BrowserPoolAcquireResponse {
@@ -464,11 +495,14 @@ export interface BrowserPoolCreateParams {
464495 name ?: string ;
465496
466497 /**
467- * Profile selection for the browser session. Provide either id or name. If
468- * specified, the matching profile will be loaded into the browser session.
469- * Profiles must be created beforehand.
498+ * Profile selection for browsers in a pool. Provide either id or name. The
499+ * matching profile is loaded into every browser in the pool. Profiles must be
500+ * created beforehand. Unlike single browser sessions, pools load the profile
501+ * read-only and never persist changes back to it, so save_changes is omitted here.
502+ * Any save_changes value sent on a pool profile is silently ignored rather than
503+ * rejected, so callers reusing a single-session profile object will not error.
470504 */
471- profile ?: Shared . BrowserProfile ;
505+ profile ?: BrowserPoolCreateParams . Profile ;
472506
473507 /**
474508 * Optional proxy to associate to the browser session. Must reference a proxy in
@@ -514,6 +548,29 @@ export interface BrowserPoolCreateParams {
514548 viewport ?: Shared . BrowserViewport ;
515549}
516550
551+ export namespace BrowserPoolCreateParams {
552+ /**
553+ * Profile selection for browsers in a pool. Provide either id or name. The
554+ * matching profile is loaded into every browser in the pool. Profiles must be
555+ * created beforehand. Unlike single browser sessions, pools load the profile
556+ * read-only and never persist changes back to it, so save_changes is omitted here.
557+ * Any save_changes value sent on a pool profile is silently ignored rather than
558+ * rejected, so callers reusing a single-session profile object will not error.
559+ */
560+ export interface Profile {
561+ /**
562+ * Profile ID to load for browsers in this pool
563+ */
564+ id ?: string ;
565+
566+ /**
567+ * Profile name to load for browsers in this pool (instead of id). Must be 1-255
568+ * characters, using letters, numbers, dots, underscores, or hyphens.
569+ */
570+ name ?: string ;
571+ }
572+ }
573+
517574export interface BrowserPoolUpdateParams {
518575 /**
519576 * Custom Chrome enterprise policy overrides applied to all browsers in this pool.
@@ -558,11 +615,14 @@ export interface BrowserPoolUpdateParams {
558615 name ?: string ;
559616
560617 /**
561- * Profile selection for the browser session. Provide either id or name. If
562- * specified, the matching profile will be loaded into the browser session.
563- * Profiles must be created beforehand.
618+ * Profile selection for browsers in a pool. Provide either id or name. The
619+ * matching profile is loaded into every browser in the pool. Profiles must be
620+ * created beforehand. Unlike single browser sessions, pools load the profile
621+ * read-only and never persist changes back to it, so save_changes is omitted here.
622+ * Any save_changes value sent on a pool profile is silently ignored rather than
623+ * rejected, so callers reusing a single-session profile object will not error.
564624 */
565- profile ?: Shared . BrowserProfile ;
625+ profile ?: BrowserPoolUpdateParams . Profile ;
566626
567627 /**
568628 * Optional proxy to associate to the browser session. Must reference a proxy in
@@ -615,6 +675,29 @@ export interface BrowserPoolUpdateParams {
615675 viewport ?: Shared . BrowserViewport ;
616676}
617677
678+ export namespace BrowserPoolUpdateParams {
679+ /**
680+ * Profile selection for browsers in a pool. Provide either id or name. The
681+ * matching profile is loaded into every browser in the pool. Profiles must be
682+ * created beforehand. Unlike single browser sessions, pools load the profile
683+ * read-only and never persist changes back to it, so save_changes is omitted here.
684+ * Any save_changes value sent on a pool profile is silently ignored rather than
685+ * rejected, so callers reusing a single-session profile object will not error.
686+ */
687+ export interface Profile {
688+ /**
689+ * Profile ID to load for browsers in this pool
690+ */
691+ id ?: string ;
692+
693+ /**
694+ * Profile name to load for browsers in this pool (instead of id). Must be 1-255
695+ * characters, using letters, numbers, dots, underscores, or hyphens.
696+ */
697+ name ?: string ;
698+ }
699+ }
700+
618701export interface BrowserPoolListParams extends OffsetPaginationParams {
619702 /**
620703 * Search browser pools by name or ID.
0 commit comments