diff --git a/.github/workflows/publish_packages.yml b/.github/workflows/publish_packages.yml index ce1b318..5c7c078 100644 --- a/.github/workflows/publish_packages.yml +++ b/.github/workflows/publish_packages.yml @@ -78,18 +78,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Generate SDK reference - id: sdk-ref - run: pnpm run --recursive generate-ref - - - name: Show docs file structure - run: | - if [ -d "./sdk-reference" ]; then - tree ./sdk-reference - else - echo "sdk-reference directory does not exist" - fi - - name: Release new versions uses: changesets/action@v1 with: @@ -107,7 +95,6 @@ jobs: run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - git add ./sdk-reference git commit -am "[skip ci] Release new versions" || exit 0 git push env: diff --git a/.gitignore b/.gitignore index b8b821c..f8e7061 100644 --- a/.gitignore +++ b/.gitignore @@ -293,7 +293,4 @@ cython_debug/ # VS Code -# SDK reference artifacts -sdk_ref/ - -.ruff_cache/ \ No newline at end of file +.ruff_cache/ diff --git a/packages/js-sdk/package.json b/packages/js-sdk/package.json index 0c2dfb7..d8d9a23 100644 --- a/packages/js-sdk/package.json +++ b/packages/js-sdk/package.json @@ -49,7 +49,6 @@ "dev": "tsup --watch", "test": "vitest run --disable-console-intercept", "example": "npx tsx example.mts", - "generate-ref": "./scripts/generate_sdk_ref.sh", "lint": "eslint src/ tests/", "format": "prettier --write src/ tests/ example.mts" }, @@ -58,8 +57,6 @@ "dotenv": "^16.4.5", "tsup": "^8.3.5", "tsx": "^4.19.2", - "typedoc": "0.28.17", - "typedoc-plugin-markdown": "4.10.0", "typescript": "^5.6.3", "vitest": "^3.0.5" }, diff --git a/packages/js-sdk/scripts/CustomMarkdownTheme.js b/packages/js-sdk/scripts/CustomMarkdownTheme.js deleted file mode 100644 index ba0f43d..0000000 --- a/packages/js-sdk/scripts/CustomMarkdownTheme.js +++ /dev/null @@ -1,64 +0,0 @@ -const { MarkdownPageEvent } = require("typedoc-plugin-markdown"); - -function load(app) { - // Listen to the render event - app.renderer.on(MarkdownPageEvent.END, (page) => { - // Remove Markdown links from the document contents - page.contents = removeMarkdownLinks( - removeFirstNLines( - convertH5toH3(removeLinesWithConditions(page.contents)), - 6 - ) - ); - }); -} - -// this is a hacky way to make methods in the js-sdk sdk reference look more prominent -function convertH5toH3(text) { - return text.replace(/^##### (.*)$/gm, "### $1"); -} - -// Function to remove Markdown-style links -function removeMarkdownLinks(text) { - // Regular expression to match Markdown links [text](url) - return text.replace(/\[([^\]]+)\]\(([^)]+)\)/g, "$1"); // Replace with just the link text -} - -function removeFirstNLines(text, n, condition) { - // Split the text into lines, then join back excluding the first four lines - return text.split("\n").slice(n).join("\n"); -} - -// Function to remove lines based on conditions -function removeLinesWithConditions(text) { - const lines = text.split("\n"); - const filteredLines = []; - - for (let i = 0; i < lines.length; i++) { - // Check if the current line starts with "#### Extends" or "###### Overrides" - if ( - lines[i].startsWith("#### Extends") || - lines[i].startsWith("###### Overrides") || - lines[i].startsWith("###### Inherited from") - ) { - // If it does, skip this line and the next three lines - i += 3; // Skip this line and the next three - continue; - } - - if (lines[i].startsWith("##### new")) { - // avoid promoting constructors - i += 1; - continue; - } - - // If not removed, add the line to filteredLines - filteredLines.push(convertH5toH3(lines[i])); - } - - // Join the filtered lines back into a single string - return filteredLines.join("\n"); -} - -// Export the load function -module.exports = { load }; diff --git a/packages/js-sdk/scripts/generate_sdk_ref.sh b/packages/js-sdk/scripts/generate_sdk_ref.sh deleted file mode 100755 index 3862cb0..0000000 --- a/packages/js-sdk/scripts/generate_sdk_ref.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -# This script generates the Desktop JS SDK reference markdown files -# Run it in the `js-sdk/` directory - -# generate raw SDK reference markdown files -npx typedoc - -PKG_VERSION="v$(node -p "require('./package.json').version")" -ROUTES_DIR="../../sdk-reference/desktop-js-sdk/${PKG_VERSION}" -mkdir -p "${ROUTES_DIR}" - -rm -rf sdk_ref/README.md - -# Flatten the sdk_ref directory by moving all nested files to the root level and remove empty subdirectories -find sdk_ref -mindepth 2 -type f | while read -r file; do - mv "$file" sdk_ref/ -done -find sdk_ref -type d -empty -delete - -rm sdk_ref/index.md - -# Transfrom top level MD files into folders of the same name with page.mdx inside -find sdk_ref -maxdepth 1 -type f -name "*.md" | while read -r file; do - # Extract the filename without extension - filename=$(basename "$file" .md) - # Create the directory of the same name in sdk_ref - mkdir -p "sdk_ref/${filename}" - # Move the file inside the newly created directory - mv "$file" "sdk_ref/${filename}/page.mdx" -done - -cp -r sdk_ref/* "${ROUTES_DIR}" - -rm -rf sdk_ref diff --git a/packages/js-sdk/typedoc.json b/packages/js-sdk/typedoc.json deleted file mode 100644 index 1ec4a8c..0000000 --- a/packages/js-sdk/typedoc.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "out": "sdk_ref", - "plugin": ["typedoc-plugin-markdown", "./scripts/CustomMarkdownTheme.js"], - "exclude": ["**/*.spec.ts"], - "entryPoints": ["src/index.ts", "src/sandbox.ts"], - "excludeExternals": true, - "excludePrivate": true, - "excludeProtected": true, - "navigation": { - "includeGroups": false, - "includeCategories": false - }, - "outputFileStrategy": "modules", - "readme": "none", - "disableSources": true, - // typedoc-plugin-markdown options - "classPropertiesFormat": "table", - "typeDeclarationFormat": "table", - "enumMembersFormat": "table", - "parametersFormat": "table", - "expandParameters": true, - "useCodeBlocks": true, - "hidePageTitle": true, - "hideBreadcrumbs": true -} diff --git a/packages/python-sdk/package.json b/packages/python-sdk/package.json index b19723b..1b01aa9 100644 --- a/packages/python-sdk/package.json +++ b/packages/python-sdk/package.json @@ -9,8 +9,7 @@ "postVersion": "poetry version $(pnpm pkg get version --workspaces=false | tr -d \\\")", "postPublish": "poetry build && poetry config pypi-token.pypi ${PYPI_TOKEN} && poetry publish --skip-existing", "pretest": "poetry install", - "generate-ref": "poetry install && ./scripts/generate_sdk_ref.sh", "lint": "poetry run ruff check .", "format": "poetry run ruff format ." } -} \ No newline at end of file +} diff --git a/packages/python-sdk/poetry.lock b/packages/python-sdk/poetry.lock index 05a2dd4..8c0a8e2 100644 --- a/packages/python-sdk/poetry.lock +++ b/packages/python-sdk/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.2.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.3.2 and should not be changed by hand. [[package]] name = "anyio" @@ -43,53 +43,6 @@ docs = ["cogapp", "furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphi tests = ["cloudpickle ; platform_python_implementation == \"CPython\"", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.9\"", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.9\" and python_version < \"3.13\"", "pytest-xdist[psutil]"] tests-mypy = ["mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.9\"", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.9\" and python_version < \"3.13\""] -[[package]] -name = "black" -version = "23.12.1" -description = "The uncompromising code formatter." -optional = false -python-versions = ">=3.8" -groups = ["dev"] -files = [ - {file = "black-23.12.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e0aaf6041986767a5e0ce663c7a2f0e9eaf21e6ff87a5f95cbf3675bfd4c41d2"}, - {file = "black-23.12.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c88b3711d12905b74206227109272673edce0cb29f27e1385f33b0163c414bba"}, - {file = "black-23.12.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a920b569dc6b3472513ba6ddea21f440d4b4c699494d2e972a1753cdc25df7b0"}, - {file = "black-23.12.1-cp310-cp310-win_amd64.whl", hash = "sha256:3fa4be75ef2a6b96ea8d92b1587dd8cb3a35c7e3d51f0738ced0781c3aa3a5a3"}, - {file = "black-23.12.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:8d4df77958a622f9b5a4c96edb4b8c0034f8434032ab11077ec6c56ae9f384ba"}, - {file = "black-23.12.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:602cfb1196dc692424c70b6507593a2b29aac0547c1be9a1d1365f0d964c353b"}, - {file = "black-23.12.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c4352800f14be5b4864016882cdba10755bd50805c95f728011bcb47a4afd59"}, - {file = "black-23.12.1-cp311-cp311-win_amd64.whl", hash = "sha256:0808494f2b2df923ffc5723ed3c7b096bd76341f6213989759287611e9837d50"}, - {file = "black-23.12.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:25e57fd232a6d6ff3f4478a6fd0580838e47c93c83eaf1ccc92d4faf27112c4e"}, - {file = "black-23.12.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2d9e13db441c509a3763a7a3d9a49ccc1b4e974a47be4e08ade2a228876500ec"}, - {file = "black-23.12.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d1bd9c210f8b109b1762ec9fd36592fdd528485aadb3f5849b2740ef17e674e"}, - {file = "black-23.12.1-cp312-cp312-win_amd64.whl", hash = "sha256:ae76c22bde5cbb6bfd211ec343ded2163bba7883c7bc77f6b756a1049436fbb9"}, - {file = "black-23.12.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1fa88a0f74e50e4487477bc0bb900c6781dbddfdfa32691e780bf854c3b4a47f"}, - {file = "black-23.12.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a4d6a9668e45ad99d2f8ec70d5c8c04ef4f32f648ef39048d010b0689832ec6d"}, - {file = "black-23.12.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b18fb2ae6c4bb63eebe5be6bd869ba2f14fd0259bda7d18a46b764d8fb86298a"}, - {file = "black-23.12.1-cp38-cp38-win_amd64.whl", hash = "sha256:c04b6d9d20e9c13f43eee8ea87d44156b8505ca8a3c878773f68b4e4812a421e"}, - {file = "black-23.12.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3e1b38b3135fd4c025c28c55ddfc236b05af657828a8a6abe5deec419a0b7055"}, - {file = "black-23.12.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4f0031eaa7b921db76decd73636ef3a12c942ed367d8c3841a0739412b260a54"}, - {file = "black-23.12.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:97e56155c6b737854e60a9ab1c598ff2533d57e7506d97af5481141671abf3ea"}, - {file = "black-23.12.1-cp39-cp39-win_amd64.whl", hash = "sha256:dd15245c8b68fe2b6bd0f32c1556509d11bb33aec9b5d0866dd8e2ed3dba09c2"}, - {file = "black-23.12.1-py3-none-any.whl", hash = "sha256:78baad24af0f033958cad29731e27363183e140962595def56423e626f4bee3e"}, - {file = "black-23.12.1.tar.gz", hash = "sha256:4ce3ef14ebe8d9509188014d96af1c456a910d5b5cbf434a09fef7e024b3d0d5"}, -] - -[package.dependencies] -click = ">=8.0.0" -mypy-extensions = ">=0.4.3" -packaging = ">=22.0" -pathspec = ">=0.9.0" -platformdirs = ">=2" -tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} -typing-extensions = {version = ">=4.0.1", markers = "python_version < \"3.11\""} - -[package.extras] -colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.7.4) ; sys_platform != \"win32\" or implementation_name != \"pypy\"", "aiohttp (>=3.7.4,!=3.9.0) ; sys_platform == \"win32\" and implementation_name == \"pypy\""] -jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] -uvloop = ["uvloop (>=0.15.2)"] - [[package]] name = "bracex" version = "2.6" @@ -108,7 +61,7 @@ version = "2024.8.30" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" -groups = ["main", "dev"] +groups = ["main"] files = [ {file = "certifi-2024.8.30-py3-none-any.whl", hash = "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8"}, {file = "certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9"}, @@ -120,7 +73,7 @@ version = "3.4.0" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." optional = false python-versions = ">=3.7.0" -groups = ["main", "dev"] +groups = ["main"] files = [ {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4f9fc98dad6c2eaa32fc3af1417d95b5e3d08aff968df0cd320066def971f9a6"}, {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0de7b687289d3c1b3e8660d0741874abe7888100efe14bd0f9fd7141bcbda92b"}, @@ -229,21 +182,6 @@ files = [ {file = "charset_normalizer-3.4.0.tar.gz", hash = "sha256:223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e"}, ] -[[package]] -name = "click" -version = "8.1.7" -description = "Composable command line interface toolkit" -optional = false -python-versions = ">=3.7" -groups = ["dev"] -files = [ - {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, - {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, -] - -[package.dependencies] -colorama = {version = "*", markers = "platform_system == \"Windows\""} - [[package]] name = "colorama" version = "0.4.6" @@ -251,79 +189,12 @@ description = "Cross-platform colored terminal text." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" groups = ["dev"] -markers = "sys_platform == \"win32\" or platform_system == \"Windows\"" +markers = "sys_platform == \"win32\"" files = [ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] -[[package]] -name = "databind" -version = "4.5.2" -description = "Databind is a library inspired by jackson-databind to de-/serialize Python dataclasses. The `databind` package will install the full suite of databind packages. Compatible with Python 3.8 and newer." -optional = false -python-versions = "<4.0.0,>=3.8.0" -groups = ["dev"] -files = [ - {file = "databind-4.5.2-py3-none-any.whl", hash = "sha256:b9c3a03c0414aa4567f095d7218ac904bd2b267b58e3763dac28e83d64b69770"}, - {file = "databind-4.5.2.tar.gz", hash = "sha256:0a8aa0ff130a0306581c559388f5ef65e0fae7ef4b86412eacb1f4a0420006c4"}, -] - -[package.dependencies] -Deprecated = ">=1.2.12,<2.0.0" -nr-date = ">=2.0.0,<3.0.0" -nr-stream = ">=1.0.0,<2.0.0" -typeapi = ">=2.0.1,<3" -typing-extensions = ">=3.10.0,<5" - -[[package]] -name = "databind-core" -version = "4.5.2" -description = "Databind is a library inspired by jackson-databind to de-/serialize Python dataclasses. Compatible with Python 3.8 and newer. Deprecated, use `databind` package." -optional = false -python-versions = "<4.0.0,>=3.8.0" -groups = ["dev"] -files = [ - {file = "databind.core-4.5.2-py3-none-any.whl", hash = "sha256:a1dd1c6bd8ca9907d1292d8df9ec763ce91543e27f7eda4268e4a1a84fcd1c42"}, - {file = "databind.core-4.5.2.tar.gz", hash = "sha256:b8ac8127bc5d6b239a2a81aeddb268b0c4cadd53fbce7e8b2c7a9ef6413bccb3"}, -] - -[package.dependencies] -databind = ">=4.5.2,<5.0.0" - -[[package]] -name = "databind-json" -version = "4.5.2" -description = "De-/serialize Python dataclasses to or from JSON payloads. Compatible with Python 3.8 and newer. Deprecated, use `databind` module instead." -optional = false -python-versions = "<4.0.0,>=3.8.0" -groups = ["dev"] -files = [ - {file = "databind.json-4.5.2-py3-none-any.whl", hash = "sha256:a803bf440634685984361cb2a5a975887e487c854ed48d81ff7aaf3a1ed1e94c"}, - {file = "databind.json-4.5.2.tar.gz", hash = "sha256:6cc9b5c6fddaebd49b2433932948eb3be8a41633b90aa37998d7922504b8f165"}, -] - -[package.dependencies] -databind = ">=4.5.2,<5.0.0" - -[[package]] -name = "deprecated" -version = "1.2.15" -description = "Python @deprecated decorator to deprecate old python classes, functions or methods." -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" -groups = ["dev"] -files = [ - {file = "Deprecated-1.2.15-py2.py3-none-any.whl", hash = "sha256:353bc4a8ac4bfc96800ddab349d89c25dec1079f65fd53acdcc1e0b975b21320"}, - {file = "deprecated-1.2.15.tar.gz", hash = "sha256:683e561a90de76239796e6b6feac66b99030d2dd3fcf61ef996330f14bbb9b0d"}, -] - -[package.dependencies] -wrapt = ">=1.10,<2" - -[package.extras] -dev = ["PyTest", "PyTest-Cov", "bump2version (<1)", "jinja2 (>=3.0.3,<3.1.0)", "setuptools ; python_version >= \"3.12\"", "sphinx (<2)", "tox"] - [[package]] name = "dockerfile-parse" version = "2.0.1" @@ -336,54 +207,6 @@ files = [ {file = "dockerfile_parse-2.0.1-py2.py3-none-any.whl", hash = "sha256:bdffd126d2eb26acf1066acb54cb2e336682e1d72b974a40894fac76a4df17f6"}, ] -[[package]] -name = "docspec" -version = "2.2.1" -description = "Docspec is a JSON object specification for representing API documentation of programming languages." -optional = false -python-versions = ">=3.7,<4.0" -groups = ["dev"] -files = [ - {file = "docspec-2.2.1-py3-none-any.whl", hash = "sha256:7538f750095a9688c6980ff9a4e029a823a500f64bd00b6b4bdb27951feb31cb"}, - {file = "docspec-2.2.1.tar.gz", hash = "sha256:4854e77edc0e2de40e785e57e95880f7095a05fe978f8b54cef7a269586e15ff"}, -] - -[package.dependencies] -"databind.core" = ">=4.2.6,<5.0.0" -"databind.json" = ">=4.2.6,<5.0.0" -Deprecated = ">=1.2.12,<2.0.0" - -[[package]] -name = "docspec-python" -version = "2.2.1" -description = "A parser based on lib2to3 producing docspec data from Python source code." -optional = false -python-versions = ">=3.7,<4.0" -groups = ["dev"] -files = [ - {file = "docspec_python-2.2.1-py3-none-any.whl", hash = "sha256:76ac41d35a8face35b2d766c2e8a416fb8832359785d396f0d53bcb00f178e54"}, - {file = "docspec_python-2.2.1.tar.gz", hash = "sha256:c41b850b4d6f4de30999ea6f82c9cdb9183d9bcba45559ee9173d3dab7281559"}, -] - -[package.dependencies] -black = ">=23.1.0,<24.0.0" -docspec = ">=2.2.1,<3.0.0" -"nr.util" = ">=0.7.0" - -[[package]] -name = "docstring-parser" -version = "0.11" -description = "\"Parse Python docstrings in reST, Google and Numpydoc format\"" -optional = false -python-versions = ">=3.6" -groups = ["dev"] -files = [ - {file = "docstring_parser-0.11.tar.gz", hash = "sha256:93b3f8f481c7d24e37c5d9f30293c89e2933fa209421c8abd731dd3ef0715ecb"}, -] - -[package.extras] -test = ["black", "pytest"] - [[package]] name = "e2b" version = "2.15.2" @@ -505,7 +328,7 @@ version = "3.10" description = "Internationalized Domain Names in Applications (IDNA)" optional = false python-versions = ">=3.6" -groups = ["main", "dev"] +groups = ["main"] files = [ {file = "idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3"}, {file = "idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"}, @@ -526,24 +349,6 @@ files = [ {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, ] -[[package]] -name = "jinja2" -version = "3.1.6" -description = "A very fast and expressive template engine." -optional = false -python-versions = ">=3.7" -groups = ["dev"] -files = [ - {file = "jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67"}, - {file = "jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d"}, -] - -[package.dependencies] -MarkupSafe = ">=2.0" - -[package.extras] -i18n = ["Babel (>=2.7)"] - [[package]] name = "markdown-it-py" version = "3.0.0" @@ -569,77 +374,6 @@ profiling = ["gprof2dot"] rtd = ["jupyter_sphinx", "mdit-py-plugins", "myst-parser", "pyyaml", "sphinx", "sphinx-copybutton", "sphinx-design", "sphinx_book_theme"] testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] -[[package]] -name = "markupsafe" -version = "3.0.2" -description = "Safely add untrusted strings to HTML/XML markup." -optional = false -python-versions = ">=3.9" -groups = ["dev"] -files = [ - {file = "MarkupSafe-3.0.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7e94c425039cde14257288fd61dcfb01963e658efbc0ff54f5306b06054700f8"}, - {file = "MarkupSafe-3.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9e2d922824181480953426608b81967de705c3cef4d1af983af849d7bd619158"}, - {file = "MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:38a9ef736c01fccdd6600705b09dc574584b89bea478200c5fbf112a6b0d5579"}, - {file = "MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bbcb445fa71794da8f178f0f6d66789a28d7319071af7a496d4d507ed566270d"}, - {file = "MarkupSafe-3.0.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:57cb5a3cf367aeb1d316576250f65edec5bb3be939e9247ae594b4bcbc317dfb"}, - {file = "MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:3809ede931876f5b2ec92eef964286840ed3540dadf803dd570c3b7e13141a3b"}, - {file = "MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e07c3764494e3776c602c1e78e298937c3315ccc9043ead7e685b7f2b8d47b3c"}, - {file = "MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b424c77b206d63d500bcb69fa55ed8d0e6a3774056bdc4839fc9298a7edca171"}, - {file = "MarkupSafe-3.0.2-cp310-cp310-win32.whl", hash = "sha256:fcabf5ff6eea076f859677f5f0b6b5c1a51e70a376b0579e0eadef8db48c6b50"}, - {file = "MarkupSafe-3.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:6af100e168aa82a50e186c82875a5893c5597a0c1ccdb0d8b40240b1f28b969a"}, - {file = "MarkupSafe-3.0.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9025b4018f3a1314059769c7bf15441064b2207cb3f065e6ea1e7359cb46db9d"}, - {file = "MarkupSafe-3.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:93335ca3812df2f366e80509ae119189886b0f3c2b81325d39efdb84a1e2ae93"}, - {file = "MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2cb8438c3cbb25e220c2ab33bb226559e7afb3baec11c4f218ffa7308603c832"}, - {file = "MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a123e330ef0853c6e822384873bef7507557d8e4a082961e1defa947aa59ba84"}, - {file = "MarkupSafe-3.0.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e084f686b92e5b83186b07e8a17fc09e38fff551f3602b249881fec658d3eca"}, - {file = "MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d8213e09c917a951de9d09ecee036d5c7d36cb6cb7dbaece4c71a60d79fb9798"}, - {file = "MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:5b02fb34468b6aaa40dfc198d813a641e3a63b98c2b05a16b9f80b7ec314185e"}, - {file = "MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:0bff5e0ae4ef2e1ae4fdf2dfd5b76c75e5c2fa4132d05fc1b0dabcd20c7e28c4"}, - {file = "MarkupSafe-3.0.2-cp311-cp311-win32.whl", hash = "sha256:6c89876f41da747c8d3677a2b540fb32ef5715f97b66eeb0c6b66f5e3ef6f59d"}, - {file = "MarkupSafe-3.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:70a87b411535ccad5ef2f1df5136506a10775d267e197e4cf531ced10537bd6b"}, - {file = "MarkupSafe-3.0.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:9778bd8ab0a994ebf6f84c2b949e65736d5575320a17ae8984a77fab08db94cf"}, - {file = "MarkupSafe-3.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:846ade7b71e3536c4e56b386c2a47adf5741d2d8b94ec9dc3e92e5e1ee1e2225"}, - {file = "MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1c99d261bd2d5f6b59325c92c73df481e05e57f19837bdca8413b9eac4bd8028"}, - {file = "MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e17c96c14e19278594aa4841ec148115f9c7615a47382ecb6b82bd8fea3ab0c8"}, - {file = "MarkupSafe-3.0.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:88416bd1e65dcea10bc7569faacb2c20ce071dd1f87539ca2ab364bf6231393c"}, - {file = "MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:2181e67807fc2fa785d0592dc2d6206c019b9502410671cc905d132a92866557"}, - {file = "MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:52305740fe773d09cffb16f8ed0427942901f00adedac82ec8b67752f58a1b22"}, - {file = "MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ad10d3ded218f1039f11a75f8091880239651b52e9bb592ca27de44eed242a48"}, - {file = "MarkupSafe-3.0.2-cp312-cp312-win32.whl", hash = "sha256:0f4ca02bea9a23221c0182836703cbf8930c5e9454bacce27e767509fa286a30"}, - {file = "MarkupSafe-3.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:8e06879fc22a25ca47312fbe7c8264eb0b662f6db27cb2d3bbbc74b1df4b9b87"}, - {file = "MarkupSafe-3.0.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ba9527cdd4c926ed0760bc301f6728ef34d841f405abf9d4f959c478421e4efd"}, - {file = "MarkupSafe-3.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f8b3d067f2e40fe93e1ccdd6b2e1d16c43140e76f02fb1319a05cf2b79d99430"}, - {file = "MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:569511d3b58c8791ab4c2e1285575265991e6d8f8700c7be0e88f86cb0672094"}, - {file = "MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15ab75ef81add55874e7ab7055e9c397312385bd9ced94920f2802310c930396"}, - {file = "MarkupSafe-3.0.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f3818cb119498c0678015754eba762e0d61e5b52d34c8b13d770f0719f7b1d79"}, - {file = "MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:cdb82a876c47801bb54a690c5ae105a46b392ac6099881cdfb9f6e95e4014c6a"}, - {file = "MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:cabc348d87e913db6ab4aa100f01b08f481097838bdddf7c7a84b7575b7309ca"}, - {file = "MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:444dcda765c8a838eaae23112db52f1efaf750daddb2d9ca300bcae1039adc5c"}, - {file = "MarkupSafe-3.0.2-cp313-cp313-win32.whl", hash = "sha256:bcf3e58998965654fdaff38e58584d8937aa3096ab5354d493c77d1fdd66d7a1"}, - {file = "MarkupSafe-3.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:e6a2a455bd412959b57a172ce6328d2dd1f01cb2135efda2e4576e8a23fa3b0f"}, - {file = "MarkupSafe-3.0.2-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:b5a6b3ada725cea8a5e634536b1b01c30bcdcd7f9c6fff4151548d5bf6b3a36c"}, - {file = "MarkupSafe-3.0.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:a904af0a6162c73e3edcb969eeeb53a63ceeb5d8cf642fade7d39e7963a22ddb"}, - {file = "MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4aa4e5faecf353ed117801a068ebab7b7e09ffb6e1d5e412dc852e0da018126c"}, - {file = "MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c0ef13eaeee5b615fb07c9a7dadb38eac06a0608b41570d8ade51c56539e509d"}, - {file = "MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d16a81a06776313e817c951135cf7340a3e91e8c1ff2fac444cfd75fffa04afe"}, - {file = "MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:6381026f158fdb7c72a168278597a5e3a5222e83ea18f543112b2662a9b699c5"}, - {file = "MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:3d79d162e7be8f996986c064d1c7c817f6df3a77fe3d6859f6f9e7be4b8c213a"}, - {file = "MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:131a3c7689c85f5ad20f9f6fb1b866f402c445b220c19fe4308c0b147ccd2ad9"}, - {file = "MarkupSafe-3.0.2-cp313-cp313t-win32.whl", hash = "sha256:ba8062ed2cf21c07a9e295d5b8a2a5ce678b913b45fdf68c32d95d6c1291e0b6"}, - {file = "MarkupSafe-3.0.2-cp313-cp313t-win_amd64.whl", hash = "sha256:e444a31f8db13eb18ada366ab3cf45fd4b31e4db1236a4448f68778c1d1a5a2f"}, - {file = "MarkupSafe-3.0.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:eaa0a10b7f72326f1372a713e73c3f739b524b3af41feb43e4921cb529f5929a"}, - {file = "MarkupSafe-3.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:48032821bbdf20f5799ff537c7ac3d1fba0ba032cfc06194faffa8cda8b560ff"}, - {file = "MarkupSafe-3.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1a9d3f5f0901fdec14d8d2f66ef7d035f2157240a433441719ac9a3fba440b13"}, - {file = "MarkupSafe-3.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:88b49a3b9ff31e19998750c38e030fc7bb937398b1f78cfa599aaef92d693144"}, - {file = "MarkupSafe-3.0.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cfad01eed2c2e0c01fd0ecd2ef42c492f7f93902e39a42fc9ee1692961443a29"}, - {file = "MarkupSafe-3.0.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:1225beacc926f536dc82e45f8a4d68502949dc67eea90eab715dea3a21c1b5f0"}, - {file = "MarkupSafe-3.0.2-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:3169b1eefae027567d1ce6ee7cae382c57fe26e82775f460f0b2778beaad66c0"}, - {file = "MarkupSafe-3.0.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:eb7972a85c54febfb25b5c4b4f3af4dcc731994c7da0d8a0b4a6eb0640e1d178"}, - {file = "MarkupSafe-3.0.2-cp39-cp39-win32.whl", hash = "sha256:8c4e8c3ce11e1f92f6536ff07154f9d49677ebaaafc32db9db4620bc11ed480f"}, - {file = "MarkupSafe-3.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:6e296a513ca3d94054c2c881cc913116e90fd030ad1c656b3869762b754f5f8a"}, - {file = "markupsafe-3.0.2.tar.gz", hash = "sha256:ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0"}, -] - [[package]] name = "mdurl" version = "0.1.2" @@ -652,58 +386,6 @@ files = [ {file = "mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"}, ] -[[package]] -name = "mypy-extensions" -version = "1.0.0" -description = "Type system extensions for programs checked with the mypy type checker." -optional = false -python-versions = ">=3.5" -groups = ["dev"] -files = [ - {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, - {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, -] - -[[package]] -name = "nr-date" -version = "2.1.0" -description = "" -optional = false -python-versions = ">=3.6,<4.0" -groups = ["dev"] -files = [ - {file = "nr_date-2.1.0-py3-none-any.whl", hash = "sha256:bd672a9dfbdcf7c4b9289fea6750c42490eaee08036a72059dcc78cb236ed568"}, - {file = "nr_date-2.1.0.tar.gz", hash = "sha256:0643aea13bcdc2a8bc56af9d5e6a89ef244c9744a1ef00cdc735902ba7f7d2e6"}, -] - -[[package]] -name = "nr-stream" -version = "1.1.5" -description = "" -optional = false -python-versions = ">=3.6,<4.0" -groups = ["dev"] -files = [ - {file = "nr_stream-1.1.5-py3-none-any.whl", hash = "sha256:47e12150b331ad2cb729cfd9d2abd281c9949809729ba461c6aa87dd9927b2d4"}, - {file = "nr_stream-1.1.5.tar.gz", hash = "sha256:eb0216c6bfc61a46d4568dba3b588502c610ec8ddef4ac98f3932a2bd7264f65"}, -] - -[[package]] -name = "nr-util" -version = "0.8.12" -description = "General purpose Python utility library." -optional = false -python-versions = ">=3.7,<4.0" -groups = ["dev"] -files = [ - {file = "nr.util-0.8.12-py3-none-any.whl", hash = "sha256:91da02ac9795eb8e015372275c1efe54bac9051231ee9b0e7e6f96b0b4e7d2bb"}, - {file = "nr.util-0.8.12.tar.gz", hash = "sha256:a4549c2033d99d2f0379b3f3d233fd2a8ade286bbf0b3ad0cc7cea16022214f4"}, -] - -[package.dependencies] -deprecated = ">=1.2.0,<2.0.0" -typing-extensions = ">=3.0.0" - [[package]] name = "packaging" version = "24.2" @@ -716,18 +398,6 @@ files = [ {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, ] -[[package]] -name = "pathspec" -version = "0.12.1" -description = "Utility library for gitignore style pattern matching of file paths." -optional = false -python-versions = ">=3.8" -groups = ["dev"] -files = [ - {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"}, - {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, -] - [[package]] name = "pillow" version = "12.1.1" @@ -837,23 +507,6 @@ test-arrow = ["arro3-compute", "arro3-core", "nanoarrow", "pyarrow"] tests = ["check-manifest", "coverage (>=7.4.2)", "defusedxml", "markdown2", "olefile", "packaging", "pyroma (>=5)", "pytest", "pytest-cov", "pytest-timeout", "pytest-xdist", "trove-classifiers (>=2024.10.12)"] xmp = ["defusedxml"] -[[package]] -name = "platformdirs" -version = "4.3.6" -description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." -optional = false -python-versions = ">=3.8" -groups = ["dev"] -files = [ - {file = "platformdirs-4.3.6-py3-none-any.whl", hash = "sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb"}, - {file = "platformdirs-4.3.6.tar.gz", hash = "sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907"}, -] - -[package.extras] -docs = ["furo (>=2024.8.6)", "proselint (>=0.14)", "sphinx (>=8.0.2)", "sphinx-autodoc-typehints (>=2.4)"] -test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=8.3.2)", "pytest-cov (>=5)", "pytest-mock (>=3.14)"] -type = ["mypy (>=1.11.2)"] - [[package]] name = "pluggy" version = "1.5.0" @@ -891,34 +544,6 @@ files = [ {file = "protobuf-5.29.6.tar.gz", hash = "sha256:da9ee6a5424b6b30fd5e45c5ea663aef540ca95f9ad99d1e887e819cdf9b8723"}, ] -[[package]] -name = "pydoc-markdown" -version = "4.8.2" -description = "Create Python API documentation in Markdown format." -optional = false -python-versions = ">=3.7,<4.0" -groups = ["dev"] -files = [ - {file = "pydoc_markdown-4.8.2-py3-none-any.whl", hash = "sha256:203f74119e6bb2f9deba43d452422de7c8ec31955b61e0620fa4dd8c2611715f"}, - {file = "pydoc_markdown-4.8.2.tar.gz", hash = "sha256:fb6c927e31386de17472d42f9bd3d3be2905977d026f6216881c65145aa67f0b"}, -] - -[package.dependencies] -click = ">=7.1,<9.0" -"databind.core" = ">=4.4.0,<5.0.0" -"databind.json" = ">=4.4.0,<5.0.0" -docspec = ">=2.2.1,<3.0.0" -docspec-python = ">=2.2.1,<3.0.0" -docstring-parser = ">=0.11,<0.12" -jinja2 = ">=3.0.0,<4.0.0" -"nr.util" = ">=0.7.5,<1.0.0" -PyYAML = ">=5.0,<7.0" -requests = ">=2.23.0,<3.0.0" -tomli = ">=2.0.0,<3.0.0" -tomli_w = ">=1.0.0,<2.0.0" -watchdog = "*" -yapf = ">=0.30.0" - [[package]] name = "pygments" version = "2.19.2" @@ -1024,76 +649,13 @@ files = [ [package.extras] cli = ["click (>=5.0)"] -[[package]] -name = "pyyaml" -version = "6.0.2" -description = "YAML parser and emitter for Python" -optional = false -python-versions = ">=3.8" -groups = ["dev"] -files = [ - {file = "PyYAML-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086"}, - {file = "PyYAML-6.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf"}, - {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8824b5a04a04a047e72eea5cec3bc266db09e35de6bdfe34c9436ac5ee27d237"}, - {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7c36280e6fb8385e520936c3cb3b8042851904eba0e58d277dca80a5cfed590b"}, - {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ec031d5d2feb36d1d1a24380e4db6d43695f3748343d99434e6f5f9156aaa2ed"}, - {file = "PyYAML-6.0.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:936d68689298c36b53b29f23c6dbb74de12b4ac12ca6cfe0e047bedceea56180"}, - {file = "PyYAML-6.0.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:23502f431948090f597378482b4812b0caae32c22213aecf3b55325e049a6c68"}, - {file = "PyYAML-6.0.2-cp310-cp310-win32.whl", hash = "sha256:2e99c6826ffa974fe6e27cdb5ed0021786b03fc98e5ee3c5bfe1fd5015f42b99"}, - {file = "PyYAML-6.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:a4d3091415f010369ae4ed1fc6b79def9416358877534caf6a0fdd2146c87a3e"}, - {file = "PyYAML-6.0.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cc1c1159b3d456576af7a3e4d1ba7e6924cb39de8f67111c735f6fc832082774"}, - {file = "PyYAML-6.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1e2120ef853f59c7419231f3bf4e7021f1b936f6ebd222406c3b60212205d2ee"}, - {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d225db5a45f21e78dd9358e58a98702a0302f2659a3c6cd320564b75b86f47c"}, - {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5ac9328ec4831237bec75defaf839f7d4564be1e6b25ac710bd1a96321cc8317"}, - {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ad2a3decf9aaba3d29c8f537ac4b243e36bef957511b4766cb0057d32b0be85"}, - {file = "PyYAML-6.0.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ff3824dc5261f50c9b0dfb3be22b4567a6f938ccce4587b38952d85fd9e9afe4"}, - {file = "PyYAML-6.0.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:797b4f722ffa07cc8d62053e4cff1486fa6dc094105d13fea7b1de7d8bf71c9e"}, - {file = "PyYAML-6.0.2-cp311-cp311-win32.whl", hash = "sha256:11d8f3dd2b9c1207dcaf2ee0bbbfd5991f571186ec9cc78427ba5bd32afae4b5"}, - {file = "PyYAML-6.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:e10ce637b18caea04431ce14fabcf5c64a1c61ec9c56b071a4b7ca131ca52d44"}, - {file = "PyYAML-6.0.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:c70c95198c015b85feafc136515252a261a84561b7b1d51e3384e0655ddf25ab"}, - {file = "PyYAML-6.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ce826d6ef20b1bc864f0a68340c8b3287705cae2f8b4b1d932177dcc76721725"}, - {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f71ea527786de97d1a0cc0eacd1defc0985dcf6b3f17bb77dcfc8c34bec4dc5"}, - {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9b22676e8097e9e22e36d6b7bda33190d0d400f345f23d4065d48f4ca7ae0425"}, - {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:80bab7bfc629882493af4aa31a4cfa43a4c57c83813253626916b8c7ada83476"}, - {file = "PyYAML-6.0.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:0833f8694549e586547b576dcfaba4a6b55b9e96098b36cdc7ebefe667dfed48"}, - {file = "PyYAML-6.0.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8b9c7197f7cb2738065c481a0461e50ad02f18c78cd75775628afb4d7137fb3b"}, - {file = "PyYAML-6.0.2-cp312-cp312-win32.whl", hash = "sha256:ef6107725bd54b262d6dedcc2af448a266975032bc85ef0172c5f059da6325b4"}, - {file = "PyYAML-6.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:7e7401d0de89a9a855c839bc697c079a4af81cf878373abd7dc625847d25cbd8"}, - {file = "PyYAML-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba"}, - {file = "PyYAML-6.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:50187695423ffe49e2deacb8cd10510bc361faac997de9efef88badc3bb9e2d1"}, - {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ffe8360bab4910ef1b9e87fb812d8bc0a308b0d0eef8c8f44e0254ab3b07133"}, - {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:17e311b6c678207928d649faa7cb0d7b4c26a0ba73d41e99c4fff6b6c3276484"}, - {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70b189594dbe54f75ab3a1acec5f1e3faa7e8cf2f1e08d9b561cb41b845f69d5"}, - {file = "PyYAML-6.0.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:41e4e3953a79407c794916fa277a82531dd93aad34e29c2a514c2c0c5fe971cc"}, - {file = "PyYAML-6.0.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:68ccc6023a3400877818152ad9a1033e3db8625d899c72eacb5a668902e4d652"}, - {file = "PyYAML-6.0.2-cp313-cp313-win32.whl", hash = "sha256:bc2fa7c6b47d6bc618dd7fb02ef6fdedb1090ec036abab80d4681424b84c1183"}, - {file = "PyYAML-6.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:8388ee1976c416731879ac16da0aff3f63b286ffdd57cdeb95f3f2e085687563"}, - {file = "PyYAML-6.0.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:24471b829b3bf607e04e88d79542a9d48bb037c2267d7927a874e6c205ca7e9a"}, - {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7fded462629cfa4b685c5416b949ebad6cec74af5e2d42905d41e257e0869f5"}, - {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d84a1718ee396f54f3a086ea0a66d8e552b2ab2017ef8b420e92edbc841c352d"}, - {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9056c1ecd25795207ad294bcf39f2db3d845767be0ea6e6a34d856f006006083"}, - {file = "PyYAML-6.0.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:82d09873e40955485746739bcb8b4586983670466c23382c19cffecbf1fd8706"}, - {file = "PyYAML-6.0.2-cp38-cp38-win32.whl", hash = "sha256:43fa96a3ca0d6b1812e01ced1044a003533c47f6ee8aca31724f78e93ccc089a"}, - {file = "PyYAML-6.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:01179a4a8559ab5de078078f37e5c1a30d76bb88519906844fd7bdea1b7729ff"}, - {file = "PyYAML-6.0.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:688ba32a1cffef67fd2e9398a2efebaea461578b0923624778664cc1c914db5d"}, - {file = "PyYAML-6.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a8786accb172bd8afb8be14490a16625cbc387036876ab6ba70912730faf8e1f"}, - {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8e03406cac8513435335dbab54c0d385e4a49e4945d2909a581c83647ca0290"}, - {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f753120cb8181e736c57ef7636e83f31b9c0d1722c516f7e86cf15b7aa57ff12"}, - {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b1fdb9dc17f5a7677423d508ab4f243a726dea51fa5e70992e59a7411c89d19"}, - {file = "PyYAML-6.0.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0b69e4ce7a131fe56b7e4d770c67429700908fc0752af059838b1cfb41960e4e"}, - {file = "PyYAML-6.0.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a9f8c2e67970f13b16084e04f134610fd1d374bf477b17ec1599185cf611d725"}, - {file = "PyYAML-6.0.2-cp39-cp39-win32.whl", hash = "sha256:6395c297d42274772abc367baaa79683958044e5d3835486c16da75d2a694631"}, - {file = "PyYAML-6.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:39693e1f8320ae4f43943590b49779ffb98acb81f788220ea932a6b6c51004d8"}, - {file = "pyyaml-6.0.2.tar.gz", hash = "sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e"}, -] - [[package]] name = "requests" version = "2.32.5" description = "Python HTTP for Humans." optional = false python-versions = ">=3.9" -groups = ["main", "dev"] +groups = ["main"] files = [ {file = "requests-2.32.5-py3-none-any.whl", hash = "sha256:2462f94637a34fd532264295e186976db0f5d453d1cdd31473c85a6a161affb6"}, {file = "requests-2.32.5.tar.gz", hash = "sha256:dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf"}, @@ -1187,45 +749,19 @@ description = "A lil' TOML parser" optional = false python-versions = ">=3.8" groups = ["dev"] +markers = "python_version == \"3.10\"" files = [ {file = "tomli-2.1.0-py3-none-any.whl", hash = "sha256:a5c57c3d1c56f5ccdf89f6523458f60ef716e210fc47c4cfb188c5ba473e0391"}, {file = "tomli-2.1.0.tar.gz", hash = "sha256:3f646cae2aec94e17d04973e4249548320197cfabdf130015d023de4b74d8ab8"}, ] -[[package]] -name = "tomli-w" -version = "1.1.0" -description = "A lil' TOML writer" -optional = false -python-versions = ">=3.9" -groups = ["dev"] -files = [ - {file = "tomli_w-1.1.0-py3-none-any.whl", hash = "sha256:1403179c78193e3184bfaade390ddbd071cba48a32a2e62ba11aae47490c63f7"}, - {file = "tomli_w-1.1.0.tar.gz", hash = "sha256:49e847a3a304d516a169a601184932ef0f6b61623fe680f836a2aa7128ed0d33"}, -] - -[[package]] -name = "typeapi" -version = "2.2.3" -description = "" -optional = false -python-versions = "<4.0,>=3.8" -groups = ["dev"] -files = [ - {file = "typeapi-2.2.3-py3-none-any.whl", hash = "sha256:038062b473dd9bc182966469d7a37d81ba7fa5bb0c01f30b0604b5667b13a47b"}, - {file = "typeapi-2.2.3.tar.gz", hash = "sha256:61cf8c852c05471522fcf55ec37d0c37f0de6943cc8e4d58529f796881e32c08"}, -] - -[package.dependencies] -typing-extensions = ">=3.0.0" - [[package]] name = "typing-extensions" version = "4.12.2" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" -groups = ["main", "dev"] +groups = ["main"] files = [ {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, @@ -1237,7 +773,7 @@ version = "2.6.3" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = ">=3.9" -groups = ["main", "dev"] +groups = ["main"] files = [ {file = "urllib3-2.6.3-py3-none-any.whl", hash = "sha256:bf272323e553dfb2e87d9bfd225ca7b0f467b919d7bbd355436d3fd37cb0acd4"}, {file = "urllib3-2.6.3.tar.gz", hash = "sha256:1b62b6884944a57dbe321509ab94fd4d3b307075e0c2eae991ac71ee15ad38ed"}, @@ -1249,49 +785,6 @@ h2 = ["h2 (>=4,<5)"] socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] zstd = ["backports-zstd (>=1.0.0) ; python_version < \"3.14\""] -[[package]] -name = "watchdog" -version = "6.0.0" -description = "Filesystem events monitoring" -optional = false -python-versions = ">=3.9" -groups = ["dev"] -files = [ - {file = "watchdog-6.0.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d1cdb490583ebd691c012b3d6dae011000fe42edb7a82ece80965b42abd61f26"}, - {file = "watchdog-6.0.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bc64ab3bdb6a04d69d4023b29422170b74681784ffb9463ed4870cf2f3e66112"}, - {file = "watchdog-6.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c897ac1b55c5a1461e16dae288d22bb2e412ba9807df8397a635d88f671d36c3"}, - {file = "watchdog-6.0.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6eb11feb5a0d452ee41f824e271ca311a09e250441c262ca2fd7ebcf2461a06c"}, - {file = "watchdog-6.0.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ef810fbf7b781a5a593894e4f439773830bdecb885e6880d957d5b9382a960d2"}, - {file = "watchdog-6.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:afd0fe1b2270917c5e23c2a65ce50c2a4abb63daafb0d419fde368e272a76b7c"}, - {file = "watchdog-6.0.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:bdd4e6f14b8b18c334febb9c4425a878a2ac20efd1e0b231978e7b150f92a948"}, - {file = "watchdog-6.0.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:c7c15dda13c4eb00d6fb6fc508b3c0ed88b9d5d374056b239c4ad1611125c860"}, - {file = "watchdog-6.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6f10cb2d5902447c7d0da897e2c6768bca89174d0c6e1e30abec5421af97a5b0"}, - {file = "watchdog-6.0.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:490ab2ef84f11129844c23fb14ecf30ef3d8a6abafd3754a6f75ca1e6654136c"}, - {file = "watchdog-6.0.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:76aae96b00ae814b181bb25b1b98076d5fc84e8a53cd8885a318b42b6d3a5134"}, - {file = "watchdog-6.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a175f755fc2279e0b7312c0035d52e27211a5bc39719dd529625b1930917345b"}, - {file = "watchdog-6.0.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e6f0e77c9417e7cd62af82529b10563db3423625c5fce018430b249bf977f9e8"}, - {file = "watchdog-6.0.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:90c8e78f3b94014f7aaae121e6b909674df5b46ec24d6bebc45c44c56729af2a"}, - {file = "watchdog-6.0.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e7631a77ffb1f7d2eefa4445ebbee491c720a5661ddf6df3498ebecae5ed375c"}, - {file = "watchdog-6.0.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:c7ac31a19f4545dd92fc25d200694098f42c9a8e391bc00bdd362c5736dbf881"}, - {file = "watchdog-6.0.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:9513f27a1a582d9808cf21a07dae516f0fab1cf2d7683a742c498b93eedabb11"}, - {file = "watchdog-6.0.0-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:7a0e56874cfbc4b9b05c60c8a1926fedf56324bb08cfbc188969777940aef3aa"}, - {file = "watchdog-6.0.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:e6439e374fc012255b4ec786ae3c4bc838cd7309a540e5fe0952d03687d8804e"}, - {file = "watchdog-6.0.0-py3-none-manylinux2014_aarch64.whl", hash = "sha256:7607498efa04a3542ae3e05e64da8202e58159aa1fa4acddf7678d34a35d4f13"}, - {file = "watchdog-6.0.0-py3-none-manylinux2014_armv7l.whl", hash = "sha256:9041567ee8953024c83343288ccc458fd0a2d811d6a0fd68c4c22609e3490379"}, - {file = "watchdog-6.0.0-py3-none-manylinux2014_i686.whl", hash = "sha256:82dc3e3143c7e38ec49d61af98d6558288c415eac98486a5c581726e0737c00e"}, - {file = "watchdog-6.0.0-py3-none-manylinux2014_ppc64.whl", hash = "sha256:212ac9b8bf1161dc91bd09c048048a95ca3a4c4f5e5d4a7d1b1a7d5752a7f96f"}, - {file = "watchdog-6.0.0-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:e3df4cbb9a450c6d49318f6d14f4bbc80d763fa587ba46ec86f99f9e6876bb26"}, - {file = "watchdog-6.0.0-py3-none-manylinux2014_s390x.whl", hash = "sha256:2cce7cfc2008eb51feb6aab51251fd79b85d9894e98ba847408f662b3395ca3c"}, - {file = "watchdog-6.0.0-py3-none-manylinux2014_x86_64.whl", hash = "sha256:20ffe5b202af80ab4266dcd3e91aae72bf2da48c0d33bdb15c66658e685e94e2"}, - {file = "watchdog-6.0.0-py3-none-win32.whl", hash = "sha256:07df1fdd701c5d4c8e55ef6cf55b8f0120fe1aef7ef39a1c6fc6bc2e606d517a"}, - {file = "watchdog-6.0.0-py3-none-win_amd64.whl", hash = "sha256:cbafb470cf848d93b5d013e2ecb245d4aa1c8fd0504e863ccefa32445359d680"}, - {file = "watchdog-6.0.0-py3-none-win_ia64.whl", hash = "sha256:a1914259fa9e1454315171103c6a30961236f508b9b623eae470268bbcc6a22f"}, - {file = "watchdog-6.0.0.tar.gz", hash = "sha256:9ddf7c82fda3ae8e24decda1338ede66e1c99883db93711d8fb941eaa2d8c282"}, -] - -[package.extras] -watchmedo = ["PyYAML (>=3.10)"] - [[package]] name = "wcmatch" version = "10.1" @@ -1307,98 +800,7 @@ files = [ [package.dependencies] bracex = ">=2.1.1" -[[package]] -name = "wrapt" -version = "1.17.0" -description = "Module for decorators, wrappers and monkey patching." -optional = false -python-versions = ">=3.8" -groups = ["dev"] -files = [ - {file = "wrapt-1.17.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2a0c23b8319848426f305f9cb0c98a6e32ee68a36264f45948ccf8e7d2b941f8"}, - {file = "wrapt-1.17.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b1ca5f060e205f72bec57faae5bd817a1560fcfc4af03f414b08fa29106b7e2d"}, - {file = "wrapt-1.17.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e185ec6060e301a7e5f8461c86fb3640a7beb1a0f0208ffde7a65ec4074931df"}, - {file = "wrapt-1.17.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bb90765dd91aed05b53cd7a87bd7f5c188fcd95960914bae0d32c5e7f899719d"}, - {file = "wrapt-1.17.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:879591c2b5ab0a7184258274c42a126b74a2c3d5a329df16d69f9cee07bba6ea"}, - {file = "wrapt-1.17.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:fce6fee67c318fdfb7f285c29a82d84782ae2579c0e1b385b7f36c6e8074fffb"}, - {file = "wrapt-1.17.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:0698d3a86f68abc894d537887b9bbf84d29bcfbc759e23f4644be27acf6da301"}, - {file = "wrapt-1.17.0-cp310-cp310-win32.whl", hash = "sha256:69d093792dc34a9c4c8a70e4973a3361c7a7578e9cd86961b2bbf38ca71e4e22"}, - {file = "wrapt-1.17.0-cp310-cp310-win_amd64.whl", hash = "sha256:f28b29dc158ca5d6ac396c8e0a2ef45c4e97bb7e65522bfc04c989e6fe814575"}, - {file = "wrapt-1.17.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:74bf625b1b4caaa7bad51d9003f8b07a468a704e0644a700e936c357c17dd45a"}, - {file = "wrapt-1.17.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0f2a28eb35cf99d5f5bd12f5dd44a0f41d206db226535b37b0c60e9da162c3ed"}, - {file = "wrapt-1.17.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:81b1289e99cf4bad07c23393ab447e5e96db0ab50974a280f7954b071d41b489"}, - {file = "wrapt-1.17.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9f2939cd4a2a52ca32bc0b359015718472d7f6de870760342e7ba295be9ebaf9"}, - {file = "wrapt-1.17.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:6a9653131bda68a1f029c52157fd81e11f07d485df55410401f745007bd6d339"}, - {file = "wrapt-1.17.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:4e4b4385363de9052dac1a67bfb535c376f3d19c238b5f36bddc95efae15e12d"}, - {file = "wrapt-1.17.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:bdf62d25234290db1837875d4dceb2151e4ea7f9fff2ed41c0fde23ed542eb5b"}, - {file = "wrapt-1.17.0-cp311-cp311-win32.whl", hash = "sha256:5d8fd17635b262448ab8f99230fe4dac991af1dabdbb92f7a70a6afac8a7e346"}, - {file = "wrapt-1.17.0-cp311-cp311-win_amd64.whl", hash = "sha256:92a3d214d5e53cb1db8b015f30d544bc9d3f7179a05feb8f16df713cecc2620a"}, - {file = "wrapt-1.17.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:89fc28495896097622c3fc238915c79365dd0ede02f9a82ce436b13bd0ab7569"}, - {file = "wrapt-1.17.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:875d240fdbdbe9e11f9831901fb8719da0bd4e6131f83aa9f69b96d18fae7504"}, - {file = "wrapt-1.17.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e5ed16d95fd142e9c72b6c10b06514ad30e846a0d0917ab406186541fe68b451"}, - {file = "wrapt-1.17.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:18b956061b8db634120b58f668592a772e87e2e78bc1f6a906cfcaa0cc7991c1"}, - {file = "wrapt-1.17.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:daba396199399ccabafbfc509037ac635a6bc18510ad1add8fd16d4739cdd106"}, - {file = "wrapt-1.17.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:4d63f4d446e10ad19ed01188d6c1e1bb134cde8c18b0aa2acfd973d41fcc5ada"}, - {file = "wrapt-1.17.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:8a5e7cc39a45fc430af1aefc4d77ee6bad72c5bcdb1322cfde852c15192b8bd4"}, - {file = "wrapt-1.17.0-cp312-cp312-win32.whl", hash = "sha256:0a0a1a1ec28b641f2a3a2c35cbe86c00051c04fffcfcc577ffcdd707df3f8635"}, - {file = "wrapt-1.17.0-cp312-cp312-win_amd64.whl", hash = "sha256:3c34f6896a01b84bab196f7119770fd8466c8ae3dfa73c59c0bb281e7b588ce7"}, - {file = "wrapt-1.17.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:714c12485aa52efbc0fc0ade1e9ab3a70343db82627f90f2ecbc898fdf0bb181"}, - {file = "wrapt-1.17.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da427d311782324a376cacb47c1a4adc43f99fd9d996ffc1b3e8529c4074d393"}, - {file = "wrapt-1.17.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ba1739fb38441a27a676f4de4123d3e858e494fac05868b7a281c0a383c098f4"}, - {file = "wrapt-1.17.0-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e711fc1acc7468463bc084d1b68561e40d1eaa135d8c509a65dd534403d83d7b"}, - {file = "wrapt-1.17.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:140ea00c87fafc42739bd74a94a5a9003f8e72c27c47cd4f61d8e05e6dec8721"}, - {file = "wrapt-1.17.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:73a96fd11d2b2e77d623a7f26e004cc31f131a365add1ce1ce9a19e55a1eef90"}, - {file = "wrapt-1.17.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:0b48554952f0f387984da81ccfa73b62e52817a4386d070c75e4db7d43a28c4a"}, - {file = "wrapt-1.17.0-cp313-cp313-win32.whl", hash = "sha256:498fec8da10e3e62edd1e7368f4b24aa362ac0ad931e678332d1b209aec93045"}, - {file = "wrapt-1.17.0-cp313-cp313-win_amd64.whl", hash = "sha256:fd136bb85f4568fffca995bd3c8d52080b1e5b225dbf1c2b17b66b4c5fa02838"}, - {file = "wrapt-1.17.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:17fcf043d0b4724858f25b8826c36e08f9fb2e475410bece0ec44a22d533da9b"}, - {file = "wrapt-1.17.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e4a557d97f12813dc5e18dad9fa765ae44ddd56a672bb5de4825527c847d6379"}, - {file = "wrapt-1.17.0-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0229b247b0fc7dee0d36176cbb79dbaf2a9eb7ecc50ec3121f40ef443155fb1d"}, - {file = "wrapt-1.17.0-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8425cfce27b8b20c9b89d77fb50e368d8306a90bf2b6eef2cdf5cd5083adf83f"}, - {file = "wrapt-1.17.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9c900108df470060174108012de06d45f514aa4ec21a191e7ab42988ff42a86c"}, - {file = "wrapt-1.17.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:4e547b447073fc0dbfcbff15154c1be8823d10dab4ad401bdb1575e3fdedff1b"}, - {file = "wrapt-1.17.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:914f66f3b6fc7b915d46c1cc424bc2441841083de01b90f9e81109c9759e43ab"}, - {file = "wrapt-1.17.0-cp313-cp313t-win32.whl", hash = "sha256:a4192b45dff127c7d69b3bdfb4d3e47b64179a0b9900b6351859f3001397dabf"}, - {file = "wrapt-1.17.0-cp313-cp313t-win_amd64.whl", hash = "sha256:4f643df3d4419ea3f856c5c3f40fec1d65ea2e89ec812c83f7767c8730f9827a"}, - {file = "wrapt-1.17.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:69c40d4655e078ede067a7095544bcec5a963566e17503e75a3a3e0fe2803b13"}, - {file = "wrapt-1.17.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2f495b6754358979379f84534f8dd7a43ff8cff2558dcdea4a148a6e713a758f"}, - {file = "wrapt-1.17.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:baa7ef4e0886a6f482e00d1d5bcd37c201b383f1d314643dfb0367169f94f04c"}, - {file = "wrapt-1.17.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a8fc931382e56627ec4acb01e09ce66e5c03c384ca52606111cee50d931a342d"}, - {file = "wrapt-1.17.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:8f8909cdb9f1b237786c09a810e24ee5e15ef17019f7cecb207ce205b9b5fcce"}, - {file = "wrapt-1.17.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:ad47b095f0bdc5585bced35bd088cbfe4177236c7df9984b3cc46b391cc60627"}, - {file = "wrapt-1.17.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:948a9bd0fb2c5120457b07e59c8d7210cbc8703243225dbd78f4dfc13c8d2d1f"}, - {file = "wrapt-1.17.0-cp38-cp38-win32.whl", hash = "sha256:5ae271862b2142f4bc687bdbfcc942e2473a89999a54231aa1c2c676e28f29ea"}, - {file = "wrapt-1.17.0-cp38-cp38-win_amd64.whl", hash = "sha256:f335579a1b485c834849e9075191c9898e0731af45705c2ebf70e0cd5d58beed"}, - {file = "wrapt-1.17.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d751300b94e35b6016d4b1e7d0e7bbc3b5e1751e2405ef908316c2a9024008a1"}, - {file = "wrapt-1.17.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7264cbb4a18dc4acfd73b63e4bcfec9c9802614572025bdd44d0721983fc1d9c"}, - {file = "wrapt-1.17.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:33539c6f5b96cf0b1105a0ff4cf5db9332e773bb521cc804a90e58dc49b10578"}, - {file = "wrapt-1.17.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c30970bdee1cad6a8da2044febd824ef6dc4cc0b19e39af3085c763fdec7de33"}, - {file = "wrapt-1.17.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:bc7f729a72b16ee21795a943f85c6244971724819819a41ddbaeb691b2dd85ad"}, - {file = "wrapt-1.17.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:6ff02a91c4fc9b6a94e1c9c20f62ea06a7e375f42fe57587f004d1078ac86ca9"}, - {file = "wrapt-1.17.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:2dfb7cff84e72e7bf975b06b4989477873dcf160b2fd89959c629535df53d4e0"}, - {file = "wrapt-1.17.0-cp39-cp39-win32.whl", hash = "sha256:2399408ac33ffd5b200480ee858baa58d77dd30e0dd0cab6a8a9547135f30a88"}, - {file = "wrapt-1.17.0-cp39-cp39-win_amd64.whl", hash = "sha256:4f763a29ee6a20c529496a20a7bcb16a73de27f5da6a843249c7047daf135977"}, - {file = "wrapt-1.17.0-py3-none-any.whl", hash = "sha256:d2c63b93548eda58abf5188e505ffed0229bf675f7c3090f8e36ad55b8cbc371"}, - {file = "wrapt-1.17.0.tar.gz", hash = "sha256:16187aa2317c731170a88ef35e8937ae0f533c402872c1ee5e6d079fcf320801"}, -] - -[[package]] -name = "yapf" -version = "0.43.0" -description = "A formatter for Python code" -optional = false -python-versions = ">=3.7" -groups = ["dev"] -files = [ - {file = "yapf-0.43.0-py3-none-any.whl", hash = "sha256:224faffbc39c428cb095818cf6ef5511fdab6f7430a10783fdfb292ccf2852ca"}, - {file = "yapf-0.43.0.tar.gz", hash = "sha256:00d3aa24bfedff9420b2e0d5d9f5ab6d9d4268e72afbf59bb3fa542781d5218e"}, -] - -[package.dependencies] -platformdirs = ">=3.5.1" -tomli = {version = ">=2.0.1", markers = "python_version < \"3.11\""} - [metadata] lock-version = "2.1" python-versions = "^3.10" -content-hash = "b1d913d4dffd2be9801d669e41c4f53b74d95b6585c51580f479c376ba9d081e" +content-hash = "844a65b5fb8e287f2d379d765d473460352b3524b3a5ad2d8b4ef55ef1528eb2" diff --git a/packages/python-sdk/pyproject.toml b/packages/python-sdk/pyproject.toml index 734cb54..989b4be 100644 --- a/packages/python-sdk/pyproject.toml +++ b/packages/python-sdk/pyproject.toml @@ -22,7 +22,6 @@ python-dotenv = "^1.0.0" pytest-dotenv = "^0.5.2" pytest-xdist = "^3.6.1" ruff = "^0.15.0" -pydoc-markdown = "^4.8.2" [build-system] requires = ["poetry-core"] @@ -32,4 +31,4 @@ build-backend = "poetry.core.masonry.api" "Bug Tracker" = "https://github.com/e2b-dev/desktop/issues" [tool.ruff.lint] -ignore = ["F401", "F403"] \ No newline at end of file +ignore = ["F401", "F403"] diff --git a/packages/python-sdk/scripts/generate_sdk_ref.sh b/packages/python-sdk/scripts/generate_sdk_ref.sh deleted file mode 100755 index ad75279..0000000 --- a/packages/python-sdk/scripts/generate_sdk_ref.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -# This script generates the python SDK reference markdown files -# Run it in the `python-sdk/` directory - -PKG_VERSION="v$(node -p "require('./package.json').version")" -ROUTES_DIR="../../sdk-reference/desktop-python-sdk/${PKG_VERSION}" -mkdir -p "${ROUTES_DIR}" - -mkdir -p sdk_ref - -package="e2b_desktop" - -# generate raw SDK reference markdown file -poetry run pydoc-markdown -p "${package}" >sdk_ref/"${package}".mdx -# remove package path display -sed -i'' -e '/]*>.*<\/a>/d' "sdk_ref/${package}.mdx" -# remove empty hyperlinks -sed -i'' -e '/^# /d' "sdk_ref/${package}.mdx" -# remove " Objects" from lines starting with "##" -sed -i'' -e '/^## / s/ Objects$//' "sdk_ref/${package}.mdx" -# replace lines starting with "####" with "###" -sed -i'' -e 's/^####/###/' "sdk_ref/${package}.mdx" -# move to docs -mkdir -p "${ROUTES_DIR}/sandbox" -mv "sdk_ref/${package}.mdx" "${ROUTES_DIR}/sandbox/page.mdx" - -rm -rf sdk_ref diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6853746..95e3dd7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -51,12 +51,6 @@ importers: tsx: specifier: ^4.19.2 version: 4.21.0 - typedoc: - specifier: 0.28.17 - version: 0.28.17(typescript@5.9.3) - typedoc-plugin-markdown: - specifier: 4.10.0 - version: 4.10.0(typedoc@0.28.17(typescript@5.9.3)) typescript: specifier: ^5.6.3 version: 5.9.3 @@ -281,9 +275,6 @@ packages: resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@gerrit0/mini-shiki@3.23.0': - resolution: {integrity: sha512-bEMORlG0cqdjVyCEuU0cDQbORWX+kYCeo0kV1lbxF5bt4r7SID2l9bqsxJEM0zndaxpOUT7riCyIVEuqq/Ynxg==} - '@humanwhocodes/config-array@0.13.0': resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==} engines: {node: '>=10.10.0'} @@ -461,21 +452,6 @@ packages: cpu: [x64] os: [win32] - '@shikijs/engine-oniguruma@3.23.0': - resolution: {integrity: sha512-1nWINwKXxKKLqPibT5f4pAFLej9oZzQTsby8942OTlsJzOBZ0MWKiwzMsd+jhzu8YPCHAswGnnN1YtQfirL35g==} - - '@shikijs/langs@3.23.0': - resolution: {integrity: sha512-2Ep4W3Re5aB1/62RSYQInK9mM3HsLeB91cHqznAJMuylqjzNVAVCMnNWRHFtcNHXsoNRayP9z1qj4Sq3nMqYXg==} - - '@shikijs/themes@3.23.0': - resolution: {integrity: sha512-5qySYa1ZgAT18HR/ypENL9cUSGOeI2x+4IvYJu4JgVJdizn6kG4ia5Q1jDEOi7gTbN4RbuYtmHh0W3eccOrjMA==} - - '@shikijs/types@3.23.0': - resolution: {integrity: sha512-3JZ5HXOZfYjsYSk0yPwBrkupyYSLpAE26Qc0HLghhZNGTZg/SKxXIIgoxOpmmeQP0RRSDJTk1/vPfw9tbw+jSQ==} - - '@shikijs/vscode-textmate@10.0.2': - resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==} - '@stylistic/eslint-plugin-js@1.8.1': resolution: {integrity: sha512-c5c2C8Mos5tTQd+NWpqwEu7VT6SSRooAguFPMj1cp2RkTYl1ynKoXo8MWy3k4rkbzoeYHrqC2UlUzsroAN7wtQ==} engines: {node: ^16.0.0 || >=18.0.0} @@ -500,9 +476,6 @@ packages: '@types/estree@1.0.8': resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==} - '@types/hast@3.0.4': - resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} - '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} @@ -515,9 +488,6 @@ packages: '@types/semver@7.7.0': resolution: {integrity: sha512-k107IF4+Xr7UHjwDc7Cfd6PRQfbdkiRabXGRjo07b4WyPahFBZCZ1sE+BNxYIJPPg73UkfOsVOLwqVc/6ETrIA==} - '@types/unist@3.0.3': - resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} - '@typescript-eslint/eslint-plugin@6.21.0': resolution: {integrity: sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==} engines: {node: ^16.0.0 || >=18.0.0} @@ -784,10 +754,6 @@ packages: resolution: {integrity: sha512-g0NPZNzwIaePTahu9ixBtqrw9IZQ8ThK8dt+DU394+jmxQJ+69c2t8A0j973/j+bHo3QdNFxIRIH6zDcC3ueaw==} engines: {node: '>=20'} - entities@4.5.0: - resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} - engines: {node: '>=0.12'} - es-module-lexer@1.7.0: resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==} @@ -1064,9 +1030,6 @@ packages: lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - linkify-it@5.0.0: - resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} - load-tsconfig@0.2.5: resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -1089,19 +1052,9 @@ packages: resolution: {integrity: sha512-ESL2CrkS/2wTPfuend7Zhkzo2u0daGJ/A2VucJOgQ/C48S/zB8MMeMHSGKYpXhIjbPxfuezITkaBH1wqv00DDQ==} engines: {node: 20 || >=22} - lunr@2.3.9: - resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==} - magic-string@0.30.21: resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} - markdown-it@14.1.0: - resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==} - hasBin: true - - mdurl@2.0.0: - resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==} - merge2@1.4.1: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} @@ -1121,10 +1074,6 @@ packages: resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} engines: {node: '>=16 || 14 >=14.17'} - minimatch@9.0.5: - resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} - engines: {node: '>=16 || 14 >=14.17'} - minipass@7.1.3: resolution: {integrity: sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==} engines: {node: '>=16 || 14 >=14.17'} @@ -1285,10 +1234,6 @@ packages: engines: {node: '>=14'} hasBin: true - punycode.js@2.3.1: - resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} - engines: {node: '>=6'} - punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} @@ -1485,27 +1430,11 @@ packages: resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} engines: {node: '>=10'} - typedoc-plugin-markdown@4.10.0: - resolution: {integrity: sha512-psrg8Rtnv4HPWCsoxId+MzEN8TVK5jeKCnTbnGAbTBqcDapR9hM41bJT/9eAyKn9C2MDG9Qjh3MkltAYuLDoXg==} - engines: {node: '>= 18'} - peerDependencies: - typedoc: 0.28.x - - typedoc@0.28.17: - resolution: {integrity: sha512-ZkJ2G7mZrbxrKxinTQMjFqsCoYY6a5Luwv2GKbTnBCEgV2ihYm5CflA9JnJAwH0pZWavqfYxmDkFHPt4yx2oDQ==} - engines: {node: '>= 18', pnpm: '>= 10'} - hasBin: true - peerDependencies: - typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x - typescript@5.9.3: resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} engines: {node: '>=14.17'} hasBin: true - uc.micro@2.1.0: - resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} - udc@1.0.1: resolution: {integrity: sha512-jv+D9de1flsum5QkFtBdjyppCQAdz9kTck/0xST5Vx48T9LL2BYnw0Iw77dSKDQ9KZ/PS3qPO1vfXHDpLZlxcQ==} @@ -1785,14 +1714,6 @@ snapshots: '@eslint/js@8.57.1': {} - '@gerrit0/mini-shiki@3.23.0': - dependencies: - '@shikijs/engine-oniguruma': 3.23.0 - '@shikijs/langs': 3.23.0 - '@shikijs/themes': 3.23.0 - '@shikijs/types': 3.23.0 - '@shikijs/vscode-textmate': 10.0.2 - '@humanwhocodes/config-array@0.13.0': dependencies: '@humanwhocodes/object-schema': 2.0.3 @@ -1928,26 +1849,6 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.57.1': optional: true - '@shikijs/engine-oniguruma@3.23.0': - dependencies: - '@shikijs/types': 3.23.0 - '@shikijs/vscode-textmate': 10.0.2 - - '@shikijs/langs@3.23.0': - dependencies: - '@shikijs/types': 3.23.0 - - '@shikijs/themes@3.23.0': - dependencies: - '@shikijs/types': 3.23.0 - - '@shikijs/types@3.23.0': - dependencies: - '@shikijs/vscode-textmate': 10.0.2 - '@types/hast': 3.0.4 - - '@shikijs/vscode-textmate@10.0.2': {} - '@stylistic/eslint-plugin-js@1.8.1(eslint@8.57.1)': dependencies: '@types/eslint': 8.56.12 @@ -1981,10 +1882,6 @@ snapshots: '@types/estree@1.0.8': {} - '@types/hast@3.0.4': - dependencies: - '@types/unist': 3.0.3 - '@types/json-schema@7.0.15': {} '@types/node@12.20.55': {} @@ -1995,8 +1892,6 @@ snapshots: '@types/semver@7.7.0': {} - '@types/unist@3.0.3': {} - '@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.9.3))(eslint@8.57.1)(typescript@5.9.3)': dependencies: '@eslint-community/regexpp': 4.12.1 @@ -2282,8 +2177,6 @@ snapshots: platform: 1.3.6 tar: 7.5.11 - entities@4.5.0: {} - es-module-lexer@1.7.0: {} esbuild@0.27.3: @@ -2603,10 +2496,6 @@ snapshots: lines-and-columns@1.2.4: {} - linkify-it@5.0.0: - dependencies: - uc.micro: 2.1.0 - load-tsconfig@0.2.5: {} locate-path@5.0.0: @@ -2623,23 +2512,10 @@ snapshots: lru-cache@11.2.6: {} - lunr@2.3.9: {} - magic-string@0.30.21: dependencies: '@jridgewell/sourcemap-codec': 1.5.5 - markdown-it@14.1.0: - dependencies: - argparse: 2.0.1 - entities: 4.5.0 - linkify-it: 5.0.0 - mdurl: 2.0.0 - punycode.js: 2.3.1 - uc.micro: 2.1.0 - - mdurl@2.0.0: {} - merge2@1.4.1: {} micromatch@4.0.8: @@ -2659,10 +2535,6 @@ snapshots: dependencies: brace-expansion: 2.0.2 - minimatch@9.0.5: - dependencies: - brace-expansion: 2.0.2 - minipass@7.1.3: {} minizlib@3.1.0: @@ -2792,8 +2664,6 @@ snapshots: prettier@3.8.1: {} - punycode.js@2.3.1: {} - punycode@2.3.1: {} queue-microtask@1.2.3: {} @@ -2995,23 +2865,8 @@ snapshots: type-fest@0.20.2: {} - typedoc-plugin-markdown@4.10.0(typedoc@0.28.17(typescript@5.9.3)): - dependencies: - typedoc: 0.28.17(typescript@5.9.3) - - typedoc@0.28.17(typescript@5.9.3): - dependencies: - '@gerrit0/mini-shiki': 3.23.0 - lunr: 2.3.9 - markdown-it: 14.1.0 - minimatch: 9.0.5 - typescript: 5.9.3 - yaml: 2.8.2 - typescript@5.9.3: {} - uc.micro@2.1.0: {} - udc@1.0.1: {} ufo@1.6.3: {} @@ -3121,6 +2976,7 @@ snapshots: yallist@5.0.0: {} - yaml@2.8.2: {} + yaml@2.8.2: + optional: true yocto-queue@0.1.0: {} diff --git a/sdk-reference/desktop-js-sdk/v1.0.1/sandbox/page.mdx b/sdk-reference/desktop-js-sdk/v1.0.1/sandbox/page.mdx deleted file mode 100644 index 85ea6d8..0000000 --- a/sdk-reference/desktop-js-sdk/v1.0.1/sandbox/page.mdx +++ /dev/null @@ -1,414 +0,0 @@ -### Sandbox - -#### Methods - -### doubleClick() - -```ts -doubleClick(): Promise -``` - -Double left click on the current mouse position. - -###### Returns - -`Promise`\<`CommandResult`\> - -### getCursorPosition() - -```ts -getCursorPosition(): Promise -``` - -Get the current mouse position. - -###### Returns - -`Promise`\<`object`\> - -An object with `x` and `y` coordinates. - -| Name | Type | -| ------ | ------ | -| `x` | `number` | -| `y` | `number` | - -### getScreenSize() - -```ts -getScreenSize(): Promise -``` - -Get the current screen size. - -###### Returns - -`Promise`\<`object`\> - -An object with `width` and `height` properties. - -| Name | Type | -| ------ | ------ | -| `height` | `number` | -| `width` | `number` | - -### getVideoStreamUrl() - -```ts -getVideoStreamUrl(): Promise -``` - -###### Returns - -`Promise`\<`string`\> - -### hotkey() - -```ts -hotkey(...keys: string[]): Promise -``` - -Press a hotkey. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| ...`keys` | `string`[] | The keys to press (e.g. `hotkey("ctrl", "c")` will press Ctrl+C). | - -###### Returns - -`Promise`\<`CommandResult`\> - -### leftClick() - -```ts -leftClick(): Promise -``` - -Left click on the current mouse position. - -###### Returns - -`Promise`\<`CommandResult`\> - -### middleClick() - -```ts -middleClick(): Promise -``` - -Middle click on the current mouse position. - -###### Returns - -`Promise`\<`CommandResult`\> - -### moveMouse() - -```ts -moveMouse(x: number, y: number): Promise -``` - -Move the mouse to the given coordinates. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `x` | `number` | The x coordinate. | -| `y` | `number` | The y coordinate. | - -###### Returns - -`Promise`\<`CommandResult`\> - -### open() - -```ts -open(fileOrUrl: string): Promise -``` - -Open a file or a URL in the default application. -Note that you'll need to wait for the application to be opened. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `fileOrUrl` | `string` | The file or URL to open. | - -###### Returns - -`Promise`\<`CommandHandle`\> - -### press() - -```ts -press(key: string): Promise -``` - -Press a key. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `key` | `string` | The key to press (e.g. "enter", "space", "backspace", etc.). | - -###### Returns - -`Promise`\<`CommandResult`\> - -### rightClick() - -```ts -rightClick(): Promise -``` - -Right click on the current mouse position. - -###### Returns - -`Promise`\<`CommandResult`\> - -### runPyautoguiCode() - -```ts -runPyautoguiCode(code: string, opts: object): Promise -``` - -Run the given Python code that uses pyautogui. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `code` | `string` | -| `opts` | `object` | -| `opts.onStderr`? | (`data`: `string`) => `void` | -| `opts.onStdout`? | (`data`: `string`) => `void` | - -###### Returns - -`Promise`\<`CommandResult`\> - -### scroll() - -```ts -scroll(amount: number): Promise -``` - -Scroll the mouse wheel by the given amount. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `amount` | `number` | The amount to scroll. | - -###### Returns - -`Promise`\<`CommandResult`\> - -### takeScreenshot() - -###### takeScreenshot() - -```ts -takeScreenshot(): Promise -``` - -Take a screenshot and save it to the given name. - -###### Returns - -`Promise`\<`Uint8Array`\> - -A Uint8Array bytes representation of the screenshot. - -###### takeScreenshot(format) - -```ts -takeScreenshot(format: "bytes"): Promise -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `format` | `"bytes"` | The format of the screenshot. | - -###### Returns - -`Promise`\<`Uint8Array`\> - -A Uint8Array bytes representation of the screenshot. - -###### takeScreenshot(format) - -```ts -takeScreenshot(format: "blob"): Promise -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"blob"` | - -###### Returns - -`Promise`\<`Blob`\> - -A Blob representation of the screenshot. - -###### takeScreenshot(format) - -```ts -takeScreenshot(format: "stream"): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"stream"` | - -###### Returns - -`Promise`\<`ReadableStream`\<`Uint8Array`\>\> - -A ReadableStream of bytes representation of the screenshot. - -### write() - -```ts -write(text: string): Promise -``` - -Write the given text at the current cursor position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `text` | `string` | The text to write. | - -###### Returns - -`Promise`\<`CommandResult`\> - -### create() - -###### create(this, opts) - -```ts -static create(this: S, opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -###### create(this, template, opts) - -```ts -static create( - this: S, - template: string, -opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -## Interfaces - -### SandboxOpts - -#### Properties - -### onVideoStreamStart()? - -```ts -optional onVideoStreamStart: (url: string) => void; -``` - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `url` | `string` | - -###### Returns - -`void` - -### videoStream? - -```ts -optional videoStream: boolean; -``` diff --git a/sdk-reference/desktop-js-sdk/v1.0.2/sandbox/page.mdx b/sdk-reference/desktop-js-sdk/v1.0.2/sandbox/page.mdx deleted file mode 100644 index 85ea6d8..0000000 --- a/sdk-reference/desktop-js-sdk/v1.0.2/sandbox/page.mdx +++ /dev/null @@ -1,414 +0,0 @@ -### Sandbox - -#### Methods - -### doubleClick() - -```ts -doubleClick(): Promise -``` - -Double left click on the current mouse position. - -###### Returns - -`Promise`\<`CommandResult`\> - -### getCursorPosition() - -```ts -getCursorPosition(): Promise -``` - -Get the current mouse position. - -###### Returns - -`Promise`\<`object`\> - -An object with `x` and `y` coordinates. - -| Name | Type | -| ------ | ------ | -| `x` | `number` | -| `y` | `number` | - -### getScreenSize() - -```ts -getScreenSize(): Promise -``` - -Get the current screen size. - -###### Returns - -`Promise`\<`object`\> - -An object with `width` and `height` properties. - -| Name | Type | -| ------ | ------ | -| `height` | `number` | -| `width` | `number` | - -### getVideoStreamUrl() - -```ts -getVideoStreamUrl(): Promise -``` - -###### Returns - -`Promise`\<`string`\> - -### hotkey() - -```ts -hotkey(...keys: string[]): Promise -``` - -Press a hotkey. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| ...`keys` | `string`[] | The keys to press (e.g. `hotkey("ctrl", "c")` will press Ctrl+C). | - -###### Returns - -`Promise`\<`CommandResult`\> - -### leftClick() - -```ts -leftClick(): Promise -``` - -Left click on the current mouse position. - -###### Returns - -`Promise`\<`CommandResult`\> - -### middleClick() - -```ts -middleClick(): Promise -``` - -Middle click on the current mouse position. - -###### Returns - -`Promise`\<`CommandResult`\> - -### moveMouse() - -```ts -moveMouse(x: number, y: number): Promise -``` - -Move the mouse to the given coordinates. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `x` | `number` | The x coordinate. | -| `y` | `number` | The y coordinate. | - -###### Returns - -`Promise`\<`CommandResult`\> - -### open() - -```ts -open(fileOrUrl: string): Promise -``` - -Open a file or a URL in the default application. -Note that you'll need to wait for the application to be opened. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `fileOrUrl` | `string` | The file or URL to open. | - -###### Returns - -`Promise`\<`CommandHandle`\> - -### press() - -```ts -press(key: string): Promise -``` - -Press a key. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `key` | `string` | The key to press (e.g. "enter", "space", "backspace", etc.). | - -###### Returns - -`Promise`\<`CommandResult`\> - -### rightClick() - -```ts -rightClick(): Promise -``` - -Right click on the current mouse position. - -###### Returns - -`Promise`\<`CommandResult`\> - -### runPyautoguiCode() - -```ts -runPyautoguiCode(code: string, opts: object): Promise -``` - -Run the given Python code that uses pyautogui. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `code` | `string` | -| `opts` | `object` | -| `opts.onStderr`? | (`data`: `string`) => `void` | -| `opts.onStdout`? | (`data`: `string`) => `void` | - -###### Returns - -`Promise`\<`CommandResult`\> - -### scroll() - -```ts -scroll(amount: number): Promise -``` - -Scroll the mouse wheel by the given amount. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `amount` | `number` | The amount to scroll. | - -###### Returns - -`Promise`\<`CommandResult`\> - -### takeScreenshot() - -###### takeScreenshot() - -```ts -takeScreenshot(): Promise -``` - -Take a screenshot and save it to the given name. - -###### Returns - -`Promise`\<`Uint8Array`\> - -A Uint8Array bytes representation of the screenshot. - -###### takeScreenshot(format) - -```ts -takeScreenshot(format: "bytes"): Promise -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `format` | `"bytes"` | The format of the screenshot. | - -###### Returns - -`Promise`\<`Uint8Array`\> - -A Uint8Array bytes representation of the screenshot. - -###### takeScreenshot(format) - -```ts -takeScreenshot(format: "blob"): Promise -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"blob"` | - -###### Returns - -`Promise`\<`Blob`\> - -A Blob representation of the screenshot. - -###### takeScreenshot(format) - -```ts -takeScreenshot(format: "stream"): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"stream"` | - -###### Returns - -`Promise`\<`ReadableStream`\<`Uint8Array`\>\> - -A ReadableStream of bytes representation of the screenshot. - -### write() - -```ts -write(text: string): Promise -``` - -Write the given text at the current cursor position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `text` | `string` | The text to write. | - -###### Returns - -`Promise`\<`CommandResult`\> - -### create() - -###### create(this, opts) - -```ts -static create(this: S, opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -###### create(this, template, opts) - -```ts -static create( - this: S, - template: string, -opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -## Interfaces - -### SandboxOpts - -#### Properties - -### onVideoStreamStart()? - -```ts -optional onVideoStreamStart: (url: string) => void; -``` - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `url` | `string` | - -###### Returns - -`void` - -### videoStream? - -```ts -optional videoStream: boolean; -``` diff --git a/sdk-reference/desktop-js-sdk/v1.0.3/sandbox/page.mdx b/sdk-reference/desktop-js-sdk/v1.0.3/sandbox/page.mdx deleted file mode 100644 index cc99701..0000000 --- a/sdk-reference/desktop-js-sdk/v1.0.3/sandbox/page.mdx +++ /dev/null @@ -1,433 +0,0 @@ -### Sandbox - -#### Properties - -| Property | Modifier | Type | -| ------ | ------ | ------ | -| `display` | `readonly` | `string` | -| `stream` | `readonly` | `VNCServer` | - -#### Methods - -### doubleClick() - -```ts -doubleClick(): Promise -``` - -Double left click on the current mouse position. - -###### Returns - -`Promise`\<`void`\> - -### getCursorPosition() - -```ts -getCursorPosition(): Promise -``` - -Get the current cursor position. - -###### Returns - -`Promise`\<`null` \| `CursorPosition`\> - -A object with the x and y coordinates - -###### Throws - -Error if cursor position cannot be determined - -### getScreenSize() - -```ts -getScreenSize(): Promise -``` - -Get the current screen size. - -###### Returns - -`Promise`\<`null` \| `ScreenSize`\> - -An ScreenSize object - -###### Throws - -Error if screen size cannot be determined - -### leftClick() - -```ts -leftClick(): Promise -``` - -Left click on the current mouse position. - -###### Returns - -`Promise`\<`void`\> - -### middleClick() - -```ts -middleClick(): Promise -``` - -Middle click on the current mouse position. - -###### Returns - -`Promise`\<`void`\> - -### moveMouse() - -```ts -moveMouse(x: number, y: number): Promise -``` - -Move the mouse to the given coordinates. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `x` | `number` | The x coordinate. | -| `y` | `number` | The y coordinate. | - -###### Returns - -`Promise`\<`void`\> - -### open() - -```ts -open(fileOrUrl: string): Promise -``` - -Open a file or a URL in the default application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `fileOrUrl` | `string` | The file or URL to open. | - -###### Returns - -`Promise`\<`void`\> - -### press() - -```ts -press(key: string): Promise -``` - -Press a key. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `key` | `string` | The key to press (e.g. "enter", "space", "backspace", etc.). | - -###### Returns - -`Promise`\<`void`\> - -### rightClick() - -```ts -rightClick(): Promise -``` - -Right click on the current mouse position. - -###### Returns - -`Promise`\<`void`\> - -### screenshot() - -###### Call Signature - -```ts -screenshot(): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### Call Signature - -```ts -screenshot(format: "bytes"): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `format` | `"bytes"` | The format of the screenshot. | - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### Call Signature - -```ts -screenshot(format: "blob"): Promise -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"blob"` | - -###### Returns - -`Promise`\<`Blob`\> - -A Blob representation of the screenshot. - -###### Call Signature - -```ts -screenshot(format: "stream"): Promise>> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"stream"` | - -###### Returns - -`Promise`\<`ReadableStream`\<`Uint8Array`\<`ArrayBufferLike`\>\>\> - -A ReadableStream of bytes representation of the screenshot. - -### scroll() - -```ts -scroll(direction: "up" | "down", amount: number): Promise -``` - -Scroll the mouse wheel by the given amount. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `direction` | `"up"` \| `"down"` | `'down'` | The direction to scroll. Can be "up" or "down". | -| `amount` | `number` | `1` | The amount to scroll. | - -###### Returns - -`Promise`\<`void`\> - -### waitAndVerify() - -```ts -waitAndVerify( - cmd: string, - onResult: (result: CommandResult) => boolean, - timeout: number, -interval: number): Promise -``` - -Wait for a command to return a specific result. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `cmd` | `string` | `undefined` | The command to run. | -| `onResult` | (`result`: `CommandResult`) => `boolean` | `undefined` | The function to check the result of the command. | -| `timeout` | `number` | `10` | The maximum time to wait for the command to return the result. | -| `interval` | `number` | `0.5` | The interval to wait between checks. | - -###### Returns - -`Promise`\<`boolean`\> - -`true` if the command returned the result within the timeout, otherwise `false`. - -### write() - -```ts -write(text: string, options: object): Promise -``` - -Write the given text at the current cursor position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `text` | `string` | The text to write. | -| `options` | \{ `chunkSize`: `number`; `delayInMs`: `number`; \} | An object containing the chunk size and delay between each chunk of text. | -| `options.chunkSize` | `number` | The size of each chunk of text to write. Default is 25 characters. | -| `options.delayInMs` | `number` | The delay between each chunk of text. Default is 75 ms. | - -###### Returns - -`Promise`\<`void`\> - -### create() - -###### Call Signature - -```ts -static create(this: S, opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -``` - -###### Call Signature - -```ts -static create( - this: S, - template: string, -opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -``` - -## Interfaces - -### SandboxOpts - -Configuration options for the Sandbox environment. - SandboxOpts - -#### Properties - -### display? - -```ts -optional display: string; -``` - -Display identifier. - -### dpi? - -```ts -optional dpi: number; -``` - -Dots per inch (DPI) setting for the display. - -### enableAuth? - -```ts -optional enableAuth: boolean; -``` - -Whether to enable authentication for noVNC connections. - -### port? - -```ts -optional port: number; -``` - -Port number for the noVNC proxy server. - -### resolution? - -```ts -optional resolution: [number, number]; -``` - -The screen resolution in pixels, specified as [width, height]. - -### vncPort? - -```ts -optional vncPort: number; -``` - -Port number for the VNC server. diff --git a/sdk-reference/desktop-js-sdk/v1.1.1/sandbox/page.mdx b/sdk-reference/desktop-js-sdk/v1.1.1/sandbox/page.mdx deleted file mode 100644 index cc99701..0000000 --- a/sdk-reference/desktop-js-sdk/v1.1.1/sandbox/page.mdx +++ /dev/null @@ -1,433 +0,0 @@ -### Sandbox - -#### Properties - -| Property | Modifier | Type | -| ------ | ------ | ------ | -| `display` | `readonly` | `string` | -| `stream` | `readonly` | `VNCServer` | - -#### Methods - -### doubleClick() - -```ts -doubleClick(): Promise -``` - -Double left click on the current mouse position. - -###### Returns - -`Promise`\<`void`\> - -### getCursorPosition() - -```ts -getCursorPosition(): Promise -``` - -Get the current cursor position. - -###### Returns - -`Promise`\<`null` \| `CursorPosition`\> - -A object with the x and y coordinates - -###### Throws - -Error if cursor position cannot be determined - -### getScreenSize() - -```ts -getScreenSize(): Promise -``` - -Get the current screen size. - -###### Returns - -`Promise`\<`null` \| `ScreenSize`\> - -An ScreenSize object - -###### Throws - -Error if screen size cannot be determined - -### leftClick() - -```ts -leftClick(): Promise -``` - -Left click on the current mouse position. - -###### Returns - -`Promise`\<`void`\> - -### middleClick() - -```ts -middleClick(): Promise -``` - -Middle click on the current mouse position. - -###### Returns - -`Promise`\<`void`\> - -### moveMouse() - -```ts -moveMouse(x: number, y: number): Promise -``` - -Move the mouse to the given coordinates. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `x` | `number` | The x coordinate. | -| `y` | `number` | The y coordinate. | - -###### Returns - -`Promise`\<`void`\> - -### open() - -```ts -open(fileOrUrl: string): Promise -``` - -Open a file or a URL in the default application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `fileOrUrl` | `string` | The file or URL to open. | - -###### Returns - -`Promise`\<`void`\> - -### press() - -```ts -press(key: string): Promise -``` - -Press a key. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `key` | `string` | The key to press (e.g. "enter", "space", "backspace", etc.). | - -###### Returns - -`Promise`\<`void`\> - -### rightClick() - -```ts -rightClick(): Promise -``` - -Right click on the current mouse position. - -###### Returns - -`Promise`\<`void`\> - -### screenshot() - -###### Call Signature - -```ts -screenshot(): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### Call Signature - -```ts -screenshot(format: "bytes"): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `format` | `"bytes"` | The format of the screenshot. | - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### Call Signature - -```ts -screenshot(format: "blob"): Promise -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"blob"` | - -###### Returns - -`Promise`\<`Blob`\> - -A Blob representation of the screenshot. - -###### Call Signature - -```ts -screenshot(format: "stream"): Promise>> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"stream"` | - -###### Returns - -`Promise`\<`ReadableStream`\<`Uint8Array`\<`ArrayBufferLike`\>\>\> - -A ReadableStream of bytes representation of the screenshot. - -### scroll() - -```ts -scroll(direction: "up" | "down", amount: number): Promise -``` - -Scroll the mouse wheel by the given amount. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `direction` | `"up"` \| `"down"` | `'down'` | The direction to scroll. Can be "up" or "down". | -| `amount` | `number` | `1` | The amount to scroll. | - -###### Returns - -`Promise`\<`void`\> - -### waitAndVerify() - -```ts -waitAndVerify( - cmd: string, - onResult: (result: CommandResult) => boolean, - timeout: number, -interval: number): Promise -``` - -Wait for a command to return a specific result. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `cmd` | `string` | `undefined` | The command to run. | -| `onResult` | (`result`: `CommandResult`) => `boolean` | `undefined` | The function to check the result of the command. | -| `timeout` | `number` | `10` | The maximum time to wait for the command to return the result. | -| `interval` | `number` | `0.5` | The interval to wait between checks. | - -###### Returns - -`Promise`\<`boolean`\> - -`true` if the command returned the result within the timeout, otherwise `false`. - -### write() - -```ts -write(text: string, options: object): Promise -``` - -Write the given text at the current cursor position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `text` | `string` | The text to write. | -| `options` | \{ `chunkSize`: `number`; `delayInMs`: `number`; \} | An object containing the chunk size and delay between each chunk of text. | -| `options.chunkSize` | `number` | The size of each chunk of text to write. Default is 25 characters. | -| `options.delayInMs` | `number` | The delay between each chunk of text. Default is 75 ms. | - -###### Returns - -`Promise`\<`void`\> - -### create() - -###### Call Signature - -```ts -static create(this: S, opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -``` - -###### Call Signature - -```ts -static create( - this: S, - template: string, -opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -``` - -## Interfaces - -### SandboxOpts - -Configuration options for the Sandbox environment. - SandboxOpts - -#### Properties - -### display? - -```ts -optional display: string; -``` - -Display identifier. - -### dpi? - -```ts -optional dpi: number; -``` - -Dots per inch (DPI) setting for the display. - -### enableAuth? - -```ts -optional enableAuth: boolean; -``` - -Whether to enable authentication for noVNC connections. - -### port? - -```ts -optional port: number; -``` - -Port number for the noVNC proxy server. - -### resolution? - -```ts -optional resolution: [number, number]; -``` - -The screen resolution in pixels, specified as [width, height]. - -### vncPort? - -```ts -optional vncPort: number; -``` - -Port number for the VNC server. diff --git a/sdk-reference/desktop-js-sdk/v1.2.0/sandbox/page.mdx b/sdk-reference/desktop-js-sdk/v1.2.0/sandbox/page.mdx deleted file mode 100644 index 50a03ff..0000000 --- a/sdk-reference/desktop-js-sdk/v1.2.0/sandbox/page.mdx +++ /dev/null @@ -1,433 +0,0 @@ -### Sandbox - -#### Properties - -| Property | Modifier | Type | -| ------ | ------ | ------ | -| `display` | `readonly` | `string` | -| `stream` | `readonly` | `VNCServer` | - -#### Methods - -### doubleClick() - -```ts -doubleClick(): Promise -``` - -Double left click on the current mouse position. - -###### Returns - -`Promise`\<`void`\> - -### getCursorPosition() - -```ts -getCursorPosition(): Promise -``` - -Get the current cursor position. - -###### Returns - -`Promise`\<`CursorPosition`\> - -A object with the x and y coordinates - -###### Throws - -Error if cursor position cannot be determined - -### getScreenSize() - -```ts -getScreenSize(): Promise -``` - -Get the current screen size. - -###### Returns - -`Promise`\<`ScreenSize`\> - -An ScreenSize object - -###### Throws - -Error if screen size cannot be determined - -### leftClick() - -```ts -leftClick(): Promise -``` - -Left click on the current mouse position. - -###### Returns - -`Promise`\<`void`\> - -### middleClick() - -```ts -middleClick(): Promise -``` - -Middle click on the current mouse position. - -###### Returns - -`Promise`\<`void`\> - -### moveMouse() - -```ts -moveMouse(x: number, y: number): Promise -``` - -Move the mouse to the given coordinates. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `x` | `number` | The x coordinate. | -| `y` | `number` | The y coordinate. | - -###### Returns - -`Promise`\<`void`\> - -### open() - -```ts -open(fileOrUrl: string): Promise -``` - -Open a file or a URL in the default application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `fileOrUrl` | `string` | The file or URL to open. | - -###### Returns - -`Promise`\<`void`\> - -### press() - -```ts -press(key: string): Promise -``` - -Press a key. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `key` | `string` | The key to press (e.g. "enter", "space", "backspace", etc.). | - -###### Returns - -`Promise`\<`void`\> - -### rightClick() - -```ts -rightClick(): Promise -``` - -Right click on the current mouse position. - -###### Returns - -`Promise`\<`void`\> - -### screenshot() - -###### Call Signature - -```ts -screenshot(): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### Call Signature - -```ts -screenshot(format: "bytes"): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `format` | `"bytes"` | The format of the screenshot. | - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### Call Signature - -```ts -screenshot(format: "blob"): Promise -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"blob"` | - -###### Returns - -`Promise`\<`Blob`\> - -A Blob representation of the screenshot. - -###### Call Signature - -```ts -screenshot(format: "stream"): Promise>> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"stream"` | - -###### Returns - -`Promise`\<`ReadableStream`\<`Uint8Array`\<`ArrayBufferLike`\>\>\> - -A ReadableStream of bytes representation of the screenshot. - -### scroll() - -```ts -scroll(direction: "up" | "down", amount: number): Promise -``` - -Scroll the mouse wheel by the given amount. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `direction` | `"up"` \| `"down"` | `'down'` | The direction to scroll. Can be "up" or "down". | -| `amount` | `number` | `1` | The amount to scroll. | - -###### Returns - -`Promise`\<`void`\> - -### waitAndVerify() - -```ts -waitAndVerify( - cmd: string, - onResult: (result: CommandResult) => boolean, - timeout: number, -interval: number): Promise -``` - -Wait for a command to return a specific result. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `cmd` | `string` | `undefined` | The command to run. | -| `onResult` | (`result`: `CommandResult`) => `boolean` | `undefined` | The function to check the result of the command. | -| `timeout` | `number` | `10` | The maximum time to wait for the command to return the result. | -| `interval` | `number` | `0.5` | The interval to wait between checks. | - -###### Returns - -`Promise`\<`boolean`\> - -`true` if the command returned the result within the timeout, otherwise `false`. - -### write() - -```ts -write(text: string, options: object): Promise -``` - -Write the given text at the current cursor position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `text` | `string` | The text to write. | -| `options` | \{ `chunkSize`: `number`; `delayInMs`: `number`; \} | An object containing the chunk size and delay between each chunk of text. | -| `options.chunkSize` | `number` | The size of each chunk of text to write. Default is 25 characters. | -| `options.delayInMs` | `number` | The delay between each chunk of text. Default is 75 ms. | - -###### Returns - -`Promise`\<`void`\> - -### create() - -###### Call Signature - -```ts -static create(this: S, opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -``` - -###### Call Signature - -```ts -static create( - this: S, - template: string, -opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -``` - -## Interfaces - -### SandboxOpts - -Configuration options for the Sandbox environment. - SandboxOpts - -#### Properties - -### display? - -```ts -optional display: string; -``` - -Display identifier. - -### dpi? - -```ts -optional dpi: number; -``` - -Dots per inch (DPI) setting for the display. - -### enableAuth? - -```ts -optional enableAuth: boolean; -``` - -Whether to enable authentication for noVNC connections. - -### port? - -```ts -optional port: number; -``` - -Port number for the noVNC proxy server. - -### resolution? - -```ts -optional resolution: [number, number]; -``` - -The screen resolution in pixels, specified as [width, height]. - -### vncPort? - -```ts -optional vncPort: number; -``` - -Port number for the VNC server. diff --git a/sdk-reference/desktop-js-sdk/v1.3.0/sandbox/page.mdx b/sdk-reference/desktop-js-sdk/v1.3.0/sandbox/page.mdx deleted file mode 100644 index e175eaa..0000000 --- a/sdk-reference/desktop-js-sdk/v1.3.0/sandbox/page.mdx +++ /dev/null @@ -1,409 +0,0 @@ -### Sandbox - -#### Properties - -| Property | Modifier | Type | -| ------ | ------ | ------ | -| `display` | `readonly` | `string` | -| `stream` | `readonly` | `VNCServer` | - -#### Methods - -### doubleClick() - -```ts -doubleClick(): Promise -``` - -Double left click on the current mouse position. - -###### Returns - -`Promise`\<`void`\> - -### getCursorPosition() - -```ts -getCursorPosition(): Promise -``` - -Get the current cursor position. - -###### Returns - -`Promise`\<`CursorPosition`\> - -A object with the x and y coordinates - -###### Throws - -Error if cursor position cannot be determined - -### getScreenSize() - -```ts -getScreenSize(): Promise -``` - -Get the current screen size. - -###### Returns - -`Promise`\<`ScreenSize`\> - -An ScreenSize object - -###### Throws - -Error if screen size cannot be determined - -### leftClick() - -```ts -leftClick(): Promise -``` - -Left click on the current mouse position. - -###### Returns - -`Promise`\<`void`\> - -### middleClick() - -```ts -middleClick(): Promise -``` - -Middle click on the current mouse position. - -###### Returns - -`Promise`\<`void`\> - -### moveMouse() - -```ts -moveMouse(x: number, y: number): Promise -``` - -Move the mouse to the given coordinates. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `x` | `number` | The x coordinate. | -| `y` | `number` | The y coordinate. | - -###### Returns - -`Promise`\<`void`\> - -### open() - -```ts -open(fileOrUrl: string): Promise -``` - -Open a file or a URL in the default application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `fileOrUrl` | `string` | The file or URL to open. | - -###### Returns - -`Promise`\<`void`\> - -### press() - -```ts -press(key: string): Promise -``` - -Press a key. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `key` | `string` | The key to press (e.g. "enter", "space", "backspace", etc.). | - -###### Returns - -`Promise`\<`void`\> - -### rightClick() - -```ts -rightClick(): Promise -``` - -Right click on the current mouse position. - -###### Returns - -`Promise`\<`void`\> - -### screenshot() - -###### Call Signature - -```ts -screenshot(): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### Call Signature - -```ts -screenshot(format: "bytes"): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `format` | `"bytes"` | The format of the screenshot. | - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### Call Signature - -```ts -screenshot(format: "blob"): Promise -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"blob"` | - -###### Returns - -`Promise`\<`Blob`\> - -A Blob representation of the screenshot. - -###### Call Signature - -```ts -screenshot(format: "stream"): Promise>> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"stream"` | - -###### Returns - -`Promise`\<`ReadableStream`\<`Uint8Array`\<`ArrayBufferLike`\>\>\> - -A ReadableStream of bytes representation of the screenshot. - -### scroll() - -```ts -scroll(direction: "up" | "down", amount: number): Promise -``` - -Scroll the mouse wheel by the given amount. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `direction` | `"up"` \| `"down"` | `'down'` | The direction to scroll. Can be "up" or "down". | -| `amount` | `number` | `1` | The amount to scroll. | - -###### Returns - -`Promise`\<`void`\> - -### waitAndVerify() - -```ts -waitAndVerify( - cmd: string, - onResult: (result: CommandResult) => boolean, - timeout: number, -interval: number): Promise -``` - -Wait for a command to return a specific result. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `cmd` | `string` | `undefined` | The command to run. | -| `onResult` | (`result`: `CommandResult`) => `boolean` | `undefined` | The function to check the result of the command. | -| `timeout` | `number` | `10` | The maximum time to wait for the command to return the result. | -| `interval` | `number` | `0.5` | The interval to wait between checks. | - -###### Returns - -`Promise`\<`boolean`\> - -`true` if the command returned the result within the timeout, otherwise `false`. - -### write() - -```ts -write(text: string, options: object): Promise -``` - -Write the given text at the current cursor position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `text` | `string` | The text to write. | -| `options` | \{ `chunkSize`: `number`; `delayInMs`: `number`; \} | An object containing the chunk size and delay between each chunk of text. | -| `options.chunkSize` | `number` | The size of each chunk of text to write. Default is 25 characters. | -| `options.delayInMs` | `number` | The delay between each chunk of text. Default is 75 ms. | - -###### Returns - -`Promise`\<`void`\> - -### create() - -###### Call Signature - -```ts -static create(this: S, opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -``` - -###### Call Signature - -```ts -static create( - this: S, - template: string, -opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -``` - -## Interfaces - -### SandboxOpts - -Configuration options for the Sandbox environment. - SandboxOpts - -#### Properties - -### display? - -```ts -optional display: string; -``` - -Display identifier. - -### dpi? - -```ts -optional dpi: number; -``` - -Dots per inch (DPI) setting for the display. - -### resolution? - -```ts -optional resolution: [number, number]; -``` - -The screen resolution in pixels, specified as [width, height]. diff --git a/sdk-reference/desktop-js-sdk/v1.4.0/sandbox/page.mdx b/sdk-reference/desktop-js-sdk/v1.4.0/sandbox/page.mdx deleted file mode 100644 index 11d00ed..0000000 --- a/sdk-reference/desktop-js-sdk/v1.4.0/sandbox/page.mdx +++ /dev/null @@ -1,442 +0,0 @@ -### Sandbox - -#### Properties - -| Property | Modifier | Type | -| ------ | ------ | ------ | -| `display` | `readonly` | `string` | -| `stream` | `readonly` | `VNCServer` | - -#### Methods - -### doubleClick() - -```ts -doubleClick(): Promise -``` - -Double left click on the current mouse position. - -###### Returns - -`Promise`\<`void`\> - -### drag() - -```ts -drag(from: [number, number], to: [number, number]): Promise -``` - -Drag the mouse from the given position to the given position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `from` | [`number`, `number`] | The starting position. | -| `to` | [`number`, `number`] | The ending position. | - -###### Returns - -`Promise`\<`void`\> - -### getCursorPosition() - -```ts -getCursorPosition(): Promise -``` - -Get the current cursor position. - -###### Returns - -`Promise`\<`CursorPosition`\> - -A object with the x and y coordinates - -###### Throws - -Error if cursor position cannot be determined - -### getScreenSize() - -```ts -getScreenSize(): Promise -``` - -Get the current screen size. - -###### Returns - -`Promise`\<`ScreenSize`\> - -An ScreenSize object - -###### Throws - -Error if screen size cannot be determined - -### leftClick() - -```ts -leftClick(): Promise -``` - -Left click on the current mouse position. - -###### Returns - -`Promise`\<`void`\> - -### middleClick() - -```ts -middleClick(): Promise -``` - -Middle click on the current mouse position. - -###### Returns - -`Promise`\<`void`\> - -### moveMouse() - -```ts -moveMouse(x: number, y: number): Promise -``` - -Move the mouse to the given coordinates. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `x` | `number` | The x coordinate. | -| `y` | `number` | The y coordinate. | - -###### Returns - -`Promise`\<`void`\> - -### open() - -```ts -open(fileOrUrl: string): Promise -``` - -Open a file or a URL in the default application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `fileOrUrl` | `string` | The file or URL to open. | - -###### Returns - -`Promise`\<`void`\> - -### press() - -```ts -press(key: string | string[]): Promise -``` - -Press a key. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `key` | `string` \| `string`[] | The key to press (e.g. "enter", "space", "backspace", etc.). Can be a single key or an array of keys. | - -###### Returns - -`Promise`\<`void`\> - -### rightClick() - -```ts -rightClick(): Promise -``` - -Right click on the current mouse position. - -###### Returns - -`Promise`\<`void`\> - -### screenshot() - -###### screenshot() - -```ts -screenshot(): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "bytes"): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `format` | `"bytes"` | The format of the screenshot. | - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "blob"): Promise -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"blob"` | - -###### Returns - -`Promise`\<`Blob`\> - -A Blob representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "stream"): Promise>> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"stream"` | - -###### Returns - -`Promise`\<`ReadableStream`\<`Uint8Array`\<`ArrayBufferLike`\>\>\> - -A ReadableStream of bytes representation of the screenshot. - -### scroll() - -```ts -scroll(direction: "up" | "down", amount: number): Promise -``` - -Scroll the mouse wheel by the given amount. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `direction` | `"up"` \| `"down"` | `'down'` | The direction to scroll. Can be "up" or "down". | -| `amount` | `number` | `1` | The amount to scroll. | - -###### Returns - -`Promise`\<`void`\> - -### wait() - -```ts -wait(ms: number): Promise -``` - -Wait for the given amount of time. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `ms` | `number` | The amount of time to wait in milliseconds. | - -###### Returns - -`Promise`\<`void`\> - -### waitAndVerify() - -```ts -waitAndVerify( - cmd: string, - onResult: (result: CommandResult) => boolean, - timeout: number, -interval: number): Promise -``` - -Wait for a command to return a specific result. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `cmd` | `string` | `undefined` | The command to run. | -| `onResult` | (`result`: `CommandResult`) => `boolean` | `undefined` | The function to check the result of the command. | -| `timeout` | `number` | `10` | The maximum time to wait for the command to return the result. | -| `interval` | `number` | `0.5` | The interval to wait between checks. | - -###### Returns - -`Promise`\<`boolean`\> - -`true` if the command returned the result within the timeout, otherwise `false`. - -### write() - -```ts -write(text: string, options: object): Promise -``` - -Write the given text at the current cursor position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `text` | `string` | The text to write. | -| `options` | `object` | An object containing the chunk size and delay between each chunk of text. | -| `options.chunkSize` | `number` | The size of each chunk of text to write. Default is 25 characters. | -| `options.delayInMs` | `number` | The delay between each chunk of text. Default is 75 ms. | - -###### Returns - -`Promise`\<`void`\> - -### create() - -###### create(this, opts) - -```ts -static create(this: S, opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -###### create(this, template, opts) - -```ts -static create( - this: S, - template: string, -opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -## Interfaces - -### SandboxOpts - -Configuration options for the Sandbox environment. - SandboxOpts - -#### Properties - -### display? - -```ts -optional display: string; -``` - -Display identifier. - -### dpi? - -```ts -optional dpi: number; -``` - -Dots per inch (DPI) setting for the display. - -### resolution? - -```ts -optional resolution: [number, number]; -``` - -The screen resolution in pixels, specified as [width, height]. diff --git a/sdk-reference/desktop-js-sdk/v1.5.0/sandbox/page.mdx b/sdk-reference/desktop-js-sdk/v1.5.0/sandbox/page.mdx deleted file mode 100644 index 1510572..0000000 --- a/sdk-reference/desktop-js-sdk/v1.5.0/sandbox/page.mdx +++ /dev/null @@ -1,478 +0,0 @@ -### Sandbox - -#### Properties - -| Property | Modifier | Type | -| ------ | ------ | ------ | -| `display` | `readonly` | `string` | -| `stream` | `readonly` | `VNCServer` | - -#### Methods - -### doubleClick() - -```ts -doubleClick(): Promise -``` - -Double left click on the current mouse position. - -###### Returns - -`Promise`\<`void`\> - -### drag() - -```ts -drag(from: [number, number], to: [number, number]): Promise -``` - -Drag the mouse from the given position to the given position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `from` | [`number`, `number`] | The starting position. | -| `to` | [`number`, `number`] | The ending position. | - -###### Returns - -`Promise`\<`void`\> - -### getCursorPosition() - -```ts -getCursorPosition(): Promise -``` - -Get the current cursor position. - -###### Returns - -`Promise`\<`CursorPosition`\> - -A object with the x and y coordinates - -###### Throws - -Error if cursor position cannot be determined - -### getScreenSize() - -```ts -getScreenSize(): Promise -``` - -Get the current screen size. - -###### Returns - -`Promise`\<`ScreenSize`\> - -An ScreenSize object - -###### Throws - -Error if screen size cannot be determined - -### leftClick() - -```ts -leftClick(): Promise -``` - -Left click on the current mouse position. - -###### Returns - -`Promise`\<`void`\> - -### middleClick() - -```ts -middleClick(): Promise -``` - -Middle click on the current mouse position. - -###### Returns - -`Promise`\<`void`\> - -### mousePress() - -```ts -mousePress(button: "left" | "right" | "middle"): Promise -``` - -Press the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### mouseRelease() - -```ts -mouseRelease(button: "left" | "right" | "middle"): Promise -``` - -Release the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### moveMouse() - -```ts -moveMouse(x: number, y: number): Promise -``` - -Move the mouse to the given coordinates. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `x` | `number` | The x coordinate. | -| `y` | `number` | The y coordinate. | - -###### Returns - -`Promise`\<`void`\> - -### open() - -```ts -open(fileOrUrl: string): Promise -``` - -Open a file or a URL in the default application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `fileOrUrl` | `string` | The file or URL to open. | - -###### Returns - -`Promise`\<`void`\> - -### press() - -```ts -press(key: string | string[]): Promise -``` - -Press a key. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `key` | `string` \| `string`[] | The key to press (e.g. "enter", "space", "backspace", etc.). Can be a single key or an array of keys. | - -###### Returns - -`Promise`\<`void`\> - -### rightClick() - -```ts -rightClick(): Promise -``` - -Right click on the current mouse position. - -###### Returns - -`Promise`\<`void`\> - -### screenshot() - -###### screenshot() - -```ts -screenshot(): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "bytes"): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `format` | `"bytes"` | The format of the screenshot. | - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "blob"): Promise -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"blob"` | - -###### Returns - -`Promise`\<`Blob`\> - -A Blob representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "stream"): Promise>> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"stream"` | - -###### Returns - -`Promise`\<`ReadableStream`\<`Uint8Array`\<`ArrayBufferLike`\>\>\> - -A ReadableStream of bytes representation of the screenshot. - -### scroll() - -```ts -scroll(direction: "up" | "down", amount: number): Promise -``` - -Scroll the mouse wheel by the given amount. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `direction` | `"up"` \| `"down"` | `'down'` | The direction to scroll. Can be "up" or "down". | -| `amount` | `number` | `1` | The amount to scroll. | - -###### Returns - -`Promise`\<`void`\> - -### wait() - -```ts -wait(ms: number): Promise -``` - -Wait for the given amount of time. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `ms` | `number` | The amount of time to wait in milliseconds. | - -###### Returns - -`Promise`\<`void`\> - -### waitAndVerify() - -```ts -waitAndVerify( - cmd: string, - onResult: (result: CommandResult) => boolean, - timeout: number, -interval: number): Promise -``` - -Wait for a command to return a specific result. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `cmd` | `string` | `undefined` | The command to run. | -| `onResult` | (`result`: `CommandResult`) => `boolean` | `undefined` | The function to check the result of the command. | -| `timeout` | `number` | `10` | The maximum time to wait for the command to return the result. | -| `interval` | `number` | `0.5` | The interval to wait between checks. | - -###### Returns - -`Promise`\<`boolean`\> - -`true` if the command returned the result within the timeout, otherwise `false`. - -### write() - -```ts -write(text: string, options: object): Promise -``` - -Write the given text at the current cursor position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `text` | `string` | The text to write. | -| `options` | `object` | An object containing the chunk size and delay between each chunk of text. | -| `options.chunkSize` | `number` | The size of each chunk of text to write. Default is 25 characters. | -| `options.delayInMs` | `number` | The delay between each chunk of text. Default is 75 ms. | - -###### Returns - -`Promise`\<`void`\> - -### create() - -###### create(this, opts) - -```ts -static create(this: S, opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -###### create(this, template, opts) - -```ts -static create( - this: S, - template: string, -opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -## Interfaces - -### SandboxOpts - -Configuration options for the Sandbox environment. - SandboxOpts - -#### Properties - -### display? - -```ts -optional display: string; -``` - -Display identifier. - -### dpi? - -```ts -optional dpi: number; -``` - -Dots per inch (DPI) setting for the display. - -### resolution? - -```ts -optional resolution: [number, number]; -``` - -The screen resolution in pixels, specified as [width, height]. diff --git a/sdk-reference/desktop-js-sdk/v1.6.0/sandbox/page.mdx b/sdk-reference/desktop-js-sdk/v1.6.0/sandbox/page.mdx deleted file mode 100644 index 1510572..0000000 --- a/sdk-reference/desktop-js-sdk/v1.6.0/sandbox/page.mdx +++ /dev/null @@ -1,478 +0,0 @@ -### Sandbox - -#### Properties - -| Property | Modifier | Type | -| ------ | ------ | ------ | -| `display` | `readonly` | `string` | -| `stream` | `readonly` | `VNCServer` | - -#### Methods - -### doubleClick() - -```ts -doubleClick(): Promise -``` - -Double left click on the current mouse position. - -###### Returns - -`Promise`\<`void`\> - -### drag() - -```ts -drag(from: [number, number], to: [number, number]): Promise -``` - -Drag the mouse from the given position to the given position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `from` | [`number`, `number`] | The starting position. | -| `to` | [`number`, `number`] | The ending position. | - -###### Returns - -`Promise`\<`void`\> - -### getCursorPosition() - -```ts -getCursorPosition(): Promise -``` - -Get the current cursor position. - -###### Returns - -`Promise`\<`CursorPosition`\> - -A object with the x and y coordinates - -###### Throws - -Error if cursor position cannot be determined - -### getScreenSize() - -```ts -getScreenSize(): Promise -``` - -Get the current screen size. - -###### Returns - -`Promise`\<`ScreenSize`\> - -An ScreenSize object - -###### Throws - -Error if screen size cannot be determined - -### leftClick() - -```ts -leftClick(): Promise -``` - -Left click on the current mouse position. - -###### Returns - -`Promise`\<`void`\> - -### middleClick() - -```ts -middleClick(): Promise -``` - -Middle click on the current mouse position. - -###### Returns - -`Promise`\<`void`\> - -### mousePress() - -```ts -mousePress(button: "left" | "right" | "middle"): Promise -``` - -Press the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### mouseRelease() - -```ts -mouseRelease(button: "left" | "right" | "middle"): Promise -``` - -Release the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### moveMouse() - -```ts -moveMouse(x: number, y: number): Promise -``` - -Move the mouse to the given coordinates. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `x` | `number` | The x coordinate. | -| `y` | `number` | The y coordinate. | - -###### Returns - -`Promise`\<`void`\> - -### open() - -```ts -open(fileOrUrl: string): Promise -``` - -Open a file or a URL in the default application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `fileOrUrl` | `string` | The file or URL to open. | - -###### Returns - -`Promise`\<`void`\> - -### press() - -```ts -press(key: string | string[]): Promise -``` - -Press a key. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `key` | `string` \| `string`[] | The key to press (e.g. "enter", "space", "backspace", etc.). Can be a single key or an array of keys. | - -###### Returns - -`Promise`\<`void`\> - -### rightClick() - -```ts -rightClick(): Promise -``` - -Right click on the current mouse position. - -###### Returns - -`Promise`\<`void`\> - -### screenshot() - -###### screenshot() - -```ts -screenshot(): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "bytes"): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `format` | `"bytes"` | The format of the screenshot. | - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "blob"): Promise -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"blob"` | - -###### Returns - -`Promise`\<`Blob`\> - -A Blob representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "stream"): Promise>> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"stream"` | - -###### Returns - -`Promise`\<`ReadableStream`\<`Uint8Array`\<`ArrayBufferLike`\>\>\> - -A ReadableStream of bytes representation of the screenshot. - -### scroll() - -```ts -scroll(direction: "up" | "down", amount: number): Promise -``` - -Scroll the mouse wheel by the given amount. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `direction` | `"up"` \| `"down"` | `'down'` | The direction to scroll. Can be "up" or "down". | -| `amount` | `number` | `1` | The amount to scroll. | - -###### Returns - -`Promise`\<`void`\> - -### wait() - -```ts -wait(ms: number): Promise -``` - -Wait for the given amount of time. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `ms` | `number` | The amount of time to wait in milliseconds. | - -###### Returns - -`Promise`\<`void`\> - -### waitAndVerify() - -```ts -waitAndVerify( - cmd: string, - onResult: (result: CommandResult) => boolean, - timeout: number, -interval: number): Promise -``` - -Wait for a command to return a specific result. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `cmd` | `string` | `undefined` | The command to run. | -| `onResult` | (`result`: `CommandResult`) => `boolean` | `undefined` | The function to check the result of the command. | -| `timeout` | `number` | `10` | The maximum time to wait for the command to return the result. | -| `interval` | `number` | `0.5` | The interval to wait between checks. | - -###### Returns - -`Promise`\<`boolean`\> - -`true` if the command returned the result within the timeout, otherwise `false`. - -### write() - -```ts -write(text: string, options: object): Promise -``` - -Write the given text at the current cursor position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `text` | `string` | The text to write. | -| `options` | `object` | An object containing the chunk size and delay between each chunk of text. | -| `options.chunkSize` | `number` | The size of each chunk of text to write. Default is 25 characters. | -| `options.delayInMs` | `number` | The delay between each chunk of text. Default is 75 ms. | - -###### Returns - -`Promise`\<`void`\> - -### create() - -###### create(this, opts) - -```ts -static create(this: S, opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -###### create(this, template, opts) - -```ts -static create( - this: S, - template: string, -opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -## Interfaces - -### SandboxOpts - -Configuration options for the Sandbox environment. - SandboxOpts - -#### Properties - -### display? - -```ts -optional display: string; -``` - -Display identifier. - -### dpi? - -```ts -optional dpi: number; -``` - -Dots per inch (DPI) setting for the display. - -### resolution? - -```ts -optional resolution: [number, number]; -``` - -The screen resolution in pixels, specified as [width, height]. diff --git a/sdk-reference/desktop-js-sdk/v1.6.1/sandbox/page.mdx b/sdk-reference/desktop-js-sdk/v1.6.1/sandbox/page.mdx deleted file mode 100644 index 992eab1..0000000 --- a/sdk-reference/desktop-js-sdk/v1.6.1/sandbox/page.mdx +++ /dev/null @@ -1,478 +0,0 @@ -### Sandbox - -#### Properties - -| Property | Modifier | Type | -| ------ | ------ | ------ | -| `display` | `readonly` | `string` | -| `stream` | `readonly` | `VNCServer` | - -#### Methods - -### doubleClick() - -```ts -doubleClick(): Promise -``` - -Double left click on the current mouse position. - -###### Returns - -`Promise`\<`void`\> - -### drag() - -```ts -drag(from: [number, number], to: [number, number]): Promise -``` - -Drag the mouse from the given position to the given position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `from` | [`number`, `number`] | The starting position. | -| `to` | [`number`, `number`] | The ending position. | - -###### Returns - -`Promise`\<`void`\> - -### getCursorPosition() - -```ts -getCursorPosition(): Promise -``` - -Get the current cursor position. - -###### Returns - -`Promise`\<`CursorPosition`\> - -A object with the x and y coordinates - -###### Throws - -Error if cursor position cannot be determined - -### getScreenSize() - -```ts -getScreenSize(): Promise -``` - -Get the current screen size. - -###### Returns - -`Promise`\<`ScreenSize`\> - -An ScreenSize object - -###### Throws - -Error if screen size cannot be determined - -### leftClick() - -```ts -leftClick(): Promise -``` - -Left click on the current mouse position. - -###### Returns - -`Promise`\<`void`\> - -### middleClick() - -```ts -middleClick(): Promise -``` - -Middle click on the current mouse position. - -###### Returns - -`Promise`\<`void`\> - -### mousePress() - -```ts -mousePress(button: "left" | "right" | "middle"): Promise -``` - -Press the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### mouseRelease() - -```ts -mouseRelease(button: "left" | "right" | "middle"): Promise -``` - -Release the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### moveMouse() - -```ts -moveMouse(x: number, y: number): Promise -``` - -Move the mouse to the given coordinates. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `x` | `number` | The x coordinate. | -| `y` | `number` | The y coordinate. | - -###### Returns - -`Promise`\<`void`\> - -### open() - -```ts -open(fileOrUrl: string): Promise -``` - -Open a file or a URL in the default application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `fileOrUrl` | `string` | The file or URL to open. | - -###### Returns - -`Promise`\<`void`\> - -### press() - -```ts -press(key: string | string[]): Promise -``` - -Press a key. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `key` | `string` \| `string`[] | The key to press (e.g. "enter", "space", "backspace", etc.). Can be a single key or an array of keys. | - -###### Returns - -`Promise`\<`void`\> - -### rightClick() - -```ts -rightClick(): Promise -``` - -Right click on the current mouse position. - -###### Returns - -`Promise`\<`void`\> - -### screenshot() - -###### screenshot() - -```ts -screenshot(): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "bytes"): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `format` | `"bytes"` | The format of the screenshot. | - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "blob"): Promise -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"blob"` | - -###### Returns - -`Promise`\<`Blob`\> - -A Blob representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "stream"): Promise>> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"stream"` | - -###### Returns - -`Promise`\<`ReadableStream`\<`Uint8Array`\<`ArrayBufferLike`\>\>\> - -A ReadableStream of bytes representation of the screenshot. - -### scroll() - -```ts -scroll(direction: "down" | "up", amount: number): Promise -``` - -Scroll the mouse wheel by the given amount. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `direction` | `"down"` \| `"up"` | `'down'` | The direction to scroll. Can be "up" or "down". | -| `amount` | `number` | `1` | The amount to scroll. | - -###### Returns - -`Promise`\<`void`\> - -### wait() - -```ts -wait(ms: number): Promise -``` - -Wait for the given amount of time. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `ms` | `number` | The amount of time to wait in milliseconds. | - -###### Returns - -`Promise`\<`void`\> - -### waitAndVerify() - -```ts -waitAndVerify( - cmd: string, - onResult: (result: CommandResult) => boolean, - timeout: number, -interval: number): Promise -``` - -Wait for a command to return a specific result. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `cmd` | `string` | `undefined` | The command to run. | -| `onResult` | (`result`: `CommandResult`) => `boolean` | `undefined` | The function to check the result of the command. | -| `timeout` | `number` | `10` | The maximum time to wait for the command to return the result. | -| `interval` | `number` | `0.5` | The interval to wait between checks. | - -###### Returns - -`Promise`\<`boolean`\> - -`true` if the command returned the result within the timeout, otherwise `false`. - -### write() - -```ts -write(text: string, options: object): Promise -``` - -Write the given text at the current cursor position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `text` | `string` | The text to write. | -| `options` | `object` | An object containing the chunk size and delay between each chunk of text. | -| `options.chunkSize` | `number` | The size of each chunk of text to write. Default is 25 characters. | -| `options.delayInMs` | `number` | The delay between each chunk of text. Default is 75 ms. | - -###### Returns - -`Promise`\<`void`\> - -### create() - -###### create(this, opts) - -```ts -static create(this: S, opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -###### create(this, template, opts) - -```ts -static create( - this: S, - template: string, -opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -## Interfaces - -### SandboxOpts - -Configuration options for the Sandbox environment. - SandboxOpts - -#### Properties - -### display? - -```ts -optional display: string; -``` - -Display identifier. - -### dpi? - -```ts -optional dpi: number; -``` - -Dots per inch (DPI) setting for the display. - -### resolution? - -```ts -optional resolution: [number, number]; -``` - -The screen resolution in pixels, specified as [width, height]. diff --git a/sdk-reference/desktop-js-sdk/v1.6.2/sandbox/page.mdx b/sdk-reference/desktop-js-sdk/v1.6.2/sandbox/page.mdx deleted file mode 100644 index 32ae251..0000000 --- a/sdk-reference/desktop-js-sdk/v1.6.2/sandbox/page.mdx +++ /dev/null @@ -1,506 +0,0 @@ -### Sandbox - -#### Properties - -| Property | Modifier | Type | -| ------ | ------ | ------ | -| `display` | `readonly` | `string` | -| `stream` | `readonly` | `VNCServer` | - -#### Methods - -### doubleClick() - -```ts -doubleClick(x?: number, y?: number): Promise -``` - -Double left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### drag() - -```ts -drag(from: [number, number], to: [number, number]): Promise -``` - -Drag the mouse from the given position to the given position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `from` | [`number`, `number`] | The starting position. | -| `to` | [`number`, `number`] | The ending position. | - -###### Returns - -`Promise`\<`void`\> - -### getCursorPosition() - -```ts -getCursorPosition(): Promise -``` - -Get the current cursor position. - -###### Returns - -`Promise`\<`CursorPosition`\> - -A object with the x and y coordinates - -###### Throws - -Error if cursor position cannot be determined - -### getScreenSize() - -```ts -getScreenSize(): Promise -``` - -Get the current screen size. - -###### Returns - -`Promise`\<`ScreenSize`\> - -An ScreenSize object - -###### Throws - -Error if screen size cannot be determined - -### leftClick() - -```ts -leftClick(x?: number, y?: number): Promise -``` - -Left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### middleClick() - -```ts -middleClick(x?: number, y?: number): Promise -``` - -Middle click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### mousePress() - -```ts -mousePress(button: "left" | "right" | "middle"): Promise -``` - -Press the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### mouseRelease() - -```ts -mouseRelease(button: "left" | "right" | "middle"): Promise -``` - -Release the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### moveMouse() - -```ts -moveMouse(x: number, y: number): Promise -``` - -Move the mouse to the given coordinates. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `x` | `number` | The x coordinate. | -| `y` | `number` | The y coordinate. | - -###### Returns - -`Promise`\<`void`\> - -### open() - -```ts -open(fileOrUrl: string): Promise -``` - -Open a file or a URL in the default application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `fileOrUrl` | `string` | The file or URL to open. | - -###### Returns - -`Promise`\<`void`\> - -### press() - -```ts -press(key: string | string[]): Promise -``` - -Press a key. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `key` | `string` \| `string`[] | The key to press (e.g. "enter", "space", "backspace", etc.). Can be a single key or an array of keys. | - -###### Returns - -`Promise`\<`void`\> - -### rightClick() - -```ts -rightClick(x?: number, y?: number): Promise -``` - -Right click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### screenshot() - -###### screenshot() - -```ts -screenshot(): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "bytes"): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `format` | `"bytes"` | The format of the screenshot. | - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "blob"): Promise -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"blob"` | - -###### Returns - -`Promise`\<`Blob`\> - -A Blob representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "stream"): Promise>> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"stream"` | - -###### Returns - -`Promise`\<`ReadableStream`\<`Uint8Array`\<`ArrayBufferLike`\>\>\> - -A ReadableStream of bytes representation of the screenshot. - -### scroll() - -```ts -scroll(direction: "down" | "up", amount: number): Promise -``` - -Scroll the mouse wheel by the given amount. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `direction` | `"down"` \| `"up"` | `'down'` | The direction to scroll. Can be "up" or "down". | -| `amount` | `number` | `1` | The amount to scroll. | - -###### Returns - -`Promise`\<`void`\> - -### wait() - -```ts -wait(ms: number): Promise -``` - -Wait for the given amount of time. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `ms` | `number` | The amount of time to wait in milliseconds. | - -###### Returns - -`Promise`\<`void`\> - -### waitAndVerify() - -```ts -waitAndVerify( - cmd: string, - onResult: (result: CommandResult) => boolean, - timeout: number, -interval: number): Promise -``` - -Wait for a command to return a specific result. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `cmd` | `string` | `undefined` | The command to run. | -| `onResult` | (`result`: `CommandResult`) => `boolean` | `undefined` | The function to check the result of the command. | -| `timeout` | `number` | `10` | The maximum time to wait for the command to return the result. | -| `interval` | `number` | `0.5` | The interval to wait between checks. | - -###### Returns - -`Promise`\<`boolean`\> - -`true` if the command returned the result within the timeout, otherwise `false`. - -### write() - -```ts -write(text: string, options: object): Promise -``` - -Write the given text at the current cursor position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `text` | `string` | The text to write. | -| `options` | `object` | An object containing the chunk size and delay between each chunk of text. | -| `options.chunkSize` | `number` | The size of each chunk of text to write. Default is 25 characters. | -| `options.delayInMs` | `number` | The delay between each chunk of text. Default is 75 ms. | - -###### Returns - -`Promise`\<`void`\> - -### create() - -###### create(this, opts) - -```ts -static create(this: S, opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -###### create(this, template, opts) - -```ts -static create( - this: S, - template: string, -opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -## Interfaces - -### SandboxOpts - -Configuration options for the Sandbox environment. - SandboxOpts - -#### Properties - -### display? - -```ts -optional display: string; -``` - -Display identifier. - -### dpi? - -```ts -optional dpi: number; -``` - -Dots per inch (DPI) setting for the display. - -### resolution? - -```ts -optional resolution: [number, number]; -``` - -The screen resolution in pixels, specified as [width, height]. diff --git a/sdk-reference/desktop-js-sdk/v1.7.0/sandbox/page.mdx b/sdk-reference/desktop-js-sdk/v1.7.0/sandbox/page.mdx deleted file mode 100644 index 32ae251..0000000 --- a/sdk-reference/desktop-js-sdk/v1.7.0/sandbox/page.mdx +++ /dev/null @@ -1,506 +0,0 @@ -### Sandbox - -#### Properties - -| Property | Modifier | Type | -| ------ | ------ | ------ | -| `display` | `readonly` | `string` | -| `stream` | `readonly` | `VNCServer` | - -#### Methods - -### doubleClick() - -```ts -doubleClick(x?: number, y?: number): Promise -``` - -Double left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### drag() - -```ts -drag(from: [number, number], to: [number, number]): Promise -``` - -Drag the mouse from the given position to the given position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `from` | [`number`, `number`] | The starting position. | -| `to` | [`number`, `number`] | The ending position. | - -###### Returns - -`Promise`\<`void`\> - -### getCursorPosition() - -```ts -getCursorPosition(): Promise -``` - -Get the current cursor position. - -###### Returns - -`Promise`\<`CursorPosition`\> - -A object with the x and y coordinates - -###### Throws - -Error if cursor position cannot be determined - -### getScreenSize() - -```ts -getScreenSize(): Promise -``` - -Get the current screen size. - -###### Returns - -`Promise`\<`ScreenSize`\> - -An ScreenSize object - -###### Throws - -Error if screen size cannot be determined - -### leftClick() - -```ts -leftClick(x?: number, y?: number): Promise -``` - -Left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### middleClick() - -```ts -middleClick(x?: number, y?: number): Promise -``` - -Middle click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### mousePress() - -```ts -mousePress(button: "left" | "right" | "middle"): Promise -``` - -Press the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### mouseRelease() - -```ts -mouseRelease(button: "left" | "right" | "middle"): Promise -``` - -Release the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### moveMouse() - -```ts -moveMouse(x: number, y: number): Promise -``` - -Move the mouse to the given coordinates. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `x` | `number` | The x coordinate. | -| `y` | `number` | The y coordinate. | - -###### Returns - -`Promise`\<`void`\> - -### open() - -```ts -open(fileOrUrl: string): Promise -``` - -Open a file or a URL in the default application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `fileOrUrl` | `string` | The file or URL to open. | - -###### Returns - -`Promise`\<`void`\> - -### press() - -```ts -press(key: string | string[]): Promise -``` - -Press a key. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `key` | `string` \| `string`[] | The key to press (e.g. "enter", "space", "backspace", etc.). Can be a single key or an array of keys. | - -###### Returns - -`Promise`\<`void`\> - -### rightClick() - -```ts -rightClick(x?: number, y?: number): Promise -``` - -Right click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### screenshot() - -###### screenshot() - -```ts -screenshot(): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "bytes"): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `format` | `"bytes"` | The format of the screenshot. | - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "blob"): Promise -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"blob"` | - -###### Returns - -`Promise`\<`Blob`\> - -A Blob representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "stream"): Promise>> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"stream"` | - -###### Returns - -`Promise`\<`ReadableStream`\<`Uint8Array`\<`ArrayBufferLike`\>\>\> - -A ReadableStream of bytes representation of the screenshot. - -### scroll() - -```ts -scroll(direction: "down" | "up", amount: number): Promise -``` - -Scroll the mouse wheel by the given amount. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `direction` | `"down"` \| `"up"` | `'down'` | The direction to scroll. Can be "up" or "down". | -| `amount` | `number` | `1` | The amount to scroll. | - -###### Returns - -`Promise`\<`void`\> - -### wait() - -```ts -wait(ms: number): Promise -``` - -Wait for the given amount of time. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `ms` | `number` | The amount of time to wait in milliseconds. | - -###### Returns - -`Promise`\<`void`\> - -### waitAndVerify() - -```ts -waitAndVerify( - cmd: string, - onResult: (result: CommandResult) => boolean, - timeout: number, -interval: number): Promise -``` - -Wait for a command to return a specific result. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `cmd` | `string` | `undefined` | The command to run. | -| `onResult` | (`result`: `CommandResult`) => `boolean` | `undefined` | The function to check the result of the command. | -| `timeout` | `number` | `10` | The maximum time to wait for the command to return the result. | -| `interval` | `number` | `0.5` | The interval to wait between checks. | - -###### Returns - -`Promise`\<`boolean`\> - -`true` if the command returned the result within the timeout, otherwise `false`. - -### write() - -```ts -write(text: string, options: object): Promise -``` - -Write the given text at the current cursor position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `text` | `string` | The text to write. | -| `options` | `object` | An object containing the chunk size and delay between each chunk of text. | -| `options.chunkSize` | `number` | The size of each chunk of text to write. Default is 25 characters. | -| `options.delayInMs` | `number` | The delay between each chunk of text. Default is 75 ms. | - -###### Returns - -`Promise`\<`void`\> - -### create() - -###### create(this, opts) - -```ts -static create(this: S, opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -###### create(this, template, opts) - -```ts -static create( - this: S, - template: string, -opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -## Interfaces - -### SandboxOpts - -Configuration options for the Sandbox environment. - SandboxOpts - -#### Properties - -### display? - -```ts -optional display: string; -``` - -Display identifier. - -### dpi? - -```ts -optional dpi: number; -``` - -Dots per inch (DPI) setting for the display. - -### resolution? - -```ts -optional resolution: [number, number]; -``` - -The screen resolution in pixels, specified as [width, height]. diff --git a/sdk-reference/desktop-js-sdk/v1.7.1/sandbox/page.mdx b/sdk-reference/desktop-js-sdk/v1.7.1/sandbox/page.mdx deleted file mode 100644 index 32ae251..0000000 --- a/sdk-reference/desktop-js-sdk/v1.7.1/sandbox/page.mdx +++ /dev/null @@ -1,506 +0,0 @@ -### Sandbox - -#### Properties - -| Property | Modifier | Type | -| ------ | ------ | ------ | -| `display` | `readonly` | `string` | -| `stream` | `readonly` | `VNCServer` | - -#### Methods - -### doubleClick() - -```ts -doubleClick(x?: number, y?: number): Promise -``` - -Double left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### drag() - -```ts -drag(from: [number, number], to: [number, number]): Promise -``` - -Drag the mouse from the given position to the given position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `from` | [`number`, `number`] | The starting position. | -| `to` | [`number`, `number`] | The ending position. | - -###### Returns - -`Promise`\<`void`\> - -### getCursorPosition() - -```ts -getCursorPosition(): Promise -``` - -Get the current cursor position. - -###### Returns - -`Promise`\<`CursorPosition`\> - -A object with the x and y coordinates - -###### Throws - -Error if cursor position cannot be determined - -### getScreenSize() - -```ts -getScreenSize(): Promise -``` - -Get the current screen size. - -###### Returns - -`Promise`\<`ScreenSize`\> - -An ScreenSize object - -###### Throws - -Error if screen size cannot be determined - -### leftClick() - -```ts -leftClick(x?: number, y?: number): Promise -``` - -Left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### middleClick() - -```ts -middleClick(x?: number, y?: number): Promise -``` - -Middle click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### mousePress() - -```ts -mousePress(button: "left" | "right" | "middle"): Promise -``` - -Press the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### mouseRelease() - -```ts -mouseRelease(button: "left" | "right" | "middle"): Promise -``` - -Release the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### moveMouse() - -```ts -moveMouse(x: number, y: number): Promise -``` - -Move the mouse to the given coordinates. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `x` | `number` | The x coordinate. | -| `y` | `number` | The y coordinate. | - -###### Returns - -`Promise`\<`void`\> - -### open() - -```ts -open(fileOrUrl: string): Promise -``` - -Open a file or a URL in the default application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `fileOrUrl` | `string` | The file or URL to open. | - -###### Returns - -`Promise`\<`void`\> - -### press() - -```ts -press(key: string | string[]): Promise -``` - -Press a key. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `key` | `string` \| `string`[] | The key to press (e.g. "enter", "space", "backspace", etc.). Can be a single key or an array of keys. | - -###### Returns - -`Promise`\<`void`\> - -### rightClick() - -```ts -rightClick(x?: number, y?: number): Promise -``` - -Right click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### screenshot() - -###### screenshot() - -```ts -screenshot(): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "bytes"): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `format` | `"bytes"` | The format of the screenshot. | - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "blob"): Promise -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"blob"` | - -###### Returns - -`Promise`\<`Blob`\> - -A Blob representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "stream"): Promise>> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"stream"` | - -###### Returns - -`Promise`\<`ReadableStream`\<`Uint8Array`\<`ArrayBufferLike`\>\>\> - -A ReadableStream of bytes representation of the screenshot. - -### scroll() - -```ts -scroll(direction: "down" | "up", amount: number): Promise -``` - -Scroll the mouse wheel by the given amount. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `direction` | `"down"` \| `"up"` | `'down'` | The direction to scroll. Can be "up" or "down". | -| `amount` | `number` | `1` | The amount to scroll. | - -###### Returns - -`Promise`\<`void`\> - -### wait() - -```ts -wait(ms: number): Promise -``` - -Wait for the given amount of time. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `ms` | `number` | The amount of time to wait in milliseconds. | - -###### Returns - -`Promise`\<`void`\> - -### waitAndVerify() - -```ts -waitAndVerify( - cmd: string, - onResult: (result: CommandResult) => boolean, - timeout: number, -interval: number): Promise -``` - -Wait for a command to return a specific result. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `cmd` | `string` | `undefined` | The command to run. | -| `onResult` | (`result`: `CommandResult`) => `boolean` | `undefined` | The function to check the result of the command. | -| `timeout` | `number` | `10` | The maximum time to wait for the command to return the result. | -| `interval` | `number` | `0.5` | The interval to wait between checks. | - -###### Returns - -`Promise`\<`boolean`\> - -`true` if the command returned the result within the timeout, otherwise `false`. - -### write() - -```ts -write(text: string, options: object): Promise -``` - -Write the given text at the current cursor position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `text` | `string` | The text to write. | -| `options` | `object` | An object containing the chunk size and delay between each chunk of text. | -| `options.chunkSize` | `number` | The size of each chunk of text to write. Default is 25 characters. | -| `options.delayInMs` | `number` | The delay between each chunk of text. Default is 75 ms. | - -###### Returns - -`Promise`\<`void`\> - -### create() - -###### create(this, opts) - -```ts -static create(this: S, opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -###### create(this, template, opts) - -```ts -static create( - this: S, - template: string, -opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -## Interfaces - -### SandboxOpts - -Configuration options for the Sandbox environment. - SandboxOpts - -#### Properties - -### display? - -```ts -optional display: string; -``` - -Display identifier. - -### dpi? - -```ts -optional dpi: number; -``` - -Dots per inch (DPI) setting for the display. - -### resolution? - -```ts -optional resolution: [number, number]; -``` - -The screen resolution in pixels, specified as [width, height]. diff --git a/sdk-reference/desktop-js-sdk/v1.7.2/sandbox/page.mdx b/sdk-reference/desktop-js-sdk/v1.7.2/sandbox/page.mdx deleted file mode 100644 index a4140fb..0000000 --- a/sdk-reference/desktop-js-sdk/v1.7.2/sandbox/page.mdx +++ /dev/null @@ -1,560 +0,0 @@ -### Sandbox - -#### Properties - -| Property | Modifier | Type | -| ------ | ------ | ------ | -| `display` | `readonly` | `string` | -| `stream` | `readonly` | `VNCServer` | - -#### Methods - -### doubleClick() - -```ts -doubleClick(x?: number, y?: number): Promise -``` - -Double left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### drag() - -```ts -drag(from: [number, number], to: [number, number]): Promise -``` - -Drag the mouse from the given position to the given position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `from` | [`number`, `number`] | The starting position. | -| `to` | [`number`, `number`] | The ending position. | - -###### Returns - -`Promise`\<`void`\> - -### getApplicationWindows() - -```ts -getApplicationWindows(application: string): Promise -``` - -Get the window ID of the window with the given title. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `application` | `string` | - -###### Returns - -`Promise`\<`string`[]\> - -The ID of the window. - -### getCurrentWindowId() - -```ts -getCurrentWindowId(): Promise -``` - -Get the current window ID. - -###### Returns - -`Promise`\<`string`\> - -The ID of the current window. - -### getCursorPosition() - -```ts -getCursorPosition(): Promise -``` - -Get the current cursor position. - -###### Returns - -`Promise`\<`CursorPosition`\> - -A object with the x and y coordinates - -###### Throws - -Error if cursor position cannot be determined - -### getScreenSize() - -```ts -getScreenSize(): Promise -``` - -Get the current screen size. - -###### Returns - -`Promise`\<`ScreenSize`\> - -An ScreenSize object - -###### Throws - -Error if screen size cannot be determined - -### getWindowTitle() - -```ts -getWindowTitle(windowId: string): Promise -``` - -Get the title of the window with the given ID. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `windowId` | `string` | The ID of the window. | - -###### Returns - -`Promise`\<`string`\> - -The title of the window. - -### leftClick() - -```ts -leftClick(x?: number, y?: number): Promise -``` - -Left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### middleClick() - -```ts -middleClick(x?: number, y?: number): Promise -``` - -Middle click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### mousePress() - -```ts -mousePress(button: "left" | "right" | "middle"): Promise -``` - -Press the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### mouseRelease() - -```ts -mouseRelease(button: "left" | "right" | "middle"): Promise -``` - -Release the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### moveMouse() - -```ts -moveMouse(x: number, y: number): Promise -``` - -Move the mouse to the given coordinates. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `x` | `number` | The x coordinate. | -| `y` | `number` | The y coordinate. | - -###### Returns - -`Promise`\<`void`\> - -### open() - -```ts -open(fileOrUrl: string): Promise -``` - -Open a file or a URL in the default application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `fileOrUrl` | `string` | The file or URL to open. | - -###### Returns - -`Promise`\<`void`\> - -### press() - -```ts -press(key: string | string[]): Promise -``` - -Press a key. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `key` | `string` \| `string`[] | The key to press (e.g. "enter", "space", "backspace", etc.). Can be a single key or an array of keys. | - -###### Returns - -`Promise`\<`void`\> - -### rightClick() - -```ts -rightClick(x?: number, y?: number): Promise -``` - -Right click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### screenshot() - -###### screenshot() - -```ts -screenshot(): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "bytes"): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `format` | `"bytes"` | The format of the screenshot. | - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "blob"): Promise -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"blob"` | - -###### Returns - -`Promise`\<`Blob`\> - -A Blob representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "stream"): Promise>> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"stream"` | - -###### Returns - -`Promise`\<`ReadableStream`\<`Uint8Array`\<`ArrayBufferLike`\>\>\> - -A ReadableStream of bytes representation of the screenshot. - -### scroll() - -```ts -scroll(direction: "down" | "up", amount: number): Promise -``` - -Scroll the mouse wheel by the given amount. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `direction` | `"down"` \| `"up"` | `'down'` | The direction to scroll. Can be "up" or "down". | -| `amount` | `number` | `1` | The amount to scroll. | - -###### Returns - -`Promise`\<`void`\> - -### wait() - -```ts -wait(ms: number): Promise -``` - -Wait for the given amount of time. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `ms` | `number` | The amount of time to wait in milliseconds. | - -###### Returns - -`Promise`\<`void`\> - -### waitAndVerify() - -```ts -waitAndVerify( - cmd: string, - onResult: (result: CommandResult) => boolean, - timeout: number, -interval: number): Promise -``` - -Wait for a command to return a specific result. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `cmd` | `string` | `undefined` | The command to run. | -| `onResult` | (`result`: `CommandResult`) => `boolean` | `undefined` | The function to check the result of the command. | -| `timeout` | `number` | `10` | The maximum time to wait for the command to return the result. | -| `interval` | `number` | `0.5` | The interval to wait between checks. | - -###### Returns - -`Promise`\<`boolean`\> - -`true` if the command returned the result within the timeout, otherwise `false`. - -### write() - -```ts -write(text: string, options: object): Promise -``` - -Write the given text at the current cursor position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `text` | `string` | The text to write. | -| `options` | `object` | An object containing the chunk size and delay between each chunk of text. | -| `options.chunkSize` | `number` | The size of each chunk of text to write. Default is 25 characters. | -| `options.delayInMs` | `number` | The delay between each chunk of text. Default is 75 ms. | - -###### Returns - -`Promise`\<`void`\> - -### create() - -###### create(this, opts) - -```ts -static create(this: S, opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -###### create(this, template, opts) - -```ts -static create( - this: S, - template: string, -opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -## Interfaces - -### SandboxOpts - -Configuration options for the Sandbox environment. - SandboxOpts - -#### Properties - -### display? - -```ts -optional display: string; -``` - -Display identifier. - -### dpi? - -```ts -optional dpi: number; -``` - -Dots per inch (DPI) setting for the display. - -### resolution? - -```ts -optional resolution: [number, number]; -``` - -The screen resolution in pixels, specified as [width, height]. diff --git a/sdk-reference/desktop-js-sdk/v1.7.3/sandbox/page.mdx b/sdk-reference/desktop-js-sdk/v1.7.3/sandbox/page.mdx deleted file mode 100644 index a4140fb..0000000 --- a/sdk-reference/desktop-js-sdk/v1.7.3/sandbox/page.mdx +++ /dev/null @@ -1,560 +0,0 @@ -### Sandbox - -#### Properties - -| Property | Modifier | Type | -| ------ | ------ | ------ | -| `display` | `readonly` | `string` | -| `stream` | `readonly` | `VNCServer` | - -#### Methods - -### doubleClick() - -```ts -doubleClick(x?: number, y?: number): Promise -``` - -Double left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### drag() - -```ts -drag(from: [number, number], to: [number, number]): Promise -``` - -Drag the mouse from the given position to the given position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `from` | [`number`, `number`] | The starting position. | -| `to` | [`number`, `number`] | The ending position. | - -###### Returns - -`Promise`\<`void`\> - -### getApplicationWindows() - -```ts -getApplicationWindows(application: string): Promise -``` - -Get the window ID of the window with the given title. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `application` | `string` | - -###### Returns - -`Promise`\<`string`[]\> - -The ID of the window. - -### getCurrentWindowId() - -```ts -getCurrentWindowId(): Promise -``` - -Get the current window ID. - -###### Returns - -`Promise`\<`string`\> - -The ID of the current window. - -### getCursorPosition() - -```ts -getCursorPosition(): Promise -``` - -Get the current cursor position. - -###### Returns - -`Promise`\<`CursorPosition`\> - -A object with the x and y coordinates - -###### Throws - -Error if cursor position cannot be determined - -### getScreenSize() - -```ts -getScreenSize(): Promise -``` - -Get the current screen size. - -###### Returns - -`Promise`\<`ScreenSize`\> - -An ScreenSize object - -###### Throws - -Error if screen size cannot be determined - -### getWindowTitle() - -```ts -getWindowTitle(windowId: string): Promise -``` - -Get the title of the window with the given ID. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `windowId` | `string` | The ID of the window. | - -###### Returns - -`Promise`\<`string`\> - -The title of the window. - -### leftClick() - -```ts -leftClick(x?: number, y?: number): Promise -``` - -Left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### middleClick() - -```ts -middleClick(x?: number, y?: number): Promise -``` - -Middle click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### mousePress() - -```ts -mousePress(button: "left" | "right" | "middle"): Promise -``` - -Press the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### mouseRelease() - -```ts -mouseRelease(button: "left" | "right" | "middle"): Promise -``` - -Release the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### moveMouse() - -```ts -moveMouse(x: number, y: number): Promise -``` - -Move the mouse to the given coordinates. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `x` | `number` | The x coordinate. | -| `y` | `number` | The y coordinate. | - -###### Returns - -`Promise`\<`void`\> - -### open() - -```ts -open(fileOrUrl: string): Promise -``` - -Open a file or a URL in the default application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `fileOrUrl` | `string` | The file or URL to open. | - -###### Returns - -`Promise`\<`void`\> - -### press() - -```ts -press(key: string | string[]): Promise -``` - -Press a key. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `key` | `string` \| `string`[] | The key to press (e.g. "enter", "space", "backspace", etc.). Can be a single key or an array of keys. | - -###### Returns - -`Promise`\<`void`\> - -### rightClick() - -```ts -rightClick(x?: number, y?: number): Promise -``` - -Right click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### screenshot() - -###### screenshot() - -```ts -screenshot(): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "bytes"): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `format` | `"bytes"` | The format of the screenshot. | - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "blob"): Promise -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"blob"` | - -###### Returns - -`Promise`\<`Blob`\> - -A Blob representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "stream"): Promise>> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"stream"` | - -###### Returns - -`Promise`\<`ReadableStream`\<`Uint8Array`\<`ArrayBufferLike`\>\>\> - -A ReadableStream of bytes representation of the screenshot. - -### scroll() - -```ts -scroll(direction: "down" | "up", amount: number): Promise -``` - -Scroll the mouse wheel by the given amount. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `direction` | `"down"` \| `"up"` | `'down'` | The direction to scroll. Can be "up" or "down". | -| `amount` | `number` | `1` | The amount to scroll. | - -###### Returns - -`Promise`\<`void`\> - -### wait() - -```ts -wait(ms: number): Promise -``` - -Wait for the given amount of time. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `ms` | `number` | The amount of time to wait in milliseconds. | - -###### Returns - -`Promise`\<`void`\> - -### waitAndVerify() - -```ts -waitAndVerify( - cmd: string, - onResult: (result: CommandResult) => boolean, - timeout: number, -interval: number): Promise -``` - -Wait for a command to return a specific result. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `cmd` | `string` | `undefined` | The command to run. | -| `onResult` | (`result`: `CommandResult`) => `boolean` | `undefined` | The function to check the result of the command. | -| `timeout` | `number` | `10` | The maximum time to wait for the command to return the result. | -| `interval` | `number` | `0.5` | The interval to wait between checks. | - -###### Returns - -`Promise`\<`boolean`\> - -`true` if the command returned the result within the timeout, otherwise `false`. - -### write() - -```ts -write(text: string, options: object): Promise -``` - -Write the given text at the current cursor position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `text` | `string` | The text to write. | -| `options` | `object` | An object containing the chunk size and delay between each chunk of text. | -| `options.chunkSize` | `number` | The size of each chunk of text to write. Default is 25 characters. | -| `options.delayInMs` | `number` | The delay between each chunk of text. Default is 75 ms. | - -###### Returns - -`Promise`\<`void`\> - -### create() - -###### create(this, opts) - -```ts -static create(this: S, opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -###### create(this, template, opts) - -```ts -static create( - this: S, - template: string, -opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -## Interfaces - -### SandboxOpts - -Configuration options for the Sandbox environment. - SandboxOpts - -#### Properties - -### display? - -```ts -optional display: string; -``` - -Display identifier. - -### dpi? - -```ts -optional dpi: number; -``` - -Dots per inch (DPI) setting for the display. - -### resolution? - -```ts -optional resolution: [number, number]; -``` - -The screen resolution in pixels, specified as [width, height]. diff --git a/sdk-reference/desktop-js-sdk/v1.8.0/sandbox/page.mdx b/sdk-reference/desktop-js-sdk/v1.8.0/sandbox/page.mdx deleted file mode 100644 index a4140fb..0000000 --- a/sdk-reference/desktop-js-sdk/v1.8.0/sandbox/page.mdx +++ /dev/null @@ -1,560 +0,0 @@ -### Sandbox - -#### Properties - -| Property | Modifier | Type | -| ------ | ------ | ------ | -| `display` | `readonly` | `string` | -| `stream` | `readonly` | `VNCServer` | - -#### Methods - -### doubleClick() - -```ts -doubleClick(x?: number, y?: number): Promise -``` - -Double left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### drag() - -```ts -drag(from: [number, number], to: [number, number]): Promise -``` - -Drag the mouse from the given position to the given position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `from` | [`number`, `number`] | The starting position. | -| `to` | [`number`, `number`] | The ending position. | - -###### Returns - -`Promise`\<`void`\> - -### getApplicationWindows() - -```ts -getApplicationWindows(application: string): Promise -``` - -Get the window ID of the window with the given title. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `application` | `string` | - -###### Returns - -`Promise`\<`string`[]\> - -The ID of the window. - -### getCurrentWindowId() - -```ts -getCurrentWindowId(): Promise -``` - -Get the current window ID. - -###### Returns - -`Promise`\<`string`\> - -The ID of the current window. - -### getCursorPosition() - -```ts -getCursorPosition(): Promise -``` - -Get the current cursor position. - -###### Returns - -`Promise`\<`CursorPosition`\> - -A object with the x and y coordinates - -###### Throws - -Error if cursor position cannot be determined - -### getScreenSize() - -```ts -getScreenSize(): Promise -``` - -Get the current screen size. - -###### Returns - -`Promise`\<`ScreenSize`\> - -An ScreenSize object - -###### Throws - -Error if screen size cannot be determined - -### getWindowTitle() - -```ts -getWindowTitle(windowId: string): Promise -``` - -Get the title of the window with the given ID. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `windowId` | `string` | The ID of the window. | - -###### Returns - -`Promise`\<`string`\> - -The title of the window. - -### leftClick() - -```ts -leftClick(x?: number, y?: number): Promise -``` - -Left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### middleClick() - -```ts -middleClick(x?: number, y?: number): Promise -``` - -Middle click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### mousePress() - -```ts -mousePress(button: "left" | "right" | "middle"): Promise -``` - -Press the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### mouseRelease() - -```ts -mouseRelease(button: "left" | "right" | "middle"): Promise -``` - -Release the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### moveMouse() - -```ts -moveMouse(x: number, y: number): Promise -``` - -Move the mouse to the given coordinates. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `x` | `number` | The x coordinate. | -| `y` | `number` | The y coordinate. | - -###### Returns - -`Promise`\<`void`\> - -### open() - -```ts -open(fileOrUrl: string): Promise -``` - -Open a file or a URL in the default application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `fileOrUrl` | `string` | The file or URL to open. | - -###### Returns - -`Promise`\<`void`\> - -### press() - -```ts -press(key: string | string[]): Promise -``` - -Press a key. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `key` | `string` \| `string`[] | The key to press (e.g. "enter", "space", "backspace", etc.). Can be a single key or an array of keys. | - -###### Returns - -`Promise`\<`void`\> - -### rightClick() - -```ts -rightClick(x?: number, y?: number): Promise -``` - -Right click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### screenshot() - -###### screenshot() - -```ts -screenshot(): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "bytes"): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `format` | `"bytes"` | The format of the screenshot. | - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "blob"): Promise -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"blob"` | - -###### Returns - -`Promise`\<`Blob`\> - -A Blob representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "stream"): Promise>> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"stream"` | - -###### Returns - -`Promise`\<`ReadableStream`\<`Uint8Array`\<`ArrayBufferLike`\>\>\> - -A ReadableStream of bytes representation of the screenshot. - -### scroll() - -```ts -scroll(direction: "down" | "up", amount: number): Promise -``` - -Scroll the mouse wheel by the given amount. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `direction` | `"down"` \| `"up"` | `'down'` | The direction to scroll. Can be "up" or "down". | -| `amount` | `number` | `1` | The amount to scroll. | - -###### Returns - -`Promise`\<`void`\> - -### wait() - -```ts -wait(ms: number): Promise -``` - -Wait for the given amount of time. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `ms` | `number` | The amount of time to wait in milliseconds. | - -###### Returns - -`Promise`\<`void`\> - -### waitAndVerify() - -```ts -waitAndVerify( - cmd: string, - onResult: (result: CommandResult) => boolean, - timeout: number, -interval: number): Promise -``` - -Wait for a command to return a specific result. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `cmd` | `string` | `undefined` | The command to run. | -| `onResult` | (`result`: `CommandResult`) => `boolean` | `undefined` | The function to check the result of the command. | -| `timeout` | `number` | `10` | The maximum time to wait for the command to return the result. | -| `interval` | `number` | `0.5` | The interval to wait between checks. | - -###### Returns - -`Promise`\<`boolean`\> - -`true` if the command returned the result within the timeout, otherwise `false`. - -### write() - -```ts -write(text: string, options: object): Promise -``` - -Write the given text at the current cursor position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `text` | `string` | The text to write. | -| `options` | `object` | An object containing the chunk size and delay between each chunk of text. | -| `options.chunkSize` | `number` | The size of each chunk of text to write. Default is 25 characters. | -| `options.delayInMs` | `number` | The delay between each chunk of text. Default is 75 ms. | - -###### Returns - -`Promise`\<`void`\> - -### create() - -###### create(this, opts) - -```ts -static create(this: S, opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -###### create(this, template, opts) - -```ts -static create( - this: S, - template: string, -opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -## Interfaces - -### SandboxOpts - -Configuration options for the Sandbox environment. - SandboxOpts - -#### Properties - -### display? - -```ts -optional display: string; -``` - -Display identifier. - -### dpi? - -```ts -optional dpi: number; -``` - -Dots per inch (DPI) setting for the display. - -### resolution? - -```ts -optional resolution: [number, number]; -``` - -The screen resolution in pixels, specified as [width, height]. diff --git a/sdk-reference/desktop-js-sdk/v1.8.1/sandbox/page.mdx b/sdk-reference/desktop-js-sdk/v1.8.1/sandbox/page.mdx deleted file mode 100644 index f0373ac..0000000 --- a/sdk-reference/desktop-js-sdk/v1.8.1/sandbox/page.mdx +++ /dev/null @@ -1,560 +0,0 @@ -### Sandbox - -#### Properties - -| Property | Modifier | Type | Default value | -| ------ | ------ | ------ | ------ | -| `display` | `public` | `string` | `':0'` | -| `stream` | `public` | `VNCServer` | `undefined` | - -#### Methods - -### doubleClick() - -```ts -doubleClick(x?: number, y?: number): Promise -``` - -Double left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### drag() - -```ts -drag(from: [number, number], to: [number, number]): Promise -``` - -Drag the mouse from the given position to the given position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `from` | [`number`, `number`] | The starting position. | -| `to` | [`number`, `number`] | The ending position. | - -###### Returns - -`Promise`\<`void`\> - -### getApplicationWindows() - -```ts -getApplicationWindows(application: string): Promise -``` - -Get the window ID of the window with the given title. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `application` | `string` | - -###### Returns - -`Promise`\<`string`[]\> - -The ID of the window. - -### getCurrentWindowId() - -```ts -getCurrentWindowId(): Promise -``` - -Get the current window ID. - -###### Returns - -`Promise`\<`string`\> - -The ID of the current window. - -### getCursorPosition() - -```ts -getCursorPosition(): Promise -``` - -Get the current cursor position. - -###### Returns - -`Promise`\<`CursorPosition`\> - -A object with the x and y coordinates - -###### Throws - -Error if cursor position cannot be determined - -### getScreenSize() - -```ts -getScreenSize(): Promise -``` - -Get the current screen size. - -###### Returns - -`Promise`\<`ScreenSize`\> - -An ScreenSize object - -###### Throws - -Error if screen size cannot be determined - -### getWindowTitle() - -```ts -getWindowTitle(windowId: string): Promise -``` - -Get the title of the window with the given ID. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `windowId` | `string` | The ID of the window. | - -###### Returns - -`Promise`\<`string`\> - -The title of the window. - -### leftClick() - -```ts -leftClick(x?: number, y?: number): Promise -``` - -Left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### middleClick() - -```ts -middleClick(x?: number, y?: number): Promise -``` - -Middle click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### mousePress() - -```ts -mousePress(button: "left" | "right" | "middle"): Promise -``` - -Press the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### mouseRelease() - -```ts -mouseRelease(button: "left" | "right" | "middle"): Promise -``` - -Release the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### moveMouse() - -```ts -moveMouse(x: number, y: number): Promise -``` - -Move the mouse to the given coordinates. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `x` | `number` | The x coordinate. | -| `y` | `number` | The y coordinate. | - -###### Returns - -`Promise`\<`void`\> - -### open() - -```ts -open(fileOrUrl: string): Promise -``` - -Open a file or a URL in the default application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `fileOrUrl` | `string` | The file or URL to open. | - -###### Returns - -`Promise`\<`void`\> - -### press() - -```ts -press(key: string | string[]): Promise -``` - -Press a key. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `key` | `string` \| `string`[] | The key to press (e.g. "enter", "space", "backspace", etc.). Can be a single key or an array of keys. | - -###### Returns - -`Promise`\<`void`\> - -### rightClick() - -```ts -rightClick(x?: number, y?: number): Promise -``` - -Right click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### screenshot() - -###### screenshot() - -```ts -screenshot(): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "bytes"): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `format` | `"bytes"` | The format of the screenshot. | - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "blob"): Promise -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"blob"` | - -###### Returns - -`Promise`\<`Blob`\> - -A Blob representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "stream"): Promise>> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"stream"` | - -###### Returns - -`Promise`\<`ReadableStream`\<`Uint8Array`\<`ArrayBufferLike`\>\>\> - -A ReadableStream of bytes representation of the screenshot. - -### scroll() - -```ts -scroll(direction: "down" | "up", amount: number): Promise -``` - -Scroll the mouse wheel by the given amount. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `direction` | `"down"` \| `"up"` | `'down'` | The direction to scroll. Can be "up" or "down". | -| `amount` | `number` | `1` | The amount to scroll. | - -###### Returns - -`Promise`\<`void`\> - -### wait() - -```ts -wait(ms: number): Promise -``` - -Wait for the given amount of time. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `ms` | `number` | The amount of time to wait in milliseconds. | - -###### Returns - -`Promise`\<`void`\> - -### waitAndVerify() - -```ts -waitAndVerify( - cmd: string, - onResult: (result: CommandResult) => boolean, - timeout: number, -interval: number): Promise -``` - -Wait for a command to return a specific result. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `cmd` | `string` | `undefined` | The command to run. | -| `onResult` | (`result`: `CommandResult`) => `boolean` | `undefined` | The function to check the result of the command. | -| `timeout` | `number` | `10` | The maximum time to wait for the command to return the result. | -| `interval` | `number` | `0.5` | The interval to wait between checks. | - -###### Returns - -`Promise`\<`boolean`\> - -`true` if the command returned the result within the timeout, otherwise `false`. - -### write() - -```ts -write(text: string, options: object): Promise -``` - -Write the given text at the current cursor position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `text` | `string` | The text to write. | -| `options` | `object` | An object containing the chunk size and delay between each chunk of text. | -| `options.chunkSize` | `number` | The size of each chunk of text to write. Default is 25 characters. | -| `options.delayInMs` | `number` | The delay between each chunk of text. Default is 75 ms. | - -###### Returns - -`Promise`\<`void`\> - -### create() - -###### create(this, opts) - -```ts -static create(this: S, opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -###### create(this, template, opts) - -```ts -static create( - this: S, - template: string, -opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -## Interfaces - -### SandboxOpts - -Configuration options for the Sandbox environment. - SandboxOpts - -#### Properties - -### display? - -```ts -optional display: string; -``` - -Display identifier. - -### dpi? - -```ts -optional dpi: number; -``` - -Dots per inch (DPI) setting for the display. - -### resolution? - -```ts -optional resolution: [number, number]; -``` - -The screen resolution in pixels, specified as [width, height]. diff --git a/sdk-reference/desktop-js-sdk/v1.9.0/sandbox/page.mdx b/sdk-reference/desktop-js-sdk/v1.9.0/sandbox/page.mdx deleted file mode 100644 index 896ddd5..0000000 --- a/sdk-reference/desktop-js-sdk/v1.9.0/sandbox/page.mdx +++ /dev/null @@ -1,579 +0,0 @@ -### Sandbox - -#### Properties - -| Property | Modifier | Type | Default value | -| ------ | ------ | ------ | ------ | -| `display` | `public` | `string` | `':0'` | -| `stream` | `public` | `VNCServer` | `undefined` | - -#### Methods - -### doubleClick() - -```ts -doubleClick(x?: number, y?: number): Promise -``` - -Double left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### drag() - -```ts -drag(from: [number, number], to: [number, number]): Promise -``` - -Drag the mouse from the given position to the given position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `from` | [`number`, `number`] | The starting position. | -| `to` | [`number`, `number`] | The ending position. | - -###### Returns - -`Promise`\<`void`\> - -### getApplicationWindows() - -```ts -getApplicationWindows(application: string): Promise -``` - -Get the window ID of the window with the given title. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `application` | `string` | - -###### Returns - -`Promise`\<`string`[]\> - -The ID of the window. - -### getCurrentWindowId() - -```ts -getCurrentWindowId(): Promise -``` - -Get the current window ID. - -###### Returns - -`Promise`\<`string`\> - -The ID of the current window. - -### getCursorPosition() - -```ts -getCursorPosition(): Promise -``` - -Get the current cursor position. - -###### Returns - -`Promise`\<`CursorPosition`\> - -A object with the x and y coordinates - -###### Throws - -Error if cursor position cannot be determined - -### getScreenSize() - -```ts -getScreenSize(): Promise -``` - -Get the current screen size. - -###### Returns - -`Promise`\<`ScreenSize`\> - -An ScreenSize object - -###### Throws - -Error if screen size cannot be determined - -### getWindowTitle() - -```ts -getWindowTitle(windowId: string): Promise -``` - -Get the title of the window with the given ID. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `windowId` | `string` | The ID of the window. | - -###### Returns - -`Promise`\<`string`\> - -The title of the window. - -### launch() - -```ts -launch(application: string, uri?: string): Promise -``` - -Launch an application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `application` | `string` | The application to launch. | -| `uri`? | `string` | The URI to open in the application. | - -###### Returns - -`Promise`\<`void`\> - -### leftClick() - -```ts -leftClick(x?: number, y?: number): Promise -``` - -Left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### middleClick() - -```ts -middleClick(x?: number, y?: number): Promise -``` - -Middle click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### mousePress() - -```ts -mousePress(button: "left" | "right" | "middle"): Promise -``` - -Press the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### mouseRelease() - -```ts -mouseRelease(button: "left" | "right" | "middle"): Promise -``` - -Release the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### moveMouse() - -```ts -moveMouse(x: number, y: number): Promise -``` - -Move the mouse to the given coordinates. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `x` | `number` | The x coordinate. | -| `y` | `number` | The y coordinate. | - -###### Returns - -`Promise`\<`void`\> - -### open() - -```ts -open(fileOrUrl: string): Promise -``` - -Open a file or a URL in the default application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `fileOrUrl` | `string` | The file or URL to open. | - -###### Returns - -`Promise`\<`void`\> - -### press() - -```ts -press(key: string | string[]): Promise -``` - -Press a key. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `key` | `string` \| `string`[] | The key to press (e.g. "enter", "space", "backspace", etc.). Can be a single key or an array of keys. | - -###### Returns - -`Promise`\<`void`\> - -### rightClick() - -```ts -rightClick(x?: number, y?: number): Promise -``` - -Right click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### screenshot() - -###### screenshot() - -```ts -screenshot(): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "bytes"): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `format` | `"bytes"` | The format of the screenshot. | - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "blob"): Promise -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"blob"` | - -###### Returns - -`Promise`\<`Blob`\> - -A Blob representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "stream"): Promise>> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"stream"` | - -###### Returns - -`Promise`\<`ReadableStream`\<`Uint8Array`\<`ArrayBufferLike`\>\>\> - -A ReadableStream of bytes representation of the screenshot. - -### scroll() - -```ts -scroll(direction: "down" | "up", amount: number): Promise -``` - -Scroll the mouse wheel by the given amount. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `direction` | `"down"` \| `"up"` | `'down'` | The direction to scroll. Can be "up" or "down". | -| `amount` | `number` | `1` | The amount to scroll. | - -###### Returns - -`Promise`\<`void`\> - -### wait() - -```ts -wait(ms: number): Promise -``` - -Wait for the given amount of time. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `ms` | `number` | The amount of time to wait in milliseconds. | - -###### Returns - -`Promise`\<`void`\> - -### waitAndVerify() - -```ts -waitAndVerify( - cmd: string, - onResult: (result: CommandResult) => boolean, - timeout: number, -interval: number): Promise -``` - -Wait for a command to return a specific result. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `cmd` | `string` | `undefined` | The command to run. | -| `onResult` | (`result`: `CommandResult`) => `boolean` | `undefined` | The function to check the result of the command. | -| `timeout` | `number` | `10` | The maximum time to wait for the command to return the result. | -| `interval` | `number` | `0.5` | The interval to wait between checks. | - -###### Returns - -`Promise`\<`boolean`\> - -`true` if the command returned the result within the timeout, otherwise `false`. - -### write() - -```ts -write(text: string, options: object): Promise -``` - -Write the given text at the current cursor position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `text` | `string` | The text to write. | -| `options` | `object` | An object containing the chunk size and delay between each chunk of text. | -| `options.chunkSize` | `number` | The size of each chunk of text to write. Default is 25 characters. | -| `options.delayInMs` | `number` | The delay between each chunk of text. Default is 75 ms. | - -###### Returns - -`Promise`\<`void`\> - -### create() - -###### create(this, opts) - -```ts -static create(this: S, opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -###### create(this, template, opts) - -```ts -static create( - this: S, - template: string, -opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -## Interfaces - -### SandboxOpts - -Configuration options for the Sandbox environment. - SandboxOpts - -#### Properties - -### display? - -```ts -optional display: string; -``` - -Display identifier. - -### dpi? - -```ts -optional dpi: number; -``` - -Dots per inch (DPI) setting for the display. - -### resolution? - -```ts -optional resolution: [number, number]; -``` - -The screen resolution in pixels, specified as [width, height]. diff --git a/sdk-reference/desktop-js-sdk/v1.9.1/sandbox/page.mdx b/sdk-reference/desktop-js-sdk/v1.9.1/sandbox/page.mdx deleted file mode 100644 index 896ddd5..0000000 --- a/sdk-reference/desktop-js-sdk/v1.9.1/sandbox/page.mdx +++ /dev/null @@ -1,579 +0,0 @@ -### Sandbox - -#### Properties - -| Property | Modifier | Type | Default value | -| ------ | ------ | ------ | ------ | -| `display` | `public` | `string` | `':0'` | -| `stream` | `public` | `VNCServer` | `undefined` | - -#### Methods - -### doubleClick() - -```ts -doubleClick(x?: number, y?: number): Promise -``` - -Double left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### drag() - -```ts -drag(from: [number, number], to: [number, number]): Promise -``` - -Drag the mouse from the given position to the given position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `from` | [`number`, `number`] | The starting position. | -| `to` | [`number`, `number`] | The ending position. | - -###### Returns - -`Promise`\<`void`\> - -### getApplicationWindows() - -```ts -getApplicationWindows(application: string): Promise -``` - -Get the window ID of the window with the given title. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `application` | `string` | - -###### Returns - -`Promise`\<`string`[]\> - -The ID of the window. - -### getCurrentWindowId() - -```ts -getCurrentWindowId(): Promise -``` - -Get the current window ID. - -###### Returns - -`Promise`\<`string`\> - -The ID of the current window. - -### getCursorPosition() - -```ts -getCursorPosition(): Promise -``` - -Get the current cursor position. - -###### Returns - -`Promise`\<`CursorPosition`\> - -A object with the x and y coordinates - -###### Throws - -Error if cursor position cannot be determined - -### getScreenSize() - -```ts -getScreenSize(): Promise -``` - -Get the current screen size. - -###### Returns - -`Promise`\<`ScreenSize`\> - -An ScreenSize object - -###### Throws - -Error if screen size cannot be determined - -### getWindowTitle() - -```ts -getWindowTitle(windowId: string): Promise -``` - -Get the title of the window with the given ID. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `windowId` | `string` | The ID of the window. | - -###### Returns - -`Promise`\<`string`\> - -The title of the window. - -### launch() - -```ts -launch(application: string, uri?: string): Promise -``` - -Launch an application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `application` | `string` | The application to launch. | -| `uri`? | `string` | The URI to open in the application. | - -###### Returns - -`Promise`\<`void`\> - -### leftClick() - -```ts -leftClick(x?: number, y?: number): Promise -``` - -Left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### middleClick() - -```ts -middleClick(x?: number, y?: number): Promise -``` - -Middle click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### mousePress() - -```ts -mousePress(button: "left" | "right" | "middle"): Promise -``` - -Press the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### mouseRelease() - -```ts -mouseRelease(button: "left" | "right" | "middle"): Promise -``` - -Release the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### moveMouse() - -```ts -moveMouse(x: number, y: number): Promise -``` - -Move the mouse to the given coordinates. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `x` | `number` | The x coordinate. | -| `y` | `number` | The y coordinate. | - -###### Returns - -`Promise`\<`void`\> - -### open() - -```ts -open(fileOrUrl: string): Promise -``` - -Open a file or a URL in the default application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `fileOrUrl` | `string` | The file or URL to open. | - -###### Returns - -`Promise`\<`void`\> - -### press() - -```ts -press(key: string | string[]): Promise -``` - -Press a key. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `key` | `string` \| `string`[] | The key to press (e.g. "enter", "space", "backspace", etc.). Can be a single key or an array of keys. | - -###### Returns - -`Promise`\<`void`\> - -### rightClick() - -```ts -rightClick(x?: number, y?: number): Promise -``` - -Right click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### screenshot() - -###### screenshot() - -```ts -screenshot(): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "bytes"): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `format` | `"bytes"` | The format of the screenshot. | - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "blob"): Promise -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"blob"` | - -###### Returns - -`Promise`\<`Blob`\> - -A Blob representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "stream"): Promise>> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"stream"` | - -###### Returns - -`Promise`\<`ReadableStream`\<`Uint8Array`\<`ArrayBufferLike`\>\>\> - -A ReadableStream of bytes representation of the screenshot. - -### scroll() - -```ts -scroll(direction: "down" | "up", amount: number): Promise -``` - -Scroll the mouse wheel by the given amount. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `direction` | `"down"` \| `"up"` | `'down'` | The direction to scroll. Can be "up" or "down". | -| `amount` | `number` | `1` | The amount to scroll. | - -###### Returns - -`Promise`\<`void`\> - -### wait() - -```ts -wait(ms: number): Promise -``` - -Wait for the given amount of time. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `ms` | `number` | The amount of time to wait in milliseconds. | - -###### Returns - -`Promise`\<`void`\> - -### waitAndVerify() - -```ts -waitAndVerify( - cmd: string, - onResult: (result: CommandResult) => boolean, - timeout: number, -interval: number): Promise -``` - -Wait for a command to return a specific result. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `cmd` | `string` | `undefined` | The command to run. | -| `onResult` | (`result`: `CommandResult`) => `boolean` | `undefined` | The function to check the result of the command. | -| `timeout` | `number` | `10` | The maximum time to wait for the command to return the result. | -| `interval` | `number` | `0.5` | The interval to wait between checks. | - -###### Returns - -`Promise`\<`boolean`\> - -`true` if the command returned the result within the timeout, otherwise `false`. - -### write() - -```ts -write(text: string, options: object): Promise -``` - -Write the given text at the current cursor position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `text` | `string` | The text to write. | -| `options` | `object` | An object containing the chunk size and delay between each chunk of text. | -| `options.chunkSize` | `number` | The size of each chunk of text to write. Default is 25 characters. | -| `options.delayInMs` | `number` | The delay between each chunk of text. Default is 75 ms. | - -###### Returns - -`Promise`\<`void`\> - -### create() - -###### create(this, opts) - -```ts -static create(this: S, opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -###### create(this, template, opts) - -```ts -static create( - this: S, - template: string, -opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -## Interfaces - -### SandboxOpts - -Configuration options for the Sandbox environment. - SandboxOpts - -#### Properties - -### display? - -```ts -optional display: string; -``` - -Display identifier. - -### dpi? - -```ts -optional dpi: number; -``` - -Dots per inch (DPI) setting for the display. - -### resolution? - -```ts -optional resolution: [number, number]; -``` - -The screen resolution in pixels, specified as [width, height]. diff --git a/sdk-reference/desktop-js-sdk/v1.9.2/sandbox/page.mdx b/sdk-reference/desktop-js-sdk/v1.9.2/sandbox/page.mdx deleted file mode 100644 index 896ddd5..0000000 --- a/sdk-reference/desktop-js-sdk/v1.9.2/sandbox/page.mdx +++ /dev/null @@ -1,579 +0,0 @@ -### Sandbox - -#### Properties - -| Property | Modifier | Type | Default value | -| ------ | ------ | ------ | ------ | -| `display` | `public` | `string` | `':0'` | -| `stream` | `public` | `VNCServer` | `undefined` | - -#### Methods - -### doubleClick() - -```ts -doubleClick(x?: number, y?: number): Promise -``` - -Double left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### drag() - -```ts -drag(from: [number, number], to: [number, number]): Promise -``` - -Drag the mouse from the given position to the given position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `from` | [`number`, `number`] | The starting position. | -| `to` | [`number`, `number`] | The ending position. | - -###### Returns - -`Promise`\<`void`\> - -### getApplicationWindows() - -```ts -getApplicationWindows(application: string): Promise -``` - -Get the window ID of the window with the given title. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `application` | `string` | - -###### Returns - -`Promise`\<`string`[]\> - -The ID of the window. - -### getCurrentWindowId() - -```ts -getCurrentWindowId(): Promise -``` - -Get the current window ID. - -###### Returns - -`Promise`\<`string`\> - -The ID of the current window. - -### getCursorPosition() - -```ts -getCursorPosition(): Promise -``` - -Get the current cursor position. - -###### Returns - -`Promise`\<`CursorPosition`\> - -A object with the x and y coordinates - -###### Throws - -Error if cursor position cannot be determined - -### getScreenSize() - -```ts -getScreenSize(): Promise -``` - -Get the current screen size. - -###### Returns - -`Promise`\<`ScreenSize`\> - -An ScreenSize object - -###### Throws - -Error if screen size cannot be determined - -### getWindowTitle() - -```ts -getWindowTitle(windowId: string): Promise -``` - -Get the title of the window with the given ID. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `windowId` | `string` | The ID of the window. | - -###### Returns - -`Promise`\<`string`\> - -The title of the window. - -### launch() - -```ts -launch(application: string, uri?: string): Promise -``` - -Launch an application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `application` | `string` | The application to launch. | -| `uri`? | `string` | The URI to open in the application. | - -###### Returns - -`Promise`\<`void`\> - -### leftClick() - -```ts -leftClick(x?: number, y?: number): Promise -``` - -Left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### middleClick() - -```ts -middleClick(x?: number, y?: number): Promise -``` - -Middle click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### mousePress() - -```ts -mousePress(button: "left" | "right" | "middle"): Promise -``` - -Press the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### mouseRelease() - -```ts -mouseRelease(button: "left" | "right" | "middle"): Promise -``` - -Release the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### moveMouse() - -```ts -moveMouse(x: number, y: number): Promise -``` - -Move the mouse to the given coordinates. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `x` | `number` | The x coordinate. | -| `y` | `number` | The y coordinate. | - -###### Returns - -`Promise`\<`void`\> - -### open() - -```ts -open(fileOrUrl: string): Promise -``` - -Open a file or a URL in the default application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `fileOrUrl` | `string` | The file or URL to open. | - -###### Returns - -`Promise`\<`void`\> - -### press() - -```ts -press(key: string | string[]): Promise -``` - -Press a key. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `key` | `string` \| `string`[] | The key to press (e.g. "enter", "space", "backspace", etc.). Can be a single key or an array of keys. | - -###### Returns - -`Promise`\<`void`\> - -### rightClick() - -```ts -rightClick(x?: number, y?: number): Promise -``` - -Right click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### screenshot() - -###### screenshot() - -```ts -screenshot(): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "bytes"): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `format` | `"bytes"` | The format of the screenshot. | - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "blob"): Promise -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"blob"` | - -###### Returns - -`Promise`\<`Blob`\> - -A Blob representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "stream"): Promise>> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"stream"` | - -###### Returns - -`Promise`\<`ReadableStream`\<`Uint8Array`\<`ArrayBufferLike`\>\>\> - -A ReadableStream of bytes representation of the screenshot. - -### scroll() - -```ts -scroll(direction: "down" | "up", amount: number): Promise -``` - -Scroll the mouse wheel by the given amount. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `direction` | `"down"` \| `"up"` | `'down'` | The direction to scroll. Can be "up" or "down". | -| `amount` | `number` | `1` | The amount to scroll. | - -###### Returns - -`Promise`\<`void`\> - -### wait() - -```ts -wait(ms: number): Promise -``` - -Wait for the given amount of time. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `ms` | `number` | The amount of time to wait in milliseconds. | - -###### Returns - -`Promise`\<`void`\> - -### waitAndVerify() - -```ts -waitAndVerify( - cmd: string, - onResult: (result: CommandResult) => boolean, - timeout: number, -interval: number): Promise -``` - -Wait for a command to return a specific result. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `cmd` | `string` | `undefined` | The command to run. | -| `onResult` | (`result`: `CommandResult`) => `boolean` | `undefined` | The function to check the result of the command. | -| `timeout` | `number` | `10` | The maximum time to wait for the command to return the result. | -| `interval` | `number` | `0.5` | The interval to wait between checks. | - -###### Returns - -`Promise`\<`boolean`\> - -`true` if the command returned the result within the timeout, otherwise `false`. - -### write() - -```ts -write(text: string, options: object): Promise -``` - -Write the given text at the current cursor position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `text` | `string` | The text to write. | -| `options` | `object` | An object containing the chunk size and delay between each chunk of text. | -| `options.chunkSize` | `number` | The size of each chunk of text to write. Default is 25 characters. | -| `options.delayInMs` | `number` | The delay between each chunk of text. Default is 75 ms. | - -###### Returns - -`Promise`\<`void`\> - -### create() - -###### create(this, opts) - -```ts -static create(this: S, opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -###### create(this, template, opts) - -```ts -static create( - this: S, - template: string, -opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -## Interfaces - -### SandboxOpts - -Configuration options for the Sandbox environment. - SandboxOpts - -#### Properties - -### display? - -```ts -optional display: string; -``` - -Display identifier. - -### dpi? - -```ts -optional dpi: number; -``` - -Dots per inch (DPI) setting for the display. - -### resolution? - -```ts -optional resolution: [number, number]; -``` - -The screen resolution in pixels, specified as [width, height]. diff --git a/sdk-reference/desktop-js-sdk/v2.0.0/sandbox/page.mdx b/sdk-reference/desktop-js-sdk/v2.0.0/sandbox/page.mdx deleted file mode 100644 index e67cc1d..0000000 --- a/sdk-reference/desktop-js-sdk/v2.0.0/sandbox/page.mdx +++ /dev/null @@ -1,692 +0,0 @@ -### Sandbox - -#### Properties - -| Property | Modifier | Type | Default value | -| ------ | ------ | ------ | ------ | -| `display` | `public` | `string` | `':0'` | -| `stream` | `public` | `VNCServer` | `undefined` | - -#### Methods - -### doubleClick() - -```ts -doubleClick(x?: number, y?: number): Promise -``` - -Double left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### drag() - -```ts -drag(from: [number, number], to: [number, number]): Promise -``` - -Drag the mouse from the given position to the given position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `from` | [`number`, `number`] | The starting position. | -| `to` | [`number`, `number`] | The ending position. | - -###### Returns - -`Promise`\<`void`\> - -### getApplicationWindows() - -```ts -getApplicationWindows(application: string): Promise -``` - -Get the window ID of the window with the given title. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `application` | `string` | - -###### Returns - -`Promise`\<`string`[]\> - -The ID of the window. - -### getCurrentWindowId() - -```ts -getCurrentWindowId(): Promise -``` - -Get the current window ID. - -###### Returns - -`Promise`\<`string`\> - -The ID of the current window. - -### getCursorPosition() - -```ts -getCursorPosition(): Promise -``` - -Get the current cursor position. - -###### Returns - -`Promise`\<`CursorPosition`\> - -A object with the x and y coordinates - -###### Throws - -Error if cursor position cannot be determined - -### getScreenSize() - -```ts -getScreenSize(): Promise -``` - -Get the current screen size. - -###### Returns - -`Promise`\<`ScreenSize`\> - -An ScreenSize object - -###### Throws - -Error if screen size cannot be determined - -### getWindowTitle() - -```ts -getWindowTitle(windowId: string): Promise -``` - -Get the title of the window with the given ID. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `windowId` | `string` | The ID of the window. | - -###### Returns - -`Promise`\<`string`\> - -The title of the window. - -### launch() - -```ts -launch(application: string, uri?: string): Promise -``` - -Launch an application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `application` | `string` | The application to launch. | -| `uri`? | `string` | The URI to open in the application. | - -###### Returns - -`Promise`\<`void`\> - -### leftClick() - -```ts -leftClick(x?: number, y?: number): Promise -``` - -Left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### middleClick() - -```ts -middleClick(x?: number, y?: number): Promise -``` - -Middle click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### mousePress() - -```ts -mousePress(button: "left" | "right" | "middle"): Promise -``` - -Press the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### mouseRelease() - -```ts -mouseRelease(button: "left" | "right" | "middle"): Promise -``` - -Release the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### moveMouse() - -```ts -moveMouse(x: number, y: number): Promise -``` - -Move the mouse to the given coordinates. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `x` | `number` | The x coordinate. | -| `y` | `number` | The y coordinate. | - -###### Returns - -`Promise`\<`void`\> - -### open() - -```ts -open(fileOrUrl: string): Promise -``` - -Open a file or a URL in the default application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `fileOrUrl` | `string` | The file or URL to open. | - -###### Returns - -`Promise`\<`void`\> - -### press() - -```ts -press(key: string | string[]): Promise -``` - -Press a key. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `key` | `string` \| `string`[] | The key to press (e.g. "enter", "space", "backspace", etc.). Can be a single key or an array of keys. | - -###### Returns - -`Promise`\<`void`\> - -### rightClick() - -```ts -rightClick(x?: number, y?: number): Promise -``` - -Right click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### screenshot() - -###### screenshot() - -```ts -screenshot(): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "bytes"): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `format` | `"bytes"` | The format of the screenshot. | - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "blob"): Promise -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"blob"` | - -###### Returns - -`Promise`\<`Blob`\> - -A Blob representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "stream"): Promise>> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"stream"` | - -###### Returns - -`Promise`\<`ReadableStream`\<`Uint8Array`\<`ArrayBufferLike`\>\>\> - -A ReadableStream of bytes representation of the screenshot. - -### scroll() - -```ts -scroll(direction: "down" | "up", amount: number): Promise -``` - -Scroll the mouse wheel by the given amount. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `direction` | `"down"` \| `"up"` | `'down'` | The direction to scroll. Can be "up" or "down". | -| `amount` | `number` | `1` | The amount to scroll. | - -###### Returns - -`Promise`\<`void`\> - -### wait() - -```ts -wait(ms: number): Promise -``` - -Wait for the given amount of time. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `ms` | `number` | The amount of time to wait in milliseconds. | - -###### Returns - -`Promise`\<`void`\> - -### waitAndVerify() - -```ts -waitAndVerify( - cmd: string, - onResult: (result: CommandResult) => boolean, - timeout: number, -interval: number): Promise -``` - -Wait for a command to return a specific result. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `cmd` | `string` | `undefined` | The command to run. | -| `onResult` | (`result`: `CommandResult`) => `boolean` | `undefined` | The function to check the result of the command. | -| `timeout` | `number` | `10` | The maximum time to wait for the command to return the result. | -| `interval` | `number` | `0.5` | The interval to wait between checks. | - -###### Returns - -`Promise`\<`boolean`\> - -`true` if the command returned the result within the timeout, otherwise `false`. - -### write() - -```ts -write(text: string, options: object): Promise -``` - -Write the given text at the current cursor position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `text` | `string` | The text to write. | -| `options` | `object` | An object containing the chunk size and delay between each chunk of text. | -| `options.chunkSize` | `number` | The size of each chunk of text to write. Default is 25 characters. | -| `options.delayInMs` | `number` | The delay between each chunk of text. Default is 75 ms. | - -###### Returns - -`Promise`\<`void`\> - -### betaCreate() - -###### betaCreate(this, opts) - -```ts -static betaCreate(this: S, opts?: SandboxBetaCreateOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxBetaCreateOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -###### betaCreate(this, template, opts) - -```ts -static betaCreate( - this: S, - template: string, -opts?: SandboxBetaCreateOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxBetaCreateOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -### create() - -###### create(this, opts) - -```ts -static create(this: S, opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -###### create(this, template, opts) - -```ts -static create( - this: S, - template: string, -opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -## Interfaces - -### SandboxBetaCreateOpts - -Configuration options for the Sandbox environment. - SandboxOpts - -#### Properties - -### display? - -```ts -optional display: string; -``` - -Display identifier. - -### dpi? - -```ts -optional dpi: number; -``` - -Dots per inch (DPI) setting for the display. - -### resolution? - -```ts -optional resolution: [number, number]; -``` - -The screen resolution in pixels, specified as [width, height]. - -*** - -### SandboxOpts - -Configuration options for the Sandbox environment. - SandboxOpts - -#### Properties - -### display? - -```ts -optional display: string; -``` - -Display identifier. - -### dpi? - -```ts -optional dpi: number; -``` - -Dots per inch (DPI) setting for the display. - -### resolution? - -```ts -optional resolution: [number, number]; -``` - -The screen resolution in pixels, specified as [width, height]. diff --git a/sdk-reference/desktop-js-sdk/v2.0.1/sandbox/page.mdx b/sdk-reference/desktop-js-sdk/v2.0.1/sandbox/page.mdx deleted file mode 100644 index e67cc1d..0000000 --- a/sdk-reference/desktop-js-sdk/v2.0.1/sandbox/page.mdx +++ /dev/null @@ -1,692 +0,0 @@ -### Sandbox - -#### Properties - -| Property | Modifier | Type | Default value | -| ------ | ------ | ------ | ------ | -| `display` | `public` | `string` | `':0'` | -| `stream` | `public` | `VNCServer` | `undefined` | - -#### Methods - -### doubleClick() - -```ts -doubleClick(x?: number, y?: number): Promise -``` - -Double left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### drag() - -```ts -drag(from: [number, number], to: [number, number]): Promise -``` - -Drag the mouse from the given position to the given position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `from` | [`number`, `number`] | The starting position. | -| `to` | [`number`, `number`] | The ending position. | - -###### Returns - -`Promise`\<`void`\> - -### getApplicationWindows() - -```ts -getApplicationWindows(application: string): Promise -``` - -Get the window ID of the window with the given title. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `application` | `string` | - -###### Returns - -`Promise`\<`string`[]\> - -The ID of the window. - -### getCurrentWindowId() - -```ts -getCurrentWindowId(): Promise -``` - -Get the current window ID. - -###### Returns - -`Promise`\<`string`\> - -The ID of the current window. - -### getCursorPosition() - -```ts -getCursorPosition(): Promise -``` - -Get the current cursor position. - -###### Returns - -`Promise`\<`CursorPosition`\> - -A object with the x and y coordinates - -###### Throws - -Error if cursor position cannot be determined - -### getScreenSize() - -```ts -getScreenSize(): Promise -``` - -Get the current screen size. - -###### Returns - -`Promise`\<`ScreenSize`\> - -An ScreenSize object - -###### Throws - -Error if screen size cannot be determined - -### getWindowTitle() - -```ts -getWindowTitle(windowId: string): Promise -``` - -Get the title of the window with the given ID. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `windowId` | `string` | The ID of the window. | - -###### Returns - -`Promise`\<`string`\> - -The title of the window. - -### launch() - -```ts -launch(application: string, uri?: string): Promise -``` - -Launch an application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `application` | `string` | The application to launch. | -| `uri`? | `string` | The URI to open in the application. | - -###### Returns - -`Promise`\<`void`\> - -### leftClick() - -```ts -leftClick(x?: number, y?: number): Promise -``` - -Left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### middleClick() - -```ts -middleClick(x?: number, y?: number): Promise -``` - -Middle click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### mousePress() - -```ts -mousePress(button: "left" | "right" | "middle"): Promise -``` - -Press the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### mouseRelease() - -```ts -mouseRelease(button: "left" | "right" | "middle"): Promise -``` - -Release the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### moveMouse() - -```ts -moveMouse(x: number, y: number): Promise -``` - -Move the mouse to the given coordinates. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `x` | `number` | The x coordinate. | -| `y` | `number` | The y coordinate. | - -###### Returns - -`Promise`\<`void`\> - -### open() - -```ts -open(fileOrUrl: string): Promise -``` - -Open a file or a URL in the default application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `fileOrUrl` | `string` | The file or URL to open. | - -###### Returns - -`Promise`\<`void`\> - -### press() - -```ts -press(key: string | string[]): Promise -``` - -Press a key. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `key` | `string` \| `string`[] | The key to press (e.g. "enter", "space", "backspace", etc.). Can be a single key or an array of keys. | - -###### Returns - -`Promise`\<`void`\> - -### rightClick() - -```ts -rightClick(x?: number, y?: number): Promise -``` - -Right click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### screenshot() - -###### screenshot() - -```ts -screenshot(): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "bytes"): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `format` | `"bytes"` | The format of the screenshot. | - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "blob"): Promise -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"blob"` | - -###### Returns - -`Promise`\<`Blob`\> - -A Blob representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "stream"): Promise>> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"stream"` | - -###### Returns - -`Promise`\<`ReadableStream`\<`Uint8Array`\<`ArrayBufferLike`\>\>\> - -A ReadableStream of bytes representation of the screenshot. - -### scroll() - -```ts -scroll(direction: "down" | "up", amount: number): Promise -``` - -Scroll the mouse wheel by the given amount. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `direction` | `"down"` \| `"up"` | `'down'` | The direction to scroll. Can be "up" or "down". | -| `amount` | `number` | `1` | The amount to scroll. | - -###### Returns - -`Promise`\<`void`\> - -### wait() - -```ts -wait(ms: number): Promise -``` - -Wait for the given amount of time. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `ms` | `number` | The amount of time to wait in milliseconds. | - -###### Returns - -`Promise`\<`void`\> - -### waitAndVerify() - -```ts -waitAndVerify( - cmd: string, - onResult: (result: CommandResult) => boolean, - timeout: number, -interval: number): Promise -``` - -Wait for a command to return a specific result. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `cmd` | `string` | `undefined` | The command to run. | -| `onResult` | (`result`: `CommandResult`) => `boolean` | `undefined` | The function to check the result of the command. | -| `timeout` | `number` | `10` | The maximum time to wait for the command to return the result. | -| `interval` | `number` | `0.5` | The interval to wait between checks. | - -###### Returns - -`Promise`\<`boolean`\> - -`true` if the command returned the result within the timeout, otherwise `false`. - -### write() - -```ts -write(text: string, options: object): Promise -``` - -Write the given text at the current cursor position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `text` | `string` | The text to write. | -| `options` | `object` | An object containing the chunk size and delay between each chunk of text. | -| `options.chunkSize` | `number` | The size of each chunk of text to write. Default is 25 characters. | -| `options.delayInMs` | `number` | The delay between each chunk of text. Default is 75 ms. | - -###### Returns - -`Promise`\<`void`\> - -### betaCreate() - -###### betaCreate(this, opts) - -```ts -static betaCreate(this: S, opts?: SandboxBetaCreateOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxBetaCreateOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -###### betaCreate(this, template, opts) - -```ts -static betaCreate( - this: S, - template: string, -opts?: SandboxBetaCreateOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxBetaCreateOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -### create() - -###### create(this, opts) - -```ts -static create(this: S, opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -###### create(this, template, opts) - -```ts -static create( - this: S, - template: string, -opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -## Interfaces - -### SandboxBetaCreateOpts - -Configuration options for the Sandbox environment. - SandboxOpts - -#### Properties - -### display? - -```ts -optional display: string; -``` - -Display identifier. - -### dpi? - -```ts -optional dpi: number; -``` - -Dots per inch (DPI) setting for the display. - -### resolution? - -```ts -optional resolution: [number, number]; -``` - -The screen resolution in pixels, specified as [width, height]. - -*** - -### SandboxOpts - -Configuration options for the Sandbox environment. - SandboxOpts - -#### Properties - -### display? - -```ts -optional display: string; -``` - -Display identifier. - -### dpi? - -```ts -optional dpi: number; -``` - -Dots per inch (DPI) setting for the display. - -### resolution? - -```ts -optional resolution: [number, number]; -``` - -The screen resolution in pixels, specified as [width, height]. diff --git a/sdk-reference/desktop-js-sdk/v2.0.2/sandbox/page.mdx b/sdk-reference/desktop-js-sdk/v2.0.2/sandbox/page.mdx deleted file mode 100644 index e67cc1d..0000000 --- a/sdk-reference/desktop-js-sdk/v2.0.2/sandbox/page.mdx +++ /dev/null @@ -1,692 +0,0 @@ -### Sandbox - -#### Properties - -| Property | Modifier | Type | Default value | -| ------ | ------ | ------ | ------ | -| `display` | `public` | `string` | `':0'` | -| `stream` | `public` | `VNCServer` | `undefined` | - -#### Methods - -### doubleClick() - -```ts -doubleClick(x?: number, y?: number): Promise -``` - -Double left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### drag() - -```ts -drag(from: [number, number], to: [number, number]): Promise -``` - -Drag the mouse from the given position to the given position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `from` | [`number`, `number`] | The starting position. | -| `to` | [`number`, `number`] | The ending position. | - -###### Returns - -`Promise`\<`void`\> - -### getApplicationWindows() - -```ts -getApplicationWindows(application: string): Promise -``` - -Get the window ID of the window with the given title. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `application` | `string` | - -###### Returns - -`Promise`\<`string`[]\> - -The ID of the window. - -### getCurrentWindowId() - -```ts -getCurrentWindowId(): Promise -``` - -Get the current window ID. - -###### Returns - -`Promise`\<`string`\> - -The ID of the current window. - -### getCursorPosition() - -```ts -getCursorPosition(): Promise -``` - -Get the current cursor position. - -###### Returns - -`Promise`\<`CursorPosition`\> - -A object with the x and y coordinates - -###### Throws - -Error if cursor position cannot be determined - -### getScreenSize() - -```ts -getScreenSize(): Promise -``` - -Get the current screen size. - -###### Returns - -`Promise`\<`ScreenSize`\> - -An ScreenSize object - -###### Throws - -Error if screen size cannot be determined - -### getWindowTitle() - -```ts -getWindowTitle(windowId: string): Promise -``` - -Get the title of the window with the given ID. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `windowId` | `string` | The ID of the window. | - -###### Returns - -`Promise`\<`string`\> - -The title of the window. - -### launch() - -```ts -launch(application: string, uri?: string): Promise -``` - -Launch an application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `application` | `string` | The application to launch. | -| `uri`? | `string` | The URI to open in the application. | - -###### Returns - -`Promise`\<`void`\> - -### leftClick() - -```ts -leftClick(x?: number, y?: number): Promise -``` - -Left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### middleClick() - -```ts -middleClick(x?: number, y?: number): Promise -``` - -Middle click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### mousePress() - -```ts -mousePress(button: "left" | "right" | "middle"): Promise -``` - -Press the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### mouseRelease() - -```ts -mouseRelease(button: "left" | "right" | "middle"): Promise -``` - -Release the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### moveMouse() - -```ts -moveMouse(x: number, y: number): Promise -``` - -Move the mouse to the given coordinates. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `x` | `number` | The x coordinate. | -| `y` | `number` | The y coordinate. | - -###### Returns - -`Promise`\<`void`\> - -### open() - -```ts -open(fileOrUrl: string): Promise -``` - -Open a file or a URL in the default application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `fileOrUrl` | `string` | The file or URL to open. | - -###### Returns - -`Promise`\<`void`\> - -### press() - -```ts -press(key: string | string[]): Promise -``` - -Press a key. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `key` | `string` \| `string`[] | The key to press (e.g. "enter", "space", "backspace", etc.). Can be a single key or an array of keys. | - -###### Returns - -`Promise`\<`void`\> - -### rightClick() - -```ts -rightClick(x?: number, y?: number): Promise -``` - -Right click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### screenshot() - -###### screenshot() - -```ts -screenshot(): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "bytes"): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `format` | `"bytes"` | The format of the screenshot. | - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "blob"): Promise -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"blob"` | - -###### Returns - -`Promise`\<`Blob`\> - -A Blob representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "stream"): Promise>> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"stream"` | - -###### Returns - -`Promise`\<`ReadableStream`\<`Uint8Array`\<`ArrayBufferLike`\>\>\> - -A ReadableStream of bytes representation of the screenshot. - -### scroll() - -```ts -scroll(direction: "down" | "up", amount: number): Promise -``` - -Scroll the mouse wheel by the given amount. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `direction` | `"down"` \| `"up"` | `'down'` | The direction to scroll. Can be "up" or "down". | -| `amount` | `number` | `1` | The amount to scroll. | - -###### Returns - -`Promise`\<`void`\> - -### wait() - -```ts -wait(ms: number): Promise -``` - -Wait for the given amount of time. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `ms` | `number` | The amount of time to wait in milliseconds. | - -###### Returns - -`Promise`\<`void`\> - -### waitAndVerify() - -```ts -waitAndVerify( - cmd: string, - onResult: (result: CommandResult) => boolean, - timeout: number, -interval: number): Promise -``` - -Wait for a command to return a specific result. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `cmd` | `string` | `undefined` | The command to run. | -| `onResult` | (`result`: `CommandResult`) => `boolean` | `undefined` | The function to check the result of the command. | -| `timeout` | `number` | `10` | The maximum time to wait for the command to return the result. | -| `interval` | `number` | `0.5` | The interval to wait between checks. | - -###### Returns - -`Promise`\<`boolean`\> - -`true` if the command returned the result within the timeout, otherwise `false`. - -### write() - -```ts -write(text: string, options: object): Promise -``` - -Write the given text at the current cursor position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `text` | `string` | The text to write. | -| `options` | `object` | An object containing the chunk size and delay between each chunk of text. | -| `options.chunkSize` | `number` | The size of each chunk of text to write. Default is 25 characters. | -| `options.delayInMs` | `number` | The delay between each chunk of text. Default is 75 ms. | - -###### Returns - -`Promise`\<`void`\> - -### betaCreate() - -###### betaCreate(this, opts) - -```ts -static betaCreate(this: S, opts?: SandboxBetaCreateOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxBetaCreateOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -###### betaCreate(this, template, opts) - -```ts -static betaCreate( - this: S, - template: string, -opts?: SandboxBetaCreateOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxBetaCreateOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -### create() - -###### create(this, opts) - -```ts -static create(this: S, opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -###### create(this, template, opts) - -```ts -static create( - this: S, - template: string, -opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -## Interfaces - -### SandboxBetaCreateOpts - -Configuration options for the Sandbox environment. - SandboxOpts - -#### Properties - -### display? - -```ts -optional display: string; -``` - -Display identifier. - -### dpi? - -```ts -optional dpi: number; -``` - -Dots per inch (DPI) setting for the display. - -### resolution? - -```ts -optional resolution: [number, number]; -``` - -The screen resolution in pixels, specified as [width, height]. - -*** - -### SandboxOpts - -Configuration options for the Sandbox environment. - SandboxOpts - -#### Properties - -### display? - -```ts -optional display: string; -``` - -Display identifier. - -### dpi? - -```ts -optional dpi: number; -``` - -Dots per inch (DPI) setting for the display. - -### resolution? - -```ts -optional resolution: [number, number]; -``` - -The screen resolution in pixels, specified as [width, height]. diff --git a/sdk-reference/desktop-js-sdk/v2.1.0/sandbox/page.mdx b/sdk-reference/desktop-js-sdk/v2.1.0/sandbox/page.mdx deleted file mode 100644 index e67cc1d..0000000 --- a/sdk-reference/desktop-js-sdk/v2.1.0/sandbox/page.mdx +++ /dev/null @@ -1,692 +0,0 @@ -### Sandbox - -#### Properties - -| Property | Modifier | Type | Default value | -| ------ | ------ | ------ | ------ | -| `display` | `public` | `string` | `':0'` | -| `stream` | `public` | `VNCServer` | `undefined` | - -#### Methods - -### doubleClick() - -```ts -doubleClick(x?: number, y?: number): Promise -``` - -Double left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### drag() - -```ts -drag(from: [number, number], to: [number, number]): Promise -``` - -Drag the mouse from the given position to the given position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `from` | [`number`, `number`] | The starting position. | -| `to` | [`number`, `number`] | The ending position. | - -###### Returns - -`Promise`\<`void`\> - -### getApplicationWindows() - -```ts -getApplicationWindows(application: string): Promise -``` - -Get the window ID of the window with the given title. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `application` | `string` | - -###### Returns - -`Promise`\<`string`[]\> - -The ID of the window. - -### getCurrentWindowId() - -```ts -getCurrentWindowId(): Promise -``` - -Get the current window ID. - -###### Returns - -`Promise`\<`string`\> - -The ID of the current window. - -### getCursorPosition() - -```ts -getCursorPosition(): Promise -``` - -Get the current cursor position. - -###### Returns - -`Promise`\<`CursorPosition`\> - -A object with the x and y coordinates - -###### Throws - -Error if cursor position cannot be determined - -### getScreenSize() - -```ts -getScreenSize(): Promise -``` - -Get the current screen size. - -###### Returns - -`Promise`\<`ScreenSize`\> - -An ScreenSize object - -###### Throws - -Error if screen size cannot be determined - -### getWindowTitle() - -```ts -getWindowTitle(windowId: string): Promise -``` - -Get the title of the window with the given ID. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `windowId` | `string` | The ID of the window. | - -###### Returns - -`Promise`\<`string`\> - -The title of the window. - -### launch() - -```ts -launch(application: string, uri?: string): Promise -``` - -Launch an application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `application` | `string` | The application to launch. | -| `uri`? | `string` | The URI to open in the application. | - -###### Returns - -`Promise`\<`void`\> - -### leftClick() - -```ts -leftClick(x?: number, y?: number): Promise -``` - -Left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### middleClick() - -```ts -middleClick(x?: number, y?: number): Promise -``` - -Middle click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### mousePress() - -```ts -mousePress(button: "left" | "right" | "middle"): Promise -``` - -Press the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### mouseRelease() - -```ts -mouseRelease(button: "left" | "right" | "middle"): Promise -``` - -Release the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### moveMouse() - -```ts -moveMouse(x: number, y: number): Promise -``` - -Move the mouse to the given coordinates. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `x` | `number` | The x coordinate. | -| `y` | `number` | The y coordinate. | - -###### Returns - -`Promise`\<`void`\> - -### open() - -```ts -open(fileOrUrl: string): Promise -``` - -Open a file or a URL in the default application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `fileOrUrl` | `string` | The file or URL to open. | - -###### Returns - -`Promise`\<`void`\> - -### press() - -```ts -press(key: string | string[]): Promise -``` - -Press a key. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `key` | `string` \| `string`[] | The key to press (e.g. "enter", "space", "backspace", etc.). Can be a single key or an array of keys. | - -###### Returns - -`Promise`\<`void`\> - -### rightClick() - -```ts -rightClick(x?: number, y?: number): Promise -``` - -Right click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### screenshot() - -###### screenshot() - -```ts -screenshot(): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "bytes"): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `format` | `"bytes"` | The format of the screenshot. | - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "blob"): Promise -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"blob"` | - -###### Returns - -`Promise`\<`Blob`\> - -A Blob representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "stream"): Promise>> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"stream"` | - -###### Returns - -`Promise`\<`ReadableStream`\<`Uint8Array`\<`ArrayBufferLike`\>\>\> - -A ReadableStream of bytes representation of the screenshot. - -### scroll() - -```ts -scroll(direction: "down" | "up", amount: number): Promise -``` - -Scroll the mouse wheel by the given amount. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `direction` | `"down"` \| `"up"` | `'down'` | The direction to scroll. Can be "up" or "down". | -| `amount` | `number` | `1` | The amount to scroll. | - -###### Returns - -`Promise`\<`void`\> - -### wait() - -```ts -wait(ms: number): Promise -``` - -Wait for the given amount of time. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `ms` | `number` | The amount of time to wait in milliseconds. | - -###### Returns - -`Promise`\<`void`\> - -### waitAndVerify() - -```ts -waitAndVerify( - cmd: string, - onResult: (result: CommandResult) => boolean, - timeout: number, -interval: number): Promise -``` - -Wait for a command to return a specific result. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `cmd` | `string` | `undefined` | The command to run. | -| `onResult` | (`result`: `CommandResult`) => `boolean` | `undefined` | The function to check the result of the command. | -| `timeout` | `number` | `10` | The maximum time to wait for the command to return the result. | -| `interval` | `number` | `0.5` | The interval to wait between checks. | - -###### Returns - -`Promise`\<`boolean`\> - -`true` if the command returned the result within the timeout, otherwise `false`. - -### write() - -```ts -write(text: string, options: object): Promise -``` - -Write the given text at the current cursor position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `text` | `string` | The text to write. | -| `options` | `object` | An object containing the chunk size and delay between each chunk of text. | -| `options.chunkSize` | `number` | The size of each chunk of text to write. Default is 25 characters. | -| `options.delayInMs` | `number` | The delay between each chunk of text. Default is 75 ms. | - -###### Returns - -`Promise`\<`void`\> - -### betaCreate() - -###### betaCreate(this, opts) - -```ts -static betaCreate(this: S, opts?: SandboxBetaCreateOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxBetaCreateOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -###### betaCreate(this, template, opts) - -```ts -static betaCreate( - this: S, - template: string, -opts?: SandboxBetaCreateOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxBetaCreateOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -### create() - -###### create(this, opts) - -```ts -static create(this: S, opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -###### create(this, template, opts) - -```ts -static create( - this: S, - template: string, -opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -## Interfaces - -### SandboxBetaCreateOpts - -Configuration options for the Sandbox environment. - SandboxOpts - -#### Properties - -### display? - -```ts -optional display: string; -``` - -Display identifier. - -### dpi? - -```ts -optional dpi: number; -``` - -Dots per inch (DPI) setting for the display. - -### resolution? - -```ts -optional resolution: [number, number]; -``` - -The screen resolution in pixels, specified as [width, height]. - -*** - -### SandboxOpts - -Configuration options for the Sandbox environment. - SandboxOpts - -#### Properties - -### display? - -```ts -optional display: string; -``` - -Display identifier. - -### dpi? - -```ts -optional dpi: number; -``` - -Dots per inch (DPI) setting for the display. - -### resolution? - -```ts -optional resolution: [number, number]; -``` - -The screen resolution in pixels, specified as [width, height]. diff --git a/sdk-reference/desktop-js-sdk/v2.2.0/sandbox/page.mdx b/sdk-reference/desktop-js-sdk/v2.2.0/sandbox/page.mdx deleted file mode 100644 index e67cc1d..0000000 --- a/sdk-reference/desktop-js-sdk/v2.2.0/sandbox/page.mdx +++ /dev/null @@ -1,692 +0,0 @@ -### Sandbox - -#### Properties - -| Property | Modifier | Type | Default value | -| ------ | ------ | ------ | ------ | -| `display` | `public` | `string` | `':0'` | -| `stream` | `public` | `VNCServer` | `undefined` | - -#### Methods - -### doubleClick() - -```ts -doubleClick(x?: number, y?: number): Promise -``` - -Double left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### drag() - -```ts -drag(from: [number, number], to: [number, number]): Promise -``` - -Drag the mouse from the given position to the given position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `from` | [`number`, `number`] | The starting position. | -| `to` | [`number`, `number`] | The ending position. | - -###### Returns - -`Promise`\<`void`\> - -### getApplicationWindows() - -```ts -getApplicationWindows(application: string): Promise -``` - -Get the window ID of the window with the given title. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `application` | `string` | - -###### Returns - -`Promise`\<`string`[]\> - -The ID of the window. - -### getCurrentWindowId() - -```ts -getCurrentWindowId(): Promise -``` - -Get the current window ID. - -###### Returns - -`Promise`\<`string`\> - -The ID of the current window. - -### getCursorPosition() - -```ts -getCursorPosition(): Promise -``` - -Get the current cursor position. - -###### Returns - -`Promise`\<`CursorPosition`\> - -A object with the x and y coordinates - -###### Throws - -Error if cursor position cannot be determined - -### getScreenSize() - -```ts -getScreenSize(): Promise -``` - -Get the current screen size. - -###### Returns - -`Promise`\<`ScreenSize`\> - -An ScreenSize object - -###### Throws - -Error if screen size cannot be determined - -### getWindowTitle() - -```ts -getWindowTitle(windowId: string): Promise -``` - -Get the title of the window with the given ID. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `windowId` | `string` | The ID of the window. | - -###### Returns - -`Promise`\<`string`\> - -The title of the window. - -### launch() - -```ts -launch(application: string, uri?: string): Promise -``` - -Launch an application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `application` | `string` | The application to launch. | -| `uri`? | `string` | The URI to open in the application. | - -###### Returns - -`Promise`\<`void`\> - -### leftClick() - -```ts -leftClick(x?: number, y?: number): Promise -``` - -Left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### middleClick() - -```ts -middleClick(x?: number, y?: number): Promise -``` - -Middle click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### mousePress() - -```ts -mousePress(button: "left" | "right" | "middle"): Promise -``` - -Press the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### mouseRelease() - -```ts -mouseRelease(button: "left" | "right" | "middle"): Promise -``` - -Release the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### moveMouse() - -```ts -moveMouse(x: number, y: number): Promise -``` - -Move the mouse to the given coordinates. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `x` | `number` | The x coordinate. | -| `y` | `number` | The y coordinate. | - -###### Returns - -`Promise`\<`void`\> - -### open() - -```ts -open(fileOrUrl: string): Promise -``` - -Open a file or a URL in the default application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `fileOrUrl` | `string` | The file or URL to open. | - -###### Returns - -`Promise`\<`void`\> - -### press() - -```ts -press(key: string | string[]): Promise -``` - -Press a key. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `key` | `string` \| `string`[] | The key to press (e.g. "enter", "space", "backspace", etc.). Can be a single key or an array of keys. | - -###### Returns - -`Promise`\<`void`\> - -### rightClick() - -```ts -rightClick(x?: number, y?: number): Promise -``` - -Right click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### screenshot() - -###### screenshot() - -```ts -screenshot(): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "bytes"): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `format` | `"bytes"` | The format of the screenshot. | - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "blob"): Promise -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"blob"` | - -###### Returns - -`Promise`\<`Blob`\> - -A Blob representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "stream"): Promise>> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"stream"` | - -###### Returns - -`Promise`\<`ReadableStream`\<`Uint8Array`\<`ArrayBufferLike`\>\>\> - -A ReadableStream of bytes representation of the screenshot. - -### scroll() - -```ts -scroll(direction: "down" | "up", amount: number): Promise -``` - -Scroll the mouse wheel by the given amount. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `direction` | `"down"` \| `"up"` | `'down'` | The direction to scroll. Can be "up" or "down". | -| `amount` | `number` | `1` | The amount to scroll. | - -###### Returns - -`Promise`\<`void`\> - -### wait() - -```ts -wait(ms: number): Promise -``` - -Wait for the given amount of time. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `ms` | `number` | The amount of time to wait in milliseconds. | - -###### Returns - -`Promise`\<`void`\> - -### waitAndVerify() - -```ts -waitAndVerify( - cmd: string, - onResult: (result: CommandResult) => boolean, - timeout: number, -interval: number): Promise -``` - -Wait for a command to return a specific result. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `cmd` | `string` | `undefined` | The command to run. | -| `onResult` | (`result`: `CommandResult`) => `boolean` | `undefined` | The function to check the result of the command. | -| `timeout` | `number` | `10` | The maximum time to wait for the command to return the result. | -| `interval` | `number` | `0.5` | The interval to wait between checks. | - -###### Returns - -`Promise`\<`boolean`\> - -`true` if the command returned the result within the timeout, otherwise `false`. - -### write() - -```ts -write(text: string, options: object): Promise -``` - -Write the given text at the current cursor position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `text` | `string` | The text to write. | -| `options` | `object` | An object containing the chunk size and delay between each chunk of text. | -| `options.chunkSize` | `number` | The size of each chunk of text to write. Default is 25 characters. | -| `options.delayInMs` | `number` | The delay between each chunk of text. Default is 75 ms. | - -###### Returns - -`Promise`\<`void`\> - -### betaCreate() - -###### betaCreate(this, opts) - -```ts -static betaCreate(this: S, opts?: SandboxBetaCreateOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxBetaCreateOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -###### betaCreate(this, template, opts) - -```ts -static betaCreate( - this: S, - template: string, -opts?: SandboxBetaCreateOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxBetaCreateOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -### create() - -###### create(this, opts) - -```ts -static create(this: S, opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -###### create(this, template, opts) - -```ts -static create( - this: S, - template: string, -opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -## Interfaces - -### SandboxBetaCreateOpts - -Configuration options for the Sandbox environment. - SandboxOpts - -#### Properties - -### display? - -```ts -optional display: string; -``` - -Display identifier. - -### dpi? - -```ts -optional dpi: number; -``` - -Dots per inch (DPI) setting for the display. - -### resolution? - -```ts -optional resolution: [number, number]; -``` - -The screen resolution in pixels, specified as [width, height]. - -*** - -### SandboxOpts - -Configuration options for the Sandbox environment. - SandboxOpts - -#### Properties - -### display? - -```ts -optional display: string; -``` - -Display identifier. - -### dpi? - -```ts -optional dpi: number; -``` - -Dots per inch (DPI) setting for the display. - -### resolution? - -```ts -optional resolution: [number, number]; -``` - -The screen resolution in pixels, specified as [width, height]. diff --git a/sdk-reference/desktop-js-sdk/v2.2.1/sandbox/page.mdx b/sdk-reference/desktop-js-sdk/v2.2.1/sandbox/page.mdx deleted file mode 100644 index e67cc1d..0000000 --- a/sdk-reference/desktop-js-sdk/v2.2.1/sandbox/page.mdx +++ /dev/null @@ -1,692 +0,0 @@ -### Sandbox - -#### Properties - -| Property | Modifier | Type | Default value | -| ------ | ------ | ------ | ------ | -| `display` | `public` | `string` | `':0'` | -| `stream` | `public` | `VNCServer` | `undefined` | - -#### Methods - -### doubleClick() - -```ts -doubleClick(x?: number, y?: number): Promise -``` - -Double left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### drag() - -```ts -drag(from: [number, number], to: [number, number]): Promise -``` - -Drag the mouse from the given position to the given position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `from` | [`number`, `number`] | The starting position. | -| `to` | [`number`, `number`] | The ending position. | - -###### Returns - -`Promise`\<`void`\> - -### getApplicationWindows() - -```ts -getApplicationWindows(application: string): Promise -``` - -Get the window ID of the window with the given title. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `application` | `string` | - -###### Returns - -`Promise`\<`string`[]\> - -The ID of the window. - -### getCurrentWindowId() - -```ts -getCurrentWindowId(): Promise -``` - -Get the current window ID. - -###### Returns - -`Promise`\<`string`\> - -The ID of the current window. - -### getCursorPosition() - -```ts -getCursorPosition(): Promise -``` - -Get the current cursor position. - -###### Returns - -`Promise`\<`CursorPosition`\> - -A object with the x and y coordinates - -###### Throws - -Error if cursor position cannot be determined - -### getScreenSize() - -```ts -getScreenSize(): Promise -``` - -Get the current screen size. - -###### Returns - -`Promise`\<`ScreenSize`\> - -An ScreenSize object - -###### Throws - -Error if screen size cannot be determined - -### getWindowTitle() - -```ts -getWindowTitle(windowId: string): Promise -``` - -Get the title of the window with the given ID. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `windowId` | `string` | The ID of the window. | - -###### Returns - -`Promise`\<`string`\> - -The title of the window. - -### launch() - -```ts -launch(application: string, uri?: string): Promise -``` - -Launch an application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `application` | `string` | The application to launch. | -| `uri`? | `string` | The URI to open in the application. | - -###### Returns - -`Promise`\<`void`\> - -### leftClick() - -```ts -leftClick(x?: number, y?: number): Promise -``` - -Left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### middleClick() - -```ts -middleClick(x?: number, y?: number): Promise -``` - -Middle click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### mousePress() - -```ts -mousePress(button: "left" | "right" | "middle"): Promise -``` - -Press the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### mouseRelease() - -```ts -mouseRelease(button: "left" | "right" | "middle"): Promise -``` - -Release the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### moveMouse() - -```ts -moveMouse(x: number, y: number): Promise -``` - -Move the mouse to the given coordinates. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `x` | `number` | The x coordinate. | -| `y` | `number` | The y coordinate. | - -###### Returns - -`Promise`\<`void`\> - -### open() - -```ts -open(fileOrUrl: string): Promise -``` - -Open a file or a URL in the default application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `fileOrUrl` | `string` | The file or URL to open. | - -###### Returns - -`Promise`\<`void`\> - -### press() - -```ts -press(key: string | string[]): Promise -``` - -Press a key. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `key` | `string` \| `string`[] | The key to press (e.g. "enter", "space", "backspace", etc.). Can be a single key or an array of keys. | - -###### Returns - -`Promise`\<`void`\> - -### rightClick() - -```ts -rightClick(x?: number, y?: number): Promise -``` - -Right click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### screenshot() - -###### screenshot() - -```ts -screenshot(): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "bytes"): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `format` | `"bytes"` | The format of the screenshot. | - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "blob"): Promise -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"blob"` | - -###### Returns - -`Promise`\<`Blob`\> - -A Blob representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "stream"): Promise>> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"stream"` | - -###### Returns - -`Promise`\<`ReadableStream`\<`Uint8Array`\<`ArrayBufferLike`\>\>\> - -A ReadableStream of bytes representation of the screenshot. - -### scroll() - -```ts -scroll(direction: "down" | "up", amount: number): Promise -``` - -Scroll the mouse wheel by the given amount. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `direction` | `"down"` \| `"up"` | `'down'` | The direction to scroll. Can be "up" or "down". | -| `amount` | `number` | `1` | The amount to scroll. | - -###### Returns - -`Promise`\<`void`\> - -### wait() - -```ts -wait(ms: number): Promise -``` - -Wait for the given amount of time. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `ms` | `number` | The amount of time to wait in milliseconds. | - -###### Returns - -`Promise`\<`void`\> - -### waitAndVerify() - -```ts -waitAndVerify( - cmd: string, - onResult: (result: CommandResult) => boolean, - timeout: number, -interval: number): Promise -``` - -Wait for a command to return a specific result. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `cmd` | `string` | `undefined` | The command to run. | -| `onResult` | (`result`: `CommandResult`) => `boolean` | `undefined` | The function to check the result of the command. | -| `timeout` | `number` | `10` | The maximum time to wait for the command to return the result. | -| `interval` | `number` | `0.5` | The interval to wait between checks. | - -###### Returns - -`Promise`\<`boolean`\> - -`true` if the command returned the result within the timeout, otherwise `false`. - -### write() - -```ts -write(text: string, options: object): Promise -``` - -Write the given text at the current cursor position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `text` | `string` | The text to write. | -| `options` | `object` | An object containing the chunk size and delay between each chunk of text. | -| `options.chunkSize` | `number` | The size of each chunk of text to write. Default is 25 characters. | -| `options.delayInMs` | `number` | The delay between each chunk of text. Default is 75 ms. | - -###### Returns - -`Promise`\<`void`\> - -### betaCreate() - -###### betaCreate(this, opts) - -```ts -static betaCreate(this: S, opts?: SandboxBetaCreateOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxBetaCreateOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -###### betaCreate(this, template, opts) - -```ts -static betaCreate( - this: S, - template: string, -opts?: SandboxBetaCreateOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxBetaCreateOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -### create() - -###### create(this, opts) - -```ts -static create(this: S, opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -###### create(this, template, opts) - -```ts -static create( - this: S, - template: string, -opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -## Interfaces - -### SandboxBetaCreateOpts - -Configuration options for the Sandbox environment. - SandboxOpts - -#### Properties - -### display? - -```ts -optional display: string; -``` - -Display identifier. - -### dpi? - -```ts -optional dpi: number; -``` - -Dots per inch (DPI) setting for the display. - -### resolution? - -```ts -optional resolution: [number, number]; -``` - -The screen resolution in pixels, specified as [width, height]. - -*** - -### SandboxOpts - -Configuration options for the Sandbox environment. - SandboxOpts - -#### Properties - -### display? - -```ts -optional display: string; -``` - -Display identifier. - -### dpi? - -```ts -optional dpi: number; -``` - -Dots per inch (DPI) setting for the display. - -### resolution? - -```ts -optional resolution: [number, number]; -``` - -The screen resolution in pixels, specified as [width, height]. diff --git a/sdk-reference/desktop-js-sdk/v2.2.2/sandbox/page.mdx b/sdk-reference/desktop-js-sdk/v2.2.2/sandbox/page.mdx deleted file mode 100644 index e67cc1d..0000000 --- a/sdk-reference/desktop-js-sdk/v2.2.2/sandbox/page.mdx +++ /dev/null @@ -1,692 +0,0 @@ -### Sandbox - -#### Properties - -| Property | Modifier | Type | Default value | -| ------ | ------ | ------ | ------ | -| `display` | `public` | `string` | `':0'` | -| `stream` | `public` | `VNCServer` | `undefined` | - -#### Methods - -### doubleClick() - -```ts -doubleClick(x?: number, y?: number): Promise -``` - -Double left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### drag() - -```ts -drag(from: [number, number], to: [number, number]): Promise -``` - -Drag the mouse from the given position to the given position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `from` | [`number`, `number`] | The starting position. | -| `to` | [`number`, `number`] | The ending position. | - -###### Returns - -`Promise`\<`void`\> - -### getApplicationWindows() - -```ts -getApplicationWindows(application: string): Promise -``` - -Get the window ID of the window with the given title. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `application` | `string` | - -###### Returns - -`Promise`\<`string`[]\> - -The ID of the window. - -### getCurrentWindowId() - -```ts -getCurrentWindowId(): Promise -``` - -Get the current window ID. - -###### Returns - -`Promise`\<`string`\> - -The ID of the current window. - -### getCursorPosition() - -```ts -getCursorPosition(): Promise -``` - -Get the current cursor position. - -###### Returns - -`Promise`\<`CursorPosition`\> - -A object with the x and y coordinates - -###### Throws - -Error if cursor position cannot be determined - -### getScreenSize() - -```ts -getScreenSize(): Promise -``` - -Get the current screen size. - -###### Returns - -`Promise`\<`ScreenSize`\> - -An ScreenSize object - -###### Throws - -Error if screen size cannot be determined - -### getWindowTitle() - -```ts -getWindowTitle(windowId: string): Promise -``` - -Get the title of the window with the given ID. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `windowId` | `string` | The ID of the window. | - -###### Returns - -`Promise`\<`string`\> - -The title of the window. - -### launch() - -```ts -launch(application: string, uri?: string): Promise -``` - -Launch an application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `application` | `string` | The application to launch. | -| `uri`? | `string` | The URI to open in the application. | - -###### Returns - -`Promise`\<`void`\> - -### leftClick() - -```ts -leftClick(x?: number, y?: number): Promise -``` - -Left click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### middleClick() - -```ts -middleClick(x?: number, y?: number): Promise -``` - -Middle click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### mousePress() - -```ts -mousePress(button: "left" | "right" | "middle"): Promise -``` - -Press the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### mouseRelease() - -```ts -mouseRelease(button: "left" | "right" | "middle"): Promise -``` - -Release the mouse button. - -###### Parameters - -| Parameter | Type | Default value | -| ------ | ------ | ------ | -| `button` | `"left"` \| `"right"` \| `"middle"` | `'left'` | - -###### Returns - -`Promise`\<`void`\> - -### moveMouse() - -```ts -moveMouse(x: number, y: number): Promise -``` - -Move the mouse to the given coordinates. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `x` | `number` | The x coordinate. | -| `y` | `number` | The y coordinate. | - -###### Returns - -`Promise`\<`void`\> - -### open() - -```ts -open(fileOrUrl: string): Promise -``` - -Open a file or a URL in the default application. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `fileOrUrl` | `string` | The file or URL to open. | - -###### Returns - -`Promise`\<`void`\> - -### press() - -```ts -press(key: string | string[]): Promise -``` - -Press a key. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `key` | `string` \| `string`[] | The key to press (e.g. "enter", "space", "backspace", etc.). Can be a single key or an array of keys. | - -###### Returns - -`Promise`\<`void`\> - -### rightClick() - -```ts -rightClick(x?: number, y?: number): Promise -``` - -Right click on the mouse position. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `x`? | `number` | -| `y`? | `number` | - -###### Returns - -`Promise`\<`void`\> - -### screenshot() - -###### screenshot() - -```ts -screenshot(): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "bytes"): Promise> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `format` | `"bytes"` | The format of the screenshot. | - -###### Returns - -`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> - -A Uint8Array bytes representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "blob"): Promise -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"blob"` | - -###### Returns - -`Promise`\<`Blob`\> - -A Blob representation of the screenshot. - -###### screenshot(format) - -```ts -screenshot(format: "stream"): Promise>> -``` - -Take a screenshot and save it to the given name. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `format` | `"stream"` | - -###### Returns - -`Promise`\<`ReadableStream`\<`Uint8Array`\<`ArrayBufferLike`\>\>\> - -A ReadableStream of bytes representation of the screenshot. - -### scroll() - -```ts -scroll(direction: "down" | "up", amount: number): Promise -``` - -Scroll the mouse wheel by the given amount. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `direction` | `"down"` \| `"up"` | `'down'` | The direction to scroll. Can be "up" or "down". | -| `amount` | `number` | `1` | The amount to scroll. | - -###### Returns - -`Promise`\<`void`\> - -### wait() - -```ts -wait(ms: number): Promise -``` - -Wait for the given amount of time. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `ms` | `number` | The amount of time to wait in milliseconds. | - -###### Returns - -`Promise`\<`void`\> - -### waitAndVerify() - -```ts -waitAndVerify( - cmd: string, - onResult: (result: CommandResult) => boolean, - timeout: number, -interval: number): Promise -``` - -Wait for a command to return a specific result. - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `cmd` | `string` | `undefined` | The command to run. | -| `onResult` | (`result`: `CommandResult`) => `boolean` | `undefined` | The function to check the result of the command. | -| `timeout` | `number` | `10` | The maximum time to wait for the command to return the result. | -| `interval` | `number` | `0.5` | The interval to wait between checks. | - -###### Returns - -`Promise`\<`boolean`\> - -`true` if the command returned the result within the timeout, otherwise `false`. - -### write() - -```ts -write(text: string, options: object): Promise -``` - -Write the given text at the current cursor position. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `text` | `string` | The text to write. | -| `options` | `object` | An object containing the chunk size and delay between each chunk of text. | -| `options.chunkSize` | `number` | The size of each chunk of text to write. Default is 25 characters. | -| `options.delayInMs` | `number` | The delay between each chunk of text. Default is 75 ms. | - -###### Returns - -`Promise`\<`void`\> - -### betaCreate() - -###### betaCreate(this, opts) - -```ts -static betaCreate(this: S, opts?: SandboxBetaCreateOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxBetaCreateOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -###### betaCreate(this, template, opts) - -```ts -static betaCreate( - this: S, - template: string, -opts?: SandboxBetaCreateOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxBetaCreateOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -### create() - -###### create(this, opts) - -```ts -static create(this: S, opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the default `desktop` sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create() -``` - -###### Constructs - -Sandbox - -###### create(this, template, opts) - -```ts -static create( - this: S, - template: string, -opts?: SandboxOpts): Promise> -``` - -Create a new sandbox from the specified sandbox template. - -###### Type Parameters - -| Type Parameter | -| ------ | -| `S` *extends* *typeof* `Sandbox` | - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `this` | `S` | - | -| `template` | `string` | sandbox template name or ID. | -| `opts`? | `SandboxOpts` | connection options. | - -###### Returns - -`Promise`\<`InstanceType`\<`S`\>\> - -sandbox instance for the new sandbox. - -###### Example - -```ts -const sandbox = await Sandbox.create('') -``` - -###### Constructs - -Sandbox - -## Interfaces - -### SandboxBetaCreateOpts - -Configuration options for the Sandbox environment. - SandboxOpts - -#### Properties - -### display? - -```ts -optional display: string; -``` - -Display identifier. - -### dpi? - -```ts -optional dpi: number; -``` - -Dots per inch (DPI) setting for the display. - -### resolution? - -```ts -optional resolution: [number, number]; -``` - -The screen resolution in pixels, specified as [width, height]. - -*** - -### SandboxOpts - -Configuration options for the Sandbox environment. - SandboxOpts - -#### Properties - -### display? - -```ts -optional display: string; -``` - -Display identifier. - -### dpi? - -```ts -optional dpi: number; -``` - -Dots per inch (DPI) setting for the display. - -### resolution? - -```ts -optional resolution: [number, number]; -``` - -The screen resolution in pixels, specified as [width, height]. diff --git a/sdk-reference/desktop-python-sdk/v1.0.1/sandbox/page.mdx b/sdk-reference/desktop-python-sdk/v1.0.1/sandbox/page.mdx deleted file mode 100644 index 7d61166..0000000 --- a/sdk-reference/desktop-python-sdk/v1.0.1/sandbox/page.mdx +++ /dev/null @@ -1,198 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(SandboxBase) -``` - - -### get\_video\_stream\_url - -```python -def get_video_stream_url() -``` - -Get the video stream URL. - - -### take\_screenshot - -```python -@overload -def take_screenshot(format: Literal["stream"]) -> Iterator[bytes] -``` - -Take a screenshot and return it as a stream of bytes. - - -### take\_screenshot - -```python -@overload -def take_screenshot(format: Literal["bytes"]) -> bytearray -``` - -Take a screenshot and return it as a bytearray. - - -### take\_screenshot - -```python -def take_screenshot(format: Literal["bytes", "stream"] = "bytes") -``` - -Take a screenshot and return it in the specified format. - -**Arguments**: - -- `format`: The format of the screenshot. Can be 'bytes', 'blob', or 'stream'. - -**Returns**: - -The screenshot in the specified format. - - -### left\_click - -```python -def left_click() -``` - -Left click on the current mouse position. - - -### double\_click - -```python -def double_click() -``` - -Double left click on the current mouse position. - - -### right\_click - -```python -def right_click() -``` - -Right click on the current mouse position. - - -### middle\_click - -```python -def middle_click() -``` - -Middle click on the current mouse position. - - -### scroll - -```python -def scroll(amount: int) -``` - -Scroll the mouse wheel by the given amount. - -**Arguments**: - -- `amount`: The amount to scroll. - - -### move\_mouse - -```python -def move_mouse(x: int, y: int) -``` - -Move the mouse to the given coordinates. - -**Arguments**: - -- `x`: The x coordinate. -- `y`: The y coordinate. - - -### get\_cursor\_position - -```python -def get_cursor_position() -``` - -Get the current cursor position. - -**Returns**: - -A tuple with the x and y coordinates. - - -### get\_screen\_size - -```python -def get_screen_size() -``` - -Get the current screen size. - -**Returns**: - -A tuple with the width and height. - - -### write - -```python -def write(text: str) -``` - -Write the given text at the current cursor position. - -**Arguments**: - -- `text`: The text to write. - - -### press - -```python -def press(key: str) -``` - -Press a key. - -**Arguments**: - -- `key`: The key to press (e.g. "enter", "space", "backspace", etc.). - - -### hotkey - -```python -def hotkey(*keys) -``` - -Press a hotkey. - -**Arguments**: - -- `keys`: The keys to press (e.g. `hotkey("ctrl", "c")` will press Ctrl+C). - - -### open - -```python -def open(file_or_url: str) -``` - -Open a file or a URL in the default application. - -**Arguments**: - -- `file_or_url`: The file or URL to open. - diff --git a/sdk-reference/desktop-python-sdk/v1.0.2/sandbox/page.mdx b/sdk-reference/desktop-python-sdk/v1.0.2/sandbox/page.mdx deleted file mode 100644 index d7ffc70..0000000 --- a/sdk-reference/desktop-python-sdk/v1.0.2/sandbox/page.mdx +++ /dev/null @@ -1,228 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(SandboxBase) -``` - - -### \_\_init\_\_ - -```python -def __init__(resolution: Optional[Tuple[int, int]] = None, - dpi: Optional[int] = None, - display: Optional[str] = None, - template: Optional[str] = None, - timeout: Optional[int] = None, - metadata: Optional[Dict[str, str]] = None, - envs: Optional[Dict[str, str]] = None, - api_key: Optional[str] = None, - domain: Optional[str] = None, - debug: Optional[bool] = None, - sandbox_id: Optional[str] = None, - request_timeout: Optional[float] = None) -``` - -Create a new desktop sandbox. - -By default, the sandbox is created from the `desktop` template. - -**Arguments**: - -- `resolution`: Startup the desktop with custom screen resolution. Defaults to (1024, 768) -- `dpi`: Startup the desktop with custom DPI. Defaults to 96 -- `display`: Startup the desktop with custom display. Defaults to ":0" -- `template`: Sandbox template name or ID -- `timeout`: Timeout for the sandbox in **seconds**, default to 300 seconds. Maximum time a sandbox can be kept alive is 24 hours (86_400 seconds) for Pro users and 1 hour (3_600 seconds) for Hobby users -- `metadata`: Custom metadata for the sandbox -- `envs`: Custom environment variables for the sandbox -- `api_key`: E2B API Key to use for authentication, defaults to `E2B_API_KEY` environment variable -- `domain`: E2B domain to use for authentication, defaults to `E2B_DOMAIN` environment variable -- `debug`: If True, the sandbox will be created in debug mode, defaults to `E2B_DEBUG` environment variable -- `sandbox_id`: Sandbox ID to connect to, defaults to `E2B_SANDBOX_ID` environment variable -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -sandbox instance for the new sandbox - - -### screenshot - -```python -@overload -def screenshot(format: Literal["stream"]) -> Iterator[bytes] -``` - -Take a screenshot and return it as a stream of bytes. - - -### screenshot - -```python -@overload -def screenshot(format: Literal["bytes"]) -> bytearray -``` - -Take a screenshot and return it as a bytearray. - - -### screenshot - -```python -def screenshot(format: Literal["bytes", "stream"] = "bytes") -``` - -Take a screenshot and return it in the specified format. - -**Arguments**: - -- `format`: The format of the screenshot. Can be 'bytes', 'blob', or 'stream'. - -**Returns**: - -The screenshot in the specified format. - - -### left\_click - -```python -def left_click() -``` - -Left click on the current mouse position. - - -### double\_click - -```python -def double_click() -``` - -Double left click on the current mouse position. - - -### right\_click - -```python -def right_click() -``` - -Right click on the current mouse position. - - -### middle\_click - -```python -def middle_click() -``` - -Middle click on the current mouse position. - - -### scroll - -```python -def scroll(direction: Literal["up", "down"] = "down", amount: int = 1) -``` - -Scroll the mouse wheel by the given amount. - -**Arguments**: - -- `direction`: The direction to scroll. Can be "up" or "down". -- `amount`: The amount to scroll. - - -### move\_mouse - -```python -def move_mouse(x: int, y: int) -``` - -Move the mouse to the given coordinates. - -**Arguments**: - -- `x`: The x coordinate. -- `y`: The y coordinate. - - -### get\_cursor\_position - -```python -def get_cursor_position() -> tuple[int, int] -``` - -Get the current cursor position. - -**Raises**: - -- `RuntimeError`: If the cursor position cannot be determined - -**Returns**: - -A tuple with the x and y coordinates - - -### get\_screen\_size - -```python -def get_screen_size() -> tuple[int, int] -``` - -Get the current screen size. - -**Raises**: - -- `RuntimeError`: If the screen size cannot be determined - -**Returns**: - -A tuple with the width and height - - -### write - -```python -def write(text: str, *, chunk_size: int = 25, delay_in_ms: int = 75) -> None -``` - -Write the given text at the current cursor position. - -**Arguments**: - -- `text`: The text to write. -- `chunk_size`: The size of each chunk of text to write. -- `delay_in_ms`: The delay between each chunk of text. - - -### press - -```python -def press(key: str) -``` - -Press a key. - -**Arguments**: - -- `key`: The key to press (e.g. "enter", "space", "backspace", etc.). - - -### open - -```python -def open(file_or_url: str) -``` - -Open a file or a URL in the default application. - -**Arguments**: - -- `file_or_url`: The file or URL to open. - diff --git a/sdk-reference/desktop-python-sdk/v1.0.3/sandbox/page.mdx b/sdk-reference/desktop-python-sdk/v1.0.3/sandbox/page.mdx deleted file mode 100644 index d7ffc70..0000000 --- a/sdk-reference/desktop-python-sdk/v1.0.3/sandbox/page.mdx +++ /dev/null @@ -1,228 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(SandboxBase) -``` - - -### \_\_init\_\_ - -```python -def __init__(resolution: Optional[Tuple[int, int]] = None, - dpi: Optional[int] = None, - display: Optional[str] = None, - template: Optional[str] = None, - timeout: Optional[int] = None, - metadata: Optional[Dict[str, str]] = None, - envs: Optional[Dict[str, str]] = None, - api_key: Optional[str] = None, - domain: Optional[str] = None, - debug: Optional[bool] = None, - sandbox_id: Optional[str] = None, - request_timeout: Optional[float] = None) -``` - -Create a new desktop sandbox. - -By default, the sandbox is created from the `desktop` template. - -**Arguments**: - -- `resolution`: Startup the desktop with custom screen resolution. Defaults to (1024, 768) -- `dpi`: Startup the desktop with custom DPI. Defaults to 96 -- `display`: Startup the desktop with custom display. Defaults to ":0" -- `template`: Sandbox template name or ID -- `timeout`: Timeout for the sandbox in **seconds**, default to 300 seconds. Maximum time a sandbox can be kept alive is 24 hours (86_400 seconds) for Pro users and 1 hour (3_600 seconds) for Hobby users -- `metadata`: Custom metadata for the sandbox -- `envs`: Custom environment variables for the sandbox -- `api_key`: E2B API Key to use for authentication, defaults to `E2B_API_KEY` environment variable -- `domain`: E2B domain to use for authentication, defaults to `E2B_DOMAIN` environment variable -- `debug`: If True, the sandbox will be created in debug mode, defaults to `E2B_DEBUG` environment variable -- `sandbox_id`: Sandbox ID to connect to, defaults to `E2B_SANDBOX_ID` environment variable -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -sandbox instance for the new sandbox - - -### screenshot - -```python -@overload -def screenshot(format: Literal["stream"]) -> Iterator[bytes] -``` - -Take a screenshot and return it as a stream of bytes. - - -### screenshot - -```python -@overload -def screenshot(format: Literal["bytes"]) -> bytearray -``` - -Take a screenshot and return it as a bytearray. - - -### screenshot - -```python -def screenshot(format: Literal["bytes", "stream"] = "bytes") -``` - -Take a screenshot and return it in the specified format. - -**Arguments**: - -- `format`: The format of the screenshot. Can be 'bytes', 'blob', or 'stream'. - -**Returns**: - -The screenshot in the specified format. - - -### left\_click - -```python -def left_click() -``` - -Left click on the current mouse position. - - -### double\_click - -```python -def double_click() -``` - -Double left click on the current mouse position. - - -### right\_click - -```python -def right_click() -``` - -Right click on the current mouse position. - - -### middle\_click - -```python -def middle_click() -``` - -Middle click on the current mouse position. - - -### scroll - -```python -def scroll(direction: Literal["up", "down"] = "down", amount: int = 1) -``` - -Scroll the mouse wheel by the given amount. - -**Arguments**: - -- `direction`: The direction to scroll. Can be "up" or "down". -- `amount`: The amount to scroll. - - -### move\_mouse - -```python -def move_mouse(x: int, y: int) -``` - -Move the mouse to the given coordinates. - -**Arguments**: - -- `x`: The x coordinate. -- `y`: The y coordinate. - - -### get\_cursor\_position - -```python -def get_cursor_position() -> tuple[int, int] -``` - -Get the current cursor position. - -**Raises**: - -- `RuntimeError`: If the cursor position cannot be determined - -**Returns**: - -A tuple with the x and y coordinates - - -### get\_screen\_size - -```python -def get_screen_size() -> tuple[int, int] -``` - -Get the current screen size. - -**Raises**: - -- `RuntimeError`: If the screen size cannot be determined - -**Returns**: - -A tuple with the width and height - - -### write - -```python -def write(text: str, *, chunk_size: int = 25, delay_in_ms: int = 75) -> None -``` - -Write the given text at the current cursor position. - -**Arguments**: - -- `text`: The text to write. -- `chunk_size`: The size of each chunk of text to write. -- `delay_in_ms`: The delay between each chunk of text. - - -### press - -```python -def press(key: str) -``` - -Press a key. - -**Arguments**: - -- `key`: The key to press (e.g. "enter", "space", "backspace", etc.). - - -### open - -```python -def open(file_or_url: str) -``` - -Open a file or a URL in the default application. - -**Arguments**: - -- `file_or_url`: The file or URL to open. - diff --git a/sdk-reference/desktop-python-sdk/v1.1.1/sandbox/page.mdx b/sdk-reference/desktop-python-sdk/v1.1.1/sandbox/page.mdx deleted file mode 100644 index d7ffc70..0000000 --- a/sdk-reference/desktop-python-sdk/v1.1.1/sandbox/page.mdx +++ /dev/null @@ -1,228 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(SandboxBase) -``` - - -### \_\_init\_\_ - -```python -def __init__(resolution: Optional[Tuple[int, int]] = None, - dpi: Optional[int] = None, - display: Optional[str] = None, - template: Optional[str] = None, - timeout: Optional[int] = None, - metadata: Optional[Dict[str, str]] = None, - envs: Optional[Dict[str, str]] = None, - api_key: Optional[str] = None, - domain: Optional[str] = None, - debug: Optional[bool] = None, - sandbox_id: Optional[str] = None, - request_timeout: Optional[float] = None) -``` - -Create a new desktop sandbox. - -By default, the sandbox is created from the `desktop` template. - -**Arguments**: - -- `resolution`: Startup the desktop with custom screen resolution. Defaults to (1024, 768) -- `dpi`: Startup the desktop with custom DPI. Defaults to 96 -- `display`: Startup the desktop with custom display. Defaults to ":0" -- `template`: Sandbox template name or ID -- `timeout`: Timeout for the sandbox in **seconds**, default to 300 seconds. Maximum time a sandbox can be kept alive is 24 hours (86_400 seconds) for Pro users and 1 hour (3_600 seconds) for Hobby users -- `metadata`: Custom metadata for the sandbox -- `envs`: Custom environment variables for the sandbox -- `api_key`: E2B API Key to use for authentication, defaults to `E2B_API_KEY` environment variable -- `domain`: E2B domain to use for authentication, defaults to `E2B_DOMAIN` environment variable -- `debug`: If True, the sandbox will be created in debug mode, defaults to `E2B_DEBUG` environment variable -- `sandbox_id`: Sandbox ID to connect to, defaults to `E2B_SANDBOX_ID` environment variable -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -sandbox instance for the new sandbox - - -### screenshot - -```python -@overload -def screenshot(format: Literal["stream"]) -> Iterator[bytes] -``` - -Take a screenshot and return it as a stream of bytes. - - -### screenshot - -```python -@overload -def screenshot(format: Literal["bytes"]) -> bytearray -``` - -Take a screenshot and return it as a bytearray. - - -### screenshot - -```python -def screenshot(format: Literal["bytes", "stream"] = "bytes") -``` - -Take a screenshot and return it in the specified format. - -**Arguments**: - -- `format`: The format of the screenshot. Can be 'bytes', 'blob', or 'stream'. - -**Returns**: - -The screenshot in the specified format. - - -### left\_click - -```python -def left_click() -``` - -Left click on the current mouse position. - - -### double\_click - -```python -def double_click() -``` - -Double left click on the current mouse position. - - -### right\_click - -```python -def right_click() -``` - -Right click on the current mouse position. - - -### middle\_click - -```python -def middle_click() -``` - -Middle click on the current mouse position. - - -### scroll - -```python -def scroll(direction: Literal["up", "down"] = "down", amount: int = 1) -``` - -Scroll the mouse wheel by the given amount. - -**Arguments**: - -- `direction`: The direction to scroll. Can be "up" or "down". -- `amount`: The amount to scroll. - - -### move\_mouse - -```python -def move_mouse(x: int, y: int) -``` - -Move the mouse to the given coordinates. - -**Arguments**: - -- `x`: The x coordinate. -- `y`: The y coordinate. - - -### get\_cursor\_position - -```python -def get_cursor_position() -> tuple[int, int] -``` - -Get the current cursor position. - -**Raises**: - -- `RuntimeError`: If the cursor position cannot be determined - -**Returns**: - -A tuple with the x and y coordinates - - -### get\_screen\_size - -```python -def get_screen_size() -> tuple[int, int] -``` - -Get the current screen size. - -**Raises**: - -- `RuntimeError`: If the screen size cannot be determined - -**Returns**: - -A tuple with the width and height - - -### write - -```python -def write(text: str, *, chunk_size: int = 25, delay_in_ms: int = 75) -> None -``` - -Write the given text at the current cursor position. - -**Arguments**: - -- `text`: The text to write. -- `chunk_size`: The size of each chunk of text to write. -- `delay_in_ms`: The delay between each chunk of text. - - -### press - -```python -def press(key: str) -``` - -Press a key. - -**Arguments**: - -- `key`: The key to press (e.g. "enter", "space", "backspace", etc.). - - -### open - -```python -def open(file_or_url: str) -``` - -Open a file or a URL in the default application. - -**Arguments**: - -- `file_or_url`: The file or URL to open. - diff --git a/sdk-reference/desktop-python-sdk/v1.2.0/sandbox/page.mdx b/sdk-reference/desktop-python-sdk/v1.2.0/sandbox/page.mdx deleted file mode 100644 index d7ffc70..0000000 --- a/sdk-reference/desktop-python-sdk/v1.2.0/sandbox/page.mdx +++ /dev/null @@ -1,228 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(SandboxBase) -``` - - -### \_\_init\_\_ - -```python -def __init__(resolution: Optional[Tuple[int, int]] = None, - dpi: Optional[int] = None, - display: Optional[str] = None, - template: Optional[str] = None, - timeout: Optional[int] = None, - metadata: Optional[Dict[str, str]] = None, - envs: Optional[Dict[str, str]] = None, - api_key: Optional[str] = None, - domain: Optional[str] = None, - debug: Optional[bool] = None, - sandbox_id: Optional[str] = None, - request_timeout: Optional[float] = None) -``` - -Create a new desktop sandbox. - -By default, the sandbox is created from the `desktop` template. - -**Arguments**: - -- `resolution`: Startup the desktop with custom screen resolution. Defaults to (1024, 768) -- `dpi`: Startup the desktop with custom DPI. Defaults to 96 -- `display`: Startup the desktop with custom display. Defaults to ":0" -- `template`: Sandbox template name or ID -- `timeout`: Timeout for the sandbox in **seconds**, default to 300 seconds. Maximum time a sandbox can be kept alive is 24 hours (86_400 seconds) for Pro users and 1 hour (3_600 seconds) for Hobby users -- `metadata`: Custom metadata for the sandbox -- `envs`: Custom environment variables for the sandbox -- `api_key`: E2B API Key to use for authentication, defaults to `E2B_API_KEY` environment variable -- `domain`: E2B domain to use for authentication, defaults to `E2B_DOMAIN` environment variable -- `debug`: If True, the sandbox will be created in debug mode, defaults to `E2B_DEBUG` environment variable -- `sandbox_id`: Sandbox ID to connect to, defaults to `E2B_SANDBOX_ID` environment variable -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -sandbox instance for the new sandbox - - -### screenshot - -```python -@overload -def screenshot(format: Literal["stream"]) -> Iterator[bytes] -``` - -Take a screenshot and return it as a stream of bytes. - - -### screenshot - -```python -@overload -def screenshot(format: Literal["bytes"]) -> bytearray -``` - -Take a screenshot and return it as a bytearray. - - -### screenshot - -```python -def screenshot(format: Literal["bytes", "stream"] = "bytes") -``` - -Take a screenshot and return it in the specified format. - -**Arguments**: - -- `format`: The format of the screenshot. Can be 'bytes', 'blob', or 'stream'. - -**Returns**: - -The screenshot in the specified format. - - -### left\_click - -```python -def left_click() -``` - -Left click on the current mouse position. - - -### double\_click - -```python -def double_click() -``` - -Double left click on the current mouse position. - - -### right\_click - -```python -def right_click() -``` - -Right click on the current mouse position. - - -### middle\_click - -```python -def middle_click() -``` - -Middle click on the current mouse position. - - -### scroll - -```python -def scroll(direction: Literal["up", "down"] = "down", amount: int = 1) -``` - -Scroll the mouse wheel by the given amount. - -**Arguments**: - -- `direction`: The direction to scroll. Can be "up" or "down". -- `amount`: The amount to scroll. - - -### move\_mouse - -```python -def move_mouse(x: int, y: int) -``` - -Move the mouse to the given coordinates. - -**Arguments**: - -- `x`: The x coordinate. -- `y`: The y coordinate. - - -### get\_cursor\_position - -```python -def get_cursor_position() -> tuple[int, int] -``` - -Get the current cursor position. - -**Raises**: - -- `RuntimeError`: If the cursor position cannot be determined - -**Returns**: - -A tuple with the x and y coordinates - - -### get\_screen\_size - -```python -def get_screen_size() -> tuple[int, int] -``` - -Get the current screen size. - -**Raises**: - -- `RuntimeError`: If the screen size cannot be determined - -**Returns**: - -A tuple with the width and height - - -### write - -```python -def write(text: str, *, chunk_size: int = 25, delay_in_ms: int = 75) -> None -``` - -Write the given text at the current cursor position. - -**Arguments**: - -- `text`: The text to write. -- `chunk_size`: The size of each chunk of text to write. -- `delay_in_ms`: The delay between each chunk of text. - - -### press - -```python -def press(key: str) -``` - -Press a key. - -**Arguments**: - -- `key`: The key to press (e.g. "enter", "space", "backspace", etc.). - - -### open - -```python -def open(file_or_url: str) -``` - -Open a file or a URL in the default application. - -**Arguments**: - -- `file_or_url`: The file or URL to open. - diff --git a/sdk-reference/desktop-python-sdk/v1.3.0/sandbox/page.mdx b/sdk-reference/desktop-python-sdk/v1.3.0/sandbox/page.mdx deleted file mode 100644 index f3c2632..0000000 --- a/sdk-reference/desktop-python-sdk/v1.3.0/sandbox/page.mdx +++ /dev/null @@ -1,255 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(SandboxBase) -``` - - -### \_\_init\_\_ - -```python -def __init__(resolution: Optional[Tuple[int, int]] = None, - dpi: Optional[int] = None, - display: Optional[str] = None, - template: Optional[str] = None, - timeout: Optional[int] = None, - metadata: Optional[Dict[str, str]] = None, - envs: Optional[Dict[str, str]] = None, - api_key: Optional[str] = None, - domain: Optional[str] = None, - debug: Optional[bool] = None, - sandbox_id: Optional[str] = None, - request_timeout: Optional[float] = None) -``` - -Create a new desktop sandbox. - -By default, the sandbox is created from the `desktop` template. - -**Arguments**: - -- `resolution`: Startup the desktop with custom screen resolution. Defaults to (1024, 768) -- `dpi`: Startup the desktop with custom DPI. Defaults to 96 -- `display`: Startup the desktop with custom display. Defaults to ":0" -- `template`: Sandbox template name or ID -- `timeout`: Timeout for the sandbox in **seconds**, default to 300 seconds. Maximum time a sandbox can be kept alive is 24 hours (86_400 seconds) for Pro users and 1 hour (3_600 seconds) for Hobby users -- `metadata`: Custom metadata for the sandbox -- `envs`: Custom environment variables for the sandbox -- `api_key`: E2B API Key to use for authentication, defaults to `E2B_API_KEY` environment variable -- `domain`: E2B domain to use for authentication, defaults to `E2B_DOMAIN` environment variable -- `debug`: If True, the sandbox will be created in debug mode, defaults to `E2B_DEBUG` environment variable -- `sandbox_id`: Sandbox ID to connect to, defaults to `E2B_SANDBOX_ID` environment variable -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -sandbox instance for the new sandbox - - -### screenshot - -```python -@overload -def screenshot(format: Literal["stream"]) -> Iterator[bytes] -``` - -Take a screenshot and return it as a stream of bytes. - - -### screenshot - -```python -@overload -def screenshot(format: Literal["bytes"]) -> bytearray -``` - -Take a screenshot and return it as a bytearray. - - -### screenshot - -```python -def screenshot(format: Literal["bytes", "stream"] = "bytes") -``` - -Take a screenshot and return it in the specified format. - -**Arguments**: - -- `format`: The format of the screenshot. Can be 'bytes', 'blob', or 'stream'. - -**Returns**: - -The screenshot in the specified format. - - -### left\_click - -```python -def left_click() -``` - -Left click on the current mouse position. - - -### double\_click - -```python -def double_click() -``` - -Double left click on the current mouse position. - - -### right\_click - -```python -def right_click() -``` - -Right click on the current mouse position. - - -### middle\_click - -```python -def middle_click() -``` - -Middle click on the current mouse position. - - -### scroll - -```python -def scroll(direction: Literal["up", "down"] = "down", amount: int = 1) -``` - -Scroll the mouse wheel by the given amount. - -**Arguments**: - -- `direction`: The direction to scroll. Can be "up" or "down". -- `amount`: The amount to scroll. - - -### move\_mouse - -```python -def move_mouse(x: int, y: int) -``` - -Move the mouse to the given coordinates. - -**Arguments**: - -- `x`: The x coordinate. -- `y`: The y coordinate. - - -### get\_cursor\_position - -```python -def get_cursor_position() -> tuple[int, int] -``` - -Get the current cursor position. - -**Raises**: - -- `RuntimeError`: If the cursor position cannot be determined - -**Returns**: - -A tuple with the x and y coordinates - - -### get\_screen\_size - -```python -def get_screen_size() -> tuple[int, int] -``` - -Get the current screen size. - -**Raises**: - -- `RuntimeError`: If the screen size cannot be determined - -**Returns**: - -A tuple with the width and height - - -### write - -```python -def write(text: str, *, chunk_size: int = 25, delay_in_ms: int = 75) -> None -``` - -Write the given text at the current cursor position. - -**Arguments**: - -- `text`: The text to write. -- `chunk_size`: The size of each chunk of text to write. -- `delay_in_ms`: The delay between each chunk of text. - - -### press - -```python -def press(key: str | list[str]) -``` - -Press a key. - -**Arguments**: - -- `key`: The key to press (e.g. "enter", "space", "backspace", etc.). - - -### drag - -```python -def drag(fr: tuple[int, int], to: tuple[int, int]) -``` - -Drag the mouse from the given position to the given position. - -**Arguments**: - -- `from`: The starting position. -- `to`: The ending position. - - -### wait - -```python -def wait(ms: int) -``` - -Wait for the given amount of time. - -**Arguments**: - -- `ms`: The amount of time to wait in milliseconds. - - -### open - -```python -def open(file_or_url: str) -``` - -Open a file or a URL in the default application. - -**Arguments**: - -- `file_or_url`: The file or URL to open. - diff --git a/sdk-reference/desktop-python-sdk/v1.4.0/sandbox/page.mdx b/sdk-reference/desktop-python-sdk/v1.4.0/sandbox/page.mdx deleted file mode 100644 index 89c24bc..0000000 --- a/sdk-reference/desktop-python-sdk/v1.4.0/sandbox/page.mdx +++ /dev/null @@ -1,273 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(SandboxBase) -``` - - -### \_\_init\_\_ - -```python -def __init__(resolution: Optional[Tuple[int, int]] = None, - dpi: Optional[int] = None, - display: Optional[str] = None, - template: Optional[str] = None, - timeout: Optional[int] = None, - metadata: Optional[Dict[str, str]] = None, - envs: Optional[Dict[str, str]] = None, - api_key: Optional[str] = None, - domain: Optional[str] = None, - debug: Optional[bool] = None, - sandbox_id: Optional[str] = None, - request_timeout: Optional[float] = None) -``` - -Create a new desktop sandbox. - -By default, the sandbox is created from the `desktop` template. - -**Arguments**: - -- `resolution`: Startup the desktop with custom screen resolution. Defaults to (1024, 768) -- `dpi`: Startup the desktop with custom DPI. Defaults to 96 -- `display`: Startup the desktop with custom display. Defaults to ":0" -- `template`: Sandbox template name or ID -- `timeout`: Timeout for the sandbox in **seconds**, default to 300 seconds. Maximum time a sandbox can be kept alive is 24 hours (86_400 seconds) for Pro users and 1 hour (3_600 seconds) for Hobby users -- `metadata`: Custom metadata for the sandbox -- `envs`: Custom environment variables for the sandbox -- `api_key`: E2B API Key to use for authentication, defaults to `E2B_API_KEY` environment variable -- `domain`: E2B domain to use for authentication, defaults to `E2B_DOMAIN` environment variable -- `debug`: If True, the sandbox will be created in debug mode, defaults to `E2B_DEBUG` environment variable -- `sandbox_id`: Sandbox ID to connect to, defaults to `E2B_SANDBOX_ID` environment variable -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -sandbox instance for the new sandbox - - -### screenshot - -```python -@overload -def screenshot(format: Literal["stream"]) -> Iterator[bytes] -``` - -Take a screenshot and return it as a stream of bytes. - - -### screenshot - -```python -@overload -def screenshot(format: Literal["bytes"]) -> bytearray -``` - -Take a screenshot and return it as a bytearray. - - -### screenshot - -```python -def screenshot(format: Literal["bytes", "stream"] = "bytes") -``` - -Take a screenshot and return it in the specified format. - -**Arguments**: - -- `format`: The format of the screenshot. Can be 'bytes', 'blob', or 'stream'. - -**Returns**: - -The screenshot in the specified format. - - -### left\_click - -```python -def left_click() -``` - -Left click on the current mouse position. - - -### double\_click - -```python -def double_click() -``` - -Double left click on the current mouse position. - - -### right\_click - -```python -def right_click() -``` - -Right click on the current mouse position. - - -### middle\_click - -```python -def middle_click() -``` - -Middle click on the current mouse position. - - -### scroll - -```python -def scroll(direction: Literal["up", "down"] = "down", amount: int = 1) -``` - -Scroll the mouse wheel by the given amount. - -**Arguments**: - -- `direction`: The direction to scroll. Can be "up" or "down". -- `amount`: The amount to scroll. - - -### move\_mouse - -```python -def move_mouse(x: int, y: int) -``` - -Move the mouse to the given coordinates. - -**Arguments**: - -- `x`: The x coordinate. -- `y`: The y coordinate. - - -### mouse\_press - -```python -def mouse_press(button: Literal["left", "right", "middle"] = "left") -``` - -Press the mouse button. - - -### mouse\_release - -```python -def mouse_release(button: Literal["left", "right", "middle"] = "left") -``` - -Release the mouse button. - - -### get\_cursor\_position - -```python -def get_cursor_position() -> tuple[int, int] -``` - -Get the current cursor position. - -**Raises**: - -- `RuntimeError`: If the cursor position cannot be determined - -**Returns**: - -A tuple with the x and y coordinates - - -### get\_screen\_size - -```python -def get_screen_size() -> tuple[int, int] -``` - -Get the current screen size. - -**Raises**: - -- `RuntimeError`: If the screen size cannot be determined - -**Returns**: - -A tuple with the width and height - - -### write - -```python -def write(text: str, *, chunk_size: int = 25, delay_in_ms: int = 75) -> None -``` - -Write the given text at the current cursor position. - -**Arguments**: - -- `text`: The text to write. -- `chunk_size`: The size of each chunk of text to write. -- `delay_in_ms`: The delay between each chunk of text. - - -### press - -```python -def press(key: str | list[str]) -``` - -Press a key. - -**Arguments**: - -- `key`: The key to press (e.g. "enter", "space", "backspace", etc.). - - -### drag - -```python -def drag(fr: tuple[int, int], to: tuple[int, int]) -``` - -Drag the mouse from the given position to the given position. - -**Arguments**: - -- `from`: The starting position. -- `to`: The ending position. - - -### wait - -```python -def wait(ms: int) -``` - -Wait for the given amount of time. - -**Arguments**: - -- `ms`: The amount of time to wait in milliseconds. - - -### open - -```python -def open(file_or_url: str) -``` - -Open a file or a URL in the default application. - -**Arguments**: - -- `file_or_url`: The file or URL to open. - diff --git a/sdk-reference/desktop-python-sdk/v1.5.0/sandbox/page.mdx b/sdk-reference/desktop-python-sdk/v1.5.0/sandbox/page.mdx deleted file mode 100644 index 89c24bc..0000000 --- a/sdk-reference/desktop-python-sdk/v1.5.0/sandbox/page.mdx +++ /dev/null @@ -1,273 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(SandboxBase) -``` - - -### \_\_init\_\_ - -```python -def __init__(resolution: Optional[Tuple[int, int]] = None, - dpi: Optional[int] = None, - display: Optional[str] = None, - template: Optional[str] = None, - timeout: Optional[int] = None, - metadata: Optional[Dict[str, str]] = None, - envs: Optional[Dict[str, str]] = None, - api_key: Optional[str] = None, - domain: Optional[str] = None, - debug: Optional[bool] = None, - sandbox_id: Optional[str] = None, - request_timeout: Optional[float] = None) -``` - -Create a new desktop sandbox. - -By default, the sandbox is created from the `desktop` template. - -**Arguments**: - -- `resolution`: Startup the desktop with custom screen resolution. Defaults to (1024, 768) -- `dpi`: Startup the desktop with custom DPI. Defaults to 96 -- `display`: Startup the desktop with custom display. Defaults to ":0" -- `template`: Sandbox template name or ID -- `timeout`: Timeout for the sandbox in **seconds**, default to 300 seconds. Maximum time a sandbox can be kept alive is 24 hours (86_400 seconds) for Pro users and 1 hour (3_600 seconds) for Hobby users -- `metadata`: Custom metadata for the sandbox -- `envs`: Custom environment variables for the sandbox -- `api_key`: E2B API Key to use for authentication, defaults to `E2B_API_KEY` environment variable -- `domain`: E2B domain to use for authentication, defaults to `E2B_DOMAIN` environment variable -- `debug`: If True, the sandbox will be created in debug mode, defaults to `E2B_DEBUG` environment variable -- `sandbox_id`: Sandbox ID to connect to, defaults to `E2B_SANDBOX_ID` environment variable -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -sandbox instance for the new sandbox - - -### screenshot - -```python -@overload -def screenshot(format: Literal["stream"]) -> Iterator[bytes] -``` - -Take a screenshot and return it as a stream of bytes. - - -### screenshot - -```python -@overload -def screenshot(format: Literal["bytes"]) -> bytearray -``` - -Take a screenshot and return it as a bytearray. - - -### screenshot - -```python -def screenshot(format: Literal["bytes", "stream"] = "bytes") -``` - -Take a screenshot and return it in the specified format. - -**Arguments**: - -- `format`: The format of the screenshot. Can be 'bytes', 'blob', or 'stream'. - -**Returns**: - -The screenshot in the specified format. - - -### left\_click - -```python -def left_click() -``` - -Left click on the current mouse position. - - -### double\_click - -```python -def double_click() -``` - -Double left click on the current mouse position. - - -### right\_click - -```python -def right_click() -``` - -Right click on the current mouse position. - - -### middle\_click - -```python -def middle_click() -``` - -Middle click on the current mouse position. - - -### scroll - -```python -def scroll(direction: Literal["up", "down"] = "down", amount: int = 1) -``` - -Scroll the mouse wheel by the given amount. - -**Arguments**: - -- `direction`: The direction to scroll. Can be "up" or "down". -- `amount`: The amount to scroll. - - -### move\_mouse - -```python -def move_mouse(x: int, y: int) -``` - -Move the mouse to the given coordinates. - -**Arguments**: - -- `x`: The x coordinate. -- `y`: The y coordinate. - - -### mouse\_press - -```python -def mouse_press(button: Literal["left", "right", "middle"] = "left") -``` - -Press the mouse button. - - -### mouse\_release - -```python -def mouse_release(button: Literal["left", "right", "middle"] = "left") -``` - -Release the mouse button. - - -### get\_cursor\_position - -```python -def get_cursor_position() -> tuple[int, int] -``` - -Get the current cursor position. - -**Raises**: - -- `RuntimeError`: If the cursor position cannot be determined - -**Returns**: - -A tuple with the x and y coordinates - - -### get\_screen\_size - -```python -def get_screen_size() -> tuple[int, int] -``` - -Get the current screen size. - -**Raises**: - -- `RuntimeError`: If the screen size cannot be determined - -**Returns**: - -A tuple with the width and height - - -### write - -```python -def write(text: str, *, chunk_size: int = 25, delay_in_ms: int = 75) -> None -``` - -Write the given text at the current cursor position. - -**Arguments**: - -- `text`: The text to write. -- `chunk_size`: The size of each chunk of text to write. -- `delay_in_ms`: The delay between each chunk of text. - - -### press - -```python -def press(key: str | list[str]) -``` - -Press a key. - -**Arguments**: - -- `key`: The key to press (e.g. "enter", "space", "backspace", etc.). - - -### drag - -```python -def drag(fr: tuple[int, int], to: tuple[int, int]) -``` - -Drag the mouse from the given position to the given position. - -**Arguments**: - -- `from`: The starting position. -- `to`: The ending position. - - -### wait - -```python -def wait(ms: int) -``` - -Wait for the given amount of time. - -**Arguments**: - -- `ms`: The amount of time to wait in milliseconds. - - -### open - -```python -def open(file_or_url: str) -``` - -Open a file or a URL in the default application. - -**Arguments**: - -- `file_or_url`: The file or URL to open. - diff --git a/sdk-reference/desktop-python-sdk/v1.5.1/sandbox/page.mdx b/sdk-reference/desktop-python-sdk/v1.5.1/sandbox/page.mdx deleted file mode 100644 index 89c24bc..0000000 --- a/sdk-reference/desktop-python-sdk/v1.5.1/sandbox/page.mdx +++ /dev/null @@ -1,273 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(SandboxBase) -``` - - -### \_\_init\_\_ - -```python -def __init__(resolution: Optional[Tuple[int, int]] = None, - dpi: Optional[int] = None, - display: Optional[str] = None, - template: Optional[str] = None, - timeout: Optional[int] = None, - metadata: Optional[Dict[str, str]] = None, - envs: Optional[Dict[str, str]] = None, - api_key: Optional[str] = None, - domain: Optional[str] = None, - debug: Optional[bool] = None, - sandbox_id: Optional[str] = None, - request_timeout: Optional[float] = None) -``` - -Create a new desktop sandbox. - -By default, the sandbox is created from the `desktop` template. - -**Arguments**: - -- `resolution`: Startup the desktop with custom screen resolution. Defaults to (1024, 768) -- `dpi`: Startup the desktop with custom DPI. Defaults to 96 -- `display`: Startup the desktop with custom display. Defaults to ":0" -- `template`: Sandbox template name or ID -- `timeout`: Timeout for the sandbox in **seconds**, default to 300 seconds. Maximum time a sandbox can be kept alive is 24 hours (86_400 seconds) for Pro users and 1 hour (3_600 seconds) for Hobby users -- `metadata`: Custom metadata for the sandbox -- `envs`: Custom environment variables for the sandbox -- `api_key`: E2B API Key to use for authentication, defaults to `E2B_API_KEY` environment variable -- `domain`: E2B domain to use for authentication, defaults to `E2B_DOMAIN` environment variable -- `debug`: If True, the sandbox will be created in debug mode, defaults to `E2B_DEBUG` environment variable -- `sandbox_id`: Sandbox ID to connect to, defaults to `E2B_SANDBOX_ID` environment variable -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -sandbox instance for the new sandbox - - -### screenshot - -```python -@overload -def screenshot(format: Literal["stream"]) -> Iterator[bytes] -``` - -Take a screenshot and return it as a stream of bytes. - - -### screenshot - -```python -@overload -def screenshot(format: Literal["bytes"]) -> bytearray -``` - -Take a screenshot and return it as a bytearray. - - -### screenshot - -```python -def screenshot(format: Literal["bytes", "stream"] = "bytes") -``` - -Take a screenshot and return it in the specified format. - -**Arguments**: - -- `format`: The format of the screenshot. Can be 'bytes', 'blob', or 'stream'. - -**Returns**: - -The screenshot in the specified format. - - -### left\_click - -```python -def left_click() -``` - -Left click on the current mouse position. - - -### double\_click - -```python -def double_click() -``` - -Double left click on the current mouse position. - - -### right\_click - -```python -def right_click() -``` - -Right click on the current mouse position. - - -### middle\_click - -```python -def middle_click() -``` - -Middle click on the current mouse position. - - -### scroll - -```python -def scroll(direction: Literal["up", "down"] = "down", amount: int = 1) -``` - -Scroll the mouse wheel by the given amount. - -**Arguments**: - -- `direction`: The direction to scroll. Can be "up" or "down". -- `amount`: The amount to scroll. - - -### move\_mouse - -```python -def move_mouse(x: int, y: int) -``` - -Move the mouse to the given coordinates. - -**Arguments**: - -- `x`: The x coordinate. -- `y`: The y coordinate. - - -### mouse\_press - -```python -def mouse_press(button: Literal["left", "right", "middle"] = "left") -``` - -Press the mouse button. - - -### mouse\_release - -```python -def mouse_release(button: Literal["left", "right", "middle"] = "left") -``` - -Release the mouse button. - - -### get\_cursor\_position - -```python -def get_cursor_position() -> tuple[int, int] -``` - -Get the current cursor position. - -**Raises**: - -- `RuntimeError`: If the cursor position cannot be determined - -**Returns**: - -A tuple with the x and y coordinates - - -### get\_screen\_size - -```python -def get_screen_size() -> tuple[int, int] -``` - -Get the current screen size. - -**Raises**: - -- `RuntimeError`: If the screen size cannot be determined - -**Returns**: - -A tuple with the width and height - - -### write - -```python -def write(text: str, *, chunk_size: int = 25, delay_in_ms: int = 75) -> None -``` - -Write the given text at the current cursor position. - -**Arguments**: - -- `text`: The text to write. -- `chunk_size`: The size of each chunk of text to write. -- `delay_in_ms`: The delay between each chunk of text. - - -### press - -```python -def press(key: str | list[str]) -``` - -Press a key. - -**Arguments**: - -- `key`: The key to press (e.g. "enter", "space", "backspace", etc.). - - -### drag - -```python -def drag(fr: tuple[int, int], to: tuple[int, int]) -``` - -Drag the mouse from the given position to the given position. - -**Arguments**: - -- `from`: The starting position. -- `to`: The ending position. - - -### wait - -```python -def wait(ms: int) -``` - -Wait for the given amount of time. - -**Arguments**: - -- `ms`: The amount of time to wait in milliseconds. - - -### open - -```python -def open(file_or_url: str) -``` - -Open a file or a URL in the default application. - -**Arguments**: - -- `file_or_url`: The file or URL to open. - diff --git a/sdk-reference/desktop-python-sdk/v1.5.2/sandbox/page.mdx b/sdk-reference/desktop-python-sdk/v1.5.2/sandbox/page.mdx deleted file mode 100644 index 88e0f0c..0000000 --- a/sdk-reference/desktop-python-sdk/v1.5.2/sandbox/page.mdx +++ /dev/null @@ -1,264 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(SandboxBase) -``` - - -### \_\_init\_\_ - -```python -def __init__(resolution: Optional[Tuple[int, int]] = None, - dpi: Optional[int] = None, - display: Optional[str] = None, - template: Optional[str] = None, - timeout: Optional[int] = None, - metadata: Optional[Dict[str, str]] = None, - envs: Optional[Dict[str, str]] = None, - api_key: Optional[str] = None, - domain: Optional[str] = None, - debug: Optional[bool] = None, - sandbox_id: Optional[str] = None, - request_timeout: Optional[float] = None) -``` - -Create a new desktop sandbox. - -By default, the sandbox is created from the `desktop` template. - -**Arguments**: - -- `resolution`: Startup the desktop with custom screen resolution. Defaults to (1024, 768) -- `dpi`: Startup the desktop with custom DPI. Defaults to 96 -- `display`: Startup the desktop with custom display. Defaults to ":0" -- `template`: Sandbox template name or ID -- `timeout`: Timeout for the sandbox in **seconds**, default to 300 seconds. Maximum time a sandbox can be kept alive is 24 hours (86_400 seconds) for Pro users and 1 hour (3_600 seconds) for Hobby users -- `metadata`: Custom metadata for the sandbox -- `envs`: Custom environment variables for the sandbox -- `api_key`: E2B API Key to use for authentication, defaults to `E2B_API_KEY` environment variable -- `domain`: E2B domain to use for authentication, defaults to `E2B_DOMAIN` environment variable -- `debug`: If True, the sandbox will be created in debug mode, defaults to `E2B_DEBUG` environment variable -- `sandbox_id`: Sandbox ID to connect to, defaults to `E2B_SANDBOX_ID` environment variable -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -sandbox instance for the new sandbox - - -### screenshot - -```python -@overload -def screenshot(format: Literal["stream"]) -> Iterator[bytes] -``` - -Take a screenshot and return it as a stream of bytes. - - -### screenshot - -```python -@overload -def screenshot(format: Literal["bytes"]) -> bytearray -``` - -Take a screenshot and return it as a bytearray. - - -### screenshot - -```python -def screenshot(format: Literal["bytes", "stream"] = "bytes") -``` - -Take a screenshot and return it in the specified format. - -**Arguments**: - -- `format`: The format of the screenshot. Can be 'bytes', 'blob', or 'stream'. - -**Returns**: - -The screenshot in the specified format. - - -### left\_click - -```python -def left_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Left click on the mouse position. - - -### double\_click - -```python -def double_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Double left click on the mouse position. - - -### middle\_click - -```python -def middle_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Middle click on the mouse position. - - -### scroll - -```python -def scroll(direction: Literal["up", "down"] = "down", amount: int = 1) -``` - -Scroll the mouse wheel by the given amount. - -**Arguments**: - -- `direction`: The direction to scroll. Can be "up" or "down". -- `amount`: The amount to scroll. - - -### move\_mouse - -```python -def move_mouse(x: int, y: int) -``` - -Move the mouse to the given coordinates. - -**Arguments**: - -- `x`: The x coordinate. -- `y`: The y coordinate. - - -### mouse\_press - -```python -def mouse_press(button: Literal["left", "right", "middle"] = "left") -``` - -Press the mouse button. - - -### mouse\_release - -```python -def mouse_release(button: Literal["left", "right", "middle"] = "left") -``` - -Release the mouse button. - - -### get\_cursor\_position - -```python -def get_cursor_position() -> tuple[int, int] -``` - -Get the current cursor position. - -**Raises**: - -- `RuntimeError`: If the cursor position cannot be determined - -**Returns**: - -A tuple with the x and y coordinates - - -### get\_screen\_size - -```python -def get_screen_size() -> tuple[int, int] -``` - -Get the current screen size. - -**Raises**: - -- `RuntimeError`: If the screen size cannot be determined - -**Returns**: - -A tuple with the width and height - - -### write - -```python -def write(text: str, *, chunk_size: int = 25, delay_in_ms: int = 75) -> None -``` - -Write the given text at the current cursor position. - -**Arguments**: - -- `text`: The text to write. -- `chunk_size`: The size of each chunk of text to write. -- `delay_in_ms`: The delay between each chunk of text. - - -### press - -```python -def press(key: str | list[str]) -``` - -Press a key. - -**Arguments**: - -- `key`: The key to press (e.g. "enter", "space", "backspace", etc.). - - -### drag - -```python -def drag(fr: tuple[int, int], to: tuple[int, int]) -``` - -Drag the mouse from the given position to the given position. - -**Arguments**: - -- `from`: The starting position. -- `to`: The ending position. - - -### wait - -```python -def wait(ms: int) -``` - -Wait for the given amount of time. - -**Arguments**: - -- `ms`: The amount of time to wait in milliseconds. - - -### open - -```python -def open(file_or_url: str) -``` - -Open a file or a URL in the default application. - -**Arguments**: - -- `file_or_url`: The file or URL to open. - diff --git a/sdk-reference/desktop-python-sdk/v1.6.0/sandbox/page.mdx b/sdk-reference/desktop-python-sdk/v1.6.0/sandbox/page.mdx deleted file mode 100644 index 88e0f0c..0000000 --- a/sdk-reference/desktop-python-sdk/v1.6.0/sandbox/page.mdx +++ /dev/null @@ -1,264 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(SandboxBase) -``` - - -### \_\_init\_\_ - -```python -def __init__(resolution: Optional[Tuple[int, int]] = None, - dpi: Optional[int] = None, - display: Optional[str] = None, - template: Optional[str] = None, - timeout: Optional[int] = None, - metadata: Optional[Dict[str, str]] = None, - envs: Optional[Dict[str, str]] = None, - api_key: Optional[str] = None, - domain: Optional[str] = None, - debug: Optional[bool] = None, - sandbox_id: Optional[str] = None, - request_timeout: Optional[float] = None) -``` - -Create a new desktop sandbox. - -By default, the sandbox is created from the `desktop` template. - -**Arguments**: - -- `resolution`: Startup the desktop with custom screen resolution. Defaults to (1024, 768) -- `dpi`: Startup the desktop with custom DPI. Defaults to 96 -- `display`: Startup the desktop with custom display. Defaults to ":0" -- `template`: Sandbox template name or ID -- `timeout`: Timeout for the sandbox in **seconds**, default to 300 seconds. Maximum time a sandbox can be kept alive is 24 hours (86_400 seconds) for Pro users and 1 hour (3_600 seconds) for Hobby users -- `metadata`: Custom metadata for the sandbox -- `envs`: Custom environment variables for the sandbox -- `api_key`: E2B API Key to use for authentication, defaults to `E2B_API_KEY` environment variable -- `domain`: E2B domain to use for authentication, defaults to `E2B_DOMAIN` environment variable -- `debug`: If True, the sandbox will be created in debug mode, defaults to `E2B_DEBUG` environment variable -- `sandbox_id`: Sandbox ID to connect to, defaults to `E2B_SANDBOX_ID` environment variable -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -sandbox instance for the new sandbox - - -### screenshot - -```python -@overload -def screenshot(format: Literal["stream"]) -> Iterator[bytes] -``` - -Take a screenshot and return it as a stream of bytes. - - -### screenshot - -```python -@overload -def screenshot(format: Literal["bytes"]) -> bytearray -``` - -Take a screenshot and return it as a bytearray. - - -### screenshot - -```python -def screenshot(format: Literal["bytes", "stream"] = "bytes") -``` - -Take a screenshot and return it in the specified format. - -**Arguments**: - -- `format`: The format of the screenshot. Can be 'bytes', 'blob', or 'stream'. - -**Returns**: - -The screenshot in the specified format. - - -### left\_click - -```python -def left_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Left click on the mouse position. - - -### double\_click - -```python -def double_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Double left click on the mouse position. - - -### middle\_click - -```python -def middle_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Middle click on the mouse position. - - -### scroll - -```python -def scroll(direction: Literal["up", "down"] = "down", amount: int = 1) -``` - -Scroll the mouse wheel by the given amount. - -**Arguments**: - -- `direction`: The direction to scroll. Can be "up" or "down". -- `amount`: The amount to scroll. - - -### move\_mouse - -```python -def move_mouse(x: int, y: int) -``` - -Move the mouse to the given coordinates. - -**Arguments**: - -- `x`: The x coordinate. -- `y`: The y coordinate. - - -### mouse\_press - -```python -def mouse_press(button: Literal["left", "right", "middle"] = "left") -``` - -Press the mouse button. - - -### mouse\_release - -```python -def mouse_release(button: Literal["left", "right", "middle"] = "left") -``` - -Release the mouse button. - - -### get\_cursor\_position - -```python -def get_cursor_position() -> tuple[int, int] -``` - -Get the current cursor position. - -**Raises**: - -- `RuntimeError`: If the cursor position cannot be determined - -**Returns**: - -A tuple with the x and y coordinates - - -### get\_screen\_size - -```python -def get_screen_size() -> tuple[int, int] -``` - -Get the current screen size. - -**Raises**: - -- `RuntimeError`: If the screen size cannot be determined - -**Returns**: - -A tuple with the width and height - - -### write - -```python -def write(text: str, *, chunk_size: int = 25, delay_in_ms: int = 75) -> None -``` - -Write the given text at the current cursor position. - -**Arguments**: - -- `text`: The text to write. -- `chunk_size`: The size of each chunk of text to write. -- `delay_in_ms`: The delay between each chunk of text. - - -### press - -```python -def press(key: str | list[str]) -``` - -Press a key. - -**Arguments**: - -- `key`: The key to press (e.g. "enter", "space", "backspace", etc.). - - -### drag - -```python -def drag(fr: tuple[int, int], to: tuple[int, int]) -``` - -Drag the mouse from the given position to the given position. - -**Arguments**: - -- `from`: The starting position. -- `to`: The ending position. - - -### wait - -```python -def wait(ms: int) -``` - -Wait for the given amount of time. - -**Arguments**: - -- `ms`: The amount of time to wait in milliseconds. - - -### open - -```python -def open(file_or_url: str) -``` - -Open a file or a URL in the default application. - -**Arguments**: - -- `file_or_url`: The file or URL to open. - diff --git a/sdk-reference/desktop-python-sdk/v1.6.1/sandbox/page.mdx b/sdk-reference/desktop-python-sdk/v1.6.1/sandbox/page.mdx deleted file mode 100644 index 88e0f0c..0000000 --- a/sdk-reference/desktop-python-sdk/v1.6.1/sandbox/page.mdx +++ /dev/null @@ -1,264 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(SandboxBase) -``` - - -### \_\_init\_\_ - -```python -def __init__(resolution: Optional[Tuple[int, int]] = None, - dpi: Optional[int] = None, - display: Optional[str] = None, - template: Optional[str] = None, - timeout: Optional[int] = None, - metadata: Optional[Dict[str, str]] = None, - envs: Optional[Dict[str, str]] = None, - api_key: Optional[str] = None, - domain: Optional[str] = None, - debug: Optional[bool] = None, - sandbox_id: Optional[str] = None, - request_timeout: Optional[float] = None) -``` - -Create a new desktop sandbox. - -By default, the sandbox is created from the `desktop` template. - -**Arguments**: - -- `resolution`: Startup the desktop with custom screen resolution. Defaults to (1024, 768) -- `dpi`: Startup the desktop with custom DPI. Defaults to 96 -- `display`: Startup the desktop with custom display. Defaults to ":0" -- `template`: Sandbox template name or ID -- `timeout`: Timeout for the sandbox in **seconds**, default to 300 seconds. Maximum time a sandbox can be kept alive is 24 hours (86_400 seconds) for Pro users and 1 hour (3_600 seconds) for Hobby users -- `metadata`: Custom metadata for the sandbox -- `envs`: Custom environment variables for the sandbox -- `api_key`: E2B API Key to use for authentication, defaults to `E2B_API_KEY` environment variable -- `domain`: E2B domain to use for authentication, defaults to `E2B_DOMAIN` environment variable -- `debug`: If True, the sandbox will be created in debug mode, defaults to `E2B_DEBUG` environment variable -- `sandbox_id`: Sandbox ID to connect to, defaults to `E2B_SANDBOX_ID` environment variable -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -sandbox instance for the new sandbox - - -### screenshot - -```python -@overload -def screenshot(format: Literal["stream"]) -> Iterator[bytes] -``` - -Take a screenshot and return it as a stream of bytes. - - -### screenshot - -```python -@overload -def screenshot(format: Literal["bytes"]) -> bytearray -``` - -Take a screenshot and return it as a bytearray. - - -### screenshot - -```python -def screenshot(format: Literal["bytes", "stream"] = "bytes") -``` - -Take a screenshot and return it in the specified format. - -**Arguments**: - -- `format`: The format of the screenshot. Can be 'bytes', 'blob', or 'stream'. - -**Returns**: - -The screenshot in the specified format. - - -### left\_click - -```python -def left_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Left click on the mouse position. - - -### double\_click - -```python -def double_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Double left click on the mouse position. - - -### middle\_click - -```python -def middle_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Middle click on the mouse position. - - -### scroll - -```python -def scroll(direction: Literal["up", "down"] = "down", amount: int = 1) -``` - -Scroll the mouse wheel by the given amount. - -**Arguments**: - -- `direction`: The direction to scroll. Can be "up" or "down". -- `amount`: The amount to scroll. - - -### move\_mouse - -```python -def move_mouse(x: int, y: int) -``` - -Move the mouse to the given coordinates. - -**Arguments**: - -- `x`: The x coordinate. -- `y`: The y coordinate. - - -### mouse\_press - -```python -def mouse_press(button: Literal["left", "right", "middle"] = "left") -``` - -Press the mouse button. - - -### mouse\_release - -```python -def mouse_release(button: Literal["left", "right", "middle"] = "left") -``` - -Release the mouse button. - - -### get\_cursor\_position - -```python -def get_cursor_position() -> tuple[int, int] -``` - -Get the current cursor position. - -**Raises**: - -- `RuntimeError`: If the cursor position cannot be determined - -**Returns**: - -A tuple with the x and y coordinates - - -### get\_screen\_size - -```python -def get_screen_size() -> tuple[int, int] -``` - -Get the current screen size. - -**Raises**: - -- `RuntimeError`: If the screen size cannot be determined - -**Returns**: - -A tuple with the width and height - - -### write - -```python -def write(text: str, *, chunk_size: int = 25, delay_in_ms: int = 75) -> None -``` - -Write the given text at the current cursor position. - -**Arguments**: - -- `text`: The text to write. -- `chunk_size`: The size of each chunk of text to write. -- `delay_in_ms`: The delay between each chunk of text. - - -### press - -```python -def press(key: str | list[str]) -``` - -Press a key. - -**Arguments**: - -- `key`: The key to press (e.g. "enter", "space", "backspace", etc.). - - -### drag - -```python -def drag(fr: tuple[int, int], to: tuple[int, int]) -``` - -Drag the mouse from the given position to the given position. - -**Arguments**: - -- `from`: The starting position. -- `to`: The ending position. - - -### wait - -```python -def wait(ms: int) -``` - -Wait for the given amount of time. - -**Arguments**: - -- `ms`: The amount of time to wait in milliseconds. - - -### open - -```python -def open(file_or_url: str) -``` - -Open a file or a URL in the default application. - -**Arguments**: - -- `file_or_url`: The file or URL to open. - diff --git a/sdk-reference/desktop-python-sdk/v1.6.2/sandbox/page.mdx b/sdk-reference/desktop-python-sdk/v1.6.2/sandbox/page.mdx deleted file mode 100644 index 4201da6..0000000 --- a/sdk-reference/desktop-python-sdk/v1.6.2/sandbox/page.mdx +++ /dev/null @@ -1,291 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(SandboxBase) -``` - - -### \_\_init\_\_ - -```python -def __init__(resolution: Optional[Tuple[int, int]] = None, - dpi: Optional[int] = None, - display: Optional[str] = None, - template: Optional[str] = None, - timeout: Optional[int] = None, - metadata: Optional[Dict[str, str]] = None, - envs: Optional[Dict[str, str]] = None, - api_key: Optional[str] = None, - domain: Optional[str] = None, - debug: Optional[bool] = None, - sandbox_id: Optional[str] = None, - request_timeout: Optional[float] = None) -``` - -Create a new desktop sandbox. - -By default, the sandbox is created from the `desktop` template. - -**Arguments**: - -- `resolution`: Startup the desktop with custom screen resolution. Defaults to (1024, 768) -- `dpi`: Startup the desktop with custom DPI. Defaults to 96 -- `display`: Startup the desktop with custom display. Defaults to ":0" -- `template`: Sandbox template name or ID -- `timeout`: Timeout for the sandbox in **seconds**, default to 300 seconds. Maximum time a sandbox can be kept alive is 24 hours (86_400 seconds) for Pro users and 1 hour (3_600 seconds) for Hobby users -- `metadata`: Custom metadata for the sandbox -- `envs`: Custom environment variables for the sandbox -- `api_key`: E2B API Key to use for authentication, defaults to `E2B_API_KEY` environment variable -- `domain`: E2B domain to use for authentication, defaults to `E2B_DOMAIN` environment variable -- `debug`: If True, the sandbox will be created in debug mode, defaults to `E2B_DEBUG` environment variable -- `sandbox_id`: Sandbox ID to connect to, defaults to `E2B_SANDBOX_ID` environment variable -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -sandbox instance for the new sandbox - - -### screenshot - -```python -@overload -def screenshot(format: Literal["stream"]) -> Iterator[bytes] -``` - -Take a screenshot and return it as a stream of bytes. - - -### screenshot - -```python -@overload -def screenshot(format: Literal["bytes"]) -> bytearray -``` - -Take a screenshot and return it as a bytearray. - - -### screenshot - -```python -def screenshot(format: Literal["bytes", "stream"] = "bytes") -``` - -Take a screenshot and return it in the specified format. - -**Arguments**: - -- `format`: The format of the screenshot. Can be 'bytes', 'blob', or 'stream'. - -**Returns**: - -The screenshot in the specified format. - - -### left\_click - -```python -def left_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Left click on the mouse position. - - -### double\_click - -```python -def double_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Double left click on the mouse position. - - -### middle\_click - -```python -def middle_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Middle click on the mouse position. - - -### scroll - -```python -def scroll(direction: Literal["up", "down"] = "down", amount: int = 1) -``` - -Scroll the mouse wheel by the given amount. - -**Arguments**: - -- `direction`: The direction to scroll. Can be "up" or "down". -- `amount`: The amount to scroll. - - -### move\_mouse - -```python -def move_mouse(x: int, y: int) -``` - -Move the mouse to the given coordinates. - -**Arguments**: - -- `x`: The x coordinate. -- `y`: The y coordinate. - - -### mouse\_press - -```python -def mouse_press(button: Literal["left", "right", "middle"] = "left") -``` - -Press the mouse button. - - -### mouse\_release - -```python -def mouse_release(button: Literal["left", "right", "middle"] = "left") -``` - -Release the mouse button. - - -### get\_cursor\_position - -```python -def get_cursor_position() -> tuple[int, int] -``` - -Get the current cursor position. - -**Raises**: - -- `RuntimeError`: If the cursor position cannot be determined - -**Returns**: - -A tuple with the x and y coordinates - - -### get\_screen\_size - -```python -def get_screen_size() -> tuple[int, int] -``` - -Get the current screen size. - -**Raises**: - -- `RuntimeError`: If the screen size cannot be determined - -**Returns**: - -A tuple with the width and height - - -### write - -```python -def write(text: str, *, chunk_size: int = 25, delay_in_ms: int = 75) -> None -``` - -Write the given text at the current cursor position. - -**Arguments**: - -- `text`: The text to write. -- `chunk_size`: The size of each chunk of text to write. -- `delay_in_ms`: The delay between each chunk of text. - - -### press - -```python -def press(key: str | list[str]) -``` - -Press a key. - -**Arguments**: - -- `key`: The key to press (e.g. "enter", "space", "backspace", etc.). - - -### drag - -```python -def drag(fr: tuple[int, int], to: tuple[int, int]) -``` - -Drag the mouse from the given position to the given position. - -**Arguments**: - -- `from`: The starting position. -- `to`: The ending position. - - -### wait - -```python -def wait(ms: int) -``` - -Wait for the given amount of time. - -**Arguments**: - -- `ms`: The amount of time to wait in milliseconds. - - -### open - -```python -def open(file_or_url: str) -``` - -Open a file or a URL in the default application. - -**Arguments**: - -- `file_or_url`: The file or URL to open. - - -### get\_current\_window\_id - -```python -def get_current_window_id() -> str -``` - -Get the current window ID. - - -### get\_application\_windows - -```python -def get_application_windows(application: str) -> list[str] -``` - -Get the window IDs of all windows for the given application. - - -### get\_window\_title - -```python -def get_window_title(window_id: str) -> str -``` - -Get the title of the window with the given ID. - diff --git a/sdk-reference/desktop-python-sdk/v1.6.3/sandbox/page.mdx b/sdk-reference/desktop-python-sdk/v1.6.3/sandbox/page.mdx deleted file mode 100644 index 4201da6..0000000 --- a/sdk-reference/desktop-python-sdk/v1.6.3/sandbox/page.mdx +++ /dev/null @@ -1,291 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(SandboxBase) -``` - - -### \_\_init\_\_ - -```python -def __init__(resolution: Optional[Tuple[int, int]] = None, - dpi: Optional[int] = None, - display: Optional[str] = None, - template: Optional[str] = None, - timeout: Optional[int] = None, - metadata: Optional[Dict[str, str]] = None, - envs: Optional[Dict[str, str]] = None, - api_key: Optional[str] = None, - domain: Optional[str] = None, - debug: Optional[bool] = None, - sandbox_id: Optional[str] = None, - request_timeout: Optional[float] = None) -``` - -Create a new desktop sandbox. - -By default, the sandbox is created from the `desktop` template. - -**Arguments**: - -- `resolution`: Startup the desktop with custom screen resolution. Defaults to (1024, 768) -- `dpi`: Startup the desktop with custom DPI. Defaults to 96 -- `display`: Startup the desktop with custom display. Defaults to ":0" -- `template`: Sandbox template name or ID -- `timeout`: Timeout for the sandbox in **seconds**, default to 300 seconds. Maximum time a sandbox can be kept alive is 24 hours (86_400 seconds) for Pro users and 1 hour (3_600 seconds) for Hobby users -- `metadata`: Custom metadata for the sandbox -- `envs`: Custom environment variables for the sandbox -- `api_key`: E2B API Key to use for authentication, defaults to `E2B_API_KEY` environment variable -- `domain`: E2B domain to use for authentication, defaults to `E2B_DOMAIN` environment variable -- `debug`: If True, the sandbox will be created in debug mode, defaults to `E2B_DEBUG` environment variable -- `sandbox_id`: Sandbox ID to connect to, defaults to `E2B_SANDBOX_ID` environment variable -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -sandbox instance for the new sandbox - - -### screenshot - -```python -@overload -def screenshot(format: Literal["stream"]) -> Iterator[bytes] -``` - -Take a screenshot and return it as a stream of bytes. - - -### screenshot - -```python -@overload -def screenshot(format: Literal["bytes"]) -> bytearray -``` - -Take a screenshot and return it as a bytearray. - - -### screenshot - -```python -def screenshot(format: Literal["bytes", "stream"] = "bytes") -``` - -Take a screenshot and return it in the specified format. - -**Arguments**: - -- `format`: The format of the screenshot. Can be 'bytes', 'blob', or 'stream'. - -**Returns**: - -The screenshot in the specified format. - - -### left\_click - -```python -def left_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Left click on the mouse position. - - -### double\_click - -```python -def double_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Double left click on the mouse position. - - -### middle\_click - -```python -def middle_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Middle click on the mouse position. - - -### scroll - -```python -def scroll(direction: Literal["up", "down"] = "down", amount: int = 1) -``` - -Scroll the mouse wheel by the given amount. - -**Arguments**: - -- `direction`: The direction to scroll. Can be "up" or "down". -- `amount`: The amount to scroll. - - -### move\_mouse - -```python -def move_mouse(x: int, y: int) -``` - -Move the mouse to the given coordinates. - -**Arguments**: - -- `x`: The x coordinate. -- `y`: The y coordinate. - - -### mouse\_press - -```python -def mouse_press(button: Literal["left", "right", "middle"] = "left") -``` - -Press the mouse button. - - -### mouse\_release - -```python -def mouse_release(button: Literal["left", "right", "middle"] = "left") -``` - -Release the mouse button. - - -### get\_cursor\_position - -```python -def get_cursor_position() -> tuple[int, int] -``` - -Get the current cursor position. - -**Raises**: - -- `RuntimeError`: If the cursor position cannot be determined - -**Returns**: - -A tuple with the x and y coordinates - - -### get\_screen\_size - -```python -def get_screen_size() -> tuple[int, int] -``` - -Get the current screen size. - -**Raises**: - -- `RuntimeError`: If the screen size cannot be determined - -**Returns**: - -A tuple with the width and height - - -### write - -```python -def write(text: str, *, chunk_size: int = 25, delay_in_ms: int = 75) -> None -``` - -Write the given text at the current cursor position. - -**Arguments**: - -- `text`: The text to write. -- `chunk_size`: The size of each chunk of text to write. -- `delay_in_ms`: The delay between each chunk of text. - - -### press - -```python -def press(key: str | list[str]) -``` - -Press a key. - -**Arguments**: - -- `key`: The key to press (e.g. "enter", "space", "backspace", etc.). - - -### drag - -```python -def drag(fr: tuple[int, int], to: tuple[int, int]) -``` - -Drag the mouse from the given position to the given position. - -**Arguments**: - -- `from`: The starting position. -- `to`: The ending position. - - -### wait - -```python -def wait(ms: int) -``` - -Wait for the given amount of time. - -**Arguments**: - -- `ms`: The amount of time to wait in milliseconds. - - -### open - -```python -def open(file_or_url: str) -``` - -Open a file or a URL in the default application. - -**Arguments**: - -- `file_or_url`: The file or URL to open. - - -### get\_current\_window\_id - -```python -def get_current_window_id() -> str -``` - -Get the current window ID. - - -### get\_application\_windows - -```python -def get_application_windows(application: str) -> list[str] -``` - -Get the window IDs of all windows for the given application. - - -### get\_window\_title - -```python -def get_window_title(window_id: str) -> str -``` - -Get the title of the window with the given ID. - diff --git a/sdk-reference/desktop-python-sdk/v1.6.4/sandbox/page.mdx b/sdk-reference/desktop-python-sdk/v1.6.4/sandbox/page.mdx deleted file mode 100644 index b5b5193..0000000 --- a/sdk-reference/desktop-python-sdk/v1.6.4/sandbox/page.mdx +++ /dev/null @@ -1,291 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(SandboxBase) -``` - - -### \_\_init\_\_ - -```python -def __init__(resolution: Optional[Tuple[int, int]] = None, - dpi: Optional[int] = None, - display: Optional[str] = None, - template: Optional[str] = None, - timeout: Optional[int] = None, - metadata: Optional[Dict[str, str]] = None, - envs: Optional[Dict[str, str]] = None, - api_key: Optional[str] = None, - domain: Optional[str] = None, - debug: Optional[bool] = None, - sandbox_id: Optional[str] = None, - request_timeout: Optional[float] = None) -``` - -Create a new desktop sandbox. - -By default, the sandbox is created from the `desktop` template. - -**Arguments**: - -- `resolution`: Startup the desktop with custom screen resolution. Defaults to (1024, 768) -- `dpi`: Startup the desktop with custom DPI. Defaults to 96 -- `display`: Startup the desktop with custom display. Defaults to ":0" -- `template`: Sandbox template name or ID -- `timeout`: Timeout for the sandbox in **seconds**, default to 300 seconds. Maximum time a sandbox can be kept alive is 24 hours (86_400 seconds) for Pro users and 1 hour (3_600 seconds) for Hobby users -- `metadata`: Custom metadata for the sandbox -- `envs`: Custom environment variables for the sandbox -- `api_key`: E2B API Key to use for authentication, defaults to `E2B_API_KEY` environment variable -- `domain`: E2B domain to use for authentication, defaults to `E2B_DOMAIN` environment variable -- `debug`: If True, the sandbox will be created in debug mode, defaults to `E2B_DEBUG` environment variable -- `sandbox_id`: Sandbox ID to connect to, defaults to `E2B_SANDBOX_ID` environment variable -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -sandbox instance for the new sandbox - - -### screenshot - -```python -@overload -def screenshot(format: Literal["stream"]) -> Iterator[bytes] -``` - -Take a screenshot and return it as a stream of bytes. - - -### screenshot - -```python -@overload -def screenshot(format: Literal["bytes"]) -> bytearray -``` - -Take a screenshot and return it as a bytearray. - - -### screenshot - -```python -def screenshot(format: Literal["bytes", "stream"] = "bytes") -``` - -Take a screenshot and return it in the specified format. - -**Arguments**: - -- `format`: The format of the screenshot. Can be 'bytes', 'blob', or 'stream'. - -**Returns**: - -The screenshot in the specified format. - - -### left\_click - -```python -def left_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Left click on the mouse position. - - -### double\_click - -```python -def double_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Double left click on the mouse position. - - -### middle\_click - -```python -def middle_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Middle click on the mouse position. - - -### scroll - -```python -def scroll(direction: Literal["up", "down"] = "down", amount: int = 1) -``` - -Scroll the mouse wheel by the given amount. - -**Arguments**: - -- `direction`: The direction to scroll. Can be "up" or "down". -- `amount`: The amount to scroll. - - -### move\_mouse - -```python -def move_mouse(x: int, y: int) -``` - -Move the mouse to the given coordinates. - -**Arguments**: - -- `x`: The x coordinate. -- `y`: The y coordinate. - - -### mouse\_press - -```python -def mouse_press(button: Literal["left", "right", "middle"] = "left") -``` - -Press the mouse button. - - -### mouse\_release - -```python -def mouse_release(button: Literal["left", "right", "middle"] = "left") -``` - -Release the mouse button. - - -### get\_cursor\_position - -```python -def get_cursor_position() -> tuple[int, int] -``` - -Get the current cursor position. - -**Raises**: - -- `RuntimeError`: If the cursor position cannot be determined - -**Returns**: - -A tuple with the x and y coordinates - - -### get\_screen\_size - -```python -def get_screen_size() -> tuple[int, int] -``` - -Get the current screen size. - -**Raises**: - -- `RuntimeError`: If the screen size cannot be determined - -**Returns**: - -A tuple with the width and height - - -### write - -```python -def write(text: str, *, chunk_size: int = 25, delay_in_ms: int = 75) -> None -``` - -Write the given text at the current cursor position. - -**Arguments**: - -- `text`: The text to write. -- `chunk_size`: The size of each chunk of text to write. -- `delay_in_ms`: The delay between each chunk of text. - - -### press - -```python -def press(key: Union[str, list[str]]) -``` - -Press a key. - -**Arguments**: - -- `key`: The key to press (e.g. "enter", "space", "backspace", etc.). - - -### drag - -```python -def drag(fr: tuple[int, int], to: tuple[int, int]) -``` - -Drag the mouse from the given position to the given position. - -**Arguments**: - -- `from`: The starting position. -- `to`: The ending position. - - -### wait - -```python -def wait(ms: int) -``` - -Wait for the given amount of time. - -**Arguments**: - -- `ms`: The amount of time to wait in milliseconds. - - -### open - -```python -def open(file_or_url: str) -``` - -Open a file or a URL in the default application. - -**Arguments**: - -- `file_or_url`: The file or URL to open. - - -### get\_current\_window\_id - -```python -def get_current_window_id() -> str -``` - -Get the current window ID. - - -### get\_application\_windows - -```python -def get_application_windows(application: str) -> list[str] -``` - -Get the window IDs of all windows for the given application. - - -### get\_window\_title - -```python -def get_window_title(window_id: str) -> str -``` - -Get the title of the window with the given ID. - diff --git a/sdk-reference/desktop-python-sdk/v1.6.5/sandbox/page.mdx b/sdk-reference/desktop-python-sdk/v1.6.5/sandbox/page.mdx deleted file mode 100644 index b5b5193..0000000 --- a/sdk-reference/desktop-python-sdk/v1.6.5/sandbox/page.mdx +++ /dev/null @@ -1,291 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(SandboxBase) -``` - - -### \_\_init\_\_ - -```python -def __init__(resolution: Optional[Tuple[int, int]] = None, - dpi: Optional[int] = None, - display: Optional[str] = None, - template: Optional[str] = None, - timeout: Optional[int] = None, - metadata: Optional[Dict[str, str]] = None, - envs: Optional[Dict[str, str]] = None, - api_key: Optional[str] = None, - domain: Optional[str] = None, - debug: Optional[bool] = None, - sandbox_id: Optional[str] = None, - request_timeout: Optional[float] = None) -``` - -Create a new desktop sandbox. - -By default, the sandbox is created from the `desktop` template. - -**Arguments**: - -- `resolution`: Startup the desktop with custom screen resolution. Defaults to (1024, 768) -- `dpi`: Startup the desktop with custom DPI. Defaults to 96 -- `display`: Startup the desktop with custom display. Defaults to ":0" -- `template`: Sandbox template name or ID -- `timeout`: Timeout for the sandbox in **seconds**, default to 300 seconds. Maximum time a sandbox can be kept alive is 24 hours (86_400 seconds) for Pro users and 1 hour (3_600 seconds) for Hobby users -- `metadata`: Custom metadata for the sandbox -- `envs`: Custom environment variables for the sandbox -- `api_key`: E2B API Key to use for authentication, defaults to `E2B_API_KEY` environment variable -- `domain`: E2B domain to use for authentication, defaults to `E2B_DOMAIN` environment variable -- `debug`: If True, the sandbox will be created in debug mode, defaults to `E2B_DEBUG` environment variable -- `sandbox_id`: Sandbox ID to connect to, defaults to `E2B_SANDBOX_ID` environment variable -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -sandbox instance for the new sandbox - - -### screenshot - -```python -@overload -def screenshot(format: Literal["stream"]) -> Iterator[bytes] -``` - -Take a screenshot and return it as a stream of bytes. - - -### screenshot - -```python -@overload -def screenshot(format: Literal["bytes"]) -> bytearray -``` - -Take a screenshot and return it as a bytearray. - - -### screenshot - -```python -def screenshot(format: Literal["bytes", "stream"] = "bytes") -``` - -Take a screenshot and return it in the specified format. - -**Arguments**: - -- `format`: The format of the screenshot. Can be 'bytes', 'blob', or 'stream'. - -**Returns**: - -The screenshot in the specified format. - - -### left\_click - -```python -def left_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Left click on the mouse position. - - -### double\_click - -```python -def double_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Double left click on the mouse position. - - -### middle\_click - -```python -def middle_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Middle click on the mouse position. - - -### scroll - -```python -def scroll(direction: Literal["up", "down"] = "down", amount: int = 1) -``` - -Scroll the mouse wheel by the given amount. - -**Arguments**: - -- `direction`: The direction to scroll. Can be "up" or "down". -- `amount`: The amount to scroll. - - -### move\_mouse - -```python -def move_mouse(x: int, y: int) -``` - -Move the mouse to the given coordinates. - -**Arguments**: - -- `x`: The x coordinate. -- `y`: The y coordinate. - - -### mouse\_press - -```python -def mouse_press(button: Literal["left", "right", "middle"] = "left") -``` - -Press the mouse button. - - -### mouse\_release - -```python -def mouse_release(button: Literal["left", "right", "middle"] = "left") -``` - -Release the mouse button. - - -### get\_cursor\_position - -```python -def get_cursor_position() -> tuple[int, int] -``` - -Get the current cursor position. - -**Raises**: - -- `RuntimeError`: If the cursor position cannot be determined - -**Returns**: - -A tuple with the x and y coordinates - - -### get\_screen\_size - -```python -def get_screen_size() -> tuple[int, int] -``` - -Get the current screen size. - -**Raises**: - -- `RuntimeError`: If the screen size cannot be determined - -**Returns**: - -A tuple with the width and height - - -### write - -```python -def write(text: str, *, chunk_size: int = 25, delay_in_ms: int = 75) -> None -``` - -Write the given text at the current cursor position. - -**Arguments**: - -- `text`: The text to write. -- `chunk_size`: The size of each chunk of text to write. -- `delay_in_ms`: The delay between each chunk of text. - - -### press - -```python -def press(key: Union[str, list[str]]) -``` - -Press a key. - -**Arguments**: - -- `key`: The key to press (e.g. "enter", "space", "backspace", etc.). - - -### drag - -```python -def drag(fr: tuple[int, int], to: tuple[int, int]) -``` - -Drag the mouse from the given position to the given position. - -**Arguments**: - -- `from`: The starting position. -- `to`: The ending position. - - -### wait - -```python -def wait(ms: int) -``` - -Wait for the given amount of time. - -**Arguments**: - -- `ms`: The amount of time to wait in milliseconds. - - -### open - -```python -def open(file_or_url: str) -``` - -Open a file or a URL in the default application. - -**Arguments**: - -- `file_or_url`: The file or URL to open. - - -### get\_current\_window\_id - -```python -def get_current_window_id() -> str -``` - -Get the current window ID. - - -### get\_application\_windows - -```python -def get_application_windows(application: str) -> list[str] -``` - -Get the window IDs of all windows for the given application. - - -### get\_window\_title - -```python -def get_window_title(window_id: str) -> str -``` - -Get the title of the window with the given ID. - diff --git a/sdk-reference/desktop-python-sdk/v1.7.0/sandbox/page.mdx b/sdk-reference/desktop-python-sdk/v1.7.0/sandbox/page.mdx deleted file mode 100644 index 8fee2dc..0000000 --- a/sdk-reference/desktop-python-sdk/v1.7.0/sandbox/page.mdx +++ /dev/null @@ -1,300 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(SandboxBase) -``` - - -### \_\_init\_\_ - -```python -def __init__(resolution: Optional[Tuple[int, int]] = None, - dpi: Optional[int] = None, - display: Optional[str] = None, - template: Optional[str] = None, - timeout: Optional[int] = None, - metadata: Optional[Dict[str, str]] = None, - envs: Optional[Dict[str, str]] = None, - api_key: Optional[str] = None, - domain: Optional[str] = None, - debug: Optional[bool] = None, - sandbox_id: Optional[str] = None, - request_timeout: Optional[float] = None) -``` - -Create a new desktop sandbox. - -By default, the sandbox is created from the `desktop` template. - -**Arguments**: - -- `resolution`: Startup the desktop with custom screen resolution. Defaults to (1024, 768) -- `dpi`: Startup the desktop with custom DPI. Defaults to 96 -- `display`: Startup the desktop with custom display. Defaults to ":0" -- `template`: Sandbox template name or ID -- `timeout`: Timeout for the sandbox in **seconds**, default to 300 seconds. Maximum time a sandbox can be kept alive is 24 hours (86_400 seconds) for Pro users and 1 hour (3_600 seconds) for Hobby users -- `metadata`: Custom metadata for the sandbox -- `envs`: Custom environment variables for the sandbox -- `api_key`: E2B API Key to use for authentication, defaults to `E2B_API_KEY` environment variable -- `domain`: E2B domain to use for authentication, defaults to `E2B_DOMAIN` environment variable -- `debug`: If True, the sandbox will be created in debug mode, defaults to `E2B_DEBUG` environment variable -- `sandbox_id`: Sandbox ID to connect to, defaults to `E2B_SANDBOX_ID` environment variable -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -sandbox instance for the new sandbox - - -### screenshot - -```python -@overload -def screenshot(format: Literal["stream"]) -> Iterator[bytes] -``` - -Take a screenshot and return it as a stream of bytes. - - -### screenshot - -```python -@overload -def screenshot(format: Literal["bytes"]) -> bytearray -``` - -Take a screenshot and return it as a bytearray. - - -### screenshot - -```python -def screenshot(format: Literal["bytes", "stream"] = "bytes") -``` - -Take a screenshot and return it in the specified format. - -**Arguments**: - -- `format`: The format of the screenshot. Can be 'bytes', 'blob', or 'stream'. - -**Returns**: - -The screenshot in the specified format. - - -### left\_click - -```python -def left_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Left click on the mouse position. - - -### double\_click - -```python -def double_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Double left click on the mouse position. - - -### middle\_click - -```python -def middle_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Middle click on the mouse position. - - -### scroll - -```python -def scroll(direction: Literal["up", "down"] = "down", amount: int = 1) -``` - -Scroll the mouse wheel by the given amount. - -**Arguments**: - -- `direction`: The direction to scroll. Can be "up" or "down". -- `amount`: The amount to scroll. - - -### move\_mouse - -```python -def move_mouse(x: int, y: int) -``` - -Move the mouse to the given coordinates. - -**Arguments**: - -- `x`: The x coordinate. -- `y`: The y coordinate. - - -### mouse\_press - -```python -def mouse_press(button: Literal["left", "right", "middle"] = "left") -``` - -Press the mouse button. - - -### mouse\_release - -```python -def mouse_release(button: Literal["left", "right", "middle"] = "left") -``` - -Release the mouse button. - - -### get\_cursor\_position - -```python -def get_cursor_position() -> tuple[int, int] -``` - -Get the current cursor position. - -**Raises**: - -- `RuntimeError`: If the cursor position cannot be determined - -**Returns**: - -A tuple with the x and y coordinates - - -### get\_screen\_size - -```python -def get_screen_size() -> tuple[int, int] -``` - -Get the current screen size. - -**Raises**: - -- `RuntimeError`: If the screen size cannot be determined - -**Returns**: - -A tuple with the width and height - - -### write - -```python -def write(text: str, *, chunk_size: int = 25, delay_in_ms: int = 75) -> None -``` - -Write the given text at the current cursor position. - -**Arguments**: - -- `text`: The text to write. -- `chunk_size`: The size of each chunk of text to write. -- `delay_in_ms`: The delay between each chunk of text. - - -### press - -```python -def press(key: Union[str, list[str]]) -``` - -Press a key. - -**Arguments**: - -- `key`: The key to press (e.g. "enter", "space", "backspace", etc.). - - -### drag - -```python -def drag(fr: tuple[int, int], to: tuple[int, int]) -``` - -Drag the mouse from the given position to the given position. - -**Arguments**: - -- `from`: The starting position. -- `to`: The ending position. - - -### wait - -```python -def wait(ms: int) -``` - -Wait for the given amount of time. - -**Arguments**: - -- `ms`: The amount of time to wait in milliseconds. - - -### open - -```python -def open(file_or_url: str) -``` - -Open a file or a URL in the default application. - -**Arguments**: - -- `file_or_url`: The file or URL to open. - - -### get\_current\_window\_id - -```python -def get_current_window_id() -> str -``` - -Get the current window ID. - - -### get\_application\_windows - -```python -def get_application_windows(application: str) -> list[str] -``` - -Get the window IDs of all windows for the given application. - - -### get\_window\_title - -```python -def get_window_title(window_id: str) -> str -``` - -Get the title of the window with the given ID. - - -### launch - -```python -def launch(application: str, uri: Optional[str] = None) -``` - -Launch an application. - diff --git a/sdk-reference/desktop-python-sdk/v1.7.1/sandbox/page.mdx b/sdk-reference/desktop-python-sdk/v1.7.1/sandbox/page.mdx deleted file mode 100644 index 8fee2dc..0000000 --- a/sdk-reference/desktop-python-sdk/v1.7.1/sandbox/page.mdx +++ /dev/null @@ -1,300 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(SandboxBase) -``` - - -### \_\_init\_\_ - -```python -def __init__(resolution: Optional[Tuple[int, int]] = None, - dpi: Optional[int] = None, - display: Optional[str] = None, - template: Optional[str] = None, - timeout: Optional[int] = None, - metadata: Optional[Dict[str, str]] = None, - envs: Optional[Dict[str, str]] = None, - api_key: Optional[str] = None, - domain: Optional[str] = None, - debug: Optional[bool] = None, - sandbox_id: Optional[str] = None, - request_timeout: Optional[float] = None) -``` - -Create a new desktop sandbox. - -By default, the sandbox is created from the `desktop` template. - -**Arguments**: - -- `resolution`: Startup the desktop with custom screen resolution. Defaults to (1024, 768) -- `dpi`: Startup the desktop with custom DPI. Defaults to 96 -- `display`: Startup the desktop with custom display. Defaults to ":0" -- `template`: Sandbox template name or ID -- `timeout`: Timeout for the sandbox in **seconds**, default to 300 seconds. Maximum time a sandbox can be kept alive is 24 hours (86_400 seconds) for Pro users and 1 hour (3_600 seconds) for Hobby users -- `metadata`: Custom metadata for the sandbox -- `envs`: Custom environment variables for the sandbox -- `api_key`: E2B API Key to use for authentication, defaults to `E2B_API_KEY` environment variable -- `domain`: E2B domain to use for authentication, defaults to `E2B_DOMAIN` environment variable -- `debug`: If True, the sandbox will be created in debug mode, defaults to `E2B_DEBUG` environment variable -- `sandbox_id`: Sandbox ID to connect to, defaults to `E2B_SANDBOX_ID` environment variable -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -sandbox instance for the new sandbox - - -### screenshot - -```python -@overload -def screenshot(format: Literal["stream"]) -> Iterator[bytes] -``` - -Take a screenshot and return it as a stream of bytes. - - -### screenshot - -```python -@overload -def screenshot(format: Literal["bytes"]) -> bytearray -``` - -Take a screenshot and return it as a bytearray. - - -### screenshot - -```python -def screenshot(format: Literal["bytes", "stream"] = "bytes") -``` - -Take a screenshot and return it in the specified format. - -**Arguments**: - -- `format`: The format of the screenshot. Can be 'bytes', 'blob', or 'stream'. - -**Returns**: - -The screenshot in the specified format. - - -### left\_click - -```python -def left_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Left click on the mouse position. - - -### double\_click - -```python -def double_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Double left click on the mouse position. - - -### middle\_click - -```python -def middle_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Middle click on the mouse position. - - -### scroll - -```python -def scroll(direction: Literal["up", "down"] = "down", amount: int = 1) -``` - -Scroll the mouse wheel by the given amount. - -**Arguments**: - -- `direction`: The direction to scroll. Can be "up" or "down". -- `amount`: The amount to scroll. - - -### move\_mouse - -```python -def move_mouse(x: int, y: int) -``` - -Move the mouse to the given coordinates. - -**Arguments**: - -- `x`: The x coordinate. -- `y`: The y coordinate. - - -### mouse\_press - -```python -def mouse_press(button: Literal["left", "right", "middle"] = "left") -``` - -Press the mouse button. - - -### mouse\_release - -```python -def mouse_release(button: Literal["left", "right", "middle"] = "left") -``` - -Release the mouse button. - - -### get\_cursor\_position - -```python -def get_cursor_position() -> tuple[int, int] -``` - -Get the current cursor position. - -**Raises**: - -- `RuntimeError`: If the cursor position cannot be determined - -**Returns**: - -A tuple with the x and y coordinates - - -### get\_screen\_size - -```python -def get_screen_size() -> tuple[int, int] -``` - -Get the current screen size. - -**Raises**: - -- `RuntimeError`: If the screen size cannot be determined - -**Returns**: - -A tuple with the width and height - - -### write - -```python -def write(text: str, *, chunk_size: int = 25, delay_in_ms: int = 75) -> None -``` - -Write the given text at the current cursor position. - -**Arguments**: - -- `text`: The text to write. -- `chunk_size`: The size of each chunk of text to write. -- `delay_in_ms`: The delay between each chunk of text. - - -### press - -```python -def press(key: Union[str, list[str]]) -``` - -Press a key. - -**Arguments**: - -- `key`: The key to press (e.g. "enter", "space", "backspace", etc.). - - -### drag - -```python -def drag(fr: tuple[int, int], to: tuple[int, int]) -``` - -Drag the mouse from the given position to the given position. - -**Arguments**: - -- `from`: The starting position. -- `to`: The ending position. - - -### wait - -```python -def wait(ms: int) -``` - -Wait for the given amount of time. - -**Arguments**: - -- `ms`: The amount of time to wait in milliseconds. - - -### open - -```python -def open(file_or_url: str) -``` - -Open a file or a URL in the default application. - -**Arguments**: - -- `file_or_url`: The file or URL to open. - - -### get\_current\_window\_id - -```python -def get_current_window_id() -> str -``` - -Get the current window ID. - - -### get\_application\_windows - -```python -def get_application_windows(application: str) -> list[str] -``` - -Get the window IDs of all windows for the given application. - - -### get\_window\_title - -```python -def get_window_title(window_id: str) -> str -``` - -Get the title of the window with the given ID. - - -### launch - -```python -def launch(application: str, uri: Optional[str] = None) -``` - -Launch an application. - diff --git a/sdk-reference/desktop-python-sdk/v1.7.2/sandbox/page.mdx b/sdk-reference/desktop-python-sdk/v1.7.2/sandbox/page.mdx deleted file mode 100644 index b0dccd7..0000000 --- a/sdk-reference/desktop-python-sdk/v1.7.2/sandbox/page.mdx +++ /dev/null @@ -1,302 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(SandboxBase) -``` - - -### \_\_init\_\_ - -```python -def __init__(resolution: Optional[Tuple[int, int]] = None, - dpi: Optional[int] = None, - display: Optional[str] = None, - template: Optional[str] = None, - timeout: Optional[int] = None, - metadata: Optional[Dict[str, str]] = None, - envs: Optional[Dict[str, str]] = None, - api_key: Optional[str] = None, - domain: Optional[str] = None, - debug: Optional[bool] = None, - sandbox_id: Optional[str] = None, - request_timeout: Optional[float] = None, - proxy: Optional[ProxyTypes] = None) -``` - -Create a new desktop sandbox. - -By default, the sandbox is created from the `desktop` template. - -**Arguments**: - -- `resolution`: Startup the desktop with custom screen resolution. Defaults to (1024, 768) -- `dpi`: Startup the desktop with custom DPI. Defaults to 96 -- `display`: Startup the desktop with custom display. Defaults to ":0" -- `template`: Sandbox template name or ID -- `timeout`: Timeout for the sandbox in **seconds**, default to 300 seconds. Maximum time a sandbox can be kept alive is 24 hours (86_400 seconds) for Pro users and 1 hour (3_600 seconds) for Hobby users -- `metadata`: Custom metadata for the sandbox -- `envs`: Custom environment variables for the sandbox -- `api_key`: E2B API Key to use for authentication, defaults to `E2B_API_KEY` environment variable -- `domain`: E2B domain to use for authentication, defaults to `E2B_DOMAIN` environment variable -- `debug`: If True, the sandbox will be created in debug mode, defaults to `E2B_DEBUG` environment variable -- `sandbox_id`: Sandbox ID to connect to, defaults to `E2B_SANDBOX_ID` environment variable -- `request_timeout`: Timeout for the request in **seconds** -- `proxy`: Proxy to use for the request and for the requests made to the returned sandbox - -**Returns**: - -sandbox instance for the new sandbox - - -### screenshot - -```python -@overload -def screenshot(format: Literal["stream"]) -> Iterator[bytes] -``` - -Take a screenshot and return it as a stream of bytes. - - -### screenshot - -```python -@overload -def screenshot(format: Literal["bytes"]) -> bytearray -``` - -Take a screenshot and return it as a bytearray. - - -### screenshot - -```python -def screenshot(format: Literal["bytes", "stream"] = "bytes") -``` - -Take a screenshot and return it in the specified format. - -**Arguments**: - -- `format`: The format of the screenshot. Can be 'bytes', 'blob', or 'stream'. - -**Returns**: - -The screenshot in the specified format. - - -### left\_click - -```python -def left_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Left click on the mouse position. - - -### double\_click - -```python -def double_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Double left click on the mouse position. - - -### middle\_click - -```python -def middle_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Middle click on the mouse position. - - -### scroll - -```python -def scroll(direction: Literal["up", "down"] = "down", amount: int = 1) -``` - -Scroll the mouse wheel by the given amount. - -**Arguments**: - -- `direction`: The direction to scroll. Can be "up" or "down". -- `amount`: The amount to scroll. - - -### move\_mouse - -```python -def move_mouse(x: int, y: int) -``` - -Move the mouse to the given coordinates. - -**Arguments**: - -- `x`: The x coordinate. -- `y`: The y coordinate. - - -### mouse\_press - -```python -def mouse_press(button: Literal["left", "right", "middle"] = "left") -``` - -Press the mouse button. - - -### mouse\_release - -```python -def mouse_release(button: Literal["left", "right", "middle"] = "left") -``` - -Release the mouse button. - - -### get\_cursor\_position - -```python -def get_cursor_position() -> tuple[int, int] -``` - -Get the current cursor position. - -**Raises**: - -- `RuntimeError`: If the cursor position cannot be determined - -**Returns**: - -A tuple with the x and y coordinates - - -### get\_screen\_size - -```python -def get_screen_size() -> tuple[int, int] -``` - -Get the current screen size. - -**Raises**: - -- `RuntimeError`: If the screen size cannot be determined - -**Returns**: - -A tuple with the width and height - - -### write - -```python -def write(text: str, *, chunk_size: int = 25, delay_in_ms: int = 75) -> None -``` - -Write the given text at the current cursor position. - -**Arguments**: - -- `text`: The text to write. -- `chunk_size`: The size of each chunk of text to write. -- `delay_in_ms`: The delay between each chunk of text. - - -### press - -```python -def press(key: Union[str, list[str]]) -``` - -Press a key. - -**Arguments**: - -- `key`: The key to press (e.g. "enter", "space", "backspace", etc.). - - -### drag - -```python -def drag(fr: tuple[int, int], to: tuple[int, int]) -``` - -Drag the mouse from the given position to the given position. - -**Arguments**: - -- `from`: The starting position. -- `to`: The ending position. - - -### wait - -```python -def wait(ms: int) -``` - -Wait for the given amount of time. - -**Arguments**: - -- `ms`: The amount of time to wait in milliseconds. - - -### open - -```python -def open(file_or_url: str) -``` - -Open a file or a URL in the default application. - -**Arguments**: - -- `file_or_url`: The file or URL to open. - - -### get\_current\_window\_id - -```python -def get_current_window_id() -> str -``` - -Get the current window ID. - - -### get\_application\_windows - -```python -def get_application_windows(application: str) -> list[str] -``` - -Get the window IDs of all windows for the given application. - - -### get\_window\_title - -```python -def get_window_title(window_id: str) -> str -``` - -Get the title of the window with the given ID. - - -### launch - -```python -def launch(application: str, uri: Optional[str] = None) -``` - -Launch an application. - diff --git a/sdk-reference/desktop-python-sdk/v1.7.3/sandbox/page.mdx b/sdk-reference/desktop-python-sdk/v1.7.3/sandbox/page.mdx deleted file mode 100644 index b0dccd7..0000000 --- a/sdk-reference/desktop-python-sdk/v1.7.3/sandbox/page.mdx +++ /dev/null @@ -1,302 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(SandboxBase) -``` - - -### \_\_init\_\_ - -```python -def __init__(resolution: Optional[Tuple[int, int]] = None, - dpi: Optional[int] = None, - display: Optional[str] = None, - template: Optional[str] = None, - timeout: Optional[int] = None, - metadata: Optional[Dict[str, str]] = None, - envs: Optional[Dict[str, str]] = None, - api_key: Optional[str] = None, - domain: Optional[str] = None, - debug: Optional[bool] = None, - sandbox_id: Optional[str] = None, - request_timeout: Optional[float] = None, - proxy: Optional[ProxyTypes] = None) -``` - -Create a new desktop sandbox. - -By default, the sandbox is created from the `desktop` template. - -**Arguments**: - -- `resolution`: Startup the desktop with custom screen resolution. Defaults to (1024, 768) -- `dpi`: Startup the desktop with custom DPI. Defaults to 96 -- `display`: Startup the desktop with custom display. Defaults to ":0" -- `template`: Sandbox template name or ID -- `timeout`: Timeout for the sandbox in **seconds**, default to 300 seconds. Maximum time a sandbox can be kept alive is 24 hours (86_400 seconds) for Pro users and 1 hour (3_600 seconds) for Hobby users -- `metadata`: Custom metadata for the sandbox -- `envs`: Custom environment variables for the sandbox -- `api_key`: E2B API Key to use for authentication, defaults to `E2B_API_KEY` environment variable -- `domain`: E2B domain to use for authentication, defaults to `E2B_DOMAIN` environment variable -- `debug`: If True, the sandbox will be created in debug mode, defaults to `E2B_DEBUG` environment variable -- `sandbox_id`: Sandbox ID to connect to, defaults to `E2B_SANDBOX_ID` environment variable -- `request_timeout`: Timeout for the request in **seconds** -- `proxy`: Proxy to use for the request and for the requests made to the returned sandbox - -**Returns**: - -sandbox instance for the new sandbox - - -### screenshot - -```python -@overload -def screenshot(format: Literal["stream"]) -> Iterator[bytes] -``` - -Take a screenshot and return it as a stream of bytes. - - -### screenshot - -```python -@overload -def screenshot(format: Literal["bytes"]) -> bytearray -``` - -Take a screenshot and return it as a bytearray. - - -### screenshot - -```python -def screenshot(format: Literal["bytes", "stream"] = "bytes") -``` - -Take a screenshot and return it in the specified format. - -**Arguments**: - -- `format`: The format of the screenshot. Can be 'bytes', 'blob', or 'stream'. - -**Returns**: - -The screenshot in the specified format. - - -### left\_click - -```python -def left_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Left click on the mouse position. - - -### double\_click - -```python -def double_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Double left click on the mouse position. - - -### middle\_click - -```python -def middle_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Middle click on the mouse position. - - -### scroll - -```python -def scroll(direction: Literal["up", "down"] = "down", amount: int = 1) -``` - -Scroll the mouse wheel by the given amount. - -**Arguments**: - -- `direction`: The direction to scroll. Can be "up" or "down". -- `amount`: The amount to scroll. - - -### move\_mouse - -```python -def move_mouse(x: int, y: int) -``` - -Move the mouse to the given coordinates. - -**Arguments**: - -- `x`: The x coordinate. -- `y`: The y coordinate. - - -### mouse\_press - -```python -def mouse_press(button: Literal["left", "right", "middle"] = "left") -``` - -Press the mouse button. - - -### mouse\_release - -```python -def mouse_release(button: Literal["left", "right", "middle"] = "left") -``` - -Release the mouse button. - - -### get\_cursor\_position - -```python -def get_cursor_position() -> tuple[int, int] -``` - -Get the current cursor position. - -**Raises**: - -- `RuntimeError`: If the cursor position cannot be determined - -**Returns**: - -A tuple with the x and y coordinates - - -### get\_screen\_size - -```python -def get_screen_size() -> tuple[int, int] -``` - -Get the current screen size. - -**Raises**: - -- `RuntimeError`: If the screen size cannot be determined - -**Returns**: - -A tuple with the width and height - - -### write - -```python -def write(text: str, *, chunk_size: int = 25, delay_in_ms: int = 75) -> None -``` - -Write the given text at the current cursor position. - -**Arguments**: - -- `text`: The text to write. -- `chunk_size`: The size of each chunk of text to write. -- `delay_in_ms`: The delay between each chunk of text. - - -### press - -```python -def press(key: Union[str, list[str]]) -``` - -Press a key. - -**Arguments**: - -- `key`: The key to press (e.g. "enter", "space", "backspace", etc.). - - -### drag - -```python -def drag(fr: tuple[int, int], to: tuple[int, int]) -``` - -Drag the mouse from the given position to the given position. - -**Arguments**: - -- `from`: The starting position. -- `to`: The ending position. - - -### wait - -```python -def wait(ms: int) -``` - -Wait for the given amount of time. - -**Arguments**: - -- `ms`: The amount of time to wait in milliseconds. - - -### open - -```python -def open(file_or_url: str) -``` - -Open a file or a URL in the default application. - -**Arguments**: - -- `file_or_url`: The file or URL to open. - - -### get\_current\_window\_id - -```python -def get_current_window_id() -> str -``` - -Get the current window ID. - - -### get\_application\_windows - -```python -def get_application_windows(application: str) -> list[str] -``` - -Get the window IDs of all windows for the given application. - - -### get\_window\_title - -```python -def get_window_title(window_id: str) -> str -``` - -Get the title of the window with the given ID. - - -### launch - -```python -def launch(application: str, uri: Optional[str] = None) -``` - -Launch an application. - diff --git a/sdk-reference/desktop-python-sdk/v1.7.4/sandbox/page.mdx b/sdk-reference/desktop-python-sdk/v1.7.4/sandbox/page.mdx deleted file mode 100644 index b0dccd7..0000000 --- a/sdk-reference/desktop-python-sdk/v1.7.4/sandbox/page.mdx +++ /dev/null @@ -1,302 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(SandboxBase) -``` - - -### \_\_init\_\_ - -```python -def __init__(resolution: Optional[Tuple[int, int]] = None, - dpi: Optional[int] = None, - display: Optional[str] = None, - template: Optional[str] = None, - timeout: Optional[int] = None, - metadata: Optional[Dict[str, str]] = None, - envs: Optional[Dict[str, str]] = None, - api_key: Optional[str] = None, - domain: Optional[str] = None, - debug: Optional[bool] = None, - sandbox_id: Optional[str] = None, - request_timeout: Optional[float] = None, - proxy: Optional[ProxyTypes] = None) -``` - -Create a new desktop sandbox. - -By default, the sandbox is created from the `desktop` template. - -**Arguments**: - -- `resolution`: Startup the desktop with custom screen resolution. Defaults to (1024, 768) -- `dpi`: Startup the desktop with custom DPI. Defaults to 96 -- `display`: Startup the desktop with custom display. Defaults to ":0" -- `template`: Sandbox template name or ID -- `timeout`: Timeout for the sandbox in **seconds**, default to 300 seconds. Maximum time a sandbox can be kept alive is 24 hours (86_400 seconds) for Pro users and 1 hour (3_600 seconds) for Hobby users -- `metadata`: Custom metadata for the sandbox -- `envs`: Custom environment variables for the sandbox -- `api_key`: E2B API Key to use for authentication, defaults to `E2B_API_KEY` environment variable -- `domain`: E2B domain to use for authentication, defaults to `E2B_DOMAIN` environment variable -- `debug`: If True, the sandbox will be created in debug mode, defaults to `E2B_DEBUG` environment variable -- `sandbox_id`: Sandbox ID to connect to, defaults to `E2B_SANDBOX_ID` environment variable -- `request_timeout`: Timeout for the request in **seconds** -- `proxy`: Proxy to use for the request and for the requests made to the returned sandbox - -**Returns**: - -sandbox instance for the new sandbox - - -### screenshot - -```python -@overload -def screenshot(format: Literal["stream"]) -> Iterator[bytes] -``` - -Take a screenshot and return it as a stream of bytes. - - -### screenshot - -```python -@overload -def screenshot(format: Literal["bytes"]) -> bytearray -``` - -Take a screenshot and return it as a bytearray. - - -### screenshot - -```python -def screenshot(format: Literal["bytes", "stream"] = "bytes") -``` - -Take a screenshot and return it in the specified format. - -**Arguments**: - -- `format`: The format of the screenshot. Can be 'bytes', 'blob', or 'stream'. - -**Returns**: - -The screenshot in the specified format. - - -### left\_click - -```python -def left_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Left click on the mouse position. - - -### double\_click - -```python -def double_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Double left click on the mouse position. - - -### middle\_click - -```python -def middle_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Middle click on the mouse position. - - -### scroll - -```python -def scroll(direction: Literal["up", "down"] = "down", amount: int = 1) -``` - -Scroll the mouse wheel by the given amount. - -**Arguments**: - -- `direction`: The direction to scroll. Can be "up" or "down". -- `amount`: The amount to scroll. - - -### move\_mouse - -```python -def move_mouse(x: int, y: int) -``` - -Move the mouse to the given coordinates. - -**Arguments**: - -- `x`: The x coordinate. -- `y`: The y coordinate. - - -### mouse\_press - -```python -def mouse_press(button: Literal["left", "right", "middle"] = "left") -``` - -Press the mouse button. - - -### mouse\_release - -```python -def mouse_release(button: Literal["left", "right", "middle"] = "left") -``` - -Release the mouse button. - - -### get\_cursor\_position - -```python -def get_cursor_position() -> tuple[int, int] -``` - -Get the current cursor position. - -**Raises**: - -- `RuntimeError`: If the cursor position cannot be determined - -**Returns**: - -A tuple with the x and y coordinates - - -### get\_screen\_size - -```python -def get_screen_size() -> tuple[int, int] -``` - -Get the current screen size. - -**Raises**: - -- `RuntimeError`: If the screen size cannot be determined - -**Returns**: - -A tuple with the width and height - - -### write - -```python -def write(text: str, *, chunk_size: int = 25, delay_in_ms: int = 75) -> None -``` - -Write the given text at the current cursor position. - -**Arguments**: - -- `text`: The text to write. -- `chunk_size`: The size of each chunk of text to write. -- `delay_in_ms`: The delay between each chunk of text. - - -### press - -```python -def press(key: Union[str, list[str]]) -``` - -Press a key. - -**Arguments**: - -- `key`: The key to press (e.g. "enter", "space", "backspace", etc.). - - -### drag - -```python -def drag(fr: tuple[int, int], to: tuple[int, int]) -``` - -Drag the mouse from the given position to the given position. - -**Arguments**: - -- `from`: The starting position. -- `to`: The ending position. - - -### wait - -```python -def wait(ms: int) -``` - -Wait for the given amount of time. - -**Arguments**: - -- `ms`: The amount of time to wait in milliseconds. - - -### open - -```python -def open(file_or_url: str) -``` - -Open a file or a URL in the default application. - -**Arguments**: - -- `file_or_url`: The file or URL to open. - - -### get\_current\_window\_id - -```python -def get_current_window_id() -> str -``` - -Get the current window ID. - - -### get\_application\_windows - -```python -def get_application_windows(application: str) -> list[str] -``` - -Get the window IDs of all windows for the given application. - - -### get\_window\_title - -```python -def get_window_title(window_id: str) -> str -``` - -Get the title of the window with the given ID. - - -### launch - -```python -def launch(application: str, uri: Optional[str] = None) -``` - -Launch an application. - diff --git a/sdk-reference/desktop-python-sdk/v2.0.0/sandbox/page.mdx b/sdk-reference/desktop-python-sdk/v2.0.0/sandbox/page.mdx deleted file mode 100644 index 27098ba..0000000 --- a/sdk-reference/desktop-python-sdk/v2.0.0/sandbox/page.mdx +++ /dev/null @@ -1,341 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(SandboxBase) -``` - - -### create - -```python -@classmethod -def create(cls, - template: Optional[str] = None, - resolution: Optional[Tuple[int, int]] = None, - dpi: Optional[int] = None, - display: Optional[str] = None, - timeout: Optional[int] = None, - metadata: Optional[Dict[str, str]] = None, - envs: Optional[Dict[str, str]] = None, - secure: bool = True, - allow_internet_access: bool = True, - **opts: Unpack[ApiParams]) -> Self -``` - -Create a new sandbox. - -By default, the sandbox is created from the default `desktop` sandbox template. - -**Arguments**: - -- `template`: Sandbox template name or ID -- `resolution`: Startup the desktop with custom screen resolution. Defaults to (1024, 768) -- `dpi`: Startup the desktop with custom DPI. Defaults to 96 -- `display`: Startup the desktop with custom display. Defaults to ":0" -- `timeout`: Timeout for the sandbox in **seconds**, default to 300 seconds. The maximum time a sandbox can be kept alive is 24 hours (86_400 seconds) for Pro users and 1 hour (3_600 seconds) for Hobby users. -- `metadata`: Custom metadata for the sandbox -- `envs`: Custom environment variables for the sandbox -- `secure`: Envd is secured with access token and cannot be used without it -- `allow_internet_access`: Allow sandbox to access the internet, defaults to `True`. - -**Returns**: - -A Sandbox instance for the new sandbox -Use this method instead of using the constructor to create a new sandbox. - - -### beta\_create - -```python -@classmethod -def beta_create(cls, - template: Optional[str] = None, - resolution: Optional[Tuple[int, int]] = None, - dpi: Optional[int] = None, - display: Optional[str] = None, - timeout: Optional[int] = None, - auto_pause: Optional[bool] = False, - metadata: Optional[Dict[str, str]] = None, - envs: Optional[Dict[str, str]] = None, - secure: bool = True, - allow_internet_access: bool = True, - **opts: Unpack[ApiParams]) -> Self -``` - -[BETA] This feature is in beta and may change in the future. - -Create a new sandbox. - -By default, the sandbox is created from the default `desktop` sandbox template. - -**Arguments**: - -- `template`: Sandbox template name or ID -- `resolution`: Startup the desktop with custom screen resolution. Defaults to (1024, 768) -- `dpi`: Startup the desktop with custom DPI. Defaults to 96 -- `display`: Startup the desktop with custom display. Defaults to ":0" -- `timeout`: Timeout for the sandbox in **seconds**, default to 300 seconds. The maximum time a sandbox can be kept alive is 24 hours (86_400 seconds) for Pro users and 1 hour (3_600 seconds) for Hobby users. -- `auto_pause`: Automatically pause the sandbox after the timeout expires. Defaults to `False`. -- `metadata`: Custom metadata for the sandbox -- `envs`: Custom environment variables for the sandbox -- `secure`: Envd is secured with access token and cannot be used without it -- `allow_internet_access`: Allow sandbox to access the internet, defaults to `True`. - -**Returns**: - -A Sandbox instance for the new sandbox -Use this method instead of using the constructor to create a new sandbox. - - -### screenshot - -```python -@overload -def screenshot(format: Literal["stream"]) -> Iterator[bytes] -``` - -Take a screenshot and return it as a stream of bytes. - - -### screenshot - -```python -@overload -def screenshot(format: Literal["bytes"]) -> bytearray -``` - -Take a screenshot and return it as a bytearray. - - -### screenshot - -```python -def screenshot(format: Literal["bytes", "stream"] = "bytes") -``` - -Take a screenshot and return it in the specified format. - -**Arguments**: - -- `format`: The format of the screenshot. Can be 'bytes', 'blob', or 'stream'. - -**Returns**: - -The screenshot in the specified format. - - -### left\_click - -```python -def left_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Left click on the mouse position. - - -### double\_click - -```python -def double_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Double left click on the mouse position. - - -### middle\_click - -```python -def middle_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Middle click on the mouse position. - - -### scroll - -```python -def scroll(direction: Literal["up", "down"] = "down", amount: int = 1) -``` - -Scroll the mouse wheel by the given amount. - -**Arguments**: - -- `direction`: The direction to scroll. Can be "up" or "down". -- `amount`: The amount to scroll. - - -### move\_mouse - -```python -def move_mouse(x: int, y: int) -``` - -Move the mouse to the given coordinates. - -**Arguments**: - -- `x`: The x coordinate. -- `y`: The y coordinate. - - -### mouse\_press - -```python -def mouse_press(button: Literal["left", "right", "middle"] = "left") -``` - -Press the mouse button. - - -### mouse\_release - -```python -def mouse_release(button: Literal["left", "right", "middle"] = "left") -``` - -Release the mouse button. - - -### get\_cursor\_position - -```python -def get_cursor_position() -> tuple[int, int] -``` - -Get the current cursor position. - -**Raises**: - -- `RuntimeError`: If the cursor position cannot be determined - -**Returns**: - -A tuple with the x and y coordinates - - -### get\_screen\_size - -```python -def get_screen_size() -> tuple[int, int] -``` - -Get the current screen size. - -**Raises**: - -- `RuntimeError`: If the screen size cannot be determined - -**Returns**: - -A tuple with the width and height - - -### write - -```python -def write(text: str, *, chunk_size: int = 25, delay_in_ms: int = 75) -> None -``` - -Write the given text at the current cursor position. - -**Arguments**: - -- `text`: The text to write. -- `chunk_size`: The size of each chunk of text to write. -- `delay_in_ms`: The delay between each chunk of text. - - -### press - -```python -def press(key: Union[str, list[str]]) -``` - -Press a key. - -**Arguments**: - -- `key`: The key to press (e.g. "enter", "space", "backspace", etc.). - - -### drag - -```python -def drag(fr: tuple[int, int], to: tuple[int, int]) -``` - -Drag the mouse from the given position to the given position. - -**Arguments**: - -- `from`: The starting position. -- `to`: The ending position. - - -### wait - -```python -def wait(ms: int) -``` - -Wait for the given amount of time. - -**Arguments**: - -- `ms`: The amount of time to wait in milliseconds. - - -### open - -```python -def open(file_or_url: str) -``` - -Open a file or a URL in the default application. - -**Arguments**: - -- `file_or_url`: The file or URL to open. - - -### get\_current\_window\_id - -```python -def get_current_window_id() -> str -``` - -Get the current window ID. - - -### get\_application\_windows - -```python -def get_application_windows(application: str) -> list[str] -``` - -Get the window IDs of all windows for the given application. - - -### get\_window\_title - -```python -def get_window_title(window_id: str) -> str -``` - -Get the title of the window with the given ID. - - -### launch - -```python -def launch(application: str, uri: Optional[str] = None) -``` - -Launch an application. - diff --git a/sdk-reference/desktop-python-sdk/v2.0.1/sandbox/page.mdx b/sdk-reference/desktop-python-sdk/v2.0.1/sandbox/page.mdx deleted file mode 100644 index 27098ba..0000000 --- a/sdk-reference/desktop-python-sdk/v2.0.1/sandbox/page.mdx +++ /dev/null @@ -1,341 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(SandboxBase) -``` - - -### create - -```python -@classmethod -def create(cls, - template: Optional[str] = None, - resolution: Optional[Tuple[int, int]] = None, - dpi: Optional[int] = None, - display: Optional[str] = None, - timeout: Optional[int] = None, - metadata: Optional[Dict[str, str]] = None, - envs: Optional[Dict[str, str]] = None, - secure: bool = True, - allow_internet_access: bool = True, - **opts: Unpack[ApiParams]) -> Self -``` - -Create a new sandbox. - -By default, the sandbox is created from the default `desktop` sandbox template. - -**Arguments**: - -- `template`: Sandbox template name or ID -- `resolution`: Startup the desktop with custom screen resolution. Defaults to (1024, 768) -- `dpi`: Startup the desktop with custom DPI. Defaults to 96 -- `display`: Startup the desktop with custom display. Defaults to ":0" -- `timeout`: Timeout for the sandbox in **seconds**, default to 300 seconds. The maximum time a sandbox can be kept alive is 24 hours (86_400 seconds) for Pro users and 1 hour (3_600 seconds) for Hobby users. -- `metadata`: Custom metadata for the sandbox -- `envs`: Custom environment variables for the sandbox -- `secure`: Envd is secured with access token and cannot be used without it -- `allow_internet_access`: Allow sandbox to access the internet, defaults to `True`. - -**Returns**: - -A Sandbox instance for the new sandbox -Use this method instead of using the constructor to create a new sandbox. - - -### beta\_create - -```python -@classmethod -def beta_create(cls, - template: Optional[str] = None, - resolution: Optional[Tuple[int, int]] = None, - dpi: Optional[int] = None, - display: Optional[str] = None, - timeout: Optional[int] = None, - auto_pause: Optional[bool] = False, - metadata: Optional[Dict[str, str]] = None, - envs: Optional[Dict[str, str]] = None, - secure: bool = True, - allow_internet_access: bool = True, - **opts: Unpack[ApiParams]) -> Self -``` - -[BETA] This feature is in beta and may change in the future. - -Create a new sandbox. - -By default, the sandbox is created from the default `desktop` sandbox template. - -**Arguments**: - -- `template`: Sandbox template name or ID -- `resolution`: Startup the desktop with custom screen resolution. Defaults to (1024, 768) -- `dpi`: Startup the desktop with custom DPI. Defaults to 96 -- `display`: Startup the desktop with custom display. Defaults to ":0" -- `timeout`: Timeout for the sandbox in **seconds**, default to 300 seconds. The maximum time a sandbox can be kept alive is 24 hours (86_400 seconds) for Pro users and 1 hour (3_600 seconds) for Hobby users. -- `auto_pause`: Automatically pause the sandbox after the timeout expires. Defaults to `False`. -- `metadata`: Custom metadata for the sandbox -- `envs`: Custom environment variables for the sandbox -- `secure`: Envd is secured with access token and cannot be used without it -- `allow_internet_access`: Allow sandbox to access the internet, defaults to `True`. - -**Returns**: - -A Sandbox instance for the new sandbox -Use this method instead of using the constructor to create a new sandbox. - - -### screenshot - -```python -@overload -def screenshot(format: Literal["stream"]) -> Iterator[bytes] -``` - -Take a screenshot and return it as a stream of bytes. - - -### screenshot - -```python -@overload -def screenshot(format: Literal["bytes"]) -> bytearray -``` - -Take a screenshot and return it as a bytearray. - - -### screenshot - -```python -def screenshot(format: Literal["bytes", "stream"] = "bytes") -``` - -Take a screenshot and return it in the specified format. - -**Arguments**: - -- `format`: The format of the screenshot. Can be 'bytes', 'blob', or 'stream'. - -**Returns**: - -The screenshot in the specified format. - - -### left\_click - -```python -def left_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Left click on the mouse position. - - -### double\_click - -```python -def double_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Double left click on the mouse position. - - -### middle\_click - -```python -def middle_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Middle click on the mouse position. - - -### scroll - -```python -def scroll(direction: Literal["up", "down"] = "down", amount: int = 1) -``` - -Scroll the mouse wheel by the given amount. - -**Arguments**: - -- `direction`: The direction to scroll. Can be "up" or "down". -- `amount`: The amount to scroll. - - -### move\_mouse - -```python -def move_mouse(x: int, y: int) -``` - -Move the mouse to the given coordinates. - -**Arguments**: - -- `x`: The x coordinate. -- `y`: The y coordinate. - - -### mouse\_press - -```python -def mouse_press(button: Literal["left", "right", "middle"] = "left") -``` - -Press the mouse button. - - -### mouse\_release - -```python -def mouse_release(button: Literal["left", "right", "middle"] = "left") -``` - -Release the mouse button. - - -### get\_cursor\_position - -```python -def get_cursor_position() -> tuple[int, int] -``` - -Get the current cursor position. - -**Raises**: - -- `RuntimeError`: If the cursor position cannot be determined - -**Returns**: - -A tuple with the x and y coordinates - - -### get\_screen\_size - -```python -def get_screen_size() -> tuple[int, int] -``` - -Get the current screen size. - -**Raises**: - -- `RuntimeError`: If the screen size cannot be determined - -**Returns**: - -A tuple with the width and height - - -### write - -```python -def write(text: str, *, chunk_size: int = 25, delay_in_ms: int = 75) -> None -``` - -Write the given text at the current cursor position. - -**Arguments**: - -- `text`: The text to write. -- `chunk_size`: The size of each chunk of text to write. -- `delay_in_ms`: The delay between each chunk of text. - - -### press - -```python -def press(key: Union[str, list[str]]) -``` - -Press a key. - -**Arguments**: - -- `key`: The key to press (e.g. "enter", "space", "backspace", etc.). - - -### drag - -```python -def drag(fr: tuple[int, int], to: tuple[int, int]) -``` - -Drag the mouse from the given position to the given position. - -**Arguments**: - -- `from`: The starting position. -- `to`: The ending position. - - -### wait - -```python -def wait(ms: int) -``` - -Wait for the given amount of time. - -**Arguments**: - -- `ms`: The amount of time to wait in milliseconds. - - -### open - -```python -def open(file_or_url: str) -``` - -Open a file or a URL in the default application. - -**Arguments**: - -- `file_or_url`: The file or URL to open. - - -### get\_current\_window\_id - -```python -def get_current_window_id() -> str -``` - -Get the current window ID. - - -### get\_application\_windows - -```python -def get_application_windows(application: str) -> list[str] -``` - -Get the window IDs of all windows for the given application. - - -### get\_window\_title - -```python -def get_window_title(window_id: str) -> str -``` - -Get the title of the window with the given ID. - - -### launch - -```python -def launch(application: str, uri: Optional[str] = None) -``` - -Launch an application. - diff --git a/sdk-reference/desktop-python-sdk/v2.1.0/sandbox/page.mdx b/sdk-reference/desktop-python-sdk/v2.1.0/sandbox/page.mdx deleted file mode 100644 index 27098ba..0000000 --- a/sdk-reference/desktop-python-sdk/v2.1.0/sandbox/page.mdx +++ /dev/null @@ -1,341 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(SandboxBase) -``` - - -### create - -```python -@classmethod -def create(cls, - template: Optional[str] = None, - resolution: Optional[Tuple[int, int]] = None, - dpi: Optional[int] = None, - display: Optional[str] = None, - timeout: Optional[int] = None, - metadata: Optional[Dict[str, str]] = None, - envs: Optional[Dict[str, str]] = None, - secure: bool = True, - allow_internet_access: bool = True, - **opts: Unpack[ApiParams]) -> Self -``` - -Create a new sandbox. - -By default, the sandbox is created from the default `desktop` sandbox template. - -**Arguments**: - -- `template`: Sandbox template name or ID -- `resolution`: Startup the desktop with custom screen resolution. Defaults to (1024, 768) -- `dpi`: Startup the desktop with custom DPI. Defaults to 96 -- `display`: Startup the desktop with custom display. Defaults to ":0" -- `timeout`: Timeout for the sandbox in **seconds**, default to 300 seconds. The maximum time a sandbox can be kept alive is 24 hours (86_400 seconds) for Pro users and 1 hour (3_600 seconds) for Hobby users. -- `metadata`: Custom metadata for the sandbox -- `envs`: Custom environment variables for the sandbox -- `secure`: Envd is secured with access token and cannot be used without it -- `allow_internet_access`: Allow sandbox to access the internet, defaults to `True`. - -**Returns**: - -A Sandbox instance for the new sandbox -Use this method instead of using the constructor to create a new sandbox. - - -### beta\_create - -```python -@classmethod -def beta_create(cls, - template: Optional[str] = None, - resolution: Optional[Tuple[int, int]] = None, - dpi: Optional[int] = None, - display: Optional[str] = None, - timeout: Optional[int] = None, - auto_pause: Optional[bool] = False, - metadata: Optional[Dict[str, str]] = None, - envs: Optional[Dict[str, str]] = None, - secure: bool = True, - allow_internet_access: bool = True, - **opts: Unpack[ApiParams]) -> Self -``` - -[BETA] This feature is in beta and may change in the future. - -Create a new sandbox. - -By default, the sandbox is created from the default `desktop` sandbox template. - -**Arguments**: - -- `template`: Sandbox template name or ID -- `resolution`: Startup the desktop with custom screen resolution. Defaults to (1024, 768) -- `dpi`: Startup the desktop with custom DPI. Defaults to 96 -- `display`: Startup the desktop with custom display. Defaults to ":0" -- `timeout`: Timeout for the sandbox in **seconds**, default to 300 seconds. The maximum time a sandbox can be kept alive is 24 hours (86_400 seconds) for Pro users and 1 hour (3_600 seconds) for Hobby users. -- `auto_pause`: Automatically pause the sandbox after the timeout expires. Defaults to `False`. -- `metadata`: Custom metadata for the sandbox -- `envs`: Custom environment variables for the sandbox -- `secure`: Envd is secured with access token and cannot be used without it -- `allow_internet_access`: Allow sandbox to access the internet, defaults to `True`. - -**Returns**: - -A Sandbox instance for the new sandbox -Use this method instead of using the constructor to create a new sandbox. - - -### screenshot - -```python -@overload -def screenshot(format: Literal["stream"]) -> Iterator[bytes] -``` - -Take a screenshot and return it as a stream of bytes. - - -### screenshot - -```python -@overload -def screenshot(format: Literal["bytes"]) -> bytearray -``` - -Take a screenshot and return it as a bytearray. - - -### screenshot - -```python -def screenshot(format: Literal["bytes", "stream"] = "bytes") -``` - -Take a screenshot and return it in the specified format. - -**Arguments**: - -- `format`: The format of the screenshot. Can be 'bytes', 'blob', or 'stream'. - -**Returns**: - -The screenshot in the specified format. - - -### left\_click - -```python -def left_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Left click on the mouse position. - - -### double\_click - -```python -def double_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Double left click on the mouse position. - - -### middle\_click - -```python -def middle_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Middle click on the mouse position. - - -### scroll - -```python -def scroll(direction: Literal["up", "down"] = "down", amount: int = 1) -``` - -Scroll the mouse wheel by the given amount. - -**Arguments**: - -- `direction`: The direction to scroll. Can be "up" or "down". -- `amount`: The amount to scroll. - - -### move\_mouse - -```python -def move_mouse(x: int, y: int) -``` - -Move the mouse to the given coordinates. - -**Arguments**: - -- `x`: The x coordinate. -- `y`: The y coordinate. - - -### mouse\_press - -```python -def mouse_press(button: Literal["left", "right", "middle"] = "left") -``` - -Press the mouse button. - - -### mouse\_release - -```python -def mouse_release(button: Literal["left", "right", "middle"] = "left") -``` - -Release the mouse button. - - -### get\_cursor\_position - -```python -def get_cursor_position() -> tuple[int, int] -``` - -Get the current cursor position. - -**Raises**: - -- `RuntimeError`: If the cursor position cannot be determined - -**Returns**: - -A tuple with the x and y coordinates - - -### get\_screen\_size - -```python -def get_screen_size() -> tuple[int, int] -``` - -Get the current screen size. - -**Raises**: - -- `RuntimeError`: If the screen size cannot be determined - -**Returns**: - -A tuple with the width and height - - -### write - -```python -def write(text: str, *, chunk_size: int = 25, delay_in_ms: int = 75) -> None -``` - -Write the given text at the current cursor position. - -**Arguments**: - -- `text`: The text to write. -- `chunk_size`: The size of each chunk of text to write. -- `delay_in_ms`: The delay between each chunk of text. - - -### press - -```python -def press(key: Union[str, list[str]]) -``` - -Press a key. - -**Arguments**: - -- `key`: The key to press (e.g. "enter", "space", "backspace", etc.). - - -### drag - -```python -def drag(fr: tuple[int, int], to: tuple[int, int]) -``` - -Drag the mouse from the given position to the given position. - -**Arguments**: - -- `from`: The starting position. -- `to`: The ending position. - - -### wait - -```python -def wait(ms: int) -``` - -Wait for the given amount of time. - -**Arguments**: - -- `ms`: The amount of time to wait in milliseconds. - - -### open - -```python -def open(file_or_url: str) -``` - -Open a file or a URL in the default application. - -**Arguments**: - -- `file_or_url`: The file or URL to open. - - -### get\_current\_window\_id - -```python -def get_current_window_id() -> str -``` - -Get the current window ID. - - -### get\_application\_windows - -```python -def get_application_windows(application: str) -> list[str] -``` - -Get the window IDs of all windows for the given application. - - -### get\_window\_title - -```python -def get_window_title(window_id: str) -> str -``` - -Get the title of the window with the given ID. - - -### launch - -```python -def launch(application: str, uri: Optional[str] = None) -``` - -Launch an application. - diff --git a/sdk-reference/desktop-python-sdk/v2.2.0/sandbox/page.mdx b/sdk-reference/desktop-python-sdk/v2.2.0/sandbox/page.mdx deleted file mode 100644 index 27098ba..0000000 --- a/sdk-reference/desktop-python-sdk/v2.2.0/sandbox/page.mdx +++ /dev/null @@ -1,341 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(SandboxBase) -``` - - -### create - -```python -@classmethod -def create(cls, - template: Optional[str] = None, - resolution: Optional[Tuple[int, int]] = None, - dpi: Optional[int] = None, - display: Optional[str] = None, - timeout: Optional[int] = None, - metadata: Optional[Dict[str, str]] = None, - envs: Optional[Dict[str, str]] = None, - secure: bool = True, - allow_internet_access: bool = True, - **opts: Unpack[ApiParams]) -> Self -``` - -Create a new sandbox. - -By default, the sandbox is created from the default `desktop` sandbox template. - -**Arguments**: - -- `template`: Sandbox template name or ID -- `resolution`: Startup the desktop with custom screen resolution. Defaults to (1024, 768) -- `dpi`: Startup the desktop with custom DPI. Defaults to 96 -- `display`: Startup the desktop with custom display. Defaults to ":0" -- `timeout`: Timeout for the sandbox in **seconds**, default to 300 seconds. The maximum time a sandbox can be kept alive is 24 hours (86_400 seconds) for Pro users and 1 hour (3_600 seconds) for Hobby users. -- `metadata`: Custom metadata for the sandbox -- `envs`: Custom environment variables for the sandbox -- `secure`: Envd is secured with access token and cannot be used without it -- `allow_internet_access`: Allow sandbox to access the internet, defaults to `True`. - -**Returns**: - -A Sandbox instance for the new sandbox -Use this method instead of using the constructor to create a new sandbox. - - -### beta\_create - -```python -@classmethod -def beta_create(cls, - template: Optional[str] = None, - resolution: Optional[Tuple[int, int]] = None, - dpi: Optional[int] = None, - display: Optional[str] = None, - timeout: Optional[int] = None, - auto_pause: Optional[bool] = False, - metadata: Optional[Dict[str, str]] = None, - envs: Optional[Dict[str, str]] = None, - secure: bool = True, - allow_internet_access: bool = True, - **opts: Unpack[ApiParams]) -> Self -``` - -[BETA] This feature is in beta and may change in the future. - -Create a new sandbox. - -By default, the sandbox is created from the default `desktop` sandbox template. - -**Arguments**: - -- `template`: Sandbox template name or ID -- `resolution`: Startup the desktop with custom screen resolution. Defaults to (1024, 768) -- `dpi`: Startup the desktop with custom DPI. Defaults to 96 -- `display`: Startup the desktop with custom display. Defaults to ":0" -- `timeout`: Timeout for the sandbox in **seconds**, default to 300 seconds. The maximum time a sandbox can be kept alive is 24 hours (86_400 seconds) for Pro users and 1 hour (3_600 seconds) for Hobby users. -- `auto_pause`: Automatically pause the sandbox after the timeout expires. Defaults to `False`. -- `metadata`: Custom metadata for the sandbox -- `envs`: Custom environment variables for the sandbox -- `secure`: Envd is secured with access token and cannot be used without it -- `allow_internet_access`: Allow sandbox to access the internet, defaults to `True`. - -**Returns**: - -A Sandbox instance for the new sandbox -Use this method instead of using the constructor to create a new sandbox. - - -### screenshot - -```python -@overload -def screenshot(format: Literal["stream"]) -> Iterator[bytes] -``` - -Take a screenshot and return it as a stream of bytes. - - -### screenshot - -```python -@overload -def screenshot(format: Literal["bytes"]) -> bytearray -``` - -Take a screenshot and return it as a bytearray. - - -### screenshot - -```python -def screenshot(format: Literal["bytes", "stream"] = "bytes") -``` - -Take a screenshot and return it in the specified format. - -**Arguments**: - -- `format`: The format of the screenshot. Can be 'bytes', 'blob', or 'stream'. - -**Returns**: - -The screenshot in the specified format. - - -### left\_click - -```python -def left_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Left click on the mouse position. - - -### double\_click - -```python -def double_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Double left click on the mouse position. - - -### middle\_click - -```python -def middle_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Middle click on the mouse position. - - -### scroll - -```python -def scroll(direction: Literal["up", "down"] = "down", amount: int = 1) -``` - -Scroll the mouse wheel by the given amount. - -**Arguments**: - -- `direction`: The direction to scroll. Can be "up" or "down". -- `amount`: The amount to scroll. - - -### move\_mouse - -```python -def move_mouse(x: int, y: int) -``` - -Move the mouse to the given coordinates. - -**Arguments**: - -- `x`: The x coordinate. -- `y`: The y coordinate. - - -### mouse\_press - -```python -def mouse_press(button: Literal["left", "right", "middle"] = "left") -``` - -Press the mouse button. - - -### mouse\_release - -```python -def mouse_release(button: Literal["left", "right", "middle"] = "left") -``` - -Release the mouse button. - - -### get\_cursor\_position - -```python -def get_cursor_position() -> tuple[int, int] -``` - -Get the current cursor position. - -**Raises**: - -- `RuntimeError`: If the cursor position cannot be determined - -**Returns**: - -A tuple with the x and y coordinates - - -### get\_screen\_size - -```python -def get_screen_size() -> tuple[int, int] -``` - -Get the current screen size. - -**Raises**: - -- `RuntimeError`: If the screen size cannot be determined - -**Returns**: - -A tuple with the width and height - - -### write - -```python -def write(text: str, *, chunk_size: int = 25, delay_in_ms: int = 75) -> None -``` - -Write the given text at the current cursor position. - -**Arguments**: - -- `text`: The text to write. -- `chunk_size`: The size of each chunk of text to write. -- `delay_in_ms`: The delay between each chunk of text. - - -### press - -```python -def press(key: Union[str, list[str]]) -``` - -Press a key. - -**Arguments**: - -- `key`: The key to press (e.g. "enter", "space", "backspace", etc.). - - -### drag - -```python -def drag(fr: tuple[int, int], to: tuple[int, int]) -``` - -Drag the mouse from the given position to the given position. - -**Arguments**: - -- `from`: The starting position. -- `to`: The ending position. - - -### wait - -```python -def wait(ms: int) -``` - -Wait for the given amount of time. - -**Arguments**: - -- `ms`: The amount of time to wait in milliseconds. - - -### open - -```python -def open(file_or_url: str) -``` - -Open a file or a URL in the default application. - -**Arguments**: - -- `file_or_url`: The file or URL to open. - - -### get\_current\_window\_id - -```python -def get_current_window_id() -> str -``` - -Get the current window ID. - - -### get\_application\_windows - -```python -def get_application_windows(application: str) -> list[str] -``` - -Get the window IDs of all windows for the given application. - - -### get\_window\_title - -```python -def get_window_title(window_id: str) -> str -``` - -Get the title of the window with the given ID. - - -### launch - -```python -def launch(application: str, uri: Optional[str] = None) -``` - -Launch an application. - diff --git a/sdk-reference/desktop-python-sdk/v2.3.0/sandbox/page.mdx b/sdk-reference/desktop-python-sdk/v2.3.0/sandbox/page.mdx deleted file mode 100644 index 27098ba..0000000 --- a/sdk-reference/desktop-python-sdk/v2.3.0/sandbox/page.mdx +++ /dev/null @@ -1,341 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(SandboxBase) -``` - - -### create - -```python -@classmethod -def create(cls, - template: Optional[str] = None, - resolution: Optional[Tuple[int, int]] = None, - dpi: Optional[int] = None, - display: Optional[str] = None, - timeout: Optional[int] = None, - metadata: Optional[Dict[str, str]] = None, - envs: Optional[Dict[str, str]] = None, - secure: bool = True, - allow_internet_access: bool = True, - **opts: Unpack[ApiParams]) -> Self -``` - -Create a new sandbox. - -By default, the sandbox is created from the default `desktop` sandbox template. - -**Arguments**: - -- `template`: Sandbox template name or ID -- `resolution`: Startup the desktop with custom screen resolution. Defaults to (1024, 768) -- `dpi`: Startup the desktop with custom DPI. Defaults to 96 -- `display`: Startup the desktop with custom display. Defaults to ":0" -- `timeout`: Timeout for the sandbox in **seconds**, default to 300 seconds. The maximum time a sandbox can be kept alive is 24 hours (86_400 seconds) for Pro users and 1 hour (3_600 seconds) for Hobby users. -- `metadata`: Custom metadata for the sandbox -- `envs`: Custom environment variables for the sandbox -- `secure`: Envd is secured with access token and cannot be used without it -- `allow_internet_access`: Allow sandbox to access the internet, defaults to `True`. - -**Returns**: - -A Sandbox instance for the new sandbox -Use this method instead of using the constructor to create a new sandbox. - - -### beta\_create - -```python -@classmethod -def beta_create(cls, - template: Optional[str] = None, - resolution: Optional[Tuple[int, int]] = None, - dpi: Optional[int] = None, - display: Optional[str] = None, - timeout: Optional[int] = None, - auto_pause: Optional[bool] = False, - metadata: Optional[Dict[str, str]] = None, - envs: Optional[Dict[str, str]] = None, - secure: bool = True, - allow_internet_access: bool = True, - **opts: Unpack[ApiParams]) -> Self -``` - -[BETA] This feature is in beta and may change in the future. - -Create a new sandbox. - -By default, the sandbox is created from the default `desktop` sandbox template. - -**Arguments**: - -- `template`: Sandbox template name or ID -- `resolution`: Startup the desktop with custom screen resolution. Defaults to (1024, 768) -- `dpi`: Startup the desktop with custom DPI. Defaults to 96 -- `display`: Startup the desktop with custom display. Defaults to ":0" -- `timeout`: Timeout for the sandbox in **seconds**, default to 300 seconds. The maximum time a sandbox can be kept alive is 24 hours (86_400 seconds) for Pro users and 1 hour (3_600 seconds) for Hobby users. -- `auto_pause`: Automatically pause the sandbox after the timeout expires. Defaults to `False`. -- `metadata`: Custom metadata for the sandbox -- `envs`: Custom environment variables for the sandbox -- `secure`: Envd is secured with access token and cannot be used without it -- `allow_internet_access`: Allow sandbox to access the internet, defaults to `True`. - -**Returns**: - -A Sandbox instance for the new sandbox -Use this method instead of using the constructor to create a new sandbox. - - -### screenshot - -```python -@overload -def screenshot(format: Literal["stream"]) -> Iterator[bytes] -``` - -Take a screenshot and return it as a stream of bytes. - - -### screenshot - -```python -@overload -def screenshot(format: Literal["bytes"]) -> bytearray -``` - -Take a screenshot and return it as a bytearray. - - -### screenshot - -```python -def screenshot(format: Literal["bytes", "stream"] = "bytes") -``` - -Take a screenshot and return it in the specified format. - -**Arguments**: - -- `format`: The format of the screenshot. Can be 'bytes', 'blob', or 'stream'. - -**Returns**: - -The screenshot in the specified format. - - -### left\_click - -```python -def left_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Left click on the mouse position. - - -### double\_click - -```python -def double_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Double left click on the mouse position. - - -### middle\_click - -```python -def middle_click(x: Optional[int] = None, y: Optional[int] = None) -``` - -Middle click on the mouse position. - - -### scroll - -```python -def scroll(direction: Literal["up", "down"] = "down", amount: int = 1) -``` - -Scroll the mouse wheel by the given amount. - -**Arguments**: - -- `direction`: The direction to scroll. Can be "up" or "down". -- `amount`: The amount to scroll. - - -### move\_mouse - -```python -def move_mouse(x: int, y: int) -``` - -Move the mouse to the given coordinates. - -**Arguments**: - -- `x`: The x coordinate. -- `y`: The y coordinate. - - -### mouse\_press - -```python -def mouse_press(button: Literal["left", "right", "middle"] = "left") -``` - -Press the mouse button. - - -### mouse\_release - -```python -def mouse_release(button: Literal["left", "right", "middle"] = "left") -``` - -Release the mouse button. - - -### get\_cursor\_position - -```python -def get_cursor_position() -> tuple[int, int] -``` - -Get the current cursor position. - -**Raises**: - -- `RuntimeError`: If the cursor position cannot be determined - -**Returns**: - -A tuple with the x and y coordinates - - -### get\_screen\_size - -```python -def get_screen_size() -> tuple[int, int] -``` - -Get the current screen size. - -**Raises**: - -- `RuntimeError`: If the screen size cannot be determined - -**Returns**: - -A tuple with the width and height - - -### write - -```python -def write(text: str, *, chunk_size: int = 25, delay_in_ms: int = 75) -> None -``` - -Write the given text at the current cursor position. - -**Arguments**: - -- `text`: The text to write. -- `chunk_size`: The size of each chunk of text to write. -- `delay_in_ms`: The delay between each chunk of text. - - -### press - -```python -def press(key: Union[str, list[str]]) -``` - -Press a key. - -**Arguments**: - -- `key`: The key to press (e.g. "enter", "space", "backspace", etc.). - - -### drag - -```python -def drag(fr: tuple[int, int], to: tuple[int, int]) -``` - -Drag the mouse from the given position to the given position. - -**Arguments**: - -- `from`: The starting position. -- `to`: The ending position. - - -### wait - -```python -def wait(ms: int) -``` - -Wait for the given amount of time. - -**Arguments**: - -- `ms`: The amount of time to wait in milliseconds. - - -### open - -```python -def open(file_or_url: str) -``` - -Open a file or a URL in the default application. - -**Arguments**: - -- `file_or_url`: The file or URL to open. - - -### get\_current\_window\_id - -```python -def get_current_window_id() -> str -``` - -Get the current window ID. - - -### get\_application\_windows - -```python -def get_application_windows(application: str) -> list[str] -``` - -Get the window IDs of all windows for the given application. - - -### get\_window\_title - -```python -def get_window_title(window_id: str) -> str -``` - -Get the title of the window with the given ID. - - -### launch - -```python -def launch(application: str, uri: Optional[str] = None) -``` - -Launch an application. -