diff --git a/.release-please-manifest.json b/.release-please-manifest.json index fe7987a..836ff90 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.7.0-alpha.2" + ".": "2.7.0-alpha.3" } diff --git a/.stats.yml b/.stats.yml index a0691ec..05de033 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 19 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fbrowserbase-a2379f6bf614a1efd1bbb22b2191bf1a3daf09fd42267c8c54ce4284392d1ea4.yml -openapi_spec_hash: 918f5ba73e08f044cfb77de95a8b7524 -config_hash: b01d72cbe03bd762a73b05744086b2ec +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fbrowserbase-215bc4361122162181eecce83c0dbdda7c45a21801e7addb75102e8011413069.yml +openapi_spec_hash: c4fadc5bb6b84cd3988c8d864b67bf61 +config_hash: a106b247c7cdf02ac1033077402cfe2d diff --git a/CHANGELOG.md b/CHANGELOG.md index 8dca029..3ae2ab9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.7.0-alpha.3 (2026-02-26) + +Full Changelog: [v2.7.0-alpha.2...v2.7.0-alpha.3](https://github.com/browserbase/sdk-node/compare/v2.7.0-alpha.2...v2.7.0-alpha.3) + +### Features + +* [CORE-] Restore models and components in SDK ([e9a85f1](https://github.com/browserbase/sdk-node/commit/e9a85f1ffe0fa59490cca612a82a17cd3de21df2)) + ## 2.7.0-alpha.2 (2026-02-26) Full Changelog: [v2.7.0-alpha.1...v2.7.0-alpha.2](https://github.com/browserbase/sdk-node/compare/v2.7.0-alpha.1...v2.7.0-alpha.2) diff --git a/README.md b/README.md index 72525b8..2a98f47 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,6 @@ const client = new Browserbase({ }); const session = await client.sessions.create({ projectId: 'your_project_id' }); - -console.log(session.id); ``` ### Request & Response types @@ -175,7 +173,7 @@ const { data: session, response: raw } = await client.sessions .create({ projectId: 'your_project_id' }) .withResponse(); console.log(raw.headers.get('X-My-Header')); -console.log(session.id); +console.log(session); ``` ### Making custom/undocumented requests diff --git a/api.md b/api.md index cfe60ae..e053362 100644 --- a/api.md +++ b/api.md @@ -2,14 +2,14 @@ Types: +- Context - ContextCreateResponse -- ContextRetrieveResponse - ContextUpdateResponse Methods: - client.contexts.create({ ...params }) -> ContextCreateResponse -- client.contexts.retrieve(id) -> ContextRetrieveResponse +- client.contexts.retrieve(id) -> Context - client.contexts.update(id) -> ContextUpdateResponse - client.contexts.delete(id) -> void @@ -17,46 +17,45 @@ Methods: Types: -- ExtensionCreateResponse -- ExtensionRetrieveResponse +- Extension Methods: -- client.extensions.create({ ...params }) -> ExtensionCreateResponse -- client.extensions.retrieve(id) -> ExtensionRetrieveResponse +- client.extensions.create({ ...params }) -> Extension +- client.extensions.retrieve(id) -> Extension - client.extensions.delete(id) -> void # Projects Types: -- ProjectRetrieveResponse +- Project +- ProjectUsage - ProjectListResponse -- ProjectUsageResponse Methods: -- client.projects.retrieve(id) -> ProjectRetrieveResponse +- client.projects.retrieve(id) -> Project - client.projects.list() -> ProjectListResponse -- client.projects.usage(id) -> ProjectUsageResponse +- client.projects.usage(id) -> ProjectUsage # Sessions Types: +- Session +- SessionLiveURLs - SessionCreateResponse - SessionRetrieveResponse -- SessionUpdateResponse - SessionListResponse -- SessionDebugResponse Methods: - client.sessions.create({ ...params }) -> SessionCreateResponse - client.sessions.retrieve(id) -> SessionRetrieveResponse -- client.sessions.update(id, { ...params }) -> SessionUpdateResponse +- client.sessions.update(id, { ...params }) -> Session - client.sessions.list({ ...params }) -> SessionListResponse -- client.sessions.debug(id) -> SessionDebugResponse +- client.sessions.debug(id) -> SessionLiveURLs ## Downloads @@ -68,6 +67,7 @@ Methods: Types: +- SessionLog - LogListResponse Methods: @@ -78,6 +78,7 @@ Methods: Types: +- SessionRecording - RecordingRetrieveResponse Methods: diff --git a/package-lock.json b/package-lock.json index d9f3cbd..c200305 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@browserbasehq/sdk", - "version": "2.7.0-alpha.2", + "version": "2.7.0-alpha.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@browserbasehq/sdk", - "version": "2.7.0-alpha.2", + "version": "2.7.0-alpha.3", "dependencies": { "@types/node": "^18.11.18", "@types/node-fetch": "^2.6.4", diff --git a/package.json b/package.json index f93db7b..441084b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@browserbasehq/sdk", - "version": "2.7.0-alpha.2", + "version": "2.7.0-alpha.3", "description": "The official Node.js library for the Browserbase API", "author": "Browserbase ", "types": "dist/index.d.ts", diff --git a/src/index.ts b/src/index.ts index 47e0261..0c12342 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,33 +6,23 @@ import * as Errors from './error'; import * as Uploads from './uploads'; import * as API from './resources/index'; import { + Context, ContextCreateParams, ContextCreateResponse, - ContextRetrieveResponse, ContextUpdateResponse, Contexts, } from './resources/contexts'; +import { Extension, ExtensionCreateParams, Extensions } from './resources/extensions'; +import { Project, ProjectListResponse, ProjectUsage, Projects } from './resources/projects'; import { - ExtensionCreateParams, - ExtensionCreateResponse, - ExtensionRetrieveResponse, - Extensions, -} from './resources/extensions'; -import { - ProjectListResponse, - ProjectRetrieveResponse, - ProjectUsageResponse, - Projects, -} from './resources/projects'; -import { + Session, SessionCreateParams, SessionCreateResponse, - SessionDebugResponse, SessionListParams, SessionListResponse, + SessionLiveURLs, SessionRetrieveResponse, SessionUpdateParams, - SessionUpdateResponse, Sessions, } from './resources/sessions/sessions'; @@ -210,33 +200,32 @@ export declare namespace Browserbase { export { Contexts as Contexts, + type Context as Context, type ContextCreateResponse as ContextCreateResponse, - type ContextRetrieveResponse as ContextRetrieveResponse, type ContextUpdateResponse as ContextUpdateResponse, type ContextCreateParams as ContextCreateParams, }; export { Extensions as Extensions, - type ExtensionCreateResponse as ExtensionCreateResponse, - type ExtensionRetrieveResponse as ExtensionRetrieveResponse, + type Extension as Extension, type ExtensionCreateParams as ExtensionCreateParams, }; export { Projects as Projects, - type ProjectRetrieveResponse as ProjectRetrieveResponse, + type Project as Project, + type ProjectUsage as ProjectUsage, type ProjectListResponse as ProjectListResponse, - type ProjectUsageResponse as ProjectUsageResponse, }; export { Sessions as Sessions, + type Session as Session, + type SessionLiveURLs as SessionLiveURLs, type SessionCreateResponse as SessionCreateResponse, type SessionRetrieveResponse as SessionRetrieveResponse, - type SessionUpdateResponse as SessionUpdateResponse, type SessionListResponse as SessionListResponse, - type SessionDebugResponse as SessionDebugResponse, type SessionCreateParams as SessionCreateParams, type SessionUpdateParams as SessionUpdateParams, type SessionListParams as SessionListParams, diff --git a/src/resources/contexts.ts b/src/resources/contexts.ts index 59aac25..ae2d224 100644 --- a/src/resources/contexts.ts +++ b/src/resources/contexts.ts @@ -23,7 +23,7 @@ export class Contexts extends APIResource { /** * Get a Context */ - retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise { + retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise { return this._client.get(`/v1/contexts/${id}`, options); } @@ -45,6 +45,19 @@ export class Contexts extends APIResource { } } +export interface Context { + id: string; + + createdAt: string; + + /** + * The Project ID linked to the uploaded Context. + */ + projectId: string; + + updatedAt: string; +} + export interface ContextCreateResponse { id: string; @@ -71,19 +84,6 @@ export interface ContextCreateResponse { uploadUrl: string; } -export interface ContextRetrieveResponse { - id: string; - - createdAt: string; - - /** - * The Project ID linked to the uploaded Context. - */ - projectId: string; - - updatedAt: string; -} - export interface ContextUpdateResponse { id: string; @@ -121,8 +121,8 @@ export interface ContextCreateParams { export declare namespace Contexts { export { + type Context as Context, type ContextCreateResponse as ContextCreateResponse, - type ContextRetrieveResponse as ContextRetrieveResponse, type ContextUpdateResponse as ContextUpdateResponse, type ContextCreateParams as ContextCreateParams, }; diff --git a/src/resources/extensions.ts b/src/resources/extensions.ts index 9c607b8..82da8b5 100644 --- a/src/resources/extensions.ts +++ b/src/resources/extensions.ts @@ -7,17 +7,14 @@ export class Extensions extends APIResource { /** * Upload an Extension */ - create( - body: ExtensionCreateParams, - options?: Core.RequestOptions, - ): Core.APIPromise { + create(body: ExtensionCreateParams, options?: Core.RequestOptions): Core.APIPromise { return this._client.post('/v1/extensions', Core.multipartFormRequestOptions({ body, ...options })); } /** * Get an Extension */ - retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise { + retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise { return this._client.get(`/v1/extensions/${id}`, options); } @@ -32,22 +29,7 @@ export class Extensions extends APIResource { } } -export interface ExtensionCreateResponse { - id: string; - - createdAt: string; - - fileName: string; - - /** - * The Project ID linked to the uploaded Extension. - */ - projectId: string; - - updatedAt: string; -} - -export interface ExtensionRetrieveResponse { +export interface Extension { id: string; createdAt: string; @@ -67,9 +49,5 @@ export interface ExtensionCreateParams { } export declare namespace Extensions { - export { - type ExtensionCreateResponse as ExtensionCreateResponse, - type ExtensionRetrieveResponse as ExtensionRetrieveResponse, - type ExtensionCreateParams as ExtensionCreateParams, - }; + export { type Extension as Extension, type ExtensionCreateParams as ExtensionCreateParams }; } diff --git a/src/resources/index.ts b/src/resources/index.ts index 959332a..96c5a42 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -2,30 +2,20 @@ export { Contexts, + type Context, type ContextCreateResponse, - type ContextRetrieveResponse, type ContextUpdateResponse, type ContextCreateParams, } from './contexts'; -export { - Extensions, - type ExtensionCreateResponse, - type ExtensionRetrieveResponse, - type ExtensionCreateParams, -} from './extensions'; -export { - Projects, - type ProjectRetrieveResponse, - type ProjectListResponse, - type ProjectUsageResponse, -} from './projects'; +export { Extensions, type Extension, type ExtensionCreateParams } from './extensions'; +export { Projects, type Project, type ProjectUsage, type ProjectListResponse } from './projects'; export { Sessions, + type Session, + type SessionLiveURLs, type SessionCreateResponse, type SessionRetrieveResponse, - type SessionUpdateResponse, type SessionListResponse, - type SessionDebugResponse, type SessionCreateParams, type SessionUpdateParams, type SessionListParams, diff --git a/src/resources/projects.ts b/src/resources/projects.ts index 9709cc5..d6b303d 100644 --- a/src/resources/projects.ts +++ b/src/resources/projects.ts @@ -7,7 +7,7 @@ export class Projects extends APIResource { /** * Get a Project */ - retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise { + retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise { return this._client.get(`/v1/projects/${id}`, options); } @@ -21,12 +21,12 @@ export class Projects extends APIResource { /** * Get Project Usage */ - usage(id: string, options?: Core.RequestOptions): Core.APIPromise { + usage(id: string, options?: Core.RequestOptions): Core.APIPromise { return this._client.get(`/v1/projects/${id}/usage`, options); } } -export interface ProjectRetrieveResponse { +export interface Project { id: string; /** @@ -45,39 +45,18 @@ export interface ProjectRetrieveResponse { updatedAt: string; } -export type ProjectListResponse = Array; - -export namespace ProjectListResponse { - export interface ProjectListResponseItem { - id: string; - - /** - * The maximum number of sessions that this project can run concurrently. - */ - concurrency: number; - - createdAt: string; - - defaultTimeout: number; - - name: string; - - ownerId: string; - - updatedAt: string; - } -} - -export interface ProjectUsageResponse { +export interface ProjectUsage { browserMinutes: number; proxyBytes: number; } +export type ProjectListResponse = Array; + export declare namespace Projects { export { - type ProjectRetrieveResponse as ProjectRetrieveResponse, + type Project as Project, + type ProjectUsage as ProjectUsage, type ProjectListResponse as ProjectListResponse, - type ProjectUsageResponse as ProjectUsageResponse, }; } diff --git a/src/resources/sessions/index.ts b/src/resources/sessions/index.ts index bb17bf0..9c9a61e 100644 --- a/src/resources/sessions/index.ts +++ b/src/resources/sessions/index.ts @@ -1,15 +1,15 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. export { Downloads } from './downloads'; -export { Logs, type LogListResponse } from './logs'; -export { Recording, type RecordingRetrieveResponse } from './recording'; +export { Logs, type SessionLog, type LogListResponse } from './logs'; +export { Recording, type SessionRecording, type RecordingRetrieveResponse } from './recording'; export { Sessions, + type Session, + type SessionLiveURLs, type SessionCreateResponse, type SessionRetrieveResponse, - type SessionUpdateResponse, type SessionListResponse, - type SessionDebugResponse, type SessionCreateParams, type SessionUpdateParams, type SessionListParams, diff --git a/src/resources/sessions/logs.ts b/src/resources/sessions/logs.ts index feef0e5..3907d4f 100644 --- a/src/resources/sessions/logs.ts +++ b/src/resources/sessions/logs.ts @@ -12,23 +12,32 @@ export class Logs extends APIResource { } } -export type LogListResponse = Array; +export interface SessionLog { + method: string; -export namespace LogListResponse { - export interface LogListResponseItem { - method: string; + pageId: number; - pageId: number; + sessionId: string; - sessionId: string; + frameId?: string; - frameId?: string; + loaderId?: string; - loaderId?: string; + request?: SessionLog.Request; - request?: LogListResponseItem.Request; + response?: SessionLog.Response; - response?: LogListResponseItem.Response; + /** + * milliseconds that have elapsed since the UNIX epoch + */ + timestamp?: number; +} + +export namespace SessionLog { + export interface Request { + params: { [key: string]: unknown }; + + rawBody: string; /** * milliseconds that have elapsed since the UNIX epoch @@ -36,31 +45,20 @@ export namespace LogListResponse { timestamp?: number; } - export namespace LogListResponseItem { - export interface Request { - params: { [key: string]: unknown }; - - rawBody: string; - - /** - * milliseconds that have elapsed since the UNIX epoch - */ - timestamp?: number; - } + export interface Response { + rawBody: string; - export interface Response { - rawBody: string; + result: { [key: string]: unknown }; - result: { [key: string]: unknown }; - - /** - * milliseconds that have elapsed since the UNIX epoch - */ - timestamp?: number; - } + /** + * milliseconds that have elapsed since the UNIX epoch + */ + timestamp?: number; } } +export type LogListResponse = Array; + export declare namespace Logs { - export { type LogListResponse as LogListResponse }; + export { type SessionLog as SessionLog, type LogListResponse as LogListResponse }; } diff --git a/src/resources/sessions/recording.ts b/src/resources/sessions/recording.ts index 7572517..62f91ca 100644 --- a/src/resources/sessions/recording.ts +++ b/src/resources/sessions/recording.ts @@ -12,27 +12,28 @@ export class Recording extends APIResource { } } -export type RecordingRetrieveResponse = Array; - -export namespace RecordingRetrieveResponse { - export interface RecordingRetrieveResponseItem { - /** - * See - * [rrweb documentation](https://github.com/rrweb-io/rrweb/blob/master/docs/recipes/dive-into-event.md). - */ - data: { [key: string]: unknown }; +export interface SessionRecording { + /** + * See + * [rrweb documentation](https://github.com/rrweb-io/rrweb/blob/master/docs/recipes/dive-into-event.md). + */ + data: { [key: string]: unknown }; - sessionId: string; + sessionId: string; - /** - * milliseconds that have elapsed since the UNIX epoch - */ - timestamp: number; + /** + * milliseconds that have elapsed since the UNIX epoch + */ + timestamp: number; - type: number; - } + type: number; } +export type RecordingRetrieveResponse = Array; + export declare namespace Recording { - export { type RecordingRetrieveResponse as RecordingRetrieveResponse }; + export { + type SessionRecording as SessionRecording, + type RecordingRetrieveResponse as RecordingRetrieveResponse, + }; } diff --git a/src/resources/sessions/sessions.ts b/src/resources/sessions/sessions.ts index 4172103..a41418a 100644 --- a/src/resources/sessions/sessions.ts +++ b/src/resources/sessions/sessions.ts @@ -6,9 +6,9 @@ import * as Core from '../../core'; import * as DownloadsAPI from './downloads'; import { Downloads } from './downloads'; import * as LogsAPI from './logs'; -import { LogListResponse, Logs } from './logs'; +import { LogListResponse, Logs, SessionLog } from './logs'; import * as RecordingAPI from './recording'; -import { Recording, RecordingRetrieveResponse } from './recording'; +import { Recording, RecordingRetrieveResponse, SessionRecording } from './recording'; import * as UploadsAPI from './uploads'; import { UploadCreateParams, UploadCreateResponse, Uploads } from './uploads'; @@ -43,11 +43,7 @@ export class Sessions extends APIResource { /** * Update a Session */ - update( - id: string, - body: SessionUpdateParams, - options?: Core.RequestOptions, - ): Core.APIPromise { + update(id: string, body: SessionUpdateParams, options?: Core.RequestOptions): Core.APIPromise { return this._client.post(`/v1/sessions/${id}`, { body, ...options }); } @@ -69,19 +65,14 @@ export class Sessions extends APIResource { /** * Session Live URLs */ - debug(id: string, options?: Core.RequestOptions): Core.APIPromise { + debug(id: string, options?: Core.RequestOptions): Core.APIPromise { return this._client.get(`/v1/sessions/${id}/debug`, options); } } -export interface SessionCreateResponse { +export interface Session { id: string; - /** - * WebSocket URL to connect to the Session. - */ - connectUrl: string; - createdAt: string; expiresAt: string; @@ -106,16 +97,6 @@ export interface SessionCreateResponse { */ region: 'us-west-2' | 'us-east-1' | 'eu-central-1' | 'ap-southeast-1'; - /** - * HTTP URL to connect to the Session. - */ - seleniumRemoteUrl: string; - - /** - * Signing key to use when connecting to the Session via HTTP. - */ - signingKey: string; - startedAt: string; status: 'RUNNING' | 'ERROR' | 'TIMED_OUT' | 'COMPLETED'; @@ -136,191 +117,67 @@ export interface SessionCreateResponse { userMetadata?: { [key: string]: unknown }; } -export interface SessionRetrieveResponse { - id: string; +export interface SessionLiveURLs { + debuggerFullscreenUrl: string; - createdAt: string; + debuggerUrl: string; - expiresAt: string; + pages: Array; - /** - * Indicates if the Session was created to be kept alive upon disconnections - */ - keepAlive: boolean; + wsUrl: string; +} - /** - * The Project ID linked to the Session. - */ - projectId: string; +export namespace SessionLiveURLs { + export interface Page { + id: string; - /** - * Bytes used via the [Proxy](/features/stealth-mode#proxies-and-residential-ips) - */ - proxyBytes: number; + debuggerFullscreenUrl: string; - /** - * The region where the Session is running. - */ - region: 'us-west-2' | 'us-east-1' | 'eu-central-1' | 'ap-southeast-1'; + debuggerUrl: string; - startedAt: string; + faviconUrl: string; - status: 'RUNNING' | 'ERROR' | 'TIMED_OUT' | 'COMPLETED'; + title: string; - updatedAt: string; + url: string; + } +} +export interface SessionCreateResponse extends Session { /** * WebSocket URL to connect to the Session. */ - connectUrl?: string; - - /** - * Optional. The Context linked to the Session. - */ - contextId?: string; - - endedAt?: string; + connectUrl: string; /** * HTTP URL to connect to the Session. */ - seleniumRemoteUrl?: string; + seleniumRemoteUrl: string; /** * Signing key to use when connecting to the Session via HTTP. */ - signingKey?: string; - - /** - * Arbitrary user metadata to attach to the session. To learn more about user - * metadata, see [User Metadata](/features/sessions#user-metadata). - */ - userMetadata?: { [key: string]: unknown }; + signingKey: string; } -export interface SessionUpdateResponse { - id: string; - - createdAt: string; - - expiresAt: string; - - /** - * Indicates if the Session was created to be kept alive upon disconnections - */ - keepAlive: boolean; - +export interface SessionRetrieveResponse extends Session { /** - * The Project ID linked to the Session. - */ - projectId: string; - - /** - * Bytes used via the [Proxy](/features/stealth-mode#proxies-and-residential-ips) - */ - proxyBytes: number; - - /** - * The region where the Session is running. + * WebSocket URL to connect to the Session. */ - region: 'us-west-2' | 'us-east-1' | 'eu-central-1' | 'ap-southeast-1'; - - startedAt: string; - - status: 'RUNNING' | 'ERROR' | 'TIMED_OUT' | 'COMPLETED'; - - updatedAt: string; + connectUrl?: string; /** - * Optional. The Context linked to the Session. + * HTTP URL to connect to the Session. */ - contextId?: string; - - endedAt?: string; + seleniumRemoteUrl?: string; /** - * Arbitrary user metadata to attach to the session. To learn more about user - * metadata, see [User Metadata](/features/sessions#user-metadata). + * Signing key to use when connecting to the Session via HTTP. */ - userMetadata?: { [key: string]: unknown }; -} - -export type SessionListResponse = Array; - -export namespace SessionListResponse { - export interface SessionListResponseItem { - id: string; - - createdAt: string; - - expiresAt: string; - - /** - * Indicates if the Session was created to be kept alive upon disconnections - */ - keepAlive: boolean; - - /** - * The Project ID linked to the Session. - */ - projectId: string; - - /** - * Bytes used via the [Proxy](/features/stealth-mode#proxies-and-residential-ips) - */ - proxyBytes: number; - - /** - * The region where the Session is running. - */ - region: 'us-west-2' | 'us-east-1' | 'eu-central-1' | 'ap-southeast-1'; - - startedAt: string; - - status: 'RUNNING' | 'ERROR' | 'TIMED_OUT' | 'COMPLETED'; - - updatedAt: string; - - /** - * Optional. The Context linked to the Session. - */ - contextId?: string; - - endedAt?: string; - - /** - * Arbitrary user metadata to attach to the session. To learn more about user - * metadata, see [User Metadata](/features/sessions#user-metadata). - */ - userMetadata?: { [key: string]: unknown }; - } -} - -export interface SessionDebugResponse { - debuggerFullscreenUrl: string; - - debuggerUrl: string; - - pages: Array; - - wsUrl: string; + signingKey?: string; } -export namespace SessionDebugResponse { - export interface Page { - id: string; - - debuggerFullscreenUrl: string; - - debuggerUrl: string; - - faviconUrl: string; - - title: string; - - url: string; - } -} +export type SessionListResponse = Array; export interface SessionCreateParams { browserSettings?: SessionCreateParams.BrowserSettings; @@ -350,7 +207,9 @@ export interface SessionCreateParams { */ proxies?: | Array< - SessionCreateParams.UnionMember0 | SessionCreateParams.UnionMember1 | SessionCreateParams.UnionMember2 + | SessionCreateParams.BrowserbaseProxyConfig + | SessionCreateParams.ExternalProxyConfig + | SessionCreateParams.NoneProxyConfig > | boolean; @@ -454,7 +313,7 @@ export namespace SessionCreateParams { } } - export interface UnionMember0 { + export interface BrowserbaseProxyConfig { /** * Type of proxy. Always use 'browserbase' for the Browserbase managed proxy * network. @@ -470,10 +329,10 @@ export namespace SessionCreateParams { /** * Geographic location for the proxy. Optional. */ - geolocation?: UnionMember0.Geolocation; + geolocation?: BrowserbaseProxyConfig.Geolocation; } - export namespace UnionMember0 { + export namespace BrowserbaseProxyConfig { /** * Geographic location for the proxy. Optional. */ @@ -495,7 +354,7 @@ export namespace SessionCreateParams { } } - export interface UnionMember1 { + export interface ExternalProxyConfig { /** * Server URL for external proxy. Required. */ @@ -523,7 +382,7 @@ export namespace SessionCreateParams { username?: string; } - export interface UnionMember2 { + export interface NoneProxyConfig { /** * Type of proxy. Always 'none' for this config. */ @@ -570,11 +429,11 @@ Sessions.Uploads = Uploads; export declare namespace Sessions { export { + type Session as Session, + type SessionLiveURLs as SessionLiveURLs, type SessionCreateResponse as SessionCreateResponse, type SessionRetrieveResponse as SessionRetrieveResponse, - type SessionUpdateResponse as SessionUpdateResponse, type SessionListResponse as SessionListResponse, - type SessionDebugResponse as SessionDebugResponse, type SessionCreateParams as SessionCreateParams, type SessionUpdateParams as SessionUpdateParams, type SessionListParams as SessionListParams, @@ -582,9 +441,13 @@ export declare namespace Sessions { export { Downloads as Downloads }; - export { Logs as Logs, type LogListResponse as LogListResponse }; + export { Logs as Logs, type SessionLog as SessionLog, type LogListResponse as LogListResponse }; - export { Recording as Recording, type RecordingRetrieveResponse as RecordingRetrieveResponse }; + export { + Recording as Recording, + type SessionRecording as SessionRecording, + type RecordingRetrieveResponse as RecordingRetrieveResponse, + }; export { Uploads as Uploads, diff --git a/src/version.ts b/src/version.ts index 4db2c84..f95f339 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '2.7.0-alpha.2'; // x-release-please-version +export const VERSION = '2.7.0-alpha.3'; // x-release-please-version