Skip to content

Commit 55e429b

Browse files
SDK regeneration (#41)
Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
1 parent 57fdcb1 commit 55e429b

File tree

9 files changed

+51
-31
lines changed

9 files changed

+51
-31
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,9 @@ A full reference for this library is available [here](https://github.com/browser
363363
Instantiate and use the client with the following:
364364

365365
```typescript
366-
import { BrowserUseEnvironment, BrowserUseClient } from "";
366+
import { BrowserUseClient } from "";
367367

368-
const client = new BrowserUseClient({ environment: BrowserUseEnvironment.Production, apiKey: "YOUR_API_KEY" });
368+
const client = new BrowserUseClient({ apiKey: "YOUR_API_KEY" });
369369
await client.tasks.createTask({
370370
task: "task",
371371
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "",
3-
"version": "0.0.35",
3+
"version": "0.0.37",
44
"private": false,
55
"repository": "github:browser-use/browser-use-node",
66
"type": "commonjs",

src/Client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { Profiles } from "./api/resources/profiles/client/Client.js";
1313

1414
export declare namespace BrowserUseClient {
1515
export interface Options {
16-
environment: core.Supplier<environments.BrowserUseEnvironment | string>;
16+
environment?: core.Supplier<environments.BrowserUseEnvironment | string>;
1717
/** Specify a custom URL to connect the client to. */
1818
baseUrl?: core.Supplier<string>;
1919
apiKey: core.Supplier<string>;
@@ -50,7 +50,7 @@ export class BrowserUseClient {
5050
{
5151
"X-Fern-Language": "JavaScript",
5252
"X-Fern-SDK-Name": "",
53-
"X-Fern-SDK-Version": "0.0.35",
53+
"X-Fern-SDK-Version": "0.0.37",
5454
"X-Fern-Runtime": core.RUNTIME.type,
5555
"X-Fern-Runtime-Version": core.RUNTIME.version,
5656
},

src/api/resources/accounts/client/Client.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import * as errors from "../../../../errors/index.js";
1010

1111
export declare namespace Accounts {
1212
export interface Options {
13-
environment: core.Supplier<environments.BrowserUseEnvironment | string>;
13+
environment?: core.Supplier<environments.BrowserUseEnvironment | string>;
1414
/** Specify a custom URL to connect the client to. */
1515
baseUrl?: core.Supplier<string>;
1616
apiKey: core.Supplier<string>;
@@ -64,7 +64,8 @@ export class Accounts {
6464
const _response = await core.fetcher({
6565
url: core.url.join(
6666
(await core.Supplier.get(this._options.baseUrl)) ??
67-
(await core.Supplier.get(this._options.environment)),
67+
(await core.Supplier.get(this._options.environment)) ??
68+
environments.BrowserUseEnvironment.Production,
6869
"accounts/me",
6970
),
7071
method: "GET",

src/api/resources/files/client/Client.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import * as errors from "../../../../errors/index.js";
1010

1111
export declare namespace Files {
1212
export interface Options {
13-
environment: core.Supplier<environments.BrowserUseEnvironment | string>;
13+
environment?: core.Supplier<environments.BrowserUseEnvironment | string>;
1414
/** Specify a custom URL to connect the client to. */
1515
baseUrl?: core.Supplier<string>;
1616
apiKey: core.Supplier<string>;
@@ -81,7 +81,8 @@ export class Files {
8181
const _response = await core.fetcher({
8282
url: core.url.join(
8383
(await core.Supplier.get(this._options.baseUrl)) ??
84-
(await core.Supplier.get(this._options.environment)),
84+
(await core.Supplier.get(this._options.environment)) ??
85+
environments.BrowserUseEnvironment.Production,
8586
`files/sessions/${encodeURIComponent(sessionId)}/presigned-url`,
8687
),
8788
method: "POST",
@@ -179,7 +180,8 @@ export class Files {
179180
const _response = await core.fetcher({
180181
url: core.url.join(
181182
(await core.Supplier.get(this._options.baseUrl)) ??
182-
(await core.Supplier.get(this._options.environment)),
183+
(await core.Supplier.get(this._options.environment)) ??
184+
environments.BrowserUseEnvironment.Production,
183185
`files/tasks/${encodeURIComponent(taskId)}/output-files/${encodeURIComponent(fileId)}`,
184186
),
185187
method: "GET",

src/api/resources/profiles/client/Client.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import * as errors from "../../../../errors/index.js";
1010

1111
export declare namespace Profiles {
1212
export interface Options {
13-
environment: core.Supplier<environments.BrowserUseEnvironment | string>;
13+
environment?: core.Supplier<environments.BrowserUseEnvironment | string>;
1414
/** Specify a custom URL to connect the client to. */
1515
baseUrl?: core.Supplier<string>;
1616
apiKey: core.Supplier<string>;
@@ -79,7 +79,8 @@ export class Profiles {
7979
const _response = await core.fetcher({
8080
url: core.url.join(
8181
(await core.Supplier.get(this._options.baseUrl)) ??
82-
(await core.Supplier.get(this._options.environment)),
82+
(await core.Supplier.get(this._options.environment)) ??
83+
environments.BrowserUseEnvironment.Production,
8384
"profiles",
8485
),
8586
method: "GET",
@@ -157,7 +158,8 @@ export class Profiles {
157158
const _response = await core.fetcher({
158159
url: core.url.join(
159160
(await core.Supplier.get(this._options.baseUrl)) ??
160-
(await core.Supplier.get(this._options.environment)),
161+
(await core.Supplier.get(this._options.environment)) ??
162+
environments.BrowserUseEnvironment.Production,
161163
"profiles",
162164
),
163165
method: "POST",
@@ -240,7 +242,8 @@ export class Profiles {
240242
const _response = await core.fetcher({
241243
url: core.url.join(
242244
(await core.Supplier.get(this._options.baseUrl)) ??
243-
(await core.Supplier.get(this._options.environment)),
245+
(await core.Supplier.get(this._options.environment)) ??
246+
environments.BrowserUseEnvironment.Production,
244247
`profiles/${encodeURIComponent(profileId)}`,
245248
),
246249
method: "GET",
@@ -319,7 +322,8 @@ export class Profiles {
319322
const _response = await core.fetcher({
320323
url: core.url.join(
321324
(await core.Supplier.get(this._options.baseUrl)) ??
322-
(await core.Supplier.get(this._options.environment)),
325+
(await core.Supplier.get(this._options.environment)) ??
326+
environments.BrowserUseEnvironment.Production,
323327
`profiles/${encodeURIComponent(profileId)}`,
324328
),
325329
method: "DELETE",

src/api/resources/sessions/client/Client.ts

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import * as errors from "../../../../errors/index.js";
1010

1111
export declare namespace Sessions {
1212
export interface Options {
13-
environment: core.Supplier<environments.BrowserUseEnvironment | string>;
13+
environment?: core.Supplier<environments.BrowserUseEnvironment | string>;
1414
/** Specify a custom URL to connect the client to. */
1515
baseUrl?: core.Supplier<string>;
1616
apiKey: core.Supplier<string>;
@@ -83,7 +83,8 @@ export class Sessions {
8383
const _response = await core.fetcher({
8484
url: core.url.join(
8585
(await core.Supplier.get(this._options.baseUrl)) ??
86-
(await core.Supplier.get(this._options.environment)),
86+
(await core.Supplier.get(this._options.environment)) ??
87+
environments.BrowserUseEnvironment.Production,
8788
"sessions",
8889
),
8990
method: "GET",
@@ -161,7 +162,8 @@ export class Sessions {
161162
const _response = await core.fetcher({
162163
url: core.url.join(
163164
(await core.Supplier.get(this._options.baseUrl)) ??
164-
(await core.Supplier.get(this._options.environment)),
165+
(await core.Supplier.get(this._options.environment)) ??
166+
environments.BrowserUseEnvironment.Production,
165167
"sessions",
166168
),
167169
method: "POST",
@@ -244,7 +246,8 @@ export class Sessions {
244246
const _response = await core.fetcher({
245247
url: core.url.join(
246248
(await core.Supplier.get(this._options.baseUrl)) ??
247-
(await core.Supplier.get(this._options.environment)),
249+
(await core.Supplier.get(this._options.environment)) ??
250+
environments.BrowserUseEnvironment.Production,
248251
`sessions/${encodeURIComponent(sessionId)}`,
249252
),
250253
method: "GET",
@@ -320,7 +323,8 @@ export class Sessions {
320323
const _response = await core.fetcher({
321324
url: core.url.join(
322325
(await core.Supplier.get(this._options.baseUrl)) ??
323-
(await core.Supplier.get(this._options.environment)),
326+
(await core.Supplier.get(this._options.environment)) ??
327+
environments.BrowserUseEnvironment.Production,
324328
`sessions/${encodeURIComponent(sessionId)}`,
325329
),
326330
method: "DELETE",
@@ -401,7 +405,8 @@ export class Sessions {
401405
const _response = await core.fetcher({
402406
url: core.url.join(
403407
(await core.Supplier.get(this._options.baseUrl)) ??
404-
(await core.Supplier.get(this._options.environment)),
408+
(await core.Supplier.get(this._options.environment)) ??
409+
environments.BrowserUseEnvironment.Production,
405410
`sessions/${encodeURIComponent(sessionId)}`,
406411
),
407412
method: "PATCH",
@@ -484,7 +489,8 @@ export class Sessions {
484489
const _response = await core.fetcher({
485490
url: core.url.join(
486491
(await core.Supplier.get(this._options.baseUrl)) ??
487-
(await core.Supplier.get(this._options.environment)),
492+
(await core.Supplier.get(this._options.environment)) ??
493+
environments.BrowserUseEnvironment.Production,
488494
`sessions/${encodeURIComponent(sessionId)}/public-share`,
489495
),
490496
method: "GET",
@@ -566,7 +572,8 @@ export class Sessions {
566572
const _response = await core.fetcher({
567573
url: core.url.join(
568574
(await core.Supplier.get(this._options.baseUrl)) ??
569-
(await core.Supplier.get(this._options.environment)),
575+
(await core.Supplier.get(this._options.environment)) ??
576+
environments.BrowserUseEnvironment.Production,
570577
`sessions/${encodeURIComponent(sessionId)}/public-share`,
571578
),
572579
method: "POST",
@@ -648,7 +655,8 @@ export class Sessions {
648655
const _response = await core.fetcher({
649656
url: core.url.join(
650657
(await core.Supplier.get(this._options.baseUrl)) ??
651-
(await core.Supplier.get(this._options.environment)),
658+
(await core.Supplier.get(this._options.environment)) ??
659+
environments.BrowserUseEnvironment.Production,
652660
`sessions/${encodeURIComponent(sessionId)}/public-share`,
653661
),
654662
method: "DELETE",

src/api/resources/tasks/client/Client.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import * as errors from "../../../../errors/index.js";
1010

1111
export declare namespace Tasks {
1212
export interface Options {
13-
environment: core.Supplier<environments.BrowserUseEnvironment | string>;
13+
environment?: core.Supplier<environments.BrowserUseEnvironment | string>;
1414
/** Specify a custom URL to connect the client to. */
1515
baseUrl?: core.Supplier<string>;
1616
apiKey: core.Supplier<string>;
@@ -95,7 +95,8 @@ export class Tasks {
9595
const _response = await core.fetcher({
9696
url: core.url.join(
9797
(await core.Supplier.get(this._options.baseUrl)) ??
98-
(await core.Supplier.get(this._options.environment)),
98+
(await core.Supplier.get(this._options.environment)) ??
99+
environments.BrowserUseEnvironment.Production,
99100
"tasks",
100101
),
101102
method: "GET",
@@ -180,7 +181,8 @@ export class Tasks {
180181
const _response = await core.fetcher({
181182
url: core.url.join(
182183
(await core.Supplier.get(this._options.baseUrl)) ??
183-
(await core.Supplier.get(this._options.environment)),
184+
(await core.Supplier.get(this._options.environment)) ??
185+
environments.BrowserUseEnvironment.Production,
184186
"tasks",
185187
),
186188
method: "POST",
@@ -272,7 +274,8 @@ export class Tasks {
272274
const _response = await core.fetcher({
273275
url: core.url.join(
274276
(await core.Supplier.get(this._options.baseUrl)) ??
275-
(await core.Supplier.get(this._options.environment)),
277+
(await core.Supplier.get(this._options.environment)) ??
278+
environments.BrowserUseEnvironment.Production,
276279
`tasks/${encodeURIComponent(taskId)}`,
277280
),
278281
method: "GET",
@@ -357,7 +360,8 @@ export class Tasks {
357360
const _response = await core.fetcher({
358361
url: core.url.join(
359362
(await core.Supplier.get(this._options.baseUrl)) ??
360-
(await core.Supplier.get(this._options.environment)),
363+
(await core.Supplier.get(this._options.environment)) ??
364+
environments.BrowserUseEnvironment.Production,
361365
`tasks/${encodeURIComponent(taskId)}`,
362366
),
363367
method: "PATCH",
@@ -441,7 +445,8 @@ export class Tasks {
441445
const _response = await core.fetcher({
442446
url: core.url.join(
443447
(await core.Supplier.get(this._options.baseUrl)) ??
444-
(await core.Supplier.get(this._options.environment)),
448+
(await core.Supplier.get(this._options.environment)) ??
449+
environments.BrowserUseEnvironment.Production,
445450
`tasks/${encodeURIComponent(taskId)}/logs`,
446451
),
447452
method: "GET",

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const SDK_VERSION = "0.0.35";
1+
export const SDK_VERSION = "0.0.37";

0 commit comments

Comments
 (0)