Skip to content

Commit 4425fd1

Browse files
feat: [kernel-1008] browser pools add custom policy
1 parent 4417a72 commit 4425fd1

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 104
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-bb2ac8e0d3a1c08e8afcbcbad7cb733d0f84bd22a8d233c1ec3100a01ee078ae.yml
3-
openapi_spec_hash: a83f7d1c422c85d6dc6158af7afe1d09
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-aeb5ea5c2632fe7fd905d509bc6cbb06999d17c458ec44ffd713935ba5b848f9.yml
3+
openapi_spec_hash: fef45a8569f1d3de04c86e95b1112665
44
config_hash: 16e4457a0bb26e98a335a1c2a572290a

src/resources/browser-pools.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,14 @@ export namespace BrowserPool {
190190
*/
191191
size: number;
192192

193+
/**
194+
* Custom Chrome enterprise policy overrides applied to all browsers in this pool.
195+
* Keys are Chrome enterprise policy names; values must match their expected types.
196+
* Blocked: kernel-managed policies (extensions, proxy, CDP/automation). See
197+
* https://chromeenterprise.google/policies/
198+
*/
199+
chrome_policy?: { [key: string]: unknown };
200+
193201
/**
194202
* List of browser extensions to load into the session. Provide each by id or name.
195203
*/
@@ -370,6 +378,14 @@ export interface BrowserPoolCreateParams {
370378
*/
371379
size: number;
372380

381+
/**
382+
* Custom Chrome enterprise policy overrides applied to all browsers in this pool.
383+
* Keys are Chrome enterprise policy names; values must match their expected types.
384+
* Blocked: kernel-managed policies (extensions, proxy, CDP/automation). See
385+
* https://chromeenterprise.google/policies/
386+
*/
387+
chrome_policy?: { [key: string]: unknown };
388+
373389
/**
374390
* List of browser extensions to load into the session. Provide each by id or name.
375391
*/
@@ -446,6 +462,14 @@ export interface BrowserPoolUpdateParams {
446462
*/
447463
size: number;
448464

465+
/**
466+
* Custom Chrome enterprise policy overrides applied to all browsers in this pool.
467+
* Keys are Chrome enterprise policy names; values must match their expected types.
468+
* Blocked: kernel-managed policies (extensions, proxy, CDP/automation). See
469+
* https://chromeenterprise.google/policies/
470+
*/
471+
chrome_policy?: { [key: string]: unknown };
472+
449473
/**
450474
* Whether to discard all idle browsers and rebuild the pool immediately. Defaults
451475
* to false.

tests/api-resources/browser-pools.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ describe('resource browserPools', () => {
2424
test.skip('create: required and optional params', async () => {
2525
const response = await client.browserPools.create({
2626
size: 10,
27+
chrome_policy: { foo: 'bar' },
2728
extensions: [{ id: 'id', name: 'name' }],
2829
fill_rate_per_minute: 0,
2930
headless: false,
@@ -73,6 +74,7 @@ describe('resource browserPools', () => {
7374
test.skip('update: required and optional params', async () => {
7475
const response = await client.browserPools.update('id_or_name', {
7576
size: 10,
77+
chrome_policy: { foo: 'bar' },
7678
discard_all_idle: false,
7779
extensions: [{ id: 'id', name: 'name' }],
7880
fill_rate_per_minute: 0,

0 commit comments

Comments
 (0)