@hyperbrowser/sdk 0.76.0 → 0.78.0
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.
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.BrowserUseService = void 0;
|
|
7
|
-
const
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const zod_to_json_schema_1 = require("zod-to-json-schema");
|
|
8
6
|
const client_1 = require("../../client");
|
|
9
7
|
const constants_1 = require("../../types/constants");
|
|
10
8
|
const utils_1 = require("../../utils");
|
|
@@ -18,7 +16,12 @@ class BrowserUseService extends base_1.BaseService {
|
|
|
18
16
|
try {
|
|
19
17
|
if (params.outputModelSchema) {
|
|
20
18
|
if ((0, utils_1.isZodSchema)(params.outputModelSchema)) {
|
|
21
|
-
|
|
19
|
+
try {
|
|
20
|
+
params.outputModelSchema = (0, zod_1.toJSONSchema)(params.outputModelSchema);
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
params.outputModelSchema = (0, zod_to_json_schema_1.zodToJsonSchema)(params.outputModelSchema);
|
|
24
|
+
}
|
|
22
25
|
}
|
|
23
26
|
}
|
|
24
27
|
return await this.request("/task/browser-use", {
|
package/dist/services/extract.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ExtractService = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
4
5
|
const zod_to_json_schema_1 = require("zod-to-json-schema");
|
|
5
6
|
const base_1 = require("./base");
|
|
6
7
|
const utils_1 = require("../utils");
|
|
@@ -18,7 +19,12 @@ class ExtractService extends base_1.BaseService {
|
|
|
18
19
|
}
|
|
19
20
|
if (params.schema) {
|
|
20
21
|
if ((0, utils_1.isZodSchema)(params.schema)) {
|
|
21
|
-
|
|
22
|
+
try {
|
|
23
|
+
params.schema = (0, zod_1.toJSONSchema)(params.schema);
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
params.schema = (0, zod_to_json_schema_1.zodToJsonSchema)(params.schema);
|
|
27
|
+
}
|
|
22
28
|
}
|
|
23
29
|
}
|
|
24
30
|
return await this.request("/extract", {
|
package/dist/types/session.d.ts
CHANGED
|
@@ -111,6 +111,7 @@ export interface CreateSessionParams {
|
|
|
111
111
|
viewOnlyLiveView?: boolean;
|
|
112
112
|
disablePasswordManager?: boolean;
|
|
113
113
|
enableAlwaysOpenPdfExternally?: boolean;
|
|
114
|
+
appendTimestampToDownloads?: boolean;
|
|
114
115
|
}
|
|
115
116
|
export interface SessionRecording {
|
|
116
117
|
type: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperbrowser/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.78.0",
|
|
4
4
|
"description": "Node SDK for Hyperbrowser API",
|
|
5
5
|
"author": "",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"form-data": "^4.0.1",
|
|
34
34
|
"node-fetch": "2.7.0",
|
|
35
|
-
"zod": "^
|
|
36
|
-
"zod-to-json-schema": "^3.
|
|
35
|
+
"zod": "^4.1.12",
|
|
36
|
+
"zod-to-json-schema": "^3.25.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/node": "^22.9.1",
|
|
@@ -70,4 +70,4 @@
|
|
|
70
70
|
]
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
}
|
|
73
|
+
}
|