browser-use-sdk 2.0.11 → 2.0.12
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.
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/skills/client/Client.d.ts +19 -2
- package/dist/cjs/api/resources/skills/client/Client.js +73 -3
- package/dist/cjs/api/resources/skills/client/requests/CancelGenerationSkillsSkillIdCancelPostRequest.d.ts +9 -0
- package/dist/cjs/api/resources/skills/client/requests/CancelGenerationSkillsSkillIdCancelPostRequest.js +3 -0
- package/dist/cjs/api/resources/skills/client/requests/RollbackSkillSkillsSkillIdRollbackPostRequest.d.ts +9 -0
- package/dist/cjs/api/resources/skills/client/requests/RollbackSkillSkillsSkillIdRollbackPostRequest.js +3 -0
- package/dist/cjs/api/resources/skills/client/requests/index.d.ts +2 -1
- package/dist/cjs/api/types/CannotRollbackPublicSkillError.d.ts +6 -0
- package/dist/cjs/api/types/CannotRollbackPublicSkillError.js +3 -0
- package/dist/cjs/api/types/MarketplaceSkillResponse.d.ts +1 -1
- package/dist/cjs/api/types/ParameterSchema.d.ts +1 -0
- package/dist/cjs/api/types/ParameterType.d.ts +1 -0
- package/dist/cjs/api/types/ParameterType.js +1 -0
- package/dist/cjs/api/types/SkillResponse.d.ts +5 -1
- package/dist/cjs/api/types/index.d.ts +3 -4
- package/dist/cjs/api/types/index.js +3 -4
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/skills/client/Client.d.mts +19 -2
- package/dist/esm/api/resources/skills/client/Client.mjs +73 -3
- package/dist/esm/api/resources/skills/client/requests/CancelGenerationSkillsSkillIdCancelPostRequest.d.mts +9 -0
- package/dist/esm/api/resources/skills/client/requests/CancelGenerationSkillsSkillIdCancelPostRequest.mjs +2 -0
- package/dist/esm/api/resources/skills/client/requests/RollbackSkillSkillsSkillIdRollbackPostRequest.d.mts +9 -0
- package/dist/esm/api/resources/skills/client/requests/RollbackSkillSkillsSkillIdRollbackPostRequest.mjs +2 -0
- package/dist/esm/api/resources/skills/client/requests/index.d.mts +2 -1
- package/dist/esm/api/types/CannotRollbackPublicSkillError.d.mts +6 -0
- package/dist/esm/api/types/CannotRollbackPublicSkillError.mjs +2 -0
- package/dist/esm/api/types/MarketplaceSkillResponse.d.mts +1 -1
- package/dist/esm/api/types/ParameterSchema.d.mts +1 -0
- package/dist/esm/api/types/ParameterType.d.mts +1 -0
- package/dist/esm/api/types/ParameterType.mjs +1 -0
- package/dist/esm/api/types/SkillResponse.d.mts +5 -1
- package/dist/esm/api/types/index.d.mts +3 -4
- package/dist/esm/api/types/index.mjs +3 -4
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +66 -1
package/dist/cjs/Client.js
CHANGED
|
@@ -51,8 +51,8 @@ class BrowserUseClient {
|
|
|
51
51
|
this._options = Object.assign(Object.assign({}, _options), { logging: core.logging.createLogger(_options === null || _options === void 0 ? void 0 : _options.logging), headers: (0, headers_js_1.mergeHeaders)({
|
|
52
52
|
"X-Fern-Language": "JavaScript",
|
|
53
53
|
"X-Fern-SDK-Name": "browser-use-sdk",
|
|
54
|
-
"X-Fern-SDK-Version": "2.0.
|
|
55
|
-
"User-Agent": "browser-use-sdk/2.0.
|
|
54
|
+
"X-Fern-SDK-Version": "2.0.12",
|
|
55
|
+
"User-Agent": "browser-use-sdk/2.0.12",
|
|
56
56
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
57
57
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
58
58
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -92,7 +92,7 @@ export declare class Skills {
|
|
|
92
92
|
/**
|
|
93
93
|
* Cancel the current in-progress generation for a skill.
|
|
94
94
|
*
|
|
95
|
-
* @param {BrowserUse.
|
|
95
|
+
* @param {BrowserUse.CancelGenerationSkillsSkillIdCancelPostRequest} request
|
|
96
96
|
* @param {Skills.RequestOptions} requestOptions - Request-specific configuration.
|
|
97
97
|
*
|
|
98
98
|
* @throws {@link BrowserUse.BadRequestError}
|
|
@@ -104,8 +104,25 @@ export declare class Skills {
|
|
|
104
104
|
* skill_id: "skill_id"
|
|
105
105
|
* })
|
|
106
106
|
*/
|
|
107
|
-
cancelGeneration(request: BrowserUse.
|
|
107
|
+
cancelGeneration(request: BrowserUse.CancelGenerationSkillsSkillIdCancelPostRequest, requestOptions?: Skills.RequestOptions): core.HttpResponsePromise<BrowserUse.SkillResponse>;
|
|
108
108
|
private __cancelGeneration;
|
|
109
|
+
/**
|
|
110
|
+
* Rollback to the previous version (cannot be undone).
|
|
111
|
+
*
|
|
112
|
+
* @param {BrowserUse.RollbackSkillSkillsSkillIdRollbackPostRequest} request
|
|
113
|
+
* @param {Skills.RequestOptions} requestOptions - Request-specific configuration.
|
|
114
|
+
*
|
|
115
|
+
* @throws {@link BrowserUse.BadRequestError}
|
|
116
|
+
* @throws {@link BrowserUse.NotFoundError}
|
|
117
|
+
* @throws {@link BrowserUse.UnprocessableEntityError}
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* await client.skills.rollbackSkill({
|
|
121
|
+
* skill_id: "skill_id"
|
|
122
|
+
* })
|
|
123
|
+
*/
|
|
124
|
+
rollbackSkill(request: BrowserUse.RollbackSkillSkillsSkillIdRollbackPostRequest, requestOptions?: Skills.RequestOptions): core.HttpResponsePromise<BrowserUse.SkillResponse>;
|
|
125
|
+
private __rollbackSkill;
|
|
109
126
|
/**
|
|
110
127
|
* Execute a skill with the provided parameters.
|
|
111
128
|
*
|
|
@@ -428,7 +428,7 @@ class Skills {
|
|
|
428
428
|
/**
|
|
429
429
|
* Cancel the current in-progress generation for a skill.
|
|
430
430
|
*
|
|
431
|
-
* @param {BrowserUse.
|
|
431
|
+
* @param {BrowserUse.CancelGenerationSkillsSkillIdCancelPostRequest} request
|
|
432
432
|
* @param {Skills.RequestOptions} requestOptions - Request-specific configuration.
|
|
433
433
|
*
|
|
434
434
|
* @throws {@link BrowserUse.BadRequestError}
|
|
@@ -449,7 +449,7 @@ class Skills {
|
|
|
449
449
|
const { skill_id: skillId } = request;
|
|
450
450
|
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);
|
|
451
451
|
const _response = yield core.fetcher({
|
|
452
|
-
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)}/cancel
|
|
452
|
+
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)}/cancel`),
|
|
453
453
|
method: "POST",
|
|
454
454
|
headers: _headers,
|
|
455
455
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -486,7 +486,77 @@ class Skills {
|
|
|
486
486
|
rawResponse: _response.rawResponse,
|
|
487
487
|
});
|
|
488
488
|
case "timeout":
|
|
489
|
-
throw new errors.BrowserUseTimeoutError("Timeout exceeded when calling POST /skills/{skill_id}/cancel
|
|
489
|
+
throw new errors.BrowserUseTimeoutError("Timeout exceeded when calling POST /skills/{skill_id}/cancel.");
|
|
490
|
+
case "unknown":
|
|
491
|
+
throw new errors.BrowserUseError({
|
|
492
|
+
message: _response.error.errorMessage,
|
|
493
|
+
rawResponse: _response.rawResponse,
|
|
494
|
+
});
|
|
495
|
+
}
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
/**
|
|
499
|
+
* Rollback to the previous version (cannot be undone).
|
|
500
|
+
*
|
|
501
|
+
* @param {BrowserUse.RollbackSkillSkillsSkillIdRollbackPostRequest} request
|
|
502
|
+
* @param {Skills.RequestOptions} requestOptions - Request-specific configuration.
|
|
503
|
+
*
|
|
504
|
+
* @throws {@link BrowserUse.BadRequestError}
|
|
505
|
+
* @throws {@link BrowserUse.NotFoundError}
|
|
506
|
+
* @throws {@link BrowserUse.UnprocessableEntityError}
|
|
507
|
+
*
|
|
508
|
+
* @example
|
|
509
|
+
* await client.skills.rollbackSkill({
|
|
510
|
+
* skill_id: "skill_id"
|
|
511
|
+
* })
|
|
512
|
+
*/
|
|
513
|
+
rollbackSkill(request, requestOptions) {
|
|
514
|
+
return core.HttpResponsePromise.fromPromise(this.__rollbackSkill(request, requestOptions));
|
|
515
|
+
}
|
|
516
|
+
__rollbackSkill(request, requestOptions) {
|
|
517
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
518
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
519
|
+
const { skill_id: skillId } = request;
|
|
520
|
+
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);
|
|
521
|
+
const _response = yield core.fetcher({
|
|
522
|
+
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)}/rollback`),
|
|
523
|
+
method: "POST",
|
|
524
|
+
headers: _headers,
|
|
525
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
526
|
+
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,
|
|
527
|
+
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,
|
|
528
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
529
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
530
|
+
logging: this._options.logging,
|
|
531
|
+
});
|
|
532
|
+
if (_response.ok) {
|
|
533
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
534
|
+
}
|
|
535
|
+
if (_response.error.reason === "status-code") {
|
|
536
|
+
switch (_response.error.statusCode) {
|
|
537
|
+
case 400:
|
|
538
|
+
throw new BrowserUse.BadRequestError(_response.error.body, _response.rawResponse);
|
|
539
|
+
case 404:
|
|
540
|
+
throw new BrowserUse.NotFoundError(_response.error.body, _response.rawResponse);
|
|
541
|
+
case 422:
|
|
542
|
+
throw new BrowserUse.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
543
|
+
default:
|
|
544
|
+
throw new errors.BrowserUseError({
|
|
545
|
+
statusCode: _response.error.statusCode,
|
|
546
|
+
body: _response.error.body,
|
|
547
|
+
rawResponse: _response.rawResponse,
|
|
548
|
+
});
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
switch (_response.error.reason) {
|
|
552
|
+
case "non-json":
|
|
553
|
+
throw new errors.BrowserUseError({
|
|
554
|
+
statusCode: _response.error.statusCode,
|
|
555
|
+
body: _response.error.rawBody,
|
|
556
|
+
rawResponse: _response.rawResponse,
|
|
557
|
+
});
|
|
558
|
+
case "timeout":
|
|
559
|
+
throw new errors.BrowserUseTimeoutError("Timeout exceeded when calling POST /skills/{skill_id}/rollback.");
|
|
490
560
|
case "unknown":
|
|
491
561
|
throw new errors.BrowserUseError({
|
|
492
562
|
message: _response.error.errorMessage,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export type {
|
|
1
|
+
export type { CancelGenerationSkillsSkillIdCancelPostRequest } from "./CancelGenerationSkillsSkillIdCancelPostRequest.js";
|
|
2
2
|
export type { CreateSkillRequest } from "./CreateSkillRequest.js";
|
|
3
3
|
export type { DeleteSkillSkillsSkillIdDeleteRequest } from "./DeleteSkillSkillsSkillIdDeleteRequest.js";
|
|
4
4
|
export type { ExecuteSkillRequest } from "./ExecuteSkillRequest.js";
|
|
5
5
|
export type { GetSkillSkillsSkillIdGetRequest } from "./GetSkillSkillsSkillIdGetRequest.js";
|
|
6
6
|
export type { ListSkillsSkillsGetRequest } from "./ListSkillsSkillsGetRequest.js";
|
|
7
7
|
export type { RefineSkillRequest } from "./RefineSkillRequest.js";
|
|
8
|
+
export type { RollbackSkillSkillsSkillIdRollbackPostRequest } from "./RollbackSkillSkillsSkillIdRollbackPostRequest.js";
|
|
8
9
|
export type { UpdateSkillRequest } from "./UpdateSkillRequest.js";
|
|
@@ -10,7 +10,7 @@ export interface MarketplaceSkillResponse {
|
|
|
10
10
|
/** Description of the skill (shows up in the public view) */
|
|
11
11
|
description: string;
|
|
12
12
|
/** Input parameters of the skill */
|
|
13
|
-
parameters: BrowserUse.
|
|
13
|
+
parameters: BrowserUse.ParameterSchema[];
|
|
14
14
|
/** Output schema of the skill */
|
|
15
15
|
outputSchema: Record<string, unknown>;
|
|
16
16
|
/** Current version of the skill */
|
|
@@ -16,7 +16,7 @@ export interface SkillResponse {
|
|
|
16
16
|
/** Status of the skill */
|
|
17
17
|
status: BrowserUse.SkillsGenerationStatus;
|
|
18
18
|
/** Input parameters of the skill */
|
|
19
|
-
parameters: BrowserUse.
|
|
19
|
+
parameters: BrowserUse.ParameterSchema[];
|
|
20
20
|
/** Output schema of the skill */
|
|
21
21
|
outputSchema: Record<string, unknown>;
|
|
22
22
|
/** Whether the skill is enabled */
|
|
@@ -27,6 +27,10 @@ export interface SkillResponse {
|
|
|
27
27
|
isOwner: boolean;
|
|
28
28
|
/** Current version of the skill */
|
|
29
29
|
currentVersion: number | null;
|
|
30
|
+
/** When the current version started generating */
|
|
31
|
+
currentVersionStartedAt?: string | null;
|
|
32
|
+
/** When the current version finished generating */
|
|
33
|
+
currentVersionFinishedAt?: string | null;
|
|
30
34
|
/** Base64 encoded generated code (contact support@browser-use.com to get access) - ENTERPRISE ONLY */
|
|
31
35
|
code?: string | null;
|
|
32
36
|
/** Creation timestamp */
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
export * from "./AccountNotFoundError.js";
|
|
2
2
|
export * from "./AccountView.js";
|
|
3
|
-
export * from "./AppApiV2MarketplaceSkillsViewsParameterSchema.js";
|
|
4
|
-
export * from "./AppApiV2MarketplaceSkillsViewsParameterType.js";
|
|
5
3
|
export * from "./AppApiV2SkillsViewsInsufficientCreditsError.js";
|
|
6
|
-
export * from "./AppApiV2SkillsViewsParameterSchema.js";
|
|
7
|
-
export * from "./AppApiV2SkillsViewsParameterType.js";
|
|
8
4
|
export * from "./AppViewsV2ErrorViewsInsufficientCreditsError.js";
|
|
9
5
|
export * from "./BadRequestErrorBody.js";
|
|
10
6
|
export * from "./BrowserSessionItemView.js";
|
|
@@ -13,6 +9,7 @@ export * from "./BrowserSessionStatus.js";
|
|
|
13
9
|
export * from "./BrowserSessionUpdateAction.js";
|
|
14
10
|
export * from "./BrowserSessionView.js";
|
|
15
11
|
export * from "./CannotDeleteSkillWhileGeneratingError.js";
|
|
12
|
+
export * from "./CannotRollbackPublicSkillError.js";
|
|
16
13
|
export * from "./ConcurrentSkillCreationsError.js";
|
|
17
14
|
export * from "./CreateSkillResponse.js";
|
|
18
15
|
export * from "./DownloadUrlGenerationError.js";
|
|
@@ -25,6 +22,8 @@ export * from "./MarketplaceSkillListResponse.js";
|
|
|
25
22
|
export * from "./MarketplaceSkillResponse.js";
|
|
26
23
|
export * from "./NotFoundErrorBody.js";
|
|
27
24
|
export * from "./OutputFileNotFoundError.js";
|
|
25
|
+
export * from "./ParameterSchema.js";
|
|
26
|
+
export * from "./ParameterType.js";
|
|
28
27
|
export * from "./PlanInfo.js";
|
|
29
28
|
export * from "./ProfileListResponse.js";
|
|
30
29
|
export * from "./ProfileNotFoundError.js";
|
|
@@ -16,11 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./AccountNotFoundError.js"), exports);
|
|
18
18
|
__exportStar(require("./AccountView.js"), exports);
|
|
19
|
-
__exportStar(require("./AppApiV2MarketplaceSkillsViewsParameterSchema.js"), exports);
|
|
20
|
-
__exportStar(require("./AppApiV2MarketplaceSkillsViewsParameterType.js"), exports);
|
|
21
19
|
__exportStar(require("./AppApiV2SkillsViewsInsufficientCreditsError.js"), exports);
|
|
22
|
-
__exportStar(require("./AppApiV2SkillsViewsParameterSchema.js"), exports);
|
|
23
|
-
__exportStar(require("./AppApiV2SkillsViewsParameterType.js"), exports);
|
|
24
20
|
__exportStar(require("./AppViewsV2ErrorViewsInsufficientCreditsError.js"), exports);
|
|
25
21
|
__exportStar(require("./BadRequestErrorBody.js"), exports);
|
|
26
22
|
__exportStar(require("./BrowserSessionItemView.js"), exports);
|
|
@@ -29,6 +25,7 @@ __exportStar(require("./BrowserSessionStatus.js"), exports);
|
|
|
29
25
|
__exportStar(require("./BrowserSessionUpdateAction.js"), exports);
|
|
30
26
|
__exportStar(require("./BrowserSessionView.js"), exports);
|
|
31
27
|
__exportStar(require("./CannotDeleteSkillWhileGeneratingError.js"), exports);
|
|
28
|
+
__exportStar(require("./CannotRollbackPublicSkillError.js"), exports);
|
|
32
29
|
__exportStar(require("./ConcurrentSkillCreationsError.js"), exports);
|
|
33
30
|
__exportStar(require("./CreateSkillResponse.js"), exports);
|
|
34
31
|
__exportStar(require("./DownloadUrlGenerationError.js"), exports);
|
|
@@ -41,6 +38,8 @@ __exportStar(require("./MarketplaceSkillListResponse.js"), exports);
|
|
|
41
38
|
__exportStar(require("./MarketplaceSkillResponse.js"), exports);
|
|
42
39
|
__exportStar(require("./NotFoundErrorBody.js"), exports);
|
|
43
40
|
__exportStar(require("./OutputFileNotFoundError.js"), exports);
|
|
41
|
+
__exportStar(require("./ParameterSchema.js"), exports);
|
|
42
|
+
__exportStar(require("./ParameterType.js"), exports);
|
|
44
43
|
__exportStar(require("./PlanInfo.js"), exports);
|
|
45
44
|
__exportStar(require("./ProfileListResponse.js"), exports);
|
|
46
45
|
__exportStar(require("./ProfileNotFoundError.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.0.
|
|
1
|
+
export declare const SDK_VERSION = "2.0.12";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -15,8 +15,8 @@ export class BrowserUseClient {
|
|
|
15
15
|
this._options = Object.assign(Object.assign({}, _options), { logging: core.logging.createLogger(_options === null || _options === void 0 ? void 0 : _options.logging), headers: mergeHeaders({
|
|
16
16
|
"X-Fern-Language": "JavaScript",
|
|
17
17
|
"X-Fern-SDK-Name": "browser-use-sdk",
|
|
18
|
-
"X-Fern-SDK-Version": "2.0.
|
|
19
|
-
"User-Agent": "browser-use-sdk/2.0.
|
|
18
|
+
"X-Fern-SDK-Version": "2.0.12",
|
|
19
|
+
"User-Agent": "browser-use-sdk/2.0.12",
|
|
20
20
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
21
21
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
22
22
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -92,7 +92,7 @@ export declare class Skills {
|
|
|
92
92
|
/**
|
|
93
93
|
* Cancel the current in-progress generation for a skill.
|
|
94
94
|
*
|
|
95
|
-
* @param {BrowserUse.
|
|
95
|
+
* @param {BrowserUse.CancelGenerationSkillsSkillIdCancelPostRequest} request
|
|
96
96
|
* @param {Skills.RequestOptions} requestOptions - Request-specific configuration.
|
|
97
97
|
*
|
|
98
98
|
* @throws {@link BrowserUse.BadRequestError}
|
|
@@ -104,8 +104,25 @@ export declare class Skills {
|
|
|
104
104
|
* skill_id: "skill_id"
|
|
105
105
|
* })
|
|
106
106
|
*/
|
|
107
|
-
cancelGeneration(request: BrowserUse.
|
|
107
|
+
cancelGeneration(request: BrowserUse.CancelGenerationSkillsSkillIdCancelPostRequest, requestOptions?: Skills.RequestOptions): core.HttpResponsePromise<BrowserUse.SkillResponse>;
|
|
108
108
|
private __cancelGeneration;
|
|
109
|
+
/**
|
|
110
|
+
* Rollback to the previous version (cannot be undone).
|
|
111
|
+
*
|
|
112
|
+
* @param {BrowserUse.RollbackSkillSkillsSkillIdRollbackPostRequest} request
|
|
113
|
+
* @param {Skills.RequestOptions} requestOptions - Request-specific configuration.
|
|
114
|
+
*
|
|
115
|
+
* @throws {@link BrowserUse.BadRequestError}
|
|
116
|
+
* @throws {@link BrowserUse.NotFoundError}
|
|
117
|
+
* @throws {@link BrowserUse.UnprocessableEntityError}
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* await client.skills.rollbackSkill({
|
|
121
|
+
* skill_id: "skill_id"
|
|
122
|
+
* })
|
|
123
|
+
*/
|
|
124
|
+
rollbackSkill(request: BrowserUse.RollbackSkillSkillsSkillIdRollbackPostRequest, requestOptions?: Skills.RequestOptions): core.HttpResponsePromise<BrowserUse.SkillResponse>;
|
|
125
|
+
private __rollbackSkill;
|
|
109
126
|
/**
|
|
110
127
|
* Execute a skill with the provided parameters.
|
|
111
128
|
*
|
|
@@ -392,7 +392,7 @@ export class Skills {
|
|
|
392
392
|
/**
|
|
393
393
|
* Cancel the current in-progress generation for a skill.
|
|
394
394
|
*
|
|
395
|
-
* @param {BrowserUse.
|
|
395
|
+
* @param {BrowserUse.CancelGenerationSkillsSkillIdCancelPostRequest} request
|
|
396
396
|
* @param {Skills.RequestOptions} requestOptions - Request-specific configuration.
|
|
397
397
|
*
|
|
398
398
|
* @throws {@link BrowserUse.BadRequestError}
|
|
@@ -413,7 +413,7 @@ export class Skills {
|
|
|
413
413
|
const { skill_id: skillId } = request;
|
|
414
414
|
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
415
415
|
const _response = yield core.fetcher({
|
|
416
|
-
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)}/cancel
|
|
416
|
+
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)}/cancel`),
|
|
417
417
|
method: "POST",
|
|
418
418
|
headers: _headers,
|
|
419
419
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -450,7 +450,77 @@ export class Skills {
|
|
|
450
450
|
rawResponse: _response.rawResponse,
|
|
451
451
|
});
|
|
452
452
|
case "timeout":
|
|
453
|
-
throw new errors.BrowserUseTimeoutError("Timeout exceeded when calling POST /skills/{skill_id}/cancel
|
|
453
|
+
throw new errors.BrowserUseTimeoutError("Timeout exceeded when calling POST /skills/{skill_id}/cancel.");
|
|
454
|
+
case "unknown":
|
|
455
|
+
throw new errors.BrowserUseError({
|
|
456
|
+
message: _response.error.errorMessage,
|
|
457
|
+
rawResponse: _response.rawResponse,
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* Rollback to the previous version (cannot be undone).
|
|
464
|
+
*
|
|
465
|
+
* @param {BrowserUse.RollbackSkillSkillsSkillIdRollbackPostRequest} request
|
|
466
|
+
* @param {Skills.RequestOptions} requestOptions - Request-specific configuration.
|
|
467
|
+
*
|
|
468
|
+
* @throws {@link BrowserUse.BadRequestError}
|
|
469
|
+
* @throws {@link BrowserUse.NotFoundError}
|
|
470
|
+
* @throws {@link BrowserUse.UnprocessableEntityError}
|
|
471
|
+
*
|
|
472
|
+
* @example
|
|
473
|
+
* await client.skills.rollbackSkill({
|
|
474
|
+
* skill_id: "skill_id"
|
|
475
|
+
* })
|
|
476
|
+
*/
|
|
477
|
+
rollbackSkill(request, requestOptions) {
|
|
478
|
+
return core.HttpResponsePromise.fromPromise(this.__rollbackSkill(request, requestOptions));
|
|
479
|
+
}
|
|
480
|
+
__rollbackSkill(request, requestOptions) {
|
|
481
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
482
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
483
|
+
const { skill_id: skillId } = request;
|
|
484
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
485
|
+
const _response = yield core.fetcher({
|
|
486
|
+
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)}/rollback`),
|
|
487
|
+
method: "POST",
|
|
488
|
+
headers: _headers,
|
|
489
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
490
|
+
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,
|
|
491
|
+
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,
|
|
492
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
493
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
494
|
+
logging: this._options.logging,
|
|
495
|
+
});
|
|
496
|
+
if (_response.ok) {
|
|
497
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
498
|
+
}
|
|
499
|
+
if (_response.error.reason === "status-code") {
|
|
500
|
+
switch (_response.error.statusCode) {
|
|
501
|
+
case 400:
|
|
502
|
+
throw new BrowserUse.BadRequestError(_response.error.body, _response.rawResponse);
|
|
503
|
+
case 404:
|
|
504
|
+
throw new BrowserUse.NotFoundError(_response.error.body, _response.rawResponse);
|
|
505
|
+
case 422:
|
|
506
|
+
throw new BrowserUse.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
507
|
+
default:
|
|
508
|
+
throw new errors.BrowserUseError({
|
|
509
|
+
statusCode: _response.error.statusCode,
|
|
510
|
+
body: _response.error.body,
|
|
511
|
+
rawResponse: _response.rawResponse,
|
|
512
|
+
});
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
switch (_response.error.reason) {
|
|
516
|
+
case "non-json":
|
|
517
|
+
throw new errors.BrowserUseError({
|
|
518
|
+
statusCode: _response.error.statusCode,
|
|
519
|
+
body: _response.error.rawBody,
|
|
520
|
+
rawResponse: _response.rawResponse,
|
|
521
|
+
});
|
|
522
|
+
case "timeout":
|
|
523
|
+
throw new errors.BrowserUseTimeoutError("Timeout exceeded when calling POST /skills/{skill_id}/rollback.");
|
|
454
524
|
case "unknown":
|
|
455
525
|
throw new errors.BrowserUseError({
|
|
456
526
|
message: _response.error.errorMessage,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export type {
|
|
1
|
+
export type { CancelGenerationSkillsSkillIdCancelPostRequest } from "./CancelGenerationSkillsSkillIdCancelPostRequest.mjs";
|
|
2
2
|
export type { CreateSkillRequest } from "./CreateSkillRequest.mjs";
|
|
3
3
|
export type { DeleteSkillSkillsSkillIdDeleteRequest } from "./DeleteSkillSkillsSkillIdDeleteRequest.mjs";
|
|
4
4
|
export type { ExecuteSkillRequest } from "./ExecuteSkillRequest.mjs";
|
|
5
5
|
export type { GetSkillSkillsSkillIdGetRequest } from "./GetSkillSkillsSkillIdGetRequest.mjs";
|
|
6
6
|
export type { ListSkillsSkillsGetRequest } from "./ListSkillsSkillsGetRequest.mjs";
|
|
7
7
|
export type { RefineSkillRequest } from "./RefineSkillRequest.mjs";
|
|
8
|
+
export type { RollbackSkillSkillsSkillIdRollbackPostRequest } from "./RollbackSkillSkillsSkillIdRollbackPostRequest.mjs";
|
|
8
9
|
export type { UpdateSkillRequest } from "./UpdateSkillRequest.mjs";
|
|
@@ -10,7 +10,7 @@ export interface MarketplaceSkillResponse {
|
|
|
10
10
|
/** Description of the skill (shows up in the public view) */
|
|
11
11
|
description: string;
|
|
12
12
|
/** Input parameters of the skill */
|
|
13
|
-
parameters: BrowserUse.
|
|
13
|
+
parameters: BrowserUse.ParameterSchema[];
|
|
14
14
|
/** Output schema of the skill */
|
|
15
15
|
outputSchema: Record<string, unknown>;
|
|
16
16
|
/** Current version of the skill */
|
|
@@ -16,7 +16,7 @@ export interface SkillResponse {
|
|
|
16
16
|
/** Status of the skill */
|
|
17
17
|
status: BrowserUse.SkillsGenerationStatus;
|
|
18
18
|
/** Input parameters of the skill */
|
|
19
|
-
parameters: BrowserUse.
|
|
19
|
+
parameters: BrowserUse.ParameterSchema[];
|
|
20
20
|
/** Output schema of the skill */
|
|
21
21
|
outputSchema: Record<string, unknown>;
|
|
22
22
|
/** Whether the skill is enabled */
|
|
@@ -27,6 +27,10 @@ export interface SkillResponse {
|
|
|
27
27
|
isOwner: boolean;
|
|
28
28
|
/** Current version of the skill */
|
|
29
29
|
currentVersion: number | null;
|
|
30
|
+
/** When the current version started generating */
|
|
31
|
+
currentVersionStartedAt?: string | null;
|
|
32
|
+
/** When the current version finished generating */
|
|
33
|
+
currentVersionFinishedAt?: string | null;
|
|
30
34
|
/** Base64 encoded generated code (contact support@browser-use.com to get access) - ENTERPRISE ONLY */
|
|
31
35
|
code?: string | null;
|
|
32
36
|
/** Creation timestamp */
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
export * from "./AccountNotFoundError.mjs";
|
|
2
2
|
export * from "./AccountView.mjs";
|
|
3
|
-
export * from "./AppApiV2MarketplaceSkillsViewsParameterSchema.mjs";
|
|
4
|
-
export * from "./AppApiV2MarketplaceSkillsViewsParameterType.mjs";
|
|
5
3
|
export * from "./AppApiV2SkillsViewsInsufficientCreditsError.mjs";
|
|
6
|
-
export * from "./AppApiV2SkillsViewsParameterSchema.mjs";
|
|
7
|
-
export * from "./AppApiV2SkillsViewsParameterType.mjs";
|
|
8
4
|
export * from "./AppViewsV2ErrorViewsInsufficientCreditsError.mjs";
|
|
9
5
|
export * from "./BadRequestErrorBody.mjs";
|
|
10
6
|
export * from "./BrowserSessionItemView.mjs";
|
|
@@ -13,6 +9,7 @@ export * from "./BrowserSessionStatus.mjs";
|
|
|
13
9
|
export * from "./BrowserSessionUpdateAction.mjs";
|
|
14
10
|
export * from "./BrowserSessionView.mjs";
|
|
15
11
|
export * from "./CannotDeleteSkillWhileGeneratingError.mjs";
|
|
12
|
+
export * from "./CannotRollbackPublicSkillError.mjs";
|
|
16
13
|
export * from "./ConcurrentSkillCreationsError.mjs";
|
|
17
14
|
export * from "./CreateSkillResponse.mjs";
|
|
18
15
|
export * from "./DownloadUrlGenerationError.mjs";
|
|
@@ -25,6 +22,8 @@ export * from "./MarketplaceSkillListResponse.mjs";
|
|
|
25
22
|
export * from "./MarketplaceSkillResponse.mjs";
|
|
26
23
|
export * from "./NotFoundErrorBody.mjs";
|
|
27
24
|
export * from "./OutputFileNotFoundError.mjs";
|
|
25
|
+
export * from "./ParameterSchema.mjs";
|
|
26
|
+
export * from "./ParameterType.mjs";
|
|
28
27
|
export * from "./PlanInfo.mjs";
|
|
29
28
|
export * from "./ProfileListResponse.mjs";
|
|
30
29
|
export * from "./ProfileNotFoundError.mjs";
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
export * from "./AccountNotFoundError.mjs";
|
|
2
2
|
export * from "./AccountView.mjs";
|
|
3
|
-
export * from "./AppApiV2MarketplaceSkillsViewsParameterSchema.mjs";
|
|
4
|
-
export * from "./AppApiV2MarketplaceSkillsViewsParameterType.mjs";
|
|
5
3
|
export * from "./AppApiV2SkillsViewsInsufficientCreditsError.mjs";
|
|
6
|
-
export * from "./AppApiV2SkillsViewsParameterSchema.mjs";
|
|
7
|
-
export * from "./AppApiV2SkillsViewsParameterType.mjs";
|
|
8
4
|
export * from "./AppViewsV2ErrorViewsInsufficientCreditsError.mjs";
|
|
9
5
|
export * from "./BadRequestErrorBody.mjs";
|
|
10
6
|
export * from "./BrowserSessionItemView.mjs";
|
|
@@ -13,6 +9,7 @@ export * from "./BrowserSessionStatus.mjs";
|
|
|
13
9
|
export * from "./BrowserSessionUpdateAction.mjs";
|
|
14
10
|
export * from "./BrowserSessionView.mjs";
|
|
15
11
|
export * from "./CannotDeleteSkillWhileGeneratingError.mjs";
|
|
12
|
+
export * from "./CannotRollbackPublicSkillError.mjs";
|
|
16
13
|
export * from "./ConcurrentSkillCreationsError.mjs";
|
|
17
14
|
export * from "./CreateSkillResponse.mjs";
|
|
18
15
|
export * from "./DownloadUrlGenerationError.mjs";
|
|
@@ -25,6 +22,8 @@ export * from "./MarketplaceSkillListResponse.mjs";
|
|
|
25
22
|
export * from "./MarketplaceSkillResponse.mjs";
|
|
26
23
|
export * from "./NotFoundErrorBody.mjs";
|
|
27
24
|
export * from "./OutputFileNotFoundError.mjs";
|
|
25
|
+
export * from "./ParameterSchema.mjs";
|
|
26
|
+
export * from "./ParameterType.mjs";
|
|
28
27
|
export * from "./PlanInfo.mjs";
|
|
29
28
|
export * from "./ProfileListResponse.mjs";
|
|
30
29
|
export * from "./ProfileNotFoundError.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.0.
|
|
1
|
+
export declare const SDK_VERSION = "2.0.12";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "2.0.
|
|
1
|
+
export const SDK_VERSION = "2.0.12";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -2077,7 +2077,72 @@ await client.skills.cancelGeneration({
|
|
|
2077
2077
|
<dl>
|
|
2078
2078
|
<dd>
|
|
2079
2079
|
|
|
2080
|
-
**request:** `BrowserUse.
|
|
2080
|
+
**request:** `BrowserUse.CancelGenerationSkillsSkillIdCancelPostRequest`
|
|
2081
|
+
|
|
2082
|
+
</dd>
|
|
2083
|
+
</dl>
|
|
2084
|
+
|
|
2085
|
+
<dl>
|
|
2086
|
+
<dd>
|
|
2087
|
+
|
|
2088
|
+
**requestOptions:** `Skills.RequestOptions`
|
|
2089
|
+
|
|
2090
|
+
</dd>
|
|
2091
|
+
</dl>
|
|
2092
|
+
</dd>
|
|
2093
|
+
</dl>
|
|
2094
|
+
|
|
2095
|
+
|
|
2096
|
+
</dd>
|
|
2097
|
+
</dl>
|
|
2098
|
+
</details>
|
|
2099
|
+
|
|
2100
|
+
<details><summary><code>client.skills.<a href="/src/api/resources/skills/client/Client.ts">rollbackSkill</a>({ ...params }) -> BrowserUse.SkillResponse</code></summary>
|
|
2101
|
+
<dl>
|
|
2102
|
+
<dd>
|
|
2103
|
+
|
|
2104
|
+
#### 📝 Description
|
|
2105
|
+
|
|
2106
|
+
<dl>
|
|
2107
|
+
<dd>
|
|
2108
|
+
|
|
2109
|
+
<dl>
|
|
2110
|
+
<dd>
|
|
2111
|
+
|
|
2112
|
+
Rollback to the previous version (cannot be undone).
|
|
2113
|
+
</dd>
|
|
2114
|
+
</dl>
|
|
2115
|
+
</dd>
|
|
2116
|
+
</dl>
|
|
2117
|
+
|
|
2118
|
+
#### 🔌 Usage
|
|
2119
|
+
|
|
2120
|
+
<dl>
|
|
2121
|
+
<dd>
|
|
2122
|
+
|
|
2123
|
+
<dl>
|
|
2124
|
+
<dd>
|
|
2125
|
+
|
|
2126
|
+
```typescript
|
|
2127
|
+
await client.skills.rollbackSkill({
|
|
2128
|
+
skill_id: "skill_id"
|
|
2129
|
+
});
|
|
2130
|
+
|
|
2131
|
+
```
|
|
2132
|
+
</dd>
|
|
2133
|
+
</dl>
|
|
2134
|
+
</dd>
|
|
2135
|
+
</dl>
|
|
2136
|
+
|
|
2137
|
+
#### ⚙️ Parameters
|
|
2138
|
+
|
|
2139
|
+
<dl>
|
|
2140
|
+
<dd>
|
|
2141
|
+
|
|
2142
|
+
<dl>
|
|
2143
|
+
<dd>
|
|
2144
|
+
|
|
2145
|
+
**request:** `BrowserUse.RollbackSkillSkillsSkillIdRollbackPostRequest`
|
|
2081
2146
|
|
|
2082
2147
|
</dd>
|
|
2083
2148
|
</dl>
|