diff --git a/package.json b/package.json index f0e5c56..2cc5ae5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "browser-use-sdk", - "version": "2.0.0-rc1", + "version": "1.2.1", "private": false, "repository": "github:browser-use/browser-use-node", "type": "commonjs", diff --git a/src/Client.ts b/src/Client.ts index f02d19d..ac4d707 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": "1.2.1", + "User-Agent": "browser-use-sdk/1.2.1", "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..b415026 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const SDK_VERSION = "2.0.0-rc1"; +export const SDK_VERSION = "1.2.1"; diff --git a/yarn.lock b/yarn.lock index e819bd1..bd8160a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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"