browser-use-sdk 2.0.7 → 2.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/dist/cjs/BaseClient.d.ts +2 -1
  2. package/dist/cjs/BaseClient.js +47 -0
  3. package/dist/cjs/Client.d.ts +22 -22
  4. package/dist/cjs/Client.js +10 -51
  5. package/dist/cjs/api/resources/billing/client/Client.d.ts +6 -6
  6. package/dist/cjs/api/resources/billing/client/Client.js +7 -6
  7. package/dist/cjs/api/resources/browsers/client/Client.d.ts +12 -12
  8. package/dist/cjs/api/resources/browsers/client/Client.js +10 -9
  9. package/dist/cjs/api/resources/browsers/client/requests/CreateBrowserSessionRequest.d.ts +4 -0
  10. package/dist/cjs/api/resources/files/client/Client.d.ts +10 -10
  11. package/dist/cjs/api/resources/files/client/Client.js +9 -8
  12. package/dist/cjs/api/resources/index.d.ts +0 -1
  13. package/dist/cjs/api/resources/index.js +0 -1
  14. package/dist/cjs/api/resources/profiles/client/Client.d.ts +14 -14
  15. package/dist/cjs/api/resources/profiles/client/Client.js +11 -10
  16. package/dist/cjs/api/resources/sessions/client/Client.d.ts +20 -20
  17. package/dist/cjs/api/resources/sessions/client/Client.js +14 -13
  18. package/dist/cjs/api/resources/sessions/client/requests/CreateSessionRequest.d.ts +4 -0
  19. package/dist/cjs/api/resources/tasks/client/Client.d.ts +14 -14
  20. package/dist/cjs/api/resources/tasks/client/Client.js +11 -10
  21. package/dist/cjs/api/resources/workflows/client/Client.d.ts +92 -35
  22. package/dist/cjs/api/resources/workflows/client/Client.js +241 -27
  23. package/dist/cjs/api/resources/workflows/client/requests/GetExecutionMediaWorkflowsExecutionsExecutionIdMediaGetRequest.d.ts +9 -0
  24. package/dist/cjs/api/resources/workflows/client/requests/GetExecutionMediaWorkflowsExecutionsExecutionIdMediaGetRequest.js +3 -0
  25. package/dist/cjs/api/resources/workflows/client/requests/GetExecutionStateWorkflowsExecutionsExecutionIdStateGetRequest.d.ts +9 -0
  26. package/dist/cjs/api/resources/workflows/client/requests/GetExecutionStateWorkflowsExecutionsExecutionIdStateGetRequest.js +3 -0
  27. package/dist/cjs/api/resources/workflows/client/requests/GetWorkflowGenerationStateWorkflowsWorkflowIdGenerationStateGetRequest.d.ts +9 -0
  28. package/dist/cjs/api/resources/workflows/client/requests/GetWorkflowGenerationStateWorkflowsWorkflowIdGenerationStateGetRequest.js +3 -0
  29. package/dist/cjs/api/resources/workflows/client/requests/WorkflowExecuteRequest.d.ts +0 -3
  30. package/dist/cjs/api/resources/workflows/client/requests/index.d.ts +3 -0
  31. package/dist/cjs/api/resources/workflows/index.d.ts +0 -1
  32. package/dist/cjs/api/resources/workflows/index.js +0 -1
  33. package/dist/cjs/api/types/SupportedLlMs.d.ts +2 -0
  34. package/dist/cjs/api/types/SupportedLlMs.js +2 -0
  35. package/dist/cjs/api/types/WorkflowExecutionMediaStepView.d.ts +13 -0
  36. package/dist/cjs/api/types/WorkflowExecutionMediaStepView.js +3 -0
  37. package/dist/cjs/api/types/WorkflowExecutionMediaView.d.ts +8 -0
  38. package/dist/cjs/api/types/WorkflowExecutionMediaView.js +3 -0
  39. package/dist/cjs/api/types/WorkflowExecutionStateView.d.ts +28 -0
  40. package/dist/cjs/api/types/WorkflowExecutionStateView.js +3 -0
  41. package/dist/cjs/api/types/WorkflowExecutionStepView.d.ts +29 -0
  42. package/dist/cjs/api/types/WorkflowExecutionStepView.js +3 -0
  43. package/dist/cjs/api/types/WorkflowGenerationStateView.d.ts +18 -0
  44. package/dist/cjs/api/types/WorkflowGenerationStateView.js +3 -0
  45. package/dist/cjs/api/types/WorkflowGenerationStepView.d.ts +19 -0
  46. package/dist/cjs/api/types/WorkflowGenerationStepView.js +3 -0
  47. package/dist/cjs/api/types/index.d.ts +6 -1
  48. package/dist/cjs/api/types/index.js +6 -1
  49. package/dist/cjs/version.d.ts +1 -1
  50. package/dist/cjs/version.js +1 -1
  51. package/dist/cjs/wrapper/api/BrowserUseTasks.d.ts +7 -7
  52. package/dist/cjs/wrapper/api/BrowserUseTasks.js +1 -1
  53. package/dist/cjs/wrapper/lib/webhooks.d.ts +2 -2
  54. package/dist/cjs/wrapper/lib/webhooks.js +3 -3
  55. package/dist/esm/BaseClient.d.mts +2 -1
  56. package/dist/esm/BaseClient.mjs +13 -1
  57. package/dist/esm/Client.d.mts +22 -22
  58. package/dist/esm/Client.mjs +17 -25
  59. package/dist/esm/api/resources/billing/client/Client.d.mts +6 -6
  60. package/dist/esm/api/resources/billing/client/Client.mjs +5 -4
  61. package/dist/esm/api/resources/browsers/client/Client.d.mts +12 -12
  62. package/dist/esm/api/resources/browsers/client/Client.mjs +8 -7
  63. package/dist/esm/api/resources/browsers/client/requests/CreateBrowserSessionRequest.d.mts +4 -0
  64. package/dist/esm/api/resources/files/client/Client.d.mts +10 -10
  65. package/dist/esm/api/resources/files/client/Client.mjs +7 -6
  66. package/dist/esm/api/resources/index.d.mts +0 -1
  67. package/dist/esm/api/resources/index.mjs +0 -1
  68. package/dist/esm/api/resources/profiles/client/Client.d.mts +14 -14
  69. package/dist/esm/api/resources/profiles/client/Client.mjs +9 -8
  70. package/dist/esm/api/resources/sessions/client/Client.d.mts +20 -20
  71. package/dist/esm/api/resources/sessions/client/Client.mjs +12 -11
  72. package/dist/esm/api/resources/sessions/client/requests/CreateSessionRequest.d.mts +4 -0
  73. package/dist/esm/api/resources/tasks/client/Client.d.mts +14 -14
  74. package/dist/esm/api/resources/tasks/client/Client.mjs +9 -8
  75. package/dist/esm/api/resources/workflows/client/Client.d.mts +92 -35
  76. package/dist/esm/api/resources/workflows/client/Client.mjs +239 -25
  77. package/dist/esm/api/resources/workflows/client/requests/GetExecutionMediaWorkflowsExecutionsExecutionIdMediaGetRequest.d.mts +9 -0
  78. package/dist/esm/api/resources/workflows/client/requests/GetExecutionMediaWorkflowsExecutionsExecutionIdMediaGetRequest.mjs +2 -0
  79. package/dist/esm/api/resources/workflows/client/requests/GetExecutionStateWorkflowsExecutionsExecutionIdStateGetRequest.d.mts +9 -0
  80. package/dist/esm/api/resources/workflows/client/requests/GetExecutionStateWorkflowsExecutionsExecutionIdStateGetRequest.mjs +2 -0
  81. package/dist/esm/api/resources/workflows/client/requests/GetWorkflowGenerationStateWorkflowsWorkflowIdGenerationStateGetRequest.d.mts +9 -0
  82. package/dist/esm/api/resources/workflows/client/requests/GetWorkflowGenerationStateWorkflowsWorkflowIdGenerationStateGetRequest.mjs +2 -0
  83. package/dist/esm/api/resources/workflows/client/requests/WorkflowExecuteRequest.d.mts +0 -3
  84. package/dist/esm/api/resources/workflows/client/requests/index.d.mts +3 -0
  85. package/dist/esm/api/resources/workflows/index.d.mts +0 -1
  86. package/dist/esm/api/resources/workflows/index.mjs +0 -1
  87. package/dist/esm/api/types/SupportedLlMs.d.mts +2 -0
  88. package/dist/esm/api/types/SupportedLlMs.mjs +2 -0
  89. package/dist/esm/api/types/WorkflowExecutionMediaStepView.d.mts +13 -0
  90. package/dist/esm/api/types/WorkflowExecutionMediaStepView.mjs +2 -0
  91. package/dist/esm/api/types/WorkflowExecutionMediaView.d.mts +8 -0
  92. package/dist/esm/api/types/WorkflowExecutionMediaView.mjs +2 -0
  93. package/dist/esm/api/types/WorkflowExecutionStateView.d.mts +28 -0
  94. package/dist/esm/api/types/WorkflowExecutionStateView.mjs +2 -0
  95. package/dist/esm/api/types/WorkflowExecutionStepView.d.mts +29 -0
  96. package/dist/esm/api/types/WorkflowExecutionStepView.mjs +2 -0
  97. package/dist/esm/api/types/WorkflowGenerationStateView.d.mts +18 -0
  98. package/dist/esm/api/types/WorkflowGenerationStateView.mjs +2 -0
  99. package/dist/esm/api/types/WorkflowGenerationStepView.d.mts +19 -0
  100. package/dist/esm/api/types/WorkflowGenerationStepView.mjs +2 -0
  101. package/dist/esm/api/types/index.d.mts +6 -1
  102. package/dist/esm/api/types/index.mjs +6 -1
  103. package/dist/esm/version.d.mts +1 -1
  104. package/dist/esm/version.mjs +1 -1
  105. package/dist/esm/wrapper/api/BrowserUseTasks.d.mts +7 -7
  106. package/dist/esm/wrapper/api/BrowserUseTasks.mjs +2 -2
  107. package/dist/esm/wrapper/lib/webhooks.d.mts +2 -2
  108. package/dist/esm/wrapper/lib/webhooks.mjs +3 -3
  109. package/package.json +82 -83
  110. package/reference.md +251 -44
