From ca05977445e8dadc50de7a82bc238017ac43a944 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 Jul 2026 17:49:47 +0000 Subject: [PATCH 1/2] feat: Add browser telemetry to managed auth connections --- .stats.yml | 4 +- src/resources/auth/connections.ts | 235 +++++++++++++++++++ tests/api-resources/auth/connections.test.ts | 28 +++ 3 files changed, 265 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c912225..d1ed25e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 127 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-477bd1ff6f7053f2bd4687d7c5fc9a6a1d56a584be42f927abc6fc858ff35718.yml -openapi_spec_hash: 3bf4cc824f6497c4ad109abd3187eede +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-a4b8f40deaf572d0dab92ebe0cafa865e1357a18f8720c3f003810da89aa4203.yml +openapi_spec_hash: d06e9bf804151f7d9f7fab77f2e1669c config_hash: 77ee715aa17061166f9a02b264a21b8d diff --git a/src/resources/auth/connections.ts b/src/resources/auth/connections.ts index 2ecbb71..7a45942 100644 --- a/src/resources/auth/connections.ts +++ b/src/resources/auth/connections.ts @@ -2,6 +2,7 @@ import { APIResource } from '../../core/resource'; import * as Shared from '../shared'; +import * as TelemetryAPI from '../browsers/telemetry'; import { APIPromise } from '../../core/api-promise'; import { OffsetPagination, type OffsetPaginationParams, PagePromise } from '../../core/pagination'; import { Stream } from '../../core/streaming'; @@ -297,6 +298,13 @@ export interface ManagedAuth { */ browser_session_id?: string | null; + /** + * Browser telemetry configuration used by this connection's browser sessions by + * default. The exact create-browser configuration is preserved and can be + * overridden per-login. + */ + browser_telemetry?: ManagedAuth.BrowserTelemetry | null; + /** * Whether Kernel can automatically re-authenticate this connection when the * session expires. Requires a prior successful login plus either a Kernel @@ -515,6 +523,38 @@ export interface ManagedAuth { } export namespace ManagedAuth { + /** + * Browser telemetry configuration used by this connection's browser sessions by + * default. The exact create-browser configuration is preserved and can be + * overridden per-login. + */ + export interface BrowserTelemetry { + /** + * Per-category capture flags. The operational categories (control, connection, + * system, captcha) are captured whenever telemetry is enabled; set one to + * enabled=false to opt out. The CDP categories (console, network, page, + * interaction) and screenshot are off by default; set enabled=true to opt in. On + * create, provided categories layer onto the default set. On update, provided + * categories merge onto the session's current config; when no telemetry is active + * this falls back to the default set (matching create). If browser is omitted or + * empty, the default set is used. A browser config that disables every category + * stops capture on update and starts no capture on create. + */ + browser?: TelemetryAPI.BrowserTelemetryCategoriesConfig; + + /** + * Request shortcut for browser telemetry capture. True enables capture; with no + * browser category settings it captures the default set (control, connection, + * system, captcha), and any browser category settings are layered onto that + * default set. On update, enabled=true resolves the config fresh from the default + * set plus any provided categories, replacing the session's current selection + * rather than merging onto it; omit enabled to merge categories onto the current + * selection instead. False stops capture on update and starts no capture on + * create. enabled=false cannot be combined with browser category settings. + */ + enabled?: boolean; + } + /** * Canonical auth-flow choice awaiting user selection. */ @@ -780,6 +820,13 @@ export interface ManagedAuthCreateRequest { */ auto_reauth?: boolean; + /** + * Browser telemetry configuration used by this connection's browser sessions by + * default. Uses the exact create-browser configuration. Can be overridden + * per-login. + */ + browser_telemetry?: ManagedAuthCreateRequest.BrowserTelemetry | null; + /** * Reference to credentials for the auth connection. Use one of: * @@ -833,6 +880,38 @@ export interface ManagedAuthCreateRequest { } export namespace ManagedAuthCreateRequest { + /** + * Browser telemetry configuration used by this connection's browser sessions by + * default. Uses the exact create-browser configuration. Can be overridden + * per-login. + */ + export interface BrowserTelemetry { + /** + * Per-category capture flags. The operational categories (control, connection, + * system, captcha) are captured whenever telemetry is enabled; set one to + * enabled=false to opt out. The CDP categories (console, network, page, + * interaction) and screenshot are off by default; set enabled=true to opt in. On + * create, provided categories layer onto the default set. On update, provided + * categories merge onto the session's current config; when no telemetry is active + * this falls back to the default set (matching create). If browser is omitted or + * empty, the default set is used. A browser config that disables every category + * stops capture on update and starts no capture on create. + */ + browser?: TelemetryAPI.BrowserTelemetryCategoriesConfig; + + /** + * Request shortcut for browser telemetry capture. True enables capture; with no + * browser category settings it captures the default set (control, connection, + * system, captcha), and any browser category settings are layered onto that + * default set. On update, enabled=true resolves the config fresh from the default + * set plus any provided categories, replacing the session's current selection + * rather than merging onto it; omit enabled to merge categories onto the current + * selection instead. False stops capture on update and starts no capture on + * create. enabled=false cannot be combined with browser category settings. + */ + enabled?: boolean; + } + /** * Reference to credentials for the auth connection. Use one of: * @@ -981,6 +1060,13 @@ export interface ManagedAuthUpdateRequest { */ auto_reauth?: boolean; + /** + * Browser telemetry configuration used by future browser sessions for this + * connection. Uses the exact create-browser configuration. Set enabled to false to + * disable telemetry. + */ + browser_telemetry?: ManagedAuthUpdateRequest.BrowserTelemetry | null; + /** * Reference to credentials for the auth connection. Use one of: * @@ -1028,6 +1114,38 @@ export interface ManagedAuthUpdateRequest { } export namespace ManagedAuthUpdateRequest { + /** + * Browser telemetry configuration used by future browser sessions for this + * connection. Uses the exact create-browser configuration. Set enabled to false to + * disable telemetry. + */ + export interface BrowserTelemetry { + /** + * Per-category capture flags. The operational categories (control, connection, + * system, captcha) are captured whenever telemetry is enabled; set one to + * enabled=false to opt out. The CDP categories (console, network, page, + * interaction) and screenshot are off by default; set enabled=true to opt in. On + * create, provided categories layer onto the default set. On update, provided + * categories merge onto the session's current config; when no telemetry is active + * this falls back to the default set (matching create). If browser is omitted or + * empty, the default set is used. A browser config that disables every category + * stops capture on update and starts no capture on create. + */ + browser?: TelemetryAPI.BrowserTelemetryCategoriesConfig; + + /** + * Request shortcut for browser telemetry capture. True enables capture; with no + * browser category settings it captures the default set (control, connection, + * system, captcha), and any browser category settings are layered onto that + * default set. On update, enabled=true resolves the config fresh from the default + * set plus any provided categories, replacing the session's current selection + * rather than merging onto it; omit enabled to merge categories onto the current + * selection instead. False stops capture on update and starts no capture on + * create. enabled=false cannot be combined with browser category settings. + */ + enabled?: boolean; + } + /** * Reference to credentials for the auth connection. Use one of: * @@ -1480,6 +1598,13 @@ export interface ConnectionCreateParams { */ auto_reauth?: boolean; + /** + * Browser telemetry configuration used by this connection's browser sessions by + * default. Uses the exact create-browser configuration. Can be overridden + * per-login. + */ + browser_telemetry?: ConnectionCreateParams.BrowserTelemetry | null; + /** * Reference to credentials for the auth connection. Use one of: * @@ -1533,6 +1658,38 @@ export interface ConnectionCreateParams { } export namespace ConnectionCreateParams { + /** + * Browser telemetry configuration used by this connection's browser sessions by + * default. Uses the exact create-browser configuration. Can be overridden + * per-login. + */ + export interface BrowserTelemetry { + /** + * Per-category capture flags. The operational categories (control, connection, + * system, captcha) are captured whenever telemetry is enabled; set one to + * enabled=false to opt out. The CDP categories (console, network, page, + * interaction) and screenshot are off by default; set enabled=true to opt in. On + * create, provided categories layer onto the default set. On update, provided + * categories merge onto the session's current config; when no telemetry is active + * this falls back to the default set (matching create). If browser is omitted or + * empty, the default set is used. A browser config that disables every category + * stops capture on update and starts no capture on create. + */ + browser?: TelemetryAPI.BrowserTelemetryCategoriesConfig; + + /** + * Request shortcut for browser telemetry capture. True enables capture; with no + * browser category settings it captures the default set (control, connection, + * system, captcha), and any browser category settings are layered onto that + * default set. On update, enabled=true resolves the config fresh from the default + * set plus any provided categories, replacing the session's current selection + * rather than merging onto it; omit enabled to merge categories onto the current + * selection instead. False stops capture on update and starts no capture on + * create. enabled=false cannot be combined with browser category settings. + */ + enabled?: boolean; + } + /** * Reference to credentials for the auth connection. Use one of: * @@ -1598,6 +1755,13 @@ export interface ConnectionUpdateParams { */ auto_reauth?: boolean; + /** + * Browser telemetry configuration used by future browser sessions for this + * connection. Uses the exact create-browser configuration. Set enabled to false to + * disable telemetry. + */ + browser_telemetry?: ConnectionUpdateParams.BrowserTelemetry | null; + /** * Reference to credentials for the auth connection. Use one of: * @@ -1645,6 +1809,38 @@ export interface ConnectionUpdateParams { } export namespace ConnectionUpdateParams { + /** + * Browser telemetry configuration used by future browser sessions for this + * connection. Uses the exact create-browser configuration. Set enabled to false to + * disable telemetry. + */ + export interface BrowserTelemetry { + /** + * Per-category capture flags. The operational categories (control, connection, + * system, captcha) are captured whenever telemetry is enabled; set one to + * enabled=false to opt out. The CDP categories (console, network, page, + * interaction) and screenshot are off by default; set enabled=true to opt in. On + * create, provided categories layer onto the default set. On update, provided + * categories merge onto the session's current config; when no telemetry is active + * this falls back to the default set (matching create). If browser is omitted or + * empty, the default set is used. A browser config that disables every category + * stops capture on update and starts no capture on create. + */ + browser?: TelemetryAPI.BrowserTelemetryCategoriesConfig; + + /** + * Request shortcut for browser telemetry capture. True enables capture; with no + * browser category settings it captures the default set (control, connection, + * system, captcha), and any browser category settings are layered onto that + * default set. On update, enabled=true resolves the config fresh from the default + * set plus any provided categories, replacing the session's current selection + * rather than merging onto it; omit enabled to merge categories onto the current + * selection instead. False stops capture on update and starts no capture on + * create. enabled=false cannot be combined with browser category settings. + */ + enabled?: boolean; + } + /** * Reference to credentials for the auth connection. Use one of: * @@ -1711,6 +1907,13 @@ export interface ConnectionListParams extends OffsetPaginationParams { } export interface ConnectionLoginParams { + /** + * Override the connection's default browser telemetry configuration for this + * login. When omitted, the connection's browser_telemetry default is used. Uses + * the exact create-browser configuration. + */ + browser_telemetry?: ConnectionLoginParams.BrowserTelemetry | null; + /** * Proxy selection. Provide either id or name. The proxy must be in the same * project as the resource referencing it. When selecting by name, the name must @@ -1727,6 +1930,38 @@ export interface ConnectionLoginParams { } export namespace ConnectionLoginParams { + /** + * Override the connection's default browser telemetry configuration for this + * login. When omitted, the connection's browser_telemetry default is used. Uses + * the exact create-browser configuration. + */ + export interface BrowserTelemetry { + /** + * Per-category capture flags. The operational categories (control, connection, + * system, captcha) are captured whenever telemetry is enabled; set one to + * enabled=false to opt out. The CDP categories (console, network, page, + * interaction) and screenshot are off by default; set enabled=true to opt in. On + * create, provided categories layer onto the default set. On update, provided + * categories merge onto the session's current config; when no telemetry is active + * this falls back to the default set (matching create). If browser is omitted or + * empty, the default set is used. A browser config that disables every category + * stops capture on update and starts no capture on create. + */ + browser?: TelemetryAPI.BrowserTelemetryCategoriesConfig; + + /** + * Request shortcut for browser telemetry capture. True enables capture; with no + * browser category settings it captures the default set (control, connection, + * system, captcha), and any browser category settings are layered onto that + * default set. On update, enabled=true resolves the config fresh from the default + * set plus any provided categories, replacing the session's current selection + * rather than merging onto it; omit enabled to merge categories onto the current + * selection instead. False stops capture on update and starts no capture on + * create. enabled=false cannot be combined with browser category settings. + */ + enabled?: boolean; + } + /** * Proxy selection. Provide either id or name. The proxy must be in the same * project as the resource referencing it. When selecting by name, the name must diff --git a/tests/api-resources/auth/connections.test.ts b/tests/api-resources/auth/connections.test.ts index 66915b5..6094561 100644 --- a/tests/api-resources/auth/connections.test.ts +++ b/tests/api-resources/auth/connections.test.ts @@ -30,6 +30,20 @@ describe('resource connections', () => { profile_name: 'user-123', allowed_domains: ['login.netflix.com', 'auth.netflix.com'], auto_reauth: true, + browser_telemetry: { + browser: { + captcha: { enabled: true }, + connection: { enabled: true }, + console: { enabled: true }, + control: { enabled: true }, + interaction: { enabled: true }, + network: { enabled: true }, + page: { enabled: true }, + screenshot: { enabled: true }, + system: { enabled: true }, + }, + enabled: true, + }, credential: { auto: true, name: 'my-netflix-creds', @@ -141,6 +155,20 @@ describe('resource connections', () => { client.auth.connections.login( 'id', { + browser_telemetry: { + browser: { + captcha: { enabled: true }, + connection: { enabled: true }, + console: { enabled: true }, + control: { enabled: true }, + interaction: { enabled: true }, + network: { enabled: true }, + page: { enabled: true }, + screenshot: { enabled: true }, + system: { enabled: true }, + }, + enabled: true, + }, proxy: { id: 'id', name: 'name' }, record_session: true, }, From d199bf2adf8bd40265f22263bb5671f2eb62d5b1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 Jul 2026 17:50:13 +0000 Subject: [PATCH 2/2] release: 0.83.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ package.json | 2 +- src/version.ts | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b6d685d..4a45877 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.82.0" + ".": "0.83.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index b33dab0..46cf0d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.83.0 (2026-07-24) + +Full Changelog: [v0.82.0...v0.83.0](https://github.com/kernel/kernel-node-sdk/compare/v0.82.0...v0.83.0) + +### Features + +* Add browser telemetry to managed auth connections ([ca05977](https://github.com/kernel/kernel-node-sdk/commit/ca05977445e8dadc50de7a82bc238017ac43a944)) + ## 0.82.0 (2026-07-23) Full Changelog: [v0.81.0...v0.82.0](https://github.com/kernel/kernel-node-sdk/compare/v0.81.0...v0.82.0) diff --git a/package.json b/package.json index 17967d9..0e240a9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@onkernel/sdk", - "version": "0.82.0", + "version": "0.83.0", "description": "The official TypeScript library for the Kernel API", "author": "Kernel <>", "types": "dist/index.d.ts", diff --git a/src/version.ts b/src/version.ts index 79ea53a..0c8b7a4 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.82.0'; // x-release-please-version +export const VERSION = '0.83.0'; // x-release-please-version