Skip to content

Commit 57fdcb1

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

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+301
-416
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 { BrowserUseClient } from "";
366+
import { BrowserUseEnvironment, BrowserUseClient } from "";
367367

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

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "",
3-
"version": "0.0.32",
3+
"version": "0.0.35",
44
"private": false,
55
"repository": "github:browser-use/browser-use-node",
66
"type": "commonjs",
@@ -47,22 +47,22 @@
4747
"zod": "^4"
4848
},
4949
"devDependencies": {
50-
"@dotenvx/dotenvx": "^1.49.0",
50+
"webpack": "^5.97.1",
51+
"ts-loader": "^9.5.1",
52+
"jest": "^29.7.0",
5153
"@jest/globals": "^29.7.0",
5254
"@types/jest": "^29.5.14",
53-
"@types/node": "^18.19.70",
54-
"jest": "^29.7.0",
55+
"ts-jest": "^29.3.4",
5556
"jest-environment-jsdom": "^29.7.0",
5657
"msw": "^2.8.4",
58+
"@types/node": "^18.19.70",
5759
"prettier": "^3.4.2",
60+
"typescript": "~5.7.2",
61+
"@dotenvx/dotenvx": "^1.49.0",
5862
"react": "^19.1.1",
5963
"react-dom": "^19.1.1",
60-
"ts-jest": "^29.3.4",
61-
"ts-loader": "^9.5.1",
62-
"ts-node": "^10.5.0",
6364
"tsconfig-paths": "^4.2.0",
64-
"typescript": "~5.7.2",
65-
"webpack": "^5.97.1",
65+
"ts-node": "^10.5.0",
6666
"zod": "^4"
6767
},
6868
"browser": {

reference.md

Lines changed: 37 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Reference
22

3-
## Account
3+
## Accounts
44

5-
<details><summary><code>client.account.<a href="/src/api/resources/account/client/Client.ts">getAccountMe</a>() -> BrowserUse.AccountView</code></summary>
5+
<details><summary><code>client.accounts.<a href="/src/api/resources/accounts/client/Client.ts">getAccountMe</a>() -> BrowserUse.AccountView</code></summary>
66
<dl>
77
<dd>
88

@@ -30,7 +30,7 @@ Get authenticated account information including credit balances and account deta
3030
<dd>
3131

3232
```typescript
33-
await client.account.getAccountMe();
33+
await client.accounts.getAccountMe();
3434
```
3535

3636
</dd>
@@ -46,7 +46,7 @@ await client.account.getAccountMe();
4646
<dl>
4747
<dd>
4848

49-
**requestOptions:** `Account.RequestOptions`
49+
**requestOptions:** `Accounts.RequestOptions`
5050

5151
</dd>
5252
</dl>
@@ -453,7 +453,7 @@ await client.sessions.listSessions();
453453
</dl>
454454
</details>
455455

456-
<details><summary><code>client.sessions.<a href="/src/api/resources/sessions/client/Client.ts">createSession</a>({ ...params }) -> BrowserUse.SessionView</code></summary>
456+
<details><summary><code>client.sessions.<a href="/src/api/resources/sessions/client/Client.ts">createSession</a>({ ...params }) -> BrowserUse.SessionItemView</code></summary>
457457
<dl>
458458
<dd>
459459

@@ -979,7 +979,7 @@ await client.files.userUploadFilePresignedUrl("session_id", {
979979
</dl>
980980
</details>
981981

982-
<details><summary><code>client.files.<a href="/src/api/resources/files/client/Client.ts">getTaskUserUploadedFilePresignedUrl</a>(taskId, fileId) -> BrowserUse.TaskUploadedFileResponse</code></summary>
982+
<details><summary><code>client.files.<a href="/src/api/resources/files/client/Client.ts">getTaskOutputFilePresignedUrl</a>(taskId, fileId) -> BrowserUse.TaskOutputFileResponse</code></summary>
983983
<dl>
984984
<dd>
985985

@@ -991,7 +991,7 @@ await client.files.userUploadFilePresignedUrl("session_id", {
991991
<dl>
992992
<dd>
993993

994-
Get secure download URL for a user uploaded file used in the task.
994+
Get secure download URL for an output file generated by the AI agent.
995995

996996
</dd>
997997
</dl>
@@ -1007,7 +1007,7 @@ Get secure download URL for a user uploaded file used in the task.
10071007
<dd>
10081008

10091009
```typescript
1010-
await client.files.getTaskUserUploadedFilePresignedUrl("task_id", "file_id");
1010+
await client.files.getTaskOutputFilePresignedUrl("task_id", "file_id");
10111011
```
10121012

10131013
</dd>
@@ -1050,7 +1050,9 @@ await client.files.getTaskUserUploadedFilePresignedUrl("task_id", "file_id");
10501050
</dl>
10511051
</details>
10521052

1053-
<details><summary><code>client.files.<a href="/src/api/resources/files/client/Client.ts">getTaskOutputFilePresignedUrl</a>(taskId, fileId) -> BrowserUse.TaskOutputFileResponse</code></summary>
1053+
## Profiles
1054+
1055+
<details><summary><code>client.profiles.<a href="/src/api/resources/profiles/client/Client.ts">listProfiles</a>({ ...params }) -> BrowserUse.ProfileListResponse</code></summary>
10541056
<dl>
10551057
<dd>
10561058

@@ -1062,7 +1064,7 @@ await client.files.getTaskUserUploadedFilePresignedUrl("task_id", "file_id");
10621064
<dl>
10631065
<dd>
10641066

1065-
Get secure download URL for an output file generated by the AI agent.
1067+
Get paginated list of profiles.
10661068

10671069
</dd>
10681070
</dl>
@@ -1078,7 +1080,7 @@ Get secure download URL for an output file generated by the AI agent.
10781080
<dd>
10791081

10801082
```typescript
1081-
await client.files.getTaskOutputFilePresignedUrl("task_id", "file_id");
1083+
await client.profiles.listProfiles();
10821084
```
10831085

10841086
</dd>
@@ -1094,23 +1096,15 @@ await client.files.getTaskOutputFilePresignedUrl("task_id", "file_id");
10941096
<dl>
10951097
<dd>
10961098

1097-
**taskId:** `string`
1098-
1099-
</dd>
1100-
</dl>
1101-
1102-
<dl>
1103-
<dd>
1104-
1105-
**fileId:** `string`
1099+
**request:** `BrowserUse.ListProfilesProfilesGetRequest`
11061100

11071101
</dd>
11081102
</dl>
11091103

11101104
<dl>
11111105
<dd>
11121106

1113-
**requestOptions:** `Files.RequestOptions`
1107+
**requestOptions:** `Profiles.RequestOptions`
11141108

11151109
</dd>
11161110
</dl>
@@ -1121,9 +1115,7 @@ await client.files.getTaskOutputFilePresignedUrl("task_id", "file_id");
11211115
</dl>
11221116
</details>
11231117

1124-
## Profiles
1125-
1126-
<details><summary><code>client.profiles.<a href="/src/api/resources/profiles/client/Client.ts">listProfiles</a>({ ...params }) -> BrowserUse.ProfileListResponse</code></summary>
1118+
<details><summary><code>client.profiles.<a href="/src/api/resources/profiles/client/Client.ts">createProfile</a>() -> BrowserUse.ProfileView</code></summary>
11271119
<dl>
11281120
<dd>
11291121

@@ -1135,7 +1127,12 @@ await client.files.getTaskOutputFilePresignedUrl("task_id", "file_id");
11351127
<dl>
11361128
<dd>
11371129

1138-
Get paginated list of profiles.
1130+
Profiles allow you to preserve the state of the browser between tasks.
1131+
1132+
They are most commonly used to allow users to preserve the log-in state in the agent between tasks.
1133+
You'd normally create one profile per user and then use it for all their tasks.
1134+
1135+
You can create a new profile by calling this endpoint.
11391136

11401137
</dd>
11411138
</dl>
@@ -1151,7 +1148,7 @@ Get paginated list of profiles.
11511148
<dd>
11521149

11531150
```typescript
1154-
await client.profiles.listProfiles();
1151+
await client.profiles.createProfile();
11551152
```
11561153

11571154
</dd>
@@ -1167,14 +1164,6 @@ await client.profiles.listProfiles();
11671164
<dl>
11681165
<dd>
11691166

1170-
**request:** `BrowserUse.ListProfilesProfilesGetRequest`
1171-
1172-
</dd>
1173-
</dl>
1174-
1175-
<dl>
1176-
<dd>
1177-
11781167
**requestOptions:** `Profiles.RequestOptions`
11791168

11801169
</dd>
@@ -1186,7 +1175,7 @@ await client.profiles.listProfiles();
11861175
</dl>
11871176
</details>
11881177

1189-
<details><summary><code>client.profiles.<a href="/src/api/resources/profiles/client/Client.ts">createProfile</a>() -> BrowserUse.ProfileView</code></summary>
1178+
<details><summary><code>client.profiles.<a href="/src/api/resources/profiles/client/Client.ts">getProfile</a>(profileId) -> BrowserUse.ProfileView</code></summary>
11901179
<dl>
11911180
<dd>
11921181

@@ -1198,12 +1187,7 @@ await client.profiles.listProfiles();
11981187
<dl>
11991188
<dd>
12001189

1201-
Profiles allow you to preserve the state of the browser between tasks.
1202-
1203-
They are most commonly used to allow users to preserve the log-in state in the agent between tasks.
1204-
You'd normally create one profile per user and then use it for all their tasks.
1205-
1206-
You can create a new profile by calling this endpoint.
1190+
Get profile details.
12071191

12081192
</dd>
12091193
</dl>
@@ -1219,7 +1203,7 @@ You can create a new profile by calling this endpoint.
12191203
<dd>
12201204

12211205
```typescript
1222-
await client.profiles.createProfile();
1206+
await client.profiles.getProfile("profile_id");
12231207
```
12241208

12251209
</dd>
@@ -1235,6 +1219,14 @@ await client.profiles.createProfile();
12351219
<dl>
12361220
<dd>
12371221

1222+
**profileId:** `string`
1223+
1224+
</dd>
1225+
</dl>
1226+
1227+
<dl>
1228+
<dd>
1229+
12381230
**requestOptions:** `Profiles.RequestOptions`
12391231

12401232
</dd>
@@ -1246,7 +1238,7 @@ await client.profiles.createProfile();
12461238
</dl>
12471239
</details>
12481240

1249-
<details><summary><code>client.profiles.<a href="/src/api/resources/profiles/client/Client.ts">getProfile</a>(profileId) -> BrowserUse.ProfileView</code></summary>
1241+
<details><summary><code>client.profiles.<a href="/src/api/resources/profiles/client/Client.ts">deleteBrowserProfile</a>(profileId) -> void</code></summary>
12501242
<dl>
12511243
<dd>
12521244

@@ -1258,7 +1250,7 @@ await client.profiles.createProfile();
12581250
<dl>
12591251
<dd>
12601252

1261-
Get profile details.
1253+
Permanently delete a browser profile and its configuration.
12621254

12631255
</dd>
12641256
</dl>
@@ -1274,7 +1266,7 @@ Get profile details.
12741266
<dd>
12751267

12761268
```typescript
1277-
await client.profiles.getProfile("profile_id");
1269+
await client.profiles.deleteBrowserProfile("profile_id");
12781270
```
12791271

12801272
</dd>

src/Client.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@
22
* This file was auto-generated by Fern from our API Definition.
33
*/
44

5+
import * as environments from "./environments.js";
56
import * as core from "./core/index.js";
67
import { mergeHeaders } from "./core/headers.js";
7-
import { Account } from "./api/resources/account/client/Client.js";
8+
import { Accounts } from "./api/resources/accounts/client/Client.js";
89
import { Tasks } from "./api/resources/tasks/client/Client.js";
910
import { Sessions } from "./api/resources/sessions/client/Client.js";
1011
import { Files } from "./api/resources/files/client/Client.js";
1112
import { Profiles } from "./api/resources/profiles/client/Client.js";
1213

1314
export declare namespace BrowserUseClient {
1415
export interface Options {
15-
environment: core.Supplier<string>;
16+
environment: core.Supplier<environments.BrowserUseEnvironment | string>;
1617
/** Specify a custom URL to connect the client to. */
1718
baseUrl?: core.Supplier<string>;
1819
apiKey: core.Supplier<string>;
@@ -36,7 +37,7 @@ export declare namespace BrowserUseClient {
3637

3738
export class BrowserUseClient {
3839
protected readonly _options: BrowserUseClient.Options;
39-
protected _account: Account | undefined;
40+
protected _accounts: Accounts | undefined;
4041
protected _tasks: Tasks | undefined;
4142
protected _sessions: Sessions | undefined;
4243
protected _files: Files | undefined;
@@ -49,8 +50,7 @@ export class BrowserUseClient {
4950
{
5051
"X-Fern-Language": "JavaScript",
5152
"X-Fern-SDK-Name": "",
52-
"X-Fern-SDK-Version": "0.0.32",
53-
53+
"X-Fern-SDK-Version": "0.0.35",
5454
"X-Fern-Runtime": core.RUNTIME.type,
5555
"X-Fern-Runtime-Version": core.RUNTIME.version,
5656
},
@@ -59,8 +59,8 @@ export class BrowserUseClient {
5959
};
6060
}
6161

62-
public get account(): Account {
63-
return (this._account ??= new Account(this._options));
62+
public get accounts(): Accounts {
63+
return (this._accounts ??= new Accounts(this._options));
6464
}
6565

6666
public get tasks(): Tasks {

0 commit comments

Comments
 (0)