Skip to content

Commit 8dfe062

Browse files
feat: Add request-only fingerprint beta contract
Stainless-Generated-From: fb5c64177077aeb88d629b7e05a03f1b77861c12
1 parent 3048bdb commit 8dfe062

6 files changed

Lines changed: 25 additions & 0 deletions

File tree

‎api.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ Methods:
100100
Types:
101101

102102
- <code><a href="./src/resources/browsers/browsers.ts">BrowserAllowlistState</a></code>
103+
- <code><a href="./src/resources/browsers/browsers.ts">BrowserFingerprint</a></code>
103104
- <code><a href="./src/resources/browsers/browsers.ts">BrowserLocation</a></code>
104105
- <code><a href="./src/resources/browsers/browsers.ts">BrowserLocationRequest</a></code>
105106
- <code><a href="./src/resources/browsers/browsers.ts">BrowserLocationSource</a></code>

‎src/client.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ import {
158158
BrowserCreateResponse,
159159
BrowserCurlParams,
160160
BrowserCurlResponse,
161+
BrowserFingerprint,
161162
BrowserListParams,
162163
BrowserListResponse,
163164
BrowserListResponsesOffsetPagination,
@@ -1227,6 +1228,7 @@ export declare namespace Kernel {
12271228
export {
12281229
Browsers as Browsers,
12291230
type BrowserAllowlistState as BrowserAllowlistState,
1231+
type BrowserFingerprint as BrowserFingerprint,
12301232
type BrowserLocation as BrowserLocation,
12311233
type BrowserLocationRequest as BrowserLocationRequest,
12321234
type BrowserLocationSource as BrowserLocationSource,

‎src/resources/browsers/browsers.ts‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,16 @@ export interface BrowserAllowlistState {
409409
mutation_id?: string;
410410
}
411411

412+
/**
413+
* Overrides for browser attributes presented to websites.
414+
*/
415+
export interface BrowserFingerprint {
416+
/**
417+
* Operating system the browser reports to websites.
418+
*/
419+
os: 'macos';
420+
}
421+
412422
export interface BrowserLocation {
413423
/**
414424
* Effective canonical BCP 47 formatting locale selected for the browser session.
@@ -1657,6 +1667,14 @@ export interface BrowserCreateParams {
16571667
*/
16581668
extensions?: Array<Shared.BrowserExtension>;
16591669

1670+
/**
1671+
* Closed beta: contact Kernel to enable fingerprint overrides for your
1672+
* organization. Overrides browser attributes presented to websites for this
1673+
* session. Currently supports macos and requires stealth=true, headless=false,
1674+
* gpu=false, and default memory. Omit to preserve the default browser behavior.
1675+
*/
1676+
fingerprint?: BrowserFingerprint;
1677+
16601678
/**
16611679
* If true, enables GPU acceleration for the browser session. Requires Start-Up or
16621680
* Enterprise plan, headless=false, and region=us-east.
@@ -2260,6 +2278,7 @@ Browsers.Webmcp = Webmcp;
22602278
export declare namespace Browsers {
22612279
export {
22622280
type BrowserAllowlistState as BrowserAllowlistState,
2281+
type BrowserFingerprint as BrowserFingerprint,
22632282
type BrowserLocation as BrowserLocation,
22642283
type BrowserLocationRequest as BrowserLocationRequest,
22652284
type BrowserLocationSource as BrowserLocationSource,

‎src/resources/browsers/index.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
export {
44
Browsers,
55
type BrowserAllowlistState,
6+
type BrowserFingerprint,
67
type BrowserLocation,
78
type BrowserLocationRequest,
89
type BrowserLocationSource,

‎src/resources/index.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export {
4141
export {
4242
Browsers,
4343
type BrowserAllowlistState,
44+
type BrowserFingerprint,
4445
type BrowserLocation,
4546
type BrowserLocationRequest,
4647
type BrowserLocationSource,

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ describe('resource browsers', () => {
2828
{
2929
chrome_policy: { foo: 'bar' },
3030
extensions: [{ id: 'id', name: 'name' }],
31+
fingerprint: { os: 'macos' },
3132
gpu: false,
3233
headless: false,
3334
invocation_id: 'rr33xuugxj9h0bkf1rdt2bet',

0 commit comments

Comments
 (0)