Skip to content

Commit a3c4212

Browse files
feat(api): update via SDK Studio
1 parent b7f0831 commit a3c4212

22 files changed

+48
-44
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 22
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browser-use%2Fbrowser-use-86040fd18419e7b4e0947660d9c0ff1abe21550528d2d2a549736cd16f85a92d.yml
33
openapi_spec_hash: 7c5de9d0f633db35fd9e250fcc834d1f
4-
config_hash: b806b16f9a48c7a12ff604784b3762f1
4+
config_hash: fdda11f4272828e3d5d13f933105a0d7

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ $ cd browser-use-typescript
5555
# With yarn
5656
$ yarn link
5757
$ cd ../my-package
58-
$ yarn link browser-use
58+
$ yarn link browser-use-node
5959

6060
# With pnpm
6161
$ pnpm link --global
6262
$ cd ../my-package
63-
$ pnpm link -—global browser-use
63+
$ pnpm link -—global browser-use-node
6464
```
6565

6666
## Running tests

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Browser Use TypeScript API Library
22

3-
[![NPM version](<https://img.shields.io/npm/v/browser-use.svg?label=npm%20(stable)>)](https://npmjs.org/package/browser-use) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/browser-use)
3+
[![NPM version](<https://img.shields.io/npm/v/browser-use-node.svg?label=npm%20(stable)>)](https://npmjs.org/package/browser-use-node) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/browser-use-node)
44

55
This library provides convenient access to the Browser Use REST API from server-side TypeScript or JavaScript.
66

7-
The full API of this library can be found in [api.md](api.md).
7+
The REST API documentation can be found on [docs.browser-use.com](https://docs.browser-use.com/cloud/). The full API of this library can be found in [api.md](api.md).
88

99
It is generated with [Stainless](https://www.stainless.com/).
1010

@@ -15,15 +15,15 @@ npm install git+ssh://[email protected]:stainless-sdks/browser-use-typescript.git
1515
```
1616

