browser-use-sdk 2.0.3 → 2.0.5
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/BaseClient.d.ts +30 -0
- package/dist/cjs/BaseClient.js +3 -0
- package/dist/cjs/Client.d.ts +14 -28
- package/dist/cjs/Client.js +26 -18
- package/dist/cjs/api/errors/BadRequestError.d.ts +1 -4
- package/dist/cjs/api/errors/BadRequestError.js +1 -3
- package/dist/cjs/api/errors/ForbiddenError.d.ts +6 -0
- package/dist/cjs/api/errors/ForbiddenError.js +50 -0
- package/dist/cjs/api/errors/InternalServerError.d.ts +1 -4
- package/dist/cjs/api/errors/InternalServerError.js +1 -3
- package/dist/cjs/api/errors/NotFoundError.d.ts +1 -4
- package/dist/cjs/api/errors/NotFoundError.js +1 -3
- package/dist/cjs/api/errors/PaymentRequiredError.d.ts +2 -5
- package/dist/cjs/api/errors/PaymentRequiredError.js +1 -3
- package/dist/cjs/api/errors/TooManyRequestsError.d.ts +2 -5
- package/dist/cjs/api/errors/TooManyRequestsError.js +1 -3
- package/dist/cjs/api/errors/UnprocessableEntityError.d.ts +1 -4
- package/dist/cjs/api/errors/UnprocessableEntityError.js +1 -3
- package/dist/cjs/api/errors/index.d.ts +4 -3
- package/dist/cjs/api/errors/index.js +4 -3
- package/dist/cjs/api/index.d.ts +1 -1
- package/dist/cjs/api/index.js +1 -1
- package/dist/cjs/api/resources/billing/client/Client.d.ts +27 -0
- package/dist/cjs/api/resources/{accounts → billing}/client/Client.js +23 -20
- package/dist/cjs/api/resources/browsers/client/Client.d.ts +90 -0
- package/dist/cjs/api/resources/browsers/client/Client.js +374 -0
- package/dist/cjs/api/resources/browsers/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/browsers/client/index.js +17 -0
- package/dist/cjs/api/resources/browsers/client/requests/CreateBrowserSessionRequest.d.ts +13 -0
- package/dist/cjs/api/resources/browsers/client/requests/CreateBrowserSessionRequest.js +3 -0
- package/dist/cjs/api/resources/browsers/client/requests/GetBrowserSessionBrowsersSessionIdGetRequest.d.ts +9 -0
- package/dist/cjs/api/resources/browsers/client/requests/GetBrowserSessionBrowsersSessionIdGetRequest.js +3 -0
- package/dist/cjs/api/resources/browsers/client/requests/ListBrowserSessionsBrowsersGetRequest.d.ts +10 -0
- package/dist/cjs/api/resources/browsers/client/requests/ListBrowserSessionsBrowsersGetRequest.js +3 -0
- package/dist/cjs/api/resources/browsers/client/requests/UpdateBrowserSessionRequest.d.ts +9 -0
- package/dist/cjs/api/resources/browsers/client/requests/UpdateBrowserSessionRequest.js +3 -0
- package/dist/cjs/api/resources/browsers/client/requests/index.d.ts +4 -0
- package/dist/cjs/api/resources/browsers/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/browsers/index.d.ts +1 -0
- package/dist/cjs/api/resources/browsers/index.js +17 -0
- package/dist/cjs/api/resources/files/client/Client.d.ts +44 -38
- package/dist/cjs/api/resources/files/client/Client.js +125 -33
- package/dist/cjs/api/resources/files/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/files/client/requests/AgentSessionUploadFilePresignedUrlFilesSessionsSessionIdPresignedUrlPostRequest.d.ts +16 -0
- package/dist/cjs/api/resources/files/client/requests/AgentSessionUploadFilePresignedUrlFilesSessionsSessionIdPresignedUrlPostRequest.js +3 -0
- package/dist/cjs/api/resources/files/client/requests/BrowserSessionUploadFilePresignedUrlFilesBrowsersSessionIdPresignedUrlPostRequest.d.ts +16 -0
- package/dist/cjs/api/resources/files/client/requests/BrowserSessionUploadFilePresignedUrlFilesBrowsersSessionIdPresignedUrlPostRequest.js +3 -0
- package/dist/cjs/api/resources/files/client/requests/GetTaskOutputFilePresignedUrlFilesTasksTaskIdOutputFilesFileIdGetRequest.d.ts +11 -0
- package/dist/cjs/api/resources/files/client/requests/GetTaskOutputFilePresignedUrlFilesTasksTaskIdOutputFilesFileIdGetRequest.js +3 -0
- package/dist/cjs/api/resources/files/client/requests/index.d.ts +3 -1
- package/dist/cjs/api/resources/index.d.ts +11 -6
- package/dist/cjs/api/resources/index.js +12 -7
- package/dist/cjs/api/resources/profiles/client/Client.d.ts +32 -32
- package/dist/cjs/api/resources/profiles/client/Client.js +137 -40
- package/dist/cjs/api/resources/profiles/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/profiles/client/requests/DeleteBrowserProfileProfilesProfileIdDeleteRequest.d.ts +9 -0
- package/dist/cjs/api/resources/profiles/client/requests/DeleteBrowserProfileProfilesProfileIdDeleteRequest.js +3 -0
- package/dist/cjs/api/resources/profiles/client/requests/GetProfileProfilesProfileIdGetRequest.d.ts +9 -0
- package/dist/cjs/api/resources/profiles/client/requests/GetProfileProfilesProfileIdGetRequest.js +3 -0
- package/dist/cjs/api/resources/profiles/client/requests/ListProfilesProfilesGetRequest.d.ts +0 -3
- package/dist/cjs/api/resources/profiles/client/requests/ListProfilesProfilesGetRequest.js +1 -3
- package/dist/cjs/api/resources/profiles/client/requests/ProfileCreateRequest.d.ts +8 -0
- package/dist/cjs/api/resources/profiles/client/requests/ProfileCreateRequest.js +3 -0
- package/dist/cjs/api/resources/profiles/client/requests/ProfileUpdateRequest.d.ts +11 -0
- package/dist/cjs/api/resources/profiles/client/requests/ProfileUpdateRequest.js +3 -0
- package/dist/cjs/api/resources/profiles/client/requests/index.d.ts +5 -1
- package/dist/cjs/api/resources/sessions/client/Client.d.ts +28 -40
- package/dist/cjs/api/resources/sessions/client/Client.js +106 -69
- package/dist/cjs/api/resources/sessions/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/sessions/client/requests/CreateSessionPublicShareSessionsSessionIdPublicSharePostRequest.d.ts +9 -0
- package/dist/cjs/api/resources/sessions/client/requests/CreateSessionPublicShareSessionsSessionIdPublicSharePostRequest.js +3 -0
- package/dist/cjs/api/resources/sessions/client/requests/CreateSessionRequest.d.ts +5 -6
- package/dist/cjs/api/resources/sessions/client/requests/CreateSessionRequest.js +1 -3
- package/dist/cjs/api/resources/sessions/client/requests/DeleteSessionPublicShareSessionsSessionIdPublicShareDeleteRequest.d.ts +9 -0
- package/dist/cjs/api/resources/sessions/client/requests/DeleteSessionPublicShareSessionsSessionIdPublicShareDeleteRequest.js +3 -0
- package/dist/cjs/api/resources/sessions/client/requests/GetSessionPublicShareSessionsSessionIdPublicShareGetRequest.d.ts +9 -0
- package/dist/cjs/api/resources/sessions/client/requests/GetSessionPublicShareSessionsSessionIdPublicShareGetRequest.js +3 -0
- package/dist/cjs/api/resources/sessions/client/requests/GetSessionSessionsSessionIdGetRequest.d.ts +9 -0
- package/dist/cjs/api/resources/sessions/client/requests/GetSessionSessionsSessionIdGetRequest.js +3 -0
- package/dist/cjs/api/resources/sessions/client/requests/ListSessionsSessionsGetRequest.d.ts +2 -5
- package/dist/cjs/api/resources/sessions/client/requests/ListSessionsSessionsGetRequest.js +1 -3
- package/dist/cjs/api/resources/sessions/client/requests/UpdateSessionRequest.d.ts +4 -4
- package/dist/cjs/api/resources/sessions/client/requests/UpdateSessionRequest.js +1 -3
- package/dist/cjs/api/resources/sessions/client/requests/index.d.ts +7 -3
- package/dist/cjs/api/resources/tasks/client/Client.d.ts +17 -34
- package/dist/cjs/api/resources/tasks/client/Client.js +81 -55
- package/dist/cjs/api/resources/tasks/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/tasks/client/requests/CreateTaskRequest.d.ts +19 -14
- package/dist/cjs/api/resources/tasks/client/requests/CreateTaskRequest.js +1 -3
- package/dist/cjs/api/resources/tasks/client/requests/GetTaskLogsTasksTaskIdLogsGetRequest.d.ts +9 -0
- package/dist/cjs/api/resources/tasks/client/requests/GetTaskLogsTasksTaskIdLogsGetRequest.js +3 -0
- package/dist/cjs/api/resources/tasks/client/requests/GetTaskTasksTaskIdGetRequest.d.ts +9 -0
- package/dist/cjs/api/resources/tasks/client/requests/GetTaskTasksTaskIdGetRequest.js +3 -0
- package/dist/cjs/api/resources/tasks/client/requests/ListTasksTasksGetRequest.d.ts +5 -8
- package/dist/cjs/api/resources/tasks/client/requests/ListTasksTasksGetRequest.js +1 -3
- package/dist/cjs/api/resources/tasks/client/requests/UpdateTaskRequest.d.ts +3 -4
- package/dist/cjs/api/resources/tasks/client/requests/UpdateTaskRequest.js +1 -3
- package/dist/cjs/api/resources/tasks/client/requests/index.d.ts +5 -3
- package/dist/cjs/api/resources/workflows/client/Client.d.ts +221 -0
- package/dist/cjs/api/resources/workflows/client/Client.js +986 -0
- package/dist/cjs/api/resources/workflows/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/workflows/client/index.js +17 -0
- package/dist/cjs/api/resources/workflows/client/requests/CancelExecutionWorkflowsExecutionsExecutionIdCancelPatchRequest.d.ts +9 -0
- package/dist/cjs/api/resources/workflows/client/requests/CancelExecutionWorkflowsExecutionsExecutionIdCancelPatchRequest.js +3 -0
- package/dist/cjs/api/resources/workflows/client/requests/DeleteWorkflowWorkflowsWorkflowIdDeleteRequest.d.ts +9 -0
- package/dist/cjs/api/resources/workflows/client/requests/DeleteWorkflowWorkflowsWorkflowIdDeleteRequest.js +3 -0
- package/dist/cjs/api/resources/workflows/client/requests/GetExecutionLogsWorkflowsExecutionsExecutionIdLogsGetRequest.d.ts +9 -0
- package/dist/cjs/api/resources/workflows/client/requests/GetExecutionLogsWorkflowsExecutionsExecutionIdLogsGetRequest.js +3 -0
- package/dist/cjs/api/resources/workflows/client/requests/GetExecutionWorkflowsExecutionsExecutionIdGetRequest.d.ts +9 -0
- package/dist/cjs/api/resources/workflows/client/requests/GetExecutionWorkflowsExecutionsExecutionIdGetRequest.js +3 -0
- package/dist/cjs/api/resources/workflows/client/requests/GetWorkflowWorkflowsWorkflowIdGetRequest.d.ts +9 -0
- package/dist/cjs/api/resources/workflows/client/requests/GetWorkflowWorkflowsWorkflowIdGetRequest.js +3 -0
- package/dist/cjs/api/resources/workflows/client/requests/ListAllExecutionsWorkflowsExecutionsGetRequest.d.ts +11 -0
- package/dist/cjs/api/resources/workflows/client/requests/ListAllExecutionsWorkflowsExecutionsGetRequest.js +3 -0
- package/dist/cjs/api/resources/workflows/client/requests/ListWorkflowExecutionsWorkflowsWorkflowIdExecutionsGetRequest.d.ts +14 -0
- package/dist/cjs/api/resources/workflows/client/requests/ListWorkflowExecutionsWorkflowsWorkflowIdExecutionsGetRequest.js +3 -0
- package/dist/cjs/api/resources/workflows/client/requests/ListWorkflowsWorkflowsGetRequest.d.ts +10 -0
- package/dist/cjs/api/resources/workflows/client/requests/ListWorkflowsWorkflowsGetRequest.js +3 -0
- package/dist/cjs/api/resources/workflows/client/requests/WorkflowCreateRequest.d.ts +14 -0
- package/dist/cjs/api/resources/workflows/client/requests/WorkflowCreateRequest.js +3 -0
- package/dist/cjs/api/resources/workflows/client/requests/WorkflowExecuteRequest.d.ts +16 -0
- package/dist/cjs/api/resources/workflows/client/requests/WorkflowExecuteRequest.js +3 -0
- package/dist/cjs/api/resources/workflows/client/requests/WorkflowGenerateRequest.d.ts +36 -0
- package/dist/cjs/api/resources/workflows/client/requests/WorkflowGenerateRequest.js +3 -0
- package/dist/cjs/api/resources/workflows/client/requests/WorkflowUpdateRequest.d.ts +15 -0
- package/dist/cjs/api/resources/workflows/client/requests/WorkflowUpdateRequest.js +3 -0
- package/dist/cjs/api/resources/workflows/client/requests/WorkflowYamlPresignedUploadRequest.d.ts +14 -0
- package/dist/cjs/api/resources/workflows/client/requests/WorkflowYamlPresignedUploadRequest.js +3 -0
- package/dist/cjs/api/resources/workflows/client/requests/index.d.ts +13 -0
- package/dist/cjs/api/resources/workflows/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/workflows/index.d.ts +2 -0
- package/dist/cjs/api/resources/workflows/index.js +18 -0
- package/dist/cjs/api/resources/workflows/types/ExecuteWorkflowWorkflowsWorkflowIdExecutePostResponse.d.ts +2 -0
- package/dist/cjs/api/resources/workflows/types/ExecuteWorkflowWorkflowsWorkflowIdExecutePostResponse.js +3 -0
- package/dist/cjs/api/resources/workflows/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/workflows/types/index.js +17 -0
- package/dist/cjs/api/types/AccountNotFoundError.d.ts +0 -3
- package/dist/cjs/api/types/AccountNotFoundError.js +1 -3
- package/dist/cjs/api/types/AccountView.d.ts +11 -9
- package/dist/cjs/api/types/AccountView.js +1 -3
- package/dist/cjs/api/types/BadRequestErrorBody.d.ts +1 -4
- package/dist/cjs/api/types/BadRequestErrorBody.js +1 -3
- package/dist/cjs/api/types/BrowserSessionItemView.d.ts +20 -0
- package/dist/cjs/api/types/BrowserSessionItemView.js +3 -0
- package/dist/cjs/api/types/BrowserSessionListResponse.d.ts +14 -0
- package/dist/cjs/api/types/BrowserSessionListResponse.js +3 -0
- package/dist/cjs/api/types/BrowserSessionStatus.d.ts +12 -0
- package/dist/cjs/api/types/BrowserSessionStatus.js +15 -0
- package/dist/cjs/api/types/BrowserSessionUpdateAction.d.ts +7 -0
- package/dist/cjs/api/types/BrowserSessionUpdateAction.js +3 -0
- package/dist/cjs/api/types/BrowserSessionView.d.ts +20 -0
- package/dist/cjs/api/types/BrowserSessionView.js +3 -0
- package/dist/cjs/api/types/DownloadUrlGenerationError.d.ts +0 -3
- package/dist/cjs/api/types/DownloadUrlGenerationError.js +1 -3
- package/dist/cjs/api/types/ExecutionMode.d.ts +12 -0
- package/dist/cjs/api/types/ExecutionMode.js +15 -0
- package/dist/cjs/api/types/FileView.d.ts +0 -3
- package/dist/cjs/api/types/FileView.js +1 -3
- package/dist/cjs/api/types/HttpValidationError.d.ts +1 -4
- package/dist/cjs/api/types/HttpValidationError.js +1 -3
- package/dist/cjs/api/types/InsufficientCreditsError.d.ts +0 -3
- package/dist/cjs/api/types/InsufficientCreditsError.js +1 -3
- package/dist/cjs/api/types/InternalServerErrorBody.d.ts +0 -3
- package/dist/cjs/api/types/InternalServerErrorBody.js +1 -3
- package/dist/cjs/api/types/NotFoundErrorBody.d.ts +1 -4
- package/dist/cjs/api/types/NotFoundErrorBody.js +1 -3
- package/dist/cjs/api/types/OutputFileNotFoundError.d.ts +0 -3
- package/dist/cjs/api/types/OutputFileNotFoundError.js +1 -3
- package/dist/cjs/api/types/PlanInfo.d.ts +15 -0
- package/dist/cjs/api/types/PlanInfo.js +3 -0
- package/dist/cjs/api/types/ProfileListResponse.d.ts +1 -4
- package/dist/cjs/api/types/ProfileListResponse.js +1 -3
- package/dist/cjs/api/types/ProfileNotFoundError.d.ts +0 -3
- package/dist/cjs/api/types/ProfileNotFoundError.js +1 -3
- package/dist/cjs/api/types/ProfileView.d.ts +5 -4
- package/dist/cjs/api/types/ProfileView.js +1 -3
- package/dist/cjs/api/types/ProxyCountryCode.d.ts +244 -10
- package/dist/cjs/api/types/ProxyCountryCode.js +244 -9
- package/dist/cjs/api/types/SessionHasRunningTaskError.d.ts +0 -3
- package/dist/cjs/api/types/SessionHasRunningTaskError.js +1 -3
- package/dist/cjs/api/types/SessionItemView.d.ts +3 -6
- package/dist/cjs/api/types/SessionItemView.js +1 -3
- package/dist/cjs/api/types/SessionListResponse.d.ts +1 -4
- package/dist/cjs/api/types/SessionListResponse.js +1 -3
- package/dist/cjs/api/types/SessionNotFoundError.d.ts +0 -3
- package/dist/cjs/api/types/SessionNotFoundError.js +1 -3
- package/dist/cjs/api/types/SessionStatus.d.ts +1 -4
- package/dist/cjs/api/types/SessionStatus.js +8 -3
- package/dist/cjs/api/types/SessionStoppedError.d.ts +0 -3
- package/dist/cjs/api/types/SessionStoppedError.js +1 -3
- package/dist/cjs/api/types/SessionTimeoutLimitExceededError.d.ts +6 -0
- package/dist/cjs/api/types/SessionTimeoutLimitExceededError.js +3 -0
- package/dist/cjs/api/types/SessionUpdateAction.d.ts +0 -3
- package/dist/cjs/api/types/SessionUpdateAction.js +1 -3
- package/dist/cjs/api/types/SessionView.d.ts +4 -7
- package/dist/cjs/api/types/SessionView.js +1 -3
- package/dist/cjs/api/types/ShareNotFoundError.d.ts +0 -3
- package/dist/cjs/api/types/ShareNotFoundError.js +1 -3
- package/dist/cjs/api/types/ShareView.d.ts +1 -4
- package/dist/cjs/api/types/ShareView.js +1 -3
- package/dist/cjs/api/types/SupportedLlMs.d.ts +5 -4
- package/dist/cjs/api/types/SupportedLlMs.js +5 -3
- package/dist/cjs/api/types/TaskCreatedResponse.d.ts +2 -3
- package/dist/cjs/api/types/TaskCreatedResponse.js +1 -3
- package/dist/cjs/api/types/TaskItemView.d.ts +9 -12
- package/dist/cjs/api/types/TaskItemView.js +1 -3
- package/dist/cjs/api/types/TaskListResponse.d.ts +1 -4
- package/dist/cjs/api/types/TaskListResponse.js +1 -3
- package/dist/cjs/api/types/TaskLogFileResponse.d.ts +0 -3
- package/dist/cjs/api/types/TaskLogFileResponse.js +1 -3
- package/dist/cjs/api/types/TaskNotFoundError.d.ts +0 -3
- package/dist/cjs/api/types/TaskNotFoundError.js +1 -3
- package/dist/cjs/api/types/TaskOutputFileResponse.d.ts +0 -3
- package/dist/cjs/api/types/TaskOutputFileResponse.js +1 -3
- package/dist/cjs/api/types/TaskStatus.d.ts +3 -6
- package/dist/cjs/api/types/TaskStatus.js +11 -4
- package/dist/cjs/api/types/TaskStepView.d.ts +1 -4
- package/dist/cjs/api/types/TaskStepView.js +1 -3
- package/dist/cjs/api/types/TaskUpdateAction.d.ts +1 -8
- package/dist/cjs/api/types/TaskUpdateAction.js +8 -5
- package/dist/cjs/api/types/TaskView.d.ts +9 -12
- package/dist/cjs/api/types/TaskView.js +1 -3
- package/dist/cjs/api/types/TooManyConcurrentActiveSessionsError.d.ts +0 -3
- package/dist/cjs/api/types/TooManyConcurrentActiveSessionsError.js +1 -3
- package/dist/cjs/api/types/UnsupportedContentTypeError.d.ts +0 -3
- package/dist/cjs/api/types/UnsupportedContentTypeError.js +1 -3
- package/dist/cjs/api/types/UploadFilePresignedUrlResponse.d.ts +0 -3
- package/dist/cjs/api/types/UploadFilePresignedUrlResponse.js +1 -3
- package/dist/cjs/api/{resources/files/client/requests → types}/UploadFileRequest.d.ts +3 -13
- package/dist/cjs/api/{resources/files/client/requests → types}/UploadFileRequest.js +2 -3
- package/dist/cjs/api/types/ValidationError.d.ts +0 -3
- package/dist/cjs/api/types/ValidationError.js +1 -3
- package/dist/cjs/api/types/WorkflowExecutionCreatedResponse.d.ts +12 -0
- package/dist/cjs/api/types/WorkflowExecutionCreatedResponse.js +3 -0
- package/dist/cjs/api/types/WorkflowExecutionItemView.d.ts +28 -0
- package/dist/cjs/api/types/WorkflowExecutionItemView.js +3 -0
- package/dist/cjs/api/types/WorkflowExecutionListResponse.d.ts +14 -0
- package/dist/cjs/api/types/WorkflowExecutionListResponse.js +3 -0
- package/dist/cjs/api/types/WorkflowExecutionLogResponse.d.ts +7 -0
- package/dist/cjs/api/types/WorkflowExecutionLogResponse.js +3 -0
- package/dist/cjs/api/types/WorkflowExecutionResponse.d.ts +38 -0
- package/dist/cjs/api/types/WorkflowExecutionResponse.js +3 -0
- package/dist/cjs/api/types/WorkflowExecutionStatus.d.ts +18 -0
- package/dist/cjs/api/types/WorkflowExecutionStatus.js +21 -0
- package/dist/cjs/api/types/WorkflowGenerateResponse.d.ts +11 -0
- package/dist/cjs/api/types/WorkflowGenerateResponse.js +3 -0
- package/dist/cjs/api/types/WorkflowGenerationStatus.d.ts +8 -0
- package/dist/cjs/api/types/WorkflowGenerationStatus.js +11 -0
- package/dist/cjs/api/types/WorkflowItemView.d.ts +19 -0
- package/dist/cjs/api/types/WorkflowItemView.js +3 -0
- package/dist/cjs/api/types/WorkflowListResponse.d.ts +14 -0
- package/dist/cjs/api/types/WorkflowListResponse.js +3 -0
- package/dist/cjs/api/types/WorkflowResponse.d.ts +38 -0
- package/dist/cjs/api/types/WorkflowResponse.js +3 -0
- package/dist/cjs/api/types/WorkflowYamlPresignedUploadResponse.d.ts +15 -0
- package/dist/cjs/api/types/WorkflowYamlPresignedUploadResponse.js +3 -0
- package/dist/cjs/api/types/index.d.ts +23 -2
- package/dist/cjs/api/types/index.js +23 -2
- package/dist/cjs/core/exports.d.ts +1 -0
- package/dist/cjs/core/exports.js +17 -0
- package/dist/cjs/core/fetcher/APIResponse.d.ts +1 -1
- package/dist/cjs/core/fetcher/BinaryResponse.d.ts +1 -1
- package/dist/cjs/core/fetcher/EndpointMetadata.d.ts +13 -0
- package/dist/cjs/core/fetcher/EndpointMetadata.js +2 -0
- package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +12 -0
- package/dist/cjs/core/fetcher/EndpointSupplier.js +22 -0
- package/dist/cjs/core/fetcher/Fetcher.d.ts +9 -4
- package/dist/cjs/core/fetcher/Fetcher.js +205 -10
- package/dist/cjs/core/fetcher/HttpResponsePromise.d.ts +1 -1
- package/dist/cjs/core/fetcher/getErrorResponseBody.js +2 -1
- package/dist/cjs/core/fetcher/getRequestBody.d.ts +1 -1
- package/dist/cjs/core/fetcher/getRequestBody.js +4 -0
- package/dist/cjs/core/fetcher/getResponseBody.js +3 -3
- package/dist/cjs/core/fetcher/index.d.ts +2 -0
- package/dist/cjs/core/fetcher/index.js +3 -1
- package/dist/cjs/core/fetcher/makeRequest.d.ts +1 -1
- package/dist/cjs/core/fetcher/makeRequest.js +2 -4
- package/dist/cjs/core/fetcher/requestWithRetries.js +35 -8
- package/dist/cjs/core/fetcher/signals.d.ts +0 -6
- package/dist/cjs/core/fetcher/signals.js +0 -12
- package/dist/cjs/core/headers.d.ts +2 -3
- package/dist/cjs/core/headers.js +6 -4
- package/dist/cjs/core/index.d.ts +1 -0
- package/dist/cjs/core/index.js +2 -1
- package/dist/cjs/core/logging/exports.d.ts +18 -0
- package/dist/cjs/core/logging/exports.js +45 -0
- package/dist/cjs/core/logging/index.d.ts +1 -0
- package/dist/cjs/core/logging/index.js +17 -0
- package/dist/cjs/core/logging/logger.d.ts +126 -0
- package/dist/cjs/core/logging/logger.js +144 -0
- package/dist/cjs/core/url/encodePathParam.d.ts +1 -0
- package/dist/cjs/core/url/encodePathParam.js +21 -0
- package/dist/cjs/core/url/index.d.ts +1 -0
- package/dist/cjs/core/url/index.js +3 -1
- package/dist/cjs/core/url/join.js +3 -4
- package/dist/cjs/environments.d.ts +0 -3
- package/dist/cjs/environments.js +1 -3
- package/dist/cjs/errors/BrowserUseError.d.ts +1 -4
- package/dist/cjs/errors/BrowserUseError.js +2 -4
- package/dist/cjs/errors/BrowserUseTimeoutError.d.ts +0 -3
- package/dist/cjs/errors/BrowserUseTimeoutError.js +1 -3
- package/dist/cjs/exports.d.ts +1 -0
- package/dist/cjs/exports.js +17 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/wrapper/api/BrowserUseTasks.d.ts +2 -2
- package/dist/cjs/wrapper/api/BrowserUseTasks.js +3 -3
- package/dist/cjs/wrapper/lib/parse.js +1 -13
- package/dist/cjs/wrapper/lib/webhooks.d.ts +24 -4
- package/dist/cjs/wrapper/lib/webhooks.js +2 -2
- package/dist/esm/BaseClient.d.mts +30 -0
- package/dist/esm/BaseClient.mjs +2 -0
- package/dist/esm/Client.d.mts +14 -28
- package/dist/esm/Client.mjs +21 -13
- package/dist/esm/api/errors/BadRequestError.d.mts +1 -4
- package/dist/esm/api/errors/BadRequestError.mjs +1 -3
- package/dist/esm/api/errors/ForbiddenError.d.mts +6 -0
- package/dist/esm/api/errors/ForbiddenError.mjs +13 -0
- package/dist/esm/api/errors/InternalServerError.d.mts +1 -4
- package/dist/esm/api/errors/InternalServerError.mjs +1 -3
- package/dist/esm/api/errors/NotFoundError.d.mts +1 -4
- package/dist/esm/api/errors/NotFoundError.mjs +1 -3
- package/dist/esm/api/errors/PaymentRequiredError.d.mts +2 -5
- package/dist/esm/api/errors/PaymentRequiredError.mjs +1 -3
- package/dist/esm/api/errors/TooManyRequestsError.d.mts +2 -5
- package/dist/esm/api/errors/TooManyRequestsError.mjs +1 -3
- package/dist/esm/api/errors/UnprocessableEntityError.d.mts +1 -4
- package/dist/esm/api/errors/UnprocessableEntityError.mjs +1 -3
- package/dist/esm/api/errors/index.d.mts +4 -3
- package/dist/esm/api/errors/index.mjs +4 -3
- package/dist/esm/api/index.d.mts +1 -1
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/resources/billing/client/Client.d.mts +27 -0
- package/dist/esm/api/resources/{accounts → billing}/client/Client.mjs +21 -18
- package/dist/esm/api/resources/browsers/client/Client.d.mts +90 -0
- package/dist/esm/api/resources/browsers/client/Client.mjs +337 -0
- package/dist/esm/api/resources/browsers/client/index.d.mts +1 -0
- package/dist/esm/api/resources/browsers/client/index.mjs +1 -0
- package/dist/esm/api/resources/browsers/client/requests/CreateBrowserSessionRequest.d.mts +13 -0
- package/dist/esm/api/resources/browsers/client/requests/CreateBrowserSessionRequest.mjs +2 -0
- package/dist/esm/api/resources/browsers/client/requests/GetBrowserSessionBrowsersSessionIdGetRequest.d.mts +9 -0
- package/dist/esm/api/resources/browsers/client/requests/GetBrowserSessionBrowsersSessionIdGetRequest.mjs +2 -0
- package/dist/esm/api/resources/browsers/client/requests/ListBrowserSessionsBrowsersGetRequest.d.mts +10 -0
- package/dist/esm/api/resources/browsers/client/requests/ListBrowserSessionsBrowsersGetRequest.mjs +2 -0
- package/dist/esm/api/resources/browsers/client/requests/UpdateBrowserSessionRequest.d.mts +9 -0
- package/dist/esm/api/resources/browsers/client/requests/UpdateBrowserSessionRequest.mjs +2 -0
- package/dist/esm/api/resources/browsers/client/requests/index.d.mts +4 -0
- package/dist/esm/api/resources/browsers/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/browsers/index.d.mts +1 -0
- package/dist/esm/api/resources/browsers/index.mjs +1 -0
- package/dist/esm/api/resources/files/client/Client.d.mts +44 -38
- package/dist/esm/api/resources/files/client/Client.mjs +125 -33
- package/dist/esm/api/resources/files/client/index.d.mts +0 -1
- package/dist/esm/api/resources/files/client/requests/AgentSessionUploadFilePresignedUrlFilesSessionsSessionIdPresignedUrlPostRequest.d.mts +16 -0
- package/dist/esm/api/resources/files/client/requests/AgentSessionUploadFilePresignedUrlFilesSessionsSessionIdPresignedUrlPostRequest.mjs +2 -0
- package/dist/esm/api/resources/files/client/requests/BrowserSessionUploadFilePresignedUrlFilesBrowsersSessionIdPresignedUrlPostRequest.d.mts +16 -0
- package/dist/esm/api/resources/files/client/requests/BrowserSessionUploadFilePresignedUrlFilesBrowsersSessionIdPresignedUrlPostRequest.mjs +2 -0
- package/dist/esm/api/resources/files/client/requests/GetTaskOutputFilePresignedUrlFilesTasksTaskIdOutputFilesFileIdGetRequest.d.mts +11 -0
- package/dist/esm/api/resources/files/client/requests/GetTaskOutputFilePresignedUrlFilesTasksTaskIdOutputFilesFileIdGetRequest.mjs +2 -0
- package/dist/esm/api/resources/files/client/requests/index.d.mts +3 -1
- package/dist/esm/api/resources/index.d.mts +11 -6
- package/dist/esm/api/resources/index.mjs +11 -6
- package/dist/esm/api/resources/profiles/client/Client.d.mts +32 -32
- package/dist/esm/api/resources/profiles/client/Client.mjs +137 -40
- package/dist/esm/api/resources/profiles/client/index.d.mts +0 -1
- package/dist/esm/api/resources/profiles/client/requests/DeleteBrowserProfileProfilesProfileIdDeleteRequest.d.mts +9 -0
- package/dist/esm/api/resources/profiles/client/requests/DeleteBrowserProfileProfilesProfileIdDeleteRequest.mjs +2 -0
- package/dist/esm/api/resources/profiles/client/requests/GetProfileProfilesProfileIdGetRequest.d.mts +9 -0
- package/dist/esm/api/resources/profiles/client/requests/GetProfileProfilesProfileIdGetRequest.mjs +2 -0
- package/dist/esm/api/resources/profiles/client/requests/ListProfilesProfilesGetRequest.d.mts +0 -3
- package/dist/esm/api/resources/profiles/client/requests/ListProfilesProfilesGetRequest.mjs +1 -3
- package/dist/esm/api/resources/profiles/client/requests/ProfileCreateRequest.d.mts +8 -0
- package/dist/esm/api/resources/profiles/client/requests/ProfileCreateRequest.mjs +2 -0
- package/dist/esm/api/resources/profiles/client/requests/ProfileUpdateRequest.d.mts +11 -0
- package/dist/esm/api/resources/profiles/client/requests/ProfileUpdateRequest.mjs +2 -0
- package/dist/esm/api/resources/profiles/client/requests/index.d.mts +5 -1
- package/dist/esm/api/resources/sessions/client/Client.d.mts +28 -40
- package/dist/esm/api/resources/sessions/client/Client.mjs +106 -69
- package/dist/esm/api/resources/sessions/client/index.d.mts +0 -1
- package/dist/esm/api/resources/sessions/client/requests/CreateSessionPublicShareSessionsSessionIdPublicSharePostRequest.d.mts +9 -0
- package/dist/esm/api/resources/sessions/client/requests/CreateSessionPublicShareSessionsSessionIdPublicSharePostRequest.mjs +2 -0
- package/dist/esm/api/resources/sessions/client/requests/CreateSessionRequest.d.mts +5 -6
- package/dist/esm/api/resources/sessions/client/requests/CreateSessionRequest.mjs +1 -3
- package/dist/esm/api/resources/sessions/client/requests/DeleteSessionPublicShareSessionsSessionIdPublicShareDeleteRequest.d.mts +9 -0
- package/dist/esm/api/resources/sessions/client/requests/DeleteSessionPublicShareSessionsSessionIdPublicShareDeleteRequest.mjs +2 -0
- package/dist/esm/api/resources/sessions/client/requests/GetSessionPublicShareSessionsSessionIdPublicShareGetRequest.d.mts +9 -0
- package/dist/esm/api/resources/sessions/client/requests/GetSessionPublicShareSessionsSessionIdPublicShareGetRequest.mjs +2 -0
- package/dist/esm/api/resources/sessions/client/requests/GetSessionSessionsSessionIdGetRequest.d.mts +9 -0
- package/dist/esm/api/resources/sessions/client/requests/GetSessionSessionsSessionIdGetRequest.mjs +2 -0
- package/dist/esm/api/resources/sessions/client/requests/ListSessionsSessionsGetRequest.d.mts +2 -5
- package/dist/esm/api/resources/sessions/client/requests/ListSessionsSessionsGetRequest.mjs +1 -3
- package/dist/esm/api/resources/sessions/client/requests/UpdateSessionRequest.d.mts +4 -4
- package/dist/esm/api/resources/sessions/client/requests/UpdateSessionRequest.mjs +1 -3
- package/dist/esm/api/resources/sessions/client/requests/index.d.mts +7 -3
- package/dist/esm/api/resources/tasks/client/Client.d.mts +17 -34
- package/dist/esm/api/resources/tasks/client/Client.mjs +81 -55
- package/dist/esm/api/resources/tasks/client/index.d.mts +0 -1
- package/dist/esm/api/resources/tasks/client/requests/CreateTaskRequest.d.mts +19 -14
- package/dist/esm/api/resources/tasks/client/requests/CreateTaskRequest.mjs +1 -3
- package/dist/esm/api/resources/tasks/client/requests/GetTaskLogsTasksTaskIdLogsGetRequest.d.mts +9 -0
- package/dist/esm/api/resources/tasks/client/requests/GetTaskLogsTasksTaskIdLogsGetRequest.mjs +2 -0
- package/dist/esm/api/resources/tasks/client/requests/GetTaskTasksTaskIdGetRequest.d.mts +9 -0
- package/dist/esm/api/resources/tasks/client/requests/GetTaskTasksTaskIdGetRequest.mjs +2 -0
- package/dist/esm/api/resources/tasks/client/requests/ListTasksTasksGetRequest.d.mts +5 -8
- package/dist/esm/api/resources/tasks/client/requests/ListTasksTasksGetRequest.mjs +1 -3
- package/dist/esm/api/resources/tasks/client/requests/UpdateTaskRequest.d.mts +3 -4
- package/dist/esm/api/resources/tasks/client/requests/UpdateTaskRequest.mjs +1 -3
- package/dist/esm/api/resources/tasks/client/requests/index.d.mts +5 -3
- package/dist/esm/api/resources/workflows/client/Client.d.mts +221 -0
- package/dist/esm/api/resources/workflows/client/Client.mjs +949 -0
- package/dist/esm/api/resources/workflows/client/index.d.mts +1 -0
- package/dist/esm/api/resources/workflows/client/index.mjs +1 -0
- package/dist/esm/api/resources/workflows/client/requests/CancelExecutionWorkflowsExecutionsExecutionIdCancelPatchRequest.d.mts +9 -0
- package/dist/esm/api/resources/workflows/client/requests/CancelExecutionWorkflowsExecutionsExecutionIdCancelPatchRequest.mjs +2 -0
- package/dist/esm/api/resources/workflows/client/requests/DeleteWorkflowWorkflowsWorkflowIdDeleteRequest.d.mts +9 -0
- package/dist/esm/api/resources/workflows/client/requests/DeleteWorkflowWorkflowsWorkflowIdDeleteRequest.mjs +2 -0
- package/dist/esm/api/resources/workflows/client/requests/GetExecutionLogsWorkflowsExecutionsExecutionIdLogsGetRequest.d.mts +9 -0
- package/dist/esm/api/resources/workflows/client/requests/GetExecutionLogsWorkflowsExecutionsExecutionIdLogsGetRequest.mjs +2 -0
- package/dist/esm/api/resources/workflows/client/requests/GetExecutionWorkflowsExecutionsExecutionIdGetRequest.d.mts +9 -0
- package/dist/esm/api/resources/workflows/client/requests/GetExecutionWorkflowsExecutionsExecutionIdGetRequest.mjs +2 -0
- package/dist/esm/api/resources/workflows/client/requests/GetWorkflowWorkflowsWorkflowIdGetRequest.d.mts +9 -0
- package/dist/esm/api/resources/workflows/client/requests/GetWorkflowWorkflowsWorkflowIdGetRequest.mjs +2 -0
- package/dist/esm/api/resources/workflows/client/requests/ListAllExecutionsWorkflowsExecutionsGetRequest.d.mts +11 -0
- package/dist/esm/api/resources/workflows/client/requests/ListAllExecutionsWorkflowsExecutionsGetRequest.mjs +2 -0
- package/dist/esm/api/resources/workflows/client/requests/ListWorkflowExecutionsWorkflowsWorkflowIdExecutionsGetRequest.d.mts +14 -0
- package/dist/esm/api/resources/workflows/client/requests/ListWorkflowExecutionsWorkflowsWorkflowIdExecutionsGetRequest.mjs +2 -0
- package/dist/esm/api/resources/workflows/client/requests/ListWorkflowsWorkflowsGetRequest.d.mts +10 -0
- package/dist/esm/api/resources/workflows/client/requests/ListWorkflowsWorkflowsGetRequest.mjs +2 -0
- package/dist/esm/api/resources/workflows/client/requests/WorkflowCreateRequest.d.mts +14 -0
- package/dist/esm/api/resources/workflows/client/requests/WorkflowCreateRequest.mjs +2 -0
- package/dist/esm/api/resources/workflows/client/requests/WorkflowExecuteRequest.d.mts +16 -0
- package/dist/esm/api/resources/workflows/client/requests/WorkflowExecuteRequest.mjs +2 -0
- package/dist/esm/api/resources/workflows/client/requests/WorkflowGenerateRequest.d.mts +36 -0
- package/dist/esm/api/resources/workflows/client/requests/WorkflowGenerateRequest.mjs +2 -0
- package/dist/esm/api/resources/workflows/client/requests/WorkflowUpdateRequest.d.mts +15 -0
- package/dist/esm/api/resources/workflows/client/requests/WorkflowUpdateRequest.mjs +2 -0
- package/dist/esm/api/resources/workflows/client/requests/WorkflowYamlPresignedUploadRequest.d.mts +14 -0
- package/dist/esm/api/resources/workflows/client/requests/WorkflowYamlPresignedUploadRequest.mjs +2 -0
- package/dist/esm/api/resources/workflows/client/requests/index.d.mts +13 -0
- package/dist/esm/api/resources/workflows/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/workflows/index.d.mts +2 -0
- package/dist/esm/api/resources/workflows/index.mjs +2 -0
- package/dist/esm/api/resources/workflows/types/ExecuteWorkflowWorkflowsWorkflowIdExecutePostResponse.d.mts +2 -0
- package/dist/esm/api/resources/workflows/types/ExecuteWorkflowWorkflowsWorkflowIdExecutePostResponse.mjs +2 -0
- package/dist/esm/api/resources/workflows/types/index.d.mts +1 -0
- package/dist/esm/api/resources/workflows/types/index.mjs +1 -0
- package/dist/esm/api/types/AccountNotFoundError.d.mts +0 -3
- package/dist/esm/api/types/AccountNotFoundError.mjs +1 -3
- package/dist/esm/api/types/AccountView.d.mts +11 -9
- package/dist/esm/api/types/AccountView.mjs +1 -3
- package/dist/esm/api/types/BadRequestErrorBody.d.mts +1 -4
- package/dist/esm/api/types/BadRequestErrorBody.mjs +1 -3
- package/dist/esm/api/types/BrowserSessionItemView.d.mts +20 -0
- package/dist/esm/api/types/BrowserSessionItemView.mjs +2 -0
- package/dist/esm/api/types/BrowserSessionListResponse.d.mts +14 -0
- package/dist/esm/api/types/BrowserSessionListResponse.mjs +2 -0
- package/dist/esm/api/types/BrowserSessionStatus.d.mts +12 -0
- package/dist/esm/api/types/BrowserSessionStatus.mjs +12 -0
- package/dist/esm/api/types/BrowserSessionUpdateAction.d.mts +7 -0
- package/dist/esm/api/types/BrowserSessionUpdateAction.mjs +2 -0
- package/dist/esm/api/types/BrowserSessionView.d.mts +20 -0
- package/dist/esm/api/types/BrowserSessionView.mjs +2 -0
- package/dist/esm/api/types/DownloadUrlGenerationError.d.mts +0 -3
- package/dist/esm/api/types/DownloadUrlGenerationError.mjs +1 -3
- package/dist/esm/api/types/ExecutionMode.d.mts +12 -0
- package/dist/esm/api/types/ExecutionMode.mjs +12 -0
- package/dist/esm/api/types/FileView.d.mts +0 -3
- package/dist/esm/api/types/FileView.mjs +1 -3
- package/dist/esm/api/types/HttpValidationError.d.mts +1 -4
- package/dist/esm/api/types/HttpValidationError.mjs +1 -3
- package/dist/esm/api/types/InsufficientCreditsError.d.mts +0 -3
- package/dist/esm/api/types/InsufficientCreditsError.mjs +1 -3
- package/dist/esm/api/types/InternalServerErrorBody.d.mts +0 -3
- package/dist/esm/api/types/InternalServerErrorBody.mjs +1 -3
- package/dist/esm/api/types/NotFoundErrorBody.d.mts +1 -4
- package/dist/esm/api/types/NotFoundErrorBody.mjs +1 -3
- package/dist/esm/api/types/OutputFileNotFoundError.d.mts +0 -3
- package/dist/esm/api/types/OutputFileNotFoundError.mjs +1 -3
- package/dist/esm/api/types/PlanInfo.d.mts +15 -0
- package/dist/esm/api/types/PlanInfo.mjs +2 -0
- package/dist/esm/api/types/ProfileListResponse.d.mts +1 -4
- package/dist/esm/api/types/ProfileListResponse.mjs +1 -3
- package/dist/esm/api/types/ProfileNotFoundError.d.mts +0 -3
- package/dist/esm/api/types/ProfileNotFoundError.mjs +1 -3
- package/dist/esm/api/types/ProfileView.d.mts +5 -4
- package/dist/esm/api/types/ProfileView.mjs +1 -3
- package/dist/esm/api/types/ProxyCountryCode.d.mts +244 -10
- package/dist/esm/api/types/ProxyCountryCode.mjs +244 -9
- package/dist/esm/api/types/SessionHasRunningTaskError.d.mts +0 -3
- package/dist/esm/api/types/SessionHasRunningTaskError.mjs +1 -3
- package/dist/esm/api/types/SessionItemView.d.mts +3 -6
- package/dist/esm/api/types/SessionItemView.mjs +1 -3
- package/dist/esm/api/types/SessionListResponse.d.mts +1 -4
- package/dist/esm/api/types/SessionListResponse.mjs +1 -3
- package/dist/esm/api/types/SessionNotFoundError.d.mts +0 -3
- package/dist/esm/api/types/SessionNotFoundError.mjs +1 -3
- package/dist/esm/api/types/SessionStatus.d.mts +1 -4
- package/dist/esm/api/types/SessionStatus.mjs +6 -1
- package/dist/esm/api/types/SessionStoppedError.d.mts +0 -3
- package/dist/esm/api/types/SessionStoppedError.mjs +1 -3
- package/dist/esm/api/types/SessionTimeoutLimitExceededError.d.mts +6 -0
- package/dist/esm/api/types/SessionTimeoutLimitExceededError.mjs +2 -0
- package/dist/esm/api/types/SessionUpdateAction.d.mts +0 -3
- package/dist/esm/api/types/SessionUpdateAction.mjs +1 -3
- package/dist/esm/api/types/SessionView.d.mts +4 -7
- package/dist/esm/api/types/SessionView.mjs +1 -3
- package/dist/esm/api/types/ShareNotFoundError.d.mts +0 -3
- package/dist/esm/api/types/ShareNotFoundError.mjs +1 -3
- package/dist/esm/api/types/ShareView.d.mts +1 -4
- package/dist/esm/api/types/ShareView.mjs +1 -3
- package/dist/esm/api/types/SupportedLlMs.d.mts +5 -4
- package/dist/esm/api/types/SupportedLlMs.mjs +5 -3
- package/dist/esm/api/types/TaskCreatedResponse.d.mts +2 -3
- package/dist/esm/api/types/TaskCreatedResponse.mjs +1 -3
- package/dist/esm/api/types/TaskItemView.d.mts +9 -12
- package/dist/esm/api/types/TaskItemView.mjs +1 -3
- package/dist/esm/api/types/TaskListResponse.d.mts +1 -4
- package/dist/esm/api/types/TaskListResponse.mjs +1 -3
- package/dist/esm/api/types/TaskLogFileResponse.d.mts +0 -3
- package/dist/esm/api/types/TaskLogFileResponse.mjs +1 -3
- package/dist/esm/api/types/TaskNotFoundError.d.mts +0 -3
- package/dist/esm/api/types/TaskNotFoundError.mjs +1 -3
- package/dist/esm/api/types/TaskOutputFileResponse.d.mts +0 -3
- package/dist/esm/api/types/TaskOutputFileResponse.mjs +1 -3
- package/dist/esm/api/types/TaskStatus.d.mts +3 -6
- package/dist/esm/api/types/TaskStatus.mjs +9 -2
- package/dist/esm/api/types/TaskStepView.d.mts +1 -4
- package/dist/esm/api/types/TaskStepView.mjs +1 -3
- package/dist/esm/api/types/TaskUpdateAction.d.mts +1 -8
- package/dist/esm/api/types/TaskUpdateAction.mjs +6 -3
- package/dist/esm/api/types/TaskView.d.mts +9 -12
- package/dist/esm/api/types/TaskView.mjs +1 -3
- package/dist/esm/api/types/TooManyConcurrentActiveSessionsError.d.mts +0 -3
- package/dist/esm/api/types/TooManyConcurrentActiveSessionsError.mjs +1 -3
- package/dist/esm/api/types/UnsupportedContentTypeError.d.mts +0 -3
- package/dist/esm/api/types/UnsupportedContentTypeError.mjs +1 -3
- package/dist/esm/api/types/UploadFilePresignedUrlResponse.d.mts +0 -3
- package/dist/esm/api/types/UploadFilePresignedUrlResponse.mjs +1 -3
- package/dist/esm/api/{resources/files/client/requests → types}/UploadFileRequest.d.mts +3 -13
- package/dist/esm/api/{resources/files/client/requests → types}/UploadFileRequest.mjs +2 -3
- package/dist/esm/api/types/ValidationError.d.mts +0 -3
- package/dist/esm/api/types/ValidationError.mjs +1 -3
- package/dist/esm/api/types/WorkflowExecutionCreatedResponse.d.mts +12 -0
- package/dist/esm/api/types/WorkflowExecutionCreatedResponse.mjs +2 -0
- package/dist/esm/api/types/WorkflowExecutionItemView.d.mts +28 -0
- package/dist/esm/api/types/WorkflowExecutionItemView.mjs +2 -0
- package/dist/esm/api/types/WorkflowExecutionListResponse.d.mts +14 -0
- package/dist/esm/api/types/WorkflowExecutionListResponse.mjs +2 -0
- package/dist/esm/api/types/WorkflowExecutionLogResponse.d.mts +7 -0
- package/dist/esm/api/types/WorkflowExecutionLogResponse.mjs +2 -0
- package/dist/esm/api/types/WorkflowExecutionResponse.d.mts +38 -0
- package/dist/esm/api/types/WorkflowExecutionResponse.mjs +2 -0
- package/dist/esm/api/types/WorkflowExecutionStatus.d.mts +18 -0
- package/dist/esm/api/types/WorkflowExecutionStatus.mjs +18 -0
- package/dist/esm/api/types/WorkflowGenerateResponse.d.mts +11 -0
- package/dist/esm/api/types/WorkflowGenerateResponse.mjs +2 -0
- package/dist/esm/api/types/WorkflowGenerationStatus.d.mts +8 -0
- package/dist/esm/api/types/WorkflowGenerationStatus.mjs +8 -0
- package/dist/esm/api/types/WorkflowItemView.d.mts +19 -0
- package/dist/esm/api/types/WorkflowItemView.mjs +2 -0
- package/dist/esm/api/types/WorkflowListResponse.d.mts +14 -0
- package/dist/esm/api/types/WorkflowListResponse.mjs +2 -0
- package/dist/esm/api/types/WorkflowResponse.d.mts +38 -0
- package/dist/esm/api/types/WorkflowResponse.mjs +2 -0
- package/dist/esm/api/types/WorkflowYamlPresignedUploadResponse.d.mts +15 -0
- package/dist/esm/api/types/WorkflowYamlPresignedUploadResponse.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +23 -2
- package/dist/esm/api/types/index.mjs +23 -2
- package/dist/esm/core/exports.d.mts +1 -0
- package/dist/esm/core/exports.mjs +1 -0
- package/dist/esm/core/fetcher/APIResponse.d.mts +1 -1
- package/dist/esm/core/fetcher/BinaryResponse.d.mts +1 -1
- package/dist/esm/core/fetcher/EndpointMetadata.d.mts +13 -0
- package/dist/esm/core/fetcher/EndpointMetadata.mjs +1 -0
- package/dist/esm/core/fetcher/EndpointSupplier.d.mts +12 -0
- package/dist/esm/core/fetcher/EndpointSupplier.mjs +19 -0
- package/dist/esm/core/fetcher/Fetcher.d.mts +9 -4
- package/dist/esm/core/fetcher/Fetcher.mjs +205 -10
- package/dist/esm/core/fetcher/HttpResponsePromise.d.mts +1 -1
- package/dist/esm/core/fetcher/getErrorResponseBody.mjs +2 -1
- package/dist/esm/core/fetcher/getRequestBody.d.mts +1 -1
- package/dist/esm/core/fetcher/getRequestBody.mjs +4 -0
- package/dist/esm/core/fetcher/getResponseBody.mjs +3 -3
- package/dist/esm/core/fetcher/index.d.mts +2 -0
- package/dist/esm/core/fetcher/index.mjs +1 -0
- package/dist/esm/core/fetcher/makeRequest.d.mts +1 -1
- package/dist/esm/core/fetcher/makeRequest.mjs +2 -4
- package/dist/esm/core/fetcher/requestWithRetries.mjs +35 -8
- package/dist/esm/core/fetcher/signals.d.mts +0 -6
- package/dist/esm/core/fetcher/signals.mjs +0 -12
- package/dist/esm/core/headers.d.mts +2 -3
- package/dist/esm/core/headers.mjs +6 -4
- package/dist/esm/core/index.d.mts +1 -0
- package/dist/esm/core/index.mjs +1 -0
- package/dist/esm/core/logging/exports.d.mts +18 -0
- package/dist/esm/core/logging/exports.mjs +9 -0
- package/dist/esm/core/logging/index.d.mts +1 -0
- package/dist/esm/core/logging/index.mjs +1 -0
- package/dist/esm/core/logging/logger.d.mts +126 -0
- package/dist/esm/core/logging/logger.mjs +138 -0
- package/dist/esm/core/url/encodePathParam.d.mts +1 -0
- package/dist/esm/core/url/encodePathParam.mjs +18 -0
- package/dist/esm/core/url/index.d.mts +1 -0
- package/dist/esm/core/url/index.mjs +1 -0
- package/dist/esm/core/url/join.mjs +3 -4
- package/dist/esm/environments.d.mts +0 -3
- package/dist/esm/environments.mjs +1 -3
- package/dist/esm/errors/BrowserUseError.d.mts +1 -4
- package/dist/esm/errors/BrowserUseError.mjs +2 -4
- package/dist/esm/errors/BrowserUseTimeoutError.d.mts +0 -3
- package/dist/esm/errors/BrowserUseTimeoutError.mjs +1 -3
- package/dist/esm/exports.d.mts +1 -0
- package/dist/esm/exports.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/esm/wrapper/api/BrowserUseTasks.d.mts +2 -2
- package/dist/esm/wrapper/api/BrowserUseTasks.mjs +4 -3
- package/dist/esm/wrapper/lib/parse.mjs +2 -14
- package/dist/esm/wrapper/lib/webhooks.d.mts +24 -4
- package/dist/esm/wrapper/lib/webhooks.mjs +2 -2
- package/package.json +15 -15
- package/reference.md +1434 -174
- package/dist/cjs/api/resources/accounts/client/Client.d.ts +0 -47
- package/dist/esm/api/resources/accounts/client/Client.d.mts +0 -47
- /package/dist/cjs/api/resources/{accounts → billing}/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{accounts → billing}/client/index.js +0 -0
- /package/dist/cjs/api/resources/{accounts → billing}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{accounts → billing}/index.js +0 -0
- /package/dist/esm/api/resources/{accounts → billing}/client/index.d.mts +0 -0
- /package/dist/esm/api/resources/{accounts → billing}/client/index.mjs +0 -0
- /package/dist/esm/api/resources/{accounts → billing}/index.d.mts +0 -0
- /package/dist/esm/api/resources/{accounts → billing}/index.mjs +0 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type * as core from "./core/index.js";
|
|
2
|
+
import type * as environments from "./environments.js";
|
|
3
|
+
export interface BaseClientOptions {
|
|
4
|
+
environment?: core.Supplier<environments.BrowserUseEnvironment | string>;
|
|
5
|
+
/** Specify a custom URL to connect the client to. */
|
|
6
|
+
baseUrl?: core.Supplier<string>;
|
|
7
|
+
apiKey: core.Supplier<string>;
|
|
8
|
+
/** Additional headers to include in requests. */
|
|
9
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
10
|
+
/** The default maximum time to wait for a response in seconds. */
|
|
11
|
+
timeoutInSeconds?: number;
|
|
12
|
+
/** The default number of times to retry the request. Defaults to 2. */
|
|
13
|
+
maxRetries?: number;
|
|
14
|
+
/** Provide a custom fetch implementation. Useful for platforms that don't have a built-in fetch or need a custom implementation. */
|
|
15
|
+
fetch?: typeof fetch;
|
|
16
|
+
/** Configure logging for the client. */
|
|
17
|
+
logging?: core.logging.LogConfig | core.logging.Logger;
|
|
18
|
+
}
|
|
19
|
+
export interface BaseRequestOptions {
|
|
20
|
+
/** The maximum time to wait for a response in seconds. */
|
|
21
|
+
timeoutInSeconds?: number;
|
|
22
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
23
|
+
maxRetries?: number;
|
|
24
|
+
/** A hook to abort the request. */
|
|
25
|
+
abortSignal?: AbortSignal;
|
|
26
|
+
/** Additional query string parameters to include in the request. */
|
|
27
|
+
queryParams?: Record<string, unknown>;
|
|
28
|
+
/** Additional headers to include in the request. */
|
|
29
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
30
|
+
}
|
package/dist/cjs/Client.d.ts
CHANGED
|
@@ -1,46 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*/
|
|
4
|
-
import * as environments from "./environments.js";
|
|
5
|
-
import * as core from "./core/index.js";
|
|
6
|
-
import { Accounts } from "./api/resources/accounts/client/Client.js";
|
|
7
|
-
import { Tasks } from "./api/resources/tasks/client/Client.js";
|
|
8
|
-
import { Sessions } from "./api/resources/sessions/client/Client.js";
|
|
1
|
+
import { Billing } from "./api/resources/billing/client/Client.js";
|
|
2
|
+
import { Browsers } from "./api/resources/browsers/client/Client.js";
|
|
9
3
|
import { Files } from "./api/resources/files/client/Client.js";
|
|
10
4
|
import { Profiles } from "./api/resources/profiles/client/Client.js";
|
|
5
|
+
import { Sessions } from "./api/resources/sessions/client/Client.js";
|
|
6
|
+
import { Tasks } from "./api/resources/tasks/client/Client.js";
|
|
7
|
+
import { Workflows } from "./api/resources/workflows/client/Client.js";
|
|
8
|
+
import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
|
|
11
9
|
export declare namespace BrowserUseClient {
|
|
12
|
-
interface Options {
|
|
13
|
-
environment?: core.Supplier<environments.BrowserUseEnvironment | string>;
|
|
14
|
-
/** Specify a custom URL to connect the client to. */
|
|
15
|
-
baseUrl?: core.Supplier<string>;
|
|
16
|
-
apiKey: core.Supplier<string>;
|
|
17
|
-
/** Additional headers to include in requests. */
|
|
18
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
10
|
+
interface Options extends BaseClientOptions {
|
|
19
11
|
}
|
|
20
|
-
interface RequestOptions {
|
|
21
|
-
/** The maximum time to wait for a response in seconds. */
|
|
22
|
-
timeoutInSeconds?: number;
|
|
23
|
-
/** The number of times to retry the request. Defaults to 2. */
|
|
24
|
-
maxRetries?: number;
|
|
25
|
-
/** A hook to abort the request. */
|
|
26
|
-
abortSignal?: AbortSignal;
|
|
27
|
-
/** Additional query string parameters to include in the request. */
|
|
28
|
-
queryParams?: Record<string, unknown>;
|
|
29
|
-
/** Additional headers to include in the request. */
|
|
30
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
12
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
31
13
|
}
|
|
32
14
|
}
|
|
33
15
|
export declare class BrowserUseClient {
|
|
34
16
|
protected readonly _options: BrowserUseClient.Options;
|
|
35
|
-
protected
|
|
17
|
+
protected _billing: Billing | undefined;
|
|
36
18
|
protected _tasks: Tasks | undefined;
|
|
37
19
|
protected _sessions: Sessions | undefined;
|
|
38
20
|
protected _files: Files | undefined;
|
|
39
21
|
protected _profiles: Profiles | undefined;
|
|
22
|
+
protected _browsers: Browsers | undefined;
|
|
23
|
+
protected _workflows: Workflows | undefined;
|
|
40
24
|
constructor(_options: BrowserUseClient.Options);
|
|
41
|
-
get
|
|
25
|
+
get billing(): Billing;
|
|
42
26
|
get tasks(): Tasks;
|
|
43
27
|
get sessions(): Sessions;
|
|
44
28
|
get files(): Files;
|
|
45
29
|
get profiles(): Profiles;
|
|
30
|
+
get browsers(): Browsers;
|
|
31
|
+
get workflows(): Workflows;
|
|
46
32
|
}
|
package/dist/cjs/Client.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
-
*/
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
5
3
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
4
|
if (k2 === undefined) k2 = k;
|
|
7
5
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -37,43 +35,53 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
37
35
|
})();
|
|
38
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
37
|
exports.BrowserUseClient = void 0;
|
|
40
|
-
const
|
|
38
|
+
const Client_js_1 = require("./api/resources/billing/client/Client.js");
|
|
39
|
+
const Client_js_2 = require("./api/resources/browsers/client/Client.js");
|
|
40
|
+
const Client_js_3 = require("./api/resources/files/client/Client.js");
|
|
41
|
+
const Client_js_4 = require("./api/resources/profiles/client/Client.js");
|
|
42
|
+
const Client_js_5 = require("./api/resources/sessions/client/Client.js");
|
|
43
|
+
const Client_js_6 = require("./api/resources/tasks/client/Client.js");
|
|
44
|
+
const Client_js_7 = require("./api/resources/workflows/client/Client.js");
|
|
41
45
|
const headers_js_1 = require("./core/headers.js");
|
|
42
|
-
const
|
|
43
|
-
const Client_js_2 = require("./api/resources/tasks/client/Client.js");
|
|
44
|
-
const Client_js_3 = require("./api/resources/sessions/client/Client.js");
|
|
45
|
-
const Client_js_4 = require("./api/resources/files/client/Client.js");
|
|
46
|
-
const Client_js_5 = require("./api/resources/profiles/client/Client.js");
|
|
46
|
+
const core = __importStar(require("./core/index.js"));
|
|
47
47
|
class BrowserUseClient {
|
|
48
48
|
constructor(_options) {
|
|
49
|
-
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
49
|
+
this._options = Object.assign(Object.assign({}, _options), { logging: core.logging.createLogger(_options === null || _options === void 0 ? void 0 : _options.logging), headers: (0, headers_js_1.mergeHeaders)({
|
|
50
50
|
"X-Fern-Language": "JavaScript",
|
|
51
51
|
"X-Fern-SDK-Name": "browser-use-sdk",
|
|
52
|
-
"X-Fern-SDK-Version": "2.0.
|
|
53
|
-
"User-Agent": "browser-use-sdk/2.0.
|
|
52
|
+
"X-Fern-SDK-Version": "2.0.5",
|
|
53
|
+
"User-Agent": "browser-use-sdk/2.0.5",
|
|
54
54
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
55
55
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
56
56
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
57
57
|
}
|
|
58
|
-
get
|
|
58
|
+
get billing() {
|
|
59
59
|
var _a;
|
|
60
|
-
return ((_a = this.
|
|
60
|
+
return ((_a = this._billing) !== null && _a !== void 0 ? _a : (this._billing = new Client_js_1.Billing(this._options)));
|
|
61
61
|
}
|
|
62
62
|
get tasks() {
|
|
63
63
|
var _a;
|
|
64
|
-
return ((_a = this._tasks) !== null && _a !== void 0 ? _a : (this._tasks = new
|
|
64
|
+
return ((_a = this._tasks) !== null && _a !== void 0 ? _a : (this._tasks = new Client_js_6.Tasks(this._options)));
|
|
65
65
|
}
|
|
66
66
|
get sessions() {
|
|
67
67
|
var _a;
|
|
68
|
-
return ((_a = this._sessions) !== null && _a !== void 0 ? _a : (this._sessions = new
|
|
68
|
+
return ((_a = this._sessions) !== null && _a !== void 0 ? _a : (this._sessions = new Client_js_5.Sessions(this._options)));
|
|
69
69
|
}
|
|
70
70
|
get files() {
|
|
71
71
|
var _a;
|
|
72
|
-
return ((_a = this._files) !== null && _a !== void 0 ? _a : (this._files = new
|
|
72
|
+
return ((_a = this._files) !== null && _a !== void 0 ? _a : (this._files = new Client_js_3.Files(this._options)));
|
|
73
73
|
}
|
|
74
74
|
get profiles() {
|
|
75
75
|
var _a;
|
|
76
|
-
return ((_a = this._profiles) !== null && _a !== void 0 ? _a : (this._profiles = new
|
|
76
|
+
return ((_a = this._profiles) !== null && _a !== void 0 ? _a : (this._profiles = new Client_js_4.Profiles(this._options)));
|
|
77
|
+
}
|
|
78
|
+
get browsers() {
|
|
79
|
+
var _a;
|
|
80
|
+
return ((_a = this._browsers) !== null && _a !== void 0 ? _a : (this._browsers = new Client_js_2.Browsers(this._options)));
|
|
81
|
+
}
|
|
82
|
+
get workflows() {
|
|
83
|
+
var _a;
|
|
84
|
+
return ((_a = this._workflows) !== null && _a !== void 0 ? _a : (this._workflows = new Client_js_7.Workflows(this._options)));
|
|
77
85
|
}
|
|
78
86
|
}
|
|
79
87
|
exports.BrowserUseClient = BrowserUseClient;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
4
2
|
import * as errors from "../../errors/index.js";
|
|
5
|
-
import * as core from "../../core/index.js";
|
|
6
3
|
export declare class BadRequestError extends errors.BrowserUseError {
|
|
7
4
|
constructor(body?: unknown, rawResponse?: core.RawResponse);
|
|
8
5
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
-
*/
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
5
3
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
4
|
if (k2 === undefined) k2 = k;
|
|
7
5
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
2
|
+
import * as errors from "../../errors/index.js";
|
|
3
|
+
import type * as BrowserUse from "../index.js";
|
|
4
|
+
export declare class ForbiddenError extends errors.BrowserUseError {
|
|
5
|
+
constructor(body: BrowserUse.SessionTimeoutLimitExceededError, rawResponse?: core.RawResponse);
|
|
6
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.ForbiddenError = void 0;
|
|
38
|
+
const errors = __importStar(require("../../errors/index.js"));
|
|
39
|
+
class ForbiddenError extends errors.BrowserUseError {
|
|
40
|
+
constructor(body, rawResponse) {
|
|
41
|
+
super({
|
|
42
|
+
message: "ForbiddenError",
|
|
43
|
+
statusCode: 403,
|
|
44
|
+
body: body,
|
|
45
|
+
rawResponse: rawResponse,
|
|
46
|
+
});
|
|
47
|
+
Object.setPrototypeOf(this, ForbiddenError.prototype);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.ForbiddenError = ForbiddenError;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
4
2
|
import * as errors from "../../errors/index.js";
|
|
5
|
-
import * as core from "../../core/index.js";
|
|
6
3
|
export declare class InternalServerError extends errors.BrowserUseError {
|
|
7
4
|
constructor(body?: unknown, rawResponse?: core.RawResponse);
|
|
8
5
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
-
*/
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
5
3
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
4
|
if (k2 === undefined) k2 = k;
|
|
7
5
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
4
2
|
import * as errors from "../../errors/index.js";
|
|
5
|
-
import * as core from "../../core/index.js";
|
|
6
3
|
export declare class NotFoundError extends errors.BrowserUseError {
|
|
7
4
|
constructor(body?: unknown, rawResponse?: core.RawResponse);
|
|
8
5
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
-
*/
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
5
3
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
4
|
if (k2 === undefined) k2 = k;
|
|
7
5
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
4
2
|
import * as errors from "../../errors/index.js";
|
|
5
|
-
import * as BrowserUse from "../index.js";
|
|
6
|
-
import * as core from "../../core/index.js";
|
|
3
|
+
import type * as BrowserUse from "../index.js";
|
|
7
4
|
export declare class PaymentRequiredError extends errors.BrowserUseError {
|
|
8
5
|
constructor(body: BrowserUse.InsufficientCreditsError, rawResponse?: core.RawResponse);
|
|
9
6
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
-
*/
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
5
3
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
4
|
if (k2 === undefined) k2 = k;
|
|
7
5
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
4
2
|
import * as errors from "../../errors/index.js";
|
|
5
|
-
import * as BrowserUse from "../index.js";
|
|
6
|
-
import * as core from "../../core/index.js";
|
|
3
|
+
import type * as BrowserUse from "../index.js";
|
|
7
4
|
export declare class TooManyRequestsError extends errors.BrowserUseError {
|
|
8
5
|
constructor(body: BrowserUse.TooManyConcurrentActiveSessionsError, rawResponse?: core.RawResponse);
|
|
9
6
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
-
*/
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
5
3
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
4
|
if (k2 === undefined) k2 = k;
|
|
7
5
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
4
2
|
import * as errors from "../../errors/index.js";
|
|
5
|
-
import * as core from "../../core/index.js";
|
|
6
3
|
export declare class UnprocessableEntityError extends errors.BrowserUseError {
|
|
7
4
|
constructor(body?: unknown, rawResponse?: core.RawResponse);
|
|
8
5
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
-
*/
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
5
3
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
4
|
if (k2 === undefined) k2 = k;
|
|
7
5
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export * from "./NotFoundError.js";
|
|
2
|
-
export * from "./UnprocessableEntityError.js";
|
|
3
1
|
export * from "./BadRequestError.js";
|
|
4
|
-
export * from "./
|
|
2
|
+
export * from "./ForbiddenError.js";
|
|
5
3
|
export * from "./InternalServerError.js";
|
|
4
|
+
export * from "./NotFoundError.js";
|
|
6
5
|
export * from "./PaymentRequiredError.js";
|
|
6
|
+
export * from "./TooManyRequestsError.js";
|
|
7
|
+
export * from "./UnprocessableEntityError.js";
|
|
@@ -14,9 +14,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./NotFoundError.js"), exports);
|
|
18
|
-
__exportStar(require("./UnprocessableEntityError.js"), exports);
|
|
19
17
|
__exportStar(require("./BadRequestError.js"), exports);
|
|
20
|
-
__exportStar(require("./
|
|
18
|
+
__exportStar(require("./ForbiddenError.js"), exports);
|
|
21
19
|
__exportStar(require("./InternalServerError.js"), exports);
|
|
20
|
+
__exportStar(require("./NotFoundError.js"), exports);
|
|
22
21
|
__exportStar(require("./PaymentRequiredError.js"), exports);
|
|
22
|
+
__exportStar(require("./TooManyRequestsError.js"), exports);
|
|
23
|
+
__exportStar(require("./UnprocessableEntityError.js"), exports);
|
package/dist/cjs/api/index.d.ts
CHANGED
package/dist/cjs/api/index.js
CHANGED
|
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./types/index.js"), exports);
|
|
18
17
|
__exportStar(require("./errors/index.js"), exports);
|
|
19
18
|
__exportStar(require("./resources/index.js"), exports);
|
|
19
|
+
__exportStar(require("./types/index.js"), exports);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
|
+
import * as core from "../../../../core/index.js";
|
|
3
|
+
import * as BrowserUse from "../../../index.js";
|
|
4
|
+
export declare namespace Billing {
|
|
5
|
+
interface Options extends BaseClientOptions {
|
|
6
|
+
}
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class Billing {
|
|
11
|
+
protected readonly _options: Billing.Options;
|
|
12
|
+
constructor(_options: Billing.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Get authenticated account information including credit balances and account details.
|
|
15
|
+
*
|
|
16
|
+
* @param {Billing.RequestOptions} requestOptions - Request-specific configuration.
|
|
17
|
+
*
|
|
18
|
+
* @throws {@link BrowserUse.NotFoundError}
|
|
19
|
+
* @throws {@link BrowserUse.UnprocessableEntityError}
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* await client.billing.getAccountBilling()
|
|
23
|
+
*/
|
|
24
|
+
getAccountBilling(requestOptions?: Billing.RequestOptions): core.HttpResponsePromise<BrowserUse.AccountView>;
|
|
25
|
+
private __getAccountBilling;
|
|
26
|
+
protected _getCustomAuthorizationHeaders(): Promise<Record<string, string | undefined>>;
|
|
27
|
+
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
-
*/
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
5
3
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
4
|
if (k2 === undefined) k2 = k;
|
|
7
5
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -45,41 +43,44 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
45
43
|
});
|
|
46
44
|
};
|
|
47
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.
|
|
49
|
-
const environments = __importStar(require("../../../../environments.js"));
|
|
50
|
-
const core = __importStar(require("../../../../core/index.js"));
|
|
51
|
-
const BrowserUse = __importStar(require("../../../index.js"));
|
|
46
|
+
exports.Billing = void 0;
|
|
52
47
|
const headers_js_1 = require("../../../../core/headers.js");
|
|
48
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
49
|
+
const environments = __importStar(require("../../../../environments.js"));
|
|
53
50
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
54
|
-
|
|
51
|
+
const BrowserUse = __importStar(require("../../../index.js"));
|
|
52
|
+
class Billing {
|
|
55
53
|
constructor(_options) {
|
|
56
54
|
this._options = _options;
|
|
57
55
|
}
|
|
58
56
|
/**
|
|
59
57
|
* Get authenticated account information including credit balances and account details.
|
|
60
58
|
*
|
|
61
|
-
* @param {
|
|
59
|
+
* @param {Billing.RequestOptions} requestOptions - Request-specific configuration.
|
|
62
60
|
*
|
|
63
61
|
* @throws {@link BrowserUse.NotFoundError}
|
|
62
|
+
* @throws {@link BrowserUse.UnprocessableEntityError}
|
|
64
63
|
*
|
|
65
64
|
* @example
|
|
66
|
-
* await client.
|
|
65
|
+
* await client.billing.getAccountBilling()
|
|
67
66
|
*/
|
|
68
|
-
|
|
69
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
67
|
+
getAccountBilling(requestOptions) {
|
|
68
|
+
return core.HttpResponsePromise.fromPromise(this.__getAccountBilling(requestOptions));
|
|
70
69
|
}
|
|
71
|
-
|
|
70
|
+
__getAccountBilling(requestOptions) {
|
|
72
71
|
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
-
var _a, _b, _c;
|
|
74
|
-
|
|
72
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
73
|
+
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
75
74
|
const _response = yield core.fetcher({
|
|
76
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrowserUseEnvironment.Production, "
|
|
75
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrowserUseEnvironment.Production, "billing/account"),
|
|
77
76
|
method: "GET",
|
|
78
77
|
headers: _headers,
|
|
79
78
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
80
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds)
|
|
81
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
79
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
80
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
82
81
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
82
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
83
|
+
logging: this._options.logging,
|
|
83
84
|
});
|
|
84
85
|
if (_response.ok) {
|
|
85
86
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -88,6 +89,8 @@ class Accounts {
|
|
|
88
89
|
switch (_response.error.statusCode) {
|
|
89
90
|
case 404:
|
|
90
91
|
throw new BrowserUse.NotFoundError(_response.error.body, _response.rawResponse);
|
|
92
|
+
case 422:
|
|
93
|
+
throw new BrowserUse.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
91
94
|
default:
|
|
92
95
|
throw new errors.BrowserUseError({
|
|
93
96
|
statusCode: _response.error.statusCode,
|
|
@@ -104,7 +107,7 @@ class Accounts {
|
|
|
104
107
|
rawResponse: _response.rawResponse,
|
|
105
108
|
});
|
|
106
109
|
case "timeout":
|
|
107
|
-
throw new errors.BrowserUseTimeoutError("Timeout exceeded when calling GET /
|
|
110
|
+
throw new errors.BrowserUseTimeoutError("Timeout exceeded when calling GET /billing/account.");
|
|
108
111
|
case "unknown":
|
|
109
112
|
throw new errors.BrowserUseError({
|
|
110
113
|
message: _response.error.errorMessage,
|
|
@@ -120,4 +123,4 @@ class Accounts {
|
|
|
120
123
|
});
|
|
121
124
|
}
|
|
122
125
|
}
|
|
123
|
-
exports.
|
|
126
|
+
exports.Billing = Billing;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
|
+
import * as core from "../../../../core/index.js";
|
|
3
|
+
import * as BrowserUse from "../../../index.js";
|
|
4
|
+
export declare namespace Browsers {
|
|
5
|
+
interface Options extends BaseClientOptions {
|
|
6
|
+
}
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class Browsers {
|
|
11
|
+
protected readonly _options: Browsers.Options;
|
|
12
|
+
constructor(_options: Browsers.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Get paginated list of browser sessions with optional status filtering.
|
|
15
|
+
*
|
|
16
|
+
* @param {BrowserUse.ListBrowserSessionsBrowsersGetRequest} request
|
|
17
|
+
* @param {Browsers.RequestOptions} requestOptions - Request-specific configuration.
|
|
18
|
+
*
|
|
19
|
+
* @throws {@link BrowserUse.UnprocessableEntityError}
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* await client.browsers.listBrowserSessions()
|
|
23
|
+
*/
|
|
24
|
+
listBrowserSessions(request?: BrowserUse.ListBrowserSessionsBrowsersGetRequest, requestOptions?: Browsers.RequestOptions): core.HttpResponsePromise<BrowserUse.BrowserSessionListResponse>;
|
|
25
|
+
private __listBrowserSessions;
|
|
26
|
+
/**
|
|
27
|
+
* Create a new browser session.
|
|
28
|
+
*
|
|
29
|
+
* **Pricing:** Browser sessions are charged at $0.05 per hour.
|
|
30
|
+
* The full hourly rate is charged upfront when the session starts.
|
|
31
|
+
* When you stop the session, any unused time is automatically refunded proportionally.
|
|
32
|
+
*
|
|
33
|
+
* Billing is rounded to the nearest minute (minimum 1 minute).
|
|
34
|
+
* For example, if you stop a session after 30 minutes, you'll be refunded $0.025.
|
|
35
|
+
*
|
|
36
|
+
* **Session Limits:**
|
|
37
|
+
* - Free users (without active subscription): Maximum 15 minutes per session
|
|
38
|
+
* - Paid subscribers: Up to 4 hours per session
|
|
39
|
+
*
|
|
40
|
+
* @param {BrowserUse.CreateBrowserSessionRequest} request
|
|
41
|
+
* @param {Browsers.RequestOptions} requestOptions - Request-specific configuration.
|
|
42
|
+
*
|
|
43
|
+
* @throws {@link BrowserUse.ForbiddenError}
|
|
44
|
+
* @throws {@link BrowserUse.NotFoundError}
|
|
45
|
+
* @throws {@link BrowserUse.UnprocessableEntityError}
|
|
46
|
+
* @throws {@link BrowserUse.TooManyRequestsError}
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* await client.browsers.createBrowserSession()
|
|
50
|
+
*/
|
|
51
|
+
createBrowserSession(request?: BrowserUse.CreateBrowserSessionRequest, requestOptions?: Browsers.RequestOptions): core.HttpResponsePromise<BrowserUse.BrowserSessionItemView>;
|
|
52
|
+
private __createBrowserSession;
|
|
53
|
+
/**
|
|
54
|
+
* Get detailed browser session information including status and URLs.
|
|
55
|
+
*
|
|
56
|
+
* @param {BrowserUse.GetBrowserSessionBrowsersSessionIdGetRequest} request
|
|
57
|
+
* @param {Browsers.RequestOptions} requestOptions - Request-specific configuration.
|
|
58
|
+
*
|
|
59
|
+
* @throws {@link BrowserUse.NotFoundError}
|
|
60
|
+
* @throws {@link BrowserUse.UnprocessableEntityError}
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* await client.browsers.getBrowserSession({
|
|
64
|
+
* session_id: "session_id"
|
|
65
|
+
* })
|
|
66
|
+
*/
|
|
67
|
+
getBrowserSession(request: BrowserUse.GetBrowserSessionBrowsersSessionIdGetRequest, requestOptions?: Browsers.RequestOptions): core.HttpResponsePromise<BrowserUse.BrowserSessionView>;
|
|
68
|
+
private __getBrowserSession;
|
|
69
|
+
/**
|
|
70
|
+
* Stop a browser session.
|
|
71
|
+
*
|
|
72
|
+
* **Refund:** When you stop a session, unused time is automatically refunded.
|
|
73
|
+
* If the session ran for less than 1 hour, you'll receive a proportional refund.
|
|
74
|
+
* Billing is ceil to the nearest minute (minimum 1 minute).
|
|
75
|
+
*
|
|
76
|
+
* @param {BrowserUse.UpdateBrowserSessionRequest} request
|
|
77
|
+
* @param {Browsers.RequestOptions} requestOptions - Request-specific configuration.
|
|
78
|
+
*
|
|
79
|
+
* @throws {@link BrowserUse.NotFoundError}
|
|
80
|
+
* @throws {@link BrowserUse.UnprocessableEntityError}
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* await client.browsers.updateBrowserSession({
|
|
84
|
+
* session_id: "session_id"
|
|
85
|
+
* })
|
|
86
|
+
*/
|
|
87
|
+
updateBrowserSession(request: BrowserUse.UpdateBrowserSessionRequest, requestOptions?: Browsers.RequestOptions): core.HttpResponsePromise<BrowserUse.BrowserSessionView>;
|
|
88
|
+
private __updateBrowserSession;
|
|
89
|
+
protected _getCustomAuthorizationHeaders(): Promise<Record<string, string | undefined>>;
|
|
90
|
+
}
|