diff --git a/package.json b/package.json index f0e5c56..0a835ae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "browser-use-sdk", - "version": "2.0.0-rc1", + "version": "2.0.0-rc2", "private": false, "repository": "github:browser-use/browser-use-node", "type": "commonjs", diff --git a/src/Client.ts b/src/Client.ts index f02d19d..498e6fe 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -50,8 +50,8 @@ export class BrowserUseClient { { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "browser-use-sdk", - "X-Fern-SDK-Version": "2.0.0-rc1", - "User-Agent": "browser-use-sdk/2.0.0-rc1", + "X-Fern-SDK-Version": "2.0.0-rc2", + "User-Agent": "browser-use-sdk/2.0.0-rc2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/errors/index.ts b/src/api/errors/index.ts index 8605852..7010b54 100644 --- a/src/api/errors/index.ts +++ b/src/api/errors/index.ts @@ -1,5 +1,5 @@ export * from "./NotFoundError.js"; export * from "./UnprocessableEntityError.js"; export * from "./BadRequestError.js"; -export * from "./PaymentRequiredError.js"; export * from "./InternalServerError.js"; +export * from "./PaymentRequiredError.js"; diff --git a/src/api/resources/tasks/client/Client.ts b/src/api/resources/tasks/client/Client.ts index 2997e60..0cc8b4b 100644 --- a/src/api/resources/tasks/client/Client.ts +++ b/src/api/resources/tasks/client/Client.ts @@ -152,10 +152,8 @@ export class Tasks { * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link BrowserUse.BadRequestError} - * @throws {@link BrowserUse.PaymentRequiredError} * @throws {@link BrowserUse.NotFoundError} * @throws {@link BrowserUse.UnprocessableEntityError} - * @throws {@link BrowserUse.InternalServerError} * * @example * await client.tasks.createTask({ @@ -203,11 +201,6 @@ export class Tasks { switch (_response.error.statusCode) { case 400: throw new BrowserUse.BadRequestError(_response.error.body as unknown, _response.rawResponse); - case 402: - throw new BrowserUse.PaymentRequiredError( - _response.error.body as BrowserUse.InsufficientCreditsError, - _response.rawResponse, - ); case 404: throw new BrowserUse.NotFoundError(_response.error.body as unknown, _response.rawResponse); case 422: @@ -215,8 +208,6 @@ export class Tasks { _response.error.body as unknown, _response.rawResponse, ); - case 500: - throw new BrowserUse.InternalServerError(_response.error.body as unknown, _response.rawResponse); default: throw new errors.BrowserUseError({ statusCode: _response.error.statusCode, diff --git a/src/api/types/CreditsDeductionError.ts b/src/api/types/CreditsDeductionError.ts deleted file mode 100644 index cb32381..0000000 --- a/src/api/types/CreditsDeductionError.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * Error response when credits deduction fails - */ -export interface CreditsDeductionError { - detail?: string; -} diff --git a/src/api/types/index.ts b/src/api/types/index.ts index afb8cdc..b381839 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -2,7 +2,6 @@ export * from "./BadRequestErrorBody.js"; export * from "./NotFoundErrorBody.js"; export * from "./AccountNotFoundError.js"; export * from "./AccountView.js"; -export * from "./CreditsDeductionError.js"; export * from "./DownloadUrlGenerationError.js"; export * from "./FileView.js"; export * from "./HttpValidationError.js"; diff --git a/src/version.ts b/src/version.ts index 9762271..c733a03 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const SDK_VERSION = "2.0.0-rc1"; +export const SDK_VERSION = "2.0.0-rc2"; diff --git a/yarn.lock b/yarn.lock index e819bd1..a83d355 100644 --- a/yarn.lock +++ b/yarn.lock @@ -996,7 +996,7 @@ acorn-walk@^8.0.2, acorn-walk@^8.1.1: dependencies: acorn "^8.11.0" -acorn@^8.1.0, acorn@^8.11.0, acorn@^8.14.0, acorn@^8.15.0, acorn@^8.4.1, acorn@^8.8.1: +acorn@^8.1.0, acorn@^8.11.0, acorn@^8.15.0, acorn@^8.4.1, acorn@^8.8.1: version "8.15.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.15.0.tgz#a360898bc415edaac46c8241f6383975b930b816" integrity sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg== @@ -1444,9 +1444,9 @@ eciesjs@^0.4.10: "@noble/hashes" "^1.8.0" electron-to-chromium@^1.5.211: - version "1.5.211" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.211.tgz#749317bf9cf894c06f67980940cf8074e5eb08ca" - integrity sha512-IGBvimJkotaLzFnwIVgW9/UD/AOJ2tByUmeOrtqBfACSbAw5b1G0XpvdaieKyc7ULmbwXVx+4e4Be8pOPBrYkw== + version "1.5.212" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.212.tgz#9b541f90d7d8415ccea94d4be4bb86e73e3f9547" + integrity sha512-gE7ErIzSW+d8jALWMcOIgf+IB6lpfsg6NwOhPVwKzDtN2qcBix47vlin4yzSregYDxTCXOUqAZjVY/Z3naS7ww== emittery@^0.13.1: version "0.13.1" @@ -3028,12 +3028,12 @@ terser-webpack-plugin@^5.3.11: terser "^5.31.1" terser@^5.31.1: - version "5.43.1" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.43.1.tgz#88387f4f9794ff1a29e7ad61fb2932e25b4fdb6d" - integrity sha512-+6erLbBm0+LROX2sPXlUYx/ux5PyE9K/a92Wrt6oA+WDAoFTdpHE5tCYCI5PNzq2y8df4rA+QgHLJuR4jNymsg== + version "5.44.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.44.0.tgz#ebefb8e5b8579d93111bfdfc39d2cf63879f4a82" + integrity sha512-nIVck8DK+GM/0Frwd+nIhZ84pR/BX7rmXMfYwyg+Sri5oGVE99/E3KvXqpC2xHFxyqXyGHTKBSioxxplrO4I4w== dependencies: "@jridgewell/source-map" "^0.3.3" - acorn "^8.14.0" + acorn "^8.15.0" commander "^2.20.0" source-map-support "~0.5.20"