browser-use-sdk 2.0.12 → 2.0.14

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 (192) hide show
  1. package/dist/cjs/BaseClient.d.ts +1 -1
  2. package/dist/cjs/Client.d.ts +1 -4
  3. package/dist/cjs/Client.js +3 -8
  4. package/dist/cjs/api/errors/ForbiddenError.d.ts +1 -2
  5. package/dist/cjs/api/resources/billing/client/Client.d.ts +2 -2
  6. package/dist/cjs/api/resources/billing/client/Client.js +2 -2
  7. package/dist/cjs/api/resources/browsers/client/Client.d.ts +9 -7
  8. package/dist/cjs/api/resources/browsers/client/Client.js +9 -7
  9. package/dist/cjs/api/resources/browsers/client/requests/CreateBrowserSessionRequest.d.ts +3 -1
  10. package/dist/cjs/api/resources/files/client/Client.d.ts +1 -1
  11. package/dist/cjs/api/resources/files/client/Client.js +1 -1
  12. package/dist/cjs/api/resources/index.d.ts +0 -2
  13. package/dist/cjs/api/resources/index.js +1 -3
  14. package/dist/cjs/api/resources/profiles/client/Client.d.ts +1 -1
  15. package/dist/cjs/api/resources/profiles/client/Client.js +1 -1
  16. package/dist/cjs/api/resources/sessions/client/Client.d.ts +2 -1
  17. package/dist/cjs/api/resources/sessions/client/Client.js +4 -1
  18. package/dist/cjs/api/resources/sessions/client/requests/CreateSessionRequest.d.ts +6 -0
  19. package/dist/cjs/api/resources/skills/client/Client.d.ts +43 -4
  20. package/dist/cjs/api/resources/skills/client/Client.js +172 -5
  21. package/dist/cjs/api/resources/skills/client/requests/ExecuteSkillSkillsSkillIdExecutePostRequest.d.ts +12 -0
  22. package/dist/cjs/api/resources/skills/client/requests/GetSkillExecutionOutputSkillsSkillIdExecutionsExecutionIdOutputGetRequest.d.ts +11 -0
  23. package/dist/cjs/api/resources/skills/client/requests/ListSkillExecutionsSkillsSkillIdExecutionsGetRequest.d.ts +11 -0
  24. package/dist/cjs/api/resources/skills/client/requests/ListSkillsSkillsGetRequest.d.ts +2 -0
  25. package/dist/cjs/api/resources/skills/client/requests/UpdateSkillRequest.d.ts +5 -2
  26. package/dist/cjs/api/resources/skills/client/requests/index.d.ts +3 -1
  27. package/dist/cjs/api/resources/skillsMarketplace/client/Client.d.ts +24 -5
  28. package/dist/cjs/api/resources/skillsMarketplace/client/Client.js +87 -7
  29. package/dist/cjs/api/resources/skillsMarketplace/client/requests/ExecuteSkillMarketplaceSkillsSkillIdExecutePostRequest.d.ts +12 -0
  30. package/dist/cjs/api/resources/skillsMarketplace/client/requests/GetSkillMarketplaceSkillsSkillSlugGetRequest.d.ts +9 -0
  31. package/dist/cjs/api/resources/skillsMarketplace/client/requests/ListSkillsMarketplaceSkillsGetRequest.d.ts +2 -0
  32. package/dist/cjs/api/resources/skillsMarketplace/client/requests/index.d.ts +2 -1
  33. package/dist/cjs/api/resources/tasks/client/Client.d.ts +12 -3
  34. package/dist/cjs/api/resources/tasks/client/Client.js +12 -3
  35. package/dist/cjs/api/resources/tasks/client/requests/CreateTaskRequest.d.ts +2 -0
  36. package/dist/cjs/api/types/AccountNotFoundError.d.ts +1 -1
  37. package/dist/cjs/api/types/AccountView.d.ts +5 -5
  38. package/dist/cjs/api/types/AppEndpointsApiV2MarketplaceSkillsViewsInsufficientCreditsError.d.ts +6 -0
  39. package/dist/cjs/api/types/AppEndpointsApiV2MarketplaceSkillsViewsInsufficientCreditsError.js +3 -0
  40. package/dist/cjs/api/types/AppEndpointsApiV2SkillsViewsInsufficientCreditsError.d.ts +6 -0
  41. package/dist/cjs/api/types/AppEndpointsApiV2SkillsViewsInsufficientCreditsError.js +3 -0
  42. package/dist/cjs/api/types/BrowserSessionItemView.d.ts +6 -0
  43. package/dist/cjs/api/types/BrowserSessionView.d.ts +6 -0
  44. package/dist/cjs/api/types/{InsufficientCreditsError.d.ts → CommonUtilsErrorsInsufficientCreditsError.d.ts} +1 -1
  45. package/dist/cjs/api/types/CommonUtilsErrorsInsufficientCreditsError.js +3 -0
  46. package/dist/cjs/api/types/CustomProxy.d.ts +13 -0
  47. package/dist/cjs/api/types/CustomProxy.js +3 -0
  48. package/dist/cjs/api/types/EnabledSkillsLimitExceededError.d.ts +6 -0
  49. package/dist/cjs/api/types/EnabledSkillsLimitExceededError.js +3 -0
  50. package/dist/cjs/api/types/ExecuteSkillRequest.d.ts +7 -0
  51. package/dist/cjs/api/types/ExecuteSkillRequest.js +3 -0
  52. package/dist/cjs/api/types/MarketplaceSkillResponse.d.ts +14 -0
  53. package/dist/cjs/api/types/SessionItemView.d.ts +8 -0
  54. package/dist/cjs/api/types/SessionStatus.d.ts +3 -3
  55. package/dist/cjs/api/types/SessionStatus.js +3 -3
  56. package/dist/cjs/api/types/SessionTimeoutLimitExceededError.d.ts +1 -1
  57. package/dist/cjs/api/types/SessionView.d.ts +8 -0
  58. package/dist/cjs/api/types/SkillCategory.d.ts +20 -0
  59. package/dist/cjs/api/types/SkillCategory.js +23 -0
  60. package/dist/cjs/api/types/SkillExecutionListResponse.d.ts +14 -0
  61. package/dist/cjs/api/types/SkillExecutionListResponse.js +3 -0
  62. package/dist/cjs/api/types/SkillExecutionOutputResponse.d.ts +7 -0
  63. package/dist/cjs/api/types/SkillExecutionOutputResponse.js +3 -0
  64. package/dist/cjs/api/types/SkillExecutionView.d.ts +21 -0
  65. package/dist/cjs/api/types/SkillExecutionView.js +3 -0
  66. package/dist/cjs/api/types/SkillResponse.d.ts +14 -2
  67. package/dist/cjs/api/types/SkillsGenerationStatus.d.ts +1 -0
  68. package/dist/cjs/api/types/SkillsGenerationStatus.js +1 -0
  69. package/dist/cjs/api/types/SupportedLlMs.d.ts +2 -0
  70. package/dist/cjs/api/types/SupportedLlMs.js +2 -0
  71. package/dist/cjs/api/types/TaskItemView.d.ts +2 -0
  72. package/dist/cjs/api/types/TaskView.d.ts +2 -0
  73. package/dist/cjs/api/types/WorkflowYamlPresignedUploadResponse.d.ts +1 -8
  74. package/dist/cjs/api/types/WorkflowYamlPresignedUploadResponse.js +0 -8
  75. package/dist/cjs/api/types/index.d.ts +10 -20
  76. package/dist/cjs/api/types/index.js +10 -20
  77. package/dist/cjs/version.d.ts +1 -1
  78. package/dist/cjs/version.js +1 -1
  79. package/dist/esm/BaseClient.d.mts +1 -1
  80. package/dist/esm/Client.d.mts +1 -4
  81. package/dist/esm/Client.mjs +3 -8
  82. package/dist/esm/api/errors/ForbiddenError.d.mts +1 -2
  83. package/dist/esm/api/resources/billing/client/Client.d.mts +2 -2
  84. package/dist/esm/api/resources/billing/client/Client.mjs +2 -2
  85. package/dist/esm/api/resources/browsers/client/Client.d.mts +9 -7
  86. package/dist/esm/api/resources/browsers/client/Client.mjs +9 -7
  87. package/dist/esm/api/resources/browsers/client/requests/CreateBrowserSessionRequest.d.mts +3 -1
  88. package/dist/esm/api/resources/files/client/Client.d.mts +1 -1
  89. package/dist/esm/api/resources/files/client/Client.mjs +1 -1
  90. package/dist/esm/api/resources/index.d.mts +0 -2
  91. package/dist/esm/api/resources/index.mjs +0 -2
  92. package/dist/esm/api/resources/profiles/client/Client.d.mts +1 -1
  93. package/dist/esm/api/resources/profiles/client/Client.mjs +1 -1
  94. package/dist/esm/api/resources/sessions/client/Client.d.mts +2 -1
  95. package/dist/esm/api/resources/sessions/client/Client.mjs +4 -1
  96. package/dist/esm/api/resources/sessions/client/requests/CreateSessionRequest.d.mts +6 -0
  97. package/dist/esm/api/resources/skills/client/Client.d.mts +43 -4
  98. package/dist/esm/api/resources/skills/client/Client.mjs +172 -5
  99. package/dist/esm/api/resources/skills/client/requests/ExecuteSkillSkillsSkillIdExecutePostRequest.d.mts +12 -0
  100. package/dist/esm/api/resources/skills/client/requests/GetSkillExecutionOutputSkillsSkillIdExecutionsExecutionIdOutputGetRequest.d.mts +11 -0
  101. package/dist/esm/api/resources/skills/client/requests/ListSkillExecutionsSkillsSkillIdExecutionsGetRequest.d.mts +11 -0
  102. package/dist/esm/api/resources/skills/client/requests/ListSkillsSkillsGetRequest.d.mts +2 -0
  103. package/dist/esm/api/resources/skills/client/requests/UpdateSkillRequest.d.mts +5 -2
  104. package/dist/esm/api/resources/skills/client/requests/index.d.mts +3 -1
  105. package/dist/esm/api/resources/skillsMarketplace/client/Client.d.mts +24 -5
  106. package/dist/esm/api/resources/skillsMarketplace/client/Client.mjs +87 -7
  107. package/dist/esm/api/resources/skillsMarketplace/client/requests/ExecuteSkillMarketplaceSkillsSkillIdExecutePostRequest.d.mts +12 -0
  108. package/dist/esm/api/resources/skillsMarketplace/client/requests/GetSkillMarketplaceSkillsSkillSlugGetRequest.d.mts +9 -0
  109. package/dist/esm/api/resources/skillsMarketplace/client/requests/ListSkillsMarketplaceSkillsGetRequest.d.mts +2 -0
  110. package/dist/esm/api/resources/skillsMarketplace/client/requests/index.d.mts +2 -1
  111. package/dist/esm/api/resources/tasks/client/Client.d.mts +12 -3
  112. package/dist/esm/api/resources/tasks/client/Client.mjs +12 -3
  113. package/dist/esm/api/resources/tasks/client/requests/CreateTaskRequest.d.mts +2 -0
  114. package/dist/esm/api/types/AccountNotFoundError.d.mts +1 -1
  115. package/dist/esm/api/types/AccountView.d.mts +5 -5
  116. package/dist/esm/api/types/AppEndpointsApiV2MarketplaceSkillsViewsInsufficientCreditsError.d.mts +6 -0
  117. package/dist/esm/api/types/AppEndpointsApiV2MarketplaceSkillsViewsInsufficientCreditsError.mjs +2 -0
  118. package/dist/esm/api/types/AppEndpointsApiV2SkillsViewsInsufficientCreditsError.d.mts +6 -0
  119. package/dist/esm/api/types/AppEndpointsApiV2SkillsViewsInsufficientCreditsError.mjs +2 -0
  120. package/dist/esm/api/types/BrowserSessionItemView.d.mts +6 -0
  121. package/dist/esm/api/types/BrowserSessionView.d.mts +6 -0
  122. package/dist/esm/api/types/{InsufficientCreditsError.d.mts → CommonUtilsErrorsInsufficientCreditsError.d.mts} +1 -1
  123. package/dist/esm/api/types/CommonUtilsErrorsInsufficientCreditsError.mjs +2 -0
  124. package/dist/esm/api/types/CustomProxy.d.mts +13 -0
  125. package/dist/esm/api/types/CustomProxy.mjs +2 -0
  126. package/dist/esm/api/types/EnabledSkillsLimitExceededError.d.mts +6 -0
  127. package/dist/esm/api/types/EnabledSkillsLimitExceededError.mjs +2 -0
  128. package/dist/esm/api/types/ExecuteSkillRequest.d.mts +7 -0
  129. package/dist/esm/api/types/ExecuteSkillRequest.mjs +2 -0
  130. package/dist/esm/api/types/MarketplaceSkillResponse.d.mts +14 -0
  131. package/dist/esm/api/types/SessionItemView.d.mts +8 -0
  132. package/dist/esm/api/types/SessionStatus.d.mts +3 -3
  133. package/dist/esm/api/types/SessionStatus.mjs +3 -3
  134. package/dist/esm/api/types/SessionTimeoutLimitExceededError.d.mts +1 -1
  135. package/dist/esm/api/types/SessionView.d.mts +8 -0
  136. package/dist/esm/api/types/SkillCategory.d.mts +20 -0
  137. package/dist/esm/api/types/SkillCategory.mjs +20 -0
  138. package/dist/esm/api/types/SkillExecutionListResponse.d.mts +14 -0
  139. package/dist/esm/api/types/SkillExecutionListResponse.mjs +2 -0
  140. package/dist/esm/api/types/SkillExecutionOutputResponse.d.mts +7 -0
  141. package/dist/esm/api/types/SkillExecutionOutputResponse.mjs +2 -0
  142. package/dist/esm/api/types/SkillExecutionView.d.mts +21 -0
  143. package/dist/esm/api/types/SkillExecutionView.mjs +2 -0
  144. package/dist/esm/api/types/SkillResponse.d.mts +14 -2
  145. package/dist/esm/api/types/SkillsGenerationStatus.d.mts +1 -0
  146. package/dist/esm/api/types/SkillsGenerationStatus.mjs +1 -0
  147. package/dist/esm/api/types/SupportedLlMs.d.mts +2 -0
  148. package/dist/esm/api/types/SupportedLlMs.mjs +2 -0
  149. package/dist/esm/api/types/TaskItemView.d.mts +2 -0
  150. package/dist/esm/api/types/TaskView.d.mts +2 -0
  151. package/dist/esm/api/types/WorkflowYamlPresignedUploadResponse.d.mts +1 -8
  152. package/dist/esm/api/types/WorkflowYamlPresignedUploadResponse.mjs +1 -7
  153. package/dist/esm/api/types/index.d.mts +10 -20
  154. package/dist/esm/api/types/index.mjs +10 -20
  155. package/dist/esm/version.d.mts +1 -1
  156. package/dist/esm/version.mjs +1 -1
  157. package/package.json +1 -1
  158. package/reference.md +60 -916
  159. package/dist/cjs/api/resources/skillsMarketplace/client/requests/GetSkillMarketplaceSkillsSkillIdGetRequest.d.ts +0 -9
  160. package/dist/cjs/api/resources/workflows/types/ExecuteWorkflowWorkflowsWorkflowIdExecutePostResponse.d.ts +0 -2
  161. package/dist/cjs/api/resources/workflows/types/index.d.ts +0 -1
  162. package/dist/cjs/api/resources/workflows/types/index.js +0 -17
  163. package/dist/cjs/api/types/AppApiV2MarketplaceSkillsViewsParameterSchema.d.ts +0 -11
  164. package/dist/cjs/api/types/AppApiV2MarketplaceSkillsViewsParameterType.d.ts +0 -9
  165. package/dist/cjs/api/types/AppApiV2MarketplaceSkillsViewsParameterType.js +0 -12
  166. package/dist/cjs/api/types/AppApiV2SkillsViewsParameterSchema.d.ts +0 -11
  167. package/dist/cjs/api/types/AppApiV2SkillsViewsParameterType.d.ts +0 -10
  168. package/dist/cjs/api/types/AppApiV2SkillsViewsParameterType.js +0 -13
  169. package/dist/cjs/api/types/ExecutionMode.d.ts +0 -12
  170. package/dist/cjs/api/types/ExecutionMode.js +0 -15
  171. package/dist/esm/api/resources/skillsMarketplace/client/requests/GetSkillMarketplaceSkillsSkillIdGetRequest.d.mts +0 -9
  172. package/dist/esm/api/resources/workflows/types/ExecuteWorkflowWorkflowsWorkflowIdExecutePostResponse.d.mts +0 -2
  173. package/dist/esm/api/resources/workflows/types/index.d.mts +0 -1
  174. package/dist/esm/api/resources/workflows/types/index.mjs +0 -1
  175. package/dist/esm/api/types/AppApiV2MarketplaceSkillsViewsParameterSchema.d.mts +0 -11
  176. package/dist/esm/api/types/AppApiV2MarketplaceSkillsViewsParameterType.d.mts +0 -9
  177. package/dist/esm/api/types/AppApiV2MarketplaceSkillsViewsParameterType.mjs +0 -9
  178. package/dist/esm/api/types/AppApiV2SkillsViewsParameterSchema.d.mts +0 -11
  179. package/dist/esm/api/types/AppApiV2SkillsViewsParameterType.d.mts +0 -10
  180. package/dist/esm/api/types/AppApiV2SkillsViewsParameterType.mjs +0 -10
  181. package/dist/esm/api/types/ExecutionMode.d.mts +0 -12
  182. package/dist/esm/api/types/ExecutionMode.mjs +0 -12
  183. /package/dist/cjs/api/resources/{skillsMarketplace/client/requests/GetSkillMarketplaceSkillsSkillIdGetRequest.js → skills/client/requests/ExecuteSkillSkillsSkillIdExecutePostRequest.js} +0 -0
  184. /package/dist/cjs/api/resources/{workflows/types/ExecuteWorkflowWorkflowsWorkflowIdExecutePostResponse.js → skills/client/requests/GetSkillExecutionOutputSkillsSkillIdExecutionsExecutionIdOutputGetRequest.js} +0 -0
  185. /package/dist/cjs/api/{types/AppApiV2MarketplaceSkillsViewsParameterSchema.js → resources/skills/client/requests/ListSkillExecutionsSkillsSkillIdExecutionsGetRequest.js} +0 -0
  186. /package/dist/cjs/api/{types/AppApiV2SkillsViewsParameterSchema.js → resources/skillsMarketplace/client/requests/ExecuteSkillMarketplaceSkillsSkillIdExecutePostRequest.js} +0 -0
  187. /package/dist/cjs/api/{types/InsufficientCreditsError.js → resources/skillsMarketplace/client/requests/GetSkillMarketplaceSkillsSkillSlugGetRequest.js} +0 -0
  188. /package/dist/esm/api/resources/{skillsMarketplace/client/requests/GetSkillMarketplaceSkillsSkillIdGetRequest.mjs → skills/client/requests/ExecuteSkillSkillsSkillIdExecutePostRequest.mjs} +0 -0
  189. /package/dist/esm/api/resources/{workflows/types/ExecuteWorkflowWorkflowsWorkflowIdExecutePostResponse.mjs → skills/client/requests/GetSkillExecutionOutputSkillsSkillIdExecutionsExecutionIdOutputGetRequest.mjs} +0 -0
  190. /package/dist/esm/api/{types/AppApiV2MarketplaceSkillsViewsParameterSchema.mjs → resources/skills/client/requests/ListSkillExecutionsSkillsSkillIdExecutionsGetRequest.mjs} +0 -0
  191. /package/dist/esm/api/{types/AppApiV2SkillsViewsParameterSchema.mjs → resources/skillsMarketplace/client/requests/ExecuteSkillMarketplaceSkillsSkillIdExecutePostRequest.mjs} +0 -0
  192. /package/dist/esm/api/{types/InsufficientCreditsError.mjs → resources/skillsMarketplace/client/requests/GetSkillMarketplaceSkillsSkillSlugGetRequest.mjs} +0 -0
