diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a9b8e02..7a48e52 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.11.0" + ".": "2.12.0" } diff --git a/.stats.yml b/.stats.yml index 4e2d03e..f40d116 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 23 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase/browserbase-2118fd938d408dda6ed82d06c48b0785fad91fd54b5397acc3421a49a386c791.yml -openapi_spec_hash: 8e48a39a55a11b128028b47747aea775 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase/browserbase-b2831c9c836f039762834825afdc20569587a825d29ac5c3748c78b009bf059b.yml +openapi_spec_hash: dd85a934900cb6583f12ebf6117be884 config_hash: 40fbac80e24faaa0dc19e93368bcd821 diff --git a/CHANGELOG.md b/CHANGELOG.md index 7075cbd..460a81b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## 2.12.0 (2026-05-20) + +Full Changelog: [v2.11.0...v2.12.0](https://github.com/browserbase/sdk-node/compare/v2.11.0...v2.12.0) + +### Features + +* [AI-1748][apps/api] Obtain custom certificates in API during session reservation ([0123bc8](https://github.com/browserbase/sdk-node/commit/0123bc8dd7754b7dad06692cf4d6032492d23576)) +* [AI-1972] - Move fetch v2 handler into /v1/fetch ([397c60f](https://github.com/browserbase/sdk-node/commit/397c60f9a97e8a8a587b00138586ac7a2797cee5)) +* [AI-1993] - Surface structured JSON content on /v2/fetch ([95c8dfa](https://github.com/browserbase/sdk-node/commit/95c8dfa7988a9784df18a5bf12e6298a2d6e3de4)) +* **api:** manual updates ([d18107b](https://github.com/browserbase/sdk-node/commit/d18107b210c64be3ce0541789f74adb47136734f)) +* **api:** manual updates ([cce765a](https://github.com/browserbase/sdk-node/commit/cce765af5828449b905cf647afcc2d90df4bd567)) + ## 2.11.0 (2026-05-13) Full Changelog: [v2.10.0...v2.11.0](https://github.com/browserbase/sdk-node/compare/v2.10.0...v2.11.0) diff --git a/package-lock.json b/package-lock.json index 64a24c0..1298b90 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@browserbasehq/sdk", - "version": "2.11.0", + "version": "2.12.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@browserbasehq/sdk", - "version": "2.11.0", + "version": "2.12.0", "dependencies": { "@types/node": "^18.11.18", "@types/node-fetch": "^2.6.4", diff --git a/package.json b/package.json index d836657..c303732 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@browserbasehq/sdk", - "version": "2.11.0", + "version": "2.12.0", "description": "The official Node.js library for the Browserbase API", "author": "Browserbase ", "types": "dist/index.d.ts", diff --git a/src/resources/fetch-api.ts b/src/resources/fetch-api.ts index 976f473..3232d17 100644 --- a/src/resources/fetch-api.ts +++ b/src/resources/fetch-api.ts @@ -19,9 +19,10 @@ export interface FetchAPICreateResponse { id: string; /** - * The response body content + * The response body content. A string for `raw` and `markdown` formats; a + * structured object for `json` format (the schema-extracted result). */ - content: string; + content: string | { [key: string]: unknown }; /** * The MIME type of the response @@ -60,10 +61,23 @@ export interface FetchAPICreateParams { */ allowRedirects?: boolean; + /** + * Output format for the response content. `raw` (default) returns the response + * body unchanged; `json` returns structured data (requires `schema`); `markdown` + * returns the page as markdown. + */ + format?: 'raw' | 'json' | 'markdown'; + /** * Whether to enable proxy support for the request */ proxies?: boolean; + + /** + * JSON Schema describing the desired structure of the response. Only used when + * `format` is `json`. + */ + schema?: { [key: string]: unknown }; } export declare namespace FetchAPI { diff --git a/src/version.ts b/src/version.ts index e91ff8d..e06ef68 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '2.11.0'; // x-release-please-version +export const VERSION = '2.12.0'; // x-release-please-version diff --git a/tests/api-resources/fetch-api.test.ts b/tests/api-resources/fetch-api.test.ts index 7e250d3..a74882c 100644 --- a/tests/api-resources/fetch-api.test.ts +++ b/tests/api-resources/fetch-api.test.ts @@ -25,7 +25,9 @@ describe('resource fetchAPI', () => { url: 'https://example.com', allowInsecureSsl: true, allowRedirects: true, + format: 'raw', proxies: true, + schema: { foo: 'bar' }, }); }); });