1717
> [!NOTE]
18-
> Once this package is [published to npm](https://www.stainless.com/docs/guides/publish), this will become: `npm install browser-use`
18+
> Once this package is [published to npm](https://www.stainless.com/docs/guides/publish), this will become: `npm install browser-use-node`
1919
2020
## Usage
2121

2222
The full API of this library can be found in [api.md](api.md).
2323

2424
<!-- prettier-ignore -->
2525
```js
26-
import BrowserUse from 'browser-use';
26+
import BrowserUse from 'browser-use-node';
2727

2828
const client = new BrowserUse({
2929
apiKey: process.env['BROWSER_USE_API_KEY'], // This is the default and can be omitted
@@ -40,7 +40,7 @@ This library includes TypeScript definitions for all request params and response
4040

4141
<!-- prettier-ignore -->
4242
```ts
43-
import BrowserUse from 'browser-use';
43+
import BrowserUse from 'browser-use-node';
4444

4545
const client = new BrowserUse({
4646
apiKey: process.env['BROWSER_USE_API_KEY'], // This is the default and can be omitted
@@ -162,7 +162,7 @@ The log level can be configured in two ways:
162162
2. Using the `logLevel` client option (overrides the environment variable if set)
163163

164164
```ts
165-
import BrowserUse from 'browser-use';
165+
import BrowserUse from 'browser-use-node';
166166

167167
const client = new BrowserUse({
168168
logLevel: 'debug', // Show all log messages
@@ -190,7 +190,7 @@ When providing a custom logger, the `logLevel` option still controls which messa
190190
below the configured level will not be sent to your logger.
191191

192192
```ts
193-
import BrowserUse from 'browser-use';
193+
import BrowserUse from 'browser-use-node';
194194
import pino from 'pino';
195195

196196
const logger = pino();
@@ -259,7 +259,7 @@ globalThis.fetch = fetch;
259259
Or pass it to the client:
260260

261261
```ts
262-
import BrowserUse from 'browser-use';
262+
import BrowserUse from 'browser-use-node';
263263
import fetch from 'my-fetch';
264264

265265
const client = new BrowserUse({ fetch });
@@ -270,7 +270,7 @@ const client = new BrowserUse({ fetch });
270270
If you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)
271271

272272
```ts
273-
import BrowserUse from 'browser-use';
273+
import BrowserUse from 'browser-use-node';
274274

275275
const client = new BrowserUse({
276276
fetchOptions: {
@@ -287,7 +287,7 @@ options to requests:
287287
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg" align="top" width="18" height="21"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>
288288

289289
```ts
290-
import BrowserUse from 'browser-use';
290+
import BrowserUse from 'browser-use-node';
291291
import * as undici from 'undici';
292292

293293
const proxyAgent = new undici.ProxyAgent('http://localhost:8888');
@@ -301,7 +301,7 @@ const client = new BrowserUse({
301301
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg" align="top" width="18" height="21"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>
302302

303303
```ts
304-
import BrowserUse from 'browser-use';
304+
import BrowserUse from 'browser-use-node';
305305

306306
const client = new BrowserUse({
307307
fetchOptions: {
@@ -313,7 +313,7 @@ const client = new BrowserUse({
313313
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg" align="top" width="18" height="21"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>
314314

315315
```ts
316-
import BrowserUse from 'npm:browser-use';
316+
import BrowserUse from 'npm:browser-use-node';
317317

318318
const httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });
319319
const client = new BrowserUse({

SECURITY.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ before making any information public.
1818
If you encounter security issues that are not directly related to SDKs but pertain to the services
1919
or products provided by Browser Use, please follow the respective company's security reporting guidelines.
2020

21+
### Browser Use Terms and Policies
22+
23+
Please contact [email protected] for any questions or concerns regarding the security of our services.
24+
2125
---
2226

2327
Thank you for helping us keep the SDKs and systems they interact with secure.

eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default tseslint.config(
2525
{
2626
patterns: [
2727
{
28-
regex: '^browser-use(/.*)?',
28+
regex: '^browser-use-node(/.*)?',
2929
message: 'Use a relative import, not a package import.',
3030
},
3131
],

jest.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ const config: JestConfigWithTsJest = {
77
'^.+\\.(t|j)sx?$': ['@swc/jest', { sourceMaps: 'inline' }],
88
},
99
moduleNameMapper: {
10-
'^browser-use$': '<rootDir>/src/index.ts',
11-
'^browser-use/(.*)$': '<rootDir>/src/$1',
10+
'^browser-use-node$': '<rootDir>/src/index.ts',
11+
'^browser-use-node/(.*)$': '<rootDir>/src/$1',
1212
},
1313
modulePathIgnorePatterns: [
1414
'<rootDir>/ecosystem-tests/',

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"name": "browser-use",
2+
"name": "browser-use-node",
33
"version": "0.0.1",
44
"description": "The official TypeScript library for the Browser Use API",
5-
"author": "Browser Use <>",
5+
"author": "Browser Use <[email protected]>",
66
"types": "dist/index.d.ts",
77
"main": "dist/index.js",
88
"type": "commonjs",

scripts/build

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ node scripts/utils/check-version.cjs
88

99
# Build into dist and will publish the package from there,
1010
# so that src/resources/foo.ts becomes <package root>/resources/foo.js
11-
# This way importing from `"browser-use/resources/foo"` works
11+
# This way importing from `"browser-use-node/resources/foo"` works
1212
# even with `"moduleResolution": "node"`
1313

1414
rm -rf dist; mkdir dist
@@ -42,8 +42,8 @@ node scripts/utils/postprocess-files.cjs
4242

4343
# make sure that nothing crashes when we require the output CJS or
4444
# import the output ESM
45-
(cd dist && node -e 'require("browser-use")')
46-
(cd dist && node -e 'import("browser-use")' --input-type=module)
45+
(cd dist && node -e 'require("browser-use-node")')
46+
(cd dist && node -e 'import("browser-use-node")' --input-type=module)
4747

4848
if [ -e ./scripts/build-deno ]
4949
then

tests/api-resources/agent-profiles.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
import BrowserUse from 'browser-use';
3+
import BrowserUse from 'browser-use-node';
44

55
const client = new BrowserUse({
66
apiKey: 'My API Key',

tests/api-resources/browser-profiles.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
import BrowserUse from 'browser-use';
3+
import BrowserUse from 'browser-use-node';
44

55
const client = new BrowserUse({
66
apiKey: 'My API Key',

0 commit comments

Comments
 (0)