@@ -61,7 +61,7 @@ const environments = __importStar(require("../../../../environments.js"));
61
61
  const errors = __importStar(require("../../../../errors/index.js"));
62
62
  const BrowserUse = __importStar(require("../../../index.js"));
63
63
  class Skills {
64
- constructor(_options) {
64
+ constructor(_options = {}) {
65
65
  this._options = _options;
66
66
  }
67
67
  /**
@@ -81,7 +81,7 @@ class Skills {
81
81
  __listSkills() {
82
82
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
83
83
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
84
- const { pageSize, pageNumber, isPublic, isEnabled, query, fromDate, toDate } = request;
84
+ const { pageSize, pageNumber, isPublic, isEnabled, category, query, fromDate, toDate } = request;
85
85
  const _queryParams = {};
86
86
  if (pageSize != null) {
87
87
  _queryParams.pageSize = pageSize.toString();
@@ -95,6 +95,9 @@ class Skills {
95
95
  if (isEnabled !== undefined) {
96
96
  _queryParams.isEnabled = (_b = isEnabled === null || isEnabled === void 0 ? void 0 : isEnabled.toString()) !== null && _b !== void 0 ? _b : null;
97
97
  }
98
+ if (category !== undefined) {
99
+ _queryParams.category = category;
100
+ }
98
101
  if (query !== undefined) {
99
102
  _queryParams.query = query;
100
103
  }
@@ -155,7 +158,9 @@ class Skills {
155
158
  * @param {Skills.RequestOptions} requestOptions - Request-specific configuration.
156
159
  *
157
160
  * @throws {@link BrowserUse.BadRequestError}
161
+ * @throws {@link BrowserUse.PaymentRequiredError}
158
162
  * @throws {@link BrowserUse.UnprocessableEntityError}
163
+ * @throws {@link BrowserUse.TooManyRequestsError}
159
164
  *
160
165
  * @example
161
166
  * await client.skills.createSkill({
@@ -191,8 +196,12 @@ class Skills {
191
196
  switch (_response.error.statusCode) {
192
197
  case 400:
193
198
  throw new BrowserUse.BadRequestError(_response.error.body, _response.rawResponse);
199
+ case 402:
200
+ throw new BrowserUse.PaymentRequiredError(_response.error.body, _response.rawResponse);
194
201
  case 422:
195
202
  throw new BrowserUse.UnprocessableEntityError(_response.error.body, _response.rawResponse);
203
+ case 429:
204
+ throw new BrowserUse.TooManyRequestsError(_response.error.body, _response.rawResponse);
196
205
  default:
197
206
  throw new errors.BrowserUseError({
198
207
  statusCode: _response.error.statusCode,
@@ -361,6 +370,7 @@ class Skills {
361
370
  * @param {BrowserUse.UpdateSkillRequest} request
362
371
  * @param {Skills.RequestOptions} requestOptions - Request-specific configuration.
363
372
  *
373
+ * @throws {@link BrowserUse.ForbiddenError}
364
374
  * @throws {@link BrowserUse.NotFoundError}
365
375
  * @throws {@link BrowserUse.UnprocessableEntityError}
366
376
  *
@@ -396,6 +406,8 @@ class Skills {
396
406
  }
397
407
  if (_response.error.reason === "status-code") {
398
408
  switch (_response.error.statusCode) {
409
+ case 403:
410
+ throw new BrowserUse.ForbiddenError(_response.error.body, _response.rawResponse);
399
411
  case 404:
400
412
  throw new BrowserUse.NotFoundError(_response.error.body, _response.rawResponse);
401
413
  case 422:
@@ -568,17 +580,19 @@ class Skills {
568
580
  /**
569
581
  * Execute a skill with the provided parameters.
570
582
  *
571
- * @param {BrowserUse.ExecuteSkillRequest} request
583
+ * @param {BrowserUse.ExecuteSkillSkillsSkillIdExecutePostRequest} request
572
584
  * @param {Skills.RequestOptions} requestOptions - Request-specific configuration.
573
585
  *
574
586
  * @throws {@link BrowserUse.BadRequestError}
575
587
  * @throws {@link BrowserUse.PaymentRequiredError}
576
588
  * @throws {@link BrowserUse.NotFoundError}
577
589
  * @throws {@link BrowserUse.UnprocessableEntityError}
590
+ * @throws {@link BrowserUse.TooManyRequestsError}
578
591
  *
579
592
  * @example
580
593
  * await client.skills.executeSkill({
581
- * skill_id: "skill_id"
594
+ * skill_id: "skill_id",
595
+ * body: {}
582
596
  * })
583
597
  */
584
598
  executeSkill(request, requestOptions) {
@@ -587,7 +601,7 @@ class Skills {
587
601
  __executeSkill(request, requestOptions) {
588
602
  return __awaiter(this, void 0, void 0, function* () {
589
603
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
590
- const { skill_id: skillId } = request, _body = __rest(request, ["skill_id"]);
604
+ const { skill_id: skillId, body: _body } = request;
591
605
  const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
592
606
  const _response = yield core.fetcher({
593
607
  url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrowserUseEnvironment.Production, `skills/${core.url.encodePathParam(skillId)}/execute`),
@@ -616,6 +630,8 @@ class Skills {
616
630
  throw new BrowserUse.NotFoundError(_response.error.body, _response.rawResponse);
617
631
  case 422:
618
632
  throw new BrowserUse.UnprocessableEntityError(_response.error.body, _response.rawResponse);
633
+ case 429:
634
+ throw new BrowserUse.TooManyRequestsError(_response.error.body, _response.rawResponse);
619
635
  default:
620
636
  throw new errors.BrowserUseError({
621
637
  statusCode: _response.error.statusCode,
@@ -650,6 +666,7 @@ class Skills {
650
666
  * @throws {@link BrowserUse.BadRequestError}
651
667
  * @throws {@link BrowserUse.NotFoundError}
652
668
  * @throws {@link BrowserUse.UnprocessableEntityError}
669
+ * @throws {@link BrowserUse.TooManyRequestsError}
653
670
  *
654
671
  * @example
655
672
  * await client.skills.refineSkill({
@@ -690,6 +707,8 @@ class Skills {
690
707
  throw new BrowserUse.NotFoundError(_response.error.body, _response.rawResponse);
691
708
  case 422:
692
709
  throw new BrowserUse.UnprocessableEntityError(_response.error.body, _response.rawResponse);
710
+ case 429:
711
+ throw new BrowserUse.TooManyRequestsError(_response.error.body, _response.rawResponse);
693
712
  default:
694
713
  throw new errors.BrowserUseError({
695
714
  statusCode: _response.error.statusCode,
@@ -715,6 +734,154 @@ class Skills {
715
734
  }
716
735
  });
717
736
  }
737
+ /**
738
+ * List executions for a specific skill.
739
+ *
740
+ * @param {BrowserUse.ListSkillExecutionsSkillsSkillIdExecutionsGetRequest} request
741
+ * @param {Skills.RequestOptions} requestOptions - Request-specific configuration.
742
+ *
743
+ * @throws {@link BrowserUse.NotFoundError}
744
+ * @throws {@link BrowserUse.UnprocessableEntityError}
745
+ *
746
+ * @example
747
+ * await client.skills.listSkillExecutions({
748
+ * skill_id: "skill_id"
749
+ * })
750
+ */
751
+ listSkillExecutions(request, requestOptions) {
752
+ return core.HttpResponsePromise.fromPromise(this.__listSkillExecutions(request, requestOptions));
753
+ }
754
+ __listSkillExecutions(request, requestOptions) {
755
+ return __awaiter(this, void 0, void 0, function* () {
756
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
757
+ const { skill_id: skillId, pageSize, pageNumber } = request;
758
+ const _queryParams = {};
759
+ if (pageSize != null) {
760
+ _queryParams.pageSize = pageSize.toString();
761
+ }
762
+ if (pageNumber != null) {
763
+ _queryParams.pageNumber = pageNumber.toString();
764
+ }
765
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
766
+ const _response = yield core.fetcher({
767
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrowserUseEnvironment.Production, `skills/${core.url.encodePathParam(skillId)}/executions`),
768
+ method: "GET",
769
+ headers: _headers,
770
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
771
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
772
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
773
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
774
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
775
+ logging: this._options.logging,
776
+ });
777
+ if (_response.ok) {
778
+ return {
779
+ data: _response.body,
780
+ rawResponse: _response.rawResponse,
781
+ };
782
+ }
783
+ if (_response.error.reason === "status-code") {
784
+ switch (_response.error.statusCode) {
785
+ case 404:
786
+ throw new BrowserUse.NotFoundError(_response.error.body, _response.rawResponse);
787
+ case 422:
788
+ throw new BrowserUse.UnprocessableEntityError(_response.error.body, _response.rawResponse);
789
+ default:
790
+ throw new errors.BrowserUseError({
791
+ statusCode: _response.error.statusCode,
792
+ body: _response.error.body,
793
+ rawResponse: _response.rawResponse,
794
+ });
795
+ }
796
+ }
797
+ switch (_response.error.reason) {
798
+ case "non-json":
799
+ throw new errors.BrowserUseError({
800
+ statusCode: _response.error.statusCode,
801
+ body: _response.error.rawBody,
802
+ rawResponse: _response.rawResponse,
803
+ });
804
+ case "timeout":
805
+ throw new errors.BrowserUseTimeoutError("Timeout exceeded when calling GET /skills/{skill_id}/executions.");
806
+ case "unknown":
807
+ throw new errors.BrowserUseError({
808
+ message: _response.error.errorMessage,
809
+ rawResponse: _response.rawResponse,
810
+ });
811
+ }
812
+ });
813
+ }
814
+ /**
815
+ * Get presigned URL for downloading skill execution output.
816
+ *
817
+ * @param {BrowserUse.GetSkillExecutionOutputSkillsSkillIdExecutionsExecutionIdOutputGetRequest} request
818
+ * @param {Skills.RequestOptions} requestOptions - Request-specific configuration.
819
+ *
820
+ * @throws {@link BrowserUse.NotFoundError}
821
+ * @throws {@link BrowserUse.UnprocessableEntityError}
822
+ *
823
+ * @example
824
+ * await client.skills.getSkillExecutionOutput({
825
+ * skill_id: "skill_id",
826
+ * execution_id: "execution_id"
827
+ * })
828
+ */
829
+ getSkillExecutionOutput(request, requestOptions) {
830
+ return core.HttpResponsePromise.fromPromise(this.__getSkillExecutionOutput(request, requestOptions));
831
+ }
832
+ __getSkillExecutionOutput(request, requestOptions) {
833
+ return __awaiter(this, void 0, void 0, function* () {
834
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
835
+ const { skill_id: skillId, execution_id: executionId } = request;
836
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
837
+ const _response = yield core.fetcher({
838
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrowserUseEnvironment.Production, `skills/${core.url.encodePathParam(skillId)}/executions/${core.url.encodePathParam(executionId)}/output`),
839
+ method: "GET",
840
+ headers: _headers,
841
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
842
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
843
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
844
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
845
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
846
+ logging: this._options.logging,
847
+ });
848
+ if (_response.ok) {
849
+ return {
850
+ data: _response.body,
851
+ rawResponse: _response.rawResponse,
852
+ };
853
+ }
854
+ if (_response.error.reason === "status-code") {
855
+ switch (_response.error.statusCode) {
856
+ case 404:
857
+ throw new BrowserUse.NotFoundError(_response.error.body, _response.rawResponse);
858
+ case 422:
859
+ throw new BrowserUse.UnprocessableEntityError(_response.error.body, _response.rawResponse);
860
+ default:
861
+ throw new errors.BrowserUseError({
862
+ statusCode: _response.error.statusCode,
863
+ body: _response.error.body,
864
+ rawResponse: _response.rawResponse,
865
+ });
866
+ }
867
+ }
868
+ switch (_response.error.reason) {
869
+ case "non-json":
870
+ throw new errors.BrowserUseError({
871
+ statusCode: _response.error.statusCode,
872
+ body: _response.error.rawBody,
873
+ rawResponse: _response.rawResponse,
874
+ });
875
+ case "timeout":
876
+ throw new errors.BrowserUseTimeoutError("Timeout exceeded when calling GET /skills/{skill_id}/executions/{execution_id}/output.");
877
+ case "unknown":
878
+ throw new errors.BrowserUseError({
879
+ message: _response.error.errorMessage,
880
+ rawResponse: _response.rawResponse,
881
+ });
882
+ }
883
+ });
884
+ }
718
885
  _getCustomAuthorizationHeaders() {
719
886
  return __awaiter(this, void 0, void 0, function* () {
720
887
  const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
@@ -0,0 +1,12 @@
1
+ import type * as BrowserUse from "../../../../index.js";
2
+ /**
3
+ * @example
4
+ * {
5
+ * skill_id: "skill_id",
6
+ * body: {}
7
+ * }
8
+ */
9
+ export interface ExecuteSkillSkillsSkillIdExecutePostRequest {
10
+ skill_id: string;
11
+ body: BrowserUse.ExecuteSkillRequest;
12
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * skill_id: "skill_id",
5
+ * execution_id: "execution_id"
6
+ * }
7
+ */
8
+ export interface GetSkillExecutionOutputSkillsSkillIdExecutionsExecutionIdOutputGetRequest {
9
+ skill_id: string;
10
+ execution_id: string;
11
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * skill_id: "skill_id"
5
+ * }
6
+ */
7
+ export interface ListSkillExecutionsSkillsSkillIdExecutionsGetRequest {
8
+ skill_id: string;
9
+ pageSize?: number;
10
+ pageNumber?: number;
11
+ }
@@ -1,3 +1,4 @@
1
+ import type * as BrowserUse from "../../../../index.js";
1
2
  /**
2
3
  * @example
3
4
  * {}
@@ -7,6 +8,7 @@ export interface ListSkillsSkillsGetRequest {
7
8
  pageNumber?: number;
8
9
  isPublic?: boolean | null;
9
10
  isEnabled?: boolean | null;
11
+ category?: BrowserUse.SkillCategory | null;
10
12
  query?: string | null;
11
13
  fromDate?: string | null;
12
14
  toDate?: string | null;
@@ -1,3 +1,4 @@
1
+ import type * as BrowserUse from "../../../../index.js";
1
2
  /**
2
3
  * @example
3
4
  * {
@@ -10,8 +11,10 @@ export interface UpdateSkillRequest {
10
11
  title?: string | null;
11
12
  /** Description of what the skill does (shows up in the public view) */
12
13
  description?: string | null;
14
+ /** Categories to assign to the skill */
15
+ categories?: BrowserUse.SkillCategory[] | null;
16
+ /** Domains/websites this skill interacts with */
17
+ domains?: string[] | null;
13
18
  /** Whether the skill is enabled for execution */
14
19
  isEnabled?: boolean | null;
15
- /** Whether the skill is publicly available */
16
- isPublic?: boolean | null;
17
20
  }
@@ -1,8 +1,10 @@
1
1
  export type { CancelGenerationSkillsSkillIdCancelPostRequest } from "./CancelGenerationSkillsSkillIdCancelPostRequest.js";
2
2
  export type { CreateSkillRequest } from "./CreateSkillRequest.js";
3
3
  export type { DeleteSkillSkillsSkillIdDeleteRequest } from "./DeleteSkillSkillsSkillIdDeleteRequest.js";
4
- export type { ExecuteSkillRequest } from "./ExecuteSkillRequest.js";
4
+ export type { ExecuteSkillSkillsSkillIdExecutePostRequest } from "./ExecuteSkillSkillsSkillIdExecutePostRequest.js";
5
+ export type { GetSkillExecutionOutputSkillsSkillIdExecutionsExecutionIdOutputGetRequest } from "./GetSkillExecutionOutputSkillsSkillIdExecutionsExecutionIdOutputGetRequest.js";
5
6
  export type { GetSkillSkillsSkillIdGetRequest } from "./GetSkillSkillsSkillIdGetRequest.js";
7
+ export type { ListSkillExecutionsSkillsSkillIdExecutionsGetRequest } from "./ListSkillExecutionsSkillsSkillIdExecutionsGetRequest.js";
6
8
  export type { ListSkillsSkillsGetRequest } from "./ListSkillsSkillsGetRequest.js";
7
9
  export type { RefineSkillRequest } from "./RefineSkillRequest.js";
8
10
  export type { RollbackSkillSkillsSkillIdRollbackPostRequest } from "./RollbackSkillSkillsSkillIdRollbackPostRequest.js";
@@ -9,7 +9,7 @@ export declare namespace SkillsMarketplace {
9
9
  }
10
10
  export declare class SkillsMarketplace {
11
11
  protected readonly _options: SkillsMarketplace.Options;
12
- constructor(_options: SkillsMarketplace.Options);
12
+ constructor(_options?: SkillsMarketplace.Options);
13
13
  /**
14
14
  * List all public skills available in the marketplace with optional filtering.
15
15
  *
@@ -26,7 +26,7 @@ export declare class SkillsMarketplace {
26
26
  /**
27
27
  * Get details of a specific public skill from the marketplace.
28
28
  *
29
- * @param {BrowserUse.GetSkillMarketplaceSkillsSkillIdGetRequest} request
29
+ * @param {BrowserUse.GetSkillMarketplaceSkillsSkillSlugGetRequest} request
30
30
  * @param {SkillsMarketplace.RequestOptions} requestOptions - Request-specific configuration.
31
31
  *
32
32
  * @throws {@link BrowserUse.NotFoundError}
@@ -34,10 +34,10 @@ export declare class SkillsMarketplace {
34
34
  *
35
35
  * @example
36
36
  * await client.skillsMarketplace.getSkill({
37
- * skill_id: "skill_id"
37
+ * skill_slug: "skill_slug"
38
38
  * })
39
39
  */
40
- getSkill(request: BrowserUse.GetSkillMarketplaceSkillsSkillIdGetRequest, requestOptions?: SkillsMarketplace.RequestOptions): core.HttpResponsePromise<BrowserUse.MarketplaceSkillResponse>;
40
+ getSkill(request: BrowserUse.GetSkillMarketplaceSkillsSkillSlugGetRequest, requestOptions?: SkillsMarketplace.RequestOptions): core.HttpResponsePromise<BrowserUse.MarketplaceSkillResponse>;
41
41
  private __getSkill;
42
42
  /**
43
43
  * Clone a public marketplace skill to the user's project.
@@ -54,7 +54,26 @@ export declare class SkillsMarketplace {
54
54
  * skill_id: "skill_id"
55
55
  * })
56
56
  */
57
- cloneSkill(request: BrowserUse.CloneSkillMarketplaceSkillsSkillIdClonePostRequest, requestOptions?: SkillsMarketplace.RequestOptions): core.HttpResponsePromise<BrowserUse.MarketplaceSkillResponse>;
57
+ cloneSkill(request: BrowserUse.CloneSkillMarketplaceSkillsSkillIdClonePostRequest, requestOptions?: SkillsMarketplace.RequestOptions): core.HttpResponsePromise<BrowserUse.SkillResponse>;
58
58
  private __cloneSkill;
59
+ /**
60
+ * Execute a skill with the provided parameters.
61
+ *
62
+ * @param {BrowserUse.ExecuteSkillMarketplaceSkillsSkillIdExecutePostRequest} request
63
+ * @param {SkillsMarketplace.RequestOptions} requestOptions - Request-specific configuration.
64
+ *
65
+ * @throws {@link BrowserUse.BadRequestError}
66
+ * @throws {@link BrowserUse.PaymentRequiredError}
67
+ * @throws {@link BrowserUse.NotFoundError}
68
+ * @throws {@link BrowserUse.UnprocessableEntityError}
69
+ *
70
+ * @example
71
+ * await client.skillsMarketplace.executeSkill({
72
+ * skill_id: "skill_id",
73
+ * body: {}
74
+ * })
75
+ */
76
+ executeSkill(request: BrowserUse.ExecuteSkillMarketplaceSkillsSkillIdExecutePostRequest, requestOptions?: SkillsMarketplace.RequestOptions): core.HttpResponsePromise<BrowserUse.ExecuteSkillResponse>;
77
+ private __executeSkill;
59
78
  protected _getCustomAuthorizationHeaders(): Promise<Record<string, string | undefined>>;
60
79
  }
@@ -50,7 +50,7 @@ const environments = __importStar(require("../../../../environments.js"));
50
50
  const errors = __importStar(require("../../../../errors/index.js"));
51
51
  const BrowserUse = __importStar(require("../../../index.js"));
52
52
  class SkillsMarketplace {
53
- constructor(_options) {
53
+ constructor(_options = {}) {
54
54
  this._options = _options;
55
55
  }
56
56
  /**
@@ -70,7 +70,7 @@ class SkillsMarketplace {
70
70
  __listSkills() {
71
71
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
72
72
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
73
- const { pageSize, pageNumber, query, fromDate, toDate } = request;
73
+ const { pageSize, pageNumber, query, category, fromDate, toDate } = request;
74
74
  const _queryParams = {};
75
75
  if (pageSize != null) {
76
76
  _queryParams.pageSize = pageSize.toString();
@@ -81,6 +81,9 @@ class SkillsMarketplace {
81
81
  if (query !== undefined) {
82
82
  _queryParams.query = query;
83
83
  }
84
+ if (category !== undefined) {
85
+ _queryParams.category = category;
86
+ }
84
87
  if (fromDate !== undefined) {
85
88
  _queryParams.fromDate = fromDate;
86
89
  }
@@ -137,7 +140,7 @@ class SkillsMarketplace {
137
140
  /**
138
141
  * Get details of a specific public skill from the marketplace.
139
142
  *
140
- * @param {BrowserUse.GetSkillMarketplaceSkillsSkillIdGetRequest} request
143
+ * @param {BrowserUse.GetSkillMarketplaceSkillsSkillSlugGetRequest} request
141
144
  * @param {SkillsMarketplace.RequestOptions} requestOptions - Request-specific configuration.
142
145
  *
143
146
  * @throws {@link BrowserUse.NotFoundError}
@@ -145,7 +148,7 @@ class SkillsMarketplace {
145
148
  *
146
149
  * @example
147
150
  * await client.skillsMarketplace.getSkill({
148
- * skill_id: "skill_id"
151
+ * skill_slug: "skill_slug"
149
152
  * })
150
153
  */
151
154
  getSkill(request, requestOptions) {
@@ -154,10 +157,10 @@ class SkillsMarketplace {
154
157
  __getSkill(request, requestOptions) {
155
158
  return __awaiter(this, void 0, void 0, function* () {
156
159
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
157
- const { skill_id: skillId } = request;
160
+ const { skill_slug: skillSlug } = request;
158
161
  const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
159
162
  const _response = yield core.fetcher({
160
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrowserUseEnvironment.Production, `marketplace/skills/${core.url.encodePathParam(skillId)}`),
163
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrowserUseEnvironment.Production, `marketplace/skills/${core.url.encodePathParam(skillSlug)}`),
161
164
  method: "GET",
162
165
  headers: _headers,
163
166
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -192,7 +195,7 @@ class SkillsMarketplace {
192
195
  rawResponse: _response.rawResponse,
193
196
  });
194
197
  case "timeout":
195
- throw new errors.BrowserUseTimeoutError("Timeout exceeded when calling GET /marketplace/skills/{skill_id}.");
198
+ throw new errors.BrowserUseTimeoutError("Timeout exceeded when calling GET /marketplace/skills/{skill_slug}.");
196
199
  case "unknown":
197
200
  throw new errors.BrowserUseError({
198
201
  message: _response.error.errorMessage,
@@ -271,6 +274,83 @@ class SkillsMarketplace {
271
274
  }
272
275
  });
273
276
  }
277
+ /**
278
+ * Execute a skill with the provided parameters.
279
+ *
280
+ * @param {BrowserUse.ExecuteSkillMarketplaceSkillsSkillIdExecutePostRequest} request
281
+ * @param {SkillsMarketplace.RequestOptions} requestOptions - Request-specific configuration.
282
+ *
283
+ * @throws {@link BrowserUse.BadRequestError}
284
+ * @throws {@link BrowserUse.PaymentRequiredError}
285
+ * @throws {@link BrowserUse.NotFoundError}
286
+ * @throws {@link BrowserUse.UnprocessableEntityError}
287
+ *
288
+ * @example
289
+ * await client.skillsMarketplace.executeSkill({
290
+ * skill_id: "skill_id",
291
+ * body: {}
292
+ * })
293
+ */
294
+ executeSkill(request, requestOptions) {
295
+ return core.HttpResponsePromise.fromPromise(this.__executeSkill(request, requestOptions));
296
+ }
297
+ __executeSkill(request, requestOptions) {
298
+ return __awaiter(this, void 0, void 0, function* () {
299
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
300
+ const { skill_id: skillId, body: _body } = request;
301
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
302
+ const _response = yield core.fetcher({
303
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrowserUseEnvironment.Production, `marketplace/skills/${core.url.encodePathParam(skillId)}/execute`),
304
+ method: "POST",
305
+ headers: _headers,
306
+ contentType: "application/json",
307
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
308
+ requestType: "json",
309
+ body: _body,
310
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
311
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
312
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
313
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
314
+ logging: this._options.logging,
315
+ });
316
+ if (_response.ok) {
317
+ return { data: _response.body, rawResponse: _response.rawResponse };
318
+ }
319
+ if (_response.error.reason === "status-code") {
320
+ switch (_response.error.statusCode) {
321
+ case 400:
322
+ throw new BrowserUse.BadRequestError(_response.error.body, _response.rawResponse);
323
+ case 402:
324
+ throw new BrowserUse.PaymentRequiredError(_response.error.body, _response.rawResponse);
325
+ case 404:
326
+ throw new BrowserUse.NotFoundError(_response.error.body, _response.rawResponse);
327
+ case 422:
328
+ throw new BrowserUse.UnprocessableEntityError(_response.error.body, _response.rawResponse);
329
+ default:
330
+ throw new errors.BrowserUseError({
331
+ statusCode: _response.error.statusCode,
332
+ body: _response.error.body,
333
+ rawResponse: _response.rawResponse,
334
+ });
335
+ }
336
+ }
337
+ switch (_response.error.reason) {
338
+ case "non-json":
339
+ throw new errors.BrowserUseError({
340
+ statusCode: _response.error.statusCode,
341
+ body: _response.error.rawBody,
342
+ rawResponse: _response.rawResponse,
343
+ });
344
+ case "timeout":
345
+ throw new errors.BrowserUseTimeoutError("Timeout exceeded when calling POST /marketplace/skills/{skill_id}/execute.");
346
+ case "unknown":
347
+ throw new errors.BrowserUseError({
348
+ message: _response.error.errorMessage,
349
+ rawResponse: _response.rawResponse,
350
+ });
351
+ }
352
+ });
353
+ }
274
354
  _getCustomAuthorizationHeaders() {
275
355
  return __awaiter(this, void 0, void 0, function* () {
276
356
  const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
@@ -0,0 +1,12 @@
1
+ import type * as BrowserUse from "../../../../index.js";
2
+ /**
3
+ * @example
4
+ * {
5
+ * skill_id: "skill_id",
6
+ * body: {}
7
+ * }
8
+ */
9
+ export interface ExecuteSkillMarketplaceSkillsSkillIdExecutePostRequest {
10
+ skill_id: string;
11
+ body: BrowserUse.ExecuteSkillRequest;
12
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * skill_slug: "skill_slug"
5
+ * }
6
+ */
7
+ export interface GetSkillMarketplaceSkillsSkillSlugGetRequest {
8
+ skill_slug: string;
9
+ }
@@ -1,3 +1,4 @@
1
+ import type * as BrowserUse from "../../../../index.js";
1
2
  /**
2
3
  * @example
3
4
  * {}
@@ -6,6 +7,7 @@ export interface ListSkillsMarketplaceSkillsGetRequest {
6
7
  pageSize?: number;
7
8
  pageNumber?: number;
8
9
  query?: string | null;
10
+ category?: BrowserUse.SkillCategory | null;
9
11
  fromDate?: string | null;
10
12
  toDate?: string | null;
11
13
  }
@@ -1,3 +1,4 @@
1
1
  export type { CloneSkillMarketplaceSkillsSkillIdClonePostRequest } from "./CloneSkillMarketplaceSkillsSkillIdClonePostRequest.js";
2
- export type { GetSkillMarketplaceSkillsSkillIdGetRequest } from "./GetSkillMarketplaceSkillsSkillIdGetRequest.js";
2
+ export type { ExecuteSkillMarketplaceSkillsSkillIdExecutePostRequest } from "./ExecuteSkillMarketplaceSkillsSkillIdExecutePostRequest.js";
3
+ export type { GetSkillMarketplaceSkillsSkillSlugGetRequest } from "./GetSkillMarketplaceSkillsSkillSlugGetRequest.js";
3
4
  export type { ListSkillsMarketplaceSkillsGetRequest } from "./ListSkillsMarketplaceSkillsGetRequest.js";
@@ -9,7 +9,7 @@ export declare namespace Tasks {
9
9
  }
10
10
  export declare class Tasks {
11
11
  protected readonly _options: Tasks.Options;
12
- constructor(_options: Tasks.Options);
12
+ constructor(_options?: Tasks.Options);
13
13
  /**
14
14
  * Get paginated list of AI agent tasks with optional filtering by session and status.
15
15
  *
@@ -24,9 +24,18 @@ export declare class Tasks {
24
24
  listTasks(request?: BrowserUse.ListTasksTasksGetRequest, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<BrowserUse.TaskListResponse>;
25
25
  private __listTasks;
26
26
  /**
27
+ * Create and start a new task.
28
+ *
27
29
  * You can either:
28
- * 1. Start a new task (auto creates a new simple session)
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
+ * 1. Start a new task without a sessionId (auto-creates a session with US proxy by default).
31
+ * Note: Tasks without a sessionId are one-off tasks that automatically close the session
32
+ * upon completion (keep_alive=false).
33
+ * 2. Start a new task in an existing session (reuse for follow-up tasks or custom configuration)
34
+ *
35
+ * Important: Proxy configuration (proxyCountryCode) and other session settings (like keep_alive) are
36
+ * session-level settings, not task-level settings. For full control over session configuration,
37
+ * create a session first via POST /sessions with your desired settings, then pass that sessionId
38
+ * when creating tasks.
30
39
  *
31
40
  * @param {BrowserUse.CreateTaskRequest} request
32
41
  * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.