Skip to content

Commit d661869

Browse files
feat(api): api update
1 parent 59bb2a5 commit d661869

File tree

8 files changed

+4
-70
lines changed

8 files changed

+4
-70
lines changed

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 20
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fbrowserbase-be7a4aeebb1605262935b4b3ab446a95b1fad8a7d18098943dd548c8a486ef13.yml
3-
openapi_spec_hash: 047517d5a996009459c04f2fe3b0d3f9
4-
config_hash: 5a44f3aad0ead6985fbdf0294c79286b
1+
configured_endpoints: 18
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fbrowserbase-c14a7d6b23a7fd42a26a7c55a668d1dcd2e4b58354b878e696bc959d808c71c9.yml
3+
openapi_spec_hash: a0878bab95e435f9ce0d2418f0784d06
4+
config_hash: b3ca4ec5b02e5333af51ebc2e9fdef1b

api.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ Methods:
1111
- <code title="post /v1/contexts">client.contexts.<a href="./src/resources/contexts.ts">create</a>({ ...params }) -> ContextCreateResponse</code>
1212
- <code title="get /v1/contexts/{id}">client.contexts.<a href="./src/resources/contexts.ts">retrieve</a>(id) -> ContextRetrieveResponse</code>
1313
- <code title="put /v1/contexts/{id}">client.contexts.<a href="./src/resources/contexts.ts">update</a>(id) -> ContextUpdateResponse</code>
14-
- <code title="delete /v1/contexts/{id}">client.contexts.<a href="./src/resources/contexts.ts">delete</a>(id) -> void</code>
1514

1615
# Extensions
1716

@@ -63,7 +62,6 @@ Methods:
6362
Methods:
6463

6564
- <code title="get /v1/sessions/{id}/downloads">client.sessions.downloads.<a href="./src/resources/sessions/downloads.ts">list</a>(id) -> Response</code>
66-
- <code title="delete /v1/sessions/{id}/downloads">client.sessions.downloads.<a href="./src/resources/sessions/downloads.ts">delete</a>(id) -> void</code>
6765

6866
## Logs
6967

src/resources/contexts.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,6 @@ export class Contexts extends APIResource {
2424
update(id: string, options?: Core.RequestOptions): Core.APIPromise<ContextUpdateResponse> {
2525
return this._client.put(`/v1/contexts/${id}`, options);
2626
}
27-
28-
/**
29-
* Delete a Context
30-
*/
31-
delete(id: string, options?: Core.RequestOptions): Core.APIPromise<void> {
32-
return this._client.delete(`/v1/contexts/${id}`, {
33-
...options,
34-
headers: { Accept: '*/*', ...options?.headers },
35-
});
36-
}
3727
}
3828

3929
export interface ContextCreateResponse {

src/resources/sessions/downloads.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,4 @@ export class Downloads extends APIResource {
1515
__binaryResponse: true,
1616
});
1717
}
18-
19-
/**
20-
* Delete Session Downloads
21-
*/
22-
delete(id: string, options?: Core.RequestOptions): Core.APIPromise<void> {
23-
return this._client.delete(`/v1/sessions/${id}/downloads`, {
24-
...options,
25-
headers: { Accept: '*/*', ...options?.headers },
26-
});
27-
}
2818
}

src/resources/sessions/sessions.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -442,12 +442,6 @@ export namespace SessionCreateParams {
442442
*/
443443
logSession?: boolean;
444444

445-
/**
446-
* Operating system for stealth mode. Valid values: windows, mac, linux, mobile,
447-
* tablet
448-
*/
449-
os?: 'windows' | 'mac' | 'linux' | 'mobile' | 'tablet';
450-
451445
/**
452446
* Enable or disable session recording. Defaults to `true`.
453447
*/

tests/api-resources/contexts.test.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -59,22 +59,4 @@ describe('resource contexts', () => {
5959
Browserbase.NotFoundError,
6060
);
6161
});
62-
63-
test('delete', async () => {
64-
const responsePromise = client.contexts.delete('id');
65-
const rawResponse = await responsePromise.asResponse();
66-
expect(rawResponse).toBeInstanceOf(Response);
67-
const response = await responsePromise;
68-
expect(response).not.toBeInstanceOf(Response);
69-
const dataAndResponse = await responsePromise.withResponse();
70-
expect(dataAndResponse.data).toBe(response);
71-
expect(dataAndResponse.response).toBe(rawResponse);
72-
});
73-
74-
test('delete: request options instead of params are passed correctly', async () => {
75-
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
76-
await expect(client.contexts.delete('id', { path: '/_stainless_unknown_path' })).rejects.toThrow(
77-
Browserbase.NotFoundError,
78-
);
79-
});
8062
});
Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
import Browserbase from '@browserbasehq/sdk';
4-
import { Response } from 'node-fetch';
54

65
const client = new Browserbase({
76
apiKey: 'My API Key',
@@ -15,22 +14,4 @@ describe('resource downloads', () => {
1514
Browserbase.NotFoundError,
1615
);
1716
});
18-
19-
test('delete', async () => {
20-
const responsePromise = client.sessions.downloads.delete('id');
21-
const rawResponse = await responsePromise.asResponse();
22-
expect(rawResponse).toBeInstanceOf(Response);
23-
const response = await responsePromise;
24-
expect(response).not.toBeInstanceOf(Response);
25-
const dataAndResponse = await responsePromise.withResponse();
26-
expect(dataAndResponse.data).toBe(response);
27-
expect(dataAndResponse.response).toBe(rawResponse);
28-
});
29-
30-
test('delete: request options instead of params are passed correctly', async () => {
31-
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
32-
await expect(
33-
client.sessions.downloads.delete('id', { path: '/_stainless_unknown_path' }),
34-
).rejects.toThrow(Browserbase.NotFoundError);
35-
});
3617
});

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ describe('resource sessions', () => {
3939
screen: { maxHeight: 0, maxWidth: 0, minHeight: 0, minWidth: 0 },
4040
},
4141
logSession: true,
42-
os: 'windows',
4342
recordSession: true,
4443
solveCaptchas: true,
4544
viewport: { height: 0, width: 0 },

0 commit comments

Comments
 (0)