From cb7e3949179b15f78557c200ce82106a3a7c908e Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Mon, 1 Sep 2025 20:02:10 +0000 Subject: [PATCH] SDK regeneration --- README.md | 4 ++-- package.json | 2 +- src/Client.ts | 4 ++-- src/api/resources/accounts/client/Client.ts | 5 ++-- src/api/resources/files/client/Client.ts | 8 ++++--- src/api/resources/profiles/client/Client.ts | 14 +++++++---- src/api/resources/sessions/client/Client.ts | 26 ++++++++++++++------- src/api/resources/tasks/client/Client.ts | 17 +++++++++----- src/version.ts | 2 +- 9 files changed, 51 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index ddfd2d9..b66e3f6 100644 --- a/README.md +++ b/README.md @@ -363,9 +363,9 @@ A full reference for this library is available [here](https://github.com/browser Instantiate and use the client with the following: ```typescript -import { BrowserUseEnvironment, BrowserUseClient } from ""; +import { BrowserUseClient } from ""; -const client = new BrowserUseClient({ environment: BrowserUseEnvironment.Production, apiKey: "YOUR_API_KEY" }); +const client = new BrowserUseClient({ apiKey: "YOUR_API_KEY" }); await client.tasks.createTask({ task: "task", }); diff --git a/package.json b/package.json index b42350d..2a7f5c9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "", - "version": "0.0.35", + "version": "0.0.37", "private": false, "repository": "github:browser-use/browser-use-node", "type": "commonjs", diff --git a/src/Client.ts b/src/Client.ts index e682142..0a48356 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -13,7 +13,7 @@ import { Profiles } from "./api/resources/profiles/client/Client.js"; export declare namespace BrowserUseClient { export interface Options { - environment: core.Supplier; + environment?: core.Supplier; /** Specify a custom URL to connect the client to. */ baseUrl?: core.Supplier; apiKey: core.Supplier; @@ -50,7 +50,7 @@ export class BrowserUseClient { { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "", - "X-Fern-SDK-Version": "0.0.35", + "X-Fern-SDK-Version": "0.0.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/accounts/client/Client.ts b/src/api/resources/accounts/client/Client.ts index fb95d04..7c9d72b 100644 --- a/src/api/resources/accounts/client/Client.ts +++ b/src/api/resources/accounts/client/Client.ts @@ -10,7 +10,7 @@ import * as errors from "../../../../errors/index.js"; export declare namespace Accounts { export interface Options { - environment: core.Supplier; + environment?: core.Supplier; /** Specify a custom URL to connect the client to. */ baseUrl?: core.Supplier; apiKey: core.Supplier; @@ -64,7 +64,8 @@ export class Accounts { const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)), + (await core.Supplier.get(this._options.environment)) ?? + environments.BrowserUseEnvironment.Production, "accounts/me", ), method: "GET", diff --git a/src/api/resources/files/client/Client.ts b/src/api/resources/files/client/Client.ts index 84f80be..347a2fc 100644 --- a/src/api/resources/files/client/Client.ts +++ b/src/api/resources/files/client/Client.ts @@ -10,7 +10,7 @@ import * as errors from "../../../../errors/index.js"; export declare namespace Files { export interface Options { - environment: core.Supplier; + environment?: core.Supplier; /** Specify a custom URL to connect the client to. */ baseUrl?: core.Supplier; apiKey: core.Supplier; @@ -81,7 +81,8 @@ export class Files { const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)), + (await core.Supplier.get(this._options.environment)) ?? + environments.BrowserUseEnvironment.Production, `files/sessions/${encodeURIComponent(sessionId)}/presigned-url`, ), method: "POST", @@ -179,7 +180,8 @@ export class Files { const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)), + (await core.Supplier.get(this._options.environment)) ?? + environments.BrowserUseEnvironment.Production, `files/tasks/${encodeURIComponent(taskId)}/output-files/${encodeURIComponent(fileId)}`, ), method: "GET", diff --git a/src/api/resources/profiles/client/Client.ts b/src/api/resources/profiles/client/Client.ts index d7613c3..104c185 100644 --- a/src/api/resources/profiles/client/Client.ts +++ b/src/api/resources/profiles/client/Client.ts @@ -10,7 +10,7 @@ import * as errors from "../../../../errors/index.js"; export declare namespace Profiles { export interface Options { - environment: core.Supplier; + environment?: core.Supplier; /** Specify a custom URL to connect the client to. */ baseUrl?: core.Supplier; apiKey: core.Supplier; @@ -79,7 +79,8 @@ export class Profiles { const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)), + (await core.Supplier.get(this._options.environment)) ?? + environments.BrowserUseEnvironment.Production, "profiles", ), method: "GET", @@ -157,7 +158,8 @@ export class Profiles { const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)), + (await core.Supplier.get(this._options.environment)) ?? + environments.BrowserUseEnvironment.Production, "profiles", ), method: "POST", @@ -240,7 +242,8 @@ export class Profiles { const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)), + (await core.Supplier.get(this._options.environment)) ?? + environments.BrowserUseEnvironment.Production, `profiles/${encodeURIComponent(profileId)}`, ), method: "GET", @@ -319,7 +322,8 @@ export class Profiles { const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)), + (await core.Supplier.get(this._options.environment)) ?? + environments.BrowserUseEnvironment.Production, `profiles/${encodeURIComponent(profileId)}`, ), method: "DELETE", diff --git a/src/api/resources/sessions/client/Client.ts b/src/api/resources/sessions/client/Client.ts index 53461e3..2e1ae90 100644 --- a/src/api/resources/sessions/client/Client.ts +++ b/src/api/resources/sessions/client/Client.ts @@ -10,7 +10,7 @@ import * as errors from "../../../../errors/index.js"; export declare namespace Sessions { export interface Options { - environment: core.Supplier; + environment?: core.Supplier; /** Specify a custom URL to connect the client to. */ baseUrl?: core.Supplier; apiKey: core.Supplier; @@ -83,7 +83,8 @@ export class Sessions { const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)), + (await core.Supplier.get(this._options.environment)) ?? + environments.BrowserUseEnvironment.Production, "sessions", ), method: "GET", @@ -161,7 +162,8 @@ export class Sessions { const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)), + (await core.Supplier.get(this._options.environment)) ?? + environments.BrowserUseEnvironment.Production, "sessions", ), method: "POST", @@ -244,7 +246,8 @@ export class Sessions { const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)), + (await core.Supplier.get(this._options.environment)) ?? + environments.BrowserUseEnvironment.Production, `sessions/${encodeURIComponent(sessionId)}`, ), method: "GET", @@ -320,7 +323,8 @@ export class Sessions { const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)), + (await core.Supplier.get(this._options.environment)) ?? + environments.BrowserUseEnvironment.Production, `sessions/${encodeURIComponent(sessionId)}`, ), method: "DELETE", @@ -401,7 +405,8 @@ export class Sessions { const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)), + (await core.Supplier.get(this._options.environment)) ?? + environments.BrowserUseEnvironment.Production, `sessions/${encodeURIComponent(sessionId)}`, ), method: "PATCH", @@ -484,7 +489,8 @@ export class Sessions { const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)), + (await core.Supplier.get(this._options.environment)) ?? + environments.BrowserUseEnvironment.Production, `sessions/${encodeURIComponent(sessionId)}/public-share`, ), method: "GET", @@ -566,7 +572,8 @@ export class Sessions { const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)), + (await core.Supplier.get(this._options.environment)) ?? + environments.BrowserUseEnvironment.Production, `sessions/${encodeURIComponent(sessionId)}/public-share`, ), method: "POST", @@ -648,7 +655,8 @@ export class Sessions { const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)), + (await core.Supplier.get(this._options.environment)) ?? + environments.BrowserUseEnvironment.Production, `sessions/${encodeURIComponent(sessionId)}/public-share`, ), method: "DELETE", diff --git a/src/api/resources/tasks/client/Client.ts b/src/api/resources/tasks/client/Client.ts index 77cc8b3..2997e60 100644 --- a/src/api/resources/tasks/client/Client.ts +++ b/src/api/resources/tasks/client/Client.ts @@ -10,7 +10,7 @@ import * as errors from "../../../../errors/index.js"; export declare namespace Tasks { export interface Options { - environment: core.Supplier; + environment?: core.Supplier; /** Specify a custom URL to connect the client to. */ baseUrl?: core.Supplier; apiKey: core.Supplier; @@ -95,7 +95,8 @@ export class Tasks { const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)), + (await core.Supplier.get(this._options.environment)) ?? + environments.BrowserUseEnvironment.Production, "tasks", ), method: "GET", @@ -180,7 +181,8 @@ export class Tasks { const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)), + (await core.Supplier.get(this._options.environment)) ?? + environments.BrowserUseEnvironment.Production, "tasks", ), method: "POST", @@ -272,7 +274,8 @@ export class Tasks { const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)), + (await core.Supplier.get(this._options.environment)) ?? + environments.BrowserUseEnvironment.Production, `tasks/${encodeURIComponent(taskId)}`, ), method: "GET", @@ -357,7 +360,8 @@ export class Tasks { const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)), + (await core.Supplier.get(this._options.environment)) ?? + environments.BrowserUseEnvironment.Production, `tasks/${encodeURIComponent(taskId)}`, ), method: "PATCH", @@ -441,7 +445,8 @@ export class Tasks { const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)), + (await core.Supplier.get(this._options.environment)) ?? + environments.BrowserUseEnvironment.Production, `tasks/${encodeURIComponent(taskId)}/logs`, ), method: "GET", diff --git a/src/version.ts b/src/version.ts index a9b4fc4..912ac7d 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const SDK_VERSION = "0.0.35"; +export const SDK_VERSION = "0.0.37";