@@ -1,27 +1,27 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
2
  import * as core from "../../../../core/index.js";
3
3
  import * as BrowserUse from "../../../index.js";
4
- export declare namespace Profiles {
4
+ export declare namespace ProfilesClient {
5
5
  interface Options extends BaseClientOptions {
6
6
  }
7
7
  interface RequestOptions extends BaseRequestOptions {
8
8
  }
9
9
  }
10
- export declare class Profiles {
11
- protected readonly _options: Profiles.Options;
12
- constructor(_options: Profiles.Options);
10
+ export declare class ProfilesClient {
11
+ protected readonly _options: ProfilesClient.Options;
12
+ constructor(options: ProfilesClient.Options);
13
13
  /**
14
14
  * Get paginated list of profiles.
15
15
  *
16
16
  * @param {BrowserUse.ListProfilesProfilesGetRequest} request
17
- * @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
17
+ * @param {ProfilesClient.RequestOptions} requestOptions - Request-specific configuration.
18
18
  *
19
19
  * @throws {@link BrowserUse.UnprocessableEntityError}
20
20
  *
21
21
  * @example
22
22
  * await client.profiles.listProfiles()
23
23
  */
24
- listProfiles(request?: BrowserUse.ListProfilesProfilesGetRequest, requestOptions?: Profiles.RequestOptions): core.HttpResponsePromise<BrowserUse.ProfileListResponse>;
24
+ listProfiles(request?: BrowserUse.ListProfilesProfilesGetRequest, requestOptions?: ProfilesClient.RequestOptions): core.HttpResponsePromise<BrowserUse.ProfileListResponse>;
25
25
  private __listProfiles;
26
26
  /**
27
27
  * Profiles allow you to preserve the state of the browser between tasks.
@@ -32,7 +32,7 @@ export declare class Profiles {
32
32
  * You can create a new profile by calling this endpoint.
33
33
  *
34
34
  * @param {BrowserUse.ProfileCreateRequest} request
35
- * @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
35
+ * @param {ProfilesClient.RequestOptions} requestOptions - Request-specific configuration.
36
36
  *
37
37
  * @throws {@link BrowserUse.PaymentRequiredError}
38
38
  * @throws {@link BrowserUse.UnprocessableEntityError}
@@ -40,13 +40,13 @@ export declare class Profiles {
40
40
  * @example
41
41
  * await client.profiles.createProfile()
42
42
  */
43
- createProfile(request?: BrowserUse.ProfileCreateRequest, requestOptions?: Profiles.RequestOptions): core.HttpResponsePromise<BrowserUse.ProfileView>;
43
+ createProfile(request?: BrowserUse.ProfileCreateRequest, requestOptions?: ProfilesClient.RequestOptions): core.HttpResponsePromise<BrowserUse.ProfileView>;
44
44
  private __createProfile;
45
45
  /**
46
46
  * Get profile details.
47
47
  *
48
48
  * @param {BrowserUse.GetProfileProfilesProfileIdGetRequest} request
49
- * @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
49
+ * @param {ProfilesClient.RequestOptions} requestOptions - Request-specific configuration.
50
50
  *
51
51
  * @throws {@link BrowserUse.NotFoundError}
52
52
  * @throws {@link BrowserUse.UnprocessableEntityError}
@@ -56,13 +56,13 @@ export declare class Profiles {
56
56
  * profile_id: "profile_id"
57
57
  * })
58
58
  */
59
- getProfile(request: BrowserUse.GetProfileProfilesProfileIdGetRequest, requestOptions?: Profiles.RequestOptions): core.HttpResponsePromise<BrowserUse.ProfileView>;
59
+ getProfile(request: BrowserUse.GetProfileProfilesProfileIdGetRequest, requestOptions?: ProfilesClient.RequestOptions): core.HttpResponsePromise<BrowserUse.ProfileView>;
60
60
  private __getProfile;
61
61
  /**
62
62
  * Permanently delete a browser profile and its configuration.
63
63
  *
64
64
  * @param {BrowserUse.DeleteBrowserProfileProfilesProfileIdDeleteRequest} request
65
- * @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
65
+ * @param {ProfilesClient.RequestOptions} requestOptions - Request-specific configuration.
66
66
  *
67
67
  * @throws {@link BrowserUse.UnprocessableEntityError}
68
68
  *
@@ -71,13 +71,13 @@ export declare class Profiles {
71
71
  * profile_id: "profile_id"
72
72
  * })
73
73
  */
74
- deleteBrowserProfile(request: BrowserUse.DeleteBrowserProfileProfilesProfileIdDeleteRequest, requestOptions?: Profiles.RequestOptions): core.HttpResponsePromise<void>;
74
+ deleteBrowserProfile(request: BrowserUse.DeleteBrowserProfileProfilesProfileIdDeleteRequest, requestOptions?: ProfilesClient.RequestOptions): core.HttpResponsePromise<void>;
75
75
  private __deleteBrowserProfile;
76
76
  /**
77
77
  * Update a browser profile's information.
78
78
  *
79
79
  * @param {BrowserUse.ProfileUpdateRequest} request
80
- * @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
80
+ * @param {ProfilesClient.RequestOptions} requestOptions - Request-specific configuration.
81
81
  *
82
82
  * @throws {@link BrowserUse.NotFoundError}
83
83
  * @throws {@link BrowserUse.UnprocessableEntityError}
@@ -87,7 +87,7 @@ export declare class Profiles {
87
87
  * profile_id: "profile_id"
88
88
  * })
89
89
  */
90
- updateProfile(request: BrowserUse.ProfileUpdateRequest, requestOptions?: Profiles.RequestOptions): core.HttpResponsePromise<BrowserUse.ProfileView>;
90
+ updateProfile(request: BrowserUse.ProfileUpdateRequest, requestOptions?: ProfilesClient.RequestOptions): core.HttpResponsePromise<BrowserUse.ProfileView>;
91
91
  private __updateProfile;
92
92
  protected _getCustomAuthorizationHeaders(): Promise<Record<string, string | undefined>>;
93
93
  }
@@ -54,21 +54,22 @@ var __rest = (this && this.__rest) || function (s, e) {
54
54
  return t;
55
55
  };
56
56
  Object.defineProperty(exports, "__esModule", { value: true });
57
- exports.Profiles = void 0;
57
+ exports.ProfilesClient = void 0;
58
+ const BaseClient_js_1 = require("../../../../BaseClient.js");
58
59
  const headers_js_1 = require("../../../../core/headers.js");
59
60
  const core = __importStar(require("../../../../core/index.js"));
60
61
  const environments = __importStar(require("../../../../environments.js"));
61
62
  const errors = __importStar(require("../../../../errors/index.js"));
62
63
  const BrowserUse = __importStar(require("../../../index.js"));
63
- class Profiles {
64
- constructor(_options) {
65
- this._options = _options;
64
+ class ProfilesClient {
65
+ constructor(options) {
66
+ this._options = (0, BaseClient_js_1.normalizeClientOptions)(options);
66
67
  }
67
68
  /**
68
69
  * Get paginated list of profiles.
69
70
  *
70
71
  * @param {BrowserUse.ListProfilesProfilesGetRequest} request
71
- * @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
72
+ * @param {ProfilesClient.RequestOptions} requestOptions - Request-specific configuration.
72
73
  *
73
74
  * @throws {@link BrowserUse.UnprocessableEntityError}
74
75
  *
@@ -142,7 +143,7 @@ class Profiles {
142
143
  * You can create a new profile by calling this endpoint.
143
144
  *
144
145
  * @param {BrowserUse.ProfileCreateRequest} request
145
- * @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
146
+ * @param {ProfilesClient.RequestOptions} requestOptions - Request-specific configuration.
146
147
  *
147
148
  * @throws {@link BrowserUse.PaymentRequiredError}
148
149
  * @throws {@link BrowserUse.UnprocessableEntityError}
@@ -209,7 +210,7 @@ class Profiles {
209
210
  * Get profile details.
210
211
  *
211
212
  * @param {BrowserUse.GetProfileProfilesProfileIdGetRequest} request
212
- * @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
213
+ * @param {ProfilesClient.RequestOptions} requestOptions - Request-specific configuration.
213
214
  *
214
215
  * @throws {@link BrowserUse.NotFoundError}
215
216
  * @throws {@link BrowserUse.UnprocessableEntityError}
@@ -276,7 +277,7 @@ class Profiles {
276
277
  * Permanently delete a browser profile and its configuration.
277
278
  *
278
279
  * @param {BrowserUse.DeleteBrowserProfileProfilesProfileIdDeleteRequest} request
279
- * @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
280
+ * @param {ProfilesClient.RequestOptions} requestOptions - Request-specific configuration.
280
281
  *
281
282
  * @throws {@link BrowserUse.UnprocessableEntityError}
282
283
  *
@@ -340,7 +341,7 @@ class Profiles {
340
341
  * Update a browser profile's information.
341
342
  *
342
343
  * @param {BrowserUse.ProfileUpdateRequest} request
343
- * @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
344
+ * @param {ProfilesClient.RequestOptions} requestOptions - Request-specific configuration.
344
345
  *
345
346
  * @throws {@link BrowserUse.NotFoundError}
346
347
  * @throws {@link BrowserUse.UnprocessableEntityError}
@@ -413,4 +414,4 @@ class Profiles {
413
414
  });
414
415
  }
415
416
  }
416
- exports.Profiles = Profiles;
417
+ exports.ProfilesClient = ProfilesClient;
@@ -1,33 +1,33 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
2
  import * as core from "../../../../core/index.js";
3
3
  import * as BrowserUse from "../../../index.js";
4
- export declare namespace Sessions {
4
+ export declare namespace SessionsClient {
5
5
  interface Options extends BaseClientOptions {
6
6
  }
7
7
  interface RequestOptions extends BaseRequestOptions {
8
8
  }
9
9
  }
10
- export declare class Sessions {
11
- protected readonly _options: Sessions.Options;
12
- constructor(_options: Sessions.Options);
10
+ export declare class SessionsClient {
11
+ protected readonly _options: SessionsClient.Options;
12
+ constructor(options: SessionsClient.Options);
13
13
  /**
14
14
  * Get paginated list of AI agent sessions with optional status filtering.
15
15
  *
16
16
  * @param {BrowserUse.ListSessionsSessionsGetRequest} request
17
- * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
17
+ * @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration.
18
18
  *
19
19
  * @throws {@link BrowserUse.UnprocessableEntityError}
20
20
  *
21
21
  * @example
22
22
  * await client.sessions.listSessions()
23
23
  */
24
- listSessions(request?: BrowserUse.ListSessionsSessionsGetRequest, requestOptions?: Sessions.RequestOptions): core.HttpResponsePromise<BrowserUse.SessionListResponse>;
24
+ listSessions(request?: BrowserUse.ListSessionsSessionsGetRequest, requestOptions?: SessionsClient.RequestOptions): core.HttpResponsePromise<BrowserUse.SessionListResponse>;
25
25
  private __listSessions;
26
26
  /**
27
27
  * Create a new session with a new task.
28
28
  *
29
29
  * @param {BrowserUse.CreateSessionRequest} request
30
- * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
30
+ * @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration.
31
31
  *
32
32
  * @throws {@link BrowserUse.NotFoundError}
33
33
  * @throws {@link BrowserUse.UnprocessableEntityError}
@@ -36,13 +36,13 @@ export declare class Sessions {
36
36
  * @example
37
37
  * await client.sessions.createSession()
38
38
  */
39
- createSession(request?: BrowserUse.CreateSessionRequest, requestOptions?: Sessions.RequestOptions): core.HttpResponsePromise<BrowserUse.SessionItemView>;
39
+ createSession(request?: BrowserUse.CreateSessionRequest, requestOptions?: SessionsClient.RequestOptions): core.HttpResponsePromise<BrowserUse.SessionItemView>;
40
40
  private __createSession;
41
41
  /**
42
42
  * Get detailed session information including status, URLs, and task details.
43
43
  *
44
44
  * @param {BrowserUse.GetSessionSessionsSessionIdGetRequest} request
45
- * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
45
+ * @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration.
46
46
  *
47
47
  * @throws {@link BrowserUse.NotFoundError}
48
48
  * @throws {@link BrowserUse.UnprocessableEntityError}
@@ -52,13 +52,13 @@ export declare class Sessions {
52
52
  * session_id: "session_id"
53
53
  * })
54
54
  */
55
- getSession(request: BrowserUse.GetSessionSessionsSessionIdGetRequest, requestOptions?: Sessions.RequestOptions): core.HttpResponsePromise<BrowserUse.SessionView>;
55
+ getSession(request: BrowserUse.GetSessionSessionsSessionIdGetRequest, requestOptions?: SessionsClient.RequestOptions): core.HttpResponsePromise<BrowserUse.SessionView>;
56
56
  private __getSession;
57
57
  /**
58
58
  * Delete a session with all its tasks.
59
59
  *
60
60
  * @param {BrowserUse.DeleteSessionSessionsSessionIdDeleteRequest} request
61
- * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
61
+ * @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration.
62
62
  *
63
63
  * @throws {@link BrowserUse.NotFoundError}
64
64
  * @throws {@link BrowserUse.UnprocessableEntityError}
@@ -68,13 +68,13 @@ export declare class Sessions {
68
68
  * session_id: "session_id"
69
69
  * })
70
70
  */
71
- deleteSession(request: BrowserUse.DeleteSessionSessionsSessionIdDeleteRequest, requestOptions?: Sessions.RequestOptions): core.HttpResponsePromise<void>;
71
+ deleteSession(request: BrowserUse.DeleteSessionSessionsSessionIdDeleteRequest, requestOptions?: SessionsClient.RequestOptions): core.HttpResponsePromise<void>;
72
72
  private __deleteSession;
73
73
  /**
74
74
  * Stop a session and all its running tasks.
75
75
  *
76
76
  * @param {BrowserUse.UpdateSessionRequest} request
77
- * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
77
+ * @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration.
78
78
  *
79
79
  * @throws {@link BrowserUse.NotFoundError}
80
80
  * @throws {@link BrowserUse.UnprocessableEntityError}
@@ -84,13 +84,13 @@ export declare class Sessions {
84
84
  * session_id: "session_id"
85
85
  * })
86
86
  */
87
- updateSession(request: BrowserUse.UpdateSessionRequest, requestOptions?: Sessions.RequestOptions): core.HttpResponsePromise<BrowserUse.SessionView>;
87
+ updateSession(request: BrowserUse.UpdateSessionRequest, requestOptions?: SessionsClient.RequestOptions): core.HttpResponsePromise<BrowserUse.SessionView>;
88
88
  private __updateSession;
89
89
  /**
90
90
  * Get public share information including URL and usage statistics.
91
91
  *
92
92
  * @param {BrowserUse.GetSessionPublicShareSessionsSessionIdPublicShareGetRequest} request
93
- * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
93
+ * @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration.
94
94
  *
95
95
  * @throws {@link BrowserUse.NotFoundError}
96
96
  * @throws {@link BrowserUse.UnprocessableEntityError}
@@ -100,13 +100,13 @@ export declare class Sessions {
100
100
  * session_id: "session_id"
101
101
  * })
102
102
  */
103
- getSessionPublicShare(request: BrowserUse.GetSessionPublicShareSessionsSessionIdPublicShareGetRequest, requestOptions?: Sessions.RequestOptions): core.HttpResponsePromise<BrowserUse.ShareView>;
103
+ getSessionPublicShare(request: BrowserUse.GetSessionPublicShareSessionsSessionIdPublicShareGetRequest, requestOptions?: SessionsClient.RequestOptions): core.HttpResponsePromise<BrowserUse.ShareView>;
104
104
  private __getSessionPublicShare;
105
105
  /**
106
106
  * Create or return existing public share for a session.
107
107
  *
108
108
  * @param {BrowserUse.CreateSessionPublicShareSessionsSessionIdPublicSharePostRequest} request
109
- * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
109
+ * @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration.
110
110
  *
111
111
  * @throws {@link BrowserUse.NotFoundError}
112
112
  * @throws {@link BrowserUse.UnprocessableEntityError}
@@ -116,13 +116,13 @@ export declare class Sessions {
116
116
  * session_id: "session_id"
117
117
  * })
118
118
  */
119
- createSessionPublicShare(request: BrowserUse.CreateSessionPublicShareSessionsSessionIdPublicSharePostRequest, requestOptions?: Sessions.RequestOptions): core.HttpResponsePromise<BrowserUse.ShareView>;
119
+ createSessionPublicShare(request: BrowserUse.CreateSessionPublicShareSessionsSessionIdPublicSharePostRequest, requestOptions?: SessionsClient.RequestOptions): core.HttpResponsePromise<BrowserUse.ShareView>;
120
120
  private __createSessionPublicShare;
121
121
  /**
122
122
  * Remove public share for a session.
123
123
  *
124
124
  * @param {BrowserUse.DeleteSessionPublicShareSessionsSessionIdPublicShareDeleteRequest} request
125
- * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
125
+ * @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration.
126
126
  *
127
127
  * @throws {@link BrowserUse.NotFoundError}
128
128
  * @throws {@link BrowserUse.UnprocessableEntityError}
@@ -132,7 +132,7 @@ export declare class Sessions {
132
132
  * session_id: "session_id"
133
133
  * })
134
134
  */
135
- deleteSessionPublicShare(request: BrowserUse.DeleteSessionPublicShareSessionsSessionIdPublicShareDeleteRequest, requestOptions?: Sessions.RequestOptions): core.HttpResponsePromise<void>;
135
+ deleteSessionPublicShare(request: BrowserUse.DeleteSessionPublicShareSessionsSessionIdPublicShareDeleteRequest, requestOptions?: SessionsClient.RequestOptions): core.HttpResponsePromise<void>;
136
136
  private __deleteSessionPublicShare;
137
137
  protected _getCustomAuthorizationHeaders(): Promise<Record<string, string | undefined>>;
138
138
  }
@@ -54,21 +54,22 @@ var __rest = (this && this.__rest) || function (s, e) {
54
54
  return t;
55
55
  };
56
56
  Object.defineProperty(exports, "__esModule", { value: true });
57
- exports.Sessions = void 0;
57
+ exports.SessionsClient = void 0;
58
+ const BaseClient_js_1 = require("../../../../BaseClient.js");
58
59
  const headers_js_1 = require("../../../../core/headers.js");
59
60
  const core = __importStar(require("../../../../core/index.js"));
60
61
  const environments = __importStar(require("../../../../environments.js"));
61
62
  const errors = __importStar(require("../../../../errors/index.js"));
62
63
  const BrowserUse = __importStar(require("../../../index.js"));
63
- class Sessions {
64
- constructor(_options) {
65
- this._options = _options;
64
+ class SessionsClient {
65
+ constructor(options) {
66
+ this._options = (0, BaseClient_js_1.normalizeClientOptions)(options);
66
67
  }
67
68
  /**
68
69
  * Get paginated list of AI agent sessions with optional status filtering.
69
70
  *
70
71
  * @param {BrowserUse.ListSessionsSessionsGetRequest} request
71
- * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
72
+ * @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration.
72
73
  *
73
74
  * @throws {@link BrowserUse.UnprocessableEntityError}
74
75
  *
@@ -140,7 +141,7 @@ class Sessions {
140
141
  * Create a new session with a new task.
141
142
  *
142
143
  * @param {BrowserUse.CreateSessionRequest} request
143
- * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
144
+ * @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration.
144
145
  *
145
146
  * @throws {@link BrowserUse.NotFoundError}
146
147
  * @throws {@link BrowserUse.UnprocessableEntityError}
@@ -210,7 +211,7 @@ class Sessions {
210
211
  * Get detailed session information including status, URLs, and task details.
211
212
  *
212
213
  * @param {BrowserUse.GetSessionSessionsSessionIdGetRequest} request
213
- * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
214
+ * @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration.
214
215
  *
215
216
  * @throws {@link BrowserUse.NotFoundError}
216
217
  * @throws {@link BrowserUse.UnprocessableEntityError}
@@ -277,7 +278,7 @@ class Sessions {
277
278
  * Delete a session with all its tasks.
278
279
  *
279
280
  * @param {BrowserUse.DeleteSessionSessionsSessionIdDeleteRequest} request
280
- * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
281
+ * @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration.
281
282
  *
282
283
  * @throws {@link BrowserUse.NotFoundError}
283
284
  * @throws {@link BrowserUse.UnprocessableEntityError}
@@ -344,7 +345,7 @@ class Sessions {
344
345
  * Stop a session and all its running tasks.
345
346
  *
346
347
  * @param {BrowserUse.UpdateSessionRequest} request
347
- * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
348
+ * @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration.
348
349
  *
349
350
  * @throws {@link BrowserUse.NotFoundError}
350
351
  * @throws {@link BrowserUse.UnprocessableEntityError}
@@ -414,7 +415,7 @@ class Sessions {
414
415
  * Get public share information including URL and usage statistics.
415
416
  *
416
417
  * @param {BrowserUse.GetSessionPublicShareSessionsSessionIdPublicShareGetRequest} request
417
- * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
418
+ * @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration.
418
419
  *
419
420
  * @throws {@link BrowserUse.NotFoundError}
420
421
  * @throws {@link BrowserUse.UnprocessableEntityError}
@@ -481,7 +482,7 @@ class Sessions {
481
482
  * Create or return existing public share for a session.
482
483
  *
483
484
  * @param {BrowserUse.CreateSessionPublicShareSessionsSessionIdPublicSharePostRequest} request
484
- * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
485
+ * @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration.
485
486
  *
486
487
  * @throws {@link BrowserUse.NotFoundError}
487
488
  * @throws {@link BrowserUse.UnprocessableEntityError}
@@ -548,7 +549,7 @@ class Sessions {
548
549
  * Remove public share for a session.
549
550
  *
550
551
  * @param {BrowserUse.DeleteSessionPublicShareSessionsSessionIdPublicShareDeleteRequest} request
551
- * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
552
+ * @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration.
552
553
  *
553
554
  * @throws {@link BrowserUse.NotFoundError}
554
555
  * @throws {@link BrowserUse.UnprocessableEntityError}
@@ -618,4 +619,4 @@ class Sessions {
618
619
  });
619
620
  }
620
621
  }
621
- exports.Sessions = Sessions;
622
+ exports.SessionsClient = SessionsClient;
@@ -10,4 +10,8 @@ export interface CreateSessionRequest {
10
10
  proxyCountryCode?: BrowserUse.ProxyCountryCode | null;
11
11
  /** URL to navigate to when the session starts. */
12
12
  startUrl?: string | null;
13
+ /** Custom screen width in pixels for the browser. */
14
+ browserScreenWidth?: number | null;
15
+ /** Custom screen height in pixels for the browser. */
16
+ browserScreenHeight?: number | null;
13
17
  }
@@ -1,27 +1,27 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
2
  import * as core from "../../../../core/index.js";
3
3
  import * as BrowserUse from "../../../index.js";
4
- export declare namespace Tasks {
4
+ export declare namespace TasksClient {
5
5
  interface Options extends BaseClientOptions {
6
6
  }
7
7
  interface RequestOptions extends BaseRequestOptions {
8
8
  }
9
9
  }
10
- export declare class Tasks {
11
- protected readonly _options: Tasks.Options;
12
- constructor(_options: Tasks.Options);
10
+ export declare class TasksClient {
11
+ protected readonly _options: TasksClient.Options;
12
+ constructor(options: TasksClient.Options);
13
13
  /**
14
14
  * Get paginated list of AI agent tasks with optional filtering by session and status.
15
15
  *
16
16
  * @param {BrowserUse.ListTasksTasksGetRequest} request
17
- * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
17
+ * @param {TasksClient.RequestOptions} requestOptions - Request-specific configuration.
18
18
  *
19
19
  * @throws {@link BrowserUse.UnprocessableEntityError}
20
20
  *
21
21
  * @example
22
22
  * await client.tasks.listTasks()
23
23
  */
24
- listTasks(request?: BrowserUse.ListTasksTasksGetRequest, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<BrowserUse.TaskListResponse>;
24
+ listTasks(request?: BrowserUse.ListTasksTasksGetRequest, requestOptions?: TasksClient.RequestOptions): core.HttpResponsePromise<BrowserUse.TaskListResponse>;
25
25
  private __listTasks;
26
26
  /**
27
27
  * You can either:
@@ -29,7 +29,7 @@ export declare class Tasks {
29
29
  * 2. Start a new task in an existing session (you can create a custom session before starting the task and reuse it for follow-up tasks)
30
30
  *
31
31
  * @param {BrowserUse.CreateTaskRequest} request
32
- * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
32
+ * @param {TasksClient.RequestOptions} requestOptions - Request-specific configuration.
33
33
  *
34
34
  * @throws {@link BrowserUse.BadRequestError}
35
35
  * @throws {@link BrowserUse.NotFoundError}
@@ -41,13 +41,13 @@ export declare class Tasks {
41
41
  * task: "task"
42
42
  * })
43
43
  */
44
- createTask(request: BrowserUse.CreateTaskRequest, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<BrowserUse.TaskCreatedResponse>;
44
+ createTask(request: BrowserUse.CreateTaskRequest, requestOptions?: TasksClient.RequestOptions): core.HttpResponsePromise<BrowserUse.TaskCreatedResponse>;
45
45
  private __createTask;
46
46
  /**
47
47
  * Get detailed task information including status, progress, steps, and file outputs.
48
48
  *
49
49
  * @param {BrowserUse.GetTaskTasksTaskIdGetRequest} request
50
- * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
50
+ * @param {TasksClient.RequestOptions} requestOptions - Request-specific configuration.
51
51
  *
52
52
  * @throws {@link BrowserUse.NotFoundError}
53
53
  * @throws {@link BrowserUse.UnprocessableEntityError}
@@ -57,13 +57,13 @@ export declare class Tasks {
57
57
  * task_id: "task_id"
58
58
  * })
59
59
  */
60
- getTask(request: BrowserUse.GetTaskTasksTaskIdGetRequest, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<BrowserUse.TaskView>;
60
+ getTask(request: BrowserUse.GetTaskTasksTaskIdGetRequest, requestOptions?: TasksClient.RequestOptions): core.HttpResponsePromise<BrowserUse.TaskView>;
61
61
  private __getTask;
62
62
  /**
63
63
  * Control task execution with stop, pause, resume, or stop task and session actions.
64
64
  *
65
65
  * @param {BrowserUse.UpdateTaskRequest} request
66
- * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
66
+ * @param {TasksClient.RequestOptions} requestOptions - Request-specific configuration.
67
67
  *
68
68
  * @throws {@link BrowserUse.NotFoundError}
69
69
  * @throws {@link BrowserUse.UnprocessableEntityError}
@@ -74,13 +74,13 @@ export declare class Tasks {
74
74
  * action: "stop"
75
75
  * })
76
76
  */
77
- updateTask(request: BrowserUse.UpdateTaskRequest, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<BrowserUse.TaskView>;
77
+ updateTask(request: BrowserUse.UpdateTaskRequest, requestOptions?: TasksClient.RequestOptions): core.HttpResponsePromise<BrowserUse.TaskView>;
78
78
  private __updateTask;
79
79
  /**
80
80
  * Get secure download URL for task execution logs with step-by-step details.
81
81
  *
82
82
  * @param {BrowserUse.GetTaskLogsTasksTaskIdLogsGetRequest} request
83
- * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
83
+ * @param {TasksClient.RequestOptions} requestOptions - Request-specific configuration.
84
84
  *
85
85
  * @throws {@link BrowserUse.NotFoundError}
86
86
  * @throws {@link BrowserUse.UnprocessableEntityError}
@@ -91,7 +91,7 @@ export declare class Tasks {
91
91
  * task_id: "task_id"
92
92
  * })
93
93
  */
94
- getTaskLogs(request: BrowserUse.GetTaskLogsTasksTaskIdLogsGetRequest, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<BrowserUse.TaskLogFileResponse>;
94
+ getTaskLogs(request: BrowserUse.GetTaskLogsTasksTaskIdLogsGetRequest, requestOptions?: TasksClient.RequestOptions): core.HttpResponsePromise<BrowserUse.TaskLogFileResponse>;
95
95
  private __getTaskLogs;
96
96
  protected _getCustomAuthorizationHeaders(): Promise<Record<string, string | undefined>>;
97
97
  }
@@ -54,21 +54,22 @@ var __rest = (this && this.__rest) || function (s, e) {
54
54
  return t;
55
55
  };
56
56
  Object.defineProperty(exports, "__esModule", { value: true });
57
- exports.Tasks = void 0;
57
+ exports.TasksClient = void 0;
58
+ const BaseClient_js_1 = require("../../../../BaseClient.js");
58
59
  const headers_js_1 = require("../../../../core/headers.js");
59
60
  const core = __importStar(require("../../../../core/index.js"));
60
61
  const environments = __importStar(require("../../../../environments.js"));
61
62
  const errors = __importStar(require("../../../../errors/index.js"));
62
63
  const BrowserUse = __importStar(require("../../../index.js"));
63
- class Tasks {
64
- constructor(_options) {
65
- this._options = _options;
64
+ class TasksClient {
65
+ constructor(options) {
66
+ this._options = (0, BaseClient_js_1.normalizeClientOptions)(options);
66
67
  }
67
68
  /**
68
69
  * Get paginated list of AI agent tasks with optional filtering by session and status.
69
70
  *
70
71
  * @param {BrowserUse.ListTasksTasksGetRequest} request
71
- * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
72
+ * @param {TasksClient.RequestOptions} requestOptions - Request-specific configuration.
72
73
  *
73
74
  * @throws {@link BrowserUse.UnprocessableEntityError}
74
75
  *
@@ -151,7 +152,7 @@ class Tasks {
151
152
  * 2. Start a new task in an existing session (you can create a custom session before starting the task and reuse it for follow-up tasks)
152
153
  *
153
154
  * @param {BrowserUse.CreateTaskRequest} request
154
- * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
155
+ * @param {TasksClient.RequestOptions} requestOptions - Request-specific configuration.
155
156
  *
156
157
  * @throws {@link BrowserUse.BadRequestError}
157
158
  * @throws {@link BrowserUse.NotFoundError}
@@ -226,7 +227,7 @@ class Tasks {
226
227
  * Get detailed task information including status, progress, steps, and file outputs.
227
228
  *
228
229
  * @param {BrowserUse.GetTaskTasksTaskIdGetRequest} request
229
- * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
230
+ * @param {TasksClient.RequestOptions} requestOptions - Request-specific configuration.
230
231
  *
231
232
  * @throws {@link BrowserUse.NotFoundError}
232
233
  * @throws {@link BrowserUse.UnprocessableEntityError}
@@ -293,7 +294,7 @@ class Tasks {
293
294
  * Control task execution with stop, pause, resume, or stop task and session actions.
294
295
  *
295
296
  * @param {BrowserUse.UpdateTaskRequest} request
296
- * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
297
+ * @param {TasksClient.RequestOptions} requestOptions - Request-specific configuration.
297
298
  *
298
299
  * @throws {@link BrowserUse.NotFoundError}
299
300
  * @throws {@link BrowserUse.UnprocessableEntityError}
@@ -364,7 +365,7 @@ class Tasks {
364
365
  * Get secure download URL for task execution logs with step-by-step details.
365
366
  *
366
367
  * @param {BrowserUse.GetTaskLogsTasksTaskIdLogsGetRequest} request
367
- * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
368
+ * @param {TasksClient.RequestOptions} requestOptions - Request-specific configuration.
368
369
  *
369
370
  * @throws {@link BrowserUse.NotFoundError}
370
371
  * @throws {@link BrowserUse.UnprocessableEntityError}
@@ -437,4 +438,4 @@ class Tasks {
437
438
  });
438
439
  }
439
440
  }
440
- exports.Tasks = Tasks;
441
+ exports.TasksClient = TasksClient;