Skip to content

Commit 4dced80

Browse files
feat: EOL persistent browsers: openapi limits
1 parent be986fa commit 4dced80

10 files changed

Lines changed: 5 additions & 129 deletions

File tree

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 113
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-2118a79fa452fad5922776130ea4877059e9568b603ef146171b7bb6a0f8458a.yml
3-
openapi_spec_hash: 686e8c5855ed88b2944b9d9ec21d22ce
4-
config_hash: 37661d89120558d34b6cc184292632f2
1+
configured_endpoints: 112
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-346b1affebf16e7f943bcf4db307a5589fcae636c9147dd0afbe5c02cf12ad30.yml
3+
openapi_spec_hash: 348df436759d220264f12450919211c3
4+
config_hash: ae3dea7997fb5d36fa41979f9585ed78

api.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ Methods:
6666

6767
Types:
6868

69-
- <code><a href="./src/resources/browsers/browsers.ts">BrowserPersistence</a></code>
7069
- <code><a href="./src/resources/browsers/browsers.ts">BrowserPoolRef</a></code>
7170
- <code><a href="./src/resources/browsers/browsers.ts">BrowserUsage</a></code>
7271
- <code><a href="./src/resources/browsers/browsers.ts">Profile</a></code>
@@ -82,7 +81,6 @@ Methods:
8281
- <code title="get /browsers/{id}">client.browsers.<a href="./src/resources/browsers/browsers.ts">retrieve</a>(id, { ...params }) -> BrowserRetrieveResponse</code>
8382
- <code title="patch /browsers/{id}">client.browsers.<a href="./src/resources/browsers/browsers.ts">update</a>(id, { ...params }) -> BrowserUpdateResponse</code>
8483
- <code title="get /browsers">client.browsers.<a href="./src/resources/browsers/browsers.ts">list</a>({ ...params }) -> BrowserListResponsesOffsetPagination</code>
85-
- <code title="delete /browsers">client.browsers.<a href="./src/resources/browsers/browsers.ts">delete</a>({ ...params }) -> void</code>
8684
- <code title="post /browsers/{id}/curl">client.browsers.<a href="./src/resources/browsers/browsers.ts">curl</a>(id, { ...params }) -> BrowserCurlResponse</code>
8785
- <code title="delete /browsers/{id}">client.browsers.<a href="./src/resources/browsers/browsers.ts">deleteByID</a>(id) -> void</code>
8886
- <code title="post /browsers/{id}/extensions">client.browsers.<a href="./src/resources/browsers/browsers.ts">loadExtensions</a>(id, { ...params }) -> void</code>

src/client.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,10 @@ import {
110110
BrowserCreateResponse,
111111
BrowserCurlParams,
112112
BrowserCurlResponse,
113-
BrowserDeleteParams,
114113
BrowserListParams,
115114
BrowserListResponse,
116115
BrowserListResponsesOffsetPagination,
117116
BrowserLoadExtensionsParams,
118-
BrowserPersistence,
119117
BrowserPoolRef,
120118
BrowserRetrieveParams,
121119
BrowserRetrieveResponse,
@@ -1038,7 +1036,6 @@ export declare namespace Kernel {
10381036

10391037
export {
10401038
Browsers as Browsers,
1041-
type BrowserPersistence as BrowserPersistence,
10421039
type BrowserPoolRef as BrowserPoolRef,
10431040
type BrowserUsage as BrowserUsage,
10441041
type Profile as Profile,
@@ -1052,7 +1049,6 @@ export declare namespace Kernel {
10521049
type BrowserRetrieveParams as BrowserRetrieveParams,
10531050
type BrowserUpdateParams as BrowserUpdateParams,
10541051
type BrowserListParams as BrowserListParams,
1055-
type BrowserDeleteParams as BrowserDeleteParams,
10561052
type BrowserCurlParams as BrowserCurlParams,
10571053
type BrowserLoadExtensionsParams as BrowserLoadExtensionsParams,
10581054
};

src/resources/browser-pools.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -349,12 +349,6 @@ export interface BrowserPoolAcquireResponse {
349349
*/
350350
kiosk_mode?: boolean;
351351

352-
/**
353-
* @deprecated DEPRECATED: Use timeout_seconds (up to 72 hours) and Profiles
354-
* instead.
355-
*/
356-
persistence?: BrowsersAPI.BrowserPersistence;
357-
358352
/**
359353
* Browser pool this session was acquired from, if any.
360354
*/

src/resources/browsers/browsers.ts

Lines changed: 1 addition & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -192,21 +192,6 @@ export class Browsers extends APIResource {
192192
return this._client.getAPIList('/browsers', OffsetPagination<BrowserListResponse>, { query, ...options });
193193
}
194194

195-
/**
196-
* DEPRECATED: Use DELETE /browsers/{id} instead. Delete a persistent browser
197-
* session by its persistent_id.
198-
*
199-
* @deprecated
200-
*/
201-
delete(params: BrowserDeleteParams, options?: RequestOptions): APIPromise<void> {
202-
const { persistent_id } = params;
203-
return this._client.delete('/browsers', {
204-
query: { persistent_id },
205-
...options,
206-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
207-
});
208-
}
209-
210195
/**
211196
* Sends an HTTP request through Chrome's HTTP request stack, inheriting the
212197
* browser's TLS fingerprint, cookies, proxy configuration, and headers. Returns a
@@ -279,17 +264,6 @@ export type BrowserListResponsesOffsetPagination = OffsetPagination<BrowserListR
279264

280265
export type ProfilesOffsetPagination = OffsetPagination<Profile>;
281266

282-
/**
283-
* @deprecated DEPRECATED: Use timeout_seconds (up to 72 hours) and Profiles
284-
* instead.
285-
*/
286-
export interface BrowserPersistence {
287-
/**
288-
* DEPRECATED: Unique identifier for the persistent browser session.
289-
*/
290-
id: string;
291-
}
292-
293267
/**
294268
* Browser pool this session was acquired from, if any.
295269
*/
@@ -415,12 +389,6 @@ export interface BrowserCreateResponse {
415389
*/
416390
kiosk_mode?: boolean;
417391

418-
/**
419-
* @deprecated DEPRECATED: Use timeout_seconds (up to 72 hours) and Profiles
420-
* instead.
421-
*/
422-
persistence?: BrowserPersistence;
423-
424392
/**
425393
* Browser pool this session was acquired from, if any.
426394
*/
@@ -542,12 +510,6 @@ export interface BrowserRetrieveResponse {
542510
*/
543511
kiosk_mode?: boolean;
544512

545-
/**
546-
* @deprecated DEPRECATED: Use timeout_seconds (up to 72 hours) and Profiles
547-
* instead.
548-
*/
549-
persistence?: BrowserPersistence;
550-
551513
/**
552514
* Browser pool this session was acquired from, if any.
553515
*/
@@ -669,12 +631,6 @@ export interface BrowserUpdateResponse {
669631
*/
670632
kiosk_mode?: boolean;
671633

672-
/**
673-
* @deprecated DEPRECATED: Use timeout_seconds (up to 72 hours) and Profiles
674-
* instead.
675-
*/
676-
persistence?: BrowserPersistence;
677-
678634
/**
679635
* Browser pool this session was acquired from, if any.
680636
*/
@@ -796,12 +752,6 @@ export interface BrowserListResponse {
796752
*/
797753
kiosk_mode?: boolean;
798754

799-
/**
800-
* @deprecated DEPRECATED: Use timeout_seconds (up to 72 hours) and Profiles
801-
* instead.
802-
*/
803-
persistence?: BrowserPersistence;
804-
805755
/**
806756
* Browser pool this session was acquired from, if any.
807757
*/
@@ -882,8 +832,7 @@ export interface BrowserCreateParams {
882832
/**
883833
* Custom Chrome enterprise policy overrides applied to this browser session. Keys
884834
* are Chrome enterprise policy names; values must match their expected types.
885-
* Blocked: kernel-managed policies (extensions, proxy, CDP/automation). Ignored
886-
* when reusing an existing persistent session. See
835+
* Blocked: kernel-managed policies (extensions, proxy, CDP/automation). See
887836
* https://chromeenterprise.google/policies/
888837
*/
889838
chrome_policy?: { [key: string]: unknown };
@@ -916,12 +865,6 @@ export interface BrowserCreateParams {
916865
*/
917866
kiosk_mode?: boolean;
918867

919-
/**
920-
* @deprecated DEPRECATED: Use timeout_seconds (up to 72 hours) and Profiles
921-
* instead.
922-
*/
923-
persistence?: BrowserPersistence;
924-
925868
/**
926869
* Profile selection for the browser session. Provide either id or name. If
927870
* specified, the matching profile will be loaded into the browser session.
@@ -1055,13 +998,6 @@ export interface BrowserListParams extends OffsetPaginationParams {
1055998
status?: 'active' | 'deleted' | 'all';
1056999
}
10571000

1058-
export interface BrowserDeleteParams {
1059-
/**
1060-
* Persistent browser identifier
1061-
*/
1062-
persistent_id: string;
1063-
}
1064-
10651001
export interface BrowserCurlParams {
10661002
/**
10671003
* Target URL (must be http or https).
@@ -1126,7 +1062,6 @@ Browsers.Playwright = Playwright;
11261062

11271063
export declare namespace Browsers {
11281064
export {
1129-
type BrowserPersistence as BrowserPersistence,
11301065
type BrowserPoolRef as BrowserPoolRef,
11311066
type BrowserUsage as BrowserUsage,
11321067
type Profile as Profile,
@@ -1140,7 +1075,6 @@ export declare namespace Browsers {
11401075
type BrowserRetrieveParams as BrowserRetrieveParams,
11411076
type BrowserUpdateParams as BrowserUpdateParams,
11421077
type BrowserListParams as BrowserListParams,
1143-
type BrowserDeleteParams as BrowserDeleteParams,
11441078
type BrowserCurlParams as BrowserCurlParams,
11451079
type BrowserLoadExtensionsParams as BrowserLoadExtensionsParams,
11461080
};

src/resources/browsers/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
export {
44
Browsers,
5-
type BrowserPersistence,
65
type BrowserPoolRef,
76
type BrowserUsage,
87
type Profile,
@@ -15,7 +14,6 @@ export {
1514
type BrowserRetrieveParams,
1615
type BrowserUpdateParams,
1716
type BrowserListParams,
18-
type BrowserDeleteParams,
1917
type BrowserCurlParams,
2018
type BrowserLoadExtensionsParams,
2119
type ProfilesOffsetPagination,

src/resources/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ export {
2121
} from './browser-pools';
2222
export {
2323
Browsers,
24-
type BrowserPersistence,
2524
type BrowserPoolRef,
2625
type BrowserUsage,
2726
type Profile,
@@ -34,7 +33,6 @@ export {
3433
type BrowserRetrieveParams,
3534
type BrowserUpdateParams,
3635
type BrowserListParams,
37-
type BrowserDeleteParams,
3836
type BrowserCurlParams,
3937
type BrowserLoadExtensionsParams,
4038
type ProfilesOffsetPagination,

src/resources/invocations.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -488,12 +488,6 @@ export namespace InvocationListBrowsersResponse {
488488
*/
489489
kiosk_mode?: boolean;
490490

491-
/**
492-
* @deprecated DEPRECATED: Use timeout_seconds (up to 72 hours) and Profiles
493-
* instead.
494-
*/
495-
persistence?: BrowsersAPI.BrowserPersistence;
496-
497491
/**
498492
* Browser pool this session was acquired from, if any.
499493
*/

src/resources/projects/limits.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,6 @@ export interface ProjectLimits {
5454
*/
5555
max_concurrent_sessions?: number | null;
5656

57-
/**
58-
* Maximum persistent browser sessions for this project. Null means no
59-
* project-level cap.
60-
*/
61-
max_persistent_sessions?: number | null;
62-
6357
/**
6458
* Maximum pooled sessions capacity for this project. Null means no project-level
6559
* cap.
@@ -80,12 +74,6 @@ export interface UpdateProjectLimitsRequest {
8074
*/
8175
max_concurrent_sessions?: number | null;
8276

83-
/**
84-
* Maximum persistent browser sessions for this project. Set to 0 to remove the
85-
* cap; omit to leave unchanged.
86-
*/
87-
max_persistent_sessions?: number | null;
88-
8977
/**
9078
* Maximum pooled sessions capacity for this project. Set to 0 to remove the cap;
9179
* omit to leave unchanged.
@@ -106,12 +94,6 @@ export interface LimitUpdateParams {
10694
*/
10795
max_concurrent_sessions?: number | null;
10896

109-
/**
110-
* Maximum persistent browser sessions for this project. Set to 0 to remove the
111-
* cap; omit to leave unchanged.
112-
*/
113-
max_persistent_sessions?: number | null;
114-
11597
/**
11698
* Maximum pooled sessions capacity for this project. Set to 0 to remove the cap;
11799
* omit to leave unchanged.

tests/api-resources/browsers/browsers.test.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ describe('resource browsers', () => {
3232
headless: false,
3333
invocation_id: 'rr33xuugxj9h0bkf1rdt2bet',
3434
kiosk_mode: true,
35-
persistence: { id: 'my-awesome-browser-for-user-1234' },
3635
profile: {
3736
id: 'id',
3837
name: 'name',
@@ -126,23 +125,6 @@ describe('resource browsers', () => {
126125
).rejects.toThrow(Kernel.NotFoundError);
127126
});
128127

129-
// Mock server tests are disabled
130-
test.skip('delete: only required params', async () => {
131-
const responsePromise = client.browsers.delete({ persistent_id: 'persistent_id' });
132-
const rawResponse = await responsePromise.asResponse();
133-
expect(rawResponse).toBeInstanceOf(Response);
134-
const response = await responsePromise;
135-
expect(response).not.toBeInstanceOf(Response);
136-
const dataAndResponse = await responsePromise.withResponse();
137-
expect(dataAndResponse.data).toBe(response);
138-
expect(dataAndResponse.response).toBe(rawResponse);
139-
});
140-
141-
// Mock server tests are disabled
142-
test.skip('delete: required and optional params', async () => {
143-
const response = await client.browsers.delete({ persistent_id: 'persistent_id' });
144-
});
145-
146128
// Mock server tests are disabled
147129
test.skip('curl: only required params', async () => {
148130
const responsePromise = client.browsers.curl('id', { url: 'url' });

0 commit comments

Comments
 (0)