browser-use-sdk 2.0.6 → 2.0.8
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/browsers/client/requests/CreateBrowserSessionRequest.d.ts +4 -0
- package/dist/cjs/api/resources/index.d.ts +0 -1
- package/dist/cjs/api/resources/index.js +0 -1
- package/dist/cjs/api/resources/sessions/client/Client.d.ts +16 -0
- package/dist/cjs/api/resources/sessions/client/Client.js +67 -0
- package/dist/cjs/api/resources/sessions/client/requests/CreateSessionRequest.d.ts +4 -0
- package/dist/cjs/api/resources/sessions/client/requests/DeleteSessionSessionsSessionIdDeleteRequest.d.ts +9 -0
- package/dist/cjs/api/resources/sessions/client/requests/DeleteSessionSessionsSessionIdDeleteRequest.js +3 -0
- package/dist/cjs/api/resources/sessions/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/tasks/client/requests/CreateTaskRequest.d.ts +6 -0
- package/dist/cjs/api/resources/workflows/client/Client.d.ts +63 -6
- package/dist/cjs/api/resources/workflows/client/Client.js +222 -9
- package/dist/cjs/api/resources/workflows/client/requests/GetExecutionMediaWorkflowsExecutionsExecutionIdMediaGetRequest.d.ts +9 -0
- package/dist/cjs/api/resources/workflows/client/requests/GetExecutionMediaWorkflowsExecutionsExecutionIdMediaGetRequest.js +3 -0
- package/dist/cjs/api/resources/workflows/client/requests/GetExecutionStateWorkflowsExecutionsExecutionIdStateGetRequest.d.ts +9 -0
- package/dist/cjs/api/resources/workflows/client/requests/GetExecutionStateWorkflowsExecutionsExecutionIdStateGetRequest.js +3 -0
- package/dist/cjs/api/resources/workflows/client/requests/GetWorkflowGenerationStateWorkflowsWorkflowIdGenerationStateGetRequest.d.ts +9 -0
- package/dist/cjs/api/resources/workflows/client/requests/GetWorkflowGenerationStateWorkflowsWorkflowIdGenerationStateGetRequest.js +3 -0
- package/dist/cjs/api/resources/workflows/client/requests/WorkflowExecuteRequest.d.ts +0 -3
- package/dist/cjs/api/resources/workflows/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/workflows/index.d.ts +0 -1
- package/dist/cjs/api/resources/workflows/index.js +0 -1
- package/dist/cjs/api/types/SupportedLlMs.d.ts +2 -0
- package/dist/cjs/api/types/SupportedLlMs.js +2 -0
- package/dist/cjs/api/types/TaskItemView.d.ts +4 -0
- package/dist/cjs/api/types/TaskView.d.ts +5 -1
- package/dist/cjs/api/types/WorkflowExecutionMediaStepView.d.ts +13 -0
- package/dist/cjs/api/types/WorkflowExecutionMediaStepView.js +3 -0
- package/dist/cjs/api/types/WorkflowExecutionMediaView.d.ts +8 -0
- package/dist/cjs/api/types/WorkflowExecutionMediaView.js +3 -0
- package/dist/cjs/api/types/WorkflowExecutionStateView.d.ts +28 -0
- package/dist/cjs/api/types/WorkflowExecutionStateView.js +3 -0
- package/dist/cjs/api/types/WorkflowExecutionStepView.d.ts +29 -0
- package/dist/cjs/api/types/WorkflowExecutionStepView.js +3 -0
- package/dist/cjs/api/types/WorkflowGenerationStateView.d.ts +18 -0
- package/dist/cjs/api/types/WorkflowGenerationStateView.js +3 -0
- package/dist/cjs/api/types/WorkflowGenerationStepView.d.ts +19 -0
- package/dist/cjs/api/types/WorkflowGenerationStepView.js +3 -0
- package/dist/cjs/api/types/index.d.ts +6 -1
- package/dist/cjs/api/types/index.js +6 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/wrapper/lib/parse.js +10 -7
- package/dist/cjs/wrapper/lib/webhooks.d.ts +2 -2
- package/dist/cjs/wrapper/lib/webhooks.js +3 -3
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/browsers/client/requests/CreateBrowserSessionRequest.d.mts +4 -0
- package/dist/esm/api/resources/index.d.mts +0 -1
- package/dist/esm/api/resources/index.mjs +0 -1
- package/dist/esm/api/resources/sessions/client/Client.d.mts +16 -0
- package/dist/esm/api/resources/sessions/client/Client.mjs +67 -0
- package/dist/esm/api/resources/sessions/client/requests/CreateSessionRequest.d.mts +4 -0
- package/dist/esm/api/resources/sessions/client/requests/DeleteSessionSessionsSessionIdDeleteRequest.d.mts +9 -0
- package/dist/esm/api/resources/sessions/client/requests/DeleteSessionSessionsSessionIdDeleteRequest.mjs +2 -0
- package/dist/esm/api/resources/sessions/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/tasks/client/requests/CreateTaskRequest.d.mts +6 -0
- package/dist/esm/api/resources/workflows/client/Client.d.mts +63 -6
- package/dist/esm/api/resources/workflows/client/Client.mjs +222 -9
- package/dist/esm/api/resources/workflows/client/requests/GetExecutionMediaWorkflowsExecutionsExecutionIdMediaGetRequest.d.mts +9 -0
- package/dist/esm/api/resources/workflows/client/requests/GetExecutionMediaWorkflowsExecutionsExecutionIdMediaGetRequest.mjs +2 -0
- package/dist/esm/api/resources/workflows/client/requests/GetExecutionStateWorkflowsExecutionsExecutionIdStateGetRequest.d.mts +9 -0
- package/dist/esm/api/resources/workflows/client/requests/GetExecutionStateWorkflowsExecutionsExecutionIdStateGetRequest.mjs +2 -0
- package/dist/esm/api/resources/workflows/client/requests/GetWorkflowGenerationStateWorkflowsWorkflowIdGenerationStateGetRequest.d.mts +9 -0
- package/dist/esm/api/resources/workflows/client/requests/GetWorkflowGenerationStateWorkflowsWorkflowIdGenerationStateGetRequest.mjs +2 -0
- package/dist/esm/api/resources/workflows/client/requests/WorkflowExecuteRequest.d.mts +0 -3
- package/dist/esm/api/resources/workflows/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/workflows/index.d.mts +0 -1
- package/dist/esm/api/resources/workflows/index.mjs +0 -1
- package/dist/esm/api/types/SupportedLlMs.d.mts +2 -0
- package/dist/esm/api/types/SupportedLlMs.mjs +2 -0
- package/dist/esm/api/types/TaskItemView.d.mts +4 -0
- package/dist/esm/api/types/TaskView.d.mts +5 -1
- package/dist/esm/api/types/WorkflowExecutionMediaStepView.d.mts +13 -0
- package/dist/esm/api/types/WorkflowExecutionMediaStepView.mjs +2 -0
- package/dist/esm/api/types/WorkflowExecutionMediaView.d.mts +8 -0
- package/dist/esm/api/types/WorkflowExecutionMediaView.mjs +2 -0
- package/dist/esm/api/types/WorkflowExecutionStateView.d.mts +28 -0
- package/dist/esm/api/types/WorkflowExecutionStateView.mjs +2 -0
- package/dist/esm/api/types/WorkflowExecutionStepView.d.mts +29 -0
- package/dist/esm/api/types/WorkflowExecutionStepView.mjs +2 -0
- package/dist/esm/api/types/WorkflowGenerationStateView.d.mts +18 -0
- package/dist/esm/api/types/WorkflowGenerationStateView.mjs +2 -0
- package/dist/esm/api/types/WorkflowGenerationStepView.d.mts +19 -0
- package/dist/esm/api/types/WorkflowGenerationStepView.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +6 -1
- package/dist/esm/api/types/index.mjs +6 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/esm/wrapper/lib/parse.mjs +10 -7
- package/dist/esm/wrapper/lib/webhooks.d.mts +2 -2
- package/dist/esm/wrapper/lib/webhooks.mjs +3 -3
- package/package.json +82 -83
- package/reference.md +277 -5
|
@@ -82,6 +82,8 @@ export function wrapCreateTaskResponse(client, response, schema) {
|
|
|
82
82
|
switch (res.status) {
|
|
83
83
|
case "finished":
|
|
84
84
|
case "stopped":
|
|
85
|
+
break poll;
|
|
86
|
+
case "created":
|
|
85
87
|
case "started":
|
|
86
88
|
yield __await(new Promise((resolve) => setTimeout(resolve, intervalMs)));
|
|
87
89
|
break;
|
|
@@ -158,13 +160,14 @@ export function wrapCreateTaskResponse(client, response, schema) {
|
|
|
158
160
|
_c = _f.value;
|
|
159
161
|
_d = false;
|
|
160
162
|
const msg = _c;
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
163
|
+
// Return on terminal statuses
|
|
164
|
+
if (msg.data.status === "finished" || msg.data.status === "stopped") {
|
|
165
|
+
if (schema != null) {
|
|
166
|
+
return parseStructuredTaskOutput(msg.data, schema);
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
return msg.data;
|
|
170
|
+
}
|
|
168
171
|
}
|
|
169
172
|
}
|
|
170
173
|
}
|
|
@@ -85,8 +85,8 @@ export declare function verifyWebhookEventSignature(evt: {
|
|
|
85
85
|
/**
|
|
86
86
|
* Creates a webhook signature for the given payload, timestamp, and secret.
|
|
87
87
|
*/
|
|
88
|
-
export declare function createWebhookSignature({
|
|
89
|
-
|
|
88
|
+
export declare function createWebhookSignature({ body, timestamp, secret, }: {
|
|
89
|
+
body: unknown;
|
|
90
90
|
timestamp: string;
|
|
91
91
|
secret: string;
|
|
92
92
|
}): string;
|
|
@@ -61,7 +61,7 @@ export function verifyWebhookEventSignature(evt, cfg) {
|
|
|
61
61
|
return { ok: false };
|
|
62
62
|
}
|
|
63
63
|
const signature = createWebhookSignature({
|
|
64
|
-
|
|
64
|
+
body: event.data, // NOTE: We need to encrypt the entire body, not just the payload
|
|
65
65
|
timestamp: evt.timestamp,
|
|
66
66
|
secret: cfg.secret,
|
|
67
67
|
});
|
|
@@ -80,8 +80,8 @@ export function verifyWebhookEventSignature(evt, cfg) {
|
|
|
80
80
|
/**
|
|
81
81
|
* Creates a webhook signature for the given payload, timestamp, and secret.
|
|
82
82
|
*/
|
|
83
|
-
export function createWebhookSignature({
|
|
84
|
-
const dump = stringify(
|
|
83
|
+
export function createWebhookSignature({ body, timestamp, secret, }) {
|
|
84
|
+
const dump = stringify(body);
|
|
85
85
|
const message = `${timestamp}.${dump}`;
|
|
86
86
|
const hmac = createHmac("sha256", secret);
|
|
87
87
|
hmac.update(message);
|
package/package.json
CHANGED
|
@@ -1,85 +1,84 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
"./package.json": "./package.json"
|
|
2
|
+
"name": "browser-use-sdk",
|
|
3
|
+
"version": "2.0.8",
|
|
4
|
+
"private": false,
|
|
5
|
+
"repository": "github:browser-use/browser-use-node",
|
|
6
|
+
"type": "commonjs",
|
|
7
|
+
"main": "./dist/cjs/index.js",
|
|
8
|
+
"module": "./dist/esm/index.mjs",
|
|
9
|
+
"types": "./dist/cjs/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/cjs/index.d.ts",
|
|
13
|
+
"import": {
|
|
14
|
+
"types": "./dist/esm/index.d.mts",
|
|
15
|
+
"default": "./dist/esm/index.mjs"
|
|
16
|
+
},
|
|
17
|
+
"require": {
|
|
18
|
+
"types": "./dist/cjs/index.d.ts",
|
|
19
|
+
"default": "./dist/cjs/index.js"
|
|
20
|
+
},
|
|
21
|
+
"default": "./dist/cjs/index.js"
|
|
24
22
|
},
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
23
|
+
"./package.json": "./package.json"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"dist",
|
|
27
|
+
"reference.md",
|
|
28
|
+
"README.md",
|
|
29
|
+
"LICENSE"
|
|
30
|
+
],
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"fast-json-stable-stringify": "^2.1.0"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"react": "^18 || ^19",
|
|
36
|
+
"zod": "^4"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"webpack": "^5.97.1",
|
|
40
|
+
"ts-loader": "^9.5.1",
|
|
41
|
+
"vitest": "^3.2.4",
|
|
42
|
+
"msw": "2.11.2",
|
|
43
|
+
"@types/node": "^18.19.70",
|
|
44
|
+
"typescript": "~5.7.2",
|
|
45
|
+
"@biomejs/biome": "2.3.1",
|
|
46
|
+
"@dotenvx/dotenvx": "^1.49.0",
|
|
47
|
+
"react": "^19.1.1",
|
|
48
|
+
"react-dom": "^19.1.1",
|
|
49
|
+
"tsconfig-paths": "^4.2.0",
|
|
50
|
+
"ts-node": "^10.5.0",
|
|
51
|
+
"zod": "^4"
|
|
52
|
+
},
|
|
53
|
+
"browser": {
|
|
54
|
+
"fs": false,
|
|
55
|
+
"os": false,
|
|
56
|
+
"path": false,
|
|
57
|
+
"stream": false
|
|
58
|
+
},
|
|
59
|
+
"engines": {
|
|
60
|
+
"node": ">=18.0.0"
|
|
61
|
+
},
|
|
62
|
+
"sideEffects": false,
|
|
63
|
+
"description": "The official TypeScript library for the Browser Use API",
|
|
64
|
+
"author": {
|
|
65
|
+
"name": "Browser Use",
|
|
66
|
+
"url": "https://browser-use.com",
|
|
67
|
+
"email": "support@browser-use.com"
|
|
68
|
+
},
|
|
69
|
+
"scripts": {
|
|
70
|
+
"format": "biome format --write --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
|
|
71
|
+
"format:check": "biome format --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
|
|
72
|
+
"lint": "biome lint --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
|
|
73
|
+
"lint:fix": "biome lint --fix --unsafe --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
|
|
74
|
+
"check": "biome check --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
|
|
75
|
+
"check:fix": "biome check --fix --unsafe --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
|
|
76
|
+
"build": "pnpm build:cjs && pnpm build:esm",
|
|
77
|
+
"build:cjs": "tsc --project ./tsconfig.cjs.json",
|
|
78
|
+
"build:esm": "tsc --project ./tsconfig.esm.json && node scripts/rename-to-esm-files.js dist/esm",
|
|
79
|
+
"test": "vitest",
|
|
80
|
+
"test:unit": "vitest --project unit",
|
|
81
|
+
"test:wire": "vitest --project wire",
|
|
82
|
+
"tsn": "ts-node -r tsconfig-paths/register"
|
|
83
|
+
}
|
|
84
|
+
}
|
package/reference.md
CHANGED
|
@@ -570,6 +570,71 @@ await client.sessions.getSession({
|
|
|
570
570
|
</dl>
|
|
571
571
|
|
|
572
572
|
|
|
573
|
+
</dd>
|
|
574
|
+
</dl>
|
|
575
|
+
</details>
|
|
576
|
+
|
|
577
|
+
<details><summary><code>client.sessions.<a href="/src/api/resources/sessions/client/Client.ts">deleteSession</a>({ ...params }) -> void</code></summary>
|
|
578
|
+
<dl>
|
|
579
|
+
<dd>
|
|
580
|
+
|
|
581
|
+
#### 📝 Description
|
|
582
|
+
|
|
583
|
+
<dl>
|
|
584
|
+
<dd>
|
|
585
|
+
|
|
586
|
+
<dl>
|
|
587
|
+
<dd>
|
|
588
|
+
|
|
589
|
+
Delete a session with all its tasks.
|
|
590
|
+
</dd>
|
|
591
|
+
</dl>
|
|
592
|
+
</dd>
|
|
593
|
+
</dl>
|
|
594
|
+
|
|
595
|
+
#### 🔌 Usage
|
|
596
|
+
|
|
597
|
+
<dl>
|
|
598
|
+
<dd>
|
|
599
|
+
|
|
600
|
+
<dl>
|
|
601
|
+
<dd>
|
|
602
|
+
|
|
603
|
+
```typescript
|
|
604
|
+
await client.sessions.deleteSession({
|
|
605
|
+
session_id: "session_id"
|
|
606
|
+
});
|
|
607
|
+
|
|
608
|
+
```
|
|
609
|
+
</dd>
|
|
610
|
+
</dl>
|
|
611
|
+
</dd>
|
|
612
|
+
</dl>
|
|
613
|
+
|
|
614
|
+
#### ⚙️ Parameters
|
|
615
|
+
|
|
616
|
+
<dl>
|
|
617
|
+
<dd>
|
|
618
|
+
|
|
619
|
+
<dl>
|
|
620
|
+
<dd>
|
|
621
|
+
|
|
622
|
+
**request:** `BrowserUse.DeleteSessionSessionsSessionIdDeleteRequest`
|
|
623
|
+
|
|
624
|
+
</dd>
|
|
625
|
+
</dl>
|
|
626
|
+
|
|
627
|
+
<dl>
|
|
628
|
+
<dd>
|
|
629
|
+
|
|
630
|
+
**requestOptions:** `Sessions.RequestOptions`
|
|
631
|
+
|
|
632
|
+
</dd>
|
|
633
|
+
</dl>
|
|
634
|
+
</dd>
|
|
635
|
+
</dl>
|
|
636
|
+
|
|
637
|
+
|
|
573
638
|
</dd>
|
|
574
639
|
</dl>
|
|
575
640
|
</details>
|
|
@@ -1960,6 +2025,75 @@ await client.workflows.updateWorkflow({
|
|
|
1960
2025
|
</dl>
|
|
1961
2026
|
|
|
1962
2027
|
|
|
2028
|
+
</dd>
|
|
2029
|
+
</dl>
|
|
2030
|
+
</details>
|
|
2031
|
+
|
|
2032
|
+
<details><summary><code>client.workflows.<a href="/src/api/resources/workflows/client/Client.ts">getWorkflowGenerationState</a>({ ...params }) -> BrowserUse.WorkflowGenerationStateView</code></summary>
|
|
2033
|
+
<dl>
|
|
2034
|
+
<dd>
|
|
2035
|
+
|
|
2036
|
+
#### 📝 Description
|
|
2037
|
+
|
|
2038
|
+
<dl>
|
|
2039
|
+
<dd>
|
|
2040
|
+
|
|
2041
|
+
<dl>
|
|
2042
|
+
<dd>
|
|
2043
|
+
|
|
2044
|
+
Get workflow generation state with live browser URL for polling.
|
|
2045
|
+
|
|
2046
|
+
This endpoint returns the current state of workflow generation including
|
|
2047
|
+
the live browser URL (if available). It's designed to be polled every 2 seconds
|
|
2048
|
+
during generation to show real-time browser activity in the frontend.
|
|
2049
|
+
</dd>
|
|
2050
|
+
</dl>
|
|
2051
|
+
</dd>
|
|
2052
|
+
</dl>
|
|
2053
|
+
|
|
2054
|
+
#### 🔌 Usage
|
|
2055
|
+
|
|
2056
|
+
<dl>
|
|
2057
|
+
<dd>
|
|
2058
|
+
|
|
2059
|
+
<dl>
|
|
2060
|
+
<dd>
|
|
2061
|
+
|
|
2062
|
+
```typescript
|
|
2063
|
+
await client.workflows.getWorkflowGenerationState({
|
|
2064
|
+
workflow_id: "workflow_id"
|
|
2065
|
+
});
|
|
2066
|
+
|
|
2067
|
+
```
|
|
2068
|
+
</dd>
|
|
2069
|
+
</dl>
|
|
2070
|
+
</dd>
|
|
2071
|
+
</dl>
|
|
2072
|
+
|
|
2073
|
+
#### ⚙️ Parameters
|
|
2074
|
+
|
|
2075
|
+
<dl>
|
|
2076
|
+
<dd>
|
|
2077
|
+
|
|
2078
|
+
<dl>
|
|
2079
|
+
<dd>
|
|
2080
|
+
|
|
2081
|
+
**request:** `BrowserUse.GetWorkflowGenerationStateWorkflowsWorkflowIdGenerationStateGetRequest`
|
|
2082
|
+
|
|
2083
|
+
</dd>
|
|
2084
|
+
</dl>
|
|
2085
|
+
|
|
2086
|
+
<dl>
|
|
2087
|
+
<dd>
|
|
2088
|
+
|
|
2089
|
+
**requestOptions:** `Workflows.RequestOptions`
|
|
2090
|
+
|
|
2091
|
+
</dd>
|
|
2092
|
+
</dl>
|
|
2093
|
+
</dd>
|
|
2094
|
+
</dl>
|
|
2095
|
+
|
|
2096
|
+
|
|
1963
2097
|
</dd>
|
|
1964
2098
|
</dl>
|
|
1965
2099
|
</details>
|
|
@@ -2033,7 +2167,7 @@ await client.workflows.getWorkflowYamlPresignedUrl({
|
|
|
2033
2167
|
</dl>
|
|
2034
2168
|
</details>
|
|
2035
2169
|
|
|
2036
|
-
<details><summary><code>client.workflows.<a href="/src/api/resources/workflows/client/Client.ts">
|
|
2170
|
+
<details><summary><code>client.workflows.<a href="/src/api/resources/workflows/client/Client.ts">runWorkflow</a>({ ...params }) -> BrowserUse.WorkflowExecutionCreatedResponse</code></summary>
|
|
2037
2171
|
<dl>
|
|
2038
2172
|
<dd>
|
|
2039
2173
|
|
|
@@ -2045,10 +2179,10 @@ await client.workflows.getWorkflowYamlPresignedUrl({
|
|
|
2045
2179
|
<dl>
|
|
2046
2180
|
<dd>
|
|
2047
2181
|
|
|
2048
|
-
Execute a workflow
|
|
2182
|
+
Execute a workflow asynchronously.
|
|
2049
2183
|
|
|
2050
|
-
|
|
2051
|
-
|
|
2184
|
+
Returns execution ID immediately and processes in background via Inngest.
|
|
2185
|
+
Use the GET /workflows/executions/{execution_id} endpoint to check status and retrieve results.
|
|
2052
2186
|
</dd>
|
|
2053
2187
|
</dl>
|
|
2054
2188
|
</dd>
|
|
@@ -2063,7 +2197,7 @@ Execute a workflow either synchronously or asynchronously.
|
|
|
2063
2197
|
<dd>
|
|
2064
2198
|
|
|
2065
2199
|
```typescript
|
|
2066
|
-
await client.workflows.
|
|
2200
|
+
await client.workflows.runWorkflow({
|
|
2067
2201
|
workflow_id: "workflow_id"
|
|
2068
2202
|
});
|
|
2069
2203
|
|
|
@@ -2494,6 +2628,144 @@ await client.workflows.getExecutionLogs({
|
|
|
2494
2628
|
</dl>
|
|
2495
2629
|
|
|
2496
2630
|
|
|
2631
|
+
</dd>
|
|
2632
|
+
</dl>
|
|
2633
|
+
</details>
|
|
2634
|
+
|
|
2635
|
+
<details><summary><code>client.workflows.<a href="/src/api/resources/workflows/client/Client.ts">getExecutionState</a>({ ...params }) -> BrowserUse.WorkflowExecutionStateView</code></summary>
|
|
2636
|
+
<dl>
|
|
2637
|
+
<dd>
|
|
2638
|
+
|
|
2639
|
+
#### 📝 Description
|
|
2640
|
+
|
|
2641
|
+
<dl>
|
|
2642
|
+
<dd>
|
|
2643
|
+
|
|
2644
|
+
<dl>
|
|
2645
|
+
<dd>
|
|
2646
|
+
|
|
2647
|
+
Get workflow execution state with steps for live UI polling.
|
|
2648
|
+
|
|
2649
|
+
This endpoint returns the current state of a workflow execution including all steps
|
|
2650
|
+
with their details. It's designed to be polled every 2 seconds during execution
|
|
2651
|
+
to show real-time progress in the frontend.
|
|
2652
|
+
</dd>
|
|
2653
|
+
</dl>
|
|
2654
|
+
</dd>
|
|
2655
|
+
</dl>
|
|
2656
|
+
|
|
2657
|
+
#### 🔌 Usage
|
|
2658
|
+
|
|
2659
|
+
<dl>
|
|
2660
|
+
<dd>
|
|
2661
|
+
|
|
2662
|
+
<dl>
|
|
2663
|
+
<dd>
|
|
2664
|
+
|
|
2665
|
+
```typescript
|
|
2666
|
+
await client.workflows.getExecutionState({
|
|
2667
|
+
execution_id: "execution_id"
|
|
2668
|
+
});
|
|
2669
|
+
|
|
2670
|
+
```
|
|
2671
|
+
</dd>
|
|
2672
|
+
</dl>
|
|
2673
|
+
</dd>
|
|
2674
|
+
</dl>
|
|
2675
|
+
|
|
2676
|
+
#### ⚙️ Parameters
|
|
2677
|
+
|
|
2678
|
+
<dl>
|
|
2679
|
+
<dd>
|
|
2680
|
+
|
|
2681
|
+
<dl>
|
|
2682
|
+
<dd>
|
|
2683
|
+
|
|
2684
|
+
**request:** `BrowserUse.GetExecutionStateWorkflowsExecutionsExecutionIdStateGetRequest`
|
|
2685
|
+
|
|
2686
|
+
</dd>
|
|
2687
|
+
</dl>
|
|
2688
|
+
|
|
2689
|
+
<dl>
|
|
2690
|
+
<dd>
|
|
2691
|
+
|
|
2692
|
+
**requestOptions:** `Workflows.RequestOptions`
|
|
2693
|
+
|
|
2694
|
+
</dd>
|
|
2695
|
+
</dl>
|
|
2696
|
+
</dd>
|
|
2697
|
+
</dl>
|
|
2698
|
+
|
|
2699
|
+
|
|
2700
|
+
</dd>
|
|
2701
|
+
</dl>
|
|
2702
|
+
</details>
|
|
2703
|
+
|
|
2704
|
+
<details><summary><code>client.workflows.<a href="/src/api/resources/workflows/client/Client.ts">getExecutionMedia</a>({ ...params }) -> BrowserUse.WorkflowExecutionMediaView</code></summary>
|
|
2705
|
+
<dl>
|
|
2706
|
+
<dd>
|
|
2707
|
+
|
|
2708
|
+
#### 📝 Description
|
|
2709
|
+
|
|
2710
|
+
<dl>
|
|
2711
|
+
<dd>
|
|
2712
|
+
|
|
2713
|
+
<dl>
|
|
2714
|
+
<dd>
|
|
2715
|
+
|
|
2716
|
+
Get workflow execution media (screenshots) with presigned URLs.
|
|
2717
|
+
|
|
2718
|
+
This endpoint returns media URLs for completed executions. Screenshots
|
|
2719
|
+
are returned with presigned S3 URLs for direct access from the frontend.
|
|
2720
|
+
Should be called when execution status is 'completed', 'failed', or 'cancelled'.
|
|
2721
|
+
</dd>
|
|
2722
|
+
</dl>
|
|
2723
|
+
</dd>
|
|
2724
|
+
</dl>
|
|
2725
|
+
|
|
2726
|
+
#### 🔌 Usage
|
|
2727
|
+
|
|
2728
|
+
<dl>
|
|
2729
|
+
<dd>
|
|
2730
|
+
|
|
2731
|
+
<dl>
|
|
2732
|
+
<dd>
|
|
2733
|
+
|
|
2734
|
+
```typescript
|
|
2735
|
+
await client.workflows.getExecutionMedia({
|
|
2736
|
+
execution_id: "execution_id"
|
|
2737
|
+
});
|
|
2738
|
+
|
|
2739
|
+
```
|
|
2740
|
+
</dd>
|
|
2741
|
+
</dl>
|
|
2742
|
+
</dd>
|
|
2743
|
+
</dl>
|
|
2744
|
+
|
|
2745
|
+
#### ⚙️ Parameters
|
|
2746
|
+
|
|
2747
|
+
<dl>
|
|
2748
|
+
<dd>
|
|
2749
|
+
|
|
2750
|
+
<dl>
|
|
2751
|
+
<dd>
|
|
2752
|
+
|
|
2753
|
+
**request:** `BrowserUse.GetExecutionMediaWorkflowsExecutionsExecutionIdMediaGetRequest`
|
|
2754
|
+
|
|
2755
|
+
</dd>
|
|
2756
|
+
</dl>
|
|
2757
|
+
|
|
2758
|
+
<dl>
|
|
2759
|
+
<dd>
|
|
2760
|
+
|
|
2761
|
+
**requestOptions:** `Workflows.RequestOptions`
|
|
2762
|
+
|
|
2763
|
+
</dd>
|
|
2764
|
+
</dl>
|
|
2765
|
+
</dd>
|
|
2766
|
+
</dl>
|
|
2767
|
+
|
|
2768
|
+
|
|
2497
2769
|
</dd>
|
|
2498
2770
|
</dl>
|
|
2499
2771
|
</details